diff options
author | Pavel Sergeev <dzhioev@chromium.org> | 2014-09-25 20:35:56 +0400 |
---|---|---|
committer | Pavel Sergeev <dzhioev@chromium.org> | 2014-09-25 16:36:38 +0000 |
commit | 7bda37ee9e690822ebcfaed5ab73e1086fa6f285 (patch) | |
tree | 0864330364bfd83485979079b3aab6985e7450ea /third_party/polymer | |
parent | e3c6d9defedfec359fc3d7c69fd63fa36035e722 (diff) | |
download | chromium_src-7bda37ee9e690822ebcfaed5ab73e1086fa6f285.zip chromium_src-7bda37ee9e690822ebcfaed5ab73e1086fa6f285.tar.gz chromium_src-7bda37ee9e690822ebcfaed5ab73e1086fa6f285.tar.bz2 |
Inline scripts were extracted from Polymer elements.
Added a directory 'components-chromium'. The difference
with the 'components' directory is that all inline scripts
were extracted from Polymer elements to separate files. Such
version is needed if we want to use the elements in a web
UI, where inline scripts are forbidden by content security
policy. An extraction was made by the vulcanize tool. I
wrote the script called 'extract_inline_scripts.sh' to
handle all the elements at once. It finds HTML files
containing inline scripts (excluding some HTML files that
are not a components of Polymer) and applies vulcanize to
them.
A JS file extracted from a file named 'foo/bar.html' will
have a name 'foo/bar-extracted.js'.
Also changed the wrong dependency 'core-iconset-svg' in
bower.json and 'core-iconset-svg' was checked out correctly.
Landed manually, because of the bug in the commit queue (http://crbug.com/416255).
R=raymes@chromium.org, rsadam@chromium.org, thestig@chromium.org
TBR=cpu
BUG=415696
TEST=none
Review URL: https://codereview.chromium.org/592593002
Cr-Commit-Position: refs/heads/master@{#296721}
Diffstat (limited to 'third_party/polymer')
600 files changed, 38811 insertions, 128 deletions
diff --git a/third_party/polymer/README.chromium b/third_party/polymer/README.chromium index 3490cc3..eaba41b 100644 --- a/third_party/polymer/README.chromium +++ b/third_party/polymer/README.chromium @@ -32,9 +32,14 @@ technologies called the Polymer. Local Modifications: - Removed executable bit from the files in 'components/core-list'. +- Created a copy 'components-chromium' of the 'components' directory with the +only difference that all inline JavaScript blocks are extracted from Polymer +HTML elements to external JS files. This version of the Polymer is used in a web +UI, where CSP forbids an execution of inline scripts. The extraction was made +with the help of the Vulcanize tool (https://github.com/Polymer/vulcanize). -To restore a content of the 'components' and '../third_party/web-animations-js' -directory from scratch, run ./reproduce.sh (requires bower). +To restore a content of the 'components', 'components-chromium' directorires +from scratch, run ./reproduce.sh (requires bower and vulcanize). Note on Bower: The directory can be updated by running "bower update". A new component can be @@ -45,4 +50,3 @@ Also be sure that you listed all the added packages and **all their dependencies** in bower.json, and specified **exact** versions of every package explicitly. That is needed because Bower can't handle recursive dependencies correctly (see http://stackoverflow.com/q/25899532). - diff --git a/third_party/polymer/bower.json b/third_party/polymer/bower.json index 9b8a138..90cb240 100644 --- a/third_party/polymer/bower.json +++ b/third_party/polymer/bower.json @@ -19,7 +19,7 @@ "core-icon": "Polymer/core-icon#0.3.5", "core-icons": "Polymer/core-icons#0.3.5", "core-iconset": "Polymer/core-iconset#0.3.5", - "core-iconset-svg": "Polymer/core-iconset#0.3.5", + "core-iconset-svg": "Polymer/core-iconset-svg#0.3.5", "core-input": "Polymer/core-input#0.3.5", "core-item": "Polymer/core-item#0.3.5", "core-layout-grid": "Polymer/core-layout-grid#0.3.5", diff --git a/third_party/polymer/components-chromium/core-ajax/.bower.json b/third_party/polymer/components-chromium/core-ajax/.bower.json new file mode 100644 index 0000000..149a36e --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-ajax", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-ajax", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "c77d87791086fdd96f860d15f9ca3d8261d80d5a" + }, + "_source": "git://github.com/Polymer/core-ajax.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-ajax" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-ajax/README.md b/third_party/polymer/components-chromium/core-ajax/README.md new file mode 100644 index 0000000..a0a4145 --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/README.md @@ -0,0 +1,4 @@ +core-ajax +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-ajax) for more information. diff --git a/third_party/polymer/components-chromium/core-ajax/bower.json b/third_party/polymer/components-chromium/core-ajax/bower.json new file mode 100644 index 0000000..a9cd764 --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-ajax", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-ajax/core-ajax-extracted.js b/third_party/polymer/components-chromium/core-ajax/core-ajax-extracted.js new file mode 100644 index 0000000..299251b --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/core-ajax-extracted.js @@ -0,0 +1,286 @@ + + + Polymer('core-ajax', { + /** + * Fired when a response is received. + * + * @event core-response + */ + + /** + * Fired when an error is received. + * + * @event core-error + */ + + /** + * Fired whenever a response or an error is received. + * + * @event core-complete + */ + + /** + * The URL target of the request. + * + * @attribute url + * @type string + * @default '' + */ + url: '', + + /** + * Specifies what data to store in the `response` property, and + * to deliver as `event.response` in `response` events. + * + * One of: + * + * `text`: uses `XHR.responseText`. + * + * `xml`: uses `XHR.responseXML`. + * + * `json`: uses `XHR.responseText` parsed as JSON. + * + * `arraybuffer`: uses `XHR.response`. + * + * `blob`: uses `XHR.response`. + * + * `document`: uses `XHR.response`. + * + * @attribute handleAs + * @type string + * @default 'text' + */ + handleAs: '', + + /** + * If true, automatically performs an Ajax request when either `url` or `params` changes. + * + * @attribute auto + * @type boolean + * @default false + */ + auto: false, + + /** + * Parameters to send to the specified URL, as JSON. + * + * @attribute params + * @type string (JSON) + * @default '' + */ + params: '', + + /** + * Returns the response object. + * + * @attribute response + * @type Object + * @default null + */ + response: null, + + /** + * The HTTP method to use such as 'GET', 'POST', 'PUT', or 'DELETE'. + * Default is 'GET'. + * + * @attribute method + * @type string + * @default '' + */ + method: '', + + /** + * HTTP request headers to send. + * + * Example: + * + * <core-ajax + * auto + * url="http://somesite.com" + * headers='{"X-Requested-With": "XMLHttpRequest"}' + * handleAs="json" + * on-core-response="{{handleResponse}}"></core-ajax> + * + * @attribute headers + * @type Object + * @default null + */ + headers: null, + + /** + * Optional raw body content to send when method === "POST". + * + * Example: + * + * <core-ajax method="POST" auto url="http://somesite.com" + * body='{"foo":1, "bar":2}'> + * </core-ajax> + * + * @attribute body + * @type Object + * @default null + */ + body: null, + + /** + * Content type to use when sending data. + * + * @attribute contentType + * @type string + * @default 'application/x-www-form-urlencoded' + */ + contentType: 'application/x-www-form-urlencoded', + + /** + * Set the withCredentials flag on the request. + * + * @attribute withCredentials + * @type boolean + * @default false + */ + withCredentials: false, + + /** + * Additional properties to send to core-xhr. + * + * Can be set to an object containing default properties + * to send as arguments to the `core-xhr.request()` method + * which implements the low-level communication. + * + * @property xhrArgs + * @type Object + * @default null + */ + xhrArgs: null, + + ready: function() { + this.xhr = document.createElement('core-xhr'); + }, + + receive: function(response, xhr) { + if (this.isSuccess(xhr)) { + this.processResponse(xhr); + } else { + this.error(xhr); + } + this.complete(xhr); + }, + + isSuccess: function(xhr) { + var status = xhr.status || 0; + return !status || (status >= 200 && status < 300); + }, + + processResponse: function(xhr) { + var response = this.evalResponse(xhr); + this.response = response; + this.fire('core-response', {response: response, xhr: xhr}); + }, + + error: function(xhr) { + var response = xhr.status + ': ' + xhr.responseText; + this.fire('core-error', {response: response, xhr: xhr}); + }, + + complete: function(xhr) { + this.fire('core-complete', {response: xhr.status, xhr: xhr}); + }, + + evalResponse: function(xhr) { + return this[(this.handleAs || 'text') + 'Handler'](xhr); + }, + + xmlHandler: function(xhr) { + return xhr.responseXML; + }, + + textHandler: function(xhr) { + return xhr.responseText; + }, + + jsonHandler: function(xhr) { + var r = xhr.responseText; + try { + return JSON.parse(r); + } catch (x) { + console.warn('core-ajax caught an exception trying to parse reponse as JSON:'); + console.warn('url:', this.url); + console.warn(x); + return r; + } + }, + + documentHandler: function(xhr) { + return xhr.response; + }, + + blobHandler: function(xhr) { + return xhr.response; + }, + + arraybufferHandler: function(xhr) { + return xhr.response; + }, + + urlChanged: function() { + if (!this.handleAs) { + var ext = String(this.url).split('.').pop(); + switch (ext) { + case 'json': + this.handleAs = 'json'; + break; + } + } + this.autoGo(); + }, + + paramsChanged: function() { + this.autoGo(); + }, + + autoChanged: function() { + this.autoGo(); + }, + + // TODO(sorvell): multiple side-effects could call autoGo + // during one micro-task, use a job to have only one action + // occur + autoGo: function() { + if (this.auto) { + this.goJob = this.job(this.goJob, this.go, 0); + } + }, + + /** + * Performs an Ajax request to the specified URL. + * + * @method go + */ + go: function() { + var args = this.xhrArgs || {}; + // TODO(sjmiles): we may want XHR to default to POST if body is set + args.body = this.body || args.body; + args.params = this.params || args.params; + if (args.params && typeof(args.params) == 'string') { + args.params = JSON.parse(args.params); + } + args.headers = this.headers || args.headers || {}; + if (args.headers && typeof(args.headers) == 'string') { + args.headers = JSON.parse(args.headers); + } + if (this.contentType) { + args.headers['content-type'] = this.contentType; + } + if (this.handleAs === 'arraybuffer' || this.handleAs === 'blob' || + this.handleAs === 'document') { + args.responseType = this.handleAs; + } + args.withCredentials = this.withCredentials; + args.callback = this.receive.bind(this); + args.url = this.url; + args.method = this.method; + return args.url && this.xhr.request(args); + } + + }); + diff --git a/third_party/polymer/components-chromium/core-ajax/core-ajax.html b/third_party/polymer/components-chromium/core-ajax/core-ajax.html new file mode 100644 index 0000000..8a1f49c --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/core-ajax.html @@ -0,0 +1,38 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Polymer Core Elements + +The `core-ajax` element exposes `XMLHttpRequest` functionality. + + <core-ajax + auto + url="http://gdata.youtube.com/feeds/api/videos/" + params='{"alt":"json", "q":"chrome"}' + handleAs="json" + on-core-response="{{handleResponse}}"></core-ajax> + +With `auto` set to `true`, the element performs a request whenever +its `url` or `params` properties are changed. + +Note: The `params` attribute must be double quoted JSON. + +You can trigger a request explicitly by calling `go` on the +element. + +@element core-ajax +@status beta +@homepage github.io +--> +<link rel="import" href="core-xhr.html"> +<polymer-element name="core-ajax" hidden attributes="url handleAs auto params response method headers body contentType withCredentials" assetpath=""> + +</polymer-element> +<script src="core-ajax-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-ajax/core-xhr-extracted.js b/third_party/polymer/components-chromium/core-ajax/core-xhr-extracted.js new file mode 100644 index 0000000..bd43352 --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/core-xhr-extracted.js @@ -0,0 +1,87 @@ + + + Polymer('core-xhr', { + + /** + * Sends a HTTP request to the server and returns the XHR object. + * + * @method request + * @param {Object} inOptions + * @param {String} inOptions.url The url to which the request is sent. + * @param {String} inOptions.method The HTTP method to use, default is GET. + * @param {boolean} inOptions.sync By default, all requests are sent asynchronously. To send synchronous requests, set to true. + * @param {Object} inOptions.params Data to be sent to the server. + * @param {Object} inOptions.body The content for the request body for POST method. + * @param {Object} inOptions.headers HTTP request headers. + * @param {String} inOptions.responseType The response type. Default is 'text'. + * @param {boolean} inOptions.withCredentials Whether or not to send credentials on the request. Default is false. + * @param {Object} inOptions.callback Called when request is completed. + * @returns {Object} XHR object. + */ + request: function(options) { + var xhr = new XMLHttpRequest(); + var url = options.url; + var method = options.method || 'GET'; + var async = !options.sync; + // + var params = this.toQueryString(options.params); + if (params && method == 'GET') { + url += (url.indexOf('?') > 0 ? '&' : '?') + params; + } + var xhrParams = this.isBodyMethod(method) ? (options.body || params) : null; + // + xhr.open(method, url, async); + if (options.responseType) { + xhr.responseType = options.responseType; + } + if (options.withCredentials) { + xhr.withCredentials = true; + } + this.makeReadyStateHandler(xhr, options.callback); + this.setRequestHeaders(xhr, options.headers); + xhr.send(xhrParams); + if (!async) { + xhr.onreadystatechange(xhr); + } + return xhr; + }, + + toQueryString: function(params) { + var r = []; + for (var n in params) { + var v = params[n]; + n = encodeURIComponent(n); + r.push(v == null ? n : (n + '=' + encodeURIComponent(v))); + } + return r.join('&'); + }, + + isBodyMethod: function(method) { + return this.bodyMethods[(method || '').toUpperCase()]; + }, + + bodyMethods: { + POST: 1, + PUT: 1, + DELETE: 1 + }, + + makeReadyStateHandler: function(xhr, callback) { + xhr.onreadystatechange = function() { + if (xhr.readyState == 4) { + callback && callback.call(null, xhr.response, xhr); + } + }; + }, + + setRequestHeaders: function(xhr, headers) { + if (headers) { + for (var name in headers) { + xhr.setRequestHeader(name, headers[name]); + } + } + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-ajax/core-xhr.html b/third_party/polymer/components-chromium/core-ajax/core-xhr.html new file mode 100644 index 0000000..3688053 --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/core-xhr.html @@ -0,0 +1,30 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +/** + * @group Polymer Core Elements + * + * core-xhr can be used to perform XMLHttpRequests. + * + * <core-xhr id="xhr"></core-xhr> + * ... + * this.$.xhr.request({url: url, params: params, callback: callback}); + * + * @element core-xhr + */ +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-xhr" hidden assetpath=""> + + + +</polymer-element> +<script src="core-xhr-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-ajax/demo.html b/third_party/polymer/components-chromium/core-ajax/demo.html new file mode 100644 index 0000000..b42221d --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/demo.html @@ -0,0 +1,43 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + + <title>core-ajax</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-ajax.html"> + +</head> +<body> + + <core-ajax auto url="http://gdata.youtube.com/feeds/api/videos/" + params='{"alt":"json", "q":"chrome"}' + handleAs="json"></core-ajax> + + <template repeat="{{response.feed.entry}}"> + <div>{{title.$t}}</div> + </template> + + <script> + document.addEventListener('polymer-ready', function() { + var ajax = document.querySelector("core-ajax"); + ajax.addEventListener("core-response", + function(e) { + document.querySelector('template').model = { + response: e.detail.response + }; + } + ); + }); + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-ajax/index.html b/third_party/polymer/components-chromium/core-ajax/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-ajax/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/.bower.json b/third_party/polymer/components-chromium/core-animated-pages/.bower.json new file mode 100644 index 0000000..9d0932d --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "core-animated-pages", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-style": "Polymer/core-style#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-animated-pages", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "0886640a0d87926a01d8efd3dbc2f58b1eac514f" + }, + "_source": "git://github.com/Polymer/core-animated-pages.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-animated-pages" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/README.md b/third_party/polymer/components-chromium/core-animated-pages/README.md new file mode 100644 index 0000000..3b8f2b19 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/README.md @@ -0,0 +1,4 @@ +core-animated-pages +=================== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-animated-pages) for more information. diff --git a/third_party/polymer/components-chromium/core-animated-pages/bower.json b/third_party/polymer/components-chromium/core-animated-pages/bower.json new file mode 100644 index 0000000..c950d15 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/bower.json @@ -0,0 +1,10 @@ +{ + "name": "core-animated-pages", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-style": "Polymer/core-style#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages-extracted.js b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages-extracted.js new file mode 100644 index 0000000..902436a --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages-extracted.js @@ -0,0 +1,188 @@ + + + Polymer('core-animated-pages',{ + + eventDelegates: { + 'core-transitionend': 'transitionEnd' + }, + + /** + * A space-delimited string of transitions to use when switching between pages in this element. + * The strings are `id`s of `core-transition-pages` elements included elsewhere. See the + * individual transition's document for specific details. + * + * @attribute transitions + * @type string + * @default '' + */ + transitions: '', + + selected: 0, + + /** + * The last page selected. This property is useful to dynamically set transitions based + * on incoming and outgoing pages. + * + * @attribute lastSelected + * @type Object + * @default null + */ + lastSelected: null, + + registerCallback: function() { + this.tmeta = document.createElement('core-transition'); + }, + + created: function() { + this._transitions = []; + this.transitioning = []; + }, + + transitionsChanged: function() { + this._transitions = this.transitions.split(' '); + }, + + _transitionsChanged: function(old) { + if (this._transitionElements) { + this._transitionElements.forEach(function(t) { + t.teardown(this); + }, this); + } + this._transitionElements = []; + this._transitions.forEach(function(transitionId) { + var t = this.getTransition(transitionId); + if (t) { + this._transitionElements.push(t); + t.setup(this); + } + }, this); + }, + + getTransition: function(transitionId) { + return this.tmeta.byId(transitionId); + }, + + selectionSelect: function(e, detail) { + this.updateSelectedItem(); + // Wait to call applySelection when we run the transition + }, + + applyTransition: function(src, dst) { + if (this.animating) { + this.cancelAsync(this.animating); + this.animating = null; + } + + Platform.flush(); + + if (this.transitioning.indexOf(src) === -1) { + this.transitioning.push(src); + } + if (this.transitioning.indexOf(dst) === -1) { + this.transitioning.push(dst); + } + // force src, dst to display + src.setAttribute('animate', ''); + dst.setAttribute('animate', ''); + // + var options = { + src: src, + dst: dst, + easing: 'cubic-bezier(0.4, 0, 0.2, 1)' + } + + // fire an event so clients have a chance to do something when the + // new page becomes visible but before it draws. + this.fire('core-animated-pages-transition-prepare'); + + // + // prepare transition + this._transitionElements.forEach(function(transition) { + transition.prepare(this, options); + }, this); + // + // force layout! + src.offsetTop; + + // + // apply selection + this.applySelection(dst, true); + this.applySelection(src, false); + // + // start transition + this._transitionElements.forEach(function(transition) { + transition.go(this, options); + }, this); + + if (!this._transitionElements.length) { + this.complete(); + } else { + this.animating = this.async(this.complete.bind(this), null, 5000); + } + }, + + complete: function() { + if (this.animating) { + this.cancelAsync(this.animating); + this.animating = null; + } + + this.transitioning.forEach(function(t) { + t.removeAttribute('animate'); + }); + this.transitioning = []; + + this._transitionElements.forEach(function(transition) { + transition.ensureComplete(this); + }, this); + + this.fire('core-animated-pages-transition-end'); + }, + + transitionEnd: function(e) { + if (this.transitioning.length) { + var completed = true; + this._transitionElements.forEach(function(transition) { + if (!transition.completed) { + completed = false; + } + }); + if (completed) { + this.job('transitionWatch', function() { + this.complete(); + }, 100); + } + } + }, + + selectedChanged: function(old) { + this.lastSelected = old; + this.super(arguments); + }, + + selectedItemChanged: function(oldItem) { + this.super(arguments); + + if (!oldItem) { + this.applySelection(this.selectedItem, true); + return; + } + + if (this.hasAttribute('no-transition') || !this._transitionElements || !this._transitionElements.length) { + this.applySelection(oldItem, false); + this.applySelection(this.selectedItem, true); + return; + } + + if (oldItem && this.selectedItem) { + // TODO(sorvell): allow bindings to update first? + var self = this; + Platform.flush(); + Platform.endOfMicrotask(function() { + self.applyTransition(oldItem, self.selectedItem); + }); + } + } + + }); + diff --git a/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.css b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.css new file mode 100644 index 0000000..9a41b54 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.css @@ -0,0 +1,18 @@ +:host { + display: block; + position: relative; +} + +polyfill-next-selector { content: ':host > *'; } +::content > * { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +polyfill-next-selector { content: ':host > *:not(.core-selected):not([animate])'; } +::content > *:not(.core-selected):not([animate]) { + display: none !important; +} diff --git a/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.html b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.html new file mode 100644 index 0000000..eb24793 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/core-animated-pages.html @@ -0,0 +1,240 @@ +<link href="../core-selector/core-selector.html" rel="import"> + +<link href="transitions/hero-transition.html" rel="import"> +<link href="transitions/cross-fade.html" rel="import"> + +<!-- + +`core-animated-pages` selects one of its children "pages" to show and runs a transition +when switching between them. The transitions are designed to be pluggable, and can +accept any object that is an instance of a `core-transition-pages`. Transitions to run +are specified in the `transitions` attribute as a space-delimited string of `id`s of +transition elements. Several transitions are available with `core-animated-pages` by +default, including `hero-transition`, `cross-fade`, and `tile-cascade`. + +Example: + + <style> + #hero1 { + position: absolute; + top: 0; + left: 0; + width: 300px; + height: 300px; + background-color: orange; + } + #hero2 { + position: absolute; + top: 200px; + left: 300px; + width: 300px; + height: 300px; + background-color: orange; + } + #bottom1, #bottom2 { + position: absolute; + bottom: 0; + top: 0; + left: 0; + height: 50px; + } + #bottom1 { + background-color: blue; + } + #bottom2 { + background-color: green; + } + </style> + // hero-transition and cross-fade are declared elsewhere + <core-animated-pages transitions="hero-transition cross-fade"> + <section id="page1"> + <div id="hero1" hero-id="hero" hero></div> + <div id="bottom1" cross-fade></div> + </section> + <section id="page2"> + <div id="hero2" hero-id="hero" hero></div> + <div id="bottom2" cross-fade></div> + </section> + </core-animated-pages> + +In the above example, two transitions (`hero-transition` and `cross-fade`) are run when switching +between `page1` and `page2`. `hero-transition` transforms elements with the same `hero-id` such +that they appear to be shared across different pages. `cross-fade` fades out the elements marked +`cross-fade` in the outgoing page, and fades in those in the incoming page. See the individual +transition's documentation for specific details. + +Finding elements to transition +------------------------------ + +In general, a transition is applied to elements marked with a certain attribute. For example, +`hero-transition` applies the transition on elements with the `hero` and `hero-id` attribute. +Among the transitions included with `core-animated-pages`, script-based transitions such as +`hero-transition` generally look for elements up to one level of shadowRoot from the +`core-animated-pages` element, and CSS-based transitions such as `cross-fade` look for elements +within any shadowRoot within the `core-animated-pages` element. This means you can use +custom elements as pages and mark elements in their shadowRoots as heroes, or mark +elements in deeper shadowRoots with other transitions. + +Example: + + <polymer-element name="x-el" noscript> + <template> + <style> + #hero { + position: absolute; + top: 0; + right: 0; + width: 50px; + height: 300px; + background-color: blue; + } + </style> + <div id="hero" hero-id="bar" hero></div> + </template> + </polymer-element> + + <polymer-element name="x-page-1" noscript> + <template> + <style> + #hero1 { + position: absolute; + top: 0; + left: 0; + width: 300px; + height: 300px; + background-color: orange; + } + </style> + <div id="hero1" hero-id="foo" hero></div> + <div id="hero2" hero-id="bar" hero></div> + </template> + </polymer-element> + + <polymer-element name="x-page-2" noscript> + <template> + <style> + #hero1 { + position: absolute; + top: 200px; + left: 300px; + width: 300px; + height: 300px; + background-color: orange; + } + #hero2 { + background-color: blue; + height: 150px; + width: 400px; + } + </style> + // The below element is one level of shadow from the core-animated-pages and will + // be transitioned. + <div id="hero1" hero-id="foo" hero></div> + // The below element contains a hero inside its shadowRoot making it two levels away + // from the core-animated-pages, and will not be transitioned. + <x-el></x-el> + </template> + </polymer-element> + + <core-animated-pages transitions="hero-transition"> + <x-page-1></x-page-1> + <x-page-2></x-page-2> + </core-animated-pages> + +Note that the container element of the page does not participate in the transition. + + // This does not work + <core-animated-pages transitions="cross-fade"> + <section cross-fade></section> + <section cross-fade></section> + </core-animated-pages> + + // This works + <core-animated-pages transitions="cross-fade"> + <section> + <div cross-fade></div> + </section> + <section> + <div cross-fade></div> + </section> + </core-animated-pages> + +Dynamically setting up transitions +---------------------------------- + +An easy way to dynamically set up transitions dynamically is to use property binding on +the transition attributes. + +Example: + + <core-animated-pages selected="{{selected}}"> + <section id="page1"> + <div hero-id="hero" hero></div> + </section> + <section id="page2"> + <div id="foo" hero-id="hero" hero?="{{selected === 1 || selected === 0}}" cross-fade="{{selected === 2}}"></div> + </section> + <section id="page3"> + </section> + </core-animated-pages> + +In the above example, the "foo" element only behaves as a hero element if transitioning between +`#page1` and `#page2`. It gets cross-faded when transition to or from `#page3`. + +Nesting pages +------------- + +It is possible to nest core-animated-pages elements for organization. Excessive nesting is +not encouraged, however, since it makes setting up the transition more complex. + +To nest core-animated-pages, the page containing the nested core-animated-pages element should +have a `selectedItem` property bound to the `selectedItem` property of the nested element. This +will allow the outer core-animated-pages to know which nested page it is actually transitioning +to. + +Example: + + <polymer-element name="nested-page" attributes="selectedItem"> + <template> + <core-animated-pages selectedItem="{{selectedItem}}"> + ... + </core-animated-pages> + </template> + </polymer-element> + + <core-animated-pages> + <section id="page1"></section> + <nested-page id="page2"></section> + </core-animated-pages> + +@element core-animated-pages +@extends core-selector +@status beta +@homepage github.io +--> +<!-- +Fired before a page transition occurs. Both pages involved in the transition are visible when +this event fires. This is useful if there is something the client needs to do when a page becomes +visible. + +@event core-animated-pages-transition-prepare +--> +<!-- +Fired when a page transition completes. + +@event core-animated-pages-transition-end +--> +<polymer-element name="core-animated-pages" extends="core-selector" notap="" attributes="transitions" assetpath=""> + +<template> + + <link href="core-animated-pages.css" rel="stylesheet"> + + <shadow></shadow> + +</template> + + + +</polymer-element> +<script src="core-animated-pages-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/demo.html b/third_party/polymer/components-chromium/core-animated-pages/demo.html new file mode 100644 index 0000000..3d949b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demo.html @@ -0,0 +1,14 @@ +<a href="demos/simple.html">pluggable transitions</a> +<br> +<a href="demos/news.html">icon to top bar</a> +<br> +<a href="demos/music.html">chip to card</a> +<br> +<a href="demos/list.html">list reorder</a> +<br> +<a href="demos/grid.html">grid to full screen</a> +<br> +<a href="demos/nested.html">nested core-animated-pages</a> +<br> +<a href="demos/quiz1.html">quiz: category to splash to question</a> +<br> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/grid.html b/third_party/polymer/components-chromium/core-animated-pages/demos/grid.html new file mode 100644 index 0000000..f7b0e96 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/grid.html @@ -0,0 +1,104 @@ +<!doctype html> +<html> +<head> + + <script src="../../platform/platform.js"></script> + + <link href="../../core-icons/core-icons.html" rel="import"> + <link href="../../core-icon-button/core-icon-button.html" rel="import"> + <link href="../../core-toolbar/core-toolbar.html" rel="import"> + <link href="../core-animated-pages.html" rel="import"> + + <style> + body { + font-family: sans-serif; + } + + .toolbar { + background-color: steelblue; + } + + #container { + overflow: auto; + } + + .card { + position: relative; + height: 150px; + width: 150px; + font-size: 50px; + margin: 8px; + background-color: tomato; + border-radius: 4px; + cursor: default; + } + + .view { + font-size: 250px; + background-color: tomato; + } + + </style> + +</head> +<body unresolved fullbleed vertical layout> + <template is="auto-binding"> + <core-toolbar class="toolbar"> + <core-icon-button icon="{{$.pages.selected != 0 ? 'arrow-back' : 'menu'}}" on-tap="{{back}}"></core-icon-button> + <div flex>Stuff</div> + <core-icon-button icon="more-vert"></core-icon-button> + </core-toolbar> + <core-animated-pages id="pages" flex selected="0" on-core-animated-pages-transition-end="{{transitionend}}" transitions="cross-fade-all hero-transition"> + + <section vertical layout> + + <div id="container" flex horizontal wrap around-justified layout hero-p> + <template repeat="{{item in items}}"> + <div class="card" vertical center center-justified layout hero-id="item-{{item}}" hero?="{{$.pages.selected === item + 1 || lastSelected === item + 1}}" on-tap="{{selectView}}"><span cross-fade>{{item}}</span></div> + </template> + </div> + + </section> + + <template repeat="{{item in items}}"> + <section vertical layout> + <div class="view" flex vertical center center-justified layout hero-id="item-{{item}}" hero?="{{$.pages.selected === item + 1 || $.pages.selected === 0}}"><span cross-fade>{{item}}</span></div> + </section> + </template> + + </core-animated-pages> + </template> + + <script> + + addEventListener('template-bound', function(e) { + var scope = e.target; + var items = [], count=50; + for (var i=0; i < count; i++) { + items.push(i); + } + + scope.items = items; + + scope.selectView = function(e) { + var i = e.target.templateInstance.model.item; + this.$.pages.selected = i+1; + } + + scope.back = function() { + this.lastSelected = this.$.pages.selected; + console.log(this.lastSelected); + this.$.pages.selected = 0; + } + + scope.transitionend = function() { + if (this.lastSelected) { + this.lastSelected = null; + } + } + }) + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/list.html b/third_party/polymer/components-chromium/core-animated-pages/demos/list.html new file mode 100644 index 0000000..90ed8a3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/list.html @@ -0,0 +1,117 @@ +<!doctype html> +<html> +<head> + + <script src="../../platform/platform.js"></script> + <link href="../core-animated-pages.html" rel="import"> + + <style> + body { + font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + } + + </style> + +</head> +<body unresolved> + + <polymer-element name="list-demo"> + <template> + + <style> + p { + margin: 8px; + } + + .item { + background: #e7e7e7; + padding: 16px; + margin: 8px; + border-radius: 3px; + box-sizing: border-box; + position: relative; + } + </style> + + <p>Tap to move to top</p> + + <core-animated-pages id="pages" on-tap="{{reorder}}" selected="{{selected}}" on-core-animated-pages-transition-end="{{done}}" transitions="hero-transition"> + + <section> + <template repeat="{{items}}"> + <div hero-id="{{h}}" hero class="item">{{v}}</div> + </template> + </section> + + <section> + <template repeat="{{items2}}"> + <div hero-id="{{h}}" hero class="item">{{v}}</div> + </template> + </section> + + </core-animated-pages> + + </template> + + <script> + + Polymer('list-demo', { + + selected: 0, + + items: [ + {h: 'matt', v: 'Matt McNulty'}, + {h: 'scott', v: 'Scott Miles'}, + {h: 'steve', v: 'Steve Orvell'}, + {h: 'frankie', v: 'Frankie Fu'}, + {h: 'daniel', v: 'Daniel Freedman'}, + {h: 'yvonne', v: 'Yvonne Yip'}, + ], + + items2: [ + {h: 'matt', v: 'Matt McNulty'}, + {h: 'scott', v: 'Scott Miles'}, + {h: 'steve', v: 'Steve Orvell'}, + {h: 'frankie', v: 'Frankie Fu'}, + {h: 'daniel', v: 'Daniel Freedman'}, + {h: 'yvonne', v: 'Yvonne Yip'}, + ], + + reorder: function(e) { + if (this.$.pages.transitioning.length) { + return; + } + + this.lastMoved = e.target; + this.lastMoved.style.zIndex = 10005; + var item = e.target.templateInstance.model; + var items = this.selected ? this.items : this.items2; + var i = this.selected ? this.items2.indexOf(item) : this.items.indexOf(item); + if (i != 0) { + items.splice(0, 0, item); + items.splice(i + 1, 1); + } + + this.lastIndex = i; + this.selected = this.selected ? 0 : 1; + }, + + done: function() { + var i = this.lastIndex; + var items = this.selected ? this.items : this.items2; + var item = items[i]; + items.splice(0, 0, item); + items.splice(i + 1, 1); + this.lastMoved.style.zIndex = null; + } + }); + + </script> + + </polymer-element> + + <list-demo></list-demo> + +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/music.html b/third_party/polymer/components-chromium/core-animated-pages/demos/music.html new file mode 100644 index 0000000..8cb66e0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/music.html @@ -0,0 +1,173 @@ +<!doctype html> +<html> +<head> + <title>core-animated-pages</title> + + <script src="../../platform/platform.js"></script> + <link href="../core-animated-pages.html" rel="import"> + + <style> + body { + font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + background: #f1f1f1; + } + + .green { + position: absolute; + top: 0; + right: 0; + left: 0; + height: 350px; + background: #70c26f; + } + </style> +</head> +<body> + + <polymer-element name="music-demo"> + <template> + + <style> + .chip-container { + position: absolute; + top: 275px; + right: 0; + left: 0; + text-align: center; + } + + .chip { + display: inline-block; + position: relative; + border-radius: 3px; + margin: 4px; + overflow: hidden; + text-align: start; + background-color: #fff; + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); + } + + .chip-top { + width: 200px; + height: 200px; + } + + .chip-bottom { + padding: 8px; + line-height: 1.5; + } + + .chip-album-title { + font-weight: bold; + } + + #details { + padding: 200px 10% 0; + } + + .card { + height: 400px; + border-radius: 3px; + text-align: start; + overflow: hidden; + background: #fff; + box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); + } + + .card-left { + width: 400px; + } + + .card-right { + padding: 24px; + } + + .card-icon { + border-radius: 50%; + width: 60px; + height: 60px; + margin-right: 16px; + } + + .card-album-title { + font-size: 2em; + } + </style> + + <core-animated-pages selected="{{page}}" transitions="hero-transition" on-core-animated-pages-transition-end="{{complete}}"> + + <section> + + <div class="chip-container" hero-p on-tap="{{transition}}"> + + <template repeat="{{items as item}}"> + + <div class="chip" hero-id="{{item.artist}}-{{item.album}}" hero?="{{selectedAlbum === item }}"> + <div class="chip-top" style="background:{{item.color}};" hero-id="{{item.artist}}-{{item.album}}-art" hero?="{{selectedAlbum === item}}"></div> + <div class="chip-bottom"> + <div class="chip-album-title">{{item.album}}</div> + <div class="chip-artist">{{item.artist}}</div> + </div> + </div> + + </template> + + </div> + </section> + + <section id="details"> + + <div class="card" layout horizontal hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}" hero on-tap="{{transition}}"> + <div class="card-left" style="background:{{selectedAlbum.color}};" hero-id="{{selectedAlbum.artist}}-{{selectedAlbum.album}}-art" hero></div> + <div class="card-right" flex> + <div layout horizontal center> + <div> + <div class="card-icon" style="background:{{selectedAlbum.color}};"></div> + </div> + <div flex> + <div class="card-album-title">{{selectedAlbum.album}}</div> + <div class="card-album-artist">{{selectedAlbum.artist}}</div> + </div> + </div> + </div> + </div> + + </section> + + </core-animated-pages> + + </template> + <script> + + Polymer('music-demo', { + + page: 0, + + items: [ + { artist: 'Tycho', album: 'Fragments', color: '#f4db33' }, + { artist: 'Tycho', album: 'Past Prologue', color: '#972ff8' }, + { artist: 'Tycho', album: 'Spectre', color: '#7dd6fe' }, + { artist: 'Tycho', album: 'Awake', color: '#dc3c84' } + ], + + selectedAlbum: null, + + transition: function(e) { + if (this.page === 0 && e.target.templateInstance.model.item) { + this.selectedAlbum = e.target.templateInstance.model.item; + this.page = 1; + } else { + this.page = 0; + } + } + }); + + </script> + </polymer-element> + + <div class="green"></div> + + <music-demo></music-demo> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/nested-animated-pages.html b/third_party/polymer/components-chromium/core-animated-pages/demos/nested-animated-pages.html new file mode 100644 index 0000000..afe3c3f --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/nested-animated-pages.html @@ -0,0 +1,104 @@ +<link href="../../core-icons/core-icons.html" rel="import"> +<link href="../../core-icon-button/core-icon-button.html" rel="import"> +<link href="../core-animated-pages.html" rel="import"> + +<polymer-element name="nested-animated-pages"> +<template> + <style> + :host { + display: block; + position: relative; + } + + core-animated-pages { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + } + + .tall-toolbar { + box-sizing: border-box; + height: 240px; + } + + .tall-toolbar.colored { + fill: #fff; + color: #fff; + } + + .tall-toolbar [flex] { + font-size: 1.5em; + } + + core-icon-button { + margin: 16px; + } + + .body { + background-color: #f1f1f1; + } + + .square { + position: absolute; + width: 150px; + height: 150px; + left: 16px; + top: 175px; + } + + </style> + <core-animated-pages id="pages" selected="{{page}}" selectedItem="{{selectedItem}}" transitions="hero-transition" no-transition?="{{noTransition}}"> + + <section id="page1" cross-fade> + <div class="tall-toolbar colored" style="background-color:orange;" layout vertical hero-id="thing" hero?="{{page === 0 || !noTransition}}"> + <div layout horizontal center> + <core-icon-button icon="clear" on-tap="{{back}}"></core-icon-button> + <div flex>One</div> + <core-icon-button icon="arrow-forward" on-tap="{{transition}}"></core-icon-button> + </div> + <div flex></div> + </div> + <div flex class="body"></div> + </section> + + <section layout vertical id="page2" cross-fade> + <div class="tall-toolbar" layout vertical> + <div layout horizontal center> + <core-icon-button icon="clear" on-tap="{{back}}"></core-icon-button> + <div flex>Two</div> + <core-icon-button icon="arrow-forward" on-tap="{{transition}}"></core-icon-button> + </div> + <div flex></div> + </div> + <div flex class="body"></div> + <div class="square" style="background-color:orange;" hero-id="thing" hero?="{{page === 1 || !noTransition}}"></div> + </section> + + </core-animated-pages> +</template> +<script> + + Polymer({ + + publish: { + page: {value: 0} + }, + + selectedItem: null, + noTransition: true, + + back: function() { + this.noTransition = true; + this.fire('nested-back'); + }, + + transition: function() { + this.noTransition = false; + this.page = this.page === 0 ? 1 : 0; + } + + }); +</script> +</polymer-element> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/nested.html b/third_party/polymer/components-chromium/core-animated-pages/demos/nested.html new file mode 100644 index 0000000..6d08bd2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/nested.html @@ -0,0 +1,103 @@ +<!doctype html> +<html> +<head> + <title>core-animated-pages</title> + <script src="../../platform/platform.js"></script> + <link href="nested-animated-pages.html" rel="import"> + + <style> + body { + font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + background: #f1f1f1; + } + + nested-demo { + display: block; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } + </style> +</head> +<body> + + <polymer-element name="nested-demo"> + <template> + + <style> + + core-animated-pages { + display: block; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } + + section { + text-align: center; + padding-top: 250px; + } + + .square { + display: inline-block; + margin: 8px; + padding: 8px; + width: 200px; + height: 200px; + background-color: orange; + color: #fff; + } + </style> + + <core-animated-pages selected="{{page}}" transitions="hero-transition cross-fade"> + + <section on-tap="{{transition}}" layout horizontal center-justified> + + <div class="square" id="thing1" hero-id="thing" hero?="{{subpage === 0}}" cross-fade?="{{subpage !== 0}}">thing 1</div> + <div class="square" id="thing2" hero-id="thing" hero?="{{subpage === 1}}" cross-fade?="{{subpage !== 1}}">thing 2</div> + + </section> + + <nested-animated-pages page="{{subpage}}" on-nested-back="{{back}}"></nested-animated-pages> + + </core-animated-pages> + </template> + <script> + + Polymer('nested-demo', { + + page: 0, + subpage: 0, + + transition: function(e) { + + var el = e.target; + if (el.id === "thing1") { + this.subpage = 0; + } else { + this.subpage = 1; + } + + setTimeout(function() { + this.page = 1; + }.bind(this), 200); + }, + + back: function() { + this.page = 0; + } + + }); + + </script> + </polymer-element> + + <nested-demo></nested-demo> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/news.html b/third_party/polymer/components-chromium/core-animated-pages/demos/news.html new file mode 100644 index 0000000..1ba5086 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/news.html @@ -0,0 +1,246 @@ +<!doctype html> +<html> +<head> + + <script src="../../platform/platform.js"></script> + + <link href="../../core-icons/core-icons.html" rel="import"> + <link href="../../core-icons/social-icons.html" rel="import"> + <link href="../../core-toolbar/core-toolbar.html" rel="import"> + + <link href="../../paper-shadow/paper-shadow.html" rel="import"> + + <link href="../core-animated-pages.html" rel="import"> + + <style shim-shadowdom> + body { + font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + } + + .fit { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + width: 420px; + } + + .toolbar { + background: #8d3efc; + /* FIXME */ + color: #fff !important; + fill: #fff; + } + + .toolbar-2 { + position: absolute; + top: 0; + left: 0; + background: #000; + color: #fff; + text-align: center; + font-size: 48px; + } + + body /deep/ .toolbar-2 { + position: absolute; + top: 0; + left: 0; + margin: 0; + width: 420px; + background: #000; + color: #fff; + text-align: center; + font-size: 48px; + } + + .container { + background-color: #e7e7e7; + padding: 16px; + } + + .card { + position: relative; + background-color: #fff; + border-radius: 2px; + } + + .card-top { + background: #f2da2f; + height: 240px; + } + + .card-top-2 { + background: #99f8b7; + height: 240px; + } + + .card-bottom { + padding: 24px; + } + + .headline { + font-size: 24px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .icon { + position: relative; + background: #000; + color: #fff; + width: 40px; + height: 40px; + border-radius: 50%; + } + + .icon::after { + content: 'T'; + font-size: 24px; + position: absolute; + top: 7px; + left: 13px; + } + + .source-container { + margin-top: 16px; + } + + .two-lines { + margin-left: 16px; + } + + .source { + font-size: 14px; + } + + .time { + color: rgba(0, 0, 0, 0.54); + font-size: 12px; + } + + .tiles-container { + margin-top: 16px; + } + + .tile { + position: relative; + display: inline-block; + width: 85px; + height: 85px; + background: #fff; + border-radius: 2px; + } + + </style> + +</head> +<body unresolved> + + <polymer-element name="shadow-div" noscript> + <template> + <style> + :host { + display: block; + } + </style> + <paper-shadow target="{{}}" z="1"></paper-shadow> + <content></content> + </template> + </polymer-element> + + <core-animated-pages class="fit" selected="0" transitions="cross-fade-all hero-transition"> + + <section id="first"> + + <core-toolbar class="tall toolbar"> + <core-icon icon="menu"></core-icon> + <div flex>Highlights</div> + <core-icon icon="social:share"></core-icon> + <core-icon icon="bookmark"></core-icon> + <core-icon icon="more-vert"></core-icon> + </core-toolbar> + + <div class="container" hero-p> + + <shadow-div class="card" hero-p onclick="stuff()"> + <div class="card-top"></div> + <div class="card-bottom" hero-p> + <div class="headline">Google's Craziest Offices</div> + <div class="source-container" hero-p layout horizontal center> + <div class="icon" hero-id="icon-header" hero></div> + <div class="two-lines"> + <div class="source">The New York Times</div> + <div class="time">36 minutes ago</div> + </div> + </div> + </div> + </shadow-div> + + <div class="tiles-container" layout horizontal justified> + + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + + </div> + + </div> + + </section> + + <section id="second"> + + <core-toolbar class="tall" hero-p> + + <core-toolbar class="tall toolbar-2" hero-id="icon-header" hero> + <div flex class="middle">T</div> + </core-toolbar> + </core-toolbar> + + <div class="container"> + + <shadow-div class="card" onclick="stuff()"> + <div class="card-top-2"></div> + <div class="card-bottom"> + <div class="headline">Some long overflowing headline</div> + <div class="source-container" layout horizontal center> + <div class="icon" style="background:red;"></div> + <div class="two-lines"> + <div class="source">The New York Times</div> + <div class="time">36 minutes ago</div> + </div> + </div> + </div> + </shadow-div> + + <div class="tiles-container" layout horizontal justified> + + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + <shadow-div class="tile"></shadow-div> + + </div> + + </div> + + </section> + + </core-animated-pages> + + <script> + + function stuff(e) { + var p = document.querySelector('core-animated-pages'); + p.selected = p.selected ? 0 : 1; + } + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1-intro.png b/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1-intro.png Binary files differnew file mode 100644 index 0000000..8c172a0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1-intro.png diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1.html b/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1.html new file mode 100644 index 0000000..358c7a2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/quiz1.html @@ -0,0 +1,254 @@ +<!doctype html> +<html> +<head> + <title>core-animated-pages</title> + + <script src="../../platform/platform.js"></script> + <link href="../../core-icons/av-icons.html" rel="import"> + <link href="../../paper-fab/paper-fab.html" rel="import"> + + <link href="../core-animated-pages.html" rel="import"> + <link href="../transitions/slide-up.html" rel="import"> + <link href="../transitions/list-cascade.html" rel="import"> + + <style> + body { + font-family: 'Roboto 2', 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + background: #f1f1f1; + } + + quiz-demo { + display: block; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } + </style> +</head> +<body> + + <polymer-element name="quiz-demo"> + <template> + + <style> + core-animated-pages { + height: 100%; + } + + section { + overflow: hidden; + } + + .fab { + position: absolute; + fill: #fff; + } + + .fab-0 { + bottom: 50px; + right: 24px; + } + + .fab-1 { + top: 210px; + right: 24px; + } + + paper-fab { + background-color: #ff4081; + } + + .top { + background-color: #ffff8d; + } + + .top-image { + background: url(quiz1-intro.png); + height: 287px; + width: 202px; + } + + .bottom { + box-sizing: border-box; + position: relative; + height: 80px; + background-color: #ffeb3b; + padding: 24px; + color: #fff; + font-size: 32px; + } + + .tall-toolbar { + box-sizing: border-box; + height: 240px; + position: relative; + color: #fff; + padding: 48px; + font-size: 48px; + } + + .tall-toolbar.categories { + background-color: #00bbd3; + margin-bottom: 2px; + } + + .tall-toolbar.questions { + background-color: #ffeb3b; + } + + .middle { + background-color: #fafafa; + color: #3f3f3f; + padding: 24px 48px; + font-size: 24px; + line-height: 1.5; + } + + .footer { + height: 80px; + } + + .avatar { + height: 80px; + width: 80px; + background-color: #ff80ab; + } + + .footer-right, .score { + border-top: 1px solid #ccc; + background-color: #fff; + padding: 30px; + } + + .tile { + box-sizing: border-box; + float: left; + height: 200px; + width: 49%; + margin: 3px; + } + + .tile-bottom { + padding: 8px; + color: #fff; + } + </style> + + <core-animated-pages selected="{{page}}" transitions="hero-transition slide-up slide-down cross-fade list-cascade" on-core-animated-pages-transition-end="{{complete}}"> + + <section layout vertical> + + <div class="tall-toolbar categories" slide-down> + <span>Your name here</span> + </div> + + <div class="tiles-container"> + <div class="tile" style="background-color:#ccc;" layout vertical> + <div class="tile-top" flex></div> + <div class="tile-bottom" style="background-color:#aaa;"> + Leaderboard + </div> + </div> + <div class="tile" hero-id="category-image" hero style="background-color:#ffff8d;" layout vertical on-tap="{{transition}}"> + <div class="tile-top" flex></div> + <div class="tile-bottom" hero-id="footer" hero style="background-color:#ffeb3b;"> + General Knowledge + </div> + </div> + <div class="tile" style="background-color:#b9f6ca;" layout vertical> + <div class="tile-top" flex></div> + <div class="tile-bottom" style="background-color:#0f9d58;"> + Category 2 + </div> + </div> + <div class="tile" style="background-color:#ff8a80;" layout vertical> + <div class="tile-top" flex></div> + <div class="tile-bottom" style="background-color:#db4437;"> + Category 3 + </div> + </div> + <div class="tile" style="background-color:#82b1ff;" layout vertical> + <div class="tile-top" flex></div> + <div class="tile-bottom" style="background-color:#4285f4;"> + Category 4 + </div> + </div> + <div class="tile" style="background-color:#b388ff;" layout vertical> + <div class="tile-top" flex></div> + <div class="tile-bottom" style="background-color:#7e57c2;"> + Category 5 + </div> + </div> + </div> + + </section> + + <section layout vertical> + + <div class="top" hero-id="category-image" hero flex layout horizontal center center-justified> + <div class="top-image" cross-fade></div> + </div> + <div class="bottom" hero-id="footer" hero cross-fade> + <span cross-fade>General Knowledge</span> + </div> + <div class="fab fab-0" hero-id="fab" hero> + <paper-fab icon="av:play-arrow" on-tap="{{transition}}" hero></paper-fab> + </div> + </section> + + <section layout vertical> + + <div class="tall-toolbar questions" hero-id="footer" hero> + <span cross-fade>Question here</span> + </div> + <div class="fab fab-1" hero-id="fab" hero> + <paper-fab icon="av:play-arrow" on-tap="{{transition}}" hero></paper-fab> + </div> + + <div flex class="middle" slide-up list-cascade> + <p>Option 1</p> + <p>Option 2</p> + <p>Option 3</p> + <p>Option 4</p> + <p>Option 5</p> + </div> + + <div class="footer" layout horizontal slide-up> + <div class="avatar"></div> + <div class="footer-right" flex> + some text here + </div> + <div class="score"> + 32 pts + </div> + </div> + + </section> + + </core-animated-pages> + + </template> + <script> + + Polymer('quiz-demo', { + + page: 0, + + transition: function(e) { + if (this.page === 2) { + this.page = 0; + } else { + this.page += 1; + } + } + }); + + </script> + </polymer-element> + + <quiz-demo></quiz-demo> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/shadow.html b/third_party/polymer/components-chromium/core-animated-pages/demos/shadow.html new file mode 100644 index 0000000..549c004 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/shadow.html @@ -0,0 +1,133 @@ +<!doctype html> +<html> +<head> + + <script src="../../platform/platform.js"></script> + + <link href="../../core-icons/core-icons.html" rel="import"> + <link href="../../core-icon-button/core-icon-button.html" rel="import"> + <link href="../../core-toolbar/core-toolbar.html" rel="import"> + <link href="../core-animated-pages.html" rel="import"> + + <style> + body { + font-family: sans-serif; + } + + .toolbar { + background-color: steelblue; + } + + </style> + +</head> +<body unresolved fullbleed vertical layout> + + <polymer-element name="grid-toc" attributes="items selected"> + <template> + <style> + #container { + overflow: auto; + } + + .card { + position: relative; + height: 150px; + width: 150px; + font-size: 50px; + margin: 8px; + background-color: tomato; + border-radius: 4px; + cursor: default; + } + </style> + <div id="container" on-tap="{{selectView}}" flex horizontal wrap around-justified layout hero-p> + <template repeat="{{item in items}}"> + <div class="card" vertical center center-justified layout hero-id="item-{{item}}" hero?="{{selected === item + 1 || lastSelected === item + 1}}"><span cross-fade>{{item}}</span></div> + </template> + </div> + </template> + <script> + Polymer('grid-toc', { + selectedChanged: function(old) { + this.lastSelected = old; + }, + selectView: function(e) { + var item = e.target.templateInstance.model.item; + if (item !== undefined) { + this.fire('grid-toc-select', {item: item}); + } + } + }); + </script> + </polymer-element> + + <polymer-element name="grid-item" attributes="item isHero"> + <template> + <style> + .view { + font-size: 250px; + background-color: tomato; + } + </style> + <div class="view" flex vertical center center-justified layout hero-id="item-{{item}}" hero?="{{isHero}}"> + <span cross-fade>{{item}}</span> + </div> + </template> + <script> + Polymer('grid-item', { + isSelected: false + }) + </script> + </polymer-element> + + + <template is="auto-binding"> + <core-toolbar class="toolbar"> + <core-icon-button icon="{{$.pages.selected != 0 ? 'arrow-back' : 'menu'}}" on-tap="{{back}}"></core-icon-button> + <div flex>Stuff</div> + <core-icon-button icon="more-vert"></core-icon-button> + </core-toolbar> + <core-animated-pages id="pages" flex selected="0" on-core-animated-pages-transition-end="{{transitionend}}" transitions="cross-fade-all hero-transition"> + + <grid-toc vertical id="toc" layout selected="{{$.pages.selected}}" items="{{items}}" hero-p on-grid-toc-select="{{selectView}}"></grid-toc> + + <template repeat="{{item in items}}"> + <grid-item vertical layout item="{{item}}" hero-p isHero="{{$.pages.selected === item + 1 || $.pages.selected === 0}}"></grid-item> + </template> + + </core-animated-pages> + </template> + + <script> + + addEventListener('template-bound', function(e) { + var scope = e.target; + var items = [], count=50; + for (var i=0; i < count; i++) { + items.push(i); + } + + scope.items = items; + + scope.selectView = function(e, detail) { + var i = detail.item; + this.$.pages.selected = i+1; + } + + scope.back = function() { + this.lastSelected = this.$.pages.selected; + this.$.pages.selected = 0; + } + + scope.transitionend = function() { + if (this.lastSelected) { + this.lastSelected = null; + } + } + }) + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/demos/simple.html b/third_party/polymer/components-chromium/core-animated-pages/demos/simple.html new file mode 100644 index 0000000..a28846e --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/demos/simple.html @@ -0,0 +1,89 @@ +<!doctype html> +<html> +<head> + + <script src="../../platform/platform.js"></script> + <link href="../core-animated-pages.html" rel="import"> + <link href="../transitions/cross-fade.html" rel="import"> + <link href="../transitions/slide-from-right.html" rel="import"> + + <style> + body { + font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin: 0; + } + + core-animated-pages { + position: absolute; + top: 50px; + right: 0; + bottom: 0; + left: 0; + font-size: 72px; + overflow: hidden; + } + + section > div { + height: 100%; + color: white; + } + + </style> + +</head> +<body unresolved> + <select onchange="change();"> + <option value="cross-fade-all" selected>cross-fade-all</option> + <option value="slide-from-right">slide-from-right</option> + </select> + + <core-animated-pages onclick="stuff();" transitions="cross-fade-all"> + <section> + <div layout vertical center center-justified style="background:red;"> + <div>1</div> + </div> + </section> + <section> + <div layout vertical center center-justified style="background:blue;"> + <div>2</div> + </div> + </section> + <section> + <div layout vertical center center-justified style="background:purple;"> + <div>3</div> + </div> + </section> + <section> + <div layout vertical center center-justified style="background:orange;"> + <div>4</div> + </div> + </section> + <section> + <div layout vertical center center-justified style="background:green;"> + <div>5</div> + </div> + </section> + </core-animated-pages> + + <script> + function change() { + var s = document.querySelector('select'); + document.querySelector('core-animated-pages').transitions = document.querySelector('select').options[s.selectedIndex].value; + } + + var up = true; + var max = 4; + function stuff() { + var p = document.querySelector('core-animated-pages'); + if (up && p.selected === max || !up && p.selected === 0) { + up = !up; + } + if (up) { + p.selected += 1; + } else { + p.selected -= 1; + } + } + </script> +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/index.html b/third_party/polymer/components-chromium/core-animated-pages/index.html new file mode 100644 index 0000000..af0fe860 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["core-animated-pages.html","transitions/core-transition-pages","transitions/hero-transition.html","transitions/cross-fade.html","transitions/cascade-transition.html","transitions/slide-up.html","transitions/slide-down.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animated-pages/metadata.html b/third_party/polymer/components-chromium/core-animated-pages/metadata.html new file mode 100644 index 0000000..5756eee --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/metadata.html @@ -0,0 +1,29 @@ +<x-meta id="core-animated-pages" label="Animated Pages" group="Core" isContainer> + <!-- + TODO(sorvell): + - can't transition without contents; must document or fix. + - transitions syntax awkward: should be space separated + - hero-transition should be renamed `hero` + - hero and cross-fade-all should be always enabled. + --> + <template> + <core-animated-pages style="width:420px;height:582px;overflow:hidden;background-color:#eee;"> + <section layout horizontal center center-justified> + </section> + <section> + </section> + <section> + </section> + </core-animated-pages> + </template> + + <template id="imports"> + <link rel="import" href="core-animated-pages.html"> + <link rel="import" href="transitions/hero-transition.html"> + <link rel="import" href="transitions/cross-fade.html"> + <link rel="import" href="transitions/slide-down.html"> + <link rel="import" href="transitions/slide-up.html"> + <link rel="import" href="transitions/tile-cascade.html"> + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html new file mode 100644 index 0000000..ed3e25b --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/cascade-transition.html @@ -0,0 +1,138 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="cascade-transition"> + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div'; } + :host(.cascade) ::content > * /deep/ [cascade] > div { + -webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(2)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(2) { + -webkit-transition-delay: 0.05s; + transition-delay: 0.05s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(3)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(3) { + -webkit-transition-delay: 0.1s; + transition-delay: 0.1s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(4)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(4) { + -webkit-transition-delay: 0.15s; + transition-delay: 0.15s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(5)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(5) { + -webkit-transition-delay: 0.2s; + transition-delay: 0.2s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(6)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(6) { + -webkit-transition-delay: 0.25s; + transition-delay: 0.25s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(7)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(7) { + -webkit-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(8)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(8) { + -webkit-transition-delay: 0.35s; + transition-delay: 0.35s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(9)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(9) { + -webkit-transition-delay: 0.4s; + transition-delay: 0.4s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(10)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(10) { + -webkit-transition-delay: 0.45s; + transition-delay: 0.45s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(11)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(11) { + -webkit-transition-delay: 0.5s; + transition-delay: 0.5s; + } + + polyfill-next-selector { content: ':host(.cascade) > * [cascade] > div:nth-of-type(12)'; } + :host(.cascade) ::content > * /deep/ [cascade] > div:nth-of-type(12) { + -webkit-transition-delay: 0.55s; + transition-delay: 0.55s; + } + + polyfill-next-selector { content: '.core-selected [cascade] > div'; } + ::content > .core-selected /deep/ [cascade] > div { + } + + polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade] > div'; } + ::content > [animate]:not(.core-selected) /deep/ [cascade] > div { + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + + polyfill-next-selector { content: '[animate]:not(.core-selected) [cascade][fade] > div'; } + ::content > [animate]:not(.core-selected) /deep/ [cascade][fade] > div { + opacity: 0; + } +</core-style> + +<!-- + +`cascade-transition` slides the children of a container up in sequence, creating a +reverse waterfall effect. It works well with both grids and lists. Configure the +duration of the transition with the global variable `CoreStyle.g.transitions.cascadeDuration`. + +Example: + + <core-animated-pages transition="cascade-transition"> + <section> + <div id="container" cascade> + <div>item 1</div> + <div>item 2</div> + <div>item 3</div> + <div>item 4</div> + <div>item 5</div> + <div>item 6</div> + <div>item 7</div> + </div> + </section> + <section></section> + </core-animated-pages> + +In the above example, the immediate children of `#container` will slide up in +sequence when the page transitions from 0 to 1. + +The items can optionally fade in as they slide. Add the `fade` attribute to +the container to do that and configure the duration of the opacity transition with +the global variable `CoreStyle.g.transitions.cascadeFadeDuration`. + +@class cascade-transition +@extends core-transition-pages +@status beta +@homepage github.io + +--> + +<core-transition-pages id="cascade-transition" activeClass="cascade" transitionProperty="transform"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages-extracted.js b/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages-extracted.js new file mode 100644 index 0000000..554f71b --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages-extracted.js @@ -0,0 +1,123 @@ + + +(function () { + +// create some basic transition styling data. +var transitions = CoreStyle.g.transitions = CoreStyle.g.transitions || {}; +transitions.duration = '500ms'; +transitions.heroDelay = '50ms'; +transitions.scaleDelay = '500ms'; +transitions.cascadeFadeDuration = '250ms'; + +Polymer('core-transition-pages',{ + + publish: { + /** + * This class will be applied to the scope element in the `prepare` function. + * It is removed in the `complete` function. Used to activate a set of CSS + * rules that need to apply before the transition runs, e.g. a default opacity + * or transform for the non-active pages. + * + * @attribute scopeClass + * @type string + * @default '' + */ + scopeClass: '', + + /** + * This class will be applied to the scope element in the `go` function. It is + * remoived in the `complete' function. Generally used to apply a CSS transition + * rule only during the transition. + * + * @attribute activeClass + * @type string + * @default '' + */ + activeClass: '', + + /** + * Specifies which CSS property to look for when it receives a `transitionEnd` event + * to determine whether the transition is complete. If not specified, the first + * transitionEnd event received will complete the transition. + * + * @attribute transitionProperty + * @type string + * @default '' + */ + transitionProperty: '' + }, + + /** + * True if this transition is complete. + * + * @attribute completed + * @type boolean + * @default false + */ + completed: false, + + prepare: function(scope, options) { + this.boundCompleteFn = this.complete.bind(this, scope); + if (this.scopeClass) { + scope.classList.add(this.scopeClass); + } + }, + + go: function(scope, options) { + this.completed = false; + if (this.activeClass) { + scope.classList.add(this.activeClass); + } + scope.addEventListener('transitionend', this.boundCompleteFn, false); + }, + + setup: function(scope) { + if (!scope._pageTransitionStyles) { + scope._pageTransitionStyles = {}; + } + + var name = this.calcStyleName(); + + if (!scope._pageTransitionStyles[name]) { + this.installStyleInScope(scope, name); + scope._pageTransitionStyles[name] = true; + } + }, + + calcStyleName: function() { + return this.id || this.localName; + }, + + installStyleInScope: function(scope, id) { + if (!scope.shadowRoot) { + scope.createShadowRoot().innerHTML = '<content></content>'; + } + var root = scope.shadowRoot; + var scopeStyle = document.createElement('core-style'); + root.insertBefore(scopeStyle, root.firstChild); + scopeStyle.applyRef(id); + }, + + complete: function(scope, e) { + // TODO(yvonne): hack, need to manage completion better + if (e.propertyName !== 'box-shadow' && (!this.transitionProperty || e.propertyName.indexOf(this.transitionProperty) !== -1)) { + this.completed = true; + this.fire('core-transitionend', this, scope); + } + }, + + // TODO(sorvell): ideally we do this in complete. + ensureComplete: function(scope) { + scope.removeEventListener('transitionend', this.boundCompleteFn, false); + if (this.scopeClass) { + scope.classList.remove(this.scopeClass); + } + if (this.activeClass) { + scope.classList.remove(this.activeClass); + } + } + +}); + +})(); + diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages.html new file mode 100644 index 0000000..1b4f7f1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/core-transition-pages.html @@ -0,0 +1,53 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="../../polymer/polymer.html" rel="import"> +<link href="../../core-style/core-style.html" rel="import"> +<link href="../../core-transition/core-transition.html" rel="import"> + +<!-- + +`core-transition-pages` represents a page transition, which may include CSS and/or +script. It will look for a `core-style` element with the same `id` to install in the +scope of the `core-animated-pages` that's using the transition. + +Example: + + <core-style id="fooTransition"> + // some CSS here + </core-style> + <core-transition-pages id="fooTransition"></core-transition-pages> + +There are three stages to a page transition: + +1. `prepare`: Called to set up the incoming and outgoing pages to the "before" state, + e.g. setting the incoming page to `opacity: 0` for `cross-fade` or find and + measure hero elements for `hero-transition`. + +2. `go`: Called to run the transition. For CSS-based transitions, this generally + applies a CSS `transition` property. + +3. `complete`: Called when the elements are finished transitioning. + +See the individual transition documentation for specific details. + +@element core-transition-pages +@extends core-transition +@status beta +@homepage github.io +--> +<!-- +Fired when the transition completes. + +@event core-transitionend +--> +<polymer-element name="core-transition-pages" extends="core-transition" assetpath=""> + +</polymer-element> +<script src="core-transition-pages-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/cross-fade.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/cross-fade.html new file mode 100644 index 0000000..4bfdf02 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/cross-fade.html @@ -0,0 +1,173 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="cross-fade"> + polyfill-next-selector { content: ':host > * [cross-fade]'; } + ::content > * /deep/ [cross-fade] { + -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > * [cross-fade][bg]'; } + ::content > * /deep/ [cross-fade][bg] { + -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > * [cross-fade][hero-p]'; } + ::content > * /deep/ [cross-fade][hero-p] { + -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > .core-selected [cross-fade]'; } + ::content > .core-selected /deep/ [cross-fade] { + opacity: 1; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade]:not([hero-p]):not([bg])'; } + ::content > [animate]:not(.core-selected) /deep/ [cross-fade]:not([hero-p]):not([bg]) { + opacity: 0; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade][bg]'; } + ::content > [animate]:not(.core-selected) /deep/ [cross-fade][bg] { + background-color: rgba(0, 0, 0, 0); + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade][hero-p]'; } + ::content > [animate]:not(.core-selected) /deep/ [cross-fade][hero-p] { + background-color: rgba(0, 0, 0, 0); + } +</core-style> + +<core-style id="cross-fade-delayed"> + polyfill-next-selector { content: ':host > * [cross-fade-delayed]'; } + ::content > * /deep/ [cross-fade-delayed] { + -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + } + + polyfill-next-selector { content: ':host > .core-selected [cross-fade-delayed]'; } + ::content > .core-selected /deep/ [cross-fade-delayed] { + -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out {{g.transitions.xfadeDelay || g.transitions.xfadeDuration || g.transitions.duration}}; + transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out {{g.transitions.xfadeDelay || g.transitions.xfadeDuration || g.transitions.duration}}; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [cross-fade-delayed]'; } + ::content > [animate]:not(.core-selected) /deep/ [cross-fade-delayed] { + opacity: 0; + } + + polyfill-next-selector { content: ':host > .core-selected [cross-fade-delayed]'; } + ::content > .core-selected /deep/ [cross-fade-delayed] { + opacity: 1; + } + +</core-style> + +<core-style id="cross-fade-all"> + /* cross-fade-all: cross fade everything except for heroes and their parents */ + polyfill-next-selector { content: ':host(.cross-fade-all) > * *:not([hero]):not([hero-p]):not([cross-fade])'; } + :host(.cross-fade-all) ::content > * /deep/ *:not([hero]):not([hero-p]):not([cross-fade]) { + -webkit-transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + transition: opacity {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + } + + polyfill-next-selector { content: ':host(.cross-fade-all) > [animate]:not(.core-selected) *:not([hero]):not([hero-p]):not([cross-fade])'; } + :host(.cross-fade-all) ::content > [animate]:not(.core-selected) /deep/ *:not([hero]):not([hero-p]):not([cross-fade]) { + opacity: 0; + } + + polyfill-next-selector { content: ':host(.cross-fade-all) > .core-selected *:not([hero])'; } + .host(.cross-fade-all) ::content > .core-selected /deep/ * { + opacity: 1; + } + + /* Only background-color is allowed for the hero's parents, no opacity transitions */ + polyfill-next-selector { content: ':host(.cross-fade-all) > * [hero-p]'; } + :host(.cross-fade-all) ::content > * /deep/ [hero-p] { + -webkit-transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + transition: background-color {{g.transitions.xfadeDuration || g.transitions.duration}} ease-out; + opacity: 1; + } + + polyfill-next-selector { content: ':host(.cross-fade-all) > [animate]:not(.core-selected) [hero-p]'; } + :host(.cross-fade-all) ::content > [animate]:not(.core-selected) /deep/ [hero-p] { + background-color: rgba(0, 0, 0, 0); + } +</core-style> + +<!-- + +`cross-fade` fades out elements in the outgoing page and fades in elements in the +incoming page during a page transition. You can configure the duration of the +transition with the global variable `CoreStyle.g.transitions.xfadeDuration`. + +Example: + + <core-animated-pages transition="cross-fade"> + <section> + <div id="div1" cross-fade></div> + </section> + <section> + <div id="div2" cross-fade bg> + <div id="div3" cross-fade></div> + <div id="div4"></div> + </div> + </section> + </core-animated-pages> + +In the above example, `#div1` and `#div3` has the `cross-fade` attribute. `#div1` +will fade out and `#div3` will fade in with opacity transitions when the page switches +from 0 to 1. Sometimes, you may want to only fade the background color of an element +but not its children, and you can use the `bg` attribute along with the `#div1` +attribute as in `#div2`. + +@class cross-fade +@extends core-transition-pages +@status beta +@homepage github.io + +--> + +<!-- + +`cross-fade-delayed` performs a cross-fade after some delay, either specified in +the global variable `CoreStyle.g.transitions.xfadeDelay` or the duration of the +transition. + +Example: + + <core-animated-pages transition="hero-transition cross-fade-delayed"> + <section> + <div id="div1" hero-id hero></div> + </section> + <section> + <div id="div2" hero-id hero> + <div id="div3" cross-fade-delayed></div> + </div> + </section> + </core-animated-pages> + +In the above example, `#div3` fades in after the hero transition from `#div1` to +`#div2` completes. + +@class cross-fade-delayed +@extends core-transition-pages +@status beta +@homepage github.io + +--> + +<core-transition-pages id="cross-fade"></core-transition-pages> +<core-transition-pages id="cross-fade-delayed"></core-transition-pages> +<core-transition-pages id="cross-fade-all" scopeClass="cross-fade-all"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition-extracted.js b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition-extracted.js new file mode 100644 index 0000000..e91a34b --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition-extracted.js @@ -0,0 +1,169 @@ + +(function() { + + var webkitStyles = '-webkit-transition' in document.documentElement.style + var TRANSITION_CSSNAME = webkitStyles ? '-webkit-transition' : 'transition'; + var TRANSFORM_CSSNAME = webkitStyles ? '-webkit-transform' : 'transform'; + var TRANSITION_NAME = webkitStyles ? 'webkitTransition' : 'transition'; + var TRANSFORM_NAME = webkitStyles ? 'webkitTransform' : 'transform'; + + var hasShadowDOMPolyfill = window.ShadowDOMPolyfill; + + Polymer('hero-transition',{ + + go: function(scope, options) { + var props = [ + 'border-radius', + 'width', + 'height', + TRANSFORM_CSSNAME + ]; + + var duration = options && options.duration || + (CoreStyle.g.transitions.heroDuration || + CoreStyle.g.transitions.duration); + + scope._heroes.forEach(function(h) { + var d = h.h0.hasAttribute('hero-delayed') ? CoreStyle.g.transitions.heroDelay : ''; + var wt = []; + props.forEach(function(p) { + wt.push(p + ' ' + duration + ' ' + options.easing + ' ' + d); + }); + + h.h1.style[TRANSITION_NAME] = wt.join(', '); + h.h1.style.borderRadius = h.r1; + h.h1.style[TRANSFORM_NAME] = 'none'; + }); + + this.super(arguments); + + if (!scope._heroes.length) { + this.completed = true; + } + }, + + prepare: function(scope, options) { + this.super(arguments); + var src = options.src, dst = options.dst; + + if (scope._heroes && scope._heroes.length) { + this.ensureComplete(scope); + } else { + scope._heroes = []; + } + + // FIXME(yvonne): basic support for nested pages. + // Look for heroes in the light DOM and one level of shadow DOM of the src and dst, + // and also in src.selectedItem or dst.selectedItem, then transform the dst hero to src + var ss = '[hero]'; + var h$ = this.findAllInShadows(src, ss); + if (src.selectedItem) { + hs$ = this.findAllInShadows(src.selectedItem, ss); + hsa$ = []; + // De-duplicate items + Array.prototype.forEach.call(hs$, function(hs) { + if (h$.indexOf(hs) === -1) { + hsa$.push(hs); + } + }) + h$ = h$.concat(hsa$); + } + + for (var i=0, h0; h0=h$[i]; i++) { + var v = h0.getAttribute('hero-id'); + var ds = '[hero][hero-id="' + v + '"]'; + var h1 = this.findInShadows(dst, ds); + + if (!h1 && dst.selectedItem) { + h1 = this.findInShadows(dst.selectedItem, ds); + } + + // console.log('src', src); + // console.log('dst', dst, dst.selectedItem); + // console.log(v, h0, h1); + if (v && h1) { + var c0 = getComputedStyle(h0); + var c1 = getComputedStyle(h1); + var h = { + h0: h0, + b0: h0.getBoundingClientRect(), + r0: c0.borderRadius, + h1: h1, + b1: h1.getBoundingClientRect(), + r1: c1.borderRadius + }; + + var dl = h.b0.left - h.b1.left; + var dt = h.b0.top - h.b1.top; + var sw = h.b0.width / h.b1.width; + var sh = h.b0.height / h.b1.height; + + // h.scaley = h.h0.hasAttribute('scaley'); + // if (!h.scaley && (sw !== 1 || sh !== 1)) { + // sw = sh = 1; + // h.h1.style.width = h.b0.width + 'px'; + // h.h1.style.height = h.b0.height + 'px'; + // } + + // Also animate the border-radius for the circle-to-square transition + if (h.r0 !== h.r1) { + h.h1.style.borderRadius = h.r0; + } + + // console.log(h); + + h.h1.style[TRANSFORM_NAME] = 'translate(' + dl + 'px,' + dt + 'px)' + ' scale(' + sw + ',' + sh + ')'; + h.h1.style[TRANSFORM_NAME + 'Origin'] = '0 0'; + + scope._heroes.push(h); + } + } + + }, + + // carefully look into ::shadow with polyfill specific hack + findInShadows: function(node, selector) { + return node.querySelector(selector) || (hasShadowDOMPolyfill ? + Platform.queryAllShadows(node, selector) : + node.querySelector('::shadow ' + selector)); + }, + + findAllInShadows: function(node, selector) { + if (hasShadowDOMPolyfill) { + var nodes = node.querySelectorAll(selector).array(); + var shadowNodes = Platform.queryAllShadows(node, selector, true); + return nodes.concat(shadowNodes); + } else { + return node.querySelectorAll(selector).array().concat(node.shadowRoot ? node.shadowRoot.querySelectorAll(selector).array() : []); + } + }, + + ensureComplete: function(scope) { + this.super(arguments); + if (scope._heroes) { + scope._heroes.forEach(function(h) { + h.h1.style[TRANSITION_NAME] = null; + h.h1.style[TRANSFORM_NAME] = null; + }); + scope._heroes = []; + } + }, + + complete: function(scope, e) { + // if (e.propertyName === TRANSFORM_CSSNAME) { + var done = false; + scope._heroes.forEach(function(h) { + if (h.h1 === e.path[0]) { + done = true; + } + }); + + if (done) { + this.super(arguments); + } + // } + } + + }); + +})(); diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.css b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.css new file mode 100644 index 0000000..093b9cb --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.css @@ -0,0 +1,12 @@ +/* Hide heroes that are not currently transitioning */ +polyfill-next-selector { content: ':host > [animate] [hero]'; } +::content > [animate] /deep/ [hero], ::content > [animate]::shadow [hero] { + visibility: hidden; +} + +polyfill-next-selector { content: ':host > .core-selected[animate] [hero]'; } +::content > .core-selected[animate] /deep/ [hero], +::content > .core-selected[animate]::shadow [hero] { + visibility: visible; + z-index: 10000; +} diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.html new file mode 100644 index 0000000..a60e8f2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/hero-transition.html @@ -0,0 +1,99 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="hero-transition"> + /* Hide heroes that are not currently transitioning */ + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [hero]'; } + ::content > [animate]:not(.core-selected) /deep/ [hero] { + opacity: 0; + } + + polyfill-next-selector { content: ':host > .core-selected[animate] [hero]'; } + ::content > .core-selected[animate] /deep/ [hero] { + opacity: 1; + z-index: 10000; + } + + polyfill-next-selector { content: ':host > * [hero-p]'; } + ::content > * /deep/ [hero-p] { + -webkit-transition: box-shadow 100ms ease-out; + transition: box-shadow 100ms ease-out; + } + + polyfill-next-selector { content: ':host > [animate] [hero-p]'; } + ::content > [animate] /deep/ [hero-p] { + box-shadow: none !important; + } +</core-style> + + +<!-- + +`hero-transition` transforms two elements in different pages such that they appear +to be shared across the pages. + +Example: + + <core-animated-pages transition="hero-transition"> + <section layout horizontal> + <div id="div1" flex></div> + <div id="div2" flex hero-id="shared" hero></div> + </section> + <section> + <section layout horizontal> + <div id="div3" flex hero-id="shared" hero></div> + <div id="div4" flex></div> + </section> + </section> + </core-animated-pages> + +In the above example, the elements `#div2` and `#div3` shares the same `hero-id` +attribute and a single element appears to translate and scale smoothly between +the two positions during a page transition. + +Both elements from the source and destination pages must share the same `hero-id` +and must both contain the `hero` attribute to trigger the transition. The separate +`hero` attribute allows you to use binding to configure the transition: + +Example: + + <core-animated-pages transition="hero-transition"> + <section layout horizontal> + <div id="div1" flex hero-id="shared" hero?="{{selected == 0}}"></div> + <div id="div2" flex hero-id="shared" hero?="{{selected == 1}}"></div> + </section> + <section> + <section layout horizontal> + <div id="div3" flex hero-id="shared" hero></div> + </section> + </section> + </core-animated-pages> + +In the above example, either `#div1` or `#div2` scales to `#div3` during a page transition, +depending on the value of `selected`. + +Because it is common to share elements with different `border-radius` values, by default +this transition will also animate the `border-radius` property. + +You can configure the duration of the hero transition with the global variable +`CoreStyle.g.transitions.heroDuration`. + +@class hero-transition +@extends core-transition-pages +@status beta +@homepage github.io +--> +<polymer-element name="hero-transition" extends="core-transition-pages" assetpath=""> + +</polymer-element> + +<hero-transition id="hero-transition"></hero-transition> +<script src="hero-transition-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/list-cascade.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/list-cascade.html new file mode 100644 index 0000000..986e017 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/list-cascade.html @@ -0,0 +1,58 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + + +<core-style id="list-cascade"> + polyfill-next-selector { content: ':host.list-cascade > * [list-cascade]'; } + :host(.list-cascade) ::content > * [list-cascade] * { + -webkit-transition: -webkit-transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascade || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascade || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > .core-selected [list-cascade] *'; } + ::content > .core-selected [list-cascade] * { + -webkit-transform: none; + transform: none; + } + + polyfill-next-selector { content: ':host > *:not(.core-selected) [list-cascade] *'; } + ::content > *:not(.core-selected) [list-cascade] * { + -webkit-transform: translateY(200%); + transform: translateY(200%); + opacity: 0.2; + } + + polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(2)'; } + ::content > .core-selected [list-cascade] *:nth-child(2) { + -webkit-transition-delay: 0.1s; + transition-delay: 0.1s; + } + + polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(3)'; } + ::content > .core-selected [list-cascade] *:nth-child(3) { + -webkit-transition-delay: 0.2s; + transition-delay: 0.2s; + } + + polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(4)'; } + ::content > .core-selected [list-cascade] *:nth-child(4) { + -webkit-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + polyfill-next-selector { content: ':host > .core-selected [list-cascade] *:nth-child(5)'; } + ::content > .core-selected [list-cascade] *:nth-child(5) { + -webkit-transition-delay: 0.4s; + transition-delay: 0.4s; + } +</core-style> + +<core-transition-pages id="list-cascade" activeClass="list-cascade"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/scale-up.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/scale-up.html new file mode 100644 index 0000000..9724285 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/scale-up.html @@ -0,0 +1,37 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="scale-up"> + polyfill-next-selector { content: ':host > * [scale-up]'; } + ::content > * /deep/ [scale-up] { + -webkit-transition: -webkit-transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important; + transition: transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important; + } + + polyfill-next-selector { content: ':host > .core-selected [scale-up]'; } + ::content > .core-selected /deep/ [scale-up] { + -webkit-transform: none; + transform: none; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [scale-up]'; } + ::content > [animate]:not(.core-selected) /deep/ [scale-up] { + -webkit-transform: scale(0); + transform: scale(0); + } + + polyfill-next-selector { content: ':host > .core-selected[animate] [scale-up]'; } + ::content > .core-selected[animate] /deep/ [scale-up] { + z-index: 1000; + } +</core-style> + +<core-transition-pages id="scale-up"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-down.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-down.html new file mode 100644 index 0000000..025f71c --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-down.html @@ -0,0 +1,55 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="slide-down"> + polyfill-next-selector { content: ':host.slide-down > * [slide-down]'; } + :host(.slide-down) ::content > * /deep/ [slide-down] { + -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > .core-selected [slide-down]'; } + ::content > .core-selected /deep/ [slide-down] { + -webkit-transform: none; + transform: none; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-down]'; } + ::content > [animate]:not(.core-selected) /deep/ [slide-down] { + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } +</core-style> + +<!-- + +`slide-down` slides an element in the outgoing page from the top of the window and +slides in an element in the incoming page from the top of the window during a page +transition. You can configure the duration of the transition with the global variable +`CoreStyle.g.transitions.slideDuration`. + +Example: + + <core-animated-pages transition="slide-down"> + <section> + <div id="div1" slide-down></div> + </section> + <section></section> + </core-animated-pages> + +@class slide-down +@extends core-transition-pages +@status beta +@homepage github.io + +--> + +<core-transition-pages id="slide-down" activeClass="slide-down"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-bottom.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-bottom.html new file mode 100644 index 0000000..50a090b --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-bottom.html @@ -0,0 +1,38 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="slide-from-bottom"> + polyfill-next-selector { content: ':host(.slide-from-bottom) > *'; } + :host(.slide-from-bottom) ::content > * { + -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host(.slide-from-bottom) > .core-selected ~ [animate]:not(.core-selected)'; } + :host(.slide-from-bottom) ::content > .core-selected ~ [animate]:not(.core-selected) { + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + + polyfill-next-selector { content: ':host(.slide-from-bottom) > [animate]:not(.core-selected)'; } + :host(.slide-from-bottom) ::content > [animate]:not(.core-selected) { + -webkit-transform: translateY(-100%); + transform: translateY(-100%); + } + + polyfill-next-selector { content: ':host(.slide-from-bottom) > .core-selected'; } + :host(.slide-from-bottom) ::content > .core-selected { + -webkit-transform: none; + transform: none; + } +</core-style> + +<core-transition-pages id="slide-from-bottom" scopeClass="slide-from-bottom"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-right.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-right.html new file mode 100644 index 0000000..9a847d2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-from-right.html @@ -0,0 +1,43 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<!-- +Warning: This transition does not work well in combination with other transitions, because +it operates on the page rather than the page's children. +--> + +<core-style id="slide-from-right"> + polyfill-next-selector { content: ':host(.slide-from-right) > *'; } + :host(.slide-from-right) ::content > * { + -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected ~ [animate]:not(.core-selected)'; } + :host(.slide-from-right) ::content > .core-selected ~ [animate]:not(.core-selected) { + -webkit-transform: translateX(100%); + transform: translateX(100%); + } + + polyfill-next-selector { content: ':host(.slide-from-right) > [animate]:not(.core-selected)'; } + :host(.slide-from-right) ::content > [animate]:not(.core-selected) { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); + } + + polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected'; } + :host(.slide-from-right) ::content > .core-selected { + -webkit-transform: none; + transform: none; + } +</core-style> + +<core-transition-pages id="slide-from-right" scopeClass="slide-from-right"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-up.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-up.html new file mode 100644 index 0000000..33533cf --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/slide-up.html @@ -0,0 +1,82 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="slide-up"> + polyfill-next-selector { content: ':host.slide-up > * [slide-up]'; } + :host(.slide-up) ::content > * /deep/ [slide-up] { + -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > .core-selected [slide-up]'; } + ::content > .core-selected /deep/ [slide-up] { + -webkit-transform: none; + transform: none; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up]'; } + ::content > [animate]:not(.core-selected) /deep/ [slide-up] { + -webkit-transform: translateY(150%); + transform: translateY(150%); + } +</core-style> + +<core-style id="slide-up-offscreen"> + polyfill-next-selector { content: ':host.slide-up-offscreen > * [slide-up-offscreen]'; } + :host(.slide-up-offscreen) ::content > * /deep/ [slide-up-offscreen] { + -webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host > .core-selected [slide-up-offscreen]'; } + ::content > .core-selected /deep/ [slide-up-offscreen] { + -webkit-transform: none; + transform: none; + } + + polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]'; } + ::content > [animate]:not(.core-selected) /deep/ [slide-up-offscreen] { + -webkit-transform: translateY(100vh); + transform: translateY(100vh); + z-index: -1; + } + + polyfill-rule { + content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]'; + -webkit-transform: translateY(1000px); + } +</core-style> + +<!-- + +`slide-up` slides an element in the outgoing page from the bottom of the window +and slides in an element in the incoming page from the bottom of the window during +a page transition. You can configure the duration of the transition with the global +variable `CoreStyle.g.transitions.slideDuration`. + +Example: + + <core-animated-pages transition="slide-up"> + <section> + <div id="div1" slide-up></div> + </section> + <section></section> + </core-animated-pages> + +@class slide-up +@extends core-transition-pages +@status beta +@homepage github.io + +--> + +<core-transition-pages id="slide-up" activeClass="slide-up"></core-transition-pages> +<core-transition-pages id="slide-up-offscreen" activeClass="slide-up-offscreen"></core-transition-pages> diff --git a/third_party/polymer/components-chromium/core-animated-pages/transitions/tile-cascade.html b/third_party/polymer/components-chromium/core-animated-pages/transitions/tile-cascade.html new file mode 100644 index 0000000..63756f1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animated-pages/transitions/tile-cascade.html @@ -0,0 +1,101 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="core-transition-pages.html" rel="import"> + +<core-style id="tile-cascade"> + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div { + -webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1); + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(2)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(2) { + -webkit-transition-delay: 0.05s; + transition-delay: 0.05s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(3)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(3) { + -webkit-transition-delay: 0.1s; + transition-delay: 0.1s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(4)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(4) { + -webkit-transition-delay: 0.15s; + transition-delay: 0.15s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(5)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(5) { + -webkit-transition-delay: 0.2s; + transition-delay: 0.2s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(6)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(6) { + -webkit-transition-delay: 0.25s; + transition-delay: 0.25s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(7)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(7) { + -webkit-transition-delay: 0.3s; + transition-delay: 0.3s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(8)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(8) { + -webkit-transition-delay: 0.35s; + transition-delay: 0.35s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(9)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(9) { + -webkit-transition-delay: 0.4s; + transition-delay: 0.4s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(10)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(10) { + -webkit-transition-delay: 0.45s; + transition-delay: 0.45s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(11)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(11) { + -webkit-transition-delay: 0.5s; + transition-delay: 0.5s; + } + + polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(12)'; } + :host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(12) { + -webkit-transition-delay: 0.55s; + transition-delay: 0.55s; + } + + polyfill-next-selector { content: '.core-selected [tile-cascade] > div'; } + ::content > .core-selected /deep/ [tile-cascade] > div { + } + + polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade] > div'; } + ::content > [animate]:not(.core-selected) /deep/ [tile-cascade] > div { + -webkit-transform: translateY(100%); + transform: translateY(100%); + } + + polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade][fade] > div'; } + ::content > [animate]:not(.core-selected) /deep/ [tile-cascade][fade] > div { + opacity: 0; + } +</core-style> + +<core-transition-pages id="tile-cascade" activeClass="tile-cascade" transitionProperty="transform"></core-transition-pages>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/.bower.json b/third_party/polymer/components-chromium/core-animation/.bower.json new file mode 100644 index 0000000..1a84d62 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-animation", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "web-animations-js": "web-animations/web-animations-js#master" + }, + "homepage": "https://github.com/Polymer/core-animation", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "b89817863f78706fa8d9b8289ada65b8551a66cd" + }, + "_source": "git://github.com/Polymer/core-animation.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-animation" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/README.md b/third_party/polymer/components-chromium/core-animation/README.md new file mode 100644 index 0000000..809db5e --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/README.md @@ -0,0 +1,4 @@ +core-animation +============== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-animation) for more information. diff --git a/third_party/polymer/components-chromium/core-animation/bower.json b/third_party/polymer/components-chromium/core-animation/bower.json new file mode 100644 index 0000000..aedb555 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-animation", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "web-animations-js": "web-animations/web-animations-js#master" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/core-animation-extracted.js b/third_party/polymer/components-chromium/core-animation/core-animation-extracted.js new file mode 100644 index 0000000..7fe0497 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/core-animation-extracted.js @@ -0,0 +1,433 @@ + + (function() { + + function toNumber(value, allowInfinity) { + return (allowInfinity && value === 'Infinity') ? Number.POSITIVE_INFINITY : Number(value); + }; + + Polymer('core-animation',{ + /** + * Fired when the animation completes. + * + * @event core-animation-finish + */ + + /** + * + * Fired when the web animation object changes. + * + * @event core-animation-change + */ + + publish: { + + /** + * One or more nodes to animate. + * + * @property target + * @type HTMLElement|Node|Array<HTMLElement|Node> + */ + target: {value: null, reflect: true}, + + /** + * Animation keyframes specified as an array of dictionaries of + * <css properties>:<array of values> pairs. For example, + * + * @property keyframes + * @type Object + */ + keyframes: {value: null, reflect: true}, + + /** + * A custom animation function. Either provide this or `keyframes`. The signature + * of the callback is `EffectsCallback(timeFraction, target, animation)` + * + * @property customEffect + * @type Function(number, Object, Object) + */ + customEffect: {value: null, reflect: true}, + + /** + * Controls the composition behavior. If set to "replace", the effect overrides + * the underlying value for the target. If set the "add", the effect is added to + * the underlying value for the target. If set to "accumulate", the effect is + * accumulated to the underlying value for the target. + * + * In cases such as numbers or lengths, "add" and "accumulate" produce the same + * value. In list values, "add" is appending to the list, while "accumulate" is + * adding the individual components of the list. + * + * For example, adding `translateX(10px)` and `translateX(25px)` produces + * `translateX(10px) translateX(25px)` and accumulating produces `translateX(35px)`. + * + * @property composite + * @type "replace"|"add"|"accumulate" + * @default "replace" + */ + composite: {value: 'replace', reflect: true}, + + /** + * Animation duration in milliseconds, "Infinity", or "auto". "auto" is + * equivalent to 0. + * + * @property duration + * @type number|"Infinity" + * @default "auto" + */ + duration: {value: 'auto', reflect: true}, + + /** + * Controls the effect the animation has on the target when it's not playing. + * The possible values are "none", "forwards", "backwards", "both" or "auto". + * + * "none" means the animation has no effect when it's not playing. + * + * "forward" applies the value at the end of the animation after it's finished. + * + * "backwards" applies the value at the start of the animation to the target + * before it starts playing and has no effect when the animation finishes. + * + * "both" means "forwards" and "backwards". "auto" is equivalent to "none". + * + * @property fill + * @type "none"|"forwards"|"backwards"|"both"|"auto" + * @default "auto" + */ + fill: {value: 'auto', reflect: true}, + + /** + * A transition timing function. The values are equivalent to the CSS + * counterparts. + * + * @property easing + * @type string + * @default "linear" + */ + easing: {value: 'linear', reflect: true}, + + /** + * The number of milliseconds to delay before beginning the animation. + * + * @property delay + * @type Number + * @default 0 + */ + delay: {value: 0, reflect: true}, + + /** + * The number of milliseconds to wait after the animation finishes. This is + * useful, for example, in an animation group to wait for some time before + * beginning the next item in the animation group. + * + * @property endDelay + * @type number + * @default 0 + */ + endDelay: {value: 0, reflect: true}, + + /** + * The number of iterations this animation should run for. + * + * @property iterations + * @type Number|'Infinity' + * @default 1 + */ + iterations: {value: 1, reflect: true}, + + /** + * Number of iterations into the animation in which to begin the effect. + * For example, setting this property to 0.5 and `iterations` to 2 will + * cause the animation to begin halfway through the first iteration but still + * run twice. + * + * @property iterationStart + * @type Number + * @default 0 + */ + iterationStart: {value: 0, reflect: true}, + + /** + * (not working in web animations polyfill---do not use) + * + * Controls the iteration composition behavior. If set to "replace", the effect for + * every iteration is independent of each other. If set to "accumulate", the effect + * for iterations of the animation will build upon the value in the previous iteration. + * + * Example: + * + * // Moves the target 50px on the x-axis over 5 iterations. + * <core-animation iterations="5" iterationComposite="accumulate"> + * <core-animation-keyframe> + * <core-animation-prop name="transform" value="translateX(10px)"></core-animation-prop> + * </core-animation-keyframe> + * </core-animation> + * + * @property iterationComposite + * @type "replace"|"accumulate" + * @default false + */ + iterationComposite: {value: 'replace', reflect: true}, + + /** + * The playback direction of the animation. "normal" plays the animation in the + * normal direction. "reverse" plays it in the reverse direction. "alternate" + * alternates the playback direction every iteration such that even iterations are + * played normally and odd iterations are reversed. "alternate-reverse" plays + * even iterations in the reverse direction and odd iterations in the normal + * direction. + * + * @property direction + * @type "normal"|"reverse"|"alternate"|"alternate-reverse" + * @default "normal" + */ + direction: {value: 'normal', reflect: true}, + + /** + * A multiplier to the playback rate to the animation. + * + * @property playbackRate + * @type number + * @default 1 + */ + playbackRate: {value: 1, reflect: true}, + + /** + * If set to true, play the animation when it is created or a property is updated. + * + * @property autoplay + * @type boolean + * @default false + */ + autoplay: {value: false, reflect: true} + + }, + + animation: false, + + observe: { + target: 'apply', + keyframes: 'apply', + customEffect: 'apply', + composite: 'apply', + duration: 'apply', + fill: 'apply', + easing: 'apply', + iterations: 'apply', + iterationStart: 'apply', + iterationComposite: 'apply', + delay: 'apply', + endDelay: 'apply', + direction: 'apply', + playbackRate: 'apply', + autoplay: 'apply' + }, + + ready: function() { + this.apply(); + }, + + /** + * Plays the animation. If the animation is currently paused, seeks the animation + * to the beginning before starting playback. + * + * @method play + * @return AnimationPlayer The animation player. + */ + play: function() { + this.apply(); + if (this.animation && !this.autoplay) { + this.player = document.timeline.play(this.animation); + this.player.onfinish = this.animationFinishHandler.bind(this); + return this.player; + } + }, + + /** + * Stops the animation and clears all effects on the target. + * + * @method cancel + */ + cancel: function() { + if (this.player) { + this.player.cancel(); + } + }, + + /** + * Seeks the animation to the end. + * + * @method finish + */ + finish: function() { + if (this.player) { + this.player.finish(); + } + }, + + /** + * Pauses the animation. + * + * @method pause + */ + pause: function() { + if (this.player) { + this.player.pause(); + } + }, + + /** + * @method hasTarget + * @return boolean True if `target` is defined. + */ + hasTarget: function() { + return this.target !== null; + }, + + /** + * Creates a web animations object based on this object's properties, and + * plays it if autoplay is true. + * + * @method apply + * @return Object A web animation. + */ + apply: function() { + this.animation = this.makeAnimation(); + if (this.autoplay && this.animation) { + this.play(); + } + return this.animation; + }, + + makeSingleAnimation: function(target) { + // XXX(yvonne): for selecting all the animated elements. + target.classList.add('core-animation-target'); + return new Animation(target, this.animationEffect, this.timingProps); + }, + + makeAnimation: function() { + if (!this.target) { + return null; + } + var animation; + if (Array.isArray(this.target)) { + var array = []; + this.target.forEach(function(t) { + array.push(this.makeSingleAnimation(t)); + }.bind(this)); + animation = new AnimationGroup(array); + } else { + animation = this.makeSingleAnimation(this.target); + } + return animation; + }, + + animationChanged: function() { + // Sending 'this' with the event so you can always get the animation object + // that fired the event, due to event retargetting in shadow DOM. + this.fire('core-animation-change', this); + }, + + targetChanged: function(old) { + if (old) { + old.classList.remove('core-animation-target'); + } + }, + + get timingProps() { + var props = {}; + var timing = { + delay: {isNumber: true}, + endDelay: {isNumber: true}, + fill: {}, + iterationStart: {isNumber: true}, + iterations: {isNumber: true, allowInfinity: true}, + duration: {isNumber: true}, + playbackRate: {isNumber: true}, + direction: {}, + easing: {} + }; + for (t in timing) { + if (this[t] !== null) { + var name = timing[t].property || t; + props[name] = timing[t].isNumber && this[t] !== 'auto' ? + toNumber(this[t], timing[t].allowInfinity) : this[t]; + } + } + return props; + }, + + get animationEffect() { + var props = {}; + var frames = []; + var effect; + if (this.keyframes) { + frames = this.keyframes; + } else if (!this.customEffect) { + var children = this.querySelectorAll('core-animation-keyframe'); + if (children.length === 0) { + children = this.shadowRoot.querySelectorAll('core-animation-keyframe'); + } + Array.prototype.forEach.call(children, function(c) { + frames.push(c.properties); + }); + } + if (this.customEffect) { + effect = this.customEffect; + } else { + effect = new KeyframeEffect(frames, this.composite); + } + return effect; + }, + + animationFinishHandler: function() { + this.fire('core-animation-finish'); + } + + }); + })(); + ; + + Polymer('core-animation-keyframe',{ + publish: { + /** + * An offset from 0 to 1. + * + * @property offset + * @type Number + */ + offset: {value: null, reflect: true} + }, + get properties() { + var props = {}; + var children = this.querySelectorAll('core-animation-prop'); + Array.prototype.forEach.call(children, function(c) { + props[c.name] = c.value; + }); + if (this.offset !== null) { + props.offset = this.offset; + } + return props; + } + }); + ; + + Polymer('core-animation-prop',{ + publish: { + /** + * A CSS property name. + * + * @property name + * @type string + */ + name: {value: '', reflect: true}, + + /** + * The value for the CSS property. + * + * @property value + * @type string|number + */ + value: {value: '', reflect: true} + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/core-animation-group-extracted.js b/third_party/polymer/components-chromium/core-animation/core-animation-group-extracted.js new file mode 100644 index 0000000..3795c37 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/core-animation-group-extracted.js @@ -0,0 +1,124 @@ + + (function() { + + var ANIMATION_GROUPS = { + 'par': AnimationGroup, + 'seq': AnimationSequence + }; + + Polymer('core-animation-group',{ + + publish: { + /** + * If target is set, any children without a target will be assigned the group's + * target when this property is set. + * + * @property target + * @type HTMLElement|Node|Array|Array<HTMLElement|Node> + */ + + /** + * For a `core-animation-group`, a duration of "auto" means the duration should + * be the specified duration of its children. If set to anything other than + * "auto", any children without a set duration will be assigned the group's duration. + * + * @property duration + * @type number + * @default "auto" + */ + duration: {value: 'auto', reflect: true}, + + /** + * The type of the animation group. 'par' creates a parallel group and 'seq' creates + * a sequential group. + * + * @property type + * @type String + * @default 'par' + */ + type: {value: 'par', reflect: true} + }, + + typeChanged: function() { + this.apply(); + }, + + targetChanged: function() { + // Only propagate target to children animations if it's defined. + if (this.target) { + this.doOnChildren(function(c) { + c.target = this.target; + }.bind(this)); + } + }, + + durationChanged: function() { + if (this.duration && this.duration !== 'auto') { + this.doOnChildren(function(c) { + // Propagate to children that is not a group and has no + // duration specified. + if (!c.type && (!c.duration || c.duration === 'auto')) { + c.duration = this.duration; + } + }.bind(this)); + } + }, + + doOnChildren: function(inFn) { + var children = this.children; + if (!children.length) { + children = this.shadowRoot ? this.shadowRoot.childNodes : []; + } + Array.prototype.forEach.call(children, function(c) { + // TODO <template> in the way + c.apply && inFn(c); + }, this); + }, + + makeAnimation: function() { + return new ANIMATION_GROUPS[this.type](this.childAnimations, this.timingProps); + }, + + hasTarget: function() { + var ht = this.target !== null; + if (!ht) { + this.doOnChildren(function(c) { + ht = ht || c.hasTarget(); + }.bind(this)); + } + return ht; + }, + + apply: function() { + // Propagate target and duration to child animations first. + this.durationChanged(); + this.targetChanged(); + this.doOnChildren(function(c) { + c.apply(); + }); + return this.super(); + }, + + get childAnimationElements() { + var list = []; + this.doOnChildren(function(c) { + if (c.makeAnimation) { + list.push(c); + } + }); + return list; + }, + + get childAnimations() { + var list = []; + this.doOnChildren(function(c) { + if (c.animation) { + list.push(c.animation); + } + }); + return list; + } + }); + + })(); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/core-animation-group.html b/third_party/polymer/components-chromium/core-animation/core-animation-group.html new file mode 100644 index 0000000..cbb1b92 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/core-animation-group.html @@ -0,0 +1,47 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="core-animation.html"> + +<!-- +@group Polymer Core Elements + +`core-animation-group` combines `core-animation` or `core-animation-group` elements to +create a grouped web animation. The group may be parallel (type is `par`) or sequential +(type is `seq`). Parallel groups play all the children elements simultaneously, and +sequential groups play the children one after another. + +Example of an animation group to rotate and then fade an element: + + <core-animation-group type="seq"> + <core-animation id="fadeout" duration="500"> + <core-animation-keyframe> + <core-animation-prop name="transform" value="rotate(0deg)"></core-animation-prop> + <core-animation-prop name="transform" value="rotate(45deg)"></core-animation-prop> + </core-animation-keyframe> + </core-animation> + <core-animation id="fadeout" duration="500"> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"></core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="0"></core-animation-prop> + </core-animation-keyframe> + </core-animation> + </core-animation-group> + +@element core-animation-group +@status beta +@homepage github.io +--> +<polymer-element name="core-animation-group" constructor="CoreAnimationGroup" extends="core-animation" attributes="type" assetpath=""> + +</polymer-element> +<script src="core-animation-group-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/core-animation.html b/third_party/polymer/components-chromium/core-animation/core-animation.html new file mode 100644 index 0000000..bf39dce --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/core-animation.html @@ -0,0 +1,95 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="web-animations.html"> + +<!-- +@group Polymer Core Elements + +`core-animation` is a convenience element to use web animations with Polymer elements. It +allows you to create a web animation declaratively. You can extend this class to create +new types of animations and combine them with `core-animation-group`. + +Example to create animation to fade out an element over 500ms: + + <core-animation id="fadeout" duration="500"> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"></core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="0"></core-animation-prop> + </core-animation-keyframe> + </core-animation> + + <div id="el">Fade me out</div> + + <script> + var animation = document.getElementById('fadeout'); + animation.target = document.getElementById('el'); + animation.play(); + </script> + +Or do the same imperatively: + + var animation = new CoreAnimation(); + animation.duration = 500; + animation.keyframes = [ + {opacity: 1}, + {opacity: 0} + ]; + animation.target = document.getElementById('el'); + animation.play(); + +You can also provide a javascript function instead of keyframes to the animation. This +behaves essentially the same as `requestAnimationFrame`: + + var animation = new CoreAnimation(); + animation.customEffect = function(timeFraction, target, animation) { + // do something custom + }; + animation.play(); + +Elements that are targets to a `core-animation` are given the `core-animation-target` class. + +@element core-animation +@status beta +@homepage github.io +--> +<polymer-element name="core-animation" constructor="CoreAnimation" attributes="target keyframes sample composite duration fill easing iterationStart iterationCount delay direction autoplay targetSelector" assetpath=""> + +</polymer-element> + +<!-- +`core-animation-keyframe` represents a keyframe in a `core-animation`. Use them as children of +`core-animation` elements to create web animations declaratively. If the `offset` property is +unset, the keyframes will be distributed evenly within the animation duration. Use +`core-animation-prop` elements as children of this element to specify the CSS properties for +the animation. + +@element core-animation-keyframe +@status beta +@homepage github.io +--> +<polymer-element name="core-animation-keyframe" attributes="offset" assetpath=""> + +</polymer-element> + +<!-- +`core-animation-prop` represents a CSS property and value pair to use with +`core-animation-keyframe`. + +@element core-animation-prop +@status beta +@homepage github.io +--> +<polymer-element name="core-animation-prop" attributes="name value" assetpath=""> + +</polymer-element> +<script src="core-animation-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-animation/demo.html b/third_party/polymer/components-chromium/core-animation/demo.html new file mode 100644 index 0000000..b9a1038 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/demo.html @@ -0,0 +1,140 @@ +<!DOCTYPE html> +<html> + <head> + <title>core-animation</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="core-animation.html"> + <link rel="import" href="core-animation-group.html"> + +<!-- <link rel="import" href="polymer-blink.html"> + <link rel="import" href="polymer-bounce.html"> + <link rel="import" href="polymer-fadein.html"> + <link rel="import" href="polymer-fadeout.html"> + <link rel="import" href="polymer-flip.html"> + <link rel="import" href="polymer-shake.html"> + --> + <style> + body { + text-align: center; + font-family: Helvetica, sans-serif; + } + div#target { + display: inline-block; + background-color: dimgrey; + border-radius: 5px; + padding: 5px 10px; + margin: 50px; + font-size: 30px; + color: white; + } + div.animations > * { + display: inline-block; + background-color: darkgrey; + border-radius: 5px; + padding: 5px 10px; + margin: 5px; + color: white; + } + </style> + </head> + <body> + + <div id="target">animated!</div> + + <div class="animations"> + + <core-animation id="raw" duration="1000"> + raw + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="0.3"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"> + </core-animation-prop> + </core-animation-keyframe> + </core-animation> + + <core-animation-group type="seq"> + raw group + <core-animation duration="300"> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="0.3"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"> + </core-animation-prop> + </core-animation-keyframe> + </core-animation> + <core-animation duration="300"> + <core-animation-keyframe> + <core-animation-prop name="transform" value="scale(1)"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="transform" value="scale(1.2)"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="transform" value="scale(1)"> + </core-animation-prop> + </core-animation-keyframe> + </core-animation> + </core-animation-group> + + <core-animation id="custom-animation" duration="500">custom</core-animation> + + <core-animation duration="1000" iterations="Infinity" direction="alternate"> + infinite + <core-animation-keyframe> + <core-animation-prop name="opacity" value="1"> + </core-animation-prop> + </core-animation-keyframe> + <core-animation-keyframe> + <core-animation-prop name="opacity" value="0.3"> + </core-animation-prop> + </core-animation-keyframe> + </core-animation> +<!-- <polymer-bounce duration="1000">bounce</polymer-bounce> + <polymer-shake>shake</polymer-shake> + <polymer-flip>flip X</polymer-flip> + <polymer-flip axis="y">flip Y</polymer-flip> + <polymer-blink>blink</polymer-blink> + <polymer-fadein>fade in</polymer-fadein> + --> </div> + <script> + var customAnimationFn = function(timeFraction, target) { + if (timeFraction < 1) { + target.textContent = timeFraction; + } else { + target.textContent = 'animated!'; + } + }; + + document.addEventListener('polymer-ready', function() { + document.querySelector('.animations').addEventListener('click', + function(e) { + var animation = e.target; + if (animation.id === 'custom-animation') { + animation.customEffect = customAnimationFn; + } + animation.target = target; + animation.play(); + }); + document.getElementById('raw').addEventListener( + 'core-animation-finish', function(e) { + console.log('finish!'); + }); + }); + </script> + </body> +</html> diff --git a/third_party/polymer/components-chromium/core-animation/index.html b/third_party/polymer/components-chromium/core-animation/index.html new file mode 100644 index 0000000..6693d17 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["core-animation.html", "core-animation-group.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-animation/web-animations.html b/third_party/polymer/components-chromium/core-animation/web-animations.html new file mode 100644 index 0000000..4cdb1d2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-animation/web-animations.html @@ -0,0 +1 @@ +<script src="../web-animations-js/web-animations.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-collapse/.bower.json b/third_party/polymer/components-chromium/core-collapse/.bower.json new file mode 100644 index 0000000..87a0f81 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-collapse", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-collapse", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "7a0b808dcfaf4c117dbc1bf0d02fa2b2d5c8e1e8" + }, + "_source": "git://github.com/Polymer/core-collapse.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-collapse" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-collapse/README.md b/third_party/polymer/components-chromium/core-collapse/README.md new file mode 100644 index 0000000..bf0a159 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/README.md @@ -0,0 +1,4 @@ +core-collapse +============= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-collapse) for more information. diff --git a/third_party/polymer/components-chromium/core-collapse/bower.json b/third_party/polymer/components-chromium/core-collapse/bower.json new file mode 100644 index 0000000..6aee2d1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-collapse", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-collapse/core-collapse-extracted.js b/third_party/polymer/components-chromium/core-collapse/core-collapse-extracted.js new file mode 100644 index 0000000..50b9e66 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/core-collapse-extracted.js @@ -0,0 +1,209 @@ + + + Polymer('core-collapse', { + /** + * Fired when the target element has been resized as a result of the opened + * state changing. + * + * @event core-resize + */ + + /** + * The target element. + * + * @attribute target + * @type object + * @default null + */ + target: null, + + /** + * If true, the orientation is horizontal; otherwise is vertical. + * + * @attribute horizontal + * @type boolean + * @default false + */ + horizontal: false, + + /** + * Set opened to true to show the collapse element and to false to hide it. + * + * @attribute opened + * @type boolean + * @default false + */ + opened: false, + + /** + * Collapsing/expanding animation duration in second. + * + * @attribute duration + * @type number + * @default 0.33 + */ + duration: 0.33, + + /** + * If true, the size of the target element is fixed and is set + * on the element. Otherwise it will try to + * use auto to determine the natural size to use + * for collapsing/expanding. + * + * @attribute fixedSize + * @type boolean + * @default false + */ + fixedSize: false, + + created: function() { + this.transitionEndListener = this.transitionEnd.bind(this); + }, + + ready: function() { + this.target = this.target || this; + }, + + domReady: function() { + this.async(function() { + this.afterInitialUpdate = true; + }); + }, + + detached: function() { + if (this.target) { + this.removeListeners(this.target); + } + }, + + targetChanged: function(old) { + if (old) { + this.removeListeners(old); + } + if (!this.target) { + return; + } + this.isTargetReady = !!this.target; + this.classList.toggle('core-collapse-closed', this.target !== this); + this.target.style.overflow = 'hidden'; + this.horizontalChanged(); + this.addListeners(this.target); + // set core-collapse-closed class initially to hide the target + this.toggleClosedClass(true); + this.update(); + }, + + addListeners: function(node) { + node.addEventListener('transitionend', this.transitionEndListener); + }, + + removeListeners: function(node) { + node.removeEventListener('transitionend', this.transitionEndListener); + }, + + horizontalChanged: function() { + this.dimension = this.horizontal ? 'width' : 'height'; + }, + + openedChanged: function() { + this.update(); + }, + + /** + * Toggle the opened state. + * + * @method toggle + */ + toggle: function() { + this.opened = !this.opened; + }, + + setTransitionDuration: function(duration) { + var s = this.target.style; + s.transition = duration ? (this.dimension + ' ' + duration + 's') : null; + if (duration === 0) { + this.async('transitionEnd'); + } + }, + + transitionEnd: function() { + if (this.opened && !this.fixedSize) { + this.updateSize('auto', null); + } + this.setTransitionDuration(null); + this.toggleClosedClass(!this.opened); + this.asyncFire('core-resize', null, this.target); + }, + + toggleClosedClass: function(closed) { + this.hasClosedClass = closed; + this.target.classList.toggle('core-collapse-closed', closed); + }, + + updateSize: function(size, duration, forceEnd) { + this.setTransitionDuration(duration); + this.calcSize(); + var s = this.target.style; + var nochange = s[this.dimension] === size; + s[this.dimension] = size; + // transitonEnd will not be called if the size has not changed + if (forceEnd && nochange) { + this.transitionEnd(); + } + }, + + update: function() { + if (!this.target) { + return; + } + if (!this.isTargetReady) { + this.targetChanged(); + } + this.horizontalChanged(); + this[this.opened ? 'show' : 'hide'](); + }, + + calcSize: function() { + return this.target.getBoundingClientRect()[this.dimension] + 'px'; + }, + + getComputedSize: function() { + return getComputedStyle(this.target)[this.dimension]; + }, + + show: function() { + this.toggleClosedClass(false); + // for initial update, skip the expanding animation to optimize + // performance e.g. skip calcSize + if (!this.afterInitialUpdate) { + this.transitionEnd(); + return; + } + if (!this.fixedSize) { + this.updateSize('auto', null); + var s = this.calcSize(); + this.updateSize(0, null); + } + this.async(function() { + this.updateSize(this.size || s, this.duration, true); + }); + }, + + hide: function() { + // don't need to do anything if it's already hidden + if (this.hasClosedClass && !this.fixedSize) { + return; + } + if (this.fixedSize) { + // save the size before hiding it + this.size = this.getComputedSize(); + } else { + this.updateSize(this.calcSize(), null); + } + this.async(function() { + this.updateSize(0, this.duration); + }); + } + + }); + diff --git a/third_party/polymer/components-chromium/core-collapse/core-collapse.css b/third_party/polymer/components-chromium/core-collapse/core-collapse.css new file mode 100644 index 0000000..5e946ff --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/core-collapse.css @@ -0,0 +1,16 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +html /deep/ core-collapse { + display: block; +} + +html /deep/ .core-collapse-closed { + display: none; +} diff --git a/third_party/polymer/components-chromium/core-collapse/core-collapse.html b/third_party/polymer/components-chromium/core-collapse/core-collapse.html new file mode 100644 index 0000000..83bbf99 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/core-collapse.html @@ -0,0 +1,42 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-collapse` creates a collapsible block of content. By default, the content +will be collapsed. Use `opened` to show/hide the content. + + <button on-click="{{toggle}}">toggle collapse</button> + + <core-collapse id="collapse"> + ... + </core-collapse> + + ... + + toggle: function() { + this.$.collapse.toggle(); + } + +@group Polymer Core Elements +@element core-collapse +--> + +<link rel="import" href="../polymer/polymer.html"> + +<link rel="stylesheet" href="core-collapse.css" shim-shadowdom=""> + +<polymer-element name="core-collapse" attributes="target horizontal opened duration fixedSize" assetpath=""> +<template> + + <content></content> + +</template> + +</polymer-element> +<script src="core-collapse-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-collapse/demo.html b/third_party/polymer/components-chromium/core-collapse/demo.html new file mode 100644 index 0000000..8aec94d --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/demo.html @@ -0,0 +1,84 @@ +<!doctype html> +<html> +<head> + + <title>core-collapse</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-collapse.html"> + + <style> + body { + overflow: auto; + margin: 8px 24px; + } + + + .box { + background: #eee; + } + + .content { + margin: 10px; + } + + section { + padding: 10px; + } + + </style> + +</head> +<body unresolved> + + <section style="background: steelblue;"> + + <button onclick="document.querySelector('#collapse1').toggle()">toggle collapse</button> + + <core-collapse id="collapse1" fixedSize class="box" style="height: 300px;"> + <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> + </core-collapse> + + </section> + + <section style="background: seagreen;"> + + <button onclick="document.querySelector('#collapse2').toggle()">toggle collapse</button> + + <core-collapse id="collapse2" class="box"> + + <div class="content">Coercuit iunctarum vix sic aberant spisso imagine litem cetera nubes ambitae tanta usu circumfuso fulminibus umentia rectumque iuga pluviaque meis semina regat ne campoque meis coeperunt nix cura iunctarum ligavit: secant ventos seductaque permisit sic iunctarum locoque his coeptis tum terras animalia recepta aethera cornua invasit tollere videre tonitrua humanas otia tuba alta dissociata sanctius adsiduis inclusum caesa ita onus sine pluviaque litem manebat fixo extendi ubi inposuit cum sublime membra undas orba forma deducite aethera turba coercuit retinebat obliquis bracchia nisi mentisque origine peregrinum manebat</div> + + <section style="background: lightgreen;"> + + <button onclick="document.querySelector('#collapse3').toggle()">toggle collapse</button> + + <core-collapse id="collapse3" class="box" opened> + + <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> + + <section style="background: #00FF99;"> + + <button onclick="document.querySelector('#collapse4').toggle()">toggle collapse</button> + + <core-collapse id="collapse4" class="box"> + + <div class="content">Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem</div> + + </core-collapse> + + </section> + + </core-collapse> + + </section> + + <div class="content">Obstabatque cingebant nitidis rapidisque cepit moderantum discordia habentia frigore solidumque fert inter caecoque sine coeperunt corpore quarum fluminaque coercuit vultus animal austro quem os sectamque animus origo solidumque quoque melioris adspirate recepta utramque rapidisque caelumque orba unus pluviaque erant mutastis gravitate illic quisque alta calidis speciem mixtam ante contraria duae</div> + + </core-collapse> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-collapse/index.html b/third_party/polymer/components-chromium/core-collapse/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-collapse/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-component-page/.bower.json b/third_party/polymer/components-chromium/core-component-page/.bower.json new file mode 100644 index 0000000..379aab3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-component-page", + "private": true, + "dependencies": { + "platform": "Polymer/platform#>=0.3.0 <1.0.0", + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-component-page", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "87617aa1282994eecf5f1f57ef149155ed96f7f1" + }, + "_source": "git://github.com/Polymer/core-component-page.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-component-page" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-component-page/README.md b/third_party/polymer/components-chromium/core-component-page/README.md new file mode 100644 index 0000000..7cb18ec --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/README.md @@ -0,0 +1,6 @@ +core-component-page +=================== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-component-page) for more information. + +Note: this is the vulcanized version of [`core-component-page-dev`](https://github.com/Polymer/core-component-page-dev) (the source). diff --git a/third_party/polymer/components-chromium/core-component-page/bowager-logo.png b/third_party/polymer/components-chromium/core-component-page/bowager-logo.png Binary files differnew file mode 100644 index 0000000..76be9fb --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/bowager-logo.png diff --git a/third_party/polymer/components-chromium/core-component-page/bower.json b/third_party/polymer/components-chromium/core-component-page/bower.json new file mode 100644 index 0000000..541607b --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-component-page", + "private": true, + "dependencies": { + "platform": "Polymer/platform#>=0.3.0 <1.0.0", + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-component-page/core-component-page-extracted.js b/third_party/polymer/components-chromium/core-component-page/core-component-page-extracted.js new file mode 100644 index 0000000..fe36fb7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/core-component-page-extracted.js @@ -0,0 +1,4698 @@ + + + (function() { + + Polymer('core-layout', { + + isContainer: false, + /** + * Controls if the element lays out vertically or not. + * + * @attribute vertical + * @type boolean + * @default false + */ + vertical: false, + /** + * Controls how the items are aligned in the main-axis direction. For + * example for a horizontal layout, this controls how each item is aligned + * horizontally. + * + * @attribute justify + * @type string start|center|end|between + * @default '' + */ + justify: '', + /** + * Controls how the items are aligned in cross-axis direction. For + * example for a horizontal layout, this controls how each item is aligned + * vertically. + * + * @attribute align + * @type string start|center|end + * @default '' + */ + align: '', + /** + * Controls whether or not the items layout in reverse order. + * + * @attribute reverse + * @type boolean + * @default false + */ + reverse: false, + layoutPrefix: 'core-', + + // NOTE: include template so that styles are loaded, but remove + // so that we can decide dynamically what part to include + registerCallback: function(polymerElement) { + var template = polymerElement.querySelector('template'); + this.styles = template.content.querySelectorAll('style').array(); + this.styles.forEach(function(s) { + s.removeAttribute('no-shim'); + }) + }, + + fetchTemplate: function() { + return null; + }, + + attached: function() { + this.installScopeStyle(this.styles[0]); + if (this.children.length) { + this.isContainer = true; + } + var container = this.isContainer ? this : this.parentNode; + // detect if laying out a shadowRoot host. + var forHost = container instanceof ShadowRoot; + if (forHost) { + this.installScopeStyle(this.styles[1], 'host'); + container = container.host || document.body; + } + this.layoutContainer = container; + }, + + detached: function() { + this.layoutContainer = null; + }, + + layoutContainerChanged: function(old) { + this.style.display = this.layoutContainer === this ? null : 'none'; + this.verticalChanged(); + this.alignChanged(); + this.justifyChanged(); + }, + + setLayoutClass: function(prefix, old, newValue) { + if (this.layoutContainer) { + prefix = this.layoutPrefix + prefix; + if (old) { + this.layoutContainer.classList.remove(prefix + old); + } + if (newValue) { + this.layoutContainer.classList.add(prefix + newValue); + } + } + }, + + verticalChanged: function(old) { + old = old ? 'v' : 'h'; + var vertical = this.vertical ? 'v' : 'h'; + this.setLayoutClass('', old, vertical); + }, + + alignChanged: function(old) { + this.setLayoutClass('align-', old, this.align); + }, + + justifyChanged: function(old) { + this.setLayoutClass('justify-', old, this.justify); + }, + + reverseChanged: function(old) { + old = old ? 'reverse' : ''; + var newValue = this.reverse ? 'reverse' : ''; + this.setLayoutClass('', old, newValue); + } + + }); + + })(); + ; + + + (function() { + + var SKIP_ID = 'meta'; + var metaData = {}, metaArray = {}; + + Polymer('core-meta', { + + /** + * The type of meta-data. All meta-data with the same type with be + * stored together. + * + * @attribute type + * @type string + * @default 'default' + */ + type: 'default', + + alwaysPrepare: true, + + ready: function() { + this.register(this.id); + }, + + get metaArray() { + var t = this.type; + if (!metaArray[t]) { + metaArray[t] = []; + } + return metaArray[t]; + }, + + get metaData() { + var t = this.type; + if (!metaData[t]) { + metaData[t] = {}; + } + return metaData[t]; + }, + + register: function(id, old) { + if (id && id !== SKIP_ID) { + this.unregister(this, old); + this.metaData[id] = this; + this.metaArray.push(this); + } + }, + + unregister: function(meta, id) { + delete this.metaData[id || meta.id]; + var i = this.metaArray.indexOf(meta); + if (i >= 0) { + this.metaArray.splice(i, 1); + } + }, + + /** + * Returns a list of all meta-data elements with the same type. + * + * @attribute list + * @type array + * @default [] + */ + get list() { + return this.metaArray; + }, + + /** + * Retrieves meta-data by ID. + * + * @method byId + * @param {String} id The ID of the meta-data to be returned. + * @returns Returns meta-data. + */ + byId: function(id) { + return this.metaData[id]; + } + + }); + + })(); + +; + + + Polymer('core-iconset', { + + /** + * The URL of the iconset image. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * The width of the iconset image. This must only be specified if the + * icons are arranged into separate rows inside the image. + * + * @attribute width + * @type number + * @default 0 + */ + width: 0, + + /** + * A space separated list of names corresponding to icons in the iconset + * image file. This list must be ordered the same as the icon images + * in the image file. + * + * @attribute icons + * @type string + * @default '' + */ + icons: '', + + /** + * The size of an individual icon. Note that icons must be square. + * + * @attribute iconSize + * @type number + * @default 24 + */ + iconSize: 24, + + /** + * The horizontal offset of the icon images in the inconset src image. + * This is typically used if the image resource contains additional images + * beside those intended for the iconset. + * + * @attribute offsetX + * @type number + * @default 0 + */ + offsetX: 0, + /** + * The vertical offset of the icon images in the inconset src image. + * This is typically used if the image resource contains additional images + * beside those intended for the iconset. + * + * @attribute offsetY + * @type number + * @default 0 + */ + offsetY: 0, + type: 'iconset', + + created: function() { + this.iconMap = {}; + this.iconNames = []; + this.themes = {}; + }, + + ready: function() { + // TODO(sorvell): ensure iconset's src is always relative to the main + // document + if (this.src && (this.ownerDocument !== document)) { + this.src = this.resolvePath(this.src, this.ownerDocument.baseURI); + } + this.super(); + this.updateThemes(); + }, + + iconsChanged: function() { + var ox = this.offsetX; + var oy = this.offsetY; + this.icons && this.icons.split(/\s+/g).forEach(function(name, i) { + this.iconNames.push(name); + this.iconMap[name] = { + offsetX: ox, + offsetY: oy + } + if (ox + this.iconSize < this.width) { + ox += this.iconSize; + } else { + ox = this.offsetX; + oy += this.iconSize; + } + }, this); + }, + + updateThemes: function() { + var ts = this.querySelectorAll('property[theme]'); + ts && ts.array().forEach(function(t) { + this.themes[t.getAttribute('theme')] = { + offsetX: parseInt(t.getAttribute('offsetX')) || 0, + offsetY: parseInt(t.getAttribute('offsetY')) || 0 + }; + }, this); + }, + + // TODO(ffu): support retrived by index e.g. getOffset(10); + /** + * Returns an object containing `offsetX` and `offsetY` properties which + * specify the pixel locaion in the iconset's src file for the given + * `icon` and `theme`. It's uncommon to call this method. It is useful, + * for example, to manually position a css backgroundImage to the proper + * offset. It's more common to use the `applyIcon` method. + * + * @method getOffset + * @param {String|Number} icon The name of the icon or the index of the + * icon within in the icon image. + * @param {String} theme The name of the theme. + * @returns {Object} An object specifying the offset of the given icon + * within the icon resource file; `offsetX` is the horizontal offset and + * `offsetY` is the vertical offset. Both values are in pixel units. + */ + getOffset: function(icon, theme) { + var i = this.iconMap[icon]; + if (!i) { + var n = this.iconNames[Number(icon)]; + i = this.iconMap[n]; + } + var t = this.themes[theme]; + if (i && t) { + return { + offsetX: i.offsetX + t.offsetX, + offsetY: i.offsetY + t.offsetY + } + } + return i; + }, + + /** + * Applies an icon to the given element as a css background image. This + * method does not size the element, and it's often necessary to set + * the element's height and width so that the background image is visible. + * + * @method applyIcon + * @param {Element} element The element to which the background is + * applied. + * @param {String|Number} icon The name or index of the icon to apply. + * @param {String} theme (optional) The name of the theme for the icon. + * @param {Number} scale (optional, defaults to 1) A scaling factor + * with which the icon can be magnified. + */ + applyIcon: function(element, icon, scale) { + var offset = this.getOffset(icon); + scale = scale || 1; + if (element && offset) { + var style = element.style; + style.backgroundImage = 'url(' + this.src + ')'; + style.backgroundPosition = (-offset.offsetX * scale + 'px') + + ' ' + (-offset.offsetY * scale + 'px'); + style.backgroundSize = scale === 1 ? 'auto' : + this.width * scale + 'px'; + } + } + + }); + + ; + + + Polymer('core-iconset-svg', { + + + /** + * The size of an individual icon. Note that icons must be square. + * + * @attribute iconSize + * @type number + * @default 24 + */ + iconSize: 24, + type: 'iconset', + + created: function() { + this._icons = {}; + }, + + ready: function() { + this.super(); + this.updateIcons(); + }, + + iconById: function(id) { + return this._icons[id] || (this._icons[id] = this.querySelector('#' + id)); + }, + + cloneIcon: function(id) { + var icon = this.iconById(id); + if (icon) { + var content = icon.cloneNode(true); + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('viewBox', '0 0 ' + this.iconSize + ' ' + + this.iconSize); + // NOTE(dfreedm): work around https://crbug.com/370136 + svg.style.pointerEvents = 'none'; + svg.appendChild(content); + return svg; + } + }, + + get iconNames() { + if (!this._iconNames) { + this._iconNames = this.findIconNames(); + } + return this._iconNames; + }, + + findIconNames: function() { + var icons = this.querySelectorAll('[id]').array(); + if (icons.length) { + return icons.map(function(n){ return n.id }); + } + }, + + /** + * Applies an icon to the given element. The svg icon is added to the + * element's shadowRoot if one exists or directly to itself. + * + * @method applyIcon + * @param {Element} element The element to which the icon is + * applied. + * @param {String|Number} icon The name the icon to apply. + */ + applyIcon: function(element, icon, scale) { + var root = element.shadowRoot || element; + // remove old + var old = root.querySelector('svg'); + if (old) { + old.remove(); + } + // install new + var svg = this.cloneIcon(icon); + if (!svg) { + return; + } + var size = scale * this.iconSize; + if (size) { + svg.style.height = svg.style.width = size + 'px'; + } else { + svg.setAttribute('height', '100%'); + svg.setAttribute('width', '100%'); + svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); + } + svg.style.display = 'block'; + root.insertBefore(svg, root.firstElementChild); + }, + + /** + * Tell users of the iconset, that the set has loaded. + * This finds all elements matching the selector argument and calls + * the method argument on them. + * @method updateIcons + * @param selector {string} css selector to identify iconset users, + * defaults to '[icon]' + * @param method {string} method to call on found elements, + * defaults to 'updateIcon' + */ + updateIcons: function(selector, method) { + selector = selector || '[icon]'; + method = method || 'updateIcon'; + var deep = window.ShadowDOMPolyfill ? '' : 'html /deep/ '; + var i$ = document.querySelectorAll(deep + selector); + for (var i=0, e; e=i$[i]; i++) { + if (e[method]) { + e[method].call(e); + } + } + } + + + }); + + ; + +(function() { + + // mono-state + var meta; + + Polymer('core-icon', { + + /** + * The URL of an image for the icon. If the src property is specified, + * the icon property should not be. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * Specifies the size of the icon in pixel units. + * + * @attribute size + * @type string + * @default 24 + */ + size: 24, + + /** + * Specifies the icon name or index in the set of icons available in + * the icon's icon set. If the icon property is specified, + * the src property should not be. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '', + + observe: { + 'size icon': 'updateIcon' + }, + + defaultIconset: 'icons', + + ready: function() { + if (!meta) { + meta = document.createElement('core-iconset'); + } + this.updateIcon(); + }, + + srcChanged: function() { + this.style.backgroundImage = 'url(' + this.src + ')'; + this.style.backgroundPosition = 'center'; + this.style.backgroundSize = this.size + 'px ' + this.size + 'px'; + }, + + getIconset: function(name) { + return meta.byId(name || this.defaultIconset); + }, + + updateIcon: function() { + if (this.size) { + this.style.width = this.style.height = this.size + 'px'; + } + if (this.icon) { + var parts = String(this.icon).split(':'); + var icon = parts.pop(); + if (icon) { + var set = this.getIconset(parts.pop()); + if (set) { + set.applyIcon(this, icon, this.size / set.iconSize); + } + } + } + } + + }); + +})(); +; + + + Polymer('core-icon-button', { + + /** + * The URL of an image for the icon. Should not use `icon` property + * if you are using this property. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * If true, border is placed around the button to indicate it's + * active state. + * + * @attribute active + * @type boolean + * @default false + */ + active: false, + + /** + * Specifies the icon name or index in the set of icons available in + * the icon set. Should not use `src` property if you are using this + * property. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '', + + activeChanged: function() { + this.classList.toggle('selected', this.active); + } + + }); + + ; +Polymer('core-toolbar');; + + + Polymer('core-header-panel', { + + publish: { + /** + * Controls header and scrolling behavior. Options are + * `standard`, `seamed`, `waterfall`, `waterfall-tall`, + * `waterfall-medium-tall`, `scroll` and `cover`. + * Default is `standard`. + * + * `standard`: The header is a step above the panel. The header will consume the + * panel at the point of entry, preventing it from passing through to the + * opposite side. + * + * `seamed`: The header is presented as seamed with the panel. + * + * `waterfall`: Similar to standard mode, but header is initially presented as + * seamed with panel, but then separates to form the step. + * + * `waterfall-tall`: The header is initially taller (`tall` class is added to + * the header). As the user scrolls, the header separates (forming an edge) + * while condensing (`tall` class is removed from the header). + * + * `scroll`: The header keeps its seam with the panel, and is pushed off screen. + * + * `cover`: The panel covers the whole `core-header-panel` including the + * header. This allows user to style the panel in such a way that the panel is + * partially covering the header. + * + * <style> + * core-header-panel[mode=cover]::shadow #mainContainer { + * left: 80px; + * } + * .content { + * margin: 60px 60px 60px 0; + * } + * </style> + * + * <core-header-panel mode="cover"> + * <core-appbar class="tall"> + * <core-icon-button icon="menu"></core-icon-button> + * </core-appbar> + * <div class="content"></div> + * </core-header-panel> + * + * @attribute mode + * @type string + * @default '' + */ + mode: {value: '', reflect: true}, + + /** + * The class used in waterfall-tall mode. Change this if the header + * accepts a different class for toggling height, e.g. "medium-tall" + * + * @attribute tallClass + * @type string + * @default 'tall' + */ + tallClass: 'tall', + + /** + * If true, the drop-shadow is always shown no matter what mode is set to. + * + * @attribute shadow + * @type boolean + * @default false + */ + shadow: false, + }, + + domReady: function() { + this.async('scroll'); + }, + + modeChanged: function() { + this.scroll(); + }, + + get header() { + return this.$.headerContent.getDistributedNodes()[0]; + }, + + scroll: function() { + var shadowMode = {'waterfall': 1, 'waterfall-tall': 1}; + var noShadow = {'seamed': 1, 'cover': 1, 'scroll': 1}; + var tallMode = {'waterfall-tall': 1}; + + var main = this.$.mainContainer; + var header = this.header; + + var sTop = main.scrollTop; + var atTop = sTop === 0; + + if (header) { + this.$.dropShadow.classList.toggle('hidden', !this.shadow && + (atTop && shadowMode[this.mode] || noShadow[this.mode])); + + if (tallMode[this.mode]) { + header.classList.toggle(this.tallClass, atTop); + } + + header.classList.toggle('animate', tallMode[this.mode]); + } + } + + }); + +; +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + */ + +;(function() { + +/** + * Block-Level Grammar + */ + +var block = { + newline: /^\n+/, + code: /^( {4}[^\n]+\n*)+/, + fences: noop, + hr: /^( *[-*_]){3,} *(?:\n+|$)/, + heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, + nptable: noop, + lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, + blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, + list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, + html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/, + def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, + table: noop, + paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, + text: /^[^\n]+/ +}; + +block.bullet = /(?:[*+-]|\d+\.)/; +block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; +block.item = replace(block.item, 'gm') + (/bull/g, block.bullet) + (); + +block.list = replace(block.list) + (/bull/g, block.bullet) + ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') + ('def', '\\n+(?=' + block.def.source + ')') + (); + +block.blockquote = replace(block.blockquote) + ('def', block.def) + (); + +block._tag = '(?!(?:' + + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' + + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' + + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; + +block.html = replace(block.html) + ('comment', /<!--[\s\S]*?-->/) + ('closed', /<(tag)[\s\S]+?<\/\1>/) + ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/) + (/tag/g, block._tag) + (); + +block.paragraph = replace(block.paragraph) + ('hr', block.hr) + ('heading', block.heading) + ('lheading', block.lheading) + ('blockquote', block.blockquote) + ('tag', '<' + block._tag) + ('def', block.def) + (); + +/** + * Normal Block Grammar + */ + +block.normal = merge({}, block); + +/** + * GFM Block Grammar + */ + +block.gfm = merge({}, block.normal, { + fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, + paragraph: /^/ +}); + +block.gfm.paragraph = replace(block.paragraph) + ('(?!', '(?!' + + block.gfm.fences.source.replace('\\1', '\\2') + '|' + + block.list.source.replace('\\1', '\\3') + '|') + (); + +/** + * GFM + Tables Block Grammar + */ + +block.tables = merge({}, block.gfm, { + nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, + table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ +}); + +/** + * Block Lexer + */ + +function Lexer(options) { + this.tokens = []; + this.tokens.links = {}; + this.options = options || marked.defaults; + this.rules = block.normal; + + if (this.options.gfm) { + if (this.options.tables) { + this.rules = block.tables; + } else { + this.rules = block.gfm; + } + } +} + +/** + * Expose Block Rules + */ + +Lexer.rules = block; + +/** + * Static Lex Method + */ + +Lexer.lex = function(src, options) { + var lexer = new Lexer(options); + return lexer.lex(src); +}; + +/** + * Preprocessing + */ + +Lexer.prototype.lex = function(src) { + src = src + .replace(/\r\n|\r/g, '\n') + .replace(/\t/g, ' ') + .replace(/\u00a0/g, ' ') + .replace(/\u2424/g, '\n'); + + return this.token(src, true); +}; + +/** + * Lexing + */ + +Lexer.prototype.token = function(src, top, bq) { + var src = src.replace(/^ +$/gm, '') + , next + , loose + , cap + , bull + , b + , item + , space + , i + , l; + + while (src) { + // newline + if (cap = this.rules.newline.exec(src)) { + src = src.substring(cap[0].length); + if (cap[0].length > 1) { + this.tokens.push({ + type: 'space' + }); + } + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + cap = cap[0].replace(/^ {4}/gm, ''); + this.tokens.push({ + type: 'code', + text: !this.options.pedantic + ? cap.replace(/\n+$/, '') + : cap + }); + continue; + } + + // fences (gfm) + if (cap = this.rules.fences.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'code', + lang: cap[2], + text: cap[3] + }); + continue; + } + + // heading + if (cap = this.rules.heading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[1].length, + text: cap[2] + }); + continue; + } + + // table no leading pipe (gfm) + if (top && (cap = this.rules.nptable.exec(src))) { + src = src.substring(cap[0].length); + + item = { + type: 'table', + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3].replace(/\n$/, '').split('\n') + }; + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = item.cells[i].split(/ *\| */); + } + + this.tokens.push(item); + + continue; + } + + // lheading + if (cap = this.rules.lheading.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'heading', + depth: cap[2] === '=' ? 1 : 2, + text: cap[1] + }); + continue; + } + + // hr + if (cap = this.rules.hr.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'hr' + }); + continue; + } + + // blockquote + if (cap = this.rules.blockquote.exec(src)) { + src = src.substring(cap[0].length); + + this.tokens.push({ + type: 'blockquote_start' + }); + + cap = cap[0].replace(/^ *> ?/gm, ''); + + // Pass `top` to keep the current + // "toplevel" state. This is exactly + // how markdown.pl works. + this.token(cap, top, true); + + this.tokens.push({ + type: 'blockquote_end' + }); + + continue; + } + + // list + if (cap = this.rules.list.exec(src)) { + src = src.substring(cap[0].length); + bull = cap[2]; + + this.tokens.push({ + type: 'list_start', + ordered: bull.length > 1 + }); + + // Get each top-level item. + cap = cap[0].match(this.rules.item); + + next = false; + l = cap.length; + i = 0; + + for (; i < l; i++) { + item = cap[i]; + + // Remove the list item's bullet + // so it is seen as the next token. + space = item.length; + item = item.replace(/^ *([*+-]|\d+\.) +/, ''); + + // Outdent whatever the + // list item contains. Hacky. + if (~item.indexOf('\n ')) { + space -= item.length; + item = !this.options.pedantic + ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') + : item.replace(/^ {1,4}/gm, ''); + } + + // Determine whether the next list item belongs here. + // Backpedal if it does not belong in this list. + if (this.options.smartLists && i !== l - 1) { + b = block.bullet.exec(cap[i + 1])[0]; + if (bull !== b && !(bull.length > 1 && b.length > 1)) { + src = cap.slice(i + 1).join('\n') + src; + i = l - 1; + } + } + + // Determine whether item is loose or not. + // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ + // for discount behavior. + loose = next || /\n\n(?!\s*$)/.test(item); + if (i !== l - 1) { + next = item.charAt(item.length - 1) === '\n'; + if (!loose) loose = next; + } + + this.tokens.push({ + type: loose + ? 'loose_item_start' + : 'list_item_start' + }); + + // Recurse. + this.token(item, false, bq); + + this.tokens.push({ + type: 'list_item_end' + }); + } + + this.tokens.push({ + type: 'list_end' + }); + + continue; + } + + // html + if (cap = this.rules.html.exec(src)) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: this.options.sanitize + ? 'paragraph' + : 'html', + pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', + text: cap[0] + }); + continue; + } + + // def + if ((!bq && top) && (cap = this.rules.def.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.links[cap[1].toLowerCase()] = { + href: cap[2], + title: cap[3] + }; + continue; + } + + // table (gfm) + if (top && (cap = this.rules.table.exec(src))) { + src = src.substring(cap[0].length); + + item = { + type: 'table', + header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), + align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), + cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') + }; + + for (i = 0; i < item.align.length; i++) { + if (/^ *-+: *$/.test(item.align[i])) { + item.align[i] = 'right'; + } else if (/^ *:-+: *$/.test(item.align[i])) { + item.align[i] = 'center'; + } else if (/^ *:-+ *$/.test(item.align[i])) { + item.align[i] = 'left'; + } else { + item.align[i] = null; + } + } + + for (i = 0; i < item.cells.length; i++) { + item.cells[i] = item.cells[i] + .replace(/^ *\| *| *\| *$/g, '') + .split(/ *\| */); + } + + this.tokens.push(item); + + continue; + } + + // top-level paragraph + if (top && (cap = this.rules.paragraph.exec(src))) { + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'paragraph', + text: cap[1].charAt(cap[1].length - 1) === '\n' + ? cap[1].slice(0, -1) + : cap[1] + }); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + // Top-level should never reach here. + src = src.substring(cap[0].length); + this.tokens.push({ + type: 'text', + text: cap[0] + }); + continue; + } + + if (src) { + throw new + Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return this.tokens; +}; + +/** + * Inline-Level Grammar + */ + +var inline = { + escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, + autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, + url: noop, + tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, + link: /^!?\[(inside)\]\(href\)/, + reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, + nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, + strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, + em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, + code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, + br: /^ {2,}\n(?!\s*$)/, + del: noop, + text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/ +}; + +inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/; +inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/; + +inline.link = replace(inline.link) + ('inside', inline._inside) + ('href', inline._href) + (); + +inline.reflink = replace(inline.reflink) + ('inside', inline._inside) + (); + +/** + * Normal Inline Grammar + */ + +inline.normal = merge({}, inline); + +/** + * Pedantic Inline Grammar + */ + +inline.pedantic = merge({}, inline.normal, { + strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, + em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ +}); + +/** + * GFM Inline Grammar + */ + +inline.gfm = merge({}, inline.normal, { + escape: replace(inline.escape)('])', '~|])')(), + url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, + del: /^~~(?=\S)([\s\S]*?\S)~~/, + text: replace(inline.text) + (']|', '~]|') + ('|', '|https?://|') + () +}); + +/** + * GFM + Line Breaks Inline Grammar + */ + +inline.breaks = merge({}, inline.gfm, { + br: replace(inline.br)('{2,}', '*')(), + text: replace(inline.gfm.text)('{2,}', '*')() +}); + +/** + * Inline Lexer & Compiler + */ + +function InlineLexer(links, options) { + this.options = options || marked.defaults; + this.links = links; + this.rules = inline.normal; + this.renderer = this.options.renderer || new Renderer; + this.renderer.options = this.options; + + if (!this.links) { + throw new + Error('Tokens array requires a `links` property.'); + } + + if (this.options.gfm) { + if (this.options.breaks) { + this.rules = inline.breaks; + } else { + this.rules = inline.gfm; + } + } else if (this.options.pedantic) { + this.rules = inline.pedantic; + } +} + +/** + * Expose Inline Rules + */ + +InlineLexer.rules = inline; + +/** + * Static Lexing/Compiling Method + */ + +InlineLexer.output = function(src, links, options) { + var inline = new InlineLexer(links, options); + return inline.output(src); +}; + +/** + * Lexing/Compiling + */ + +InlineLexer.prototype.output = function(src) { + var out = '' + , link + , text + , href + , cap; + + while (src) { + // escape + if (cap = this.rules.escape.exec(src)) { + src = src.substring(cap[0].length); + out += cap[1]; + continue; + } + + // autolink + if (cap = this.rules.autolink.exec(src)) { + src = src.substring(cap[0].length); + if (cap[2] === '@') { + text = cap[1].charAt(6) === ':' + ? this.mangle(cap[1].substring(7)) + : this.mangle(cap[1]); + href = this.mangle('mailto:') + text; + } else { + text = escape(cap[1]); + href = text; + } + out += this.renderer.link(href, null, text); + continue; + } + + // url (gfm) + if (!this.inLink && (cap = this.rules.url.exec(src))) { + src = src.substring(cap[0].length); + text = escape(cap[1]); + href = text; + out += this.renderer.link(href, null, text); + continue; + } + + // tag + if (cap = this.rules.tag.exec(src)) { + if (!this.inLink && /^<a /i.test(cap[0])) { + this.inLink = true; + } else if (this.inLink && /^<\/a>/i.test(cap[0])) { + this.inLink = false; + } + src = src.substring(cap[0].length); + out += this.options.sanitize + ? escape(cap[0]) + : cap[0]; + continue; + } + + // link + if (cap = this.rules.link.exec(src)) { + src = src.substring(cap[0].length); + this.inLink = true; + out += this.outputLink(cap, { + href: cap[2], + title: cap[3] + }); + this.inLink = false; + continue; + } + + // reflink, nolink + if ((cap = this.rules.reflink.exec(src)) + || (cap = this.rules.nolink.exec(src))) { + src = src.substring(cap[0].length); + link = (cap[2] || cap[1]).replace(/\s+/g, ' '); + link = this.links[link.toLowerCase()]; + if (!link || !link.href) { + out += cap[0].charAt(0); + src = cap[0].substring(1) + src; + continue; + } + this.inLink = true; + out += this.outputLink(cap, link); + this.inLink = false; + continue; + } + + // strong + if (cap = this.rules.strong.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.strong(this.output(cap[2] || cap[1])); + continue; + } + + // em + if (cap = this.rules.em.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.em(this.output(cap[2] || cap[1])); + continue; + } + + // code + if (cap = this.rules.code.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.codespan(escape(cap[2], true)); + continue; + } + + // br + if (cap = this.rules.br.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.br(); + continue; + } + + // del (gfm) + if (cap = this.rules.del.exec(src)) { + src = src.substring(cap[0].length); + out += this.renderer.del(this.output(cap[1])); + continue; + } + + // text + if (cap = this.rules.text.exec(src)) { + src = src.substring(cap[0].length); + out += escape(this.smartypants(cap[0])); + continue; + } + + if (src) { + throw new + Error('Infinite loop on byte: ' + src.charCodeAt(0)); + } + } + + return out; +}; + +/** + * Compile Link + */ + +InlineLexer.prototype.outputLink = function(cap, link) { + var href = escape(link.href) + , title = link.title ? escape(link.title) : null; + + return cap[0].charAt(0) !== '!' + ? this.renderer.link(href, title, this.output(cap[1])) + : this.renderer.image(href, title, escape(cap[1])); +}; + +/** + * Smartypants Transformations + */ + +InlineLexer.prototype.smartypants = function(text) { + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/--/g, '\u2014') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); +}; + +/** + * Mangle Links + */ + +InlineLexer.prototype.mangle = function(text) { + var out = '' + , l = text.length + , i = 0 + , ch; + + for (; i < l; i++) { + ch = text.charCodeAt(i); + if (Math.random() > 0.5) { + ch = 'x' + ch.toString(16); + } + out += '&#' + ch + ';'; + } + + return out; +}; + +/** + * Renderer + */ + +function Renderer(options) { + this.options = options || {}; +} + +Renderer.prototype.code = function(code, lang, escaped) { + if (this.options.highlight) { + var out = this.options.highlight(code, lang); + if (out != null && out !== code) { + escaped = true; + code = out; + } + } + + if (!lang) { + return '<pre><code>' + + (escaped ? code : escape(code, true)) + + '\n</code></pre>'; + } + + return '<pre><code class="' + + this.options.langPrefix + + escape(lang, true) + + '">' + + (escaped ? code : escape(code, true)) + + '\n</code></pre>\n'; +}; + +Renderer.prototype.blockquote = function(quote) { + return '<blockquote>\n' + quote + '</blockquote>\n'; +}; + +Renderer.prototype.html = function(html) { + return html; +}; + +Renderer.prototype.heading = function(text, level, raw) { + return '<h' + + level + + ' id="' + + this.options.headerPrefix + + raw.toLowerCase().replace(/[^\w]+/g, '-') + + '">' + + text + + '</h' + + level + + '>\n'; +}; + +Renderer.prototype.hr = function() { + return this.options.xhtml ? '<hr/>\n' : '<hr>\n'; +}; + +Renderer.prototype.list = function(body, ordered) { + var type = ordered ? 'ol' : 'ul'; + return '<' + type + '>\n' + body + '</' + type + '>\n'; +}; + +Renderer.prototype.listitem = function(text) { + return '<li>' + text + '</li>\n'; +}; + +Renderer.prototype.paragraph = function(text) { + return '<p>' + text + '</p>\n'; +}; + +Renderer.prototype.table = function(header, body) { + return '<table>\n' + + '<thead>\n' + + header + + '</thead>\n' + + '<tbody>\n' + + body + + '</tbody>\n' + + '</table>\n'; +}; + +Renderer.prototype.tablerow = function(content) { + return '<tr>\n' + content + '</tr>\n'; +}; + +Renderer.prototype.tablecell = function(content, flags) { + var type = flags.header ? 'th' : 'td'; + var tag = flags.align + ? '<' + type + ' style="text-align:' + flags.align + '">' + : '<' + type + '>'; + return tag + content + '</' + type + '>\n'; +}; + +// span level renderer +Renderer.prototype.strong = function(text) { + return '<strong>' + text + '</strong>'; +}; + +Renderer.prototype.em = function(text) { + return '<em>' + text + '</em>'; +}; + +Renderer.prototype.codespan = function(text) { + return '<code>' + text + '</code>'; +}; + +Renderer.prototype.br = function() { + return this.options.xhtml ? '<br/>' : '<br>'; +}; + +Renderer.prototype.del = function(text) { + return '<del>' + text + '</del>'; +}; + +Renderer.prototype.link = function(href, title, text) { + if (this.options.sanitize) { + try { + var prot = decodeURIComponent(unescape(href)) + .replace(/[^\w:]/g, '') + .toLowerCase(); + } catch (e) { + return ''; + } + if (prot.indexOf('javascript:') === 0) { + return ''; + } + } + var out = '<a href="' + href + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += '>' + text + '</a>'; + return out; +}; + +Renderer.prototype.image = function(href, title, text) { + var out = '<img src="' + href + '" alt="' + text + '"'; + if (title) { + out += ' title="' + title + '"'; + } + out += this.options.xhtml ? '/>' : '>'; + return out; +}; + +/** + * Parsing & Compiling + */ + +function Parser(options) { + this.tokens = []; + this.token = null; + this.options = options || marked.defaults; + this.options.renderer = this.options.renderer || new Renderer; + this.renderer = this.options.renderer; + this.renderer.options = this.options; +} + +/** + * Static Parse Method + */ + +Parser.parse = function(src, options, renderer) { + var parser = new Parser(options, renderer); + return parser.parse(src); +}; + +/** + * Parse Loop + */ + +Parser.prototype.parse = function(src) { + this.inline = new InlineLexer(src.links, this.options, this.renderer); + this.tokens = src.reverse(); + + var out = ''; + while (this.next()) { + out += this.tok(); + } + + return out; +}; + +/** + * Next Token + */ + +Parser.prototype.next = function() { + return this.token = this.tokens.pop(); +}; + +/** + * Preview Next Token + */ + +Parser.prototype.peek = function() { + return this.tokens[this.tokens.length - 1] || 0; +}; + +/** + * Parse Text Tokens + */ + +Parser.prototype.parseText = function() { + var body = this.token.text; + + while (this.peek().type === 'text') { + body += '\n' + this.next().text; + } + + return this.inline.output(body); +}; + +/** + * Parse Current Token + */ + +Parser.prototype.tok = function() { + switch (this.token.type) { + case 'space': { + return ''; + } + case 'hr': { + return this.renderer.hr(); + } + case 'heading': { + return this.renderer.heading( + this.inline.output(this.token.text), + this.token.depth, + this.token.text); + } + case 'code': { + return this.renderer.code(this.token.text, + this.token.lang, + this.token.escaped); + } + case 'table': { + var header = '' + , body = '' + , i + , row + , cell + , flags + , j; + + // header + cell = ''; + for (i = 0; i < this.token.header.length; i++) { + flags = { header: true, align: this.token.align[i] }; + cell += this.renderer.tablecell( + this.inline.output(this.token.header[i]), + { header: true, align: this.token.align[i] } + ); + } + header += this.renderer.tablerow(cell); + + for (i = 0; i < this.token.cells.length; i++) { + row = this.token.cells[i]; + + cell = ''; + for (j = 0; j < row.length; j++) { + cell += this.renderer.tablecell( + this.inline.output(row[j]), + { header: false, align: this.token.align[j] } + ); + } + + body += this.renderer.tablerow(cell); + } + return this.renderer.table(header, body); + } + case 'blockquote_start': { + var body = ''; + + while (this.next().type !== 'blockquote_end') { + body += this.tok(); + } + + return this.renderer.blockquote(body); + } + case 'list_start': { + var body = '' + , ordered = this.token.ordered; + + while (this.next().type !== 'list_end') { + body += this.tok(); + } + + return this.renderer.list(body, ordered); + } + case 'list_item_start': { + var body = ''; + + while (this.next().type !== 'list_item_end') { + body += this.token.type === 'text' + ? this.parseText() + : this.tok(); + } + + return this.renderer.listitem(body); + } + case 'loose_item_start': { + var body = ''; + + while (this.next().type !== 'list_item_end') { + body += this.tok(); + } + + return this.renderer.listitem(body); + } + case 'html': { + var html = !this.token.pre && !this.options.pedantic + ? this.inline.output(this.token.text) + : this.token.text; + return this.renderer.html(html); + } + case 'paragraph': { + return this.renderer.paragraph(this.inline.output(this.token.text)); + } + case 'text': { + return this.renderer.paragraph(this.parseText()); + } + } +}; + +/** + * Helpers + */ + +function escape(html, encode) { + return html + .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') + .replace(/</g, '<') + .replace(/>/g, '>') + .replace(/"/g, '"') + .replace(/'/g, '''); +} + +function unescape(html) { + return html.replace(/&([#\w]+);/g, function(_, n) { + n = n.toLowerCase(); + if (n === 'colon') return ':'; + if (n.charAt(0) === '#') { + return n.charAt(1) === 'x' + ? String.fromCharCode(parseInt(n.substring(2), 16)) + : String.fromCharCode(+n.substring(1)); + } + return ''; + }); +} + +function replace(regex, opt) { + regex = regex.source; + opt = opt || ''; + return function self(name, val) { + if (!name) return new RegExp(regex, opt); + val = val.source || val; + val = val.replace(/(^|[^\[])\^/g, '$1'); + regex = regex.replace(name, val); + return self; + }; +} + +function noop() {} +noop.exec = noop; + +function merge(obj) { + var i = 1 + , target + , key; + + for (; i < arguments.length; i++) { + target = arguments[i]; + for (key in target) { + if (Object.prototype.hasOwnProperty.call(target, key)) { + obj[key] = target[key]; + } + } + } + + return obj; +} + + +/** + * Marked + */ + +function marked(src, opt, callback) { + if (callback || typeof opt === 'function') { + if (!callback) { + callback = opt; + opt = null; + } + + opt = merge({}, marked.defaults, opt || {}); + + var highlight = opt.highlight + , tokens + , pending + , i = 0; + + try { + tokens = Lexer.lex(src, opt) + } catch (e) { + return callback(e); + } + + pending = tokens.length; + + var done = function() { + var out, err; + + try { + out = Parser.parse(tokens, opt); + } catch (e) { + err = e; + } + + opt.highlight = highlight; + + return err + ? callback(err) + : callback(null, out); + }; + + if (!highlight || highlight.length < 3) { + return done(); + } + + delete opt.highlight; + + if (!pending) return done(); + + for (; i < tokens.length; i++) { + (function(token) { + if (token.type !== 'code') { + return --pending || done(); + } + return highlight(token.text, token.lang, function(err, code) { + if (code == null || code === token.text) { + return --pending || done(); + } + token.text = code; + token.escaped = true; + --pending || done(); + }); + })(tokens[i]); + } + + return; + } + try { + if (opt) opt = merge({}, marked.defaults, opt); + return Parser.parse(Lexer.lex(src, opt), opt); + } catch (e) { + e.message += '\nPlease report this to https://github.com/chjj/marked.'; + if ((opt || marked.defaults).silent) { + return '<p>An error occured:</p><pre>' + + escape(e.message + '', true) + + '</pre>'; + } + throw e; + } +} + +/** + * Options + */ + +marked.options = +marked.setOptions = function(opt) { + merge(marked.defaults, opt); + return marked; +}; + +marked.defaults = { + gfm: true, + tables: true, + breaks: false, + pedantic: false, + sanitize: false, + smartLists: false, + silent: false, + highlight: null, + langPrefix: 'lang-', + smartypants: false, + headerPrefix: '', + renderer: new Renderer, + xhtml: false +}; + +/** + * Expose + */ + +marked.Parser = Parser; +marked.parser = Parser.parse; + +marked.Renderer = Renderer; + +marked.Lexer = Lexer; +marked.lexer = Lexer.lex; + +marked.InlineLexer = InlineLexer; +marked.inlineLexer = InlineLexer.output; + +marked.parse = marked; + +if (typeof exports === 'object') { + module.exports = marked; +} else if (typeof define === 'function' && define.amd) { + define(function() { return marked; }); +} else { + this.marked = marked; +} + +}).call(function() { + return this || (typeof window !== 'undefined' ? window : global); +}()); +; + + + Polymer('marked-element', { + + text: '', + + attached: function() { + marked.setOptions({ + highlight: this.highlight.bind(this) + }); + if (!this.text) { + this.text = this.innerHTML; + } + }, + + textChanged: function () { + this.innerHTML = marked(this.text); + }, + + highlight: function(code, lang) { + var event = this.fire('marked-js-highlight', {code: code, lang: lang}); + return event.detail.code || code; + } + + }); + +; +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + * + * <p> + * For a fairly comprehensive set of languages see the + * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a> + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + * <p> + * Usage: <ol> + * <li> include this source file in an html page via + * {@code <script type="text/javascript" src="/path/to/prettify.js"><\/script>} + * <li> define style rules. See the example page for examples. + * <li> mark the {@code <pre>} and {@code <code>} tags in your source with + * {@code class=prettyprint.} + * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty + * printer needs to do more substantial DOM manipulations to support that, so + * some css styles may not be preserved. + * </ol> + * That's it. I wanted to keep the API as simple as possible, so there's no + * need to specify which language the code is in, but if you wish, you can add + * another class to the {@code <pre>} or {@code <code>} element to specify the + * language, as in {@code <pre class="prettyprint lang-java">}. Any class that + * starts with "lang-" followed by a file extension, specifies the file type. + * See the "lang-*.js" files in this directory for code that implements + * per-language file handlers. + * <p> + * Change log:<br> + * cbeust, 2006/08/22 + * <blockquote> + * Java annotations (start with "@") are now captured as literals ("lit") + * </blockquote> + * @requires console + */ + +// JSLint declarations +/*global console, document, navigator, setTimeout, window, define */ + +/** + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with + * UI events. + * If set to {@code false}, {@code prettyPrint()} is synchronous. + */ +window['PR_SHOULD_USE_CONTINUATION'] = true; + +/** + * Find all the {@code <pre>} and {@code <code>} tags in the DOM with + * {@code class=prettyprint} and prettify them. + * + * @param {Function?} opt_whenDone if specified, called when the last entry + * has been finished. + */ +var prettyPrintOne; +/** + * Pretty print a chunk of code. + * + * @param {string} sourceCodeHtml code as html + * @return {string} code as html, but prettier + */ +var prettyPrint; + + +(function () { + var win = window; + // Keyword lists for various languages. + // We use things that coerce to strings to make them compact when minified + // and to defeat aggressive optimizers that fold large string constants. + var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"]; + var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + + "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," + + "static,struct,switch,typedef,union,unsigned,void,volatile"]; + var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," + + "new,operator,private,protected,public,this,throw,true,try,typeof"]; + var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," + + "concept,concept_map,const_cast,constexpr,decltype," + + "dynamic_cast,explicit,export,friend,inline,late_check," + + "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," + + "template,typeid,typename,using,virtual,where"]; + var JAVA_KEYWORDS = [COMMON_KEYWORDS, + "abstract,boolean,byte,extends,final,finally,implements,import," + + "instanceof,null,native,package,strictfp,super,synchronized,throws," + + "transient"]; + var CSHARP_KEYWORDS = [JAVA_KEYWORDS, + "as,base,by,checked,decimal,delegate,descending,dynamic,event," + + "fixed,foreach,from,group,implicit,in,interface,internal,into,is,let," + + "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," + + "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," + + "var,virtual,where"]; + var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," + + "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," + + "throw,true,try,unless,until,when,while,yes"; + var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS, + "debugger,eval,export,function,get,null,set,undefined,var,with," + + "Infinity,NaN"]; + var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," + + "goto,if,import,last,local,my,next,no,our,print,package,redo,require," + + "sub,undef,unless,until,use,wantarray,while,BEGIN,END"; + var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," + + "elif,except,exec,finally,from,global,import,in,is,lambda," + + "nonlocal,not,or,pass,print,raise,try,with,yield," + + "False,True,None"]; + var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," + + "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," + + "rescue,retry,self,super,then,true,undef,unless,until,when,yield," + + "BEGIN,END"]; + var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," + + "function,in,local,set,then,until"]; + var ALL_KEYWORDS = [ + CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS + + PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS]; + var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/; + + // token style names. correspond to css classes + /** + * token style for a string literal + * @const + */ + var PR_STRING = 'str'; + /** + * token style for a keyword + * @const + */ + var PR_KEYWORD = 'kwd'; + /** + * token style for a comment + * @const + */ + var PR_COMMENT = 'com'; + /** + * token style for a type + * @const + */ + var PR_TYPE = 'typ'; + /** + * token style for a literal value. e.g. 1, null, true. + * @const + */ + var PR_LITERAL = 'lit'; + /** + * token style for a punctuation string. + * @const + */ + var PR_PUNCTUATION = 'pun'; + /** + * token style for plain text. + * @const + */ + var PR_PLAIN = 'pln'; + + /** + * token style for an sgml tag. + * @const + */ + var PR_TAG = 'tag'; + /** + * token style for a markup declaration such as a DOCTYPE. + * @const + */ + var PR_DECLARATION = 'dec'; + /** + * token style for embedded source. + * @const + */ + var PR_SOURCE = 'src'; + /** + * token style for an sgml attribute name. + * @const + */ + var PR_ATTRIB_NAME = 'atn'; + /** + * token style for an sgml attribute value. + * @const + */ + var PR_ATTRIB_VALUE = 'atv'; + + /** + * A class that indicates a section of markup that is not code, e.g. to allow + * embedding of line numbers within code listings. + * @const + */ + var PR_NOCODE = 'nocode'; + + + +/** + * A set of tokens that can precede a regular expression literal in + * javascript + * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html + * has the full list, but I've removed ones that might be problematic when + * seen in languages that don't support regular expression literals. + * + * <p>Specifically, I've removed any keywords that can't precede a regexp + * literal in a syntactically legal javascript program, and I've removed the + * "in" keyword since it's not a keyword in many languages, and might be used + * as a count of inches. + * + * <p>The link above does not accurately describe EcmaScript rules since + * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works + * very well in practice. + * + * @private + * @const + */ +var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*'; + +// CAVEAT: this does not properly handle the case where a regular +// expression immediately follows another since a regular expression may +// have flags for case-sensitivity and the like. Having regexp tokens +// adjacent is not valid in any language I'm aware of, so I'm punting. +// TODO: maybe style special characters inside a regexp as punctuation. + + + /** + * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally + * matches the union of the sets of strings matched by the input RegExp. + * Since it matches globally, if the input strings have a start-of-input + * anchor (/^.../), it is ignored for the purposes of unioning. + * @param {Array.<RegExp>} regexs non multiline, non-global regexs. + * @return {RegExp} a global regex. + */ + function combinePrefixPatterns(regexs) { + var capturedGroupIndex = 0; + + var needToFoldCase = false; + var ignoreCase = false; + for (var i = 0, n = regexs.length; i < n; ++i) { + var regex = regexs[i]; + if (regex.ignoreCase) { + ignoreCase = true; + } else if (/[a-z]/i.test(regex.source.replace( + /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) { + needToFoldCase = true; + ignoreCase = false; + break; + } + } + + var escapeCharToCodeUnit = { + 'b': 8, + 't': 9, + 'n': 0xa, + 'v': 0xb, + 'f': 0xc, + 'r': 0xd + }; + + function decodeEscape(charsetPart) { + var cc0 = charsetPart.charCodeAt(0); + if (cc0 !== 92 /* \\ */) { + return cc0; + } + var c1 = charsetPart.charAt(1); + cc0 = escapeCharToCodeUnit[c1]; + if (cc0) { + return cc0; + } else if ('0' <= c1 && c1 <= '7') { + return parseInt(charsetPart.substring(1), 8); + } else if (c1 === 'u' || c1 === 'x') { + return parseInt(charsetPart.substring(2), 16); + } else { + return charsetPart.charCodeAt(1); + } + } + + function encodeEscape(charCode) { + if (charCode < 0x20) { + return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16); + } + var ch = String.fromCharCode(charCode); + return (ch === '\\' || ch === '-' || ch === ']' || ch === '^') + ? "\\" + ch : ch; + } + + function caseFoldCharset(charSet) { + var charsetParts = charSet.substring(1, charSet.length - 1).match( + new RegExp( + '\\\\u[0-9A-Fa-f]{4}' + + '|\\\\x[0-9A-Fa-f]{2}' + + '|\\\\[0-3][0-7]{0,2}' + + '|\\\\[0-7]{1,2}' + + '|\\\\[\\s\\S]' + + '|-' + + '|[^-\\\\]', + 'g')); + var ranges = []; + var inverse = charsetParts[0] === '^'; + + var out = ['[']; + if (inverse) { out.push('^'); } + + for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) { + var p = charsetParts[i]; + if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups. + out.push(p); + } else { + var start = decodeEscape(p); + var end; + if (i + 2 < n && '-' === charsetParts[i + 1]) { + end = decodeEscape(charsetParts[i + 2]); + i += 2; + } else { + end = start; + } + ranges.push([start, end]); + // If the range might intersect letters, then expand it. + // This case handling is too simplistic. + // It does not deal with non-latin case folding. + // It works for latin source code identifiers though. + if (!(end < 65 || start > 122)) { + if (!(end < 65 || start > 90)) { + ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]); + } + if (!(end < 97 || start > 122)) { + ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]); + } + } + } + } + + // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]] + // -> [[1, 12], [14, 14], [16, 17]] + ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); }); + var consolidatedRanges = []; + var lastRange = []; + for (var i = 0; i < ranges.length; ++i) { + var range = ranges[i]; + if (range[0] <= lastRange[1] + 1) { + lastRange[1] = Math.max(lastRange[1], range[1]); + } else { + consolidatedRanges.push(lastRange = range); + } + } + + for (var i = 0; i < consolidatedRanges.length; ++i) { + var range = consolidatedRanges[i]; + out.push(encodeEscape(range[0])); + if (range[1] > range[0]) { + if (range[1] + 1 > range[0]) { out.push('-'); } + out.push(encodeEscape(range[1])); + } + } + out.push(']'); + return out.join(''); + } + + function allowAnywhereFoldCaseAndRenumberGroups(regex) { + // Split into character sets, escape sequences, punctuation strings + // like ('(', '(?:', ')', '^'), and runs of characters that do not + // include any of the above. + var parts = regex.source.match( + new RegExp( + '(?:' + + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set + + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape + + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape + + '|\\\\[0-9]+' // a back-reference or octal escape + + '|\\\\[^ux0-9]' // other escape sequence + + '|\\(\\?[:!=]' // start of a non-capturing group + + '|[\\(\\)\\^]' // start/end of a group, or line start + + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters + + ')', + 'g')); + var n = parts.length; + + // Maps captured group numbers to the number they will occupy in + // the output or to -1 if that has not been determined, or to + // undefined if they need not be capturing in the output. + var capturedGroups = []; + + // Walk over and identify back references to build the capturedGroups + // mapping. + for (var i = 0, groupIndex = 0; i < n; ++i) { + var p = parts[i]; + if (p === '(') { + // groups are 1-indexed, so max group index is count of '(' + ++groupIndex; + } else if ('\\' === p.charAt(0)) { + var decimalValue = +p.substring(1); + if (decimalValue) { + if (decimalValue <= groupIndex) { + capturedGroups[decimalValue] = -1; + } else { + // Replace with an unambiguous escape sequence so that + // an octal escape sequence does not turn into a backreference + // to a capturing group from an earlier regex. + parts[i] = encodeEscape(decimalValue); + } + } + } + } + + // Renumber groups and reduce capturing groups to non-capturing groups + // where possible. + for (var i = 1; i < capturedGroups.length; ++i) { + if (-1 === capturedGroups[i]) { + capturedGroups[i] = ++capturedGroupIndex; + } + } + for (var i = 0, groupIndex = 0; i < n; ++i) { + var p = parts[i]; + if (p === '(') { + ++groupIndex; + if (!capturedGroups[groupIndex]) { + parts[i] = '(?:'; + } + } else if ('\\' === p.charAt(0)) { + var decimalValue = +p.substring(1); + if (decimalValue && decimalValue <= groupIndex) { + parts[i] = '\\' + capturedGroups[decimalValue]; + } + } + } + + // Remove any prefix anchors so that the output will match anywhere. + // ^^ really does mean an anchored match though. + for (var i = 0; i < n; ++i) { + if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; } + } + + // Expand letters to groups to handle mixing of case-sensitive and + // case-insensitive patterns if necessary. + if (regex.ignoreCase && needToFoldCase) { + for (var i = 0; i < n; ++i) { + var p = parts[i]; + var ch0 = p.charAt(0); + if (p.length >= 2 && ch0 === '[') { + parts[i] = caseFoldCharset(p); + } else if (ch0 !== '\\') { + // TODO: handle letters in numeric escapes. + parts[i] = p.replace( + /[a-zA-Z]/g, + function (ch) { + var cc = ch.charCodeAt(0); + return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']'; + }); + } + } + } + + return parts.join(''); + } + + var rewritten = []; + for (var i = 0, n = regexs.length; i < n; ++i) { + var regex = regexs[i]; + if (regex.global || regex.multiline) { throw new Error('' + regex); } + rewritten.push( + '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')'); + } + + return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g'); + } + + + /** + * Split markup into a string of source code and an array mapping ranges in + * that string to the text nodes in which they appear. + * + * <p> + * The HTML DOM structure:</p> + * <pre> + * (Element "p" + * (Element "b" + * (Text "print ")) ; #1 + * (Text "'Hello '") ; #2 + * (Element "br") ; #3 + * (Text " + 'World';")) ; #4 + * </pre> + * <p> + * corresponds to the HTML + * {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p> + * + * <p> + * It will produce the output:</p> + * <pre> + * { + * sourceCode: "print 'Hello '\n + 'World';", + * // 1 2 + * // 012345678901234 5678901234567 + * spans: [0, #1, 6, #2, 14, #3, 15, #4] + * } + * </pre> + * <p> + * where #1 is a reference to the {@code "print "} text node above, and so + * on for the other text nodes. + * </p> + * + * <p> + * The {@code} spans array is an array of pairs. Even elements are the start + * indices of substrings, and odd elements are the text nodes (or BR elements) + * that contain the text for those substrings. + * Substrings continue until the next index or the end of the source. + * </p> + * + * @param {Node} node an HTML DOM subtree containing source-code. + * @param {boolean} isPreformatted true if white-space in text nodes should + * be considered significant. + * @return {Object} source code and the text nodes in which they occur. + */ + function extractSourceSpans(node, isPreformatted) { + var nocode = /(?:^|\s)nocode(?:\s|$)/; + + var chunks = []; + var length = 0; + var spans = []; + var k = 0; + + function walk(node) { + switch (node.nodeType) { + case 1: // Element + if (nocode.test(node.className)) { return; } + for (var child = node.firstChild; child; child = child.nextSibling) { + walk(child); + } + var nodeName = node.nodeName.toLowerCase(); + if ('br' === nodeName || 'li' === nodeName) { + chunks[k] = '\n'; + spans[k << 1] = length++; + spans[(k++ << 1) | 1] = node; + } + break; + case 3: case 4: // Text + var text = node.nodeValue; + if (text.length) { + if (!isPreformatted) { + text = text.replace(/[ \t\r\n]+/g, ' '); + } else { + text = text.replace(/\r\n?/g, '\n'); // Normalize newlines. + } + // TODO: handle tabs here? + chunks[k] = text; + spans[k << 1] = length; + length += text.length; + spans[(k++ << 1) | 1] = node; + } + break; + } + } + + walk(node); + + return { + sourceCode: chunks.join('').replace(/\n$/, ''), + spans: spans + }; + } + + + /** + * Apply the given language handler to sourceCode and add the resulting + * decorations to out. + * @param {number} basePos the index of sourceCode within the chunk of source + * whose decorations are already present on out. + */ + function appendDecorations(basePos, sourceCode, langHandler, out) { + if (!sourceCode) { return; } + var job = { + sourceCode: sourceCode, + basePos: basePos + }; + langHandler(job); + out.push.apply(out, job.decorations); + } + + var notWs = /\S/; + + /** + * Given an element, if it contains only one child element and any text nodes + * it contains contain only space characters, return the sole child element. + * Otherwise returns undefined. + * <p> + * This is meant to return the CODE element in {@code <pre><code ...>} when + * there is a single child element that contains all the non-space textual + * content, but not to return anything where there are multiple child elements + * as in {@code <pre><code>...</code><code>...</code></pre>} or when there + * is textual content. + */ + function childContentWrapper(element) { + var wrapper = undefined; + for (var c = element.firstChild; c; c = c.nextSibling) { + var type = c.nodeType; + wrapper = (type === 1) // Element Node + ? (wrapper ? element : c) + : (type === 3) // Text Node + ? (notWs.test(c.nodeValue) ? element : wrapper) + : wrapper; + } + return wrapper === element ? undefined : wrapper; + } + + /** Given triples of [style, pattern, context] returns a lexing function, + * The lexing function interprets the patterns to find token boundaries and + * returns a decoration list of the form + * [index_0, style_0, index_1, style_1, ..., index_n, style_n] + * where index_n is an index into the sourceCode, and style_n is a style + * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to + * all characters in sourceCode[index_n-1:index_n]. + * + * The stylePatterns is a list whose elements have the form + * [style : string, pattern : RegExp, DEPRECATED, shortcut : string]. + * + * Style is a style constant like PR_PLAIN, or can be a string of the + * form 'lang-FOO', where FOO is a language extension describing the + * language of the portion of the token in $1 after pattern executes. + * E.g., if style is 'lang-lisp', and group 1 contains the text + * '(hello (world))', then that portion of the token will be passed to the + * registered lisp handler for formatting. + * The text before and after group 1 will be restyled using this decorator + * so decorators should take care that this doesn't result in infinite + * recursion. For example, the HTML lexer rule for SCRIPT elements looks + * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match + * '<script>foo()<\/script>', which would cause the current decorator to + * be called with '<script>' which would not match the same rule since + * group 1 must not be empty, so it would be instead styled as PR_TAG by + * the generic tag rule. The handler registered for the 'js' extension would + * then be called with 'foo()', and finally, the current decorator would + * be called with '<\/script>' which would not match the original rule and + * so the generic tag rule would identify it as a tag. + * + * Pattern must only match prefixes, and if it matches a prefix, then that + * match is considered a token with the same style. + * + * Context is applied to the last non-whitespace, non-comment token + * recognized. + * + * Shortcut is an optional string of characters, any of which, if the first + * character, gurantee that this pattern and only this pattern matches. + * + * @param {Array} shortcutStylePatterns patterns that always start with + * a known character. Must have a shortcut string. + * @param {Array} fallthroughStylePatterns patterns that will be tried in + * order if the shortcut ones fail. May have shortcuts. + * + * @return {function (Object)} a + * function that takes source code and returns a list of decorations. + */ + function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) { + var shortcuts = {}; + var tokenizer; + (function () { + var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns); + var allRegexs = []; + var regexKeys = {}; + for (var i = 0, n = allPatterns.length; i < n; ++i) { + var patternParts = allPatterns[i]; + var shortcutChars = patternParts[3]; + if (shortcutChars) { + for (var c = shortcutChars.length; --c >= 0;) { + shortcuts[shortcutChars.charAt(c)] = patternParts; + } + } + var regex = patternParts[1]; + var k = '' + regex; + if (!regexKeys.hasOwnProperty(k)) { + allRegexs.push(regex); + regexKeys[k] = null; + } + } + allRegexs.push(/[\0-\uffff]/); + tokenizer = combinePrefixPatterns(allRegexs); + })(); + + var nPatterns = fallthroughStylePatterns.length; + + /** + * Lexes job.sourceCode and produces an output array job.decorations of + * style classes preceded by the position at which they start in + * job.sourceCode in order. + * + * @param {Object} job an object like <pre>{ + * sourceCode: {string} sourceText plain text, + * basePos: {int} position of job.sourceCode in the larger chunk of + * sourceCode. + * }</pre> + */ + var decorate = function (job) { + var sourceCode = job.sourceCode, basePos = job.basePos; + /** Even entries are positions in source in ascending order. Odd enties + * are style markers (e.g., PR_COMMENT) that run from that position until + * the end. + * @type {Array.<number|string>} + */ + var decorations = [basePos, PR_PLAIN]; + var pos = 0; // index into sourceCode + var tokens = sourceCode.match(tokenizer) || []; + var styleCache = {}; + + for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) { + var token = tokens[ti]; + var style = styleCache[token]; + var match = void 0; + + var isEmbedded; + if (typeof style === 'string') { + isEmbedded = false; + } else { + var patternParts = shortcuts[token.charAt(0)]; + if (patternParts) { + match = token.match(patternParts[1]); + style = patternParts[0]; + } else { + for (var i = 0; i < nPatterns; ++i) { + patternParts = fallthroughStylePatterns[i]; + match = token.match(patternParts[1]); + if (match) { + style = patternParts[0]; + break; + } + } + + if (!match) { // make sure that we make progress + style = PR_PLAIN; + } + } + + isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5); + if (isEmbedded && !(match && typeof match[1] === 'string')) { + isEmbedded = false; + style = PR_SOURCE; + } + + if (!isEmbedded) { styleCache[token] = style; } + } + + var tokenStart = pos; + pos += token.length; + + if (!isEmbedded) { + decorations.push(basePos + tokenStart, style); + } else { // Treat group 1 as an embedded block of source code. + var embeddedSource = match[1]; + var embeddedSourceStart = token.indexOf(embeddedSource); + var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length; + if (match[2]) { + // If embeddedSource can be blank, then it would match at the + // beginning which would cause us to infinitely recurse on the + // entire token, so we catch the right context in match[2]. + embeddedSourceEnd = token.length - match[2].length; + embeddedSourceStart = embeddedSourceEnd - embeddedSource.length; + } + var lang = style.substring(5); + // Decorate the left of the embedded source + appendDecorations( + basePos + tokenStart, + token.substring(0, embeddedSourceStart), + decorate, decorations); + // Decorate the embedded source + appendDecorations( + basePos + tokenStart + embeddedSourceStart, + embeddedSource, + langHandlerForExtension(lang, embeddedSource), + decorations); + // Decorate the right of the embedded section + appendDecorations( + basePos + tokenStart + embeddedSourceEnd, + token.substring(embeddedSourceEnd), + decorate, decorations); + } + } + job.decorations = decorations; + }; + return decorate; + } + + /** returns a function that produces a list of decorations from source text. + * + * This code treats ", ', and ` as string delimiters, and \ as a string + * escape. It does not recognize perl's qq() style strings. + * It has no special handling for double delimiter escapes as in basic, or + * the tripled delimiters used in python, but should work on those regardless + * although in those cases a single string literal may be broken up into + * multiple adjacent string literals. + * + * It recognizes C, C++, and shell style comments. + * + * @param {Object} options a set of optional parameters. + * @return {function (Object)} a function that examines the source code + * in the input job and builds the decoration list. + */ + function sourceDecorator(options) { + var shortcutStylePatterns = [], fallthroughStylePatterns = []; + if (options['tripleQuotedStrings']) { + // '''multi-line-string''', 'single-line-string', and double-quoted + shortcutStylePatterns.push( + [PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, + null, '\'"']); + } else if (options['multiLineStrings']) { + // 'multi-line-string', "multi-line-string" + shortcutStylePatterns.push( + [PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, + null, '\'"`']); + } else { + // 'single-line-string', "single-line-string" + shortcutStylePatterns.push( + [PR_STRING, + /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, + null, '"\'']); + } + if (options['verbatimStrings']) { + // verbatim-string-literal production from the C# grammar. See issue 93. + fallthroughStylePatterns.push( + [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]); + } + var hc = options['hashComments']; + if (hc) { + if (options['cStyleComments']) { + if (hc > 1) { // multiline hash comments + shortcutStylePatterns.push( + [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']); + } else { + // Stop C preprocessor declarations at an unclosed open comment + shortcutStylePatterns.push( + [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/, + null, '#']); + } + // #include <stdio.h> + fallthroughStylePatterns.push( + [PR_STRING, + /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/, + null]); + } else { + shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']); + } + } + if (options['cStyleComments']) { + fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]); + fallthroughStylePatterns.push( + [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]); + } + if (options['regexLiterals']) { + /** + * @const + */ + var REGEX_LITERAL = ( + // A regular expression literal starts with a slash that is + // not followed by * or / so that it is not confused with + // comments. + '/(?=[^/*])' + // and then contains any number of raw characters, + + '(?:[^/\\x5B\\x5C]' + // escape sequences (\x5C), + + '|\\x5C[\\s\\S]' + // or non-nesting character sets (\x5B\x5D); + + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+' + // finally closed by a /. + + '/'); + fallthroughStylePatterns.push( + ['lang-regex', + new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')') + ]); + } + + var types = options['types']; + if (types) { + fallthroughStylePatterns.push([PR_TYPE, types]); + } + + var keywords = ("" + options['keywords']).replace(/^ | $/g, ''); + if (keywords.length) { + fallthroughStylePatterns.push( + [PR_KEYWORD, + new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'), + null]); + } + + shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']); + + var punctuation = + // The Bash man page says + + // A word is a sequence of characters considered as a single + // unit by GRUB. Words are separated by metacharacters, + // which are the following plus space, tab, and newline: { } + // | & $ ; < > + // ... + + // A word beginning with # causes that word and all remaining + // characters on that line to be ignored. + + // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a + // comment but empirically + // $ echo {#} + // {#} + // $ echo \$# + // $# + // $ echo }# + // }# + + // so /(?:^|[|&;<>\s])/ is more appropriate. + + // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3 + // suggests that this definition is compatible with a + // default mode that tries to use a single token definition + // to recognize both bash/python style comments and C + // preprocessor directives. + + // This definition of punctuation does not include # in the list of + // follow-on exclusions, so # will not be broken before if preceeded + // by a punctuation character. We could try to exclude # after + // [|&;<>] but that doesn't seem to cause many major problems. + // If that does turn out to be a problem, we should change the below + // when hc is truthy to include # in the run of punctuation characters + // only when not followint [|&;<>]. + /^.[^\s\w\.$@\'\"\`\/\\]*/; + + fallthroughStylePatterns.push( + // TODO(mikesamuel): recognize non-latin letters and numerals in idents + [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null], + [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], + [PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null], + [PR_LITERAL, + new RegExp( + '^(?:' + // A hex number + + '0x[a-f0-9]+' + // or an octal or decimal number, + + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)' + // possibly in scientific notation + + '(?:e[+\\-]?\\d+)?' + + ')' + // with an optional modifier like UL for unsigned long + + '[a-z]*', 'i'), + null, '0123456789'], + // Don't treat escaped quotes in bash as starting strings. See issue 144. + [PR_PLAIN, /^\\[\s\S]?/, null], + [PR_PUNCTUATION, punctuation, null]); + + return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns); + } + + var decorateSource = sourceDecorator({ + 'keywords': ALL_KEYWORDS, + 'hashComments': true, + 'cStyleComments': true, + 'multiLineStrings': true, + 'regexLiterals': true + }); + + /** + * Given a DOM subtree, wraps it in a list, and puts each line into its own + * list item. + * + * @param {Node} node modified in place. Its content is pulled into an + * HTMLOListElement, and each line is moved into a separate list item. + * This requires cloning elements, so the input might not have unique + * IDs after numbering. + * @param {boolean} isPreformatted true iff white-space in text nodes should + * be treated as significant. + */ + function numberLines(node, opt_startLineNum, isPreformatted) { + var nocode = /(?:^|\s)nocode(?:\s|$)/; + var lineBreak = /\r\n?|\n/; + + var document = node.ownerDocument; + + var li = document.createElement('li'); + while (node.firstChild) { + li.appendChild(node.firstChild); + } + // An array of lines. We split below, so this is initialized to one + // un-split line. + var listItems = [li]; + + function walk(node) { + switch (node.nodeType) { + case 1: // Element + if (nocode.test(node.className)) { break; } + if ('br' === node.nodeName) { + breakAfter(node); + // Discard the <BR> since it is now flush against a </LI>. + if (node.parentNode) { + node.parentNode.removeChild(node); + } + } else { + for (var child = node.firstChild; child; child = child.nextSibling) { + walk(child); + } + } + break; + case 3: case 4: // Text + if (isPreformatted) { + var text = node.nodeValue; + var match = text.match(lineBreak); + if (match) { + var firstLine = text.substring(0, match.index); + node.nodeValue = firstLine; + var tail = text.substring(match.index + match[0].length); + if (tail) { + var parent = node.parentNode; + parent.insertBefore( + document.createTextNode(tail), node.nextSibling); + } + breakAfter(node); + if (!firstLine) { + // Don't leave blank text nodes in the DOM. + node.parentNode.removeChild(node); + } + } + } + break; + } + } + + // Split a line after the given node. + function breakAfter(lineEndNode) { + // If there's nothing to the right, then we can skip ending the line + // here, and move root-wards since splitting just before an end-tag + // would require us to create a bunch of empty copies. + while (!lineEndNode.nextSibling) { + lineEndNode = lineEndNode.parentNode; + if (!lineEndNode) { return; } + } + + function breakLeftOf(limit, copy) { + // Clone shallowly if this node needs to be on both sides of the break. + var rightSide = copy ? limit.cloneNode(false) : limit; + var parent = limit.parentNode; + if (parent) { + // We clone the parent chain. + // This helps us resurrect important styling elements that cross lines. + // E.g. in <i>Foo<br>Bar</i> + // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>. + var parentClone = breakLeftOf(parent, 1); + // Move the clone and everything to the right of the original + // onto the cloned parent. + var next = limit.nextSibling; + parentClone.appendChild(rightSide); + for (var sibling = next; sibling; sibling = next) { + next = sibling.nextSibling; + parentClone.appendChild(sibling); + } + } + return rightSide; + } + + var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0); + + // Walk the parent chain until we reach an unattached LI. + for (var parent; + // Check nodeType since IE invents document fragments. + (parent = copiedListItem.parentNode) && parent.nodeType === 1;) { + copiedListItem = parent; + } + // Put it on the list of lines for later processing. + listItems.push(copiedListItem); + } + + // Split lines while there are lines left to split. + for (var i = 0; // Number of lines that have been split so far. + i < listItems.length; // length updated by breakAfter calls. + ++i) { + walk(listItems[i]); + } + + // Make sure numeric indices show correctly. + if (opt_startLineNum === (opt_startLineNum|0)) { + listItems[0].setAttribute('value', opt_startLineNum); + } + + var ol = document.createElement('ol'); + ol.className = 'linenums'; + var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0; + for (var i = 0, n = listItems.length; i < n; ++i) { + li = listItems[i]; + // Stick a class on the LIs so that stylesheets can + // color odd/even rows, or any other row pattern that + // is co-prime with 10. + li.className = 'L' + ((i + offset) % 10); + if (!li.firstChild) { + li.appendChild(document.createTextNode('\xA0')); + } + ol.appendChild(li); + } + + node.appendChild(ol); + } + + /** + * Breaks {@code job.sourceCode} around style boundaries in + * {@code job.decorations} and modifies {@code job.sourceNode} in place. + * @param {Object} job like <pre>{ + * sourceCode: {string} source as plain text, + * spans: {Array.<number|Node>} alternating span start indices into source + * and the text node or element (e.g. {@code <BR>}) corresponding to that + * span. + * decorations: {Array.<number|string} an array of style classes preceded + * by the position at which they start in job.sourceCode in order + * }</pre> + * @private + */ + function recombineTagsAndDecorations(job) { + var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent); + isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8; + var newlineRe = /\n/g; + + var source = job.sourceCode; + var sourceLength = source.length; + // Index into source after the last code-unit recombined. + var sourceIndex = 0; + + var spans = job.spans; + var nSpans = spans.length; + // Index into spans after the last span which ends at or before sourceIndex. + var spanIndex = 0; + + var decorations = job.decorations; + var nDecorations = decorations.length; + // Index into decorations after the last decoration which ends at or before + // sourceIndex. + var decorationIndex = 0; + + // Remove all zero-length decorations. + decorations[nDecorations] = sourceLength; + var decPos, i; + for (i = decPos = 0; i < nDecorations;) { + if (decorations[i] !== decorations[i + 2]) { + decorations[decPos++] = decorations[i++]; + decorations[decPos++] = decorations[i++]; + } else { + i += 2; + } + } + nDecorations = decPos; + + // Simplify decorations. + for (i = decPos = 0; i < nDecorations;) { + var startPos = decorations[i]; + // Conflate all adjacent decorations that use the same style. + var startDec = decorations[i + 1]; + var end = i + 2; + while (end + 2 <= nDecorations && decorations[end + 1] === startDec) { + end += 2; + } + decorations[decPos++] = startPos; + decorations[decPos++] = startDec; + i = end; + } + + nDecorations = decorations.length = decPos; + + var sourceNode = job.sourceNode; + var oldDisplay; + if (sourceNode) { + oldDisplay = sourceNode.style.display; + sourceNode.style.display = 'none'; + } + try { + var decoration = null; + while (spanIndex < nSpans) { + var spanStart = spans[spanIndex]; + var spanEnd = spans[spanIndex + 2] || sourceLength; + + var decEnd = decorations[decorationIndex + 2] || sourceLength; + + var end = Math.min(spanEnd, decEnd); + + var textNode = spans[spanIndex + 1]; + var styledText; + if (textNode.nodeType !== 1 // Don't muck with <BR>s or <LI>s + // Don't introduce spans around empty text nodes. + && (styledText = source.substring(sourceIndex, end))) { + // This may seem bizarre, and it is. Emitting LF on IE causes the + // code to display with spaces instead of line breaks. + // Emitting Windows standard issue linebreaks (CRLF) causes a blank + // space to appear at the beginning of every line but the first. + // Emitting an old Mac OS 9 line separator makes everything spiffy. + if (isIE8OrEarlier) { + styledText = styledText.replace(newlineRe, '\r'); + } + textNode.nodeValue = styledText; + var document = textNode.ownerDocument; + var span = document.createElement('span'); + span.className = decorations[decorationIndex + 1]; + var parentNode = textNode.parentNode; + parentNode.replaceChild(span, textNode); + span.appendChild(textNode); + if (sourceIndex < spanEnd) { // Split off a text node. + spans[spanIndex + 1] = textNode + // TODO: Possibly optimize by using '' if there's no flicker. + = document.createTextNode(source.substring(end, spanEnd)); + parentNode.insertBefore(textNode, span.nextSibling); + } + } + + sourceIndex = end; + + if (sourceIndex >= spanEnd) { + spanIndex += 2; + } + if (sourceIndex >= decEnd) { + decorationIndex += 2; + } + } + } finally { + if (sourceNode) { + sourceNode.style.display = oldDisplay; + } + } + } + + + /** Maps language-specific file extensions to handlers. */ + var langHandlerRegistry = {}; + /** Register a language handler for the given file extensions. + * @param {function (Object)} handler a function from source code to a list + * of decorations. Takes a single argument job which describes the + * state of the computation. The single parameter has the form + * {@code { + * sourceCode: {string} as plain text. + * decorations: {Array.<number|string>} an array of style classes + * preceded by the position at which they start in + * job.sourceCode in order. + * The language handler should assigned this field. + * basePos: {int} the position of source in the larger source chunk. + * All positions in the output decorations array are relative + * to the larger source chunk. + * } } + * @param {Array.<string>} fileExtensions + */ + function registerLangHandler(handler, fileExtensions) { + for (var i = fileExtensions.length; --i >= 0;) { + var ext = fileExtensions[i]; + if (!langHandlerRegistry.hasOwnProperty(ext)) { + langHandlerRegistry[ext] = handler; + } else if (win['console']) { + console['warn']('cannot override language handler %s', ext); + } + } + } + function langHandlerForExtension(extension, source) { + if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) { + // Treat it as markup if the first non whitespace character is a < and + // the last non-whitespace character is a >. + extension = /^\s*</.test(source) + ? 'default-markup' + : 'default-code'; + } + return langHandlerRegistry[extension]; + } + registerLangHandler(decorateSource, ['default-code']); + registerLangHandler( + createSimpleLexer( + [], + [ + [PR_PLAIN, /^[^<?]+/], + [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], + [PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], + // Unescaped content in an unknown language + ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/], + ['lang-', /^<%([\s\S]+?)(?:%>|$)/], + [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], + ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], + // Unescaped content in javascript. (Or possibly vbscript). + ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], + // Contains unescaped stylesheet content + ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], + ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i] + ]), + ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']); + registerLangHandler( + createSimpleLexer( + [ + [PR_PLAIN, /^[\s]+/, null, ' \t\r\n'], + [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\''] + ], + [ + [PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], + [PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], + ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], + [PR_PUNCTUATION, /^[=<>\/]+/], + ['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i], + ['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i], + ['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i], + ['lang-css', /^style\s*=\s*\"([^\"]+)\"/i], + ['lang-css', /^style\s*=\s*\'([^\']+)\'/i], + ['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i] + ]), + ['in.tag']); + registerLangHandler( + createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']); + registerLangHandler(sourceDecorator({ + 'keywords': CPP_KEYWORDS, + 'hashComments': true, + 'cStyleComments': true, + 'types': C_TYPES + }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']); + registerLangHandler(sourceDecorator({ + 'keywords': 'null,true,false' + }), ['json']); + registerLangHandler(sourceDecorator({ + 'keywords': CSHARP_KEYWORDS, + 'hashComments': true, + 'cStyleComments': true, + 'verbatimStrings': true, + 'types': C_TYPES + }), ['cs']); + registerLangHandler(sourceDecorator({ + 'keywords': JAVA_KEYWORDS, + 'cStyleComments': true + }), ['java']); + registerLangHandler(sourceDecorator({ + 'keywords': SH_KEYWORDS, + 'hashComments': true, + 'multiLineStrings': true + }), ['bsh', 'csh', 'sh']); + registerLangHandler(sourceDecorator({ + 'keywords': PYTHON_KEYWORDS, + 'hashComments': true, + 'multiLineStrings': true, + 'tripleQuotedStrings': true + }), ['cv', 'py']); + registerLangHandler(sourceDecorator({ + 'keywords': PERL_KEYWORDS, + 'hashComments': true, + 'multiLineStrings': true, + 'regexLiterals': true + }), ['perl', 'pl', 'pm']); + registerLangHandler(sourceDecorator({ + 'keywords': RUBY_KEYWORDS, + 'hashComments': true, + 'multiLineStrings': true, + 'regexLiterals': true + }), ['rb']); + registerLangHandler(sourceDecorator({ + 'keywords': JSCRIPT_KEYWORDS, + 'cStyleComments': true, + 'regexLiterals': true + }), ['js']); + registerLangHandler(sourceDecorator({ + 'keywords': COFFEE_KEYWORDS, + 'hashComments': 3, // ### style block comments + 'cStyleComments': true, + 'multilineStrings': true, + 'tripleQuotedStrings': true, + 'regexLiterals': true + }), ['coffee']); + registerLangHandler( + createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']); + + function applyDecorator(job) { + var opt_langExtension = job.langExtension; + + try { + // Extract tags, and convert the source code to plain text. + var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre); + /** Plain text. @type {string} */ + var source = sourceAndSpans.sourceCode; + job.sourceCode = source; + job.spans = sourceAndSpans.spans; + job.basePos = 0; + + // Apply the appropriate language handler + langHandlerForExtension(opt_langExtension, source)(job); + + // Integrate the decorations and tags back into the source code, + // modifying the sourceNode in place. + recombineTagsAndDecorations(job); + } catch (e) { + if (win['console']) { + console['log'](e && e['stack'] ? e['stack'] : e); + } + } + } + + /** + * @param sourceCodeHtml {string} The HTML to pretty print. + * @param opt_langExtension {string} The language name to use. + * Typically, a filename extension like 'cpp' or 'java'. + * @param opt_numberLines {number|boolean} True to number lines, + * or the 1-indexed number of the first line in sourceCodeHtml. + */ + function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) { + var container = document.createElement('pre'); + // This could cause images to load and onload listeners to fire. + // E.g. <img onerror="alert(1337)" src="nosuchimage.png">. + // We assume that the inner HTML is from a trusted source. + container.innerHTML = sourceCodeHtml; + if (opt_numberLines) { + numberLines(container, opt_numberLines, true); + } + + var job = { + langExtension: opt_langExtension, + numberLines: opt_numberLines, + sourceNode: container, + pre: 1 + }; + applyDecorator(job); + return container.innerHTML; + } + + function prettyPrint(opt_whenDone) { + function byTagName(tn) { return document.getElementsByTagName(tn); } + // fetch a list of nodes to rewrite + var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')]; + var elements = []; + for (var i = 0; i < codeSegments.length; ++i) { + for (var j = 0, n = codeSegments[i].length; j < n; ++j) { + elements.push(codeSegments[i][j]); + } + } + codeSegments = null; + + var clock = Date; + if (!clock['now']) { + clock = { 'now': function () { return +(new Date); } }; + } + + // The loop is broken into a series of continuations to make sure that we + // don't make the browser unresponsive when rewriting a large page. + var k = 0; + var prettyPrintingJob; + + var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/; + var prettyPrintRe = /\bprettyprint\b/; + var prettyPrintedRe = /\bprettyprinted\b/; + var preformattedTagNameRe = /pre|xmp/i; + var codeRe = /^code$/i; + var preCodeXmpRe = /^(?:pre|code|xmp)$/i; + + function doWork() { + var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ? + clock['now']() + 250 /* ms */ : + Infinity); + for (; k < elements.length && clock['now']() < endTime; k++) { + var cs = elements[k]; + var className = cs.className; + if (prettyPrintRe.test(className) + // Don't redo this if we've already done it. + // This allows recalling pretty print to just prettyprint elements + // that have been added to the page since last call. + && !prettyPrintedRe.test(className)) { + + // make sure this is not nested in an already prettified element + var nested = false; + for (var p = cs.parentNode; p; p = p.parentNode) { + var tn = p.tagName; + if (preCodeXmpRe.test(tn) + && p.className && prettyPrintRe.test(p.className)) { + nested = true; + break; + } + } + if (!nested) { + // Mark done. If we fail to prettyprint for whatever reason, + // we shouldn't try again. + cs.className += ' prettyprinted'; + + // If the classes includes a language extensions, use it. + // Language extensions can be specified like + // <pre class="prettyprint lang-cpp"> + // the language extension "cpp" is used to find a language handler + // as passed to PR.registerLangHandler. + // HTML5 recommends that a language be specified using "language-" + // as the prefix instead. Google Code Prettify supports both. + // http://dev.w3.org/html5/spec-author-view/the-code-element.html + var langExtension = className.match(langExtensionRe); + // Support <pre class="prettyprint"><code class="language-c"> + var wrapper; + if (!langExtension && (wrapper = childContentWrapper(cs)) + && codeRe.test(wrapper.tagName)) { + langExtension = wrapper.className.match(langExtensionRe); + } + + if (langExtension) { langExtension = langExtension[1]; } + + var preformatted; + if (preformattedTagNameRe.test(cs.tagName)) { + preformatted = 1; + } else { + var currentStyle = cs['currentStyle']; + var whitespace = ( + currentStyle + ? currentStyle['whiteSpace'] + : (document.defaultView + && document.defaultView.getComputedStyle) + ? document.defaultView.getComputedStyle(cs, null) + .getPropertyValue('white-space') + : 0); + preformatted = whitespace + && 'pre' === whitespace.substring(0, 3); + } + + // Look for a class like linenums or linenums:<n> where <n> is the + // 1-indexed number of the first line. + var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/); + lineNums = lineNums + ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true + : false; + if (lineNums) { numberLines(cs, lineNums, preformatted); } + + // do the pretty printing + prettyPrintingJob = { + langExtension: langExtension, + sourceNode: cs, + numberLines: lineNums, + pre: preformatted + }; + applyDecorator(prettyPrintingJob); + } + } + } + if (k < elements.length) { + // finish up in a continuation + setTimeout(doWork, 250); + } else if (opt_whenDone) { + opt_whenDone(); + } + } + + doWork(); + } + + /** + * Contains functions for creating and registering new language handlers. + * @type {Object} + */ + var PR = win['PR'] = { + 'createSimpleLexer': createSimpleLexer, + 'registerLangHandler': registerLangHandler, + 'sourceDecorator': sourceDecorator, + 'PR_ATTRIB_NAME': PR_ATTRIB_NAME, + 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE, + 'PR_COMMENT': PR_COMMENT, + 'PR_DECLARATION': PR_DECLARATION, + 'PR_KEYWORD': PR_KEYWORD, + 'PR_LITERAL': PR_LITERAL, + 'PR_NOCODE': PR_NOCODE, + 'PR_PLAIN': PR_PLAIN, + 'PR_PUNCTUATION': PR_PUNCTUATION, + 'PR_SOURCE': PR_SOURCE, + 'PR_STRING': PR_STRING, + 'PR_TAG': PR_TAG, + 'PR_TYPE': PR_TYPE, + 'prettyPrintOne': win['prettyPrintOne'] = prettyPrintOne, + 'prettyPrint': win['prettyPrint'] = prettyPrint + }; + + // Make PR available via the Asynchronous Module Definition (AMD) API. + // Per https://github.com/amdjs/amdjs-api/wiki/AMD: + // The Asynchronous Module Definition (AMD) API specifies a + // mechanism for defining modules such that the module and its + // dependencies can be asynchronously loaded. + // ... + // To allow a clear indicator that a global define function (as + // needed for script src browser loading) conforms to the AMD API, + // any global define function SHOULD have a property called "amd" + // whose value is an object. This helps avoid conflict with any + // other existing JavaScript code that could have defined a define() + // function that does not conform to the AMD API. + if (typeof define === "function" && define['amd']) { + define(function () { + return PR; + }); + } +})(); +; +(function(scope) { + + var ContextFreeParser = { + parse: function(text) { + var top = {}; + var entities = []; + var current = top; + var subCurrent = {}; + + var scriptDocCommentClause = '\\/\\*\\*([\\s\\S]*?)\\*\\/'; + var htmlDocCommentClause = '<!--([\\s\\S]*?)-->'; + + // matches text between /** and */ inclusive and <!-- and --> inclusive + var docCommentRegex = new RegExp(scriptDocCommentClause + '|' + htmlDocCommentClause, 'g'); + + // acquire all script doc comments + var docComments = text.match(docCommentRegex) || []; + + // each match represents a single block of doc comments + docComments.forEach(function(m) { + // unify line ends, remove all comment characters, split into individual lines + var lines = m.replace(/\r\n/g, '\n').replace(/^\s*\/\*\*|^\s*\*\/|^\s*\* ?|^\s*\<\!-\-|^s*\-\-\>/gm, '').split('\n'); + + // pragmas (@-rules) must occur on a line by themselves + var pragmas = []; + // filter lines whose first non-whitespace character is @ into the pragma list + // (and out of the `lines` array) + lines = lines.filter(function(l) { + var m = l.match(/\s*@([\w-]*) (.*)/); + if (!m) { + return true; + } + pragmas.push(m); + }); + + // collect all other text into a single block + var code = lines.join('\n'); + + // process pragmas + pragmas.forEach(function(m) { + var pragma = m[1], content = m[2]; + switch (pragma) { + + // currently all entities are either @class or @element + case 'class': + case 'element': + current = { + name: content, + description: code + }; + entities.push(current); + break; + + // an entity may have these describable sub-features + case 'attribute': + case 'property': + case 'method': + case 'event': + subCurrent = { + name: content, + description: code + }; + var label = pragma == 'property' ? 'properties' : pragma + 's'; + makePragma(current, label, subCurrent); + break; + + // sub-feature pragmas + case 'default': + case 'type': + subCurrent[pragma] = content; + break; + + // everything else + default: + current[pragma] = content; + break; + } + }); + + // utility function, yay hoisting + function makePragma(object, pragma, content) { + var p$ = object; + var p = p$[pragma]; + if (!p) { + p$[pragma] = p = []; + } + p.push(content); + } + + }); + + if (entities.length === 0) { + entities.push({name: 'Entity', description: '**Undocumented**'}); + } + return entities; + } + }; + + if (typeof module !== 'undefined' && module.exports) { + module.exports = ContextFreeParser; + } else { + scope.ContextFreeParser = ContextFreeParser; + } + +})(this);; + + + Polymer('core-xhr', { + + /** + * Sends a HTTP request to the server and returns the XHR object. + * + * @method request + * @param {Object} inOptions + * @param {String} inOptions.url The url to which the request is sent. + * @param {String} inOptions.method The HTTP method to use, default is GET. + * @param {boolean} inOptions.sync By default, all requests are sent asynchronously. To send synchronous requests, set to true. + * @param {Object} inOptions.params Data to be sent to the server. + * @param {Object} inOptions.body The content for the request body for POST method. + * @param {Object} inOptions.headers HTTP request headers. + * @param {String} inOptions.responseType The response type. Default is 'text'. + * @param {boolean} inOptions.withCredentials Whether or not to send credentials on the request. Default is false. + * @param {Object} inOptions.callback Called when request is completed. + * @returns {Object} XHR object. + */ + request: function(options) { + var xhr = new XMLHttpRequest(); + var url = options.url; + var method = options.method || 'GET'; + var async = !options.sync; + // + var params = this.toQueryString(options.params); + if (params && method == 'GET') { + url += (url.indexOf('?') > 0 ? '&' : '?') + params; + } + var xhrParams = this.isBodyMethod(method) ? (options.body || params) : null; + // + xhr.open(method, url, async); + if (options.responseType) { + xhr.responseType = options.responseType; + } + if (options.withCredentials) { + xhr.withCredentials = true; + } + this.makeReadyStateHandler(xhr, options.callback); + this.setRequestHeaders(xhr, options.headers); + xhr.send(xhrParams); + if (!async) { + xhr.onreadystatechange(xhr); + } + return xhr; + }, + + toQueryString: function(params) { + var r = []; + for (var n in params) { + var v = params[n]; + n = encodeURIComponent(n); + r.push(v == null ? n : (n + '=' + encodeURIComponent(v))); + } + return r.join('&'); + }, + + isBodyMethod: function(method) { + return this.bodyMethods[(method || '').toUpperCase()]; + }, + + bodyMethods: { + POST: 1, + PUT: 1, + DELETE: 1 + }, + + makeReadyStateHandler: function(xhr, callback) { + xhr.onreadystatechange = function() { + if (xhr.readyState == 4) { + callback && callback.call(null, xhr.response, xhr); + } + }; + }, + + setRequestHeaders: function(xhr, headers) { + if (headers) { + for (var name in headers) { + xhr.setRequestHeader(name, headers[name]); + } + } + } + + }); + + ; + + + Polymer('core-ajax', { + /** + * Fired when a response is received. + * + * @event core-response + */ + + /** + * Fired when an error is received. + * + * @event core-error + */ + + /** + * Fired whenever a response or an error is received. + * + * @event core-complete + */ + + /** + * The URL target of the request. + * + * @attribute url + * @type string + * @default '' + */ + url: '', + + /** + * Specifies what data to store in the `response` property, and + * to deliver as `event.response` in `response` events. + * + * One of: + * + * `text`: uses `XHR.responseText`. + * + * `xml`: uses `XHR.responseXML`. + * + * `json`: uses `XHR.responseText` parsed as JSON. + * + * `arraybuffer`: uses `XHR.response`. + * + * `blob`: uses `XHR.response`. + * + * `document`: uses `XHR.response`. + * + * @attribute handleAs + * @type string + * @default 'text' + */ + handleAs: '', + + /** + * If true, automatically performs an Ajax request when either `url` or `params` changes. + * + * @attribute auto + * @type boolean + * @default false + */ + auto: false, + + /** + * Parameters to send to the specified URL, as JSON. + * + * @attribute params + * @type string (JSON) + * @default '' + */ + params: '', + + /** + * Returns the response object. + * + * @attribute response + * @type Object + * @default null + */ + response: null, + + /** + * The HTTP method to use such as 'GET', 'POST', 'PUT', or 'DELETE'. + * Default is 'GET'. + * + * @attribute method + * @type string + * @default '' + */ + method: '', + + /** + * HTTP request headers to send. + * + * Example: + * + * <core-ajax + * auto + * url="http://somesite.com" + * headers='{"X-Requested-With": "XMLHttpRequest"}' + * handleAs="json" + * on-core-response="{{handleResponse}}"></core-ajax> + * + * @attribute headers + * @type Object + * @default null + */ + headers: null, + + /** + * Optional raw body content to send when method === "POST". + * + * Example: + * + * <core-ajax method="POST" auto url="http://somesite.com" + * body='{"foo":1, "bar":2}'> + * </core-ajax> + * + * @attribute body + * @type Object + * @default null + */ + body: null, + + /** + * Content type to use when sending data. + * + * @attribute contentType + * @type string + * @default 'application/x-www-form-urlencoded' + */ + contentType: 'application/x-www-form-urlencoded', + + /** + * Set the withCredentials flag on the request. + * + * @attribute withCredentials + * @type boolean + * @default false + */ + withCredentials: false, + + /** + * Additional properties to send to core-xhr. + * + * Can be set to an object containing default properties + * to send as arguments to the `core-xhr.request()` method + * which implements the low-level communication. + * + * @property xhrArgs + * @type Object + * @default null + */ + xhrArgs: null, + + ready: function() { + this.xhr = document.createElement('core-xhr'); + }, + + receive: function(response, xhr) { + if (this.isSuccess(xhr)) { + this.processResponse(xhr); + } else { + this.error(xhr); + } + this.complete(xhr); + }, + + isSuccess: function(xhr) { + var status = xhr.status || 0; + return !status || (status >= 200 && status < 300); + }, + + processResponse: function(xhr) { + var response = this.evalResponse(xhr); + this.response = response; + this.fire('core-response', {response: response, xhr: xhr}); + }, + + error: function(xhr) { + var response = xhr.status + ': ' + xhr.responseText; + this.fire('core-error', {response: response, xhr: xhr}); + }, + + complete: function(xhr) { + this.fire('core-complete', {response: xhr.status, xhr: xhr}); + }, + + evalResponse: function(xhr) { + return this[(this.handleAs || 'text') + 'Handler'](xhr); + }, + + xmlHandler: function(xhr) { + return xhr.responseXML; + }, + + textHandler: function(xhr) { + return xhr.responseText; + }, + + jsonHandler: function(xhr) { + var r = xhr.responseText; + try { + return JSON.parse(r); + } catch (x) { + return r; + } + }, + + documentHandler: function(xhr) { + return xhr.response; + }, + + blobHandler: function(xhr) { + return xhr.response; + }, + + arraybufferHandler: function(xhr) { + return xhr.response; + }, + + urlChanged: function() { + if (!this.handleAs) { + var ext = String(this.url).split('.').pop(); + switch (ext) { + case 'json': + this.handleAs = 'json'; + break; + } + } + this.autoGo(); + }, + + paramsChanged: function() { + this.autoGo(); + }, + + autoChanged: function() { + this.autoGo(); + }, + + // TODO(sorvell): multiple side-effects could call autoGo + // during one micro-task, use a job to have only one action + // occur + autoGo: function() { + if (this.auto) { + this.goJob = this.job(this.goJob, this.go, 0); + } + }, + + /** + * Performs an Ajax request to the specified URL. + * + * @method go + */ + go: function() { + var args = this.xhrArgs || {}; + // TODO(sjmiles): we may want XHR to default to POST if body is set + args.body = this.body || args.body; + args.params = this.params || args.params; + if (args.params && typeof(args.params) == 'string') { + args.params = JSON.parse(args.params); + } + args.headers = this.headers || args.headers || {}; + if (args.headers && typeof(args.headers) == 'string') { + args.headers = JSON.parse(args.headers); + } + if (this.contentType) { + args.headers['content-type'] = this.contentType; + } + if (this.handleAs === 'arraybuffer' || this.handleAs === 'blob' || + this.handleAs === 'document') { + args.responseType = this.handleAs; + } + args.withCredentials = this.withCredentials; + args.callback = this.receive.bind(this); + args.url = this.url; + args.method = this.method; + return args.url && this.xhr.request(args); + } + + }); + +; + + + Polymer('context-free-parser', { + + text: null, + + textChanged: function() { + if (this.text) { + var entities = ContextFreeParser.parse(this.text); + if (!entities || entities.length === 0) { + entities = [ + {name: this.url.split('/').pop(), description: '**Undocumented**'} + ]; + } + this.data = { classes: entities }; + } + }, + + dataChanged: function() { + this.fire('data-ready'); + } + + }); + +; + + + Polymer('core-doc-page', { + + hilight: function(event, detail, sender) { + detail.code = prettyPrintOne((detail.code || '').replace(/</g,'<').replace(/>/g,'>')); + }, + + homepageFilter: function(data) { + if (!data) { + return ''; + } + if (!data.homepage || data.homepage === 'github.io') { + return '//polymer.github.io/' + data.name; + } else { + return data.homepage; + } + } + + }); + + ; + + Polymer('core-selection', { + /** + * If true, multiple selections are allowed. + * + * @attribute multi + * @type boolean + * @default false + */ + multi: false, + ready: function() { + this.clear(); + }, + clear: function() { + this.selection = []; + }, + /** + * Retrieves the selected item(s). + * @method getSelection + * @returns Returns the selected item(s). If the multi property is true, + * getSelection will return an array, otherwise it will return + * the selected item or undefined if there is no selection. + */ + getSelection: function() { + return this.multi ? this.selection : this.selection[0]; + }, + /** + * Indicates if a given item is selected. + * @method isSelected + * @param {any} item The item whose selection state should be checked. + * @returns Returns true if `item` is selected. + */ + isSelected: function(item) { + return this.selection.indexOf(item) >= 0; + }, + setItemSelected: function(item, isSelected) { + if (item !== undefined && item !== null) { + if (isSelected) { + this.selection.push(item); + } else { + var i = this.selection.indexOf(item); + if (i >= 0) { + this.selection.splice(i, 1); + } + } + this.fire("core-select", {isSelected: isSelected, item: item}); + } + }, + /** + * Set the selection state for a given `item`. If the multi property + * is true, then the selected state of `item` will be toggled; otherwise + * the `item` will be selected. + * @method select + * @param {any} item: The item to select. + */ + select: function(item) { + if (this.multi) { + this.toggle(item); + } else if (this.getSelection() !== item) { + this.setItemSelected(this.getSelection(), false); + this.setItemSelected(item, true); + } + }, + /** + * Toggles the selection state for `item`. + * @method toggle + * @param {any} item: The item to toggle. + */ + toggle: function(item) { + this.setItemSelected(item, !this.isSelected(item)); + } + }); + ; + + + Polymer('core-selector', { + + /** + * Gets or sets the selected element. Default to use the index + * of the item element. + * + * If you want a specific attribute value of the element to be + * used instead of index, set "valueattr" to that attribute name. + * + * Example: + * + * <core-selector valueattr="label" selected="foo"> + * <div label="foo"></div> + * <div label="bar"></div> + * <div label="zot"></div> + * </core-selector> + * + * In multi-selection this should be an array of values. + * + * Example: + * + * <core-selector id="selector" valueattr="label" multi> + * <div label="foo"></div> + * <div label="bar"></div> + * <div label="zot"></div> + * </core-selector> + * + * this.$.selector.selected = ['foo', 'zot']; + * + * @attribute selected + * @type Object + * @default null + */ + selected: null, + + /** + * If true, multiple selections are allowed. + * + * @attribute multi + * @type boolean + * @default false + */ + multi: false, + + /** + * Specifies the attribute to be used for "selected" attribute. + * + * @attribute valueattr + * @type string + * @default 'name' + */ + valueattr: 'name', + + /** + * Specifies the CSS class to be used to add to the selected element. + * + * @attribute selectedClass + * @type string + * @default 'core-selected' + */ + selectedClass: 'core-selected', + + /** + * Specifies the property to be used to set on the selected element + * to indicate its active state. + * + * @attribute selectedProperty + * @type string + * @default '' + */ + selectedProperty: '', + + /** + * Specifies the attribute to set on the selected element to indicate + * its active state. + * + * @attribute selectedAttribute + * @type string + * @default 'active' + */ + selectedAttribute: 'active', + + /** + * Returns the currently selected element. In multi-selection this returns + * an array of selected elements. + * + * @attribute selectedItem + * @type Object + * @default null + */ + selectedItem: null, + + /** + * In single selection, this returns the model associated with the + * selected element. + * + * @attribute selectedModel + * @type Object + * @default null + */ + selectedModel: null, + + /** + * In single selection, this returns the selected index. + * + * @attribute selectedIndex + * @type number + * @default -1 + */ + selectedIndex: -1, + + /** + * The target element that contains items. If this is not set + * core-selector is the container. + * + * @attribute target + * @type Object + * @default null + */ + target: null, + + /** + * This can be used to query nodes from the target node to be used for + * selection items. Note this only works if the 'target' property is set. + * + * Example: + * + * <core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"></core-selector> + * <form id="myForm"> + * <label><input type="radio" name="color" value="red"> Red</label> <br> + * <label><input type="radio" name="color" value="green"> Green</label> <br> + * <label><input type="radio" name="color" value="blue"> Blue</label> <br> + * <p>color = {{color}}</p> + * </form> + * + * @attribute itemSelector + * @type string + * @default '' + */ + itemsSelector: '', + + /** + * The event that would be fired from the item element to indicate + * it is being selected. + * + * @attribute activateEvent + * @type string + * @default 'tap' + */ + activateEvent: 'tap', + + /** + * Set this to true to disallow changing the selection via the + * `activateEvent`. + * + * @attribute notap + * @type boolean + * @default false + */ + notap: false, + + ready: function() { + this.activateListener = this.activateHandler.bind(this); + this.observer = new MutationObserver(this.updateSelected.bind(this)); + if (!this.target) { + this.target = this; + } + }, + + get items() { + if (!this.target) { + return []; + } + var nodes = this.target !== this ? (this.itemsSelector ? + this.target.querySelectorAll(this.itemsSelector) : + this.target.children) : this.$.items.getDistributedNodes(); + return Array.prototype.filter.call(nodes || [], function(n) { + return n && n.localName !== 'template'; + }); + }, + + targetChanged: function(old) { + if (old) { + this.removeListener(old); + this.observer.disconnect(); + this.clearSelection(); + } + if (this.target) { + this.addListener(this.target); + this.observer.observe(this.target, {childList: true}); + this.updateSelected(); + } + }, + + addListener: function(node) { + node.addEventListener(this.activateEvent, this.activateListener); + }, + + removeListener: function(node) { + node.removeEventListener(this.activateEvent, this.activateListener); + }, + + get selection() { + return this.$.selection.getSelection(); + }, + + selectedChanged: function() { + this.updateSelected(); + }, + + updateSelected: function() { + this.validateSelected(); + if (this.multi) { + this.clearSelection(); + this.selected && this.selected.forEach(function(s) { + this.valueToSelection(s); + }, this); + } else { + this.valueToSelection(this.selected); + } + }, + + validateSelected: function() { + // convert to an array for multi-selection + if (this.multi && !Array.isArray(this.selected) && + this.selected !== null && this.selected !== undefined) { + this.selected = [this.selected]; + } + }, + + clearSelection: function() { + if (this.multi) { + this.selection.slice().forEach(function(s) { + this.$.selection.setItemSelected(s, false); + }, this); + } else { + this.$.selection.setItemSelected(this.selection, false); + } + this.selectedItem = null; + this.$.selection.clear(); + }, + + valueToSelection: function(value) { + var item = (value === null || value === undefined) ? + null : this.items[this.valueToIndex(value)]; + this.$.selection.select(item); + }, + + updateSelectedItem: function() { + this.selectedItem = this.selection; + }, + + selectedItemChanged: function() { + if (this.selectedItem) { + var t = this.selectedItem.templateInstance; + this.selectedModel = t ? t.model : undefined; + } else { + this.selectedModel = null; + } + this.selectedIndex = this.selectedItem ? + parseInt(this.valueToIndex(this.selected)) : -1; + }, + + valueToIndex: function(value) { + // find an item with value == value and return it's index + for (var i=0, items=this.items, c; (c=items[i]); i++) { + if (this.valueForNode(c) == value) { + return i; + } + } + // if no item found, the value itself is probably the index + return value; + }, + + valueForNode: function(node) { + return node[this.valueattr] || node.getAttribute(this.valueattr); + }, + + // events fired from <core-selection> object + selectionSelect: function(e, detail) { + this.updateSelectedItem(); + if (detail.item) { + this.applySelection(detail.item, detail.isSelected); + } + }, + + applySelection: function(item, isSelected) { + if (this.selectedClass) { + item.classList.toggle(this.selectedClass, isSelected); + } + if (this.selectedProperty) { + item[this.selectedProperty] = isSelected; + } + if (this.selectedAttribute && item.setAttribute) { + if (isSelected) { + item.setAttribute(this.selectedAttribute, ''); + } else { + item.removeAttribute(this.selectedAttribute); + } + } + }, + + // event fired from host + activateHandler: function(e) { + if (!this.notap) { + var i = this.findDistributedTarget(e.target, this.items); + if (i >= 0) { + var item = this.items[i]; + var s = this.valueForNode(item) || i; + if (this.multi) { + if (this.selected) { + this.addRemoveSelected(s); + } else { + this.selected = [s]; + } + } else { + this.selected = s; + } + this.asyncFire('core-activate', {item: item}); + } + } + }, + + addRemoveSelected: function(value) { + var i = this.selected.indexOf(value); + if (i >= 0) { + this.selected.splice(i, 1); + } else { + this.selected.push(value); + } + this.valueToSelection(value); + }, + + findDistributedTarget: function(target, nodes) { + // find first ancestor of target (including itself) that + // is in nodes, if any + while (target && target != this) { + var i = Array.prototype.indexOf.call(nodes, target); + if (i >= 0) { + return i; + } + target = target.parentNode; + } + } + }); + ; + + Polymer('core-menu',{}); +; + + + Polymer('core-item', { + + /** + * The URL of an image for the icon. + * + * @attribute src + * @type string + * @default '' + */ + + /** + * Specifies the icon from the Polymer icon set. + * + * @attribute icon + * @type string + * @default '' + */ + + /** + * Specifies the label for the menu item. + * + * @attribute label + * @type string + * @default '' + */ + + }); + +; +
+
+ Polymer('core-doc-toc', {
+
+ searchAction: function() {
+ this.$.searchBar.style.opacity = 1;
+ this.$.searchBar.style.display = '';
+ },
+
+ closeSearchAction: function() {
+ this.$.searchBar.style.opacity = 0;
+ this.$.searchBar.style.display = 'none';
+ }
+
+ });
+
+ ; + + + Polymer('core-doc-viewer', { + /** + * A single file to parse for docs + * + * @attribute url + * @type String + * @default '' + */ + + /** + * Class documentation extracted from the parser + * + * @property classes + * @type Array + * @default [] + */ + classes: [], + + /** + * Files to parse for docs + * + * @attribute sources + * @type Array + * @default [] + */ + sources: [], + + ready: function() { + window.addEventListener('hashchange', this.parseLocationHash.bind(this)); + this.parseLocationHash(); + }, + + parseLocationHash: function() { + this.route = window.location.hash.slice(1); + }, + + routeChanged: function() { + this.validateRoute(); + }, + + validateRoute: function() { + if (this.route) { + this.classes.some(function(c) { + if (c.name === this.route) { + this.data = c; + this.route = ''; + return; + } + }, this); + } + }, + + selectedChanged: function() { + this.data = this.classes[this.selected]; + }, + + parserDataReady: function(event) { + this.assimilateData(event.target.data); + }, + + assimilateData: function(data) { + this.classes = this.classes.concat(data.classes); + this.classes.sort(function(a, b) { + var na = a && a.name.toLowerCase(), nb = b && b.name.toLowerCase(); + return (na < nb) ? -1 : (na == nb) ? 0 : 1; + }); + if (!this.data && !this.route && this.classes.length) { + this.data = this.classes[0]; + } + if (this.classes.length > 1) { + this.$.toc.style.display = 'block'; + } + this.validateRoute(); + } + + }); + + ; + + + Polymer('core-component-page', { + + moduleName: '', + // TODO(sjmiles): needed this to force Object type for deserialization + sources: [], + + ready: function() { + this.moduleName = this.moduleName || this.findModuleName(); + }, + + moduleNameChanged: function() { + document.title = this.moduleName; + this.url = !this.sources.length && this.moduleName ? this.moduleName + '.html' : ''; + }, + + findModuleName: function() { + var path = location.pathname.split('/'); + var name = path.pop() || path.pop(); + if (name.indexOf('.html') >= 0) { + name = path.pop(); + } + return name || ''; + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-component-page/core-component-page.html b/third_party/polymer/components-chromium/core-component-page/core-component-page.html new file mode 100644 index 0000000..2155da5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/core-component-page.html @@ -0,0 +1,2450 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<style> + + body { + margin: 0; + } + +</style> + +<div hidden><!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The `core-layout` element is a helper for using +[CSS3 Flexible Boxes](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes). +A `core-layout` element enables a set of css selectors for easy flexbox styling. + +Example: + + <core-layout> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + </core-layout> + + Renders something like this: + + --------------------------------- + |-------------------------------| + ||Left| Main |Right|| + |-------------------------------| + --------------------------------- + +__Note__: the `core-layout` element applies layout to itself if it has children or to +its parent element, if it does not. This feature allows you to apply layout to an +arbitrary parent. + +Elements can layout horizontally, such that their items stack +left to right or vertically, such that their items stack top to bottom. The +default is horizontal. Set `vertical` to true to layout the elements vertically. + +To make a particular child _flexible_, use the `core-flex` attribute. +You can control flexibility from 1 to 3 by giving the attribute a +corresponding value. For other values, apply the css manually. + +It's common in flexbox parlance to hear the terms _main axis_ and _cross axis_. +For a horizontal layout the main axis is horizontal and the cross axis is vertical. +These are exchanged for a vertical layout. + +To effect alignment in the main axis, use the `justify` attribute. The +supported values are `start`, `center`, `end`, and `between`. + +To effect alignment in the cross axis, use the `align` attribute. The +supported values are `start`, `center`, and `end`. + +Note, it's also possible to include the `core-layout.css` stylesheet separate +from the `core-layout` element. Including the element automatically includes +the stylesheet. To use the stylesheet independent of the element, css classes +should be used of the following form: `core-h`, `core-v`, `core-flex`, +`core-justify-start`, and `core-align-start`. + +The `core-layout` and css file also provide a few commonly needed layout +behaviors. Apply the `core-fit` class to fit an element to its container. To +ensure a container will contain an element inside it with the `core-fit` class +give it the `core-relative` class. + +More examples: + + <core-layout vertical> + + <div>Header</div> + <div core-flex>Body</div> + <div>Footer</div> + + </core-layout> + + ---------- + ||------|| + ||Header|| + ||------|| + ||Body || + || || + || || + || || + || || + || || + || || + ||------|| + ||Footer|| + ||------|| + ---------- + +Justify: + + <core-layout justify="end"> + <div core-flex>Left</div> + <div>Main</div> + <div>Right</div> + </core-layout> + + --------------------------------- + |-------------------------------| + || Left|Main|Right|| + |-------------------------------| + --------------------------------- + +Align: + + <core-layout align="center"> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + </core-layout> + + --------------------------------- + |-------------------------------| + || | | || + ||Left| Main |Right|| + || | | || + |-------------------------------| + --------------------------------- + + +To layout contents of a parent element, place a `core-layout` inside of it: + + <some-element> + <core-layout></core-layout> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + <some-element> + + --------------------------------- + |-------------------------------| + ||Left| Main |Right|| + |-------------------------------| + --------------------------------- + +You may also use the `core-layout` stylesheet directly: + + <link rel="stylesheet" href="../core-layout/core-layout.css"> + <div class="core-h core-justify-end"> + <div core-flex>Left</div> + <div>Main</div> + <div>Right</div> + </div> + + --------------------------------- + |-------------------------------| + || Left|Main|Right|| + |-------------------------------| + --------------------------------- + +@group Polymer Core Elements +@element core-layout + +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-layout" attributes="vertical justify align isContainer reverse" assetpath="../core-layout/"> + + <template> + + <style no-shim="">/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ + +.core-h, .core-v { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: -moz-flex !important; + display: -webkit-flex !important; + display: flex !important; +} + +.core-h { + -webkit-box-orient: horizontal; + -ms-flex-direction: row; + -moz-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; +} + +.core-h.core-reverse { + -webkit-box-direction: reverse; + -ms-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +.core-v { + -webkit-box-orient: vertical; + -ms-flex-direction: column; + -moz-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} + +.core-v.core-reverse { + -webkit-box-direction: reverse; + -ms-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +.core-relative { + position: relative; +} + +.core-fit { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +body.core-fit { + margin: 0; +} + +.core-flex, [core-flex] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +.core-flex-auto, [core-flex-auto] { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + -moz-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; +} + +.core-flex-none, [core-flex-none] { + -webkit-box-flex: none; + -ms-flex: none; + -moz-flex: none; + -webkit-flex: none; + flex: none; +} + +.core-flex1, [core-flex=1] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +.core-flex2, [core-flex=2] { + -webkit-box-flex: 2; + -ms-flex: 2; + -moz-flex: 2; + -webkit-flex: 2; + flex: 2; +} + +.core-flex3, [core-flex=3] { + -webkit-box-flex: 3; + -ms-flex: 3; + -moz-flex: 3; + -webkit-flex: 3; + flex: 3; +} + +/* distributed elements */ +::content > .core-flex, ::content > [core-flex] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +::content > .core-flex-auto, ::content > [core-flex-auto] { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + -moz-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; +} + +::content > .core-flex-none, ::content > [core-flex-none] { + -webkit-box-flex: none; + -ms-flex: none; + -moz-flex: none; + -webkit-flex: none; + flex: none; +} + +::content > .core-flex1, ::content > [core-flex=1] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +::content > .core-flex2, ::content > [core-flex=2] { + -webkit-box-flex: 2; + -ms-flex: 2; + -moz-flex: 2; + -webkit-flex: 2; + flex: 2; +} + +::content > .core-flex3, ::content > [core-flex=3] { + -webkit-box-flex: 3; + -ms-flex: 3; + -moz-flex: 3; + -webkit-flex: 3; + flex: 3; +} + +/* alignment in main axis */ +.core-justify-start { + -webkit-box-pack: start; + -ms-flex-pack: start; + -moz-justify-content: flex-start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +.core-justify-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + -moz-justify-content: center; + -webkit-justify-content: center; + justify-content: center; +} + +.core-justify-end { + -webkit-box-pack: end; + -ms-flex-pack: end; + -moz-justify-content: flex-end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +.core-justify-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -moz-justify-content: space-between; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +/* alignment in cross axis */ +.core-align-start { + -webkit-box-align: start; + -ms-flex-align: start; + -moz-align-items: flex-start; + -webkit-align-items: flex-start; + align-items: flex-start; +} + +.core-align-center { + -webkit-box-align: center; + -ms-flex-align: center; + -moz-align-items: center; + -webkit-align-items: center; + align-items: center; +} + +.core-align-end { + -webkit-box-align: end; + -ms-flex-align: end; + -moz-align-items: flex-end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +</style> + <style no-shim="">/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: -moz-flex !important; + display: -webkit-flex !important; + display: flex !important; +} + +:host(.core-h) { + -webkit-box-orient: horizontal; + -ms-flex-direction: row; + -moz-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; +} + +:host(.core-v) { + -webkit-box-orient: vertical; + -ms-flex-direction: column; + -moz-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} + +:host(.core-h.core-reverse) { + -webkit-box-direction: reverse; + -ms-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +:host(.core-v.core-reverse) { + -webkit-box-direction: reverse; + -ms-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +/* alignment in main axis */ +:host(.core-justify-start) { + -webkit-box-pack: start; + -ms-flex-pack: start; + -moz-justify-content: flex-start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +:host(.core-justify-center) { + -webkit-box-pack: center; + -ms-flex-pack: center; + -moz-justify-content: center; + -webkit-justify-content: center; + justify-content: center; +} + +:host(.core-justify-end) { + -webkit-box-pack: end; + -ms-flex-pack: end; + -moz-justify-content: flex-end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +:host(.core-justify-between) { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -moz-justify-content: space-between; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +/* alignment in cross axis */ +:host(.core-align-start) { + -webkit-box-align: start; + -ms-flex-align: start; + -moz-align-items: flex-start; + -webkit-align-items: flex-start; + align-items: flex-start; +} + +:host(.core-align-center) { + -webkit-box-align: center; + -ms-flex-align: center; + -moz-align-items: center; + -webkit-align-items: center; + align-items: center; +} + +:host(.core-align-end) { + -webkit-box-align: end; + -ms-flex-align: end; + -moz-align-items: flex-end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +</style> + + </template> + + + +</polymer-element> +</div> +<div hidden> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Polymer Core Elements + * + * The `core-iconset-svg` element allows users to define their own icon sets + * that contain svg icons. The svg icon elements should be children of the + * `core-iconset-svg` element. Multiple icons should be given distinct id's. + * + * Using svg elements to create icons has a few advantages over traditional + * bitmap graphics like jpg or png. Icons that use svg are vector based so they + * are resolution independent and should look good on any device. They are + * stylable via css. Icons can be themed, colorized, and even animated. + * + * Example: + * + * <core-iconset-svg id="my-svg-icons" iconSize="24"> + * <svg> + * <defs> + * <g id="shape"> + * <rect x="50" y="50" width="50" height="50" /> + * <circle cx="50" cy="50" r="50" /> + * </g> + * </defs> + * </svg> + * </core-iconset-svg> + * + * This will automatically register the icon set "my-svg-icons" to the iconset + * database. To use these icons from within another element, make a + * `core-iconset` element and call the `byId` method + * to retrieve a given iconset. To apply a particular icon inside an + * element use the `applyIcon` method. For example: + * + * iconset.applyIcon(iconNode, 'car'); + * + * @element core-iconset-svg + * @extends core-meta + * @homepage github.io + */ +--> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Polymer Core Elements + * + * The `core-iconset` element allows users to define their own icon sets. + * The `src` property specifies the url of the icon image. Multiple icons may + * be included in this image and they may be organized into rows. + * The `icons` property is a space separated list of names corresponding to the + * icons. The names must be ordered as the icons are ordered in the icon image. + * Icons are expected to be square and are the size specified by the `iconSize` + * property. The `width` property corresponds to the width of the icon image + * and must be specified if icons are arranged into multiple rows in the image. + * + * All `core-iconset` elements are available for use by other `core-iconset` + * elements via a database keyed by id. Typically, an element author that wants + * to support a set of custom icons uses a `core-iconset` to retrieve + * and use another, user-defined iconset. + * + * Example: + * + * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" + * icons="location place starta stopb bus car train walk"> + * </core-iconset> + * + * This will automatically register the icon set "my-icons" to the iconset + * database. To use these icons from within another element, make a + * `core-iconset` element and call the `byId` method to retrieve a + * given iconset. To apply a particular icon to an element, use the + * `applyIcon` method. For example: + * + * iconset.applyIcon(iconNode, 'car'); + * + * Themed icon sets are also supported. The `core-iconset` can contain child + * `property` elements that specify a theme with an offsetX and offsetY of the + * theme within the icon resource. For example. + * + * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" + * icons="location place starta stopb bus car train walk"> + * <property theme="special" offsetX="256" offsetY="24"></property> + * </core-iconset> + * + * Then a themed icon can be applied like this: + * + * iconset.applyIcon(iconNode, 'car', 'special'); + * + * @element core-iconset + * @extends core-meta + * @homepage github.io + */ +--> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-meta` provides a method of constructing a self-organizing database. +It is useful to collate element meta-data for things like catalogs and for +designer. + +Example, an element folder has a `metadata.html` file in it, that contains a +`core-meta`, something like this: + + <core-meta id="my-element" label="My Element"> + <property name="color" value="blue"></property> + </core-meta> + +An application can import as many of these files as it wants, and then use +`core-meta` again to access the collected data. + + <script> + var meta = document.createElement('core-meta'); + console.log(meta.list); // dump a list of all meta-data elements that have been created + </script> + +Use `byId(id)` to retrive a specific core-meta. + + <script> + var meta = document.createElement('core-meta'); + console.log(meta.byId('my-element')); + </script> + +By default all meta-data are stored in a single databse. If your meta-data +have different types and want them to be stored separately, use `type` to +differentiate them. + +Example: + + <core-meta id="x-foo" type="xElt"></core-meta> + <core-meta id="x-bar" type="xElt"></core-meta> + <core-meta id="y-bar" type="yElt"></core-meta> + + <script> + var meta = document.createElement('core-meta'); + meta.type = 'xElt'; + console.log(meta.list); + </script> + +@group Polymer Core Elements +@element core-meta +@homepage github.io +--> + + + +<polymer-element name="core-meta" attributes="list label type" hidden assetpath="../core-meta/"> + +</polymer-element> + + +<polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize" assetpath="../core-iconset/"> + + + +</polymer-element> + + +<polymer-element name="core-iconset-svg" extends="core-meta" attributes="iconSize" assetpath="../core-iconset-svg/"> + + + +</polymer-element> + +<core-iconset-svg id="icons" iconsize="24"> +<svg><defs> +<g id="accessibility"><path d="M12,2c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S10.9,2,12,2z M21,9h-6v13h-2v-6h-2v6H9V9H3V7h18V9z"/></g> +<g id="account-box"><path d="M3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5z M15,9c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3c0-1.7,1.3-3,3-3C13.7,6,15,7.3,15,9z M6,17c0-2,4-3.1,6-3.1s6,1.1,6,3.1v1H6V17z"/></g> +<g id="account-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,5c1.7,0,3,1.3,3,3c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3C9,6.3,10.3,5,12,5z M12,19.2c-2.5,0-4.7-1.3-6-3.2c0-2,4-3.1,6-3.1c2,0,6,1.1,6,3.1C16.7,17.9,14.5,19.2,12,19.2z"/></g> +<g id="add"><path d="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"/></g> +<g id="add-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> +<g id="add-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> +<g id="add-circle-outline"><path d="M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="android"><path d="M6,18c0,0.6,0.4,1,1,1h1v3.5C8,23.3,8.7,24,9.5,24c0.8,0,1.5-0.7,1.5-1.5V19h2v3.5c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5V19h1c0.6,0,1-0.4,1-1V8H6V18z M3.5,8C2.7,8,2,8.7,2,9.5v7C2,17.3,2.7,18,3.5,18C4.3,18,5,17.3,5,16.5v-7C5,8.7,4.3,8,3.5,8z M20.5,8C19.7,8,19,8.7,19,9.5v7c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5v-7C22,8.7,21.3,8,20.5,8z M15.5,2.2l1.3-1.3c0.2-0.2,0.2-0.5,0-0.7c-0.2-0.2-0.5-0.2-0.7,0l-1.5,1.5C13.9,1.2,13,1,12,1c-1,0-1.9,0.2-2.7,0.6L7.9,0.1C7.7,0,7.3,0,7.1,0.1C7,0.3,7,0.7,7.1,0.9l1.3,1.3C7,3.3,6,5,6,7h12C18,5,17,3.2,15.5,2.2z M10,5H9V4h1V5z M15,5h-1V4h1V5z"/></g> +<g id="apps"><path d="M4,8h4V4H4V8z M10,20h4v-4h-4V20z M4,20h4v-4H4V20z M4,14h4v-4H4V14z M10,14h4v-4h-4V14z M16,4v4h4V4H16z M10,8h4V4h-4V8z M16,14h4v-4h-4V14z M16,20h4v-4h-4V20z"/></g> +<g id="archive"><path d="M20.5,5.2l-1.4-1.7C18.9,3.2,18.5,3,18,3H6C5.5,3,5.1,3.2,4.8,3.5L3.5,5.2C3.2,5.6,3,6,3,6.5V19c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6.5C21,6,20.8,5.6,20.5,5.2z M12,17.5L6.5,12H10v-2h4v2h3.5L12,17.5z M5.1,5l0.8-1h12l0.9,1H5.1z"/></g> +<g id="arrow-back"><path d="M20,11H7.8l5.6-5.6L12,4l-8,8l8,8l1.4-1.4L7.8,13H20V11z"/></g> +<g id="arrow-drop-down"><polygon points="7,10 12,15 17,10 "></polygon></g> +<g id="arrow-drop-down-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,14l-4-4h8L12,14z"/></g> +<g id="arrow-drop-up"><polygon points="7,14 12,9 17,14 "></polygon></g> +<g id="arrow-forward"><polygon points="12,4 10.6,5.4 16.2,11 4,11 4,13 16.2,13 10.6,18.6 12,20 20,12 "></polygon></g> +<g id="attachment"><path d="M7.5,18c-3,0-5.5-2.5-5.5-5.5S4.5,7,7.5,7H18c2.2,0,4,1.8,4,4s-1.8,4-4,4H9.5C8.1,15,7,13.9,7,12.5S8.1,10,9.5,10H17v1.5H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H18c1.4,0,2.5-1.1,2.5-2.5S19.4,8.5,18,8.5H7.5c-2.2,0-4,1.8-4,4s1.8,4,4,4H17V18H7.5z"/></g> +<g id="backspace"><path d="M22,3H7C6.3,3,5.8,3.3,5.4,3.9L0,12l5.4,8.1C5.8,20.6,6.3,21,7,21h15c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M19,15.6L17.6,17L14,13.4L10.4,17L9,15.6l3.6-3.6L9,8.4L10.4,7l3.6,3.6L17.6,7L19,8.4L15.4,12L19,15.6z"/></g> +<g id="backup"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> +<g id="block"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M4,12c0-4.4,3.6-8,8-8c1.8,0,3.5,0.6,4.9,1.7L5.7,16.9C4.6,15.5,4,13.8,4,12z M12,20c-1.8,0-3.5-0.6-4.9-1.7L18.3,7.1C19.4,8.5,20,10.2,20,12C20,16.4,16.4,20,12,20z"/></g> +<g id="book"><path d="M18,22c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2h-6v7L9.5,7.5L7,9V2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2H18z"/></g> +<g id="bookmark"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z"/></g> +<g id="bookmark-outline"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z M17,18l-5-2.2L7,18V5h10V18z"/></g> +<g id="bug-report"><path d="M20,8h-2.8c-0.5-0.8-1.1-1.5-1.8-2L17,4.4L15.6,3l-2.2,2.2C13,5.1,12.5,5,12,5s-1,0.1-1.4,0.2L8.4,3L7,4.4L8.6,6C7.9,6.5,7.3,7.2,6.8,8H4v2h2.1C6,10.3,6,10.7,6,11v1H4v2h2v1c0,0.3,0,0.7,0.1,1H4v2h2.8c1,1.8,3,3,5.2,3s4.2-1.2,5.2-3H20v-2h-2.1c0.1-0.3,0.1-0.7,0.1-1v-1h2v-2h-2v-1c0-0.3,0-0.7-0.1-1H20V8z M14,16h-4v-2h4V16z M14,12h-4v-2h4V12z"/></g> +<g id="cancel"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,15.6L15.6,17L12,13.4L8.4,17L7,15.6l3.6-3.6L7,8.4L8.4,7l3.6,3.6L15.6,7L17,8.4L13.4,12L17,15.6z"/></g> +<g id="check"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "></polygon></g> +<g id="check-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> +<g id="check-box-blank"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="check-box-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M19,19L5,19V5h10V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-8h-2V19z"/></g> +<g id="check-box-outline-blank"><path d="M19,5v14L5,19V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g> +<g id="check-circle"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> +<g id="check-circle-blank"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z"/></g> +<g id="check-circle-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M20,12c0,4.4-3.6,8-8,8s-8-3.6-8-8s3.6-8,8-8c0.8,0,1.5,0.1,2.2,0.3l1.6-1.6C14.6,2.3,13.3,2,12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10H20z"/></g> +<g id="check-circle-outline-blank"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="chevron-left"><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "></polygon></g> +<g id="chevron-right"><polygon points="10,6 8.6,7.4 13.2,12 8.6,16.6 10,18 16,12 "></polygon></g> +<g id="clear"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "></polygon></g> +<g id="close"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "></polygon></g> +<g id="cloud"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z"/></g> +<g id="cloud-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,15H8H7.5C6.1,15,5,13.9,5,12.5S6.1,10,7.5,10h0.6c0.4-1.7,2-3,3.9-3c2.2,0,4,1.8,4,4h1c1.1,0,2,0.9,2,2S18.1,15,17,15z"/></g> +<g id="cloud-done"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M10,17l-3.5-3.5l1.4-1.4l2.1,2.1L15.2,9l1.4,1.4L10,17z"/></g> +<g id="cloud-download"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M17,13l-5,5l-5-5h3V9h4v4H17z"/></g> +<g id="cloud-off"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6c-1.5,0-2.9,0.4-4,1.2l1.5,1.5C10.2,6.2,11.1,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3c0,1.1-0.6,2.1-1.6,2.6l1.5,1.5c1.3-0.9,2.1-2.4,2.1-4.1C24,12.4,21.9,10.2,19.4,10z M3,5.3L5.8,8C2.6,8.2,0,10.8,0,14c0,3.3,2.7,6,6,6h11.7l2,2l1.3-1.3L4.3,4L3,5.3z M7.7,10l8,8H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4H7.7z"/></g> +<g id="cloud-queue"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M19,18H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4h0.7C7.4,7.7,9.5,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3S20.7,18,19,18z"/></g> +<g id="cloud-upload"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> +<g id="content-copy"><path d="M16,1H4C2.9,1,2,1.9,2,3v14h2V3h12V1z M19,5H8C6.9,5,6,5.9,6,7v14c0,1.1,0.9,2,2,2h11c1.1,0,2-0.9,2-2V7C21,5.9,20.1,5,19,5z M19,21H8V7h11V21z"/></g> +<g id="content-cut"><path d="M10,6c0-2.2-1.8-4-4-4S2,3.8,2,6c0,2.2,1.8,4,4,4c0.6,0,1.1-0.1,1.6-0.4L10,12l-2.4,2.4C7.1,14.1,6.6,14,6,14c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4c0-0.6-0.1-1.1-0.4-1.6L12,14l7,7h4L9.6,7.6C9.9,7.1,10,6.6,10,6z M6,8C4.9,8,4,7.1,4,6s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,8,6,8z M6,20c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,20,6,20z M12,11.5c0.3,0,0.5,0.2,0.5,0.5c0,0.3-0.2,0.5-0.5,0.5c-0.3,0-0.5-0.2-0.5-0.5C11.5,11.7,11.7,11.5,12,11.5z M23,3h-4l-6,6l2,2L23,3z"/></g> +<g id="content-paste"><path d="M19,2h-4.2c-0.4-1.2-1.5-2-2.8-2c-1.3,0-2.4,0.8-2.8,2H5C3.9,2,3,2.9,3,4v16c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M12,2c0.6,0,1,0.4,1,1s-0.4,1-1,1c-0.6,0-1-0.4-1-1S11.4,2,12,2z M19,20H5V4h2v3h10V4h2V20z"/></g> +<g id="create"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z"/></g> +<g id="credit-card"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4v-6h16V18z M20,8H4V6h16V8z"/></g> +<g id="delete"><path d="M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z M19,4h-3.5l-1-1h-5l-1,1H5v2h14V4z"/></g> +<g id="done"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "></polygon></g> +<g id="done-all"><path d="M18,7l-1.4-1.4l-6.3,6.3l1.4,1.4L18,7z M22.2,5.6L11.7,16.2L7.5,12l-1.4,1.4l5.6,5.6l12-12L22.2,5.6z M0.4,13.4L6,19l1.4-1.4L1.8,12L0.4,13.4z"/></g> +<g id="drafts"><path d="M22,8c0-0.7-0.4-1.3-0.9-1.7L12,1L2.9,6.3C2.4,6.7,2,7.3,2,8v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2L22,8z M12,13L3.7,7.8L12,3l8.3,4.8L12,13z"/></g> +<g id="drive"><path d="M22.3,14L15.4,2H8.6l0,0l6.9,12H22.3z M9.7,15l-3.4,6h13.1l3.4-6H9.7z M7.7,3.5L1.2,15l3.4,6l6.6-11.5L7.7,3.5z"/></g> +<g id="drawer"><path d="M20,4H4C2.8,4,2,4.8,2,6v12c0,1.2,0.8,2,2,2h16c1,0,2-0.8,2-2V6C22,4.8,21,4,20,4z M20,18h-6V6h6V18z"/></g> +<g id="drive-document"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,9H7V7h10V9z M17,13H7v-2h10V13z M14,17H7v-2h7V17z"/></g> +<g id="drive-drawing"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,18h-6v-5.8c-0.7,0.6-1.5,1-2.5,1c-2,0-3.7-1.7-3.7-3.7s1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1-0.4,1.8-1,2.5H18V18z"/></g> +<g id="drive-file"><path d="M6,2C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"/></g> +<g id="drive-form"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-2h2V17z M9,13H7v-2h2V13z M9,9H7V7h2V9z M17,17h-7v-2h7V17z M17,13h-7v-2h7V13z M17,9h-7V7h7V9z"/></g> +<g id="drive-fusiontable"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,10.2L13,17l-4-4l-4,4v-3l4-4l4,4l6-6.8V10.2z"/></g> +<g id="drive-image"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> +<g id="drive-ms-excel"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M16.2,17h-2L12,13.2L9.8,17h-2l3.2-5L7.8,7h2l2.2,3.8L14.2,7h2L13,12L16.2,17z"/></g> +<g id="drive-ms-powerpoint"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9.8,13.4V17H8V7h4.3c1.5,0,2.2,0.3,2.8,0.9c0.7,0.6,0.9,1.4,0.9,2.3c0,1-0.3,1.8-0.9,2.3c-0.6,0.5-1.3,0.8-2.8,0.8H9.8z"/><path d="M9.8,12V8.4h2.3c0.7,0,1.2,0.2,1.5,0.6c0.3,0.4,0.5,0.7,0.5,1.2c0,0.6-0.2,0.9-0.5,1.3c-0.3,0.3-0.7,0.5-1.4,0.5H9.8z"/></g> +<g id="drive-ms-word"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M15.5,17H14l-2-7.5L10,17H8.5L6.1,7h1.7l1.5,7.5l2-7.5h1.4l2,7.5L16.2,7h1.7L15.5,17z"/></g> +<g id="drive-pdf"><path d="M11.3,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.6,2.6c0.3,0.2,0.5,0.4,0.9,0.6c0.5,0,0.9-0.1,1.3-0.1c1.2,0,2,0.2,2.3,0.7c0.1,0.2,0.1,0.4,0.1,0.6C18.2,14.3,18.1,14.6,17.9,14.8z M11.4,10.9c-0.2,0.7-0.6,1.5-1,2.4c-0.2,0.4-0.4,0.7-0.6,1.1c0,0,0.1,0,0.1,0l0.1,0v0c1.3-0.5,2.5-0.8,3.3-0.9c-0.2-0.1-0.3-0.2-0.4-0.3C12.4,12.6,11.8,11.8,11.4,10.9z"/></g> +<g id="drive-presentation"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,16H5V8h14V16z"/></g> +<g id="drive-script"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,4h0v6h0l0,4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M11,17v-3H5v-4h6V7l5,5L11,17z"/></g> +<g id="drive-site"><path d="M19,4H5C3.9,4,3,4.9,3,6l0,12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M14,18H5v-4h9V18z M14,13H5V9h9V13z M19,18h-4V9h4V18z"/></g> +<g id="drive-spreadsheet"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,3h0v11c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,11h-8v8H9v-8H5V9h4V5h2v4h8V11z"/></g> +<g id="drive-video"><path d="M18,4l2,4h-3l-2-4h-2l2,4h-3l-2-4H8l2,4H7L5,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4H18z"/></g> +<g id="error"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-2h2V17z M13,13h-2V7h2V13z"/></g> +<g id="event"><path d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> +<g id="exit-to-app"><path d="M10.1,15.6l1.4,1.4l5-5l-5-5l-1.4,1.4l2.6,2.6H3v2h9.7L10.1,15.6z M19,3H5C3.9,3,3,3.9,3,5v4h2V5h14v14H5v-4H3v4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="expand-less"><polygon points="12,8 6,14 7.4,15.4 12,10.8 16.6,15.4 18,14 "></polygon></g> +<g id="expand-more"><polygon points="16.6,8.6 12,13.2 7.4,8.6 6,10 12,16 18,10 "></polygon></g> +<g id="explore"><path d="M12,10.9c-0.6,0-1.1,0.5-1.1,1.1s0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1S12.6,10.9,12,10.9z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M14.2,14.2L6,18l3.8-8.2L18,6L14.2,14.2z"/></g> +<g id="extension"><path d="M20.5,11H19V7c0-1.1-0.9-2-2-2h-4V3.5C13,2.1,11.9,1,10.5,1C9.1,1,8,2.1,8,3.5V5H4C2.9,5,2,5.9,2,7l0,3.8h1.5c1.5,0,2.7,1.2,2.7,2.7S5,16.2,3.5,16.2H2L2,20c0,1.1,0.9,2,2,2h3.8v-1.5c0-1.5,1.2-2.7,2.7-2.7c1.5,0,2.7,1.2,2.7,2.7V22H17c1.1,0,2-0.9,2-2v-4h1.5c1.4,0,2.5-1.1,2.5-2.5S21.9,11,20.5,11z"/></g> +<g id="favorite"><path d="M12,21.4L10.6,20C5.4,15.4,2,12.3,2,8.5C2,5.4,4.4,3,7.5,3c1.7,0,3.4,0.8,4.5,2.1C13.1,3.8,14.8,3,16.5,3C19.6,3,22,5.4,22,8.5c0,3.8-3.4,6.9-8.6,11.5L12,21.4z"/></g> +<g id="favorite-outline"><path d="M16.5,3c-1.7,0-3.4,0.8-4.5,2.1C10.9,3.8,9.2,3,7.5,3C4.4,3,2,5.4,2,8.5c0,3.8,3.4,6.9,8.6,11.5l1.4,1.3l1.4-1.3c5.1-4.7,8.6-7.8,8.6-11.5C22,5.4,19.6,3,16.5,3z M12.1,18.6L12,18.6l-0.1-0.1C7.1,14.2,4,11.4,4,8.5C4,6.5,5.5,5,7.5,5c1.5,0,3,1,3.6,2.4h1.9C13.5,6,15,5,16.5,5c2,0,3.5,1.5,3.5,3.5C20,11.4,16.9,14.2,12.1,18.6z"/></g> +<g id="file-download"><path d="M19,9h-4V3H9v6H5l7,7L19,9z M5,18v2h14v-2H5z"/></g> +<g id="file-upload"><polygon points="9,16 15,16 15,10 19,10 12,3 5,10 9,10 "><rect x="5" y="18" width="14" height="2"/></polygon></g> +<g id="filter"><path d="M10,18h4v-2h-4V18z M3,6v2h18V6H3z M6,13h12v-2H6V13z"/></g> +<g id="flag"><polygon points="14.4,6 14,4 5,4 5,21 7,21 7,14 12.6,14 13,16 20,16 20,6 "></polygon></g> +<g id="flip-to-back"><path d="M9,7H7l0,2h2V7z M9,11H7v2h2V11z M9,3C7.9,3,7,3.9,7,5h2V3z M13,15h-2v2h2V15z M19,3v2h2C21,3.9,20.1,3,19,3z M13,3h-2v2h2V3z M9,17v-2H7C7,16.1,7.9,17,9,17z M19,13h2v-2h-2V13z M19,9h2V7h-2V9z M19,17c1.1,0,2-0.9,2-2h-2V17z M5,7H3v2h0l0,10c0,1.1,0.9,2,2,2h12v-2H5V7z M15,5h2V3h-2V5z M15,17h2v-2h-2V17z"/></g> +<g id="flip-to-front"><path d="M3,13h2v-2H3L3,13z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,9h2V7H3V9z M15,21h2v-2h-2V21z M19,3H9C7.9,3,7,3.9,7,5v2h0v2v6c0,1.1,0.9,2,2,2h5h4h1c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15H9V5h10V15z M11,21h2v-2h-2V21z M7,21h2v-2H7V21z"/></g> +<g id="folder"><path d="M10,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8c0-1.1-0.9-2-2-2h-8L10,4z"/></g> +<g id="folder-mydrive"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M11.7,17l-1.3-2.1l2.8-5l1.5,2.7L12.3,17H11.7z M18.3,17h-5.5l1.4-2.5h5.1l0.3,0.5L18.3,17z M13.8,9h2.4l2.8,5H16l-2.6-4.5L13.8,9z"/></g> +<g id="folder-shared"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M15,9c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2C13,9.9,13.9,9,15,9z M19,17h-8v-1c0-1.3,2.7-2,4-2c1.3,0,4,0.7,4,2V17z"/></g> +<g id="forward"><polygon points="12,8 12,4 20,12 12,20 12,16 4,16 4,8 "></polygon></g> +<g id="fullscreen"><path d="M7,14H5v5h5v-2H7V14z M5,10h2V7h3V5H5V10z M17,17h-3v2h5v-5h-2V17z M14,5v2h3v3h2V5H14z"/></g> +<g id="fullscreen-exit"><path d="M5,16h3v3h2v-5H5V16z M8,8H5v2h5V5H8V8z M14,19h2v-3h3v-2h-5V19z M16,8V5h-2v5h5V8H16z"/></g> +<g id="gesture"><path d="M4.6,6.9C5.3,6.2,6,5.5,6.3,5.7c0.5,0.2,0,1-0.3,1.5c-0.3,0.4-2.9,3.9-2.9,6.3c0,1.3,0.5,2.3,1.3,3c0.8,0.6,1.7,0.7,2.6,0.5c1.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"/></g> +<g id="google-plus"><path d="M21,10V7h-2v3h-3v2h3v3h2v-3h3v-2H21z M13.3,13.4l-1.1-0.8c-0.4-0.3-0.8-0.7-0.8-1.4c0-0.7,0.5-1.3,1-1.6c1.3-1,2.6-2.1,2.6-4.3c0-2.1-1.3-3.3-2-3.9h1.7L15.9,0H9.7C5.3,0,3.1,2.8,3.1,5.8c0,2.3,1.8,4.8,5,4.8h0.8c-0.1,0.3-0.4,0.8-0.4,1.3c0,1,0.4,1.4,0.9,2c-1.4,0.1-4,0.4-5.9,1.6c-1.8,1.1-2.3,2.6-2.3,3.7c0,2.3,2.1,4.5,6.6,4.5c5.4,0,8-3,8-5.9C15.8,15.7,14.7,14.6,13.3,13.4z M5.7,4.3c0-2.2,1.3-3.2,2.7-3.2c2.6,0,4,3.5,4,5.5c0,2.6-2.1,3.1-2.9,3.1C7,9.7,5.7,6.6,5.7,4.3z M9.3,22.3c-3.3,0-5.4-1.5-5.4-3.7c0-2.2,2-2.9,2.6-3.2c1.3-0.4,3-0.5,3.3-0.5c0.3,0,0.5,0,0.7,0c2.4,1.7,3.4,2.4,3.4,4C13.9,20.8,12,22.3,9.3,22.3z"/></g> +<g id="help"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,19h-2v-2h2V19z M15.1,11.3l-0.9,0.9C13.4,12.9,13,13.5,13,15h-2v-0.5c0-1.1,0.4-2.1,1.2-2.8l1.2-1.3C13.8,10.1,14,9.6,14,9c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2H8c0-2.2,1.8-4,4-4c2.2,0,4,1.8,4,4C16,9.9,15.6,10.7,15.1,11.3z"/></g> +<g id="history"><path opacity="0.9" d="M12.5,2C9,2,5.9,3.9,4.3,6.8L2,4.5V11h6.5L5.7,8.2C7,5.7,9.5,4,12.5,4c4.1,0,7.5,3.4,7.5,7.5c0,4.1-3.4,7.5-7.5,7.5c-3.3,0-6-2.1-7.1-5H3.3c1.1,4,4.8,7,9.2,7c5.3,0,9.5-4.3,9.5-9.5S17.7,2,12.5,2z M11,7v5.1l4.7,2.8l0.8-1.3l-4-2.4V7H11z"/></g> +<g id="home"><polygon points="10,20 10,14 14,14 14,20 19,20 19,12 22,12 12,3 2,12 5,12 5,20 "></polygon></g> +<g id="https"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> +<g id="inbox"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15h-4c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3H5V5h14V15z M16,10h-2V7h-4v3H8l4,4L16,10z"/></g> +<g id="info"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-6h2V17z M13,9h-2V7h2V9z"/></g> +<g id="info-outline"><path d="M11,17h2v-6h-2V17z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M11,9h2V7h-2V9z"/></g> +<g id="invert-colors"><path d="M17,12c0-2.8-2.2-5-5-5v10C14.8,17,17,14.8,17,12z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19h-7v-2c-2.8,0-5-2.2-5-5s2.2-5,5-5V5h7V19z"/></g> +<g id="keep"><path d="M16,12V4h1V2H7v2h1v8l-2,2v2h5.2v6h1.6v-6H18v-2L16,12z"/></g> +<g id="label"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z"/></g> +<g id="label-outline"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z M16,17H5V7h11l3.5,5L16,17z"/></g> +<g id="language"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M18.9,8H16c-0.3-1.3-0.8-2.4-1.4-3.6C16.4,5.1,18,6.3,18.9,8z M12,4c0.8,1.2,1.5,2.5,1.9,4h-3.8C10.5,6.6,11.2,5.2,12,4z M4.3,14C4.1,13.4,4,12.7,4,12s0.1-1.4,0.3-2h3.4c-0.1,0.7-0.1,1.3-0.1,2s0.1,1.3,0.1,2H4.3z M5.1,16H8c0.3,1.3,0.8,2.4,1.4,3.6C7.6,18.9,6,17.7,5.1,16z M8,8H5.1c1-1.7,2.5-2.9,4.3-3.6C8.8,5.6,8.3,6.7,8,8z M12,20c-0.8-1.2-1.5-2.5-1.9-4h3.8C13.5,17.4,12.8,18.8,12,20z M14.3,14H9.7c-0.1-0.7-0.2-1.3-0.2-2s0.1-1.3,0.2-2h4.7c0.1,0.7,0.2,1.3,0.2,2S14.4,13.3,14.3,14z M14.6,19.6c0.6-1.1,1.1-2.3,1.4-3.6h2.9C18,17.7,16.4,18.9,14.6,19.6z M16.4,14c0.1-0.7,0.1-1.3,0.1-2s-0.1-1.3-0.1-2h3.4c0.2,0.6,0.3,1.3,0.3,2s-0.1,1.4-0.3,2H16.4z"/></g> +<g id="launch"><path d="M19,19H5V5h7V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-7h-2V19z M14,3v2h3.6l-9.8,9.8l1.4,1.4L19,6.4V10h2V3H14z"/></g> +<g id="link"><path d="M8,13h8v-2H8V13z M3.9,12c0-2.3,1.8-4.1,4.1-4.1h3V6H8c-3.3,0-6,2.7-6,6s2.7,6,6,6h3v-1.9H8C5.7,16.1,3.9,14.3,3.9,12z M16,6h-3v1.9h3c2.3,0,4.1,1.8,4.1,4.1c0,2.3-1.8,4.1-4.1,4.1h-3V18h3c3.3,0,6-2.7,6-6S19.3,6,16,6z"/></g> +<g id="list"><path d="M3,13h2v-2H3V13z M3,17h2v-2H3V17z M3,9h2V7H3V9z M7,13h14v-2H7V13z M7,17h14v-2H7V17z M7,7v2h14V7H7z"/></g> +<g id="lock"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> +<g id="lock-open"><path d="M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6h1.9c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M18,20H6V10h12V20z"/></g> +<g id="lock-outline"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,2.9c1.7,0,3.1,1.4,3.1,3.1v2H9V6H8.9C8.9,4.3,10.3,2.9,12,2.9z M18,20H6V10h12V20z M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z"/></g> +<g id="mail"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="markunread"><path d="M22,6l2-2l-2-2l-2,2l-2-2l-2,2l-2-2l-2,2l-2-2L8,4L6,2L4,4L2,2L0,4l2,2L0,8l2,2l-2,2l2,2l-2,2l2,2l-2,2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l-2-2l2-2l-2-2l2-2l-2-2l2-2L22,6z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="menu"><path d="M3,18h18v-2H3V18z M3,13h18v-2H3V13z M3,6v2h18V6H3z"/></g> +<g id="more-horiz"><path d="M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z"/></g> +<g id="more-vert"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> +<g id="polymer"><polygon points="19,4 15,4 7.1,16.6 4.5,12 9,4 5,4 0.5,12 5,20 9,20 16.9,7.4 19.5,12 15,20 19,20 23.5,12 "></polygon></g> +<g id="print"><path d="M19,8H5c-1.7,0-3,1.3-3,3v6h4v4h12v-4h4v-6C22,9.3,20.7,8,19,8z M16,19H8v-5h8V19z M19,12c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S19.6,12,19,12z M18,3H6v4h12V3z"/></g> +<g id="radio-button-off"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="radio-button-on"><path d="M12,7c-2.8,0-5,2.2-5,5s2.2,5,5,5c2.8,0,5-2.2,5-5S14.8,7,12,7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="receipt"><path d="M18,17H6v-2h12V17z M18,13H6v-2h12V13z M18,9H6V7h12V9z M3,22l1.5-1.5L6,22l1.5-1.5L9,22l1.5-1.5L12,22l1.5-1.5L15,22l1.5-1.5L18,22l1.5-1.5L21,22V2l-1.5,1.5L18,2l-1.5,1.5L15,2l-1.5,1.5L12,2l-1.5,1.5L9,2L7.5,3.5L6,2L4.5,3.5L3,2V22z"/></g> +<g id="refresh"><path d="M17.6,6.4C16.2,4.9,14.2,4,12,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c3.7,0,6.8-2.6,7.7-6h-2.1c-0.8,2.3-3,4-5.6,4c-3.3,0-6-2.7-6-6s2.7-6,6-6c1.7,0,3.1,0.7,4.2,1.8L13,11h7V4L17.6,6.4z"/></g> +<g id="reminder"><path d="M16.9,13c1.3-1.3,2.1-3,2.1-5c0-3.9-3.1-7-7-7C8.1,1,5,4.1,5,8c0,2,0.8,3.7,2.1,5l0,0l3.5,3.5L6,21.1l1.4,1.4L16.9,13z M15.5,11.5L15.5,11.5L12,15.1l-3.5-3.5l0,0l0,0C7.6,10.6,7,9.4,7,8c0-2.8,2.2-5,5-5c2.8,0,5,2.2,5,5C17,9.4,16.4,10.6,15.5,11.5L15.5,11.5z M13.4,19.3l3.2,3.2l1.4-1.4l-3.2-3.2L13.4,19.3z"/></g> +<g id="remove"><path d="M19,13H5v-2h14V13z"/></g> +<g id="remove-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13H7v-2h10V13z"/></g> +<g id="remove-circle-outline"><path d="M7,11v2h10v-2H7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="reply"><path d="M10,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C20,15,17,10,10,9z"/></g> +<g id="reply-all"><path d="M7,8V5l-7,7l7,7v-3l-4-4L7,8z M13,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C23,15,20,10,13,9z"/></g> +<g id="report"><path d="M15.7,3H8.3L3,8.3v7.5L8.3,21h7.5l5.3-5.3V8.3L15.7,3z M12,17.3c-0.7,0-1.3-0.6-1.3-1.3c0-0.7,0.6-1.3,1.3-1.3c0.7,0,1.3,0.6,1.3,1.3C13.3,16.7,12.7,17.3,12,17.3z M13,13h-2V7h2V13z"/></g> +<g id="rotate-left"><path d="M7.1,8.5L5.7,7.1C4.8,8.3,4.2,9.6,4.1,11h2C6.2,10.1,6.6,9.3,7.1,8.5z M6.1,13h-2c0.2,1.4,0.7,2.7,1.6,3.9l1.4-1.4C6.6,14.7,6.2,13.9,6.1,13z M7.1,18.3c1.2,0.9,2.5,1.4,3.9,1.6v-2c-0.9-0.1-1.7-0.5-2.5-1L7.1,18.3z M13,4.1V1L8.5,5.5L13,10V6.1c2.8,0.5,5,2.9,5,5.9s-2.2,5.4-5,5.9v2c3.9-0.5,7-3.9,7-7.9S16.9,4.6,13,4.1z"/></g> +<g id="rotate-right"><path d="M15.5,5.5L11,1v3.1C7.1,4.6,4,7.9,4,12s3.1,7.4,7,7.9v-2C8.2,17.4,6,15,6,12s2.2-5.4,5-5.9V10L15.5,5.5z M19.9,11c-0.2-1.4-0.7-2.7-1.6-3.9l-1.4,1.4c0.5,0.8,0.9,1.6,1,2.5H19.9z M13,17.9v2c1.4-0.2,2.7-0.7,3.9-1.6l-1.4-1.4C14.7,17.4,13.9,17.8,13,17.9z M16.9,15.5l1.4,1.4c0.9-1.2,1.5-2.5,1.6-3.9h-2C17.8,13.9,17.4,14.7,16.9,15.5z"/></g> +<g id="save"><path d="M17,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7L17,3z M12,19c-1.7,0-3-1.3-3-3s1.3-3,3-3c1.7,0,3,1.3,3,3S13.7,19,12,19z M15,9H5V5h10V9z"/></g> +<g id="schedule"><path fill-opacity="0.9" d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><polygon fill-opacity="0.9" points="12.5,7 11,7 11,13 16.2,16.2 17,14.9 12.5,12.2 "></polygon></g> +<g id="search"><path d="M15.5,14h-0.8l-0.3-0.3c1-1.1,1.6-2.6,1.6-4.2C16,5.9,13.1,3,9.5,3C5.9,3,3,5.9,3,9.5S5.9,16,9.5,16c1.6,0,3.1-0.6,4.2-1.6l0.3,0.3v0.8l5,5l1.5-1.5L15.5,14z M9.5,14C7,14,5,12,5,9.5S7,5,9.5,5C12,5,14,7,14,9.5S12,14,9.5,14z"/></g> +<g id="select-all"><path d="M3,5h2V3C3.9,3,3,3.9,3,5z M3,13h2v-2H3V13z M7,21h2v-2H7V21z M3,9h2V7H3V9z M13,3h-2v2h2V3z M19,3v2h2C21,3.9,20.1,3,19,3z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,17h2v-2H3V17z M9,3H7v2h2V3z M11,21h2v-2h-2V21z M19,13h2v-2h-2V13z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,9h2V7h-2V9z M19,17h2v-2h-2V17z M15,21h2v-2h-2V21z M15,5h2V3h-2V5z M7,17h10V7H7V17z M9,9h6v6H9V9z"/></g> +<g id="send"><polygon points="2,21 23,12 2,3 2,10 17,12 2,14 "></polygon></g> +<g id="settings"><path d="M19.4,13c0-0.3,0.1-0.6,0.1-1s0-0.7-0.1-1l2.1-1.7c0.2-0.2,0.2-0.4,0.1-0.6l-2-3.5C19.5,5.1,19.3,5,19,5.1l-2.5,1c-0.5-0.4-1.1-0.7-1.7-1l-0.4-2.6C14.5,2.2,14.2,2,14,2h-4C9.8,2,9.5,2.2,9.5,2.4L9.1,5.1C8.5,5.3,8,5.7,7.4,6.1L5,5.1C4.7,5,4.5,5.1,4.3,5.3l-2,3.5C2.2,8.9,2.3,9.2,2.5,9.4L4.6,11c0,0.3-0.1,0.6-0.1,1s0,0.7,0.1,1l-2.1,1.7c-0.2,0.2-0.2,0.4-0.1,0.6l2,3.5C4.5,18.9,4.7,19,5,18.9l2.5-1c0.5,0.4,1.1,0.7,1.7,1l0.4,2.6c0,0.2,0.2,0.4,0.5,0.4h4c0.2,0,0.5-0.2,0.5-0.4l0.4-2.6c0.6-0.3,1.2-0.6,1.7-1l2.5,1c0.2,0.1,0.5,0,0.6-0.2l2-3.5c0.1-0.2,0.1-0.5-0.1-0.6L19.4,13z M12,15.5c-1.9,0-3.5-1.6-3.5-3.5s1.6-3.5,3.5-3.5s3.5,1.6,3.5,3.5S13.9,15.5,12,15.5z"/></g> +<g id="settings-applications"><path d="M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S13.1,10,12,10z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17.2,12c0,0.2,0,0.5,0,0.7l1.5,1.2c0.1,0.1,0.2,0.3,0.1,0.4l-1.4,2.4c-0.1,0.2-0.3,0.2-0.4,0.2l-1.7-0.7c-0.4,0.3-0.8,0.5-1.2,0.7l-0.3,1.9c0,0.2-0.2,0.3-0.3,0.3h-2.8c-0.2,0-0.3-0.1-0.3-0.3L10,16.9c-0.4-0.2-0.8-0.4-1.2-0.7l-1.7,0.7c-0.2,0.1-0.3,0-0.4-0.2l-1.4-2.4c-0.1-0.2,0-0.3,0.1-0.4l1.5-1.2c0-0.2,0-0.5,0-0.7s0-0.5,0-0.7l-1.5-1.2c-0.1-0.1-0.2-0.3-0.1-0.4l1.4-2.4c0.1-0.2,0.3-0.2,0.4-0.2l1.7,0.7C9.2,7.6,9.6,7.3,10,7.1l0.3-1.9c0-0.2,0.2-0.3,0.3-0.3h2.8c0.2,0,0.3,0.1,0.3,0.3L14,7.1c0.4,0.2,0.8,0.4,1.2,0.7l1.7-0.7c0.2-0.1,0.3,0,0.4,0.2l1.4,2.4c0.1,0.2,0,0.3-0.1,0.4l-1.5,1.2C17.2,11.5,17.2,11.8,17.2,12z"/></g> +<g id="settings-bluetooth"><path d="M11,24h2v-2h-2V24z M7,24h2v-2H7V24z M15,24h2v-2h-2V24z M17.7,5.7L12,0h-1v7.6L6.4,3L5,4.4l5.6,5.6L5,15.6L6.4,17l4.6-4.6V20h1l5.7-5.7L13.4,10L17.7,5.7z M13,3.8l1.9,1.9L13,7.6V3.8z M14.9,14.3L13,16.2v-3.8L14.9,14.3z"/></g> +<g id="settings-cell"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M16,0L8,0C6.9,0,6,0.9,6,2v16c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V2C18,0.9,17.1,0,16,0z M16,16H8V4h8V16z"/></g> +<g id="settings-phone"><path d="M13,9h-2v2h2V9z M17,9h-2v2h2V9z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,9v2h2V9H19z"/></g> +<g id="settings-power"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M13,2h-2v10h2V2z M16.6,4.4l-1.4,1.4C16.8,6.9,18,8.8,18,11c0,3.3-2.7,6-6,6c-3.3,0-6-2.7-6-6c0-2.2,1.2-4.1,2.9-5.1L7.4,4.4C5.4,5.9,4,8.3,4,11c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8C20,8.3,18.6,5.9,16.6,4.4z M15,24h2v-2h-2V24z"/></g> +<g id="settings-voice"><path d="M7,24h2v-2H7V24z M12,13c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,11.7,10.3,13,12,13z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M19,10h-1.7c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V20h2v-3.3C16.3,16.2,19,13.4,19,10z"/></g> +<g id="shopping-basket"><path d="M17.2,9l-4.4-6.6C12.6,2.2,12.3,2,12,2c-0.3,0-0.6,0.1-0.8,0.4L6.8,9H2c-0.6,0-1,0.4-1,1c0,0.1,0,0.2,0,0.3l2.5,9.3c0.2,0.8,1,1.5,1.9,1.5h13c0.9,0,1.7-0.6,1.9-1.5l2.5-9.3c0-0.1,0-0.2,0-0.3c0-0.6-0.4-1-1-1H17.2z M9,9l3-4.4L15,9H9z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z"/></g> +<g id="shopping-cart"><path d="M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S8.1,18,7,18z M1,2v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4c-0.1,0-0.2-0.1-0.2-0.2c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.6-6.5C21,5.3,21,5.2,21,5c0-0.6-0.4-1-1-1H5.2L4.3,2H1z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S18.1,18,17,18z"/></g> +<g id="sort"><path d="M3,18h6v-2H3V18z M3,6v2h18V6H3z M3,13h12v-2H3V13z"/></g> +<g id="star"><polygon points="12,17.273 18.18,21 16.545,13.971 22,9.244 14.809,8.627 12,2 9.191,8.627 2,9.244 7.455,13.971 5.82,21 "></polygon></g> +<g id="star-half"><path d="M22,9.744l-7.191-0.617L12,2.5L9.191,9.127L2,9.744v0l0,0l5.455,4.727L5.82,21.5L12,17.772l0,0l6.18,3.727l-1.635-7.029L22,9.744z M12,15.896V6.595l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.896z"/></g> +<g id="star-outline"><path d="M22,9.244l-7.191-0.617L12,2L9.191,8.627L2,9.244l5.455,4.727L5.82,21L12,17.272L18.18,21l-1.635-7.029L22,9.244z M12,15.396l-3.763,2.27l0.996-4.281L5.91,10.507l4.38-0.376L12,6.095l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.396z"/></g> +<g id="star-rate"><polygon points="12,14.3 15.7,17 14.3,12.6 18,10 13.5,10 12,5.5 10.5,10 6,10 9.7,12.6 8.3,17 "></polygon></g> +<g id="store"><path d="M20,4H4v2h16V4z M21,14v-2l-1-5H4l-1,5v2h1v6h10v-6h4v6h2v-6H21z M12,18H6v-4h6V18z"/></g> +<g id="swap-driving-apps"><circle cx="6.5" cy="15.5" r="1.5"/><circle cx="17.5" cy="15.5" r="1.5"/><path d="M18.9,7c-0.2-0.6-0.8-1-1.4-1H16H6V4L3,7l2,2l1,1V8h11.7l1.3,4H3v9c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,7z M6.5,17C5.7,17,5,16.3,5,15.5S5.7,14,6.5,14C7.3,14,8,14.7,8,15.5S7.3,17,6.5,17z M17.5,17c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,17,17.5,17z M16,0v2H8v2h8v2l3-3L16,0z"/></g> +<g id="swap-horiz"><path d="M7,11l-4,4l4,4v-3h7v-2H7V11z M21,9l-4-4v3h-7v2h7v3L21,9z"/></g> +<g id="swap-vert"><path d="M16,17v-7h-2v7h-3l4,4l4-4H16z M9,3L5,7h3v7h2V7h3L9,3z"/></g> +<g id="swap-vert-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M6.5,9L10,5.5L13.5,9H11v4H9V9H6.5z M17.5,15L14,18.5L10.5,15H13v-4h2v4H17.5z"/></g> +<g id="tab"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h7v4h7V19z"/></g> +<g id="tab-unselected"><path d="M3,9h2V7H3V9z M3,13h2v-2H3V13z M3,5h2V3C3.9,3,3,3.9,3,5z M7,21h2v-2l-2,0V21z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M19,3h-8v6h10V5C21,3.9,20.1,3,19,3z M19,17h2v-2h-2V17z M7,5h2V3H7V5z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,13h2v-2h-2V13z M11,21h2v-2l-2,0V21z M15,21h2v-2l-2,0V21z"/></g> +<g id="text-format"><path d="M5,17v2h14v-2H5z M9.5,12.8h5l0.9,2.2h2.1L12.8,4h-1.5L6.5,15h2.1L9.5,12.8z M12,6l1.9,5h-3.7L12,6z"/></g> +<g id="theaters"><path d="M18,3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3H18z M8,17H6v-2h2V17z M8,13H6v-2h2V13z M8,9H6V7h2V9z M18,17h-2v-2h2V17z M18,13h-2v-2h2V13z M18,9h-2V7h2V9z"/></g> +<g id="thumb-down"><path d="M15,3H6C5.2,3,4.5,3.5,4.2,4.2l-3,7.1C1.1,11.5,1,11.7,1,12v1.9l0,0c0,0,0,0.1,0,0.1c0,1.1,0.9,2,2,2h6.3l-1,4.6c0,0.1,0,0.2,0,0.3c0,0.4,0.2,0.8,0.4,1.1L9.8,23l6.6-6.6c0.4-0.4,0.6-0.9,0.6-1.4V5C17,3.9,16.1,3,15,3z M19,3v12h4V3H19z"/></g> +<g id="thumb-up"><path d="M1,21h4V9H1V21z M23,10c0-1.1-0.9-2-2-2h-6.3l1-4.6c0-0.1,0-0.2,0-0.3c0-0.4-0.2-0.8-0.4-1.1L14.2,1L7.6,7.6C7.2,7.9,7,8.4,7,9v10c0,1.1,0.9,2,2,2h9c0.8,0,1.5-0.5,1.8-1.2l3-7.1c0.1-0.2,0.1-0.5,0.1-0.7V10L23,10C23,10.1,23,10,23,10z"/></g> +<g id="today"><path d="M19,3h-1V1h-2v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V8h14V19z"/><rect x="7" y="10" width="5" height="5"/></g> +<g id="translate"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z M12,19l-2,2h13v-2H12z"/></g> +<g id="undo"><path d="M12,5V1.5l-5,5l5,5V7c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6H4c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8S16.4,5,12,5z"/></g> +<g id="unfold-less"><path d="M7.4,18.6L8.8,20l3.2-3.2l3.2,3.2l1.4-1.4L12,14L7.4,18.6z M16.6,5.4L15.2,4L12,7.2L8.8,4L7.4,5.4L12,10L16.6,5.4z"/></g> +<g id="unfold-more"><path d="M12,5.8L15.2,9l1.4-1.4L12,3L7.4,7.6L8.8,9L12,5.8z M12,18.2L8.8,15l-1.4,1.4L12,21l4.6-4.6L15.2,15L12,18.2z"/></g> +<g id="view-array"><path d="M4,18h3V5H4V18z M18,5v13h3V5H18z M8,18h9V5H8V18z"/></g> +<g id="view-column"><path d="M10,18h5V5h-5V18z M4,18h5V5H4V18z M16,5v13h5V5H16z"/></g> +<g id="view-headline"><path d="M4,15h17v-2H4V15z M4,19h17v-2H4V19z M4,11h17V9H4V11z M4,5v2h17V5H4z"/></g> +<g id="view-list"><path d="M4,14h4v-4H4V14z M4,19h4v-4H4V19z M4,9h4V5H4V9z M9,14h12v-4H9V14z M9,19h12v-4H9V19z M9,5v4h12V5H9z"/></g> +<g id="view-module"><path d="M4,11h5V5H4V11z M4,18h5v-6H4V18z M10,18h5v-6h-5V18z M16,18h5v-6h-5V18z M10,11h5V5h-5V11z M16,5v6h5V5H16z"/></g> +<g id="view-quilt"><path d="M10,18h5v-6h-5V18z M4,18h5V5H4V18z M16,18h5v-6h-5V18z M10,5v6h11V5H10z"/></g> +<g id="view-stream"><path d="M4,18h17v-6H4V18z M4,5v6h17V5H4z"/></g> +<g id="visibility"><path d="M12,4.5C7,4.5,2.7,7.6,1,12c1.7,4.4,6,7.5,11,7.5c5,0,9.3-3.1,11-7.5C21.3,7.6,17,4.5,12,4.5z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5c2.8,0,5,2.2,5,5S14.8,17,12,17z M12,9c-1.7,0-3,1.3-3,3s1.3,3,3,3c1.7,0,3-1.3,3-3S13.7,9,12,9z"/></g> +<g id="visibility-off"><path d="M12,7c2.8,0,5,2.2,5,5c0,0.6-0.1,1.3-0.4,1.8l2.9,2.9c1.5-1.3,2.7-2.9,3.4-4.7c-1.7-4.4-6-7.5-11-7.5c-1.4,0-2.7,0.3-4,0.7l2.2,2.2C10.7,7.1,11.4,7,12,7z M2,4.3l2.3,2.3L4.7,7c-1.7,1.3-3,3-3.7,5c1.7,4.4,6,7.5,11,7.5c1.5,0,3-0.3,4.4-0.8l0.4,0.4l2.9,2.9l1.3-1.3L3.3,3L2,4.3z M7.5,9.8l1.5,1.5C9,11.6,9,11.8,9,12c0,1.7,1.3,3,3,3c0.2,0,0.4,0,0.7-0.1l1.5,1.5C13.5,16.8,12.8,17,12,17c-2.8,0-5-2.2-5-5C7,11.2,7.2,10.5,7.5,9.8z M11.8,9l3.1,3.1c0-0.1,0-0.1,0-0.2c0-1.7-1.3-3-3-3C11.9,9,11.9,9,11.8,9z"/></g> +<g id="warning"><path d="M1,21h22L12,2L1,21z M13,18h-2v-2h2V18z M13,14h-2v-4h2V14z"/></g> +<g id="work"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M14,6h-4V4h4V6z"/></g> +</defs></svg> +</core-iconset-svg> + +<!-- import core-icon for convenience + TODO(sorvell): we'd rather do this in core-iconset but we can't until + crbug.com/373461 is addressed +--> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- + +The `core-icon` element displays an icon using CSS background image. By default an icon renders as 24px square. + +Example using src: + + <core-icon src="star.png"></core-icon> + +Example setting size to 32px x 32px: + + <core-icon src="big_star.png" size="32"></core-icon> + +Example using icon from default iconset: + + <core-icon icon="menu"></core-icon> + +Example using icon `cherry` from custom iconset `fruit`: + + <core-icon icon="fruit:cherry"></core-icon> + +See [core-iconset](#core-iconset) and [core-iconset-svg](#core-iconset-svg) for more information about +how to use a custom iconset. + +See [core-icons](#core-icons) for the default set of icons. To use the default set of icons you'll need to include an import for `core-icons.html`. + +@group Polymer Core Elements +@element core-icon +@homepage polymer.github.io +--> + + +<style shim-shadowdom="">/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +html /deep/ core-icon { + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; +} + +html /deep/ core-icon[size=""] { + position: relative; +} + +html /deep/ core-icon[size=""] > svg { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} +</style> + +<polymer-element name="core-icon" attributes="src size icon" assetpath="../core-icon/"> + + +</polymer-element> + + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-icon-button` is an icon with button behaviors. + + <core-icon-button src="star.png"></core-icon-button> + +`core-icon-button` includes a default icon set. Use `icon` to specify +which icon from the icon set to use. + + <core-icon-button icon="menu"></core-icon-button> + +See [`core-iconset`](#core-iconset) for more information about +how to use a custom icon set. + +@group Polymer Core Elements +@element core-icon-button +@homepage github.io +--> + + + + +<polymer-element name="core-icon-button" attributes="src icon active" assetpath="../core-icon-button/"> + + <template> + + <style>/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +*/ + +:host { + display: inline-block; + box-sizing: border-box; + -moz-box-sizing: border-box; + width: 38px; + height: 38px; + background-image: none; + border-radius: 2px; + padding: 7px; + margin: 2px; + vertical-align: middle; + font-size: 1rem; + cursor: pointer; +} + +:host([disabled]) { + opacity: 0.6; + pointer-events: none; +} + +:host(.outline) { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); +} + +:host(:hover:not([disabled])) { + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1); +} + +:host(.selected:not([disabled])) { + background-color: rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.12); +} + +:host(:active:not([disabled]), .selected:active:not([disabled])) { + background-color: rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.12); +} + +:host(.core-dark-theme.outline) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.1); +} + +:host(.core-dark-theme:hover) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: 0 1px 0 0 rgba(200, 200, 200, 0.12), 0 0 0 1px rgba(200, 200, 200, 0.1); +} + +:host(.core-dark-theme.selected) { + background-color: rgba(220, 220, 220, 0.05); + box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.05), 0 0 0 1px rgba(200, 200, 200, 0.12); +} + +:host(.core-dark-theme:active, .core-dark-theme.selected:active) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.12); +} + +core-icon { + pointer-events: none; +} +</style> + + <core-icon src="{{src}}" icon="{{icon}}"><content></content></core-icon> + + </template> + + + +</polymer-element> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-toolbar` is a horizontal bar containing elements that can be used for +label, navigation, search and actions. + + <core-toolbar> + <core-icon-button icon="menu" on-tap="{{menuAction}}"></core-icon-button> + <div flex>Title</div> + <core-icon-button icon="more" on-tap="{{moreAction}}"></core-icon-button> + </core-toolbar> + +`core-toolbar` has a standard height, but can made be taller by setting `tall` +class on the `core-toolbar`. This will make the toolbar 3x the normal height. + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + </core-toolbar> + +Apply `medium-tall` class to make the toolbar medium tall. This will make the +toolbar 2x the normal height. + + <core-toolbar class="medium-tall"> + <core-icon-button icon="menu"></core-icon-button> + </core-toolbar> + +When taller, elements can pin to either the top (default), middle or bottom. + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + <div class="middle indent">Middle Title</div> + <div class="bottom indent">Bottom Title</div> + </core-toolbar> + +To make an element completely fit at the bottom of the toolbar, use `fit` along +with `bottom`. + + <core-toolbar class="tall"> + <div id="progressBar" class="bottom fit"></div> + </core-toolbar> + +@group Polymer Core Elements +@element core-toolbar +@homepage github.io +--> + + + +<polymer-element name="core-toolbar" assetpath="../core-toolbar/"> +<template> + + <style>/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + /* technical */ + display: block; + position: relative; + box-sizing: border-box; + -moz-box-sizing: border-box; + /* size */ + height: 64px; + /* typography */ + font-size: 1.3em; + /* background */ + background-color: #CFD8DC; +} + +:host(.animate) { + /* transition */ + transition: height 0.18s ease-in; +} + +:host(.medium-tall) { + height: 128px; +} + +:host(.tall) { + height: 192px; +} + +.toolbar-tools { + height: 64px; + padding: 0 8px; + pointer-events: none; +} + +/* narrow layout */ +:host(.narrow) { + height: 56px; +} + +:host(.narrow.medium-tall) { + height: 112px; +} + +:host(.narrow.tall) { + height: 168px; +} + +:host(.narrow) .toolbar-tools { + height: 56px; + padding: 0; +} + +/* middle bar */ +#middleBar { + position: absolute; + top: 0; + right: 0; + left: 0; +} + +:host(.tall, .medium-tall) #middleBar { + -webkit-transform: translateY(100%); + transform: translateY(100%); +} + +/* bottom bar */ +#bottomBar { + position: absolute; + right: 0; + bottom: 0; + left: 0; +} + +/* shows bottom bar only when in normal height (!tall && !medium-tall) */ +:host(.animate.no-overlap) > #topBar, +:host(.animate.no-overlap) > #middleBar { + transition: -webkit-transform 0.18s ease-in; + transition: transform 0.18s ease-in; +} + +:host(.no-overlap:not(.medium-tall):not(.tall)) > #topBar { + -webkit-transform: translateY(-100%); + transform: translateY(-100%); +} + +:host(.no-overlap:not(.medium-tall):not(.tall)) > #middleBar { + -webkit-transform: translateY(-200%); + transform: translateY(-200%); +} + +/* make elements (e.g. buttons) respond to mouse/touch events */ +polyfill-next-selector { content: '.toolbar-tools > *'; } +::content > * { + pointer-events: auto; +} + +/* elements spacing */ +polyfill-next-selector { content: '.toolbar-tools > *'; } +::content > * { + margin: 0px 8px; +} + +/* misc helpers */ +polyfill-next-selector { content: '.toolbar-tools > .fit'; } +::content > .fit { + position: absolute; + top: auto; + right: 0; + bottom: 0; + left: 0; + width: auto; + margin: 0; +} + +polyfill-next-selector { content: ':host .indent'; } +::content > .indent { + margin-left: 60px; +} +</style> + + <div id="bottomBar" class="toolbar-tools" center="" horizontal="" layout=""> + <content select=".bottom"></content> + </div> + + <div id="middleBar" class="toolbar-tools" center="" horizontal="" layout=""> + <content select=".middle"></content> + </div> + + <div id="topBar" class="toolbar-tools" center="" horizontal="" layout=""> + <content></content> + </div> + +</template> +</polymer-element> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-header-panel` contains a header section and a content panel section. + +__Important:__ The `core-header-panel` will not display if its parent does not have a height. + +Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-attrs.html), you can easily make the `core-header-panel` fill the screen + + <body fullbleed layout vertical> + <core-header-panel flex> + <core-toolbar> + <div>Hello World!</div> + </core-toolbar> + </core-header-panel> + </body> + +or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-header-panel` a height of 100%: + + html, body { + height: 100%; + margin: 0; + } + core-header-panel { + height: 100%; + } + +Special +support is provided for scrolling modes when one uses a core-toolbar or equivalent +for the header section. + +Example: + + <core-header-panel> + <core-toolbar>Header</core-toolbar> + <div>Content goes here...</div> + </core-header-panel> + +If you want to use other than `core-toolbar` for the header, add +`core-header` class to that element. + +Example: + + <core-header-panel> + <div class="core-header">Header</div> + <div>Content goes here...</div> + </core-header-panel> + +Use `mode` to control the header and scrolling behavior. + +@group Polymer Core Elements +@element core-header-panel +@homepage github.io +--> + + + +<polymer-element name="core-header-panel" assetpath="../core-header-panel/"> +<template> + + <style>/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; +} + +#outerContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; +} + +#mainPanel { + position: relative; +} + +#mainContainer { + position: relative; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; +} + +#dropShadow { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 6px; + box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4); +} + +#dropShadow.hidden { + display: none; +} + +/* +mode: scroll +*/ +:host([mode=scroll]) #mainContainer { + overflow: visible; +} + +/* +mode: cover +*/ +:host([mode=cover]) #mainPanel { + position: static; +} + +:host([mode=cover]) #mainContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +:host([mode=cover]) #dropShadow { + position: static; + width: 100%; +} +</style> + + <div id="outerContainer" on-scroll="{{scroll}}" vertical="" layout=""> + + <content id="headerContent" select="core-toolbar, .core-header"></content> + + <div id="mainPanel" flex="" vertical="" layout=""> + + <div id="mainContainer" flex?="{{mode !== 'cover'}}" on-scroll="{{scroll}}"> + <content id="mainContent" select="*"></content> + </div> + + <div id="dropShadow"></div> + + </div> + + </div> + +</template> + +</polymer-element> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + + +
+ + +<!-- +Element wrapper for the `marked` (http://marked.org/) library. + +@class marked-element +@blurb Element wrapper for the marked library. +@status alpha +@snap snap.png +--> +<polymer-element name="marked-element" attributes="text" assetpath="../marked-element/"> + +</polymer-element> + + +
+ + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Polymer Core Elements + +The `core-ajax` element exposes `XMLHttpRequest` functionality. + + <core-ajax + auto + url="http://gdata.youtube.com/feeds/api/videos/" + params='{"alt":"json", "q":"chrome"}' + handleAs="json" + on-core-response="{{handleResponse}}"></core-ajax> + +With `auto` set to `true`, the element performs a request whenever +its `url` or `params` properties are changed. + +Note: The `params` attribute must be double quoted JSON. + +You can trigger a request explicitly by calling `go` on the +element. + +@element core-ajax +@status beta +@homepage github.io +--> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +/** + * @group Polymer Core Elements + * + * core-xhr can be used to perform XMLHttpRequests. + * + * <core-xhr id="xhr"></core-xhr> + * ... + * this.$.xhr.request({url: url, params: params, callback: callback}); + * + * @element core-xhr + */ +--> + + + +<polymer-element name="core-xhr" hidden assetpath="../core-ajax/"> + + + +</polymer-element> + +<polymer-element name="core-ajax" attributes="url handleAs auto params response method headers body contentType withCredentials" assetpath="../core-ajax/"> + +</polymer-element> + + +<!-- +Scrapes source documentation data from input text or url. + +@class context-free-parser +--> +<polymer-element name="context-free-parser" attributes="url text data" assetpath="../context-free-parser/"> +<template> + + <core-ajax url="{{url}}" response="{{text}}" auto=""></core-ajax> + +</template> + +</polymer-element> + + +<!-- + +Displays formatted source documentation scraped from input urls. + +@element core-doc-page +--> + +<polymer-element name="core-doc-page" attributes="data" assetpath="../core-doc-viewer/elements/"> + +<!-- + +Set url to add documentation from that location to the view. + +@attribute url +@type String +--> + + <template> + + <style>:host { + display: block; + position: relative; +} + +#panel { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.main { + padding: 0 72px; + max-width: 832px; + margin: 0 auto; +} + +markedjs-element { + display: block; +} + +h1 { + font-size: 52px; + color: #E91E63 +} + +.element { + font-size: 21px; +} + +.name { + /* typography */ + color: white; + /* font-size: 14px; */ + font-size: 12px; + font-weight: bold; + text-decoration: none; + /* colors / effects */ + background-color: #999; + box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1); + border-radius: 2px; + cursor: pointer; + /* metrics */ + display: inline-block; + padding: 4px 12px 5px 12px; + margin: 4px 0; +} + +.ntitle { + font-size: 26px; + padding-bottom: 4px; + border-bottom: 1px solid whitesmoke; +} + +.box { + margin-bottom: 40px; +} + +.top pre { + padding: 12px 13px; + background-color: #f8f8f8; +} + +code { + font-family: Consolas, monospace; + border: 1px solid #ddd; + background-color: #f8f8f8; + border-radius: 3px; + padding: 0 3px; +} + +pre code { + max-width: 832px; + white-space: pre-wrap; + overflow: hidden; + border: none; +} + +/**/ + +.details { + display: flex; +} + +.details-name { + flex: 1; +} + +.details-info { + flex: 2; +} + +.attribute-box { +} + +.attribute-box .details { + background-color: #FFF9C4; + padding: 8px 16px; + border-bottom: 1px solid #D1CCA1; +} + +.attribute-box .ntitle { + padding: 24px 16px; +} + +.attribute-box code { + color: #FFAB40; + border: none; + background-color: transparent; + border-radius: none; + padding: 0; + font-size: 1.2em; +} + +.property-box .ntitle { + padding: 24px 16px; +} + +.property-box code { + color: #4285F4; + border: none; + background-color: transparent; + border-radius: none; + padding: 0; + font-size: 1.2em; +} + +.property-box .details { + background-color: lightblue; + padding: 8px 16px; + border-bottom: 1px solid #D1CCA1; +} + +.method-box { +} + +.method-box .details { + background-color: #F0F4C3; + padding: 8px 16px; + border-bottom: 1px solid #D1CCA1; +} + +.method-box .ntitle { + background-color: #9E9D24; + padding: 24px 16px; +} + +.method-box code { + color: #9E9D24; + border: none; + background-color: transparent; + border-radius: none; + padding: 0; + font-size: 1.2em; +} + +.event-box { +} + +.event-box .details { + background-color: #B2DFDB; + padding: 8px 16px; + border-bottom: 1px solid #92B7B3; +} + +.event-box .ntitle { + background-color: #009688; + padding: 24px 16px; +} + +.event-box code { + color: #009688; + border: none; + background-color: transparent; + border-radius: none; + padding: 0; + font-size: 1.2em; +} + +code, pre { + color: #9f499b; + font-family: "Source Code Pro",Monaco,Menlo,Consolas,"Courier New",monospace; +} + +pre .typ,pre .inline,.prettyprint .typ,.prettyprint .inline { + color: #6b499f +} +pre .pun,.prettyprint .pun { + color: #5c6bc0 +} +pre .str,pre .string,.prettyprint .str,.prettyprint .string { + color: #ff4081 +} +pre .pln,.prettyprint .pln { + color: #7986cb +} +pre .kwd,.prettyprint .kwd { + color: #d61a7f +} +pre .atn,pre .attribute-name,.prettyprint .atn,.prettyprint .attribute-name { + color: #6b499f +} +pre .atv,pre .attribute-value,.prettyprint .atv,.prettyprint .attribute-value { + color: #7986cb +} +pre .com,pre .comment,.prettyprint .com,.prettyprint .comment { + color: #8a8a8a +}</style> + + <core-header-panel id="panel" mode="waterfall"> + + <!--<core-toolbar> + <span style="margin: 0 72px;">{{data.name}}</span> + </core-toolbar>--> + + <div class="main" on-marked-js-highlight="{{hilight}}"> + + <h1 style="font-size: 52px; color: #E91E63;"> + {{data.name}} + </h1> + + <p> + <core-icon icon="home"></core-icon> <a href="{{data | homepageFilter}}">Home Page</a> + </p> + + <template if="{{data.extends}}"> + <section class="box"> + <div class="ntitle">Extends</div> + <p><a href="#{{data.extends}}">{{data.extends}}</a></p> + </section> + </template> + + <template if="{{data.description}}"> + <section class="box top"> + <div class="ntitle">Summary</div> + <marked-element text="{{data.description}}"></marked-element> + </section> + </template> + + <template if="{{data.attributes.length}}"> + <section class="box attribute-box"> + <div class="ntitle" style="background-color: #FFAB40; color: white;">Attributes</div> + <template repeat="{{data.attributes}}"> + <div class="details"> + <div class="details-name"> + <p><code>{{name}}</code></p> + </div> + <div class="details-info"> + <p><code>{{type}}</code></p> + <marked-element text="{{description}}"></marked-element> + </div> + </div> + </template> + </section> + </template> + + <template if="{{data.properties.length}}"> + <section class="box property-box"> + <div class="ntitle" style="background-color: #4285F4; color: white;">Properties</div> + <template repeat="{{data.properties}}"> + <div class="details"> + <div class="details-name"> + <p><code>{{name}}</code></p> + </div> + <div class="details-info"> + <p><code>{{type}}</code></p> + <marked-element text="{{description}}"></marked-element> + </div> + </div> + </template> + </section> + </template> + + <template if="{{data.events.length}}"> + <section class="box event-box"> + <div class="ntitle" style="color: white;">Events</div> + <template repeat="{{data.events}}"> + <div class="details"> + <div class="details-name"> + <p><code>{{name}}</code></p> + </div> + <div class="details-info"> + <marked-element text="{{description}}"></marked-element> + </div> + </div> + </template> + </section> + </template> + + <template if="{{data.methods.length}}"> + <section class="box method-box"> + <div class="ntitle" style="color: white;">Methods</div> + <template repeat="{{data.methods}}"> + <div class="details"> + <div class="details-name"> + <p><code>{{name}}</code></p> + </div> + <div class="details-info"> + <marked-element text="{{description}}"></marked-element> + </div> + </div> + </template> + </section> + </template> + + </div> + + </core-header-panel> + + </template> + + + +</polymer-element> +
+
+
+
+<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-menu` is a selector which styles to looks like a menu. + + <core-menu selected="0"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + +When an item is selected the `core-selected` class is added to it. The user can +use the class to add more stylings to the selected item. + + core-item.core-selected { + color: red; + } + +The `selectedItem` property references the selected item. + + <core-menu selected="0" selectedItem="{{item}}"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + + <div>selected label: {{item.label}}</div> + +The `core-select` event signals selection change. + + <core-menu selected="0" on-core-select="{{selectAction}}"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + + ... + + selectAction: function(e, detail) { + if (detail.isSelected) { + var selectedItem = detail.item; + ... + } + } + +@group Polymer Core Elements +@element core-menu +@extends core-selector +--> + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Polymer Core Elements + +`<core-selector>` is used to manage a list of elements that can be selected. + +The attribute `selected` indicates which item element is being selected. +The attribute `multi` indicates if multiple items can be selected at once. +Tapping on the item element would fire `core-activate` event. Use +`core-select` event to listen for selection changes. + +Example: + + <core-selector selected="0"> + <div>Item 1</div> + <div>Item 2</div> + <div>Item 3</div> + </core-selector> + +`<core-selector>` is not styled. Use the `core-selected` CSS class to style the selected element. + + <style> + .item.core-selected { + background: #eee; + } + </style> + ... + <core-selector> + <div class="item">Item 1</div> + <div class="item">Item 2</div> + <div class="item">Item 3</div> + </core-selector> + +@element core-selector +@status stable +@homepage github.io +--> + +<!-- +Fired when an item's selection state is changed. This event is fired both +when an item is selected or deselected. The `isSelected` detail property +contains the selection state. + +@event core-select +@param {Object} detail + @param {boolean} detail.isSelected true for selection and false for deselection + @param {Object} detail.item the item element +--> +<!-- +Fired when an item element is tapped. + +@event core-activate +@param {Object} detail + @param {Object} detail.item the item element +--> + + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +@group Polymer Core Elements + +The `<core-selection>` element is used to manage selection state. It has no +visual appearance and is typically used in conjunction with another element. +For example, [core-selector](#core-selector) +use a `<core-selection>` to manage selection. + +To mark an item as selected, call the `select(item)` method on +`<core-selection>`. The item itself is an argument to this method. + +The `<core-selection>`element manages selection state for any given set of +items. When an item is selected, the `core-select` event is fired. + +The attribute `multi` indicates if multiple items can be selected at once. + +Example: + + <polymer-element name="selection-example"> + <template> + <style> + polyfill-next-selector { content: ':host > .selected'; } + ::content > .selected { + font-weight: bold; + font-style: italic; + } + </style> + <ul on-tap="{{itemTapAction}}"> + <content></content> + </ul> + <core-selection id="selection" multi + on-core-select="{{selectAction}}"></core-selection> + </template> + <script> + Polymer('selection-example', { + itemTapAction: function(e, detail, sender) { + this.$.selection.select(e.target); + }, + selectAction: function(e, detail, sender) { + detail.item.classList.toggle('selected', detail.isSelected); + } + }); + </script> + </polymer-element> + + <selection-example> + <li>Red</li> + <li>Green</li> + <li>Blue</li> + </selection-example> + +@element core-selection +--> + +<!-- +Fired when an item's selection state is changed. This event is fired both +when an item is selected or deselected. The `isSelected` detail property +contains the selection state. + +@event core-select +@param {Object} detail + @param {boolean} detail.isSelected true for selection and false for de-selection + @param {Object} detail.item the item element +--> + + +<polymer-element name="core-selection" attributes="multi" hidden assetpath="../core-selection/"> + +</polymer-element> + + +<polymer-element name="core-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent" assetpath="../core-selector/"> + + <template> + <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection> + <content id="items" select="*"></content> + </template> + + +</polymer-element> + + +<style shim-shadowdom="">/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +html /deep/ core-menu { + display: block; + margin: 12px; +} + +polyfill-next-selector { content: 'core-menu > core-item'; } +html /deep/ core-menu::shadow ::content > core-item { + cursor: default; +} +</style> + +<polymer-element name="core-menu" extends="core-selector" assetpath="../core-menu/"> + +</polymer-element> +
+<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-item` is a simple line-item object: a label and/or an icon that can also +act as a link. + +Example: + + <core-item icon="settings" label="Settings"></core-item> + +To use as a link, put <a> element in the item. + +Example: + + <core-item icon="settings" label="Settings"> + <a href="#settings" target="_self"></a> + </core-item> + +@group Polymer Core Elements +@element core-item +@homepage github.io +--> + + + +<style shim-shadowdom="">/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +html /deep/ core-item { + display: block; + position: relative; + min-height: 40px; + white-space: nowrap; +} + +html /deep/ core-item.core-selected { + font-weight: bold; +} + +html /deep/ core-item::shadow core-icon { + margin: 0 16px 0 4px; +} + +html /deep/ core-item::shadow ::content > a { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} +</style> + +<polymer-element name="core-item" attributes="label icon src" horizontal="" center="" layout="" assetpath="../core-item/"> +<template> + + <core-icon src="{{src}}" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon>{{label}}<content></content> + +</template> + +</polymer-element> +
+
+<!--
+@class core-doc-toc
+-->
+
+<polymer-element name="core-doc-toc" attributes="data selected" assetpath="../core-doc-viewer/elements/">
+
+ <template>
+
+ <style>:host { + display: block; + position: relative; + border-right: 1px solid silver; +} + +core-header-panel { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%;
+} + +core-toolbar {
+ background-color: #eeeeee;
+} +</style>
+
+ <core-header-panel mode="waterfall">
+
+<!-- <core-toolbar theme="core-light-theme">
+ <core-icon-button icon="menu"></core-icon-button>
+ <span core-flex>Topics</span>
+ <core-icon-button icon="search" on-tap="{{searchAction}}"></core-icon-button>
+ </core-toolbar>
+
+ <core-toolbar id="searchBar" style="background-color: #C2185B; position: absolute; top: 0; left: 0; right: 0; opacity: 0; display: none;" class="seamed" theme="core-dark-theme">
+ <core-icon-button icon="search"></core-icon-button>
+ <core-icon-button icon="close" on-tap="{{closeSearchAction}}"></core-icon-button>
+ </core-toolbar>-->
+
+ <core-menu selected="{{selected}}">
+ <template repeat="{{data}}">
+ <core-item><a href="#{{name}}">{{name}}</a></core-item>
+ </template>
+ </core-menu>
+
+ </core-header-panel>
+
+ </template>
+
+
+
+</polymer-element>
+ + + +<!-- +Displays formatted source documentation scraped from input urls. + +Documentation can be encoded into html comments (<!-- ... -->) or using JsDoc notation (/** ... */). + +When using JsDoc notation, remember that the left-margin includes an asterisk and a single space. +This is important for markdown constructs that count spaces. Code blocks for example, must be +five spaces from the first asterisk. + +## Markdown + +Markdown format is supported. + +### Links + +Arbitrary links can be encoded using [standard markdown format](http://daringfireball.net/projects/markdown/syntax). +[GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown) is also supported. + +Links to other topics can be made with hash-links [core-doc-viewer](#core-doc-viewer). + +### Code + +Example + + Four space indents indicate code blocks. + + <code>blocks are syntax highlighted</code> + + <script> + while(true) { + javascript('is highlighted also'); + } + </script> + +### Blockquote + + > Blockquote is supported for long text that needs to wrap with a common left side indent. + > Blockquote is supported for long text that needs to wrap with a common left side indent. + +### Lists + +1. enumerated +1. lists + +Use - or + for bullet points: + +- bullet +- lists + +### Tables + +| First Header | Second Header | +| ------------- | ------------- | +| Content Cell | Content Cell | +| Content Cell | Content Cell | + +### HTML + +Arbitrary HTML is also supported + +<input><button>Button</button><hr/> + +@class core-doc-viewer +@homepage github.io +--> + +<polymer-element name="core-doc-viewer" attributes="sources route url" assetpath="../core-doc-viewer/"> + + <template> + + <style> + + core-doc-toc { + display: none; + width: 332px; + overflow-x: hidden; + } + + </style> + + <context-free-parser url="{{url}}" on-data-ready="{{parserDataReady}}"></context-free-parser> + + <template repeat="{{sources}}"> + <context-free-parser url="{{}}" on-data-ready="{{parserDataReady}}"></context-free-parser> + </template> + + <core-layout></core-layout> + <core-doc-toc id="toc" data="{{classes}}" selected="{{selected}}"></core-doc-toc> + <core-doc-page core-flex="" data="{{data}}"></core-doc-page> + + </template> + + + +</polymer-element> +</div> +<div hidden>undefined</div> + +<!-- + +Implements the default landing page for Polymer components. + +`<core-component-page>` can render an information page for any component. +Polymer components use this component in `index.html` to provide the standard landing page. + +`<core-component-page>` is _vulcanized_, which means it contains all it's dependencies baked in. +Therefore, this component is intended to be used only by itself in a page. + +This *-dev package contains the raw source and the dependency manifest necessary +to reconstruct `core-component-page\core-component-page.html` via vulcanize. + +`<core-component-page>` will set the page title automatically. + +@group Polymer Core Elements +@element core-component-page + +--> + +<polymer-element name="core-component-page" attributes="moduleName sources" assetpath="../core-component-page-dev/"> + + <template> + + <style>/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + font-family: Arial, sans-serif; + height: 100vh; +} + +h2 { + display: inline-block; + margin: 8px 6px; + vertical-align: middle; +} + +.choiceB, .choiceC, .choiceD { + /* typography */ + color: white; + /* font-size: 14px; */ + font-size: 12px; + font-weight: bold; + text-decoration: none; + /* colors / effects */ + background-color: #4285F4; + box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1); + border-radius: 2px; + cursor: pointer; + /* metrics */ + display: inline-block; + padding: 4px 12px 5px 12px; + margin: 4px 0; +} + +.appbar { + background-color: #E91E63;
+ color: white; +} +</style> + + <core-layout vertical=""></core-layout> + + <core-toolbar class="appbar"> + <span>{{moduleName}}</span> + <a class="choiceC" target="_blank" href="../{{moduleName}}/demo.html">demo</a> + </core-toolbar> + + <core-doc-viewer core-flex="" url="{{url}}" sources="{{sources}}"></core-doc-viewer> + + </template> + + + +</polymer-element> +<script src="core-component-page-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-component-page/demo.html b/third_party/polymer/components-chromium/core-component-page/demo.html new file mode 100644 index 0000000..fb80e5f --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/demo.html @@ -0,0 +1,23 @@ +<!doctype html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
+-->
+<html>
+<head>
+
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="../polymer/polymer.html">
+ <link rel="import" href="core-component-page.html">
+
+</head>
+<body unresolved>
+
+ <core-component-page></core-component-page>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-component-page/index.html b/third_party/polymer/components-chromium/core-component-page/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-component-page/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-drag-drop/.bower.json b/third_party/polymer/components-chromium/core-drag-drop/.bower.json new file mode 100644 index 0000000..3769671 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drag-drop/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "core-drag-drop", + "homepage": "https://github.com/Polymer/core-drag-drop", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "972d6d04eaa25f38ab206392271a4a8988217e47" + }, + "_source": "git://github.com/Polymer/core-drag-drop.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-drag-drop" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop-extracted.js b/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop-extracted.js new file mode 100644 index 0000000..8d7f994 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop-extracted.js @@ -0,0 +1,80 @@ + + + Polymer('core-drag-drop', { + + observe: { + 'x y': 'coordinatesChanged' + }, + + ready: function() { + if (!this.__proto__.avatar) { + this.__proto__.avatar = document.createElement('core-drag-avatar'); + document.body.appendChild(this.avatar); + } + this.dragging = false; + }, + + draggingChanged: function() { + this.avatar.style.display = this.dragging ? '' : 'none'; + }, + + coordinatesChanged: function() { + var x = this.x, y = this.y; + this.avatar.style.transform = + this.avatar.style.webkitTransform = + 'translate(' + x + 'px, ' + y + 'px)'; + }, + + attached: function() { + var listen = function(event, handler) { + Polymer.addEventListener(this.parentNode, event, this[handler].bind(this)); + }.bind(this); + // + listen('trackstart', 'trackStart'); + listen('track', 'track'); + listen('trackend', 'trackEnd'); + // + var host = this.parentNode.host || this.parentNode; + host.style.cssText += '; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;'; + }, + + trackStart: function(event) { + this.avatar.style.cssText = ''; + this.dragInfo = { + event: event, + avatar: this.avatar + }; + this.fire('drag-start', this.dragInfo); + // flaw #1: what if user doesn't need `drag()`? + this.dragging = Boolean(this.dragInfo.drag); + }, + + track: function(event) { + if (this.dragging) { + this.x = event.pageX; + this.y = event.pageY; + this.dragInfo.event = event; + this.dragInfo.p = {x : this.x, y: this.y}; + this.dragInfo.drag(this.dragInfo); + } + }, + + trackEnd: function(event) { + if (this.dragging) { + this.dragging = false; + if (this.dragInfo.drop) { + this.dragInfo.framed = this.framed(event.relatedTarget); + this.dragInfo.event = event; + this.dragInfo.drop(this.dragInfo); + } + } + this.dragInfo = null; + }, + + framed: function(node) { + var local = node.getBoundingClientRect(); + return {x: this.x - local.left, y: this.y - local.top}; + } + + }); + diff --git a/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop.html b/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop.html new file mode 100644 index 0000000..2145519 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drag-drop/core-drag-drop.html @@ -0,0 +1,31 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> + +<style> + core-drag-avatar { + position: fixed; + left: 0; + top: 0; + display: block; + pointer-events: none; + } +</style> + +<!-- +@group Polymer Core Elements +@element core-drag-drop +@homepage github.io +--> + +<polymer-element name="core-drag-drop" assetpath=""> + +</polymer-element> +<script src="core-drag-drop-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-drag-drop/demo.html b/third_party/polymer/components-chromium/core-drag-drop/demo.html new file mode 100644 index 0000000..387430e --- /dev/null +++ b/third_party/polymer/components-chromium/core-drag-drop/demo.html @@ -0,0 +1,93 @@ +<!doctype html> +<html lang="en"> +<head> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, user-scalable=no"> + + <title>Core Drag Drop</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-drag-drop.html"> + + <style> + + html { + font-family: 'Helvetica Neue', 'Roboto', 'Arial', sans-serif; + }
+
+ body {
+ height: 100vh;
+ margin: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ } + + .box {
+ display: inline-block;
+ width: 100px;
+ height: 100px;
+ margin: 16px;
+ } + + .dropped {
+ position: absolute;
+ border: 1px solid black;
+ width: 5px;
+ height: 5px;
+ } + + </style> + +</head> +<body unresolved> + + <div style="border: 1px dotted silver;"> + + <core-drag-drop></core-drag-drop> + + <div class="box" style="background-color: lightblue;" draggable="false"></div> + + <div class="box" style="background-color: orange;" draggable="false"></div> + + <div class="box" style="background-color: lightgreen;" draggable="false"></div> + + <div id="hello">Hello World</div> + + </div> + + <br><br><br><br><br><br> + + <div id="drop" class="box" style="border: 3px solid silver; position: relative; width: 300px; height: 300px;" draggable="false"></div> + + <script> + addEventListener('drag-start', function(e) { + var dragInfo = e.detail; + // flaw #2: e vs dragInfo.event + var color = dragInfo.event.target.style.backgroundColor; + dragInfo.avatar.style.cssText = 'border: 3px solid ' + color + '; width: 32px; height: 32px; border-radius: 32px; background-color: whitesmoke'; + e.detail.avatar.appendChild(document.querySelector('#hello')); + dragInfo.drag = function() {}; + dragInfo.drop = drop; + }); + // + function drop(dragInfo) { + var color = dragInfo.avatar.style.borderColor; + var dropTarget = dragInfo.event.relatedTarget; + if (color && dropTarget.id === 'drop') { + var f = dragInfo.framed; + var d = document.createElement('div'); + d.className = 'dropped'; + d.style.left = f.x - 4 + 'px'; + d.style.top = f.y - 4 + 'px'; + d.style.backgroundColor = color; + dropTarget.appendChild(d); + dropTarget.style.backgroundColor = color; + } + } + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-drag-drop/index.html b/third_party/polymer/components-chromium/core-drag-drop/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drag-drop/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-drawer-panel/.bower.json b/third_party/polymer/components-chromium/core-drawer-panel/.bower.json new file mode 100644 index 0000000..0811395 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-drawer-panel", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-drawer-panel", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "1ddf02182a57786bb97764dcabf05dee7fcac288" + }, + "_source": "git://github.com/Polymer/core-drawer-panel.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-drawer-panel" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-drawer-panel/README.md b/third_party/polymer/components-chromium/core-drawer-panel/README.md new file mode 100644 index 0000000..16ee436 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/README.md @@ -0,0 +1,4 @@ +core-drawer-panel +================== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-drawer-panel) for more information. diff --git a/third_party/polymer/components-chromium/core-drawer-panel/bower.json b/third_party/polymer/components-chromium/core-drawer-panel/bower.json new file mode 100644 index 0000000..a53e2a7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-drawer-panel", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel-extracted.js b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel-extracted.js new file mode 100644 index 0000000..6f08064 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel-extracted.js @@ -0,0 +1,192 @@ + + + Polymer('core-drawer-panel', { + /** + * Fired when the narrow layout changes. + * + * @event core-responsive-change + * @param {Object} detail + * @param {boolean} detail.narrow true if the panel is in narrow layout. + */ + + publish: { + + /** + * Width of the drawer panel. + * + * @attribute drawerWidth + * @type string + * @default '256px' + */ + drawerWidth: '256px', + + /** + * Max-width when the panel changes to narrow layout. + * + * @attribute responsiveWidth + * @type string + * @default '640px' + */ + responsiveWidth: '640px', + + /** + * The panel that is being selected. `drawer` for the drawer panel and + * `main` for the main panel. + * + * @attribute selected + * @type string + * @default null + */ + selected: {value: null, reflect: true}, + + /** + * The panel to be selected when `core-drawer-panel` changes to narrow + * layout. + * + * @attribute defaultSelected + * @type string + * @default 'main' + */ + defaultSelected: 'main', + + /** + * Returns true if the panel is in narrow layout. This is useful if you + * need to show/hide elements based on the layout. + * + * @attribute narrow + * @type boolean + * @default false + */ + narrow: {value: false, reflect: true}, + + /** + * If true, position the drawer to the right. + * + * @attribute rightDrawer + * @type boolean + * @default false + */ + rightDrawer: false, + + /** + * If true, swipe to open/close the drawer is disabled. + * + * @attribute disableSwipe + * @type boolean + * @default false + */ + disableSwipe: false + }, + + eventDelegates: { + trackstart: 'trackStart', + trackx: 'trackx', + trackend: 'trackEnd' + }, + + transition: false, + + edgeSwipeSensitivity : 15, + + dragging : false, + + domReady: function() { + // to avoid transition at the beginning e.g. page loads + // NOTE: domReady is already raf delayed and delaying another frame + // ensures a layout has occurred. + this.async(function() { + this.transition = true; + }); + }, + + /** + * Toggles the panel open and closed. + * + * @method togglePanel + */ + togglePanel: function() { + this.selected = this.selected === 'main' ? 'drawer' : 'main'; + }, + + /** + * Opens the drawer. + * + * @method openDrawer + */ + openDrawer: function() { + this.selected = 'drawer'; + }, + + /** + * Closes the drawer. + * + * @method closeDrawer + */ + closeDrawer: function() { + this.selected = 'main'; + }, + + queryMatchesChanged: function() { + if (this.queryMatches) { + this.selected = this.defaultSelected; + } + this.narrow = this.queryMatches; + this.setAttribute('touch-action', + this.narrow && !this.disableSwipe ? 'pan-y' : ''); + this.fire('core-responsive-change', {narrow: this.narrow}); + }, + + // swipe support for the drawer, inspired by + // https://github.com/Polymer/core-drawer-panel/pull/6 + trackStart : function(e) { + if (this.narrow && !this.disableSwipe) { + this.dragging = true; + + if (this.selected === 'main') { + this.dragging = this.rightDrawer ? + e.pageX >= this.offsetWidth - this.edgeSwipeSensitivity : + e.pageX <= this.edgeSwipeSensitivity; + } + + if (this.dragging) { + this.width = this.$.drawer.offsetWidth; + this.transition = false; + e.preventTap(); + } + } + }, + + trackx : function(e) { + if (this.dragging) { + var x; + if (this.rightDrawer) { + x = Math.max(0, (this.selected === 'main') ? this.width + e.dx : e.dx); + } else { + x = Math.min(0, (this.selected === 'main') ? e.dx - this.width : e.dx); + } + this.moveDrawer(x); + } + }, + + trackEnd : function(e) { + if (this.dragging) { + this.dragging = false; + this.transition = true; + this.moveDrawer(null); + + if (this.rightDrawer) { + this.selected = e.xDirection > 0 ? 'main' : 'drawer'; + } else { + this.selected = e.xDirection > 0 ? 'drawer' : 'main'; + } + } + }, + + moveDrawer: function(translateX) { + var s = this.$.drawer.style; + s.webkitTransform = s.transform = + translateX === null ? '' : 'translate3d(' + translateX + 'px, 0, 0)'; + } + + }); + diff --git a/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.css b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.css new file mode 100644 index 0000000..62cf44b --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.css @@ -0,0 +1,146 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: hidden; +} + +#drawer { + position: absolute; + top: 0; + left: 0; + height: 100%; + box-sizing: border-box; + -mox-box-sizing: border-box; +} + +.transition #drawer { + transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; + transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; +} + +/* +right-drawer: make drawer on the right side +*/ +.right-drawer #drawer { + left: auto; + right: 0; +} + +.right-drawer.transition #drawer { + transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; + transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; +} + +polyfill-next-selector { content: ':host [drawer]'; } +::content[select="[drawer]"] > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +#main { + position: absolute; + top: 0; + right: 0; + bottom: 0; +} + +.transition #main { + transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; +} + +.right-drawer #main { + left: 0; +} + +.right-drawer.transition #main { + transition: right ease-in-out 0.3s, padding ease-in-out 0.3s; +} + +polyfill-next-selector { content: '#main > [main]'; } +::content[select="[main]"] > * { + height: 100%; +} + +#scrim { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.3); + visibility: hidden; + opacity: 0; + transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s; +} + +/* +narrow layout +*/ +.narrow-layout > #drawer.core-selected { + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); +} + +.right-drawer.narrow-layout > #drawer.core-selected { + box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15); +} + +polyfill-next-selector { content: ':host .narrow-layout > #drawer > [drawer]'; } +.narrow-layout > #drawer > ::content[select="[drawer]"] > * { + border: 0; +} + +.narrow-layout > #drawer:not(.core-selected) { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} + +.right-drawer.narrow-layout > #drawer:not(.core-selected) { + left: auto; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} + +.narrow-layout > #main { + left: 0 !important; + padding: 0; +} + +.right-drawer.narrow-layout > #main { + left: 0; + right: 0; + padding: 0; +} + +.narrow-layout > #main:not(.core-selected) #scrim, +.dragging #scrim { + visibility: visible; + opacity: 1; +} + +polyfill-next-selector { content: ':host .narrow-layout > #main > [main]'; } +.narrow-layout > #main > ::content[select="[main]"] > * { + margin: 0; + min-height: 100%; + left: 0; + right: 0; + box-sizing: border-box; + -moz-box-sizing: border-box; +} diff --git a/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.html b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.html new file mode 100644 index 0000000..5294030 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/core-drawer-panel.html @@ -0,0 +1,82 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-drawer-panel` contains a drawer panel and a main panel. The drawer +and the main panel are side-by-side with drawer on the left. When browser +window size is smaller than the `responsiveWidth`, `core-drawer-panel` +changes to narrow layout. In narrow layout, the drawer will be stacked on top +of the main panel. The drawer will be slided in/out to hide/reveal the main +panel. + +Use the attribute `drawer` to indicate the element is a drawer panel and +`main` to indicate is a main panel. + +Example: + + <core-drawer-panel> + <div drawer> Drawer panel... </div> + <div main> Main panel... </div> + </core-drawer-panel> + +The drawer and the main panels are not scrollable. You can set CSS overflow +property on the elements to make them scrollable or use `core-header-panel`. + +Example: + + <core-drawer-panel> + <core-header-panel drawer> + <core-toolbar></core-toolbar> + <div> Drawer content... </div> + </core-header-panel> + <core-header-panel main> + <core-toolbar></core-toolbar> + <div> Main content... </div> + </core-header-panel> + </core-drawer-panel> + +To position the drawer to the right, add `rightDrawer` attribute. + + <core-drawer-panel rightDrawer> + <div drawer> Drawer panel... </div> + <div main> Main panel... </div> + </core-drawer-panel> + +@group Polymer Core Elements +@element core-drawer-panel +@homepage github.io +--> + +<link rel="import" href="../core-media-query/core-media-query.html"> +<link rel="import" href="../core-selector/core-selector.html"> + +<polymer-element name="core-drawer-panel" touch-action="auto" assetpath=""> +<template> + + <link rel="stylesheet" href="core-drawer-panel.css"> + + <core-media-query query="max-width: {{responsiveWidth}}" querymatches="{{queryMatches}}"></core-media-query> + + <core-selector class="{{ {'narrow-layout' : queryMatches, transition : transition, dragging : dragging, 'right-drawer': rightDrawer} | tokenList }}" valueattr="id" selected="{{selected}}"> + + <div id="main" _style="left: {{ narrow || rightDrawer ? '0' : drawerWidth }}; right: {{ rightDrawer ? (narrow ? '' : drawerWidth) : '' }};"> + <content select="[main]"></content> + <div id="scrim" on-tap="{{togglePanel}}"></div> + </div> + + <div id="drawer" _style="width: {{ drawerWidth }}"> + <content select="[drawer]"></content> + </div> + + </core-selector> + +</template> + +</polymer-element> +<script src="core-drawer-panel-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-drawer-panel/demo.html b/third_party/polymer/components-chromium/core-drawer-panel/demo.html new file mode 100644 index 0000000..b35febf --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/demo.html @@ -0,0 +1,73 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> + <head> + <title>core-drawer-panel</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-drawer-panel.html"> + + <style> + + html, body { + height: 100%; + } + + body { + font-family: sans-serif; + color: #FFF; + margin: 0; + } + + [drawer] { + background-color: #B99588; + border-right: 1px solid #ccc; + } + + [main] { + height: 100%; + background-color: #4F7DC9; + } + + button { + display: none; + width: 160px; + height: 40px; + font-size: 16px; + margin: 8px; + } + + core-drawer-panel[narrow] button { + display: inline-block + } + + </style> + + </head> + + <body unresolved> + + <core-drawer-panel> + + <div drawer></div> + + <div main> + <button onclick="document.querySelector('core-drawer-panel').togglePanel();">toggle drawer</button> + </div> + + </core-drawer-panel> + + </body> +</html> diff --git a/third_party/polymer/components-chromium/core-drawer-panel/index.html b/third_party/polymer/components-chromium/core-drawer-panel/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-drawer-panel/metadata.html b/third_party/polymer/components-chromium/core-drawer-panel/metadata.html new file mode 100644 index 0000000..086d2db --- /dev/null +++ b/third_party/polymer/components-chromium/core-drawer-panel/metadata.html @@ -0,0 +1,28 @@ +<x-meta id="section" label="Section" isContainer group="Core"> + + <template> + + <section style="width: 200px; height: 300px;" layout vertical></section> + + </template> + +</x-meta> + +<x-meta id="core-drawer-panel" label="Drawer Panel" isContainer group="Core"> + + <template> + + <core-drawer-panel style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;"> + <section drawer style="background-color: #fafafa; box-shadow: rgba(0, 0, 0, 0.098) 0px 2px 4px, rgba(0, 0, 0, 0.098) 0px 0px 3px;"></section> + <section main style="height: 100%; box-sizing: border-box; background-color: #ddd"></section> + </core-drawer-panel> + + </template> + + <template id="imports"> + + <link rel="import" href="core-drawer-panel.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-dropdown/.bower.json b/third_party/polymer/components-chromium/core-dropdown/.bower.json new file mode 100644 index 0000000..7f671db --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/.bower.json @@ -0,0 +1,23 @@ +{ + "name": "core-dropdown", + "private": false, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-item": "Polymer/core-item#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay" + }, + "homepage": "https://github.com/Polymer/core-dropdown", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "9fff79ebe5f462917fc466a2d9bc7eeb403b9bb3" + }, + "_source": "git://github.com/Polymer/core-dropdown.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-dropdown" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-dropdown/README.md b/third_party/polymer/components-chromium/core-dropdown/README.md new file mode 100644 index 0000000..8344443 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/README.md @@ -0,0 +1,6 @@ +core-dropdown +============= + +owner: @morethanreal + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-dropdown) for more information. diff --git a/third_party/polymer/components-chromium/core-dropdown/bower.json b/third_party/polymer/components-chromium/core-dropdown/bower.json new file mode 100644 index 0000000..cd36db2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/bower.json @@ -0,0 +1,12 @@ +{ + "name": "core-dropdown", + "private": false, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-item": "Polymer/core-item#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-dropdown/core-dropdown-extracted.js b/third_party/polymer/components-chromium/core-dropdown/core-dropdown-extracted.js new file mode 100644 index 0000000..f44acb8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/core-dropdown-extracted.js @@ -0,0 +1,125 @@ + + + Polymer('core-dropdown',{ + + publish: { + + /** + * True if the menu is open. + * + * @attribute opened + * @type boolean + * @default false + */ + opened: false, + + /** + * A label for the control. The label is displayed if no item is selected. + * + * @attribute label + * @type string + * @default 'Select an item' + */ + label: 'Select an item', + + /** + * The currently selected element. By default this is the index of the item element. + * If you want a specific attribute value of the element to be used instead of the + * index, set `valueattr` to that attribute name. + * + * @attribute selected + * @type Object + * @default null + */ + selected: null, + + /** + * Specifies the attribute to be used for "selected" attribute. + * + * @attribute valueattr + * @type string + * @default 'name' + */ + valueattr: 'name', + + /** + * Specifies the CSS class to be used to add to the selected element. + * + * @attribute selectedClass + * @type string + * @default 'core-selected' + */ + selectedClass: 'core-selected', + + /** + * Specifies the property to be used to set on the selected element + * to indicate its active state. + * + * @attribute selectedProperty + * @type string + * @default '' + */ + selectedProperty: '', + + /** + * Specifies the attribute to set on the selected element to indicate + * its active state. + * + * @attribute selectedAttribute + * @type string + * @default 'active' + */ + selectedAttribute: 'selected', + + /** + * The currently selected element. + * + * @attribute selectedItem + * @type Object + * @default null + */ + selectedItem: null, + + /** + * Horizontally align the overlay with the control. + * @attribute halign + * @type "left"|"right" + * @default "left" + */ + halign: {value: 'left', reflect: true}, + + /** + * Vertically align the dropdown menu with the control. + * @attribute valign + * @type "top"|"bottom" + * @default "bottom" + */ + valign: {value: 'bottom', reflect: true} + + }, + + toggle: function() { + this.opened = !this.opened; + }, + + openAction: function(e) { + if (e.detail) { + var rect = this.$.control.getBoundingClientRect(); + if (this.valign === 'top') { + this.$.menu.style.top = 'auto'; + this.$.menu.style.bottom = rect.height + 'px'; + this.$.menu.style.maxHeight = (window.innerHeight - (window.innerHeight - rect.top) - 12) + 'px'; + } else { + this.$.menu.style.top = rect.height + 'px'; + this.$.menu.style.bottom = 'auto'; + this.$.menu.style.maxHeight = (window.innerHeight - rect.height - rect.top - 12) + 'px'; + } + this.$.menu.style.minWidth = rect.width + 'px'; + } + }, + + selectAction: function() { + this.opened = false; + } + }); + diff --git a/third_party/polymer/components-chromium/core-dropdown/core-dropdown.css b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.css new file mode 100644 index 0000000..ea2a6e3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.css @@ -0,0 +1,36 @@ +:host { + position: relative; + display: inline-block; + background-color: #fff; +} + +#control core-item { + margin-left: 12px; + max-width: inherit; +} + +#control core-item::shadow #label { + overflow: hidden; + /* FIXME not working for some reason */ + white-space: nowrap; + text-overflow: ellipsis; +} + +#arrow { + margin: 0 12px; +} + +#menu { + position: absolute; + left: 0; + margin: 0; + padding: 0 12px; + overflow: scroll; + -webkit-overflow-scrolling: touch; + background-color: #fff; +} + +:host([halign="right"]) #menu { + left: auto; + right: 0; +} diff --git a/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html new file mode 100644 index 0000000..3d0920a --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html @@ -0,0 +1,79 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- + +`core-dropdown` is a control where the user can choose from an array of options in a drop-down +menu. The currently selected option is displayed in the control. + +Example: + + <core-dropdown selected="Financier" valueattr="label"> + <core-item label="Croissant"></core-item> + <core-item label="Donut"></core-item> + <core-item label="Financier"></core-item> + <core-item label="Madeleine"></core-item> + </core-dropdown> + +This example renders a drop-down menu with 4 options, with the option `Financier` pre-selected. + +Theming +------- + +Style the drop-down menu with the `core-dropdown::shadow #menu` selector. + +Example: + + core-dropdown::shadow #menu { + background-color: #eee; + border: 1px solid #ccc; + } + +@group Polymer Core Elements +@element core-dropdown +@status beta +@homepage github.io +--> + +<!-- +Fired when an item's selection state is changed. This event is fired both +when an item is selected or deselected. The `isSelected` detail property +contains the selection state. + +@event core-select +@param {Object} detail + @param {boolean} detail.isSelected true for selection and false for deselection + @param {Object} detail.item the item element +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-icon/core-icon.html" rel="import"> +<link href="../core-icons/core-icons.html" rel="import"> +<link href="../core-item/core-item.html" rel="import"> +<link href="../core-menu/core-menu.html" rel="import"> +<link href="../core-overlay/core-overlay.html" rel="import"> + +<polymer-element name="core-dropdown" assetpath=""> +<template> + + <link href="core-dropdown.css" rel="stylesheet"> + + <div id="control" layout="" horizontal="" center="" on-tap="{{toggle}}"> + <core-item flex="" src="{{selectedItem.src}}" icon="{{selectedItem.icon}}" label="{{selectedItem ? selectedItem.label : label}}"></core-item> + <core-icon id="arrow" icon="{{opened ? 'arrow-drop-up' : 'arrow-drop-down'}}"></core-icon> + </div> + + <core-overlay target="{{$.menu}}" opened="{{opened}}" on-core-overlay-open="{{openAction}}"></core-overlay> + + <core-menu id="menu" selected="{{selected}}" selecteditem="{{selectedItem}}" selectedclass="{{selectedClass}}" valueattr="{{valueattr}}" selectedproperty="{{selectedProperty}}" selectedattribute="{{selectedAttribute}}" on-core-select="{{selectAction}}"> + <content select="*"></content> + </core-menu> + +</template> + +</polymer-element><script src="core-dropdown-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-dropdown/demo.html b/third_party/polymer/components-chromium/core-dropdown/demo.html new file mode 100644 index 0000000..2892df4 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/demo.html @@ -0,0 +1,349 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>core-dropdown</title> + + <script src="../platform/platform.js"></script> + + <link href="core-dropdown.html" rel="import"> + + <style shim-shadowdom> + html, body { + height: 100%; + } + + dropdown-demo { + display: block; + } + + dropdown-demo::shadow > section { + padding: 12px; + } + + body /deep/ core-dropdown { + background-color: #eee; + } + + body /deep/ core-dropdown.narrow { + max-width: 100px; + } + + body /deep/ core-dropdown::shadow #menu { + background-color: #eee; + border: 1px solid #ccc; + } + </style> + +</head> +<body unresolved> + + <polymer-element name="dropdown-demo"> + <template> + <section layout vertical fit> + <section layout horizontal> + + <core-dropdown> + <template repeat="{{countries}}"> + <core-item label="{{name}}"></core-item> + </template> + </core-dropdown> + + <div style="margin:0 12px;"> + narrow: + <core-dropdown class="narrow"> + <template repeat="{{countries}}"> + <core-item label="{{name}}"></core-item> + </template> + </core-dropdown> + </div> + + <div flex></div> + + <core-dropdown halign="right"> + <template repeat="{{countries}}"> + <core-item label="{{name}}"></core-item> + </template> + </core-dropdown> + + </section> + + <div flex></div> + + <section> + drop-up: + <core-dropdown valign="top" valueattr="label" selected="Donut"> + <core-item label="Croissant"></core-item> + <core-item label="Donut"></core-item> + <core-item label="Financier"></core-item> + <core-item label="Madeleine"></core-item> + </core-dropdown> + </section> + + </section> + + </template> + <script> + Polymer('dropdown-demo', { + countries: [ + {name: 'Afghanistan', code: 'AF'}, + {name: 'Ã…land Islands', code: 'AX'}, + {name: 'Albania', code: 'AL'}, + {name: 'Algeria', code: 'DZ'}, + {name: 'American Samoa', code: 'AS'}, + {name: 'Andorra', code: 'AD'}, + {name: 'Angola', code: 'AO'}, + {name: 'Anguilla', code: 'AI'}, + {name: 'Antarctica', code: 'AQ'}, + {name: 'Antigua and Barbuda', code: 'AG'}, + {name: 'Argentina', code: 'AR'}, + {name: 'Armenia', code: 'AM'}, + {name: 'Aruba', code: 'AW'}, + {name: 'Australia', code: 'AU'}, + {name: 'Austria', code: 'AT'}, + {name: 'Azerbaijan', code: 'AZ'}, + {name: 'Bahamas', code: 'BS'}, + {name: 'Bahrain', code: 'BH'}, + {name: 'Bangladesh', code: 'BD'}, + {name: 'Barbados', code: 'BB'}, + {name: 'Belarus', code: 'BY'}, + {name: 'Belgium', code: 'BE'}, + {name: 'Belize', code: 'BZ'}, + {name: 'Benin', code: 'BJ'}, + {name: 'Bermuda', code: 'BM'}, + {name: 'Bhutan', code: 'BT'}, + {name: 'Bolivia', code: 'BO'}, + {name: 'Bosnia and Herzegovina', code: 'BA'}, + {name: 'Botswana', code: 'BW'}, + {name: 'Bouvet Island', code: 'BV'}, + {name: 'Brazil', code: 'BR'}, + {name: 'British Indian Ocean Territory', code: 'IO'}, + {name: 'Brunei Darussalam', code: 'BN'}, + {name: 'Bulgaria', code: 'BG'}, + {name: 'Burkina Faso', code: 'BF'}, + {name: 'Burundi', code: 'BI'}, + {name: 'Cambodia', code: 'KH'}, + {name: 'Cameroon', code: 'CM'}, + {name: 'Canada', code: 'CA'}, + {name: 'Cape Verde', code: 'CV'}, + {name: 'Cayman Islands', code: 'KY'}, + {name: 'Central African Republic', code: 'CF'}, + {name: 'Chad', code: 'TD'}, + {name: 'Chile', code: 'CL'}, + {name: 'China', code: 'CN'}, + {name: 'Christmas Island', code: 'CX'}, + {name: 'Cocos (Keeling) Islands', code: 'CC'}, + {name: 'Colombia', code: 'CO'}, + {name: 'Comoros', code: 'KM'}, + {name: 'Congo', code: 'CG'}, + {name: 'Congo, The Democratic Republic of the', code: 'CD'}, + {name: 'Cook Islands', code: 'CK'}, + {name: 'Costa Rica', code: 'CR'}, + {name: 'Cote D\'Ivoire', code: 'CI'}, + {name: 'Croatia', code: 'HR'}, + {name: 'Cuba', code: 'CU'}, + {name: 'Cyprus', code: 'CY'}, + {name: 'Czech Republic', code: 'CZ'}, + {name: 'Denmark', code: 'DK'}, + {name: 'Djibouti', code: 'DJ'}, + {name: 'Dominica', code: 'DM'}, + {name: 'Dominican Republic', code: 'DO'}, + {name: 'Ecuador', code: 'EC'}, + {name: 'Egypt', code: 'EG'}, + {name: 'El Salvador', code: 'SV'}, + {name: 'Equatorial Guinea', code: 'GQ'}, + {name: 'Eritrea', code: 'ER'}, + {name: 'Estonia', code: 'EE'}, + {name: 'Ethiopia', code: 'ET'}, + {name: 'Falkland Islands (Malvinas)', code: 'FK'}, + {name: 'Faroe Islands', code: 'FO'}, + {name: 'Fiji', code: 'FJ'}, + {name: 'Finland', code: 'FI'}, + {name: 'France', code: 'FR'}, + {name: 'French Guiana', code: 'GF'}, + {name: 'French Polynesia', code: 'PF'}, + {name: 'French Southern Territories', code: 'TF'}, + {name: 'Gabon', code: 'GA'}, + {name: 'Gambia', code: 'GM'}, + {name: 'Georgia', code: 'GE'}, + {name: 'Germany', code: 'DE'}, + {name: 'Ghana', code: 'GH'}, + {name: 'Gibraltar', code: 'GI'}, + {name: 'Greece', code: 'GR'}, + {name: 'Greenland', code: 'GL'}, + {name: 'Grenada', code: 'GD'}, + {name: 'Guadeloupe', code: 'GP'}, + {name: 'Guam', code: 'GU'}, + {name: 'Guatemala', code: 'GT'}, + {name: 'Guernsey', code: 'GG'}, + {name: 'Guinea', code: 'GN'}, + {name: 'Guinea-Bissau', code: 'GW'}, + {name: 'Guyana', code: 'GY'}, + {name: 'Haiti', code: 'HT'}, + {name: 'Heard Island and Mcdonald Islands', code: 'HM'}, + {name: 'Holy See (Vatican City State)', code: 'VA'}, + {name: 'Honduras', code: 'HN'}, + {name: 'Hong Kong', code: 'HK'}, + {name: 'Hungary', code: 'HU'}, + {name: 'Iceland', code: 'IS'}, + {name: 'India', code: 'IN'}, + {name: 'Indonesia', code: 'ID'}, + {name: 'Iran, Islamic Republic Of', code: 'IR'}, + {name: 'Iraq', code: 'IQ'}, + {name: 'Ireland', code: 'IE'}, + {name: 'Isle of Man', code: 'IM'}, + {name: 'Israel', code: 'IL'}, + {name: 'Italy', code: 'IT'}, + {name: 'Jamaica', code: 'JM'}, + {name: 'Japan', code: 'JP'}, + {name: 'Jersey', code: 'JE'}, + {name: 'Jordan', code: 'JO'}, + {name: 'Kazakhstan', code: 'KZ'}, + {name: 'Kenya', code: 'KE'}, + {name: 'Kiribati', code: 'KI'}, + {name: 'Korea, Democratic People\'S Republic of', code: 'KP'}, + {name: 'Korea, Republic of', code: 'KR'}, + {name: 'Kuwait', code: 'KW'}, + {name: 'Kyrgyzstan', code: 'KG'}, + {name: 'Lao People\'S Democratic Republic', code: 'LA'}, + {name: 'Latvia', code: 'LV'}, + {name: 'Lebanon', code: 'LB'}, + {name: 'Lesotho', code: 'LS'}, + {name: 'Liberia', code: 'LR'}, + {name: 'Libyan Arab Jamahiriya', code: 'LY'}, + {name: 'Liechtenstein', code: 'LI'}, + {name: 'Lithuania', code: 'LT'}, + {name: 'Luxembourg', code: 'LU'}, + {name: 'Macao', code: 'MO'}, + {name: 'Macedonia, The Former Yugoslav Republic of', code: 'MK'}, + {name: 'Madagascar', code: 'MG'}, + {name: 'Malawi', code: 'MW'}, + {name: 'Malaysia', code: 'MY'}, + {name: 'Maldives', code: 'MV'}, + {name: 'Mali', code: 'ML'}, + {name: 'Malta', code: 'MT'}, + {name: 'Marshall Islands', code: 'MH'}, + {name: 'Martinique', code: 'MQ'}, + {name: 'Mauritania', code: 'MR'}, + {name: 'Mauritius', code: 'MU'}, + {name: 'Mayotte', code: 'YT'}, + {name: 'Mexico', code: 'MX'}, + {name: 'Micronesia, Federated States of', code: 'FM'}, + {name: 'Moldova, Republic of', code: 'MD'}, + {name: 'Monaco', code: 'MC'}, + {name: 'Mongolia', code: 'MN'}, + {name: 'Montserrat', code: 'MS'}, + {name: 'Morocco', code: 'MA'}, + {name: 'Mozambique', code: 'MZ'}, + {name: 'Myanmar', code: 'MM'}, + {name: 'Namibia', code: 'NA'}, + {name: 'Nauru', code: 'NR'}, + {name: 'Nepal', code: 'NP'}, + {name: 'Netherlands', code: 'NL'}, + {name: 'Netherlands Antilles', code: 'AN'}, + {name: 'New Caledonia', code: 'NC'}, + {name: 'New Zealand', code: 'NZ'}, + {name: 'Nicaragua', code: 'NI'}, + {name: 'Niger', code: 'NE'}, + {name: 'Nigeria', code: 'NG'}, + {name: 'Niue', code: 'NU'}, + {name: 'Norfolk Island', code: 'NF'}, + {name: 'Northern Mariana Islands', code: 'MP'}, + {name: 'Norway', code: 'NO'}, + {name: 'Oman', code: 'OM'}, + {name: 'Pakistan', code: 'PK'}, + {name: 'Palau', code: 'PW'}, + {name: 'Palestinian Territory, Occupied', code: 'PS'}, + {name: 'Panama', code: 'PA'}, + {name: 'Papua New Guinea', code: 'PG'}, + {name: 'Paraguay', code: 'PY'}, + {name: 'Peru', code: 'PE'}, + {name: 'Philippines', code: 'PH'}, + {name: 'Pitcairn', code: 'PN'}, + {name: 'Poland', code: 'PL'}, + {name: 'Portugal', code: 'PT'}, + {name: 'Puerto Rico', code: 'PR'}, + {name: 'Qatar', code: 'QA'}, + {name: 'Reunion', code: 'RE'}, + {name: 'Romania', code: 'RO'}, + {name: 'Russian Federation', code: 'RU'}, + {name: 'RWANDA', code: 'RW'}, + {name: 'Saint Helena', code: 'SH'}, + {name: 'Saint Kitts and Nevis', code: 'KN'}, + {name: 'Saint Lucia', code: 'LC'}, + {name: 'Saint Pierre and Miquelon', code: 'PM'}, + {name: 'Saint Vincent and the Grenadines', code: 'VC'}, + {name: 'Samoa', code: 'WS'}, + {name: 'San Marino', code: 'SM'}, + {name: 'Sao Tome and Principe', code: 'ST'}, + {name: 'Saudi Arabia', code: 'SA'}, + {name: 'Senegal', code: 'SN'}, + {name: 'Serbia and Montenegro', code: 'CS'}, + {name: 'Seychelles', code: 'SC'}, + {name: 'Sierra Leone', code: 'SL'}, + {name: 'Singapore', code: 'SG'}, + {name: 'Slovakia', code: 'SK'}, + {name: 'Slovenia', code: 'SI'}, + {name: 'Solomon Islands', code: 'SB'}, + {name: 'Somalia', code: 'SO'}, + {name: 'South Africa', code: 'ZA'}, + {name: 'South Georgia and the South Sandwich Islands', code: 'GS'}, + {name: 'Spain', code: 'ES'}, + {name: 'Sri Lanka', code: 'LK'}, + {name: 'Sudan', code: 'SD'}, + {name: 'Suriname', code: 'SR'}, + {name: 'Svalbard and Jan Mayen', code: 'SJ'}, + {name: 'Swaziland', code: 'SZ'}, + {name: 'Sweden', code: 'SE'}, + {name: 'Switzerland', code: 'CH'}, + {name: 'Syrian Arab Republic', code: 'SY'}, + {name: 'Taiwan, Province of China', code: 'TW'}, + {name: 'Tajikistan', code: 'TJ'}, + {name: 'Tanzania, United Republic of', code: 'TZ'}, + {name: 'Thailand', code: 'TH'}, + {name: 'Timor-Leste', code: 'TL'}, + {name: 'Togo', code: 'TG'}, + {name: 'Tokelau', code: 'TK'}, + {name: 'Tonga', code: 'TO'}, + {name: 'Trinidad and Tobago', code: 'TT'}, + {name: 'Tunisia', code: 'TN'}, + {name: 'Turkey', code: 'TR'}, + {name: 'Turkmenistan', code: 'TM'}, + {name: 'Turks and Caicos Islands', code: 'TC'}, + {name: 'Tuvalu', code: 'TV'}, + {name: 'Uganda', code: 'UG'}, + {name: 'Ukraine', code: 'UA'}, + {name: 'United Arab Emirates', code: 'AE'}, + {name: 'United Kingdom', code: 'GB'}, + {name: 'United States', code: 'US'}, + {name: 'United States Minor Outlying Islands', code: 'UM'}, + {name: 'Uruguay', code: 'UY'}, + {name: 'Uzbekistan', code: 'UZ'}, + {name: 'Vanuatu', code: 'VU'}, + {name: 'Venezuela', code: 'VE'}, + {name: 'Viet Nam', code: 'VN'}, + {name: 'Virgin Islands, British', code: 'VG'}, + {name: 'Virgin Islands, U.S.', code: 'VI'}, + {name: 'Wallis and Futuna', code: 'WF'}, + {name: 'Western Sahara', code: 'EH'}, + {name: 'Yemen', code: 'YE'}, + {name: 'Zambia', code: 'ZM'}, + {name: 'Zimbabwe', code: 'ZW'} + ] + }); + </script> + </polymer-element> + + <dropdown-demo fit></dropdown-demo> + +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-dropdown/index.html b/third_party/polymer/components-chromium/core-dropdown/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-dropdown/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-field/.bower.json b/third_party/polymer/components-chromium/core-field/.bower.json new file mode 100644 index 0000000..d6b1c36 --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-field", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-field", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "bf6b093a3af4fc12e3dd78db910a614fe7a6d631" + }, + "_source": "git://github.com/Polymer/core-field.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-field" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-field/README.md b/third_party/polymer/components-chromium/core-field/README.md new file mode 100644 index 0000000..786008c --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/README.md @@ -0,0 +1,4 @@ +core-field +========== + +See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-field) for more information. diff --git a/third_party/polymer/components-chromium/core-field/bower.json b/third_party/polymer/components-chromium/core-field/bower.json new file mode 100644 index 0000000..5c006b0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-field", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-field/core-field.css b/third_party/polymer/components-chromium/core-field/core-field.css new file mode 100644 index 0000000..ff597c2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/core-field.css @@ -0,0 +1,38 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + + +:host { + display: block; + color: #333; + font-size: 14px; +} + +polyfill-next-selector { content: ':host > core-icon'; } +::content > core-icon { + margin: 8px; +} + +polyfill-next-selector { content: ':host input'; } +::content input { + background: transparent; + border: 0; + padding: 0; + margin: 0 4px; + color: #333; + font-size: 14px; +} + +polyfill-next-selector { content: ':host input:focus'; } +::content input:focus { + outline: none; +} + +polyfill-next-selector { content: ':host input::placeholder'; } +::content input::placeholder { + color: #b3b3b3; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-field/core-field.html b/third_party/polymer/components-chromium/core-field/core-field.html new file mode 100644 index 0000000..d7fc345 --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/core-field.html @@ -0,0 +1,35 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> + +<!-- +The `core-field` supplies a horizontal layout, anticipating an input. + +Example: + + <core-field> + <core-icon icon="menu"></core-icon> + <label>I'm a label!</label> + <input placeholder="I have a label" flex> + </core-field> + +@group Polymer Core Elements +@element core-field +@homepage github.io +--> +<polymer-element name="core-field" noscript center horizontal layout> +<template> + + <link rel="stylesheet" href="core-field.css"> + + <content select="*"></content> + +</template> +</polymer-element> diff --git a/third_party/polymer/components-chromium/core-field/demo.html b/third_party/polymer/components-chromium/core-field/demo.html new file mode 100644 index 0000000..886654a --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/demo.html @@ -0,0 +1,58 @@ +<!doctype html> +<html lang="en"> +<head> + + <meta charset="UTF-8"> + <title>Core Field</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-field.html"> + + <style> + html { + font-family: 'Helvetica Neue', 'Roboto', 'Arial', sans-serif; + font-size: 14px; + } + + core-field { + border: 1px solid #ddd; + margin: 10px; + height: 40px; + } + + div.icon { + display: inline-block; + width: 32px; + height: 32px; + background-repeat: no-repeat; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTA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0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAmdJREFUeNrsV7FqFFEUPfe8FSFYJSSbLcQ+oE3EzsrCNqTITwg2/omFVb5ARWxsDHZWlhqCdoJFCGSnEFZWMu8ei70Lbye72R12IYV5cFmYmffuuWfOPXPXJOE6F3HN6wbADYBO84KZAQB6vd6+pL1VJDGz96enp+8AoNl1UxnY2tq6I2kfQF5FxFlciAEA5u5G0gAw53zJKEjCzAggxaUsyd390mEpJYvkFqG5AM7Pz4fdbrczYmySs0jekfQ15/wpkjwxswdmVjdBSLIAykg+FwACKYtNE5VL+nZ2dvaquPej2+0+M7P7JJtMlAy07gJrhpmlnPMRgBrARUSdcz4yszRtT6sumJK8SSkBDALAuFSamc/YcyUItql+LKKU0l4kHyvdST4NvVgbFlox4O4g6SR3t7e3X0j6AOCPmR0A2HX32t1bMTATgCSzsSs1lrtnM3sI4FGo3CXlGYksnmkPIDZPOORY0ZLKg1n0uJeO13iu1SuYsGeSDLH9cvfP7v6z3++fAMDGxsYOyXskH5O8OyLJfZFhZ64Gxskl/c05v6yq6qSoVAAQQL4D+Li+vr6TUnpO8nYYwkq6ILn7YVVVx0X/1424AFBXVXXs7ofhfst3AUmTxH6//yUS5bL6KY6XhsPh8draGuO1YVU+UFabmz4QvzWAejAY/F6ZD7i7SGpzc/NtyxnAwzeWAyAJ7u4kW83voybQ8gzE97z9rDeqHPM00LmCwjeSDlY0kr2eea9pFsWkcysALju4etGmWZLPY0CFqrEiALNadyYAFd97WxJA6ZpaVAM+bYBcEoQW0sB/98/o3wDaEFXSD7l9+QAAAABJRU5ErkJggg==); + } + </style> + +</head> +<body theme="core-light-theme" unresolved> + + <core-field> + <div class="icon"></div> + <input placeholder="hi!" flex> + </core-field> + + <core-field> + <div class="icon"></div> + <input placeholder="Search" flex> + <icon></icon> + </core-field> + + <core-field> + <div class="icon"></div> + <label>I'm a label!</label> + <input placeholder="I have a label" flex> + </core-field> + + <core-field> + <input placeholder="I have no icon" flex> + </core-field> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-field/index.html b/third_party/polymer/components-chromium/core-field/index.html new file mode 100644 index 0000000..4b2f63c --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-field/metadata.html b/third_party/polymer/components-chromium/core-field/metadata.html new file mode 100644 index 0000000..e8f9649 --- /dev/null +++ b/third_party/polymer/components-chromium/core-field/metadata.html @@ -0,0 +1,17 @@ +<x-meta id="core-field" label="Field" group="Core" isContainer> + + <template> + <core-field icon="search" theme="core-light-theme"> + <core-icon icon="search"></core-icon> + <core-input placeholder="text input" flex></core-input> + </core-field> + </template> + + <template id="imports"> + <link rel="import" href="core-field.html"> + <link rel="import" href="../core-icon/core-icon.html"> + <link rel="import" href="../core-input/core-input.html"> + </template> + +</x-meta> + diff --git a/third_party/polymer/components-chromium/core-header-panel/.bower.json b/third_party/polymer/components-chromium/core-header-panel/.bower.json new file mode 100644 index 0000000..bc8dfbe --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-header-panel", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-header-panel", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "3f93b1618d1dff853ac631d9bb0506d2be05666c" + }, + "_source": "git://github.com/Polymer/core-header-panel.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-header-panel" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-header-panel/README.md b/third_party/polymer/components-chromium/core-header-panel/README.md new file mode 100644 index 0000000..8bc73e9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/README.md @@ -0,0 +1,4 @@ +core-header-panel +=================== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-header-panel) for more information. diff --git a/third_party/polymer/components-chromium/core-header-panel/bower.json b/third_party/polymer/components-chromium/core-header-panel/bower.json new file mode 100644 index 0000000..8a6e840 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-header-panel", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-header-panel/core-header-panel-extracted.js b/third_party/polymer/components-chromium/core-header-panel/core-header-panel-extracted.js new file mode 100644 index 0000000..8a0c7bc --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/core-header-panel-extracted.js @@ -0,0 +1,131 @@ + + + Polymer('core-header-panel', { + + /** + * Fired when the content has been scrolled. `details.target` returns + * the scrollable element which you can use to access scroll info such as + * `scrollTop`. + * + * @event scroll + */ + + publish: { + /** + * Controls header and scrolling behavior. Options are + * `standard`, `seamed`, `waterfall`, `waterfall-tall`, + * `waterfall-medium-tall`, `scroll` and `cover`. + * Default is `standard`. + * + * `standard`: The header is a step above the panel. The header will consume the + * panel at the point of entry, preventing it from passing through to the + * opposite side. + * + * `seamed`: The header is presented as seamed with the panel. + * + * `waterfall`: Similar to standard mode, but header is initially presented as + * seamed with panel, but then separates to form the step. + * + * `waterfall-tall`: The header is initially taller (`tall` class is added to + * the header). As the user scrolls, the header separates (forming an edge) + * while condensing (`tall` class is removed from the header). + * + * `scroll`: The header keeps its seam with the panel, and is pushed off screen. + * + * `cover`: The panel covers the whole `core-header-panel` including the + * header. This allows user to style the panel in such a way that the panel is + * partially covering the header. + * + * <style> + * core-header-panel[mode=cover]::shadow #mainContainer { + * left: 80px; + * } + * .content { + * margin: 60px 60px 60px 0; + * } + * </style> + * + * <core-header-panel mode="cover"> + * <core-appbar class="tall"> + * <core-icon-button icon="menu"></core-icon-button> + * </core-appbar> + * <div class="content"></div> + * </core-header-panel> + * + * @attribute mode + * @type string + * @default '' + */ + mode: {value: '', reflect: true}, + + /** + * The class used in waterfall-tall mode. Change this if the header + * accepts a different class for toggling height, e.g. "medium-tall" + * + * @attribute tallClass + * @type string + * @default 'tall' + */ + tallClass: 'tall', + + /** + * If true, the drop-shadow is always shown no matter what mode is set to. + * + * @attribute shadow + * @type boolean + * @default false + */ + shadow: false + }, + + domReady: function() { + this.async('scroll'); + }, + + modeChanged: function() { + this.scroll(); + }, + + get header() { + return this.$.headerContent.getDistributedNodes()[0]; + }, + + /** + * Returns the scrollable element. + * + * @property scroller + * @type Object + */ + get scroller() { + return this.mode === 'scroll' ? + this.$.outerContainer : this.$.mainContainer; + }, + + scroll: function() { + var shadowMode = {'waterfall': 1, 'waterfall-tall': 1}; + var noShadow = {'seamed': 1, 'cover': 1, 'scroll': 1}; + var tallMode = {'waterfall-tall': 1}; + + var main = this.$.mainContainer; + var header = this.header; + + var sTop = main.scrollTop; + var atTop = sTop === 0; + + if (header) { + this.$.dropShadow.classList.toggle('hidden', !this.shadow && + (atTop && shadowMode[this.mode] || noShadow[this.mode])); + + if (tallMode[this.mode]) { + header.classList.toggle(this.tallClass, atTop || + main.scrollHeight < this.$.outerContainer.offsetHeight); + } + + header.classList.toggle('animate', tallMode[this.mode]); + } + + this.fire('scroll', {target: this.scroller}, this, false); + } + + }); + diff --git a/third_party/polymer/components-chromium/core-header-panel/core-header-panel.css b/third_party/polymer/components-chromium/core-header-panel/core-header-panel.css new file mode 100644 index 0000000..31dcce5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/core-header-panel.css @@ -0,0 +1,75 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; +} + +#outerContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; +} + +#mainPanel { + position: relative; +} + +#mainContainer { + position: relative; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; +} + +#dropShadow { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 6px; + box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4); +} + +#dropShadow.hidden { + display: none; +} + +/* +mode: scroll +*/ +:host([mode=scroll]) #mainContainer { + overflow: visible; +} + +/* +mode: cover +*/ +:host([mode=cover]) #mainPanel { + position: static; +} + +:host([mode=cover]) #mainContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +:host([mode=cover]) #dropShadow { + position: static; + width: 100%; +} diff --git a/third_party/polymer/components-chromium/core-header-panel/core-header-panel.html b/third_party/polymer/components-chromium/core-header-panel/core-header-panel.html new file mode 100644 index 0000000..687c901 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/core-header-panel.html @@ -0,0 +1,95 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-header-panel` contains a header section and a content panel section. + +__Important:__ The `core-header-panel` will not display if its parent does not have a height. + +Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-attrs.html), you can easily make the `core-header-panel` fill the screen + + <body fullbleed layout vertical> + <core-header-panel flex> + <core-toolbar> + <div>Hello World!</div> + </core-toolbar> + </core-header-panel> + </body> + +or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-header-panel` a height of 100%: + + html, body { + height: 100%; + margin: 0; + } + core-header-panel { + height: 100%; + } + +Special support is provided for scrolling modes when one uses a core-toolbar or equivalent +for the header section. + +Example: + + <core-header-panel> + <core-toolbar>Header</core-toolbar> + <div>Content goes here...</div> + </core-header-panel> + +If you want to use other than `core-toolbar` for the header, add +`core-header` class to that element. + +Example: + + <core-header-panel> + <div class="core-header">Header</div> + <div>Content goes here...</div> + </core-header-panel> + +To have the content fits to the main area, use `fit` attribute. + + <core-header-panel> + <div class="core-header">standard</div> + <div class="content" fit>content fits 100% below the header</div> + </core-header-panel> + +Use `mode` to control the header and scrolling behavior. + +@group Polymer Core Elements +@element core-header-panel +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-header-panel" assetpath=""> +<template> + + <link rel="stylesheet" href="core-header-panel.css"> + + <div id="outerContainer" on-scroll="{{scroll}}" vertical="" layout=""> + + <content id="headerContent" select="core-toolbar, .core-header"></content> + + <div id="mainPanel" flex="" vertical="" layout=""> + + <div id="mainContainer" flex?="{{mode !== 'cover'}}" on-scroll="{{scroll}}"> + <content id="mainContent" select="*"></content> + </div> + + <div id="dropShadow"></div> + + </div> + + </div> + +</template> + +</polymer-element> +<script src="core-header-panel-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-header-panel/demo.html b/third_party/polymer/components-chromium/core-header-panel/demo.html new file mode 100644 index 0000000..69854d6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/demo.html @@ -0,0 +1,100 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-header-panel</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-header-panel.html"> + + <style shim-shadowdom> + + body { + font-family: sans-serif; + } + + core-header-panel { + float: left; + width: 360px; + height: 400px; + margin: 5px; + } + + core-header-panel[mode=cover]::shadow #mainContainer { + left: 70px; + } + + .core-header { + height: 60px; + line-height: 60px; + font-size: 18px; + padding: 0 10px; + background-color: #4F7DC9; + color: #FFF; + transition: height 0.2s; + } + + .core-header.tall { + height: 180px; + } + + .core-header.medium-tall { + height: 120px; + } + + .content { + height: 2000px; + background: linear-gradient(rgb(214, 227, 231), lightblue); + } + + </style> + +</head> + +<body unresolved> + + <core-header-panel> + <div class="core-header">standard</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="seamed"> + <div class="core-header">seamed</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="waterfall"> + <div class="core-header">waterfall</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="waterfall-tall"> + <div class="core-header">waterfall-tall</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="waterfall-tall" tallClass="medium-tall"> + <div class="core-header">waterfall-tall (tallClass: medium-tall)</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="scroll"> + <div class="core-header">scroll</div> + <div class="content"></div> + </core-header-panel> + + <core-header-panel mode="cover"> + <div class="core-header tall">cover</div> + <div class="content" style="margin: 60px 60px 60px 0;"></div> + </core-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-header-panel/index.html b/third_party/polymer/components-chromium/core-header-panel/index.html new file mode 100644 index 0000000..85106b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/index.html @@ -0,0 +1,23 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../polymer/polymer.html"> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-header-panel/metadata.html b/third_party/polymer/components-chromium/core-header-panel/metadata.html new file mode 100644 index 0000000..a218634 --- /dev/null +++ b/third_party/polymer/components-chromium/core-header-panel/metadata.html @@ -0,0 +1,28 @@ +<x-meta id="core-header-panel" label="Header Panel" isContainer group="Core"> + + <property name="mode" kind="select" options="standard, waterfall, waterfall-tall, scroll, cover"></property> + + <template> + + <core-header-panel mode="standard" style="width: 300px; height: 400px;"> + + <core-toolbar style="background-color: #4F7DC9; color: #FFF;"> + <core-icon-button icon="menu"></core-icon-button> + <div>Header</div> + </core-toolbar> + + <section style="height: 1000px; background: linear-gradient(rgb(214, 227, 231), lightblue);"></section> + + </core-header-panel> + + </template> + + <template id="imports"> + + <link rel="import" href="../core-icon-button/core-icon-button.html"> + <link rel="import" href="../core-toolbar/core-toolbar.html"> + <link rel="import" href="core-header-panel.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon-button/.bower.json b/third_party/polymer/components-chromium/core-icon-button/.bower.json new file mode 100644 index 0000000..90de207 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-icon-button", + "private": true, + "dependencies": { + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-icon-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "8cba0cc3afb550c9d51400c5f2ce2532d104b13d" + }, + "_source": "git://github.com/Polymer/core-icon-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-icon-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon-button/README.md b/third_party/polymer/components-chromium/core-icon-button/README.md new file mode 100644 index 0000000..25e957f --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/README.md @@ -0,0 +1,4 @@ +core-icon-button +================ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icon-button) for more information. diff --git a/third_party/polymer/components-chromium/core-icon-button/bower.json b/third_party/polymer/components-chromium/core-icon-button/bower.json new file mode 100644 index 0000000..db94a26 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-icon-button", + "private": true, + "dependencies": { + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon-button/core-icon-button-extracted.js b/third_party/polymer/components-chromium/core-icon-button/core-icon-button-extracted.js new file mode 100644 index 0000000..0e7e8d7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/core-icon-button-extracted.js @@ -0,0 +1,42 @@ + + + Polymer('core-icon-button', { + + /** + * The URL of an image for the icon. Should not use `icon` property + * if you are using this property. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * If true, border is placed around the button to indicate it's + * active state. + * + * @attribute active + * @type boolean + * @default false + */ + active: false, + + /** + * Specifies the icon name or index in the set of icons available in + * the icon set. Should not use `src` property if you are using this + * property. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '', + + activeChanged: function() { + this.classList.toggle('selected', this.active); + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon-button/core-icon-button.css b/third_party/polymer/components-chromium/core-icon-button/core-icon-button.css new file mode 100644 index 0000000..60202c3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/core-icon-button.css @@ -0,0 +1,75 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +*/ + +:host { + display: inline-block; + box-sizing: border-box; + -moz-box-sizing: border-box; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + border-radius: 2px; + padding: 7px; + margin: 2px; + vertical-align: middle; + font-size: 1rem; + cursor: pointer; +} + +:host([disabled]) { + opacity: 0.6; + pointer-events: none; +} + +:host(.outline) { + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); +} + +:host(:hover:not([disabled])) { + box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1); +} + +:host(.selected:not([disabled])) { + background-color: rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.12); +} + +:host(:active:not([disabled]), .selected:active:not([disabled])) { + background-color: rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.12); +} + +:host(.core-dark-theme.outline) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.1); +} + +:host(.core-dark-theme:hover) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: 0 1px 0 0 rgba(200, 200, 200, 0.12), 0 0 0 1px rgba(200, 200, 200, 0.1); +} + +:host(.core-dark-theme.selected) { + background-color: rgba(220, 220, 220, 0.05); + box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.05), 0 0 0 1px rgba(200, 200, 200, 0.12); +} + +:host(.core-dark-theme:active, .core-dark-theme.selected:active) { + background-color: rgba(200, 200, 200, 0.05); + box-shadow: inset 0 1px 0 0 rgba(200, 200, 200, 0.1), 0 0 0 1px rgba(200, 200, 200, 0.12); +} + +core-icon { + pointer-events: none; +} + +/* note: this is a polyfill aware selector */ +:host ::content > :not(core-icon) { + margin-left: 4px; +} diff --git a/third_party/polymer/components-chromium/core-icon-button/core-icon-button.html b/third_party/polymer/components-chromium/core-icon-button/core-icon-button.html new file mode 100644 index 0000000..c091bc87 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/core-icon-button.html @@ -0,0 +1,41 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-icon-button` is an icon with button behaviors. + + <core-icon-button src="star.png"></core-icon-button> + +`core-icon-button` includes a default icon set. Use `icon` to specify +which icon from the icon set to use. + + <core-icon-button icon="menu"></core-icon-button> + +See [`core-iconset`](#core-iconset) for more information about +how to use a custom icon set. + +@group Polymer Core Elements +@element core-icon-button +@homepage github.io +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-icons/core-icons.html"> + +<polymer-element name="core-icon-button" attributes="src icon active" assetpath=""> + + <template> + <link rel="stylesheet" href="core-icon-button.css"> + <core-icon src="{{src}}" icon="{{icon}}"></core-icon><content></content> + </template> + + + +</polymer-element> +<script src="core-icon-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon-button/demo.html b/third_party/polymer/components-chromium/core-icon-button/demo.html new file mode 100644 index 0000000..becd7fb --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/demo.html @@ -0,0 +1,35 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + <title>core-icon-button</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-icon-button.html"> + <style> + </style> + +</head> + +<body unresolved> + + +<template is="auto-binding"> + <template repeat="{{icon in $.meta.metaData.icons.iconNames}}"> + <core-icon-button icon="{{icon}}" title="{{icon}}"></core-icon-button> + </template> + <core-icon-button icon="menu"><span>label</span></core-icon-button> + </div> + <core-iconset id="meta"></core-iconset> +</template> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icon-button/index.html b/third_party/polymer/components-chromium/core-icon-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icon-button/metadata.html b/third_party/polymer/components-chromium/core-icon-button/metadata.html new file mode 100644 index 0000000..85478c7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon-button/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="core-icon-button" label="Icon Button" group="Core"> + + <template> + <core-icon-button icon="menu" theme="core-light-theme"></core-icon-button> + </template> + + <template id="imports"> + <link rel="import" href="core-icon-button.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-icon/.bower.json b/third_party/polymer/components-chromium/core-icon/.bower.json new file mode 100644 index 0000000..bc0f698 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-icon", + "private": true, + "dependencies": { + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-icon", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "f01e69e95abbfdb54bf0a782bfbde21d743d1a37" + }, + "_source": "git://github.com/Polymer/core-icon.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-icon" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon/README.md b/third_party/polymer/components-chromium/core-icon/README.md new file mode 100644 index 0000000..65d93fb --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/README.md @@ -0,0 +1,4 @@ +core-icon +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icon) for more information. diff --git a/third_party/polymer/components-chromium/core-icon/bower.json b/third_party/polymer/components-chromium/core-icon/bower.json new file mode 100644 index 0000000..f0ab05e --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-icon", + "private": true, + "dependencies": { + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon/core-icon-extracted.js b/third_party/polymer/components-chromium/core-icon/core-icon-extracted.js new file mode 100644 index 0000000..86ddf0e --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/core-icon-extracted.js @@ -0,0 +1,137 @@ + +(function() { + + // mono-state + var meta; + + Polymer('core-icon', { + + /** + * The URL of an image for the icon. If the src property is specified, + * the icon property should not be. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * Specifies the icon name or index in the set of icons available in + * the icon's icon set. If the icon property is specified, + * the src property should not be. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '', + + /** + * Alternative text content for accessibility support. + * If alt is present and not empty, it will set the element's role to img and add an aria-label whose content matches alt. + * If alt is present and is an empty string, '', it will hide the element from the accessibility layer + * If alt is not present, it will set the element's role to img and the element will fallback to using the icon attribute for its aria-label. + * + * @attribute alt + * @type string + * @default '' + */ + alt: null, + + observe: { + 'icon': 'updateIcon', + 'alt': 'updateAlt' + }, + + defaultIconset: 'icons', + + ready: function() { + if (!meta) { + meta = document.createElement('core-iconset'); + } + + // Allow user-provided `aria-label` in preference to any other text alternative. + if (this.hasAttribute('aria-label')) { + // Set `role` if it has not been overridden. + if (!this.hasAttribute('role')) { + this.setAttribute('role', 'img'); + } + return; + } + this.updateAlt(); + }, + + srcChanged: function() { + var icon = this._icon || document.createElement('div'); + icon.textContent = ''; + icon.setAttribute('fit', ''); + icon.style.backgroundImage = 'url(' + this.src + ')'; + icon.style.backgroundPosition = 'center'; + icon.style.backgroundSize = '100%'; + if (!icon.parentNode) { + this.appendChild(icon); + } + this._icon = icon; + }, + + getIconset: function(name) { + return meta.byId(name || this.defaultIconset); + }, + + updateIcon: function(oldVal, newVal) { + if (!this.icon) { + this.updateAlt(); + return; + } + var parts = String(this.icon).split(':'); + var icon = parts.pop(); + if (icon) { + var set = this.getIconset(parts.pop()); + if (set) { + this._icon = set.applyIcon(this, icon); + if (this._icon) { + this._icon.setAttribute('fit', ''); + } + } + } + // Check to see if we're using the old icon's name for our a11y fallback + if (oldVal) { + if (oldVal.split(':').pop() == this.getAttribute('aria-label')) { + this.updateAlt(); + } + } + }, + + updateAlt: function() { + // Respect the user's decision to remove this element from + // the a11y tree + if (this.getAttribute('aria-hidden')) { + return; + } + + // Remove element from a11y tree if `alt` is empty, otherwise + // use `alt` as `aria-label`. + if (this.alt === '') { + this.setAttribute('aria-hidden', 'true'); + if (this.hasAttribute('role')) { + this.removeAttribute('role'); + } + if (this.hasAttribute('aria-label')) { + this.removeAttribute('aria-label'); + } + } else { + this.setAttribute('aria-label', this.alt || + this.icon.split(':').pop()); + if (!this.hasAttribute('role')) { + this.setAttribute('role', 'img'); + } + if (this.hasAttribute('aria-hidden')) { + this.removeAttribute('aria-hidden'); + } + } + } + + }); + +})(); diff --git a/third_party/polymer/components-chromium/core-icon/core-icon.css b/third_party/polymer/components-chromium/core-icon/core-icon.css new file mode 100644 index 0000000..168a5b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/core-icon.css @@ -0,0 +1,16 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +html /deep/ core-icon { + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; + fill: currentcolor; + position: relative; + height: 24px; + width: 24px; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon/core-icon.html b/third_party/polymer/components-chromium/core-icon/core-icon.html new file mode 100644 index 0000000..e488762 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/core-icon.html @@ -0,0 +1,53 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- + +The `core-icon` element displays an icon. By default an icon renders as 24px square. + +Example using src: + + <core-icon src="star.png"></core-icon> + +Example setting size to 32px x 32px: + + <core-icon class="big" src="big_star.png"></core-icon> + + <style> + .big { + height: 32px; + width: 32px; + } + </style> + +Example using icon from default iconset: + + <core-icon icon="menu"></core-icon> + +Example using icon `cherry` from custom iconset `fruit`: + + <core-icon icon="fruit:cherry"></core-icon> + +See [core-iconset](#core-iconset) and [core-iconset-svg](#core-iconset-svg) for more information about +how to use a custom iconset. + +See [core-icons](http://www.polymer-project.org/components/core-icons/demo.html) for the default set of icons. To use the default set of icons you'll need to include an import for `core-icons.html`. To use a different built-in set of icons, you'll need to include an import for `core-icons/iconsets/<iconset>.html`. + +@group Polymer Core Elements +@element core-icon +@homepage polymer.github.io +--> +<link rel="import" href="../core-iconset/core-iconset.html"> + +<link rel="stylesheet" href="core-icon.css" shim-shadowdom=""> + +<polymer-element name="core-icon" attributes="src icon alt" assetpath=""> + + +</polymer-element> +<script src="core-icon-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icon/demo.html b/third_party/polymer/components-chromium/core-icon/demo.html new file mode 100644 index 0000000..2bcefbb --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/demo.html @@ -0,0 +1,44 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-icon</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="core-icon.html"> + + <style> + segment { + min-width: 200px; + } + + core-icon.big { + height: 128px; + width: 128px; + } + </style> +</head> +<body unresolved> + +<template is="auto-binding"> + <div wrap horizontal layout> + <template repeat="{{icon in $.meta.metaData.icons.iconNames}}"> + <segment><core-icon icon="{{icon}}"></core-icon> {{icon}}</segment> + </template> + </div> + <core-iconset id="meta"></core-iconset> + <div hidden?="{{!$.meta.metaData.icons.iconNames}}"> + Sized icon: + <core-icon class="big" icon="accessibility"></core-icon> + </div> +</template> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icon/index.html b/third_party/polymer/components-chromium/core-icon/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icon/metadata.html b/third_party/polymer/components-chromium/core-icon/metadata.html new file mode 100644 index 0000000..bb4c828 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icon/metadata.html @@ -0,0 +1,12 @@ +<x-meta id="core-icon" label="Icon" group="Core" hideSubtree> + + <template> + <core-icon icon="search"></core-icon> + </template> + + <template id="imports"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="core-icon.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-icons/.bower.json b/third_party/polymer/components-chromium/core-icons/.bower.json new file mode 100644 index 0000000..4740787 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "core-icons", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-iconset-svg": "Polymer/core-iconset-svg#>=0.3.0 <1.0.0", + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-icons", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "2adbba45904ad2aa7ce885a55204ec1fb0866a5b" + }, + "_source": "git://github.com/Polymer/core-icons.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-icons" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icons/README.md b/third_party/polymer/components-chromium/core-icons/README.md new file mode 100644 index 0000000..195925f --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/README.md @@ -0,0 +1,4 @@ +core-icons +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-icons) for more information. diff --git a/third_party/polymer/components-chromium/core-icons/av-icons.html b/third_party/polymer/components-chromium/core-icons/av-icons.html new file mode 100644 index 0000000..1638abf --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/av-icons.html @@ -0,0 +1,46 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="av" iconSize="24"> +<svg><defs> +<g id="closed-caption"><path d="M19,4H5C3.9,4,3,4.9,3,6v12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M11,11H9.5v-0.5h-2v3h2V13H11v1c0,0.6-0.4,1-1,1H7c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V11z M18,11h-1.5v-0.5h-2v3h2V13H18v1c0,0.6-0.4,1-1,1h-3c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V11z"/></g> +<g id="fast-forward"><path d="M4,18l8.5-6L4,6V18z M13,6v12l8.5-6L13,6z"/></g> +<g id="fast-rewind"><path d="M11,18V6l-8.5,6L11,18z M11.5,12l8.5,6V6L11.5,12z"/></g> +<g id="games"><path d="M15,7.5V2H9v5.5l3,3L15,7.5z M7.5,9H2v6h5.5l3-3L7.5,9z M9,16.5V22h6v-5.5l-3-3L9,16.5z M16.5,9l-3,3l3,3H22V9H16.5z"/></g> +<g id="high-quality"><path d="M19,4H5C3.9,4,3,4.9,3,6v12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M11,15H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11V15z M18,14c0,0.6-0.4,1-1,1h-0.8v1.5h-1.5V15H14c-0.6,0-1-0.4-1-1v-4c0-0.6,0.4-1,1-1h3c0.6,0,1,0.4,1,1V14z M14.5,13.5h2v-3h-2V13.5z"/></g> +<g id="loop"><path d="M12,4V1L8,5l4,4V6c3.3,0,6,2.7,6,6c0,1-0.3,2-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12C20,7.6,16.4,4,12,4z M12,18c-3.3,0-6-2.7-6-6c0-1,0.3-2,0.7-2.8L5.2,7.7C4.5,9,4,10.4,4,12c0,4.4,3.6,8,8,8v3l4-4l-4-4V18z"/></g> +<g id="mic"><path d="M12,14c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,12.7,10.3,14,12,14z M17.3,11c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> +<g id="mic-none"><path d="M12,14c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,12.7,10.3,14,12,14z M10.8,4.9c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2l0,6.2c0,0.7-0.5,1.2-1.2,1.2c-0.7,0-1.2-0.5-1.2-1.2V4.9z M17.3,11c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> +<g id="mic-off"><path d="M19,11h-1.7c0,0.7-0.2,1.4-0.4,2l1.2,1.2C18.7,13.3,19,12.2,19,11z"/><path d="M15,11.2c0-0.1,0-0.1,0-0.2V5c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v0.2L15,11.2z"/><path d="M4.3,3L3,4.3l6,6L9,11c0,1.7,1.3,3,3,3c0.2,0,0.4,0,0.7-0.1l1.7,1.7c-0.7,0.3-1.5,0.5-2.3,0.5c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V21h2v-3.3c0.9-0.1,1.8-0.5,2.5-0.9l4.2,4.2l1.3-1.3L4.3,3z"/></g> +<g id="movie"><path d="M18,4l2,4h-3l-2-4h-2l2,4h-3l-2-4H8l2,4H7L5,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4H18z"/></g> +<g id="news"><path d="M20.3,4.7L18.7,3L17,4.7L15.3,3l-1.7,1.7L12,3l-1.7,1.7L8.7,3L7,4.7L5.3,3L3.7,4.7L2,3v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2l0-16L20.3,4.7z M12,19H4v-7h8V19z M20,19h-7v-1h7V19z M20,17h-7v-1h7V17z M20,15h-7v-1h7V15z M20,13h-7v-1h7V13z M20,11H4V8h16V11z"/></g> +<g id="pause"><path d="M6,19h4V5H6V19z M14,5v14h4V5H14z"/></g> +<g id="pause-circle-fill"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M11,16H9V8h2V16z M15,16h-2V8h2V16z"/></g> +<g id="pause-circle-outline"><path d="M9,16h2V8H9V16z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M13,16h2V8h-2V16z"/></g> +<g id="play-arrow"><polygon points="8,5 8,19 19,12 "/></g> +<g id="play-circle-fill"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M10,16.5v-9l6,4.5L10,16.5z"/></g> +<g id="play-circle-outline"><path d="M10,16.5l6-4.5l-6-4.5V16.5z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="queue"><path d="M3,5H1v16c0,1.1,0.9,2,2,2h16v-2H3V5z M21,1H7C5.9,1,5,1.9,5,3v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V3C23,1.9,22.1,1,21,1z M19,11h-4v4h-2v-4H9V9h4V5h2v4h4V11z"/></g> +<g id="replay"><path d="M12,5V1L7,6l5,5V7c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6H4c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8S16.4,5,12,5z"/></g> +<g id="shuffle"><path d="M10.6,9.2L5.4,4L4,5.4l5.2,5.2L10.6,9.2z M14.5,4l2,2L4,18.6L5.4,20L18,7.5l2,2V4H14.5z M14.8,13.4l-1.4,1.4l3.1,3.1l-2,2H20v-5.5l-2,2L14.8,13.4z"/></g> +<g id="skip-next"><path d="M6,18l8.5-6L6,6V18z M16,6v12h2V6H16z"/></g> +<g id="skip-previous"><rect x="6" y="6" width="2" height="12"/><polygon points="9.5,12 18,18 18,6 "/></g> +<g id="stop"><rect x="6" y="6" width="12" height="12"/></g> +<g id="videocam"><path d="M17,10.5V7c0-0.6-0.4-1-1-1H4C3.4,6,3,6.4,3,7v10c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1v-3.5l4,4v-11L17,10.5z"/></g> +<g id="videocam-off"><path d="M21,6.5l-4,4V7c0-0.6-0.4-1-1-1H9.8L21,17.2V6.5z M3.3,2L2,3.3L4.7,6H4C3.4,6,3,6.4,3,7v10c0,0.6,0.4,1,1,1h12c0.2,0,0.4-0.1,0.5-0.2l3.2,3.2l1.3-1.3L3.3,2z"/></g> +<g id="video-youtube"><path d="M20,4.4C19.4,4.2,15.7,4,12,4C8.3,4,4.6,4.2,4,4.4c-1.6,0.5-2,4-2,7.6s0.4,7.1,2,7.6c0.6,0.2,4.3,0.4,8,0.4c3.7,0,7.4-0.2,8-0.4c1.6-0.5,2-4,2-7.6S21.6,4.9,20,4.4z M10,16.5v-9l6,4.5L10,16.5z"/></g> +<g id="volume-down"><path d="M18.5,12c0-1.8-1-3.3-2.5-4V16C17.5,15.3,18.5,13.8,18.5,12z M5,9c0,0,0,6,0,6h4l5,5V4L9,9H5z"/></g> +<g id="volume-mute"><path d="M7,9c0,0,0,6,0,6h4l5,5V4l-5,5H7z"/></g> +<g id="volume-off"><path d="M16.5,12c0-1.8-1-3.3-2.5-4v2.2l2.5,2.5C16.5,12.4,16.5,12.2,16.5,12z M19,12c0,0.9-0.2,1.8-0.5,2.6l1.5,1.5c0.7-1.2,1-2.7,1-4.2c0-4.3-3-7.9-7-8.8v2.1C16.9,6.2,19,8.8,19,12z M4.3,3L3,4.3L7.7,9H3c0,0,0,6,0,6h4l5,5v-6.7l4.3,4.3c-0.7,0.5-1.4,0.9-2.3,1.2v2.1c1.4-0.3,2.6-0.9,3.7-1.8l2,2l1.3-1.3l-9-9L4.3,3z M12,4L9.9,6.1L12,8.2V4z"/></g> +<g id="volume-up"><path d="M3,9c0,0,0,6,0,6h4l5,5V4L7,9H3z M16.5,12c0-1.8-1-3.3-2.5-4V16C15.5,15.3,16.5,13.8,16.5,12z M14,3.2v2.1c2.9,0.9,5,3.5,5,6.7s-2.1,5.8-5,6.7v2.1c4-0.9,7-4.5,7-8.8S18,4.1,14,3.2z"/></g> +<g id="web"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M15,18H4v-4h11V18z M15,13H4V9h11V13z M20,18h-4V9h4V18z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/bower.json b/third_party/polymer/components-chromium/core-icons/bower.json new file mode 100644 index 0000000..72efca9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/bower.json @@ -0,0 +1,9 @@ +{ + "name": "core-icons", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-iconset-svg": "Polymer/core-iconset-svg#>=0.3.0 <1.0.0", + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-icons/communication-icons.html b/third_party/polymer/components-chromium/core-icons/communication-icons.html new file mode 100644 index 0000000..32191cc --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/communication-icons.html @@ -0,0 +1,55 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="communication" iconSize="24"> +<svg><defs> +<g id="call"><path d="M6.6,10.8c1.4,2.8,3.8,5.1,6.6,6.6l2.2-2.2c0.3-0.3,0.7-0.4,1-0.2c1.1,0.4,2.3,0.6,3.6,0.6c0.6,0,1,0.4,1,1V20c0,0.6-0.4,1-1,1C10.6,21,3,13.4,3,4c0-0.6,0.4-1,1-1h3.5c0.6,0,1,0.4,1,1c0,1.2,0.2,2.4,0.6,3.6c0.1,0.3,0,0.7-0.2,1L6.6,10.8z"/></g> +<g id="call-end"><path d="M12,9c-1.6,0-3.1,0.3-4.6,0.7l0,3.1c0,0.4-0.2,0.7-0.6,0.9c-1,0.5-1.9,1.1-2.7,1.9c-0.2,0.2-0.4,0.3-0.7,0.3c-0.3,0-0.5-0.1-0.7-0.3l-2.5-2.5C0.1,12.9,0,12.7,0,12.4c0-0.3,0.1-0.5,0.3-0.7C3.3,8.8,7.5,7,12,7s8.7,1.8,11.7,4.7c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-2.5,2.5c-0.2,0.2-0.4,0.3-0.7,0.3c-0.3,0-0.5-0.1-0.7-0.3c-0.8-0.7-1.7-1.4-2.7-1.9c-0.3-0.2-0.6-0.5-0.6-0.9l0-3.1C15.1,9.3,13.6,9,12,9z"/></g> +<g id="call-made"><polygon points="9,5 9,7 15.6,7 3,19.6 4.4,21 17,8.4 17,15 19,15 19,5 "/></g> +<g id="call-merge"><path d="M17,20.4l1.4-1.4L15,15.6L13.6,17L17,20.4z M7.5,8H11v5.6L5.6,19L7,20.4l6-6V8h3.5L12,3.5L7.5,8z"/></g> +<g id="call-missed"><polygon points="19.6,7 12,14.6 6.4,9 11,9 11,7 3,7 3,15 5,15 5,10.4 12,17.4 21,8.4 "/></g> +<g id="call-received"><polygon points="21,4.4 19.6,3 7,15.6 7,9 5,9 5,19 15,19 15,17 8.4,17 "/></g> +<g id="call-split"><polygon points="14,4 16.3,6.3 13.4,9.2 14.8,10.6 17.7,7.7 20,10 20,4 "/><polygon points="10,4 4,4 4,10 6.3,7.7 11,12.4 11,20 13,20 13,11.6 7.7,6.3 "/></g> +<g id="chat"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M6,9h12v2H6V9z M14,14H6v-2h8V14z M18,8H6V6h12V8z"/></g> +<g id="clear-all"><path d="M5,13h14v-2H5V13z M3,17h14v-2H3V17z M7,7v2h14V7H7z"/></g> +<g id="comment"><path d="M22,4c0-1.1-0.9-2-2-2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4L22,4z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> +<g id="contacts"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M12,6.8c1.2,0,2.2,1,2.2,2.2c0,1.2-1,2.2-2.2,2.2s-2.2-1-2.2-2.2C9.8,7.8,10.8,6.8,12,6.8z M17,17H7v-1.5c0-1.7,3.3-2.5,5-2.5s5,0.8,5,2.5V17z M18,0H6C4.9,0,4,0.9,4,2h16C20,0.9,19.1,0,18,0z M6,24h12c1.1,0,2-0.9,2-2H4C4,23.1,4.9,24,6,24z"/></g> +<g id="dialpad"><path d="M12,19c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,19.9,13.1,19,12,19z M6,1C4.9,1,4,1.9,4,3c0,1.1,0.9,2,2,2s2-0.9,2-2C8,1.9,7.1,1,6,1z M6,7C4.9,7,4,7.9,4,9c0,1.1,0.9,2,2,2s2-0.9,2-2C8,7.9,7.1,7,6,7z M6,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C8,13.9,7.1,13,6,13z M18,5c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C16,4.1,16.9,5,18,5z M12,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,13.9,13.1,13,12,13z M18,13c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C20,13.9,19.1,13,18,13z M18,7c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C20,7.9,19.1,7,18,7z M12,7c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,7.9,13.1,7,12,7z M12,1c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2s2-0.9,2-2C14,1.9,13.1,1,12,1z"/></g> +<g id="dnd-on"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-1.8,0.6-3.5,1.7-4.9l11.2,11.2C15.5,19.4,13.8,20,12,20z M18.3,16.9L7.1,5.7C8.5,4.6,10.2,4,12,4c4.4,0,8,3.6,8,8C20,13.8,19.4,15.5,18.3,16.9z"/></g> +<g id="email"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="forum"><path d="M21,6h-2v9H6v2c0,0.6,0.4,1,1,1h11l4,4V7C22,6.4,21.6,6,21,6z M17,12V3c0-0.6-0.4-1-1-1H3C2.4,2,2,2.4,2,3v14l4-4h10C16.6,13,17,12.6,17,12z"/></g> +<g id="gmail"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18h-2V9.2L12,13L6,9.2V18H4V6h1.2l6.8,4.2L18.8,6H20V18z"/></g> +<g id="hangout"><path d="M11.5,2C6.8,2,3,5.8,3,10.5S6.8,19,11.5,19H12v3.5c4.9-2.3,8-7.5,8-12C20,5.8,16.2,2,11.5,2z M11,11l-1,2H8.5l1-2H8V8h3V11z M15,11l-1,2h-1.5l1-2H12V8h3V11z"/></g> +<g id="hangout-video"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M18,16l-4-3.2V16H6V8h8v3.2L18,8V16z"/></g> +<g id="hangout-video-off"><path d="M20,4H7.8l4,4H14v2.2l0.6,0.6L18,8v6.2l4,4c0-0.1,0-0.1,0-0.2V6C22,4.9,21.1,4,20,4z M2.3,1L1,2.3l2,2C2.4,4.6,2,5.3,2,6v12c0,1.1,0.9,2,2,2h14.7l2,2l1.3-1.3L2.3,1z M6,8h0.7l7.3,7.3V16H6V8z"/></g> +<g id="import-export"><path d="M9,3L5,7h3v7h2V7h3L9,3z M16,17v-7h-2v7h-3l4,4l4-4H16z"/></g> +<g id="invert-colors-off"><path d="M20.6,20.9l-2.4-2.4L12,12.2L8.4,8.7L7,7.2L4.3,4.5L3,5.8l2.8,2.8c-2.5,3.1-2.4,7.8,0.6,10.7c1.6,1.6,3.6,2.3,5.7,2.3c1.8,0,3.6-0.6,5-1.8l2.7,2.7l1.3-1.3L20.6,20.9z M12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6C6,12.3,6.4,11,7.2,10l4.8,4.8V19.6z M12,5.1v4.6l7.3,7.3c1.4-3,0.8-6.6-1.6-9L12,2.3l0,0v0L8.3,6l1.4,1.4L12,5.1z"/></g> +<g id="invert-colors-on"><path d="M17.7,7.9L12,2.3l0,0v0L6.3,7.9c-3.1,3.1-3.1,8.2,0,11.3c1.6,1.6,3.6,2.3,5.7,2.3s4.1-0.8,5.7-2.3C20.8,16.1,20.8,11.1,17.7,7.9z M12,19.6L12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6s0.6-3.1,1.8-4.2L12,5.1L12,19.6z"/></g> +<g id="live-help"><path d="M19,2H5C3.9,2,3,2.9,3,4v14c0,1.1,0.9,2,2,2h4l3,3l3-3h4c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M13,18h-2v-2h2V18z M15.1,10.3l-0.9,0.9C13.4,11.9,13,12.5,13,14h-2v-0.5c0-1.1,0.4-2.1,1.2-2.8l1.2-1.3C13.8,9.1,14,8.6,14,8c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2H8c0-2.2,1.8-4,4-4s4,1.8,4,4C16,8.9,15.6,9.7,15.1,10.3z"/></g> +<g id="location-off"><polygon points="11.7,11.5 11.7,11.5 11.6,11.4 "/><path d="M12,6.5c1.4,0,2.5,1.1,2.5,2.5c0,0.7-0.3,1.4-0.8,1.9l3.6,3.6c1-1.9,1.7-3.8,1.7-5.5c0-3.9-3.1-7-7-7c-2,0-3.8,0.8-5,2.1l3.2,3.2C10.6,6.8,11.3,6.5,12,6.5z M16.4,16.1l-4.6-4.6l-0.1-0.1L3.3,3L2,4.3l3.2,3.2C5.1,8,5,8.5,5,9c0,5.2,7,13,7,13s1.7-1.9,3.4-4.4l3.4,3.4l1.3-1.3L16.4,16.1z"/></g> +<g id="location-on"><path d="M12,2C8.1,2,5,5.1,5,9c0,5.2,7,13,7,13s7-7.8,7-13C19,5.1,15.9,2,12,2z M12,11.5c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5c1.4,0,2.5,1.1,2.5,2.5S13.4,11.5,12,11.5z"/></g> +<g id="message"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> +<g id="messenger"><path d="M20,2H4C2.9,2,2,2.9,2,4v18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z"/></g> +<g id="no-sim"><path d="M19,5c0-1.1-0.9-2-2-2h-7L7.7,5.3L19,16.7L19,5z M3.7,3.9L2.4,5.2L5,7.8V19c0,1.1,0.9,2,2,2h10c0.4,0,0.7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3,0,0.5-0.1,0.7-0.3c0.8-0.7,1.7-1.4,2.7-1.9c0.3-0.2,0.6-0.5,0.6-0.9l0-3.1c1.4-0.5,3-0.7,4.6-0.7s3.1,0.3,4.6,0.7l0,3.1c0,0.4,0.2,0.7,0.6,0.9c1,0.5,1.9,1.1,2.7,1.9c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3l2.5-2.5c0.2-0.2,0.3-0.4,0.3-0.7C24,17.1,23.9,16.9,23.7,16.7z M21.2,6.3l-1.4-1.4l-3.6,3.6l1.4,1.4C17.6,9.8,21,6.3,21.2,6.3z M13,2h-2v5h2V2z M6.4,9.8l1.4-1.4L4.3,4.8L2.8,6.3C3,6.3,6.4,9.8,6.4,9.8z"/></g> +<g id="search-hands-free"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M11,19.9c-3.6-0.5-6.5-3.3-6.9-6.9h3c0.4,2,1.9,3.5,3.9,3.9V19.9z M10,8l-3,3H4.1C4.6,7.1,7.9,4,12,4s7.4,3.1,7.9,7H17l-3-3H10z M13,19.9v-3c2-0.4,3.5-1.9,3.9-3.9h3C19.5,16.6,16.6,19.5,13,19.9z"/></g> +<g id="stay-current-landscape"><path d="M1,7l0,10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7c0-1.1-0.9-2-2-2H3C1.9,5,1,5.9,1,7z M19,7v10H5V7H19z"/></g> +<g id="stay-current-portrait"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> +<g id="stay-primary-landscape"><path d="M1,7l0,10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7c0-1.1-0.9-2-2-2H3C1.9,5,1,5.9,1,7z M19,7v10H5V7H19z"/></g> +<g id="stay-primary-portrait"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> +<g id="swap-calls"><path d="M18,4l-4,4h3v7c0,1.1-0.9,2-2,2s-2-0.9-2-2V8c0-2.2-1.8-4-4-4S5,5.8,5,8v7H2l4,4l4-4H7V8c0-1.1,0.9-2,2-2s2,0.9,2,2v7c0,2.2,1.8,4,4,4s4-1.8,4-4V8h3L18,4z"/></g> +<g id="textsms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M9,11H7V9h2V11z M13,11h-2V9h2V11z M17,11h-2V9h2V11z"/></g> +<g id="voicemail"><path d="M18.5,6c-3,0-5.5,2.5-5.5,5.5c0,1.3,0.5,2.5,1.3,3.5H9.7c0.8-1,1.3-2.2,1.3-3.5C11,8.5,8.5,6,5.5,6S0,8.5,0,11.5S2.5,17,5.5,17h13c3,0,5.5-2.5,5.5-5.5S21.5,6,18.5,6z M5.5,15C3.6,15,2,13.4,2,11.5C2,9.6,3.6,8,5.5,8C7.4,8,9,9.6,9,11.5C9,13.4,7.4,15,5.5,15z M18.5,15c-1.9,0-3.5-1.6-3.5-3.5C15,9.6,16.6,8,18.5,8c1.9,0,3.5,1.6,3.5,3.5C22,13.4,20.4,15,18.5,15z"/></g> +<g id="vpn"><path d="M12.7,10c-0.8-2.3-3-4-5.7-4c-3.3,0-6,2.7-6,6s2.7,6,6,6c2.6,0,4.8-1.7,5.7-4H17v4h4v-4h2v-4H12.7z M7,14c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2s2,0.9,2,2C9,13.1,8.1,14,7,14z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/core-icons.html b/third_party/polymer/components-chromium/core-icons/core-icons.html new file mode 100644 index 0000000..0395946 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/core-icons.html @@ -0,0 +1,226 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="icons" iconSize="24"> +<svg><defs> +<g id="accessibility"><path d="M12,2c1.1,0,2,0.9,2,2s-0.9,2-2,2s-2-0.9-2-2S10.9,2,12,2z M21,9h-6v13h-2v-6h-2v6H9V9H3V7h18V9z"/></g> +<g id="account-balance"><path d="M4,10v7h3v-7H4z M10,10v7h3v-7H10z M2,22h19v-3H2V22z M16,10v7h3v-7H16z M11.5,1L2,6v2h19V6L11.5,1z"/></g> +<g id="account-box"><path d="M3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5z M15,9c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3c0-1.7,1.3-3,3-3C13.7,6,15,7.3,15,9z M6,17c0-2,4-3.1,6-3.1s6,1.1,6,3.1v1H6V17z"/></g> +<g id="account-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,5c1.7,0,3,1.3,3,3c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3C9,6.3,10.3,5,12,5z M12,19.2c-2.5,0-4.7-1.3-6-3.2c0-2,4-3.1,6-3.1c2,0,6,1.1,6,3.1C16.7,17.9,14.5,19.2,12,19.2z"/></g> +<g id="add"><path d="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z"/></g> +<g id="add-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> +<g id="add-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13h-4v4h-2v-4H7v-2h4V7h2v4h4V13z"/></g> +<g id="add-circle-outline"><path d="M13,7h-2v4H7v2h4v4h2v-4h4v-2h-4V7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="add-shopping-cart"><polygon points="18.3,6 18.3,6 15.6,11 "/><path d="M11,9h2V6h3V4h-3V1h-2v3H8v2h3V9z M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S8.1,18,7,18z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S18.1,18,17,18z M7.2,14.8c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.9-7l-1.7-1h0l-1.1,2l-2.8,5h-7l-0.1-0.3L6.2,6L5.2,4L4.3,2H1v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4C7.3,15,7.2,14.9,7.2,14.8z"/></g> +<g id="android"><path d="M6,18c0,0.6,0.4,1,1,1h1v3.5C8,23.3,8.7,24,9.5,24c0.8,0,1.5-0.7,1.5-1.5V19h2v3.5c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5V19h1c0.6,0,1-0.4,1-1V8H6V18z M3.5,8C2.7,8,2,8.7,2,9.5v7C2,17.3,2.7,18,3.5,18C4.3,18,5,17.3,5,16.5v-7C5,8.7,4.3,8,3.5,8z M20.5,8C19.7,8,19,8.7,19,9.5v7c0,0.8,0.7,1.5,1.5,1.5c0.8,0,1.5-0.7,1.5-1.5v-7C22,8.7,21.3,8,20.5,8z M15.5,2.2l1.3-1.3c0.2-0.2,0.2-0.5,0-0.7c-0.2-0.2-0.5-0.2-0.7,0l-1.5,1.5C13.9,1.2,13,1,12,1c-1,0-1.9,0.2-2.7,0.6L7.9,0.1C7.7,0,7.3,0,7.1,0.1C7,0.3,7,0.7,7.1,0.9l1.3,1.3C7,3.3,6,5,6,7h12C18,5,17,3.2,15.5,2.2z M10,5H9V4h1V5z M15,5h-1V4h1V5z"/></g> +<g id="apps"><path d="M4,8h4V4H4V8z M10,20h4v-4h-4V20z M4,20h4v-4H4V20z M4,14h4v-4H4V14z M10,14h4v-4h-4V14z M16,4v4h4V4H16z M10,8h4V4h-4V8z M16,14h4v-4h-4V14z M16,20h4v-4h-4V20z"/></g> +<g id="archive"><path d="M20.5,5.2l-1.4-1.7C18.9,3.2,18.5,3,18,3H6C5.5,3,5.1,3.2,4.8,3.5L3.5,5.2C3.2,5.6,3,6,3,6.5V19c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6.5C21,6,20.8,5.6,20.5,5.2z M12,17.5L6.5,12H10v-2h4v2h3.5L12,17.5z M5.1,5l0.8-1h12l0.9,1H5.1z"/></g> +<g id="arrow-back"><path d="M20,11H7.8l5.6-5.6L12,4l-8,8l8,8l1.4-1.4L7.8,13H20V11z"/></g> +<g id="arrow-drop-down"><polygon points="7,10 12,15 17,10 "/></g> +<g id="arrow-drop-down-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,14l-4-4h8L12,14z"/></g> +<g id="arrow-drop-up"><polygon points="7,14 12,9 17,14 "/></g> +<g id="arrow-forward"><polygon points="12,4 10.6,5.4 16.2,11 4,11 4,13 16.2,13 10.6,18.6 12,20 20,12 "/></g> +<g id="aspect-ratio"><path d="M19,12h-2v3h-3v2h5V12z M7,9h3V7H5v5h2V9z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> +<g id="attachment"><path d="M7.5,18c-3,0-5.5-2.5-5.5-5.5S4.5,7,7.5,7H18c2.2,0,4,1.8,4,4s-1.8,4-4,4H9.5C8.1,15,7,13.9,7,12.5S8.1,10,9.5,10H17v1.5H9.5c-0.6,0-1,0.4-1,1s0.4,1,1,1H18c1.4,0,2.5-1.1,2.5-2.5S19.4,8.5,18,8.5H7.5c-2.2,0-4,1.8-4,4s1.8,4,4,4H17V18H7.5z"/></g> +<g id="backspace"><path d="M22,3H7C6.3,3,5.8,3.3,5.4,3.9L0,12l5.4,8.1C5.8,20.6,6.3,21,7,21h15c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M19,15.6L17.6,17L14,13.4L10.4,17L9,15.6l3.6-3.6L9,8.4L10.4,7l3.6,3.6L17.6,7L19,8.4L15.4,12L19,15.6z"/></g> +<g id="backup"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> +<g id="block"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M4,12c0-4.4,3.6-8,8-8c1.8,0,3.5,0.6,4.9,1.7L5.7,16.9C4.6,15.5,4,13.8,4,12z M12,20c-1.8,0-3.5-0.6-4.9-1.7L18.3,7.1C19.4,8.5,20,10.2,20,12C20,16.4,16.4,20,12,20z"/></g> +<g id="book"><path d="M18,22c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2h-6v7L9.5,7.5L7,9V2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2H18z"/></g> +<g id="bookmark"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z"/></g> +<g id="bookmark-outline"><path d="M17,3H7C5.9,3,5,3.9,5,5l0,16l7-3l7,3V5C19,3.9,18.1,3,17,3z M17,18l-5-2.2L7,18V5h10V18z"/></g> +<g id="bug-report"><path d="M20,8h-2.8c-0.5-0.8-1.1-1.5-1.8-2L17,4.4L15.6,3l-2.2,2.2C13,5.1,12.5,5,12,5s-1,0.1-1.4,0.2L8.4,3L7,4.4L8.6,6C7.9,6.5,7.3,7.2,6.8,8H4v2h2.1C6,10.3,6,10.7,6,11v1H4v2h2v1c0,0.3,0,0.7,0.1,1H4v2h2.8c1,1.8,3,3,5.2,3s4.2-1.2,5.2-3H20v-2h-2.1c0.1-0.3,0.1-0.7,0.1-1v-1h2v-2h-2v-1c0-0.3,0-0.7-0.1-1H20V8z M14,16h-4v-2h4V16z M14,12h-4v-2h4V12z"/></g> +<g id="cancel"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,15.6L15.6,17L12,13.4L8.4,17L7,15.6l3.6-3.6L7,8.4L8.4,7l3.6,3.6L15.6,7L17,8.4L13.4,12L17,15.6z"/></g> +<g id="check"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "/></g> +<g id="check-box"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> +<g id="check-box-blank"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="check-box-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M19,19L5,19V5h10V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-8h-2V19z"/></g> +<g id="check-box-outline-blank"><path d="M19,5v14L5,19V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g> +<g id="check-circle"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M10,17l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,8L10,17z"/></g> +<g id="check-circle-blank"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z"/></g> +<g id="check-circle-outline"><path d="M7.9,10.1l-1.4,1.4L11,16L21,6l-1.4-1.4L11,13.2L7.9,10.1z M20,12c0,4.4-3.6,8-8,8s-8-3.6-8-8s3.6-8,8-8c0.8,0,1.5,0.1,2.2,0.3l1.6-1.6C14.6,2.3,13.3,2,12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10H20z"/></g> +<g id="check-circle-outline-blank"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="chevron-left"><polygon points="15.4,7.4 14,6 8,12 14,18 15.4,16.6 10.8,12 "/></g> +<g id="chevron-right"><polygon points="10,6 8.6,7.4 13.2,12 8.6,16.6 10,18 16,12 "/></g> +<g id="clear"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "/></g> +<g id="close"><polygon points="19,6.4 17.6,5 12,10.6 6.4,5 5,6.4 10.6,12 5,17.6 6.4,19 12,13.4 17.6,19 19,17.6 13.4,12 "/></g> +<g id="cloud"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z"/></g> +<g id="cloud-circle"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M16.5,16c0,0-8.5,0-8.5,0c-1.7,0-3-1.3-3-3s1.3-3,3-3c0,0,0.1,0,0.1,0c0.4-1.7,2-3,3.9-3c2.2,0,4,1.8,4,4h0.5c1.4,0,2.5,1.1,2.5,2.5C19,14.9,17.9,16,16.5,16z"/></g> +<g id="cloud-done"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M10,17l-3.5-3.5l1.4-1.4l2.1,2.1L15.2,9l1.4,1.4L10,17z"/></g> +<g id="cloud-download"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M17,13l-5,5l-5-5h3V9h4v4H17z"/></g> +<g id="cloud-off"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6c-1.5,0-2.9,0.4-4,1.2l1.5,1.5C10.2,6.2,11.1,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3c0,1.1-0.6,2.1-1.6,2.6l1.5,1.5c1.3-0.9,2.1-2.4,2.1-4.1C24,12.4,21.9,10.2,19.4,10z M3,5.3L5.8,8C2.6,8.2,0,10.8,0,14c0,3.3,2.7,6,6,6h11.7l2,2l1.3-1.3L4.3,4L3,5.3z M7.7,10l8,8H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4H7.7z"/></g> +<g id="cloud-queue"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M19,18H6c-2.2,0-4-1.8-4-4c0-2.2,1.8-4,4-4h0.7C7.4,7.7,9.5,6,12,6c3,0,5.5,2.5,5.5,5.5V12H19c1.7,0,3,1.3,3,3S20.7,18,19,18z"/></g> +<g id="cloud-upload"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z M14,13v4h-4v-4H7l5-5l5,5H14z"/></g> +<g id="content-copy"><path d="M16,1H4C2.9,1,2,1.9,2,3v14h2V3h12V1z M19,5H8C6.9,5,6,5.9,6,7v14c0,1.1,0.9,2,2,2h11c1.1,0,2-0.9,2-2V7C21,5.9,20.1,5,19,5z M19,21H8V7h11V21z"/></g> +<g id="content-cut"><path d="M10,6c0-2.2-1.8-4-4-4S2,3.8,2,6c0,2.2,1.8,4,4,4c0.6,0,1.1-0.1,1.6-0.4L10,12l-2.4,2.4C7.1,14.1,6.6,14,6,14c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4c0-0.6-0.1-1.1-0.4-1.6L12,14l7,7h4L9.6,7.6C9.9,7.1,10,6.6,10,6z M6,8C4.9,8,4,7.1,4,6s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,8,6,8z M6,20c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S7.1,20,6,20z M12,11.5c0.3,0,0.5,0.2,0.5,0.5c0,0.3-0.2,0.5-0.5,0.5c-0.3,0-0.5-0.2-0.5-0.5C11.5,11.7,11.7,11.5,12,11.5z M23,3h-4l-6,6l2,2L23,3z"/></g> +<g id="content-paste"><path d="M19,2h-4.2c-0.4-1.2-1.5-2-2.8-2c-1.3,0-2.4,0.8-2.8,2H5C3.9,2,3,2.9,3,4v16c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M12,2c0.6,0,1,0.4,1,1s-0.4,1-1,1c-0.6,0-1-0.4-1-1S11.4,2,12,2z M19,20H5V4h2v3h10V4h2V20z"/></g> +<g id="create"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z"/></g> +<g id="credit-card"><path d="M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4v-6h16V18z M20,8H4V6h16V8z"/></g> +<g id="delete"><path d="M6,19c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V7H6V19z M19,4h-3.5l-1-1h-5l-1,1H5v2h14V4z"/></g> +<g id="developer-mode-tv"><path d="M4,5h16v2h2l0-2c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v2h2V5z M7.6,13.8L4.7,11l2.8-2.8L6.1,6.8L1.9,11l4.2,4.2L7.6,13.8z M20,17H4v-2H2v2c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-2h-2V17z M22,11l-4.2-4.2l-1.4,1.4l2.8,2.8l-2.8,2.8l1.4,1.4L22,11L22,11L22,11L22,11L22,11z"/></g> +<g id="done"><polygon points="9,16.2 4.8,12 3.4,13.4 9,19 21,7 19.6,5.6 "/></g> +<g id="done-all"><path d="M18,7l-1.4-1.4l-6.3,6.3l1.4,1.4L18,7z M22.2,5.6L11.7,16.2L7.5,12l-1.4,1.4l5.6,5.6l12-12L22.2,5.6z M0.4,13.4L6,19l1.4-1.4L1.8,12L0.4,13.4z"/></g> +<g id="drafts"><path d="M22,8c0-0.7-0.4-1.3-0.9-1.7L12,1L2.9,6.3C2.4,6.7,2,7.3,2,8v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2L22,8z M12,13L3.7,7.8L12,3l8.3,4.8L12,13z"/></g> +<g id="drawer"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> +<g id="drive"><path d="M22.3,14L15.4,2H8.6l0,0l6.9,12H22.3z M9.7,15l-3.4,6h13.1l3.4-6H9.7z M7.7,3.5L1.2,15l3.4,6l6.6-11.5L7.7,3.5z"/></g> +<g id="drive-audio"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M7.2,18C6.5,18,6,17.5,6,16.8v-3.6V12c0-3.3,2.7-6,6-6s6,2.7,6,6v1.2v3.6c0,0.7-0.5,1.2-1.2,1.2H14v-4h2v-2c0-2.2-1.8-4-4-4s-4,1.8-4,4v2h2v4H7.2z"/></g> +<g id="drive-chart"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> +<g id="drive-document"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,9H7V7h10V9z M17,13H7v-2h10V13z M14,17H7v-2h7V17z"/></g> +<g id="drive-drawing"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,18h-6v-5.8c-0.7,0.6-1.5,1-2.5,1c-2,0-3.7-1.7-3.7-3.7s1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1-0.4,1.8-1,2.5H18V18z"/></g> +<g id="drive-file"><path d="M6,2C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"/></g> +<g id="drive-file-move"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M9,18v-3H5v-4h4V8l5,5L9,18z"/></g> +<g id="drive-file-rename"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M6,17v-2.5l7.9-7.9c0.2-0.2,0.5-0.2,0.7,0l1.8,1.8c0.2,0.2,0.2,0.5,0,0.7L8.5,17H6z M18,17h-7.5l2-2H18V17z"/></g> +<g id="drive-form"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-2h2V17z M9,13H7v-2h2V13z M9,9H7V7h2V9z M17,17h-7v-2h7V17z M17,13h-7v-2h7V13z M17,9h-7V7h7V9z"/></g> +<g id="drive-fusiontable"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,10.2L13,17l-4-4l-4,4v-3l4-4l4,4l6-6.8V10.2z"/></g> +<g id="drive-image"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> +<g id="drive-keep"><path d="M9,21c0,0.6,0.4,1,1,1h4c0.6,0,1-0.4,1-1v-1H9V21z M12,2C8.1,2,5,5.1,5,9c0,2.4,1.2,4.5,3,5.7V17c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1v-2.3c1.8-1.3,3-3.4,3-5.7C19,5.1,15.9,2,12,2z"/></g> +<g id="drive-ms-excel"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M16.2,17h-2L12,13.2L9.8,17h-2l3.2-5L7.8,7h2l2.2,3.8L14.2,7h2L13,12L16.2,17z"/></g> +<g id="drive-ms-powerpoint"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9.8,13.4V17H8V7h4.3c1.5,0,2.2,0.3,2.8,0.9c0.7,0.6,0.9,1.4,0.9,2.3c0,1-0.3,1.8-0.9,2.3c-0.6,0.5-1.3,0.8-2.8,0.8H9.8z"/><path d="M9.8,12V8.4h2.3c0.7,0,1.2,0.2,1.5,0.6c0.3,0.4,0.5,0.7,0.5,1.2c0,0.6-0.2,0.9-0.5,1.3c-0.3,0.3-0.7,0.5-1.4,0.5H9.8z"/></g> +<g id="drive-ms-word"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M15.5,17H14l-2-7.5L10,17H8.5L6.1,7h1.7l1.5,7.5l2-7.5h1.4l2,7.5L16.2,7h1.7L15.5,17z"/></g> +<g id="drive-pdf"><path d="M11.3,8.6L11.3,8.6C11.4,8.6,11.4,8.6,11.3,8.6c0.1-0.4,0.2-0.6,0.2-0.9l0-0.2c0.1-0.5,0.1-0.9,0-1c0,0,0,0,0-0.1l-0.1-0.1c0,0,0,0,0,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8z M11.4,10.9c-0.2,0.7-0.6,1.5-1,2.4c-0.2,0.4-0.4,0.7-0.6,1.1c0,0,0.1,0,0.1,0l0.1,0v0c1.3-0.5,2.5-0.8,3.3-0.9c-0.2-0.1-0.3-0.2-0.4-0.3C12.4,12.6,11.8,11.8,11.4,10.9z"/></g> +<g id="drive-presentation"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,16H5V8h14V16z"/></g> +<g id="drive-script"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,4h0v6h0l0,4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M11,17v-3H5v-4h6V7l5,5L11,17z"/></g> +<g id="drive-site"><path d="M19,4H5C3.9,4,3,4.9,3,6l0,12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4z M14,18H5v-4h9V18z M14,13H5V9h9V13z M19,18h-4V9h4V18z"/></g> +<g id="drive-spreadsheet"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,3h0v11c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,11h-8v8H9v-8H5V9h4V5h2v4h8V11z"/></g> +<g id="drive-text"><path d="M14,2H6C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8L14,2z M16,18H8v-2h8V18z M16,14H8v-2h8V14z M13,9V3.5L18.5,9H13z"/></g> +<g id="drive-video"><path d="M18,4l2,4h-3l-2-4h-2l2,4h-3l-2-4H8l2,4H7L5,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4H18z"/></g> +<g id="drive-zip"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M14,9h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2V9z M14,17h-2v-2h-2v-2h2v2h2V17z"/></g> +<g id="error"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-2h2V17z M13,13h-2V7h2V13z"/></g> +<g id="event"><path d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> +<g id="exit-to-app"><path d="M10.1,15.6l1.4,1.4l5-5l-5-5l-1.4,1.4l2.6,2.6H3v2h9.7L10.1,15.6z M19,3H5C3.9,3,3,3.9,3,5v4h2V5h14v14H5v-4H3v4c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="expand-less"><polygon points="12,8 6,14 7.4,15.4 12,10.8 16.6,15.4 18,14 "/></g> +<g id="expand-more"><polygon points="16.6,8.6 12,13.2 7.4,8.6 6,10 12,16 18,10 "/></g> +<g id="explore"><path d="M12,10.9c-0.6,0-1.1,0.5-1.1,1.1s0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1S12.6,10.9,12,10.9z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M14.2,14.2L6,18l3.8-8.2L18,6L14.2,14.2z"/></g> +<g id="extension"><path d="M20.5,11H19V7c0-1.1-0.9-2-2-2h-4V3.5C13,2.1,11.9,1,10.5,1C9.1,1,8,2.1,8,3.5V5H4C2.9,5,2,5.9,2,7l0,3.8h1.5c1.5,0,2.7,1.2,2.7,2.7S5,16.2,3.5,16.2H2L2,20c0,1.1,0.9,2,2,2h3.8v-1.5c0-1.5,1.2-2.7,2.7-2.7c1.5,0,2.7,1.2,2.7,2.7V22H17c1.1,0,2-0.9,2-2v-4h1.5c1.4,0,2.5-1.1,2.5-2.5S21.9,11,20.5,11z"/></g> +<g id="favorite"><path d="M12,21.4L10.6,20C5.4,15.4,2,12.3,2,8.5C2,5.4,4.4,3,7.5,3c1.7,0,3.4,0.8,4.5,2.1C13.1,3.8,14.8,3,16.5,3C19.6,3,22,5.4,22,8.5c0,3.8-3.4,6.9-8.6,11.5L12,21.4z"/></g> +<g id="favorite-outline"><path d="M16.5,3c-1.7,0-3.4,0.8-4.5,2.1C10.9,3.8,9.2,3,7.5,3C4.4,3,2,5.4,2,8.5c0,3.8,3.4,6.9,8.6,11.5l1.4,1.3l1.4-1.3c5.1-4.7,8.6-7.8,8.6-11.5C22,5.4,19.6,3,16.5,3z M12.1,18.6L12,18.6l-0.1-0.1C7.1,14.2,4,11.4,4,8.5C4,6.5,5.5,5,7.5,5c1.5,0,3,1,3.6,2.4h1.9C13.5,6,15,5,16.5,5c2,0,3.5,1.5,3.5,3.5C20,11.4,16.9,14.2,12.1,18.6z"/></g> +<g id="file-download"><path d="M19,9h-4V3H9v6H5l7,7L19,9z M5,18v2h14v-2H5z"/></g> +<g id="file-upload"><polygon points="9,16 15,16 15,10 19,10 12,3 5,10 9,10 "/><rect x="5" y="18" width="14" height="2"/></g> +<g id="filter"><path d="M10,18h4v-2h-4V18z M3,6v2h18V6H3z M6,13h12v-2H6V13z"/></g> +<g id="flag"><polygon points="14.4,6 14,4 5,4 5,21 7,21 7,14 12.6,14 13,16 20,16 20,6 "/></g> +<g id="flip-to-back"><path d="M9,7H7l0,2h2V7z M9,11H7v2h2V11z M9,3C7.9,3,7,3.9,7,5h2V3z M13,15h-2v2h2V15z M19,3v2h2C21,3.9,20.1,3,19,3z M13,3h-2v2h2V3z M9,17v-2H7C7,16.1,7.9,17,9,17z M19,13h2v-2h-2V13z M19,9h2V7h-2V9z M19,17c1.1,0,2-0.9,2-2h-2V17z M5,7H3v2h0l0,10c0,1.1,0.9,2,2,2h12v-2H5V7z M15,5h2V3h-2V5z M15,17h2v-2h-2V17z"/></g> +<g id="flip-to-front"><path d="M3,13h2v-2H3L3,13z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,9h2V7H3V9z M15,21h2v-2h-2V21z M19,3H9C7.9,3,7,3.9,7,5v2h0v2v6c0,1.1,0.9,2,2,2h5h4h1c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15H9V5h10V15z M11,21h2v-2h-2V21z M7,21h2v-2H7V21z"/></g> +<g id="folder"><path d="M10,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8c0-1.1-0.9-2-2-2h-8L10,4z"/></g> +<g id="folder-mydrive"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M11.5,17l-1.1-2.1l2.8-5l1.5,2.7L12.3,17H11.5z M18.3,17h-5.5l1.4-2.5h5.1l0.3,0.5L18.3,17z M13.8,9h2.4l2.8,5H16l-2.6-4.5L13.8,9z"/></g> +<g id="folder-open"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V8h16V18z"/></g> +<g id="folder-shared"><path d="M20,6h-8l-2-2H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M15,9c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2C13,9.9,13.9,9,15,9z M19,17h-8v-1c0-1.3,2.7-2,4-2c1.3,0,4,0.7,4,2V17z"/></g> +<g id="forward"><polygon points="12,8 12,4 20,12 12,20 12,16 4,16 4,8 "/></g> +<g id="fullscreen"><path d="M7,14H5v5h5v-2H7V14z M5,10h2V7h3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,1.2-2.8l1.2-1.3C13.8,10.1,14,9.6,14,9c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2H8c0-2.2,1.8-4,4-4c2.2,0,4,1.8,4,4C16,9.9,15.6,10.7,15.1,11.3z"/></g> +<g id="history"><path opacity="0.9" d="M12.5,2C9,2,5.9,3.9,4.3,6.8L2,4.5V11h6.5L5.7,8.2C7,5.7,9.5,4,12.5,4c4.1,0,7.5,3.4,7.5,7.5c0,4.1-3.4,7.5-7.5,7.5c-3.3,0-6-2.1-7.1-5H3.3c1.1,4,4.8,7,9.2,7c5.3,0,9.5-4.3,9.5-9.5S17.7,2,12.5,2z M11,7v5.1l4.7,2.8l0.8-1.3l-4-2.4V7H11z"/></g> +<g id="home"><polygon points="10,20 10,14 14,14 14,20 19,20 19,12 22,12 12,3 2,12 5,12 5,20 "/></g> +<g id="https"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> +<g id="inbox"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,15h-4c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3H5V5h14V15z M16,10h-2V7h-4v3H8l4,4L16,10z"/></g> +<g id="info"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M13,17h-2v-6h2V17z M13,9h-2V7h2V9z"/></g> +<g id="info-outline"><path d="M11,17h2v-6h-2V17z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M11,9h2V7h-2V9z"/></g> +<g id="input"><path d="M21,3H3C1.9,3,1,3.9,1,5v4h2V5h18v14H3v-4H1v4c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M11,16l4-4l-4-4v3H1v2h10V16z"/></g> +<g id="invert-colors"><path d="M17.7,7.9L12,2.3l0,0v0L6.3,7.9c-3.1,3.1-3.1,8.2,0,11.3c1.6,1.6,3.6,2.3,5.7,2.3c2,0,4.1-0.8,5.7-2.3C20.8,16.1,20.8,11.1,17.7,7.9z M12,19.6L12,19.6c-1.6,0-3.1-0.6-4.2-1.8C6.6,16.7,6,15.2,6,13.6c0-1.6,0.6-3.1,1.8-4.2L12,5.1L12,19.6z"/></g> +<g id="keep"><path d="M16,12V4h1V2H7v2h1v8l-2,2v2h5.2v6h1.6v-6H18v-2L16,12z"/></g> +<g id="label"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z"/></g> +<g id="label-outline"><path d="M17.6,5.8C17.3,5.3,16.7,5,16,5L5,5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2l11,0c0.7,0,1.3-0.3,1.6-0.8L22,12L17.6,5.8z M16,17H5V7h11l3.5,5L16,17z"/></g> +<g id="language"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M18.9,8H16c-0.3-1.3-0.8-2.4-1.4-3.6C16.4,5.1,18,6.3,18.9,8z M12,4c0.8,1.2,1.5,2.5,1.9,4h-3.8C10.5,6.6,11.2,5.2,12,4z M4.3,14C4.1,13.4,4,12.7,4,12s0.1-1.4,0.3-2h3.4c-0.1,0.7-0.1,1.3-0.1,2s0.1,1.3,0.1,2H4.3z M5.1,16H8c0.3,1.3,0.8,2.4,1.4,3.6C7.6,18.9,6,17.7,5.1,16z M8,8H5.1c1-1.7,2.5-2.9,4.3-3.6C8.8,5.6,8.3,6.7,8,8z M12,20c-0.8-1.2-1.5-2.5-1.9-4h3.8C13.5,17.4,12.8,18.8,12,20z M14.3,14H9.7c-0.1-0.7-0.2-1.3-0.2-2s0.1-1.3,0.2-2h4.7c0.1,0.7,0.2,1.3,0.2,2S14.4,13.3,14.3,14z M14.6,19.6c0.6-1.1,1.1-2.3,1.4-3.6h2.9C18,17.7,16.4,18.9,14.6,19.6z M16.4,14c0.1-0.7,0.1-1.3,0.1-2s-0.1-1.3-0.1-2h3.4c0.2,0.6,0.3,1.3,0.3,2s-0.1,1.4-0.3,2H16.4z"/></g> +<g id="launch"><path d="M19,19H5V5h7V3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-7h-2V19z M14,3v2h3.6l-9.8,9.8l1.4,1.4L19,6.4V10h2V3H14z"/></g> +<g id="link"><path d="M8,13h8v-2H8V13z M3.9,12c0-2.3,1.8-4.1,4.1-4.1h3V6H8c-3.3,0-6,2.7-6,6s2.7,6,6,6h3v-1.9H8C5.7,16.1,3.9,14.3,3.9,12z M16,6h-3v1.9h3c2.3,0,4.1,1.8,4.1,4.1c0,2.3-1.8,4.1-4.1,4.1h-3V18h3c3.3,0,6-2.7,6-6S19.3,6,16,6z"/></g> +<g id="list"><path d="M3,13h2v-2H3V13z M3,17h2v-2H3V17z M3,9h2V7H3V9z M7,13h14v-2H7V13z M7,17h14v-2H7V17z M7,7v2h14V7H7z"/></g> +<g id="lock"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1V8z"/></g> +<g id="lock-open"><path d="M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6h1.9c0-1.7,1.4-3.1,3.1-3.1c1.7,0,3.1,1.4,3.1,3.1v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M18,20H6V10h12V20z"/></g> +<g id="lock-outline"><path d="M18,8h-1V6c0-2.8-2.2-5-5-5C9.2,1,7,3.2,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,2.9c1.7,0,3.1,1.4,3.1,3.1v2H9V6H8.9C8.9,4.3,10.3,2.9,12,2.9z M18,20H6V10h12V20z M12,17c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,17,12,17z"/></g> +<g id="loyalty"><path d="M21.4,11.6l-9-9C12.1,2.2,11.6,2,11,2H4C2.9,2,2,2.9,2,4v7c0,0.6,0.2,1.1,0.6,1.4l9,9c0.4,0.4,0.9,0.6,1.4,0.6c0.6,0,1.1-0.2,1.4-0.6l7-7c0.4-0.4,0.6-0.9,0.6-1.4C22,12.4,21.8,11.9,21.4,11.6z M5.5,7C4.7,7,4,6.3,4,5.5S4.7,4,5.5,4S7,4.7,7,5.5S6.3,7,5.5,7z M17.3,15.3L13,19.5l-4.3-4.3l0,0C8.3,14.8,8,14.2,8,13.5c0-1.4,1.1-2.5,2.5-2.5c0.7,0,1.3,0.3,1.8,0.7l0.7,0.7l0.7-0.7c0.5-0.5,1.1-0.7,1.8-0.7c1.4,0,2.5,1.1,2.5,2.5C18,14.2,17.7,14.8,17.3,15.3L17.3,15.3z"/></g> +<g id="mail"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="markunread"><path d="M22,6l2-2l-2-2l-2,2l-2-2l-2,2l-2-2l-2,2l-2-2L8,4L6,2L4,4L2,2L0,4l2,2L0,8l2,2l-2,2l2,2l-2,2l2,2l-2,2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l2,2l2-2l-2-2l2-2l-2-2l2-2l-2-2l2-2L22,6z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="menu"><path d="M3,18h18v-2H3V18z M3,13h18v-2H3V13z M3,6v2h18V6H3z"/></g> +<g id="more-horiz"><path d="M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z"/></g> +<g id="more-vert"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> +<g id="payment"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4v-6h16V18z M20,8H4V6h16V8z"/></g> +<g id="picture-in-picture"><path d="M19,7h-8v6h8V7z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> +<g id="polymer"><polygon points="19,4 15,4 7.1,16.6 4.5,12 9,4 5,4 0.5,12 5,20 9,20 16.9,7.4 19.5,12 15,20 19,20 23.5,12 "/></g> +<g id="print"><path d="M19,8H5c-1.7,0-3,1.3-3,3v6h4v4h12v-4h4v-6C22,9.3,20.7,8,19,8z M16,19H8v-5h8V19z M19,12c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S19.6,12,19,12z M18,3H6v4h12V3z"/></g> +<g id="radio-button-off"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="radio-button-on"><path d="M12,7c-2.8,0-5,2.2-5,5s2.2,5,5,5c2.8,0,5-2.2,5-5S14.8,7,12,7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="receipt"><path d="M18,17H6v-2h12V17z M18,13H6v-2h12V13z M18,9H6V7h12V9z M3,22l1.5-1.5L6,22l1.5-1.5L9,22l1.5-1.5L12,22l1.5-1.5L15,22l1.5-1.5L18,22l1.5-1.5L21,22V2l-1.5,1.5L18,2l-1.5,1.5L15,2l-1.5,1.5L12,2l-1.5,1.5L9,2L7.5,3.5L6,2L4.5,3.5L3,2V22z"/></g> +<g id="refresh"><path d="M17.6,6.4C16.2,4.9,14.2,4,12,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c3.7,0,6.8-2.6,7.7-6h-2.1c-0.8,2.3-3,4-5.6,4c-3.3,0-6-2.7-6-6s2.7-6,6-6c1.7,0,3.1,0.7,4.2,1.8L13,11h7V4L17.6,6.4z"/></g> +<g id="reminder"><path d="M16.9,13c1.3-1.3,2.1-3,2.1-5c0-3.9-3.1-7-7-7C8.1,1,5,4.1,5,8c0,2,0.8,3.7,2.1,5l0,0l3.5,3.5L6,21.1l1.4,1.4L16.9,13z M15.5,11.5L15.5,11.5L12,15.1l-3.5-3.5l0,0l0,0C7.6,10.6,7,9.4,7,8c0-2.8,2.2-5,5-5c2.8,0,5,2.2,5,5C17,9.4,16.4,10.6,15.5,11.5L15.5,11.5z M13.4,19.3l3.2,3.2l1.4-1.4l-3.2-3.2L13.4,19.3z"/></g> +<g id="remove"><path d="M19,13H5v-2h14V13z"/></g> +<g id="remove-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M17,13H7v-2h10V13z"/></g> +<g id="remove-circle-outline"><path d="M7,11v2h10v-2H7z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="reply"><path d="M10,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C20,15,17,10,10,9z"/></g> +<g id="reply-all"><path d="M7,8V5l-7,7l7,7v-3l-4-4L7,8z M13,9V5l-7,7l7,7v-4.1c5,0,8.5,1.6,11,5.1C23,15,20,10,13,9z"/></g> +<g id="report"><path d="M15.7,3H8.3L3,8.3v7.5L8.3,21h7.5l5.3-5.3V8.3L15.7,3z M12,17.3c-0.7,0-1.3-0.6-1.3-1.3c0-0.7,0.6-1.3,1.3-1.3c0.7,0,1.3,0.6,1.3,1.3C13.3,16.7,12.7,17.3,12,17.3z M13,13h-2V7h2V13z"/></g> +<g id="rotate-left"><path d="M7.1,8.5L5.7,7.1C4.8,8.3,4.2,9.6,4.1,11h2C6.2,10.1,6.6,9.3,7.1,8.5z M6.1,13h-2c0.2,1.4,0.7,2.7,1.6,3.9l1.4-1.4C6.6,14.7,6.2,13.9,6.1,13z M7.1,18.3c1.2,0.9,2.5,1.4,3.9,1.6v-2c-0.9-0.1-1.7-0.5-2.5-1L7.1,18.3z M13,4.1V1L8.5,5.5L13,10V6.1c2.8,0.5,5,2.9,5,5.9s-2.2,5.4-5,5.9v2c3.9-0.5,7-3.9,7-7.9S16.9,4.6,13,4.1z"/></g> +<g id="rotate-right"><path d="M15.5,5.5L11,1v3.1C7.1,4.6,4,7.9,4,12s3.1,7.4,7,7.9v-2C8.2,17.4,6,15,6,12s2.2-5.4,5-5.9V10L15.5,5.5z M19.9,11c-0.2-1.4-0.7-2.7-1.6-3.9l-1.4,1.4c0.5,0.8,0.9,1.6,1,2.5H19.9z M13,17.9v2c1.4-0.2,2.7-0.7,3.9-1.6l-1.4-1.4C14.7,17.4,13.9,17.8,13,17.9z M16.9,15.5l1.4,1.4c0.9-1.2,1.5-2.5,1.6-3.9h-2C17.8,13.9,17.4,14.7,16.9,15.5z"/></g> +<g id="save"><path d="M17,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7L17,3z M12,19c-1.7,0-3-1.3-3-3s1.3-3,3-3c1.7,0,3,1.3,3,3S13.7,19,12,19z M15,9H5V5h10V9z"/></g> +<g id="schedule"><path fill-opacity="0.9" d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><polygon fill-opacity="0.9" points="12.5,7 11,7 11,13 16.2,16.2 17,14.9 12.5,12.2 "/></g> +<g id="search"><path d="M15.5,14h-0.8l-0.3-0.3c1-1.1,1.6-2.6,1.6-4.2C16,5.9,13.1,3,9.5,3C5.9,3,3,5.9,3,9.5S5.9,16,9.5,16c1.6,0,3.1-0.6,4.2-1.6l0.3,0.3v0.8l5,5l1.5-1.5L15.5,14z M9.5,14C7,14,5,12,5,9.5S7,5,9.5,5C12,5,14,7,14,9.5S12,14,9.5,14z"/></g> +<g id="select-all"><path d="M3,5h2V3C3.9,3,3,3.9,3,5z M3,13h2v-2H3V13z M7,21h2v-2H7V21z M3,9h2V7H3V9z M13,3h-2v2h2V3z M19,3v2h2C21,3.9,20.1,3,19,3z M5,21v-2H3C3,20.1,3.9,21,5,21z M3,17h2v-2H3V17z M9,3H7v2h2V3z M11,21h2v-2h-2V21z M19,13h2v-2h-2V13z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,9h2V7h-2V9z M19,17h2v-2h-2V17z M15,21h2v-2h-2V21z M15,5h2V3h-2V5z M7,17h10V7H7V17z M9,9h6v6H9V9z"/></g> +<g id="send"><polygon points="2,21 23,12 2,3 2,10 17,12 2,14 "/></g> +<g id="send-money"><path d="M2,12c0-2.6,1.7-4.8,4-5.7V4.3c-3.4,0.9-6,4-6,7.7s2.6,6.8,6,7.7v-2.1C3.7,16.8,2,14.6,2,12z M24,12l-4-4v3h-7v2h7v3L24,12z M14,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c1.7,0,3.2,0.7,4.2,1.8l1.4-1.4C18.2,4.9,16.2,4,14,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c2.2,0,4.2-0.9,5.7-2.3l-1.4-1.4C17.2,17.3,15.7,18,14,18z"/></g> +<g id="settings"><path d="M19.4,13c0-0.3,0.1-0.6,0.1-1s0-0.7-0.1-1l2.1-1.7c0.2-0.2,0.2-0.4,0.1-0.6l-2-3.5C19.5,5.1,19.3,5,19,5.1l-2.5,1c-0.5-0.4-1.1-0.7-1.7-1l-0.4-2.6C14.5,2.2,14.2,2,14,2h-4C9.8,2,9.5,2.2,9.5,2.4L9.1,5.1C8.5,5.3,8,5.7,7.4,6.1L5,5.1C4.7,5,4.5,5.1,4.3,5.3l-2,3.5C2.2,8.9,2.3,9.2,2.5,9.4L4.6,11c0,0.3-0.1,0.6-0.1,1s0,0.7,0.1,1l-2.1,1.7c-0.2,0.2-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.8,17.2,12z"/></g> +<g id="settings-backup-restore"><path d="M14,12c0-1.1-0.9-2-2-2s-2,0.9-2,2s0.9,2,2,2S14,13.1,14,12z M12,3c-5,0-9,4-9,9H0l4,4l4-4H5c0-3.9,3.1-7,7-7s7,3.1,7,7s-3.1,7-7,7c-1.5,0-2.9-0.5-4.1-1.3l-1.4,1.4C8,20.3,9.9,21,12,21c5,0,9-4,9-9S17,3,12,3z"/></g> +<g id="settings-bluetooth"><path d="M11,24h2v-2h-2V24z M7,24h2v-2H7V24z M15,24h2v-2h-2V24z M17.7,5.7L12,0h-1v7.6L6.4,3L5,4.4l5.6,5.6L5,15.6L6.4,17l4.6-4.6V20h1l5.7-5.7L13.4,10L17.7,5.7z M13,3.8l1.9,1.9L13,7.6V3.8z M14.9,14.3L13,16.2v-3.8L14.9,14.3z"/></g> +<g id="settings-cell"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M16,0L8,0C6.9,0,6,0.9,6,2v16c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V2C18,0.9,17.1,0,16,0z M16,16H8V4h8V16z"/></g> +<g id="settings-display"><path d="M21,19H3V5h18V19z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3L21,3z"/><path d="M10,12c0-1.1,0.9-2,2-2V8c0.3,0,0.7,0.1,1,0.1V6h-2v2.1c-0.4,0.1-0.7,0.2-1,0.4L8.5,7.1L7.1,8.5L8.6,10c-0.2,0.3-0.3,0.7-0.4,1H6v2h2.1c0.1,0.4,0.2,0.7,0.4,1l-1.5,1.5l1.4,1.4l1.5-1.5c0.3,0.2,0.7,0.3,1,0.4V18h2v-2.1c-0.3,0.1-0.7,0.1-1,0.1v-2C10.9,14,10,13.1,10,12z M15.4,10l1.5-1.5l-1.4-1.4L14,8.6C14.6,8.9,15.1,9.4,15.4,10z M14,15.4l1.5,1.5l1.4-1.4L15.4,14C15.1,14.6,14.6,15.1,14,15.4z M12,10v4c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z M15.9,11c0.1,0.3,0.1,0.7,0.1,1s-0.1,0.7-0.1,1H18v-2H15.9z"/></g> +<g id="settings-ethernet"><path d="M7.8,6.8L6.2,5.5L0.8,12l5.4,6.5l1.5-1.3L3.4,12L7.8,6.8z M7,13h2v-2H7V13z M17,11h-2v2h2V11z M11,13h2v-2h-2V13z M17.8,5.5l-1.5,1.3l4.3,5.2l-4.3,5.2l1.5,1.3l5.4-6.5L17.8,5.5z"/></g> +<g id="settings-input-antenna"><path d="M12,5c-3.9,0-7,3.1-7,7h2c0-2.8,2.2-5,5-5s5,2.2,5,5h2C19,8.1,15.9,5,12,5z M13,14.3c0.9-0.4,1.5-1.3,1.5-2.3c0-1.4-1.1-2.5-2.5-2.5S9.5,10.6,9.5,12c0,1,0.6,1.9,1.5,2.3v3.3L7.6,21L9,22.4l3-3l3,3l1.4-1.4L13,17.6V14.3z M12,1C5.9,1,1,5.9,1,12h2c0-5,4-9,9-9s9,4,9,9h2C23,5.9,18.1,1,12,1z"/></g> +<g id="settings-input-component"><path d="M5,2c0-0.6-0.4-1-1-1S3,1.4,3,2v4H1v6h6V6H5V2z M9,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H9V16z M1,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H1V16z M21,6V2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4h-2v6h6V6H21z M13,2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4H9v6h6V6h-2V2z M17,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2h-6V16z"/></g> +<g id="settings-input-composite"><path d="M5,2c0-0.6-0.4-1-1-1S3,1.4,3,2v4H1v6h6V6H5V2z M9,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H9V16z M1,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2H1V16z M21,6V2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4h-2v6h6V6H21z M13,2c0-0.6-0.4-1-1-1s-1,0.4-1,1v4H9v6h6V6h-2V2z M17,16c0,1.3,0.8,2.4,2,2.8V23h2v-4.2c1.2-0.4,2-1.5,2-2.8v-2h-6V16z"/></g> +<g id="settings-input-hdmi"><path d="M18,7V4c0-1.1-0.9-2-2-2H8C6.9,2,6,2.9,6,4v3H5v6l3,6v3h8v-3l3-6V7H18z M8,4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/></g> +<g id="settings-input-svideo"><path d="M8,11.5C8,10.7,7.3,10,6.5,10S5,10.7,5,11.5S5.7,13,6.5,13S8,12.3,8,11.5z M15,6.5C15,5.7,14.3,5,13.5,5h-3C9.7,5,9,5.7,9,6.5S9.7,8,10.5,8h3C14.3,8,15,7.3,15,6.5z M8.5,15C7.7,15,7,15.7,7,16.5S7.7,18,8.5,18s1.5-0.7,1.5-1.5S9.3,15,8.5,15z M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M12,21c-5,0-9-4-9-9s4-9,9-9s9,4,9,9S17,21,12,21z M17.5,10c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S18.3,10,17.5,10z M15.5,15c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S16.3,15,15.5,15z"/></g> +<g id="settings-overscan"><path d="M12,5.5L10,8h4L12,5.5z M18,10v4l2.5-2L18,10z M6,10l-2.5,2L6,14V10z M14,16h-4l2,2.5L14,16z M21,3H3C1.9,3,1,3.9,1,5v14c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M21,19H3V5h18V19z"/></g> +<g id="settings-phone"><path d="M13,9h-2v2h2V9z M17,9h-2v2h2V9z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,9v2h2V9H19z"/></g> +<g id="settings-power"><path d="M7,24h2v-2H7V24z M11,24h2v-2h-2V24z M13,2h-2v10h2V2z M16.6,4.4l-1.4,1.4C16.8,6.9,18,8.8,18,11c0,3.3-2.7,6-6,6c-3.3,0-6-2.7-6-6c0-2.2,1.2-4.1,2.9-5.1L7.4,4.4C5.4,5.9,4,8.3,4,11c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8C20,8.3,18.6,5.9,16.6,4.4z M15,24h2v-2h-2V24z"/></g> +<g id="settings-remote"><path d="M15,9H9c-0.6,0-1,0.4-1,1v12c0,0.6,0.4,1,1,1h6c0.6,0,1-0.4,1-1V10C16,9.4,15.6,9,15,9z M12,15c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,15,12,15z M7.1,6.1l1.4,1.4C9.4,6.6,10.6,6,12,6s2.6,0.6,3.5,1.5l1.4-1.4C15.7,4.8,13.9,4,12,4S8.3,4.8,7.1,6.1z M12,0C9,0,6.2,1.2,4.2,3.2l1.4,1.4C7.3,3,9.5,2,12,2s4.7,1,6.4,2.6l1.4-1.4C17.8,1.2,15,0,12,0z"/></g> +<g id="settings-voice"><path d="M7,24h2v-2H7V24z M12,13c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,11.7,10.3,13,12,13z M11,24h2v-2h-2V24z M15,24h2v-2h-2V24z M19,10h-1.7c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V20h2v-3.3C16.3,16.2,19,13.4,19,10z"/></g> +<g id="shopping-basket"><path d="M17.2,9l-4.4-6.6C12.6,2.2,12.3,2,12,2c-0.3,0-0.6,0.1-0.8,0.4L6.8,9H2c-0.6,0-1,0.4-1,1c0,0.1,0,0.2,0,0.3l2.5,9.3c0.2,0.8,1,1.5,1.9,1.5h13c0.9,0,1.7-0.6,1.9-1.5l2.5-9.3c0-0.1,0-0.2,0-0.3c0-0.6-0.4-1-1-1H17.2z M9,9l3-4.4L15,9H9z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z"/></g> +<g id="shopping-cart"><path d="M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S8.1,18,7,18z M1,2v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4c-0.1,0-0.2-0.1-0.2-0.2c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.6-6.5C21,5.3,21,5.2,21,5c0-0.6-0.4-1-1-1H5.2L4.3,2H1z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S18.1,18,17,18z"/></g> +<g id="sort"><path d="M3,18h6v-2H3V18z M3,6v2h18V6H3z M3,13h12v-2H3V13z"/></g> +<g id="star"><polygon points="12,17.273 18.18,21 16.545,13.971 22,9.244 14.809,8.627 12,2 9.191,8.627 2,9.244 7.455,13.971 5.82,21 "/></g> +<g id="star-half"><path d="M22,9.744l-7.191-0.617L12,2.5L9.191,9.127L2,9.744v0l0,0l5.455,4.727L5.82,21.5L12,17.772l0,0l6.18,3.727l-1.635-7.029L22,9.744z M12,15.896V6.595l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.896z"/></g> +<g id="star-outline"><path d="M22,9.244l-7.191-0.617L12,2L9.191,8.627L2,9.244l5.455,4.727L5.82,21L12,17.272L18.18,21l-1.635-7.029L22,9.244z M12,15.396l-3.763,2.27l0.996-4.281L5.91,10.507l4.38-0.376L12,6.095l1.71,4.036l4.38,0.376l-3.322,2.878l0.996,4.281L12,15.396z"/></g> +<g id="star-rate"><polygon points="12,14.3 15.7,17 14.3,12.6 18,10 13.5,10 12,5.5 10.5,10 6,10 9.7,12.6 8.3,17 "/></g> +<g id="store"><path d="M20,4H4v2h16V4z M21,14v-2l-1-5H4l-1,5v2h1v6h10v-6h4v6h2v-6H21z M12,18H6v-4h6V18z"/></g> +<g id="swap-driving-apps"><circle cx="6.5" cy="15.5" r="1.5"/><circle cx="17.5" cy="15.5" r="1.5"/><path d="M18.9,7c-0.2-0.6-0.8-1-1.4-1H16H6V4L3,7l2,2l1,1V8h11.7l1.3,4H3v9c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,7z M6.5,17C5.7,17,5,16.3,5,15.5S5.7,14,6.5,14C7.3,14,8,14.7,8,15.5S7.3,17,6.5,17z M17.5,17c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,17,17.5,17z M16,0v2H8v2h8v2l3-3L16,0z"/></g> +<g id="swap-driving-apps-wheel"><path d="M14.4,6.1c-0.5-0.2-1.1,0-1.3,0.6L11.7,10c-1,0.1-1.7,1-1.7,2c0,1.1,0.9,2,2,2s2-0.9,2-2c0-0.5-0.2-0.9-0.4-1.2l1.4-3.4C15.1,6.9,14.9,6.3,14.4,6.1z M7,9c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1s1-0.4,1-1C8,9.4,7.6,9,7,9z M11,7c0-0.6-0.4-1-1-1S9,6.4,9,7c0,0.6,0.4,1,1,1S11,7.6,11,7z M17,9c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1s1-0.4,1-1C18,9.4,17.6,9,17,9z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M17.3,18c-1.4-1.2-3.2-2-5.3-2s-3.9,0.8-5.3,2C5.1,16.5,4,14.4,4,12c0-4.4,3.6-8,8-8s8,3.6,8,8C20,14.4,18.9,16.5,17.3,18z"/></g> +<g id="swap-horiz"><path d="M7,11l-4,4l4,4v-3h7v-2H7V11z M21,9l-4-4v3h-7v2h7v3L21,9z"/></g> +<g id="swap-vert"><path d="M16,17v-7h-2v7h-3l4,4l4-4H16z M9,3L5,7h3v7h2V7h3L9,3z"/></g> +<g id="swap-vert-circle"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M6.5,9L10,5.5L13.5,9H11v4H9V9H6.5z M17.5,15L14,18.5L10.5,15H13v-4h2v4H17.5z"/></g> +<g id="system-update-tv"><path d="M12,15l4-4h-3V3h-2v8H8L12,15z M20,3h-5v2h5v12H4V5h5V3H4C2.9,3,2,3.9,2,5v12c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-12C22,3.9,21.1,3,20,3z"/></g> +<g id="tab"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h7v4h7V19z"/></g> +<g id="tab-unselected"><path d="M3,9h2V7H3V9z M3,13h2v-2H3V13z M3,5h2V3C3.9,3,3,3.9,3,5z M7,21h2v-2l-2,0V21z M3,17h2v-2H3V17z M5,21v-2H3C3,20.1,3.9,21,5,21z M19,3h-8v6h10V5C21,3.9,20.1,3,19,3z M19,17h2v-2h-2V17z M7,5h2V3H7V5z M19,21c1.1,0,2-0.9,2-2h-2V21z M19,13h2v-2h-2V13z M11,21h2v-2l-2,0V21z M15,21h2v-2l-2,0V21z"/></g> +<g id="text-format"><path d="M5,17v2h14v-2H5z M9.5,12.8h5l0.9,2.2h2.1L12.8,4h-1.5L6.5,15h2.1L9.5,12.8z M12,6l1.9,5h-3.7L12,6z"/></g> +<g id="theaters"><path d="M18,3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3H18z M8,17H6v-2h2V17z M8,13H6v-2h2V13z M8,9H6V7h2V9z M18,17h-2v-2h2V17z M18,13h-2v-2h2V13z M18,9h-2V7h2V9z"/></g> +<g id="three-d-rotation"><path d="M11,14v-1c0-0.6-0.4-1-1-1c0.6,0,1-0.4,1-1v-1c0-1.1-0.9-2-2-2H6v2h3v1H7v2h2v1l0,0l0,0v0h0H6v2h3C10.1,16,11,15.1,11,14z M15,8h-3v8h3c1.7,0,3-1.3,3-3v-2C18,9.3,16.7,8,15,8z M16,13c0,0.6-0.4,1-1,1h-1v-4h1c0.6,0,1,0.4,1,1V13z M12,0c-0.2,0-0.4,0-0.7,0l3.8,3.8l1.3-1.3c3.3,1.5,5.6,4.7,6,8.5h1.5C23.4,4.8,18.3,0,12,0z M7.5,21.5c-3.3-1.5-5.6-4.7-6-8.5H0.1C0.6,19.2,5.7,24,12,24c0.2,0,0.4,0,0.7,0l-3.8-3.8L7.5,21.5z"/></g> +<g id="thumb-down"><path d="M15,3H6C5.2,3,4.5,3.5,4.2,4.2l-3,7.1C1.1,11.5,1,11.7,1,12v1.9l0,0c0,0,0,0.1,0,0.1c0,1.1,0.9,2,2,2h6.3l-1,4.6c0,0.1,0,0.2,0,0.3c0,0.4,0.2,0.8,0.4,1.1L9.8,23l6.6-6.6c0.4-0.4,0.6-0.9,0.6-1.4V5C17,3.9,16.1,3,15,3z M19,3v12h4V3H19z"/></g> +<g id="thumb-up"><path d="M1,21h4V9H1V21z M23,10c0-1.1-0.9-2-2-2h-6.3l1-4.6c0-0.1,0-0.2,0-0.3c0-0.4-0.2-0.8-0.4-1.1L14.2,1L7.6,7.6C7.2,7.9,7,8.4,7,9v10c0,1.1,0.9,2,2,2h9c0.8,0,1.5-0.5,1.8-1.2l3-7.1c0.1-0.2,0.1-0.5,0.1-0.7V10L23,10C23,10.1,23,10,23,10z"/></g> +<g id="today"><path d="M19,3h-1V1h-2v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V8h14V19z"/><rect x="7" y="10" width="5" height="5"/></g> +<g id="translate"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z M12,19l-2,2h13v-2H12z"/></g> +<g id="trending-down"><polygon points="16,18 18.3,15.7 13.4,10.8 9.4,14.8 2,7.4 3.4,6 9.4,12 13.4,8 19.7,14.3 22,12 22,18 "/></g> +<g id="trending-neutral"><polygon points="22,12 18,8 18,11 3,11 3,13 18,13 18,16 "/></g> +<g id="trending-up"><polygon points="16,6 18.3,8.3 13.4,13.2 9.4,9.2 2,16.6 3.4,18 9.4,12 13.4,16 19.7,9.7 22,12 22,6 "/></g> +<g id="undo"><path d="M12,5V1.5l-5,5l5,5V7c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6H4c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8S16.4,5,12,5z"/></g> +<g id="unfold-less"><path d="M7.4,18.6L8.8,20l3.2-3.2l3.2,3.2l1.4-1.4L12,14L7.4,18.6z M16.6,5.4L15.2,4L12,7.2L8.8,4L7.4,5.4L12,10L16.6,5.4z"/></g> +<g id="unfold-more"><path d="M12,5.8L15.2,9l1.4-1.4L12,3L7.4,7.6L8.8,9L12,5.8z M12,18.2L8.8,15l-1.4,1.4L12,21l4.6-4.6L15.2,15L12,18.2z"/></g> +<g id="view-array"><path d="M4,18h3V5H4V18z M18,5v13h3V5H18z M8,18h9V5H8V18z"/></g> +<g id="view-column"><path d="M10,18h5V5h-5V18z M4,18h5V5H4V18z M16,5v13h5V5H16z"/></g> +<g id="view-headline"><path d="M4,15h17v-2H4V15z M4,19h17v-2H4V19z M4,11h17V9H4V11z M4,5v2h17V5H4z"/></g> +<g id="view-list"><path d="M4,14h4v-4H4V14z M4,19h4v-4H4V19z M4,9h4V5H4V9z M9,14h12v-4H9V14z M9,19h12v-4H9V19z M9,5v4h12V5H9z"/></g> +<g id="view-module"><path d="M4,11h5V5H4V11z M4,18h5v-6H4V18z M10,18h5v-6h-5V18z M16,18h5v-6h-5V18z M10,11h5V5h-5V11z M16,5v6h5V5H16z"/></g> +<g id="view-quilt"><path d="M10,18h5v-6h-5V18z M4,18h5V5H4V18z M16,18h5v-6h-5V18z M10,5v6h11V5H10z"/></g> +<g id="view-stream"><path d="M4,18h17v-6H4V18z M4,5v6h17V5H4z"/></g> +<g id="visibility"><path d="M12,4.5C7,4.5,2.7,7.6,1,12c1.7,4.4,6,7.5,11,7.5c5,0,9.3-3.1,11-7.5C21.3,7.6,17,4.5,12,4.5z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5c2.8,0,5,2.2,5,5S14.8,17,12,17z M12,9c-1.7,0-3,1.3-3,3s1.3,3,3,3c1.7,0,3-1.3,3-3S13.7,9,12,9z"/></g> +<g id="visibility-off"><path d="M12,7c2.8,0,5,2.2,5,5c0,0.6-0.1,1.3-0.4,1.8l2.9,2.9c1.5-1.3,2.7-2.9,3.4-4.7c-1.7-4.4-6-7.5-11-7.5c-1.4,0-2.7,0.3-4,0.7l2.2,2.2C10.7,7.1,11.4,7,12,7z M2,4.3l2.3,2.3L4.7,7c-1.7,1.3-3,3-3.7,5c1.7,4.4,6,7.5,11,7.5c1.5,0,3-0.3,4.4-0.8l0.4,0.4l2.9,2.9l1.3-1.3L3.3,3L2,4.3z M7.5,9.8l1.5,1.5C9,11.6,9,11.8,9,12c0,1.7,1.3,3,3,3c0.2,0,0.4,0,0.7-0.1l1.5,1.5C13.5,16.8,12.8,17,12,17c-2.8,0-5-2.2-5-5C7,11.2,7.2,10.5,7.5,9.8z M11.8,9l3.1,3.1c0-0.1,0-0.1,0-0.2c0-1.7-1.3-3-3-3C11.9,9,11.9,9,11.8,9z"/></g> +<g id="warning"><path d="M1,21h22L12,2L1,21z M13,18h-2v-2h2V18z M13,14h-2v-4h2V14z"/></g> +<g id="work"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M14,6h-4V4h4V6z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/demo.html b/third_party/polymer/components-chromium/core-icons/demo.html new file mode 100644 index 0000000..ea91b45 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/demo.html @@ -0,0 +1,96 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<html> +<head> + + <title>core-icons</title> + <script src="../platform/platform.js"></script> + <!-- load default set --> + <link rel="import" href="core-icons.html"> + <!-- load the rest --> + <link rel="import" href="av-icons.html"> + <link rel="import" href="communication-icons.html"> + <link rel="import" href="device-icons.html"> + <link rel="import" href="editor-icons.html"> + <link rel="import" href="hardware-icons.html"> + <link rel="import" href="image-icons.html"> + <link rel="import" href="maps-icons.html"> + <link rel="import" href="notification-icons.html"> + <link rel="import" href="social-icons.html"> + <style> + body { + font-family: 'Helvetica Neue', Helvetica, Arial; + } + + h2 { + text-transform: capitalize; + } + + core-icon { + transition: all 0.2s; + -webkit-transition: all 0.2s; + } + + core-icon:hover { + fill: #fb8c00; + } + + .set { + padding: 1em 0; + border-bottom: 1px solid silver; + } + + .set:nth-of-type(4n-3) { + color: #656565; + } + + .set:nth-of-type(4n-2) { + color: #FDD835; + } + + .set:nth-of-type(4n-1) { + color: #0D904F; + } + + .set:nth-of-type(4n) { + color: #3B78E7; + } + + .container { + min-width: 10em; + padding: 1em; + } + + .container > div { + color: black; + } + </style> +</head> +<body unresolved> + + <template is="auto-binding"> + <template repeat="{{iconset in $.meta.metaArray}}"> + <h2>{{iconset.id}}</h2> + <h5>{{iconset.id === 'icons' ? 'The Default Set' : 'Import ' + iconset.id + '-icons.html'}}</h5> + <div class="set" horizontal wrap justified layout> + <template repeat="{{ icon in iconset.iconNames }}"> + <span class="container" vertical center layout> + <core-icon icon="{{ iconset.id }}:{{ icon }}"></core-icon> + <div>{{ icon }}</div> + </span> + </template> + </div> + </template> + <core-iconset id="meta"></core-iconset> + </template> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icons/device-icons.html b/third_party/polymer/components-chromium/core-icons/device-icons.html new file mode 100644 index 0000000..ecce1d4 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/device-icons.html @@ -0,0 +1,58 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="device" iconSize="24"> +<svg><defs> +<g id="access-alarms"><path d="M22,5.7l-4.6-3.9l-1.3,1.5l4.6,3.9L22,5.7z M7.9,3.4L6.6,1.9L2,5.7l1.3,1.5L7.9,3.4z M12.5,8H11v6l4.7,2.9l0.8-1.2l-4-2.4V8z M12,4c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,8,17,4,12,4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z"/></g> +<g id="access-time"><path fill-opacity="0.9" d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><polygon fill-opacity="0.9" points="12.5,7 11,7 11,13 16.2,16.2 17,14.9 12.5,12.2 "/></g> +<g id="add-alarm"><path d="M7.9,3.4L6.6,1.9L2,5.7l1.3,1.5L7.9,3.4z M22,5.7l-4.6-3.9l-1.3,1.5l4.6,3.9L22,5.7z M12,4c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,8,17,4,12,4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z M13,9h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g> +<g id="airplanemode-off"><path d="M13,9V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v3.7l7.8,7.8l3.2,1v-2L13,9z M3,5.3l5,5L2,14v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-3.7l5.7,5.7l1.3-1.3L4.3,4L3,5.3z"/></g> +<g id="airplanemode-on"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> +<g id="bluetooth"><path d="M17.7,7.7L12,2h-1v7.6L6.4,5L5,6.4l5.6,5.6L5,17.6L6.4,19l4.6-4.6V22h1l5.7-5.7L13.4,12L17.7,7.7z M13,5.8l1.9,1.9L13,9.6V5.8z M14.9,16.3L13,18.2v-3.8L14.9,16.3z"/></g> +<g id="bluetooth-connected"><path d="M7,12l-2-2l-2,2l2,2L7,12z M17.7,7.7L12,2h-1v7.6L6.4,5L5,6.4l5.6,5.6L5,17.6L6.4,19l4.6-4.6V22h1l5.7-5.7L13.4,12L17.7,7.7z M13,5.8l1.9,1.9L13,9.6V5.8z M14.9,16.3L13,18.2v-3.8L14.9,16.3z M19,10l-2,2l2,2l2-2L19,10z"/></g> +<g id="bluetooth-disabled"><path d="M13,5.8l1.9,1.9l-1.6,1.6l1.4,1.4l3-3L12,2h-1v5l2,2V5.8z M5.4,4L4,5.4l6.6,6.6L5,17.6L6.4,19l4.6-4.6V22h1l4.3-4.3l2.3,2.3l1.4-1.4L5.4,4z M13,18.2v-3.8l1.9,1.9L13,18.2z"/></g> +<g id="bluetooth-searching"><path d="M14.2,12l2.3,2.3c0.3-0.7,0.4-1.5,0.4-2.3c0-0.8-0.2-1.6-0.4-2.3L14.2,12z M19.5,6.7L18.3,8c0.6,1.2,1,2.6,1,4s-0.4,2.8-1,4l1.2,1.2c1-1.5,1.5-3.4,1.5-5.3C21,10,20.5,8.2,19.5,6.7z M15.7,7.7L10,2H9v7.6L4.4,5L3,6.4L8.6,12L3,17.6L4.4,19L9,14.4V22h1l5.7-5.7L11.4,12L15.7,7.7z M11,5.8l1.9,1.9L11,9.6V5.8z M12.9,16.3L11,18.2v-3.8L12.9,16.3z"/></g> +<g id="brightness-auto"><path d="M10.9,12.6h2.3L12,9L10.9,12.6z M20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20v-4.7l3.3-3.3L20,8.7z M14.3,16l-0.7-2h-3.2l-0.7,2H7.8L11,7h2l3.2,9H14.3z"/></g> +<g id="brightness-high"><path d="M20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20v-4.7l3.3-3.3L20,8.7z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z"/></g> +<g id="brightness-low"><path d="M20,15.3l3.3-3.3L20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20V15.3z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/></g> +<g id="brightness-medium"><path d="M20,15.3l3.3-3.3L20,8.7V4h-4.7L12,0.7L8.7,4H4v4.7L0.7,12L4,15.3V20h4.7l3.3,3.3l3.3-3.3H20V15.3z M12,18V6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/></g> +<g id="data-usage"><path d="M13,2.1v3c3.4,0.5,6,3.4,6,6.9c0,0.9-0.2,1.7-0.5,2.5l2.6,1.5c0.6-1.2,0.9-2.6,0.9-4.1C22,6.8,18.1,2.6,13,2.1z M12,19c-3.9,0-7-3.1-7-7c0-3.5,2.6-6.4,6-6.9v-3C5.9,2.5,2,6.8,2,12c0,5.5,4.5,10,10,10c3.3,0,6.2-1.6,8.1-4.1l-2.6-1.5C16.2,18,14.2,19,12,19z"/></g> +<g id="developer-mode"><path d="M7,5h10v2h2V3c0-1.1-0.9-2-2-2L7,1C5.9,1,5,1.9,5,3v4h2V5z M15.4,16.6L20,12l-4.6-4.6L14,8.8l3.2,3.2L14,15.2L15.4,16.6z M10,15.2L6.8,12L10,8.8L8.6,7.4L4,12l4.6,4.6L10,15.2z M17,19H7v-2H5v4c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2v-4h-2V19z"/></g> +<g id="event-note"><path d="M17,10H7v2h10V10z M13,14H7v2h6V14z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> +<g id="gps-fixed"><path d="M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> +<g id="gps-not-fixed"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> +<g id="gps-off"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C9.9,3.2,8.8,3.5,7.8,4l1.5,1.5C10.2,5.2,11.1,5,12,5c3.9,0,7,3.1,7,7c0,0.9-0.2,1.8-0.5,2.7l1.5,1.5c0.5-1,0.8-2,1-3.2H23v-2H20.9z M3,4.3l2,2C4,7.6,3.3,9.2,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c1.8-0.2,3.4-0.9,4.7-2l2,2l1.3-1.3L4.3,3L3,4.3z M16.3,17.5C15.1,18.5,13.6,19,12,19c-3.9,0-7-3.1-7-7c0-1.6,0.5-3.1,1.5-4.3L16.3,17.5z"/></g> +<g id="location-disabled"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C9.9,3.2,8.8,3.5,7.8,4l1.5,1.5C10.2,5.2,11.1,5,12,5c3.9,0,7,3.1,7,7c0,0.9-0.2,1.8-0.5,2.7l1.5,1.5c0.5-1,0.8-2,1-3.2H23v-2H20.9z M3,4.3l2,2C4,7.6,3.3,9.2,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c1.8-0.2,3.4-0.9,4.7-2l2,2l1.3-1.3L4.3,3L3,4.3z M16.3,17.5C15.1,18.5,13.6,19,12,19c-3.9,0-7-3.1-7-7c0-1.6,0.5-3.1,1.5-4.3L16.3,17.5z"/></g> +<g id="location-searching"><path d="M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> +<g id="network-cell"><path d="M2,22h20V2L2,22z M20,20h-3.3v-9.8L20,6.8V20z"/></g> +<g id="network-wifi"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,7.3C9.4,7.3,7,8,4.9,9.2l-2-2.7C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-2,2.7C17,8,14.6,7.3,12,7.3z"/></g> +<g id="nfc"><path d="M20,2H4C2.9,2,2,2.9,2,4v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M20,20H4V4h16V20z M18,6h-5c-1.1,0-2,0.9-2,2v2.3c-0.6,0.3-1,1-1,1.7c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2c0-0.7-0.4-1.4-1-1.7V8h3v8H8V8h2V6H8H6v12h12V6z"/></g> +<g id="now-wallpaper"><path d="M4,4h7V2H4C2.9,2,2,2.9,2,4v7h2V4z M10,13l-4,5h12l-3-4l-2,2.7L10,13z M17,8.5C17,7.7,16.3,7,15.5,7S14,7.7,14,8.5s0.7,1.5,1.5,1.5S17,9.3,17,8.5z M20,2h-7v2h7v7h2V4C22,2.9,21.1,2,20,2z M20,20h-7v2h7c1.1,0,2-0.9,2-2v-7h-2V20z M4,13H2v7c0,1.1,0.9,2,2,2h7v-2H4V13z"/></g> +<g id="now-widgets"><path d="M13,13v8h8v-8h-4.3H13z M3,21h8v-8H3V21z M3,3v8h8V7.3V3H3z M16.7,1.7L11,7.3l5.7,5.7l5.7-5.7L16.7,1.7z"/></g> +<g id="screen-lock-landscape"><path d="M21,5H3C1.9,5,1,5.9,1,7v10c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2V7C23,5.9,22.1,5,21,5z M19,17H5V7h14V17z M10,16h4c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1v-1c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2v1c-0.6,0-1,0.4-1,1v3C9,15.6,9.4,16,10,16z M10.8,10c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2v1h-2.4V10z"/></g> +<g id="screen-lock-portrait"><path d="M10,16h4c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1v-1c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2v1c-0.6,0-1,0.4-1,1v3C9,15.6,9.4,16,10,16z M10.8,10c0-0.7,0.5-1.2,1.2-1.2c0.7,0,1.2,0.5,1.2,1.2v1h-2.4V10z M17,1H7C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> +<g id="screen-lock-rotation"><path d="M23.3,12.8l-2.6-2.6l-1.4,1.4l2.2,2.2l-5.7,5.7L4.5,8.2l5.7-5.7l2.1,2.1l1.4-1.4l-2.4-2.4c-0.6-0.6-1.5-0.6-2.1,0L2.7,7.1c-0.6,0.6-0.6,1.5,0,2.1l12,12c0.6,0.6,1.5,0.6,2.1,0l6.4-6.4C23.8,14.3,23.8,13.4,23.3,12.8z M8.5,20.5c-3.3-1.5-5.6-4.7-6-8.5H1c0.5,6.2,5.7,11,11.9,11c0.2,0,0.4,0,0.7,0l-3.8-3.8L8.5,20.5z M16,9h5c0.6,0,1-0.4,1-1V4c0-0.6-0.4-1-1-1V2.5C21,1.1,19.9,0,18.5,0C17.1,0,16,1.1,16,2.5V3c-0.6,0-1,0.4-1,1v4C15,8.6,15.4,9,16,9z M16.8,2.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V3h-3.4V2.5z"/></g> +<g id="screen-rotation"><path d="M16.5,2.5c3.3,1.5,5.6,4.7,6,8.5h1.5C23.4,4.8,18.3,0,12,0c-0.2,0-0.4,0-0.7,0l3.8,3.8L16.5,2.5z M10.2,1.7c-0.6-0.6-1.5-0.6-2.1,0L1.7,8.1c-0.6,0.6-0.6,1.5,0,2.1l12,12c0.6,0.6,1.5,0.6,2.1,0l6.4-6.4c0.6-0.6,0.6-1.5,0-2.1L10.2,1.7z M14.8,21.2l-12-12l6.4-6.4l12,12L14.8,21.2z M7.5,21.5c-3.3-1.5-5.6-4.7-6-8.5H0.1C0.6,19.2,5.7,24,12,24c0.2,0,0.4,0,0.7,0l-3.8-3.8L7.5,21.5z"/></g> +<g id="sd-storage"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M12,8h-2V4h2V8z M15,8h-2V4h2V8z M18,8h-2V4h2V8z"/></g> +<g id="signal-cellular-1-bar"><path d="M2,22h20V2L2,22z M20,20h-8.7v-4.5L20,6.8V20z"/></g> +<g id="signal-cellular-2-bar"><path d="M2,22h20V2L2,22z M20,20h-6v-7.2l6-6V20z"/></g> +<g id="signal-cellular-3-bar"><path d="M2,22h20V2L2,22z M20,20h-3.3v-9.8L20,6.8V20z"/></g> +<g id="signal-cellular-4-bar"><polygon points="2,22 22,22 22,2 "/></g> +<g id="signal-wifi-1-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,13.3c-1.2,0-2.4,0.3-3.5,0.7L2.9,6.5C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-5.7,7.6C14.4,13.6,13.2,13.3,12,13.3z"/></g> +<g id="signal-wifi-2-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,10c-2,0-3.8,0.5-5.5,1.3L2.9,6.5C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-3.6,4.9C15.8,10.5,14,10,12,10z"/></g> +<g id="signal-wifi-3-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z M12,7.3C9.4,7.3,7,8,4.9,9.2l-2-2.7C5.6,4.9,8.7,4,12,4c3.3,0,6.4,0.9,9.1,2.5l-2,2.7C17,8,14.6,7.3,12,7.3z"/></g> +<g id="signal-wifi-4-bar"><path d="M12,2C7.5,2,3.3,3.5,0,6l12,16L24,6C20.7,3.5,16.5,2,12,2z"/></g> +<g id="storage"><path d="M2,19h20v-4H2V19z M4,16h2v2H4V16z M2,5v4h20V5H2z M6,8H4V6h2V8z M2,14h20v-4H2V14z M4,11h2v2H4V11z"/></g> +<g id="timer"><path d="M15,1H9v2h6V1z M11,14h2V8h-2V14z M19,7.4L20.5,6C20,5.5,19.5,5,19,4.6L17.6,6c-1.5-1.2-3.5-2-5.6-2c-5,0-9,4-9,9c0,5,4,9,9,9s9-4,9-9C21,10.9,20.3,8.9,19,7.4z M12,20c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7C19,16.9,15.9,20,12,20z"/></g> +<g id="usb"><path d="M15,7v4h1v2h-3V5h2l-3-4L9,5h2v8H8v-2.1C8.7,10.6,9.2,9.8,9.2,9c0-1.2-1-2.2-2.2-2.2c-1.2,0-2.2,1-2.2,2.2c0,0.8,0.5,1.6,1.2,1.9V13c0,1.1,0.9,2,2,2h3v3.1c-0.7,0.4-1.2,1.1-1.2,1.9c0,1.2,1,2.2,2.2,2.2c1.2,0,2.2-1,2.2-2.2c0-0.9-0.5-1.6-1.2-1.9V15h3c1.1,0,2-0.9,2-2v-2h1V7H15z"/></g> +<g id="wifi-tethering"><path d="M12,11c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C14,11.9,13.1,11,12,11z M18,13c0-3.3-2.7-6-6-6c-3.3,0-6,2.7-6,6c0,2.2,1.2,4.1,3,5.2l1-1.7c-1.2-0.7-2-2-2-3.4c0-2.2,1.8-4,4-4s4,1.8,4,4c0,1.5-0.8,2.8-2,3.4l1,1.7C16.8,17.1,18,15.2,18,13z M12,3C6.5,3,2,7.5,2,13c0,3.7,2,6.9,5,8.6l1-1.7c-2.4-1.4-4-4-4-6.9c0-4.4,3.6-8,8-8s8,3.6,8,8c0,3-1.6,5.5-4,6.9l1,1.7c3-1.7,5-5,5-8.6C22,7.5,17.5,3,12,3z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/editor-icons.html b/third_party/polymer/components-chromium/core-icons/editor-icons.html new file mode 100644 index 0000000..d59c108 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/editor-icons.html @@ -0,0 +1,67 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="editor" iconSize="24"> +<svg><defs> +<g id="attach-drive"><path d="M22.3,14L15.4,2H8.6l0,0l6.9,12H22.3z M9.7,15l-3.4,6h13.1l3.4-6H9.7z M7.7,3.5L1.2,15l3.4,6l6.6-11.5L7.7,3.5z"/></g> +<g id="attach-file"><path d="M16.5,6v11.5c0,2.2-1.8,4-4,4s-4-1.8-4-4V5c0-1.4,1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5v10.5c0,0.6-0.4,1-1,1s-1-0.4-1-1V6H10v9.5c0,1.4,1.1,2.5,2.5,2.5s2.5-1.1,2.5-2.5V5c0-2.2-1.8-4-4-4S7,2.8,7,5v12.5c0,3,2.5,5.5,5.5,5.5s5.5-2.5,5.5-5.5V6H16.5z"/></g> +<g id="attach-money"><path d="M11.8,10.9c-2.3-0.6-3-1.2-3-2.1c0-1.1,1-1.9,2.7-1.9c1.8,0,2.4,0.8,2.5,2.1h2.2c-0.1-1.7-1.1-3.3-3.2-3.8V3h-3v2.2C8.1,5.6,6.5,6.8,6.5,8.8c0,2.3,1.9,3.5,4.7,4.1c2.5,0.6,3,1.5,3,2.4c0,0.7-0.5,1.8-2.7,1.8c-2.1,0-2.9-0.9-3-2.1H6.3c0.1,2.2,1.8,3.4,3.7,3.8V21h3v-2.2c1.9-0.4,3.5-1.5,3.5-3.6C16.5,12.5,14.1,11.5,11.8,10.9z"/></g> +<g id="border-all"><path d="M3,3v18h18V3H3z M11,19H5v-6h6V19z M11,11H5V5h6V11z M19,19h-6v-6h6V19z M19,11h-6V5h6V11z"/></g> +<g id="border-bottom"><path d="M9,11H7v2h2V11z M13,15h-2v2h2V15z M9,3H7v2h2V3z M13,11h-2v2h2V11z M5,3H3v2h2V3z M13,7h-2v2h2V7z M17,11h-2v2h2V11z M13,3h-2v2h2V3z M17,3h-2v2h2V3z M19,13h2v-2h-2V13z M19,17h2v-2h-2V17z M5,7H3v2h2V7z M19,3v2h2V3H19z M19,9h2V7h-2V9z M5,11H3v2h2V11z M3,21h18v-2H3V21z M5,15H3v2h2V15z"/></g> +<g id="border-clear"><path d="M7,5h2V3H7V5z M7,13h2v-2H7V13z M7,21h2v-2H7V21z M11,17h2v-2h-2V17z M11,21h2v-2h-2V21z M3,21h2v-2H3V21z M3,17h2v-2H3V17z M3,13h2v-2H3V13z M3,9h2V7H3V9z M3,5h2V3H3V5z M11,13h2v-2h-2V13z M19,17h2v-2h-2V17z M19,13h2v-2h-2V13z M19,21h2v-2h-2V21z M19,9h2V7h-2V9z M11,9h2V7h-2V9z M19,3v2h2V3H19z M11,5h2V3h-2V5z M15,21h2v-2h-2V21z M15,13h2v-2h-2V13z M15,5h2V3h-2V5z"/></g> +<g id="border-color"><path d="M17.8,7L14,3.2l-10,10V17h3.8L17.8,7z M20.7,4c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-2,2L18.8,6L20.7,4z"/></g> +<g id="border-horizontal"><path d="M3,21h2v-2H3V21z M5,7H3v2h2V7z M3,17h2v-2H3V17z M7,21h2v-2H7V21z M5,3H3v2h2V3z M9,3H7v2h2V3z M17,3h-2v2h2V3z M13,7h-2v2h2V7z M13,3h-2v2h2V3z M19,17h2v-2h-2V17z M11,21h2v-2h-2V21z M3,13h18v-2H3V13z M19,3v2h2V3H19z M19,9h2V7h-2V9z M11,17h2v-2h-2V17z M15,21h2v-2h-2V21z M19,21h2v-2h-2V21z"/></g> +<g id="border-inner"><path d="M3,21h2v-2H3V21z M7,21h2v-2H7V21z M5,7H3v2h2V7z M3,17h2v-2H3V17z M9,3H7v2h2V3z M5,3H3v2h2V3z M17,3h-2v2h2V3z M19,9h2V7h-2V9z M19,3v2h2V3H19z M15,21h2v-2h-2V21z M13,3h-2v8H3v2h8v8h2v-8h8v-2h-8V3z M19,21h2v-2h-2V21z M19,17h2v-2h-2V17z"/></g> +<g id="border-left"><path d="M11,21h2v-2h-2V21z M11,17h2v-2h-2V17z M11,5h2V3h-2V5z M11,9h2V7h-2V9z M11,13h2v-2h-2V13z M7,21h2v-2H7V21z M7,5h2V3H7V5z M7,13h2v-2H7V13z M3,21h2V3H3V21z M19,9h2V7h-2V9z M15,21h2v-2h-2V21z M19,17h2v-2h-2V17z M19,3v2h2V3H19z M19,13h2v-2h-2V13z M19,21h2v-2h-2V21z M15,13h2v-2h-2V13z M15,5h2V3h-2V5z"/></g> +<g id="border-outer"><path d="M13,7h-2v2h2V7z M13,11h-2v2h2V11z M17,11h-2v2h2V11z M3,3v18h18V3H3z M19,19H5V5h14V19z M13,15h-2v2h2V15z M9,11H7v2h2V11z"/></g> +<g id="border-right"><path d="M7,21h2v-2H7V21z M3,5h2V3H3V5z M7,5h2V3H7V5z M7,13h2v-2H7V13z M3,21h2v-2H3V21z M11,21h2v-2h-2V21z M3,13h2v-2H3V13z M3,17h2v-2H3V17z M3,9h2V7H3V9z M11,17h2v-2h-2V17z M15,13h2v-2h-2V13z M19,3v18h2V3H19z M15,21h2v-2h-2V21z M15,5h2V3h-2V5z M11,13h2v-2h-2V13z M11,5h2V3h-2V5z M11,9h2V7h-2V9z"/></g> +<g id="border-style"><path d="M15,21h2v-2h-2V21z M19,21h2v-2h-2V21z M7,21h2v-2H7V21z M11,21h2v-2h-2V21z M19,17h2v-2h-2V17z M19,13h2v-2h-2V13z M3,3v18h2V5h16V3H3z M19,9h2V7h-2V9z"/></g> +<g id="border-top"><path d="M7,21h2v-2H7V21z M7,13h2v-2H7V13z M11,13h2v-2h-2V13z M11,21h2v-2h-2V21z M3,17h2v-2H3V17z M3,21h2v-2H3V21z M3,13h2v-2H3V13z M3,9h2V7H3V9z M11,17h2v-2h-2V17z M19,9h2V7h-2V9z M19,13h2v-2h-2V13z M3,3v2h18V3H3z M19,17h2v-2h-2V17z M15,21h2v-2h-2V21z M11,9h2V7h-2V9z M19,21h2v-2h-2V21z M15,13h2v-2h-2V13z"/></g> +<g id="border-vertical"><path d="M3,9h2V7H3V9z M3,5h2V3H3V5z M7,21h2v-2H7V21z M7,13h2v-2H7V13z M3,13h2v-2H3V13z M3,21h2v-2H3V21z M3,17h2v-2H3V17z M7,5h2V3H7V5z M19,17h2v-2h-2V17z M11,21h2V3h-2V21z M19,21h2v-2h-2V21z M19,13h2v-2h-2V13z M19,3v2h2V3H19z M19,9h2V7h-2V9z M15,5h2V3h-2V5z M15,21h2v-2h-2V21z M15,13h2v-2h-2V13z"/></g> +<g id="format-align-center"><path d="M7,15v2h10v-2H7z M3,21h18v-2H3V21z M3,13h18v-2H3V13z M7,7v2h10V7H7z M3,3v2h18V3H3z"/></g> +<g id="format-align-justify"><path d="M3,21h18v-2H3V21z M3,17h18v-2H3V17z M3,13h18v-2H3V13z M3,9h18V7H3V9z M3,3v2h18V3H3z"/></g> +<g id="format-align-left"><path d="M15,15H3v2h12V15z M15,7H3v2h12V7z M3,13h18v-2H3V13z M3,21h18v-2H3V21z M3,3v2h18V3H3z"/></g> +<g id="format-align-right"><path d="M3,21h18v-2H3V21z M9,17h12v-2H9V17z M3,13h18v-2H3V13z M9,9h12V7H9V9z M3,3v2h18V3H3z"/></g> +<g id="format-bold"><path d="M15.6,10.8c1-0.7,1.7-1.8,1.7-2.8c0-2.3-1.7-4-4-4H7v14h7c2.1,0,3.7-1.7,3.7-3.8C17.8,12.7,16.9,11.4,15.6,10.8z M10,6.5h3c0.8,0,1.5,0.7,1.5,1.5S13.8,9.5,13,9.5h-3V6.5z M13.5,15.5H10v-3h3.5c0.8,0,1.5,0.7,1.5,1.5S14.3,15.5,13.5,15.5z"/></g> +<g id="format-clear"><path d="M3.3,5L2,6.3l7,7L6.5,19h3l1.6-3.7l5.7,5.7l1.3-1.3L3.5,5.3L3.3,5z M6,5v0.2L8.8,8h2.4l-0.7,1.7l2.1,2.1L14.2,8H20V5H6z"/></g> +<g id="format-color-fill"><path d="M16.6,8.9L7.6,0L6.2,1.4l2.4,2.4L3.4,8.9c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5C9.2,16.9,9.6,17,10,17s0.8-0.1,1.1-0.4l5.5-5.5C17.1,10.5,17.1,9.5,16.6,8.9z M5.2,10L10,5.2l4.8,4.8H5.2z M19,11.5c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2C21,13.7,19,11.5,19,11.5z"/></g> +<g id="format-color-reset"><path d="M18,14c0-4-6-10.8-6-10.8s-1.3,1.5-2.7,3.5l8.6,8.6C17.9,14.9,18,14.4,18,14z M17.1,17.1l-4.6-4.6L5.3,5.3L4,6.5l3.3,3.3C6.6,11.3,6,12.8,6,14c0,3.3,2.7,6,6,6c1.5,0,2.9-0.6,4-1.5l2.6,2.6l1.3-1.3L17.1,17.1z"/></g> +<g id="format-color-text"><path d="M11,3L5.5,17h2.2l1.1-3h6.2l1.1,3h2.2L13,3H11z M9.6,12L12,5.7l2.4,6.3H9.6z"/></g> +<g id="format-indent-decrease"><path d="M11,17h10v-2H11V17z M3,12l4,4V8L3,12z M3,21h18v-2H3V21z M3,3v2h18V3H3z M11,9h10V7H11V9z M11,13h10v-2H11V13z"/></g> +<g id="format-indent-increase"><path d="M3,21h18v-2H3V21z M3,8v8l4-4L3,8z M11,17h10v-2H11V17z M3,3v2h18V3H3z M11,9h10V7H11V9z M11,13h10v-2H11V13z"/></g> +<g id="format-italic"><polygon points="10,4 10,7 12.2,7 8.8,15 6,15 6,18 14,18 14,15 11.8,15 15.2,7 18,7 18,4 "/></g> +<g id="format-line-spacing"><path d="M6,7h2.5L5,3.5L1.5,7H4v10H1.5L5,20.5L8.5,17H6V7z M10,5v2h12V5H10z M10,19h12v-2H10V19z M10,13h12v-2H10V13z"/></g> +<g id="format-list-bulleted"><path d="M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,4.5C3.2,4.5,2.5,5.2,2.5,6S3.2,7.5,4,7.5S5.5,6.8,5.5,6S4.8,4.5,4,4.5z M4,16.7c-0.7,0-1.3,0.6-1.3,1.3s0.6,1.3,1.3,1.3s1.3-0.6,1.3-1.3S4.7,16.7,4,16.7z M7,19h14v-2H7V19z M7,13h14v-2H7V13z M7,5v2h14V5H7z"/></g> +<g id="format-list-numbered"><path d="M2,17h2v0.5H3v1h1V19H2v1h3v-4H2V17z M3,8h1V4H2v1h1V8z M2,11h1.8L2,13.1V14h3v-1H3.2L5,10.9V10H2V11z M7,5v2h14V5H7z M7,19h14v-2H7V19z M7,13h14v-2H7V13z"/></g> +<g id="format-paint"><path d="M18,4V3c0-0.6-0.4-1-1-1H5C4.4,2,4,2.4,4,3v4c0,0.6,0.4,1,1,1h12c0.6,0,1-0.4,1-1V6h1v4H9v11c0,0.6,0.4,1,1,1h2c0.6,0,1-0.4,1-1v-9h8V4H18z"/></g> +<g id="format-quote"><polygon points="6,17 9,17 11,13 11,7 5,7 5,13 8,13 "/><polygon points="14,17 17,17 19,13 19,7 13,7 13,13 16,13 "/></g> +<g id="format-size"><path d="M9,4v3h5v12h3V7h5V4H9z M3,12h3v7h3v-7h3V9H3V12z"/></g> +<g id="format-strikethrough"><path d="M10,19h4v-3h-4V19z M5,4v3h5v3h4V7h5V4H5z M3,14h18v-2H3V14z"/></g> +<g id="format-textdirection-l-to-r"><polygon points="18,4 6,4 6,6 12.5,12 6,18 6,20 18,20 18,17 11,17 16,12 11,7 18,7 "/></g> +<g id="format-textdirection-r-to-l"><path d="M9,10L9,10l0,5h2V4h2v11h2V4h2V2H9C6.8,2,5,3.8,5,6C5,8.2,6.8,10,9,10z M21,18l-4-4v3H5v2h12v3L21,18z"/></g> +<g id="format-underline"><path d="M12,17c3.3,0,6-2.7,6-6V3h-2.5v8c0,1.9-1.6,3.5-3.5,3.5S8.5,12.9,8.5,11V3H6v8C6,14.3,8.7,17,12,17z M5,19v2h14v-2H5z"/></g> +<g id="functions"><path d="M10,10L10,10l0,5h2V4h2v11h2V4h2V2h-8C7.8,2,6,3.8,6,6C6,8.2,7.8,10,10,10z M8,17v-3l-4,4l4,4v-3h12v-2H8z"/></g> +<g id="insert-chart"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> +<g id="insert-comment"><path d="M20,2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4V4C22,2.9,21.1,2,20,2z M18,14H6v-2h12V14z M18,11H6V9h12V11z M18,8H6V6h12V8z"/></g> +<g id="insert-drive-file"><path d="M6,2C4.9,2,4,2.9,4,4l0,16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V8l-6-6H6z M13,9V3.5L18.5,9H13z"/></g> +<g id="insert-emoticon"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M15.5,11c0.8,0,1.5-0.7,1.5-1.5S16.3,8,15.5,8S14,8.7,14,9.5S14.7,11,15.5,11z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11z M12,17.5c2.3,0,4.3-1.5,5.1-3.5H6.9C7.7,16,9.7,17.5,12,17.5z"/></g> +<g id="insert-invitation"><path d="M17,12h-5v5h5V12z M16,1v2H8V1H6v2H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5c0-1.1-0.9-2-2-2h-1V1H16z M19,19H5V8h14V19z"/></g> +<g id="insert-link"><path d="M8,13h8v-2H8V13z M3.9,12c0-2.3,1.8-4.1,4.1-4.1h3V6H8c-3.3,0-6,2.7-6,6s2.7,6,6,6h3v-1.9H8C5.7,16.1,3.9,14.3,3.9,12z M16,6h-3v1.9h3c2.3,0,4.1,1.8,4.1,4.1c0,2.3-1.8,4.1-4.1,4.1h-3V18h3c3.3,0,6-2.7,6-6S19.3,6,16,6z"/></g> +<g id="insert-photo"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> +<g id="merge-type"><path d="M17,20.4l1.4-1.4L15,15.6L13.6,17L17,20.4z M7.5,8H11v5.6L5.6,19L7,20.4l6-6V8h3.5L12,3.5L7.5,8z"/></g> +<g id="mode-comment"><path d="M22,4c0-1.1-0.9-2-2-2H4C2.9,2,2,2.9,2,4v12c0,1.1,0.9,2,2,2h14l4,4L22,4z"/></g> +<g id="mode-edit"><path d="M3,17.2V21h3.8L17.8,9.9l-3.8-3.8L3,17.2z M20.7,7c0.4-0.4,0.4-1,0-1.4l-2.3-2.3c-0.4-0.4-1-0.4-1.4,0l-1.8,1.8l3.8,3.8L20.7,7z"/></g> +<g id="vertical-align-bottom"><path d="M16,13h-3V3h-2v10H8l4,4L16,13z M4,19v2h16v-2H4z"/></g> +<g id="vertical-align-center"><path d="M8,19h3v4h2v-4h3l-4-4L8,19z M16,5h-3V1h-2v4H8l4,4L16,5z M4,11v2h16v-2H4z"/></g> +<g id="vertical-align-top"><path d="M8,11h3v10h2V11h3l-4-4L8,11z M4,3v2h16V3H4z"/></g> +<g id="wrap-text"><path d="M4,19h6v-2H4V19z M20,5H4v2h16V5z M17,11H4v2h13.2c1.1,0,2,0.9,2,2s-0.9,2-2,2H15v-2l-3,3l3,3v-2h2c2.2,0,4-1.8,4-4S19.2,11,17,11z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/hardware-icons.html b/third_party/polymer/components-chromium/core-icons/hardware-icons.html new file mode 100644 index 0000000..510a05c --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/hardware-icons.html @@ -0,0 +1,56 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="hardware" iconSize="24"> +<svg><defs> +<g id="cast"><path d="M21,3H3C1.9,3,1,3.9,1,5v3h2V5h18v14h-7v2h7c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z M1,18v3h3C4,19.3,2.7,18,1,18z M1,14v2c2.8,0,5,2.2,5,5h2C8,17.1,4.9,14,1,14z M1,10v2c5,0,9,4,9,9h2C12,14.9,7.1,10,1,10z"/></g> +<g id="cast-connected"><path d="M1,18v3h3C4,19.3,2.7,18,1,18z M1,14v2c2.8,0,5,2.2,5,5h2C8,17.1,4.9,14,1,14z M19,7H5v1.6c4,1.3,7.1,4.4,8.4,8.4H19V7z M1,10v2c5,0,9,4,9,9h2C12,14.9,7.1,10,1,10z M21,3H3C1.9,3,1,3.9,1,5v3h2V5h18v14h-7v2h7c1.1,0,2-0.9,2-2V5C23,3.9,22.1,3,21,3z"/></g> +<g id="chromecast"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,4c3,0,5.5,1.6,6.9,4H12c-1.9,0-3.6,1.4-3.9,3.2L5.7,7.1C7.2,5.2,9.4,4,12,4z M15,12c0,1.7-1.3,3-3,3c-1.7,0-3-1.3-3-3c0-1.7,1.3-3,3-3C13.7,9,15,10.3,15,12z M4,12c0-1.5,0.4-2.8,1.1-4l3.5,6l0,0c0.7,1.2,2,2,3.4,2c0.5,0,0.9-0.1,1.3-0.2l-2.4,4.1C7,19.4,4,16,4,12z M12,20l3.5-6l0,0c0.3-0.6,0.6-1.3,0.6-2c0-1.2-0.5-2.3-1.4-3h4.8c0.4,0.9,0.6,1.9,0.6,3C20,16.4,16.4,20,12,20z"/></g> +<g id="desktop-mac"><path d="M21,2H3C1.9,2,1,2.9,1,4v12c0,1.1,0.9,2,2,2h7l-2,3v1h8v-1l-2-3h7c1.1,0,2-0.9,2-2V4C23,2.9,22.1,2,21,2z M21,14H3V4h18V14z"/></g> +<g id="desktop-windows"><path d="M21,2H3C1.9,2,1,2.9,1,4v12c0,1.1,0.9,2,2,2h7v2H8v2h8v-2h-2v-2h7c1.1,0,2-0.9,2-2V4C23,2.9,22.1,2,21,2z M21,16H3V4h18V16z"/></g> +<g id="dock"><path d="M8,23h8v-2H8V23z M16,1L8,1C6.9,1,6,1.9,6,3v14c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V3C18,1.9,17.1,1,16,1z M16,15H8V5h8V15z"/></g> +<g id="gamepad"><path d="M15,7.5V2H9v5.5l3,3L15,7.5z M7.5,9H2v6h5.5l3-3L7.5,9z M9,16.5V22h6v-5.5l-3-3L9,16.5z M16.5,9l-3,3l3,3H22V9H16.5z"/></g> +<g id="glass"><path d="M13,11v2.5h5.9c-0.6,3.5-3.4,6-6.9,6c-4.1,0-7.5-3.4-7.5-7.5S7.9,4.5,12,4.5c2.1,0,3.9,0.9,5.2,2.3l1.8-1.8C17.2,3.2,14.8,2,12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,9.5-4.5,9.5-10v-1H13z"/></g> +<g id="headset"><path d="M12,1c-5,0-9,4-9,9v7c0,1.7,1.3,3,3,3h3v-8H5v-2c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7v2h-4v8h3c1.7,0,3-1.3,3-3v-7C21,5,17,1,12,1z"/></g> +<g id="headset-mic"><path d="M12,1c-5,0-9,4-9,9v7c0,1.7,1.3,3,3,3h3v-8H5v-2c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7v2h-4v8h4v1h-7v2h6c1.7,0,3-1.3,3-3V10C21,5,17,1,12,1z"/></g> +<g id="keyboard"><path d="M20,5H4C2.9,5,2,5.9,2,7l0,10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M11,8h2v2h-2V8z M11,11h2v2h-2V11z M8,8h2v2H8V8z M8,11h2v2H8V11z M7,13H5v-2h2V13z M7,10H5V8h2V10z M16,17H8v-2h8V17z M16,13h-2v-2h2V13z M16,10h-2V8h2V10z M19,13h-2v-2h2V13z M19,10h-2V8h2V10z"/></g> +<g id="keyboard-alt"><path d="M15.5,10c0.8,0,1.5-0.7,1.5-1.5S16.3,7,15.5,7S14,7.7,14,8.5S14.7,10,15.5,10z M8.5,10C9.3,10,10,9.3,10,8.5S9.3,7,8.5,7C7.7,7,7,7.7,7,8.5S7.7,10,8.5,10z M12,17c2.6,0,4.8-1.7,5.7-4H6.3C7.2,15.3,9.4,17,12,17z M12,1C6.5,1,2,5.5,2,11c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,5.5,17.5,1,12,1z M12,19c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,19,12,19z"/></g> +<g id="keyboard-arrow-down"><polygon points="7.4,7.8 12,12.4 16.6,7.8 18,9.2 12,15.2 6,9.2 "/></g> +<g id="keyboard-arrow-left"><polygon points="15.4,16.1 10.8,11.5 15.4,6.9 14,5.5 8,11.5 14,17.5 "/></g> +<g id="keyboard-arrow-right"><polygon points="8.6,16.3 13.2,11.8 8.6,7.2 10,5.8 16,11.8 10,17.8 "/></g> +<g id="keyboard-arrow-up"><polygon points="7.4,15.4 12,10.8 16.6,15.4 18,14 12,8 6,14 "/></g> +<g id="keyboard-backspace"><polygon points="21,11 6.8,11 10.4,7.4 9,6 3,12 9,18 10.4,16.6 6.8,13 21,13 "/></g> +<g id="keyboard-capslock"><path d="M12,8.4l4.6,4.6l1.4-1.4l-6-6l-6,6L7.4,13L12,8.4z M6,18h12v-2H6V18z"/></g> +<g id="keyboard-control"><path d="M6,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C8,10.9,7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C20,10.9,19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2c0,1.1,0.9,2,2,2c1.1,0,2-0.9,2-2C14,10.9,13.1,10,12,10z"/></g> +<g id="keyboard-hide"><path d="M20,3H4C2.9,3,2,3.9,2,5l0,10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V5C22,3.9,21.1,3,20,3z M11,6h2v2h-2V6z M11,9h2v2h-2V9z M8,6h2v2H8V6z M8,9h2v2H8V9z M7,11H5V9h2V11z M7,8H5V6h2V8z M16,15H8v-2h8V15z M16,11h-2V9h2V11z M16,8h-2V6h2V8z M19,11h-2V9h2V11z M19,8h-2V6h2V8z M12,23l4-4H8L12,23z"/></g> +<g id="keyboard-return"><polygon points="19,7 19,11 5.8,11 9.4,7.4 8,6 2,12 8,18 9.4,16.6 5.8,13 21,13 21,7 "/></g> +<g id="keyboard-tab"><path d="M11.6,7.4l3.6,3.6H1v2h14.2l-3.6,3.6L13,18l6-6l-6-6L11.6,7.4z M20,6v12h2V6H20z"/></g> +<g id="keyboard-voice"><path d="M12,15c1.7,0,3-1.3,3-3l0-6c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3v6C9,13.7,10.3,15,12,15z M17.3,12c0,3-2.5,5.1-5.3,5.1c-2.8,0-5.3-2.1-5.3-5.1H5c0,3.4,2.7,6.2,6,6.7V22h2v-3.3c3.3-0.5,6-3.3,6-6.7H17.3z"/></g> +<g id="laptop"><path d="M20,18c1.1,0,2-0.9,2-2l0-10c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6v10c0,1.1,0.9,2,2,2H0v2h24v-2H20z M4,6h16v10H4V6z"/></g> +<g id="laptop-chromebook"><path d="M22,18V3H2v15H0v2h24v-2H22z M14,18h-4v-1h4V18z M20,15H4V5h16V15z"/></g> +<g id="laptop-mac"><path d="M20,18c1.1,0,2-0.9,2-2l0-11c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v11c0,1.1,0.9,2,2,2H0c0,1.1,0.9,2,2,2h20c1.1,0,2-0.9,2-2H20z M4,5h16v11H4V5z M12,19c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S12.6,19,12,19z"/></g> +<g id="laptop-windows"><path d="M20,18v-1c1.1,0,2-0.9,2-2l0-10c0-1.1-0.9-2-2-2H4C2.9,3,2,3.9,2,5v10c0,1.1,0.9,2,2,2v1H0v2h24v-2H20z M4,5h16v10H4V5z"/></g> +<g id="memory"><path d="M15,9H9v6h6V9z M13,13h-2v-2h2V13z M21,11V9h-2V7c0-1.1-0.9-2-2-2h-2V3h-2v2h-2V3H9v2H7C5.9,5,5,5.9,5,7v2H3v2h2v2H3v2h2v2c0,1.1,0.9,2,2,2h2v2h2v-2h2v2h2v-2h2c1.1,0,2-0.9,2-2v-2h2v-2h-2v-2H21z M17,17H7V7h10V17z"/></g> +<g id="mouse"><path d="M13,1.1V9h7C20,4.9,16.9,1.6,13,1.1z M4,15c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8v-4H4V15z M11,1.1C7.1,1.6,4,4.9,4,9h7V1.1z"/></g> +<g id="nest-protect"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6c3.3,0,6,2.7,6,6S15.3,18,12,18z"/><circle cx="12" cy="12" r="4"/></g> +<g id="nest-thermostat"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,5c1.6,0,3,0.5,4.2,1.4L14,8.6C13.4,8.2,12.7,8,12,8c-2.2,0-4,1.8-4,4c0,1.1,0.4,2.1,1.2,2.8l-2.1,2.1C5.8,15.7,5,13.9,5,12C5,8.1,8.1,5,12,5z M16.9,16.9l-2.1-2.1c0.7-0.7,1.2-1.7,1.2-2.8c0-0.7-0.2-1.4-0.6-2l2.2-2.2C18.5,9,19,10.4,19,12C19,13.9,18.2,15.7,16.9,16.9z"/></g> +<g id="phone"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z"/></g> +<g id="phone-android"><path d="M16,1H8C6.3,1,5,2.3,5,4v16c0,1.7,1.3,3,3,3h8c1.7,0,3-1.3,3-3V4C19,2.3,17.7,1,16,1z M14,21h-4v-1h4V21z M17.2,18H6.8V4h10.5V18z"/></g> +<g id="phone-iphone"><path d="M15.5,1h-8C6.1,1,5,2.1,5,3.5v17C5,21.9,6.1,23,7.5,23h8c1.4,0,2.5-1.1,2.5-2.5v-17C18,2.1,16.9,1,15.5,1z M11.5,22c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S12.3,22,11.5,22z M16,18H7V4h9V18z"/></g> +<g id="security"><path d="M12,1L3,5v6c0,5.6,3.8,10.7,9,12c5.2-1.3,9-6.4,9-12V5L12,1z M12,12h7c-0.5,4.1-3.3,7.8-7,8.9V12l-7,0V6.3l7-3.1V12z"/></g> +<g id="speaker"><path d="M17,2H7C5.9,2,5,2.9,5,4v16c0,1.1,0.9,2,2,2l10,0c1.1,0,2-0.9,2-2V4C19,2.9,18.1,2,17,2z M12,4c1.1,0,2,0.9,2,2s-0.9,2-2,2c-1.1,0-2-0.9-2-2S10.9,4,12,4z M12,20c-2.8,0-5-2.2-5-5s2.2-5,5-5c2.8,0,5,2.2,5,5S14.8,20,12,20z M12,12c-1.7,0-3,1.3-3,3c0,1.7,1.3,3,3,3c1.7,0,3-1.3,3-3C15,13.3,13.7,12,12,12z"/></g> +<g id="tablet"><path d="M21,4H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18c1.1,0,2-0.9,2-2l0-12C23,4.9,22.1,4,21,4z M19,18H5V6h14V18z"/></g> +<g id="tablet-android"><path d="M18,0H6C4.3,0,3,1.3,3,3v18c0,1.7,1.3,3,3,3h12c1.7,0,3-1.3,3-3V3C21,1.3,19.7,0,18,0z M14,22h-4v-1h4V22z M19.2,19H4.8V3h14.5V19z"/></g> +<g id="tablet-mac"><path d="M18.5,0h-14C3.1,0,2,1.1,2,2.5v19C2,22.9,3.1,24,4.5,24h14c1.4,0,2.5-1.1,2.5-2.5v-19C21,1.1,19.9,0,18.5,0z M11.5,23c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S12.3,23,11.5,23z M19,19H4V3h15V19z"/></g> +<g id="tv"><path d="M20,3H4C2.9,3,2,3.9,2,5v12c0,1.1,0.9,2,2,2h4v2h8v-2h4c1.1,0,2-0.9,2-2l0-12C22,3.9,21.1,3,20,3z M20,17H4V5h16V17z"/></g> +<g id="watch"><path d="M20,12c0-2.5-1.2-4.8-3-6.3L16,0H8L7,5.7C5.2,7.2,4,9.5,4,12s1.2,4.8,3,6.3L8,24h8l1-5.7C18.8,16.8,20,14.5,20,12z M6,12c0-3.3,2.7-6,6-6c3.3,0,6,2.7,6,6s-2.7,6-6,6C8.7,18,6,15.3,6,12z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/image-icons.html b/third_party/polymer/components-chromium/core-icons/image-icons.html new file mode 100644 index 0000000..ca645b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/image-icons.html @@ -0,0 +1,53 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="image" iconSize="24"> +<svg><defs> +<g id="auto-fix"><polygon points="7.5,5.6 10,7 8.6,4.5 10,2 7.5,3.4 5,2 6.4,4.5 5,7 "/><polygon points="19.5,15.4 17,14 18.4,16.5 17,19 19.5,17.6 22,19 20.6,16.5 22,14 "/><polygon points="22,2 19.5,3.4 17,2 18.4,4.5 17,7 19.5,5.6 22,7 20.6,4.5 "/><path d="M14.4,7.3c-0.4-0.4-1-0.4-1.4,0L1.3,19c-0.4,0.4-0.4,1,0,1.4l2.3,2.3c0.4,0.4,1,0.4,1.4,0L16.7,11c0.4-0.4,0.4-1,0-1.4L14.4,7.3z M13.3,12.8l-2.1-2.1l2.4-2.4l2.1,2.1L13.3,12.8z"/></g> +<g id="camera"><path d="M9.4,10.5l4.8-8.3C13.5,2.1,12.7,2,12,2C9.6,2,7.4,2.8,5.7,4.3l3.7,6.3L9.4,10.5z M21.5,9c-0.9-2.9-3.1-5.3-6-6.3L11.9,9H21.5z M21.8,10h-7.5l0.3,0.5l4.8,8.3C21,17,22,14.6,22,12C22,11.3,21.9,10.6,21.8,10z M8.5,12L4.6,5.2C3,7,2,9.4,2,12c0,0.7,0.1,1.4,0.2,2h7.5L8.5,12z M2.5,15c0.9,2.9,3.1,5.3,6,6.3l3.7-6.3H2.5z M13.7,15l-3.9,6.8c0.7,0.2,1.4,0.2,2.2,0.2c2.4,0,4.6-0.8,6.3-2.3l-3.7-6.3L13.7,15z"/></g> +<g id="camera-alt"><circle cx="12" cy="12" r="3.2"/><path d="M9,2L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6c0-1.1-0.9-2-2-2h-3.2L15,2H9z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S14.8,17,12,17z"/></g> +<g id="camera-roll"><path d="M14,5c0-1.1-0.9-2-2-2h-1V2c0-0.6-0.4-1-1-1H6C5.4,1,5,1.4,5,2v1H4C2.9,3,2,3.9,2,5v15c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2h8V5H14z M12,18h-2v-2h2V18z M12,9h-2V7h2V9z M16,18h-2v-2h2V18z M16,9h-2V7h2V9z M20,18h-2v-2h2V18z M20,9h-2V7h2V9z"/></g> +<g id="compare"><path d="M10,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h5v2h2V1h-2V3z M10,18H5l5-6V18z M19,3h-5v2h5v13l-5-6v9h5c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="crop"><path d="M17,15h2V7c0-1.1-0.9-2-2-2H9v2h8V15z M7,17V1H5v4H1v2h4v10c0,1.1,0.9,2,2,2h10v4h2v-4h4v-2H7z"/></g> +<g id="crop-free"><path d="M3,5v4h2V5h4V3H5C3.9,3,3,3.9,3,5z M5,15H3v4c0,1.1,0.9,2,2,2h4v-2H5V15z M19,19h-4v2h4c1.1,0,2-0.9,2-2v-4h-2V19z M19,3h-4v2h4v4h2V5C21,3.9,20.1,3,19,3z"/></g> +<g id="crop-landscape"><path d="M19,5H5C3.9,5,3,5.9,3,7v10c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V7C21,5.9,20.1,5,19,5z M19,17H5V7h14V17z"/></g> +<g id="crop-portrait"><path d="M17,3H7C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V5C19,3.9,18.1,3,17,3z M17,19H7V5h10V19z"/></g> +<g id="crop-square"><path d="M18,4H6C4.9,4,4,4.9,4,6v12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V6C20,4.9,19.1,4,18,4z M18,18H6V6h12V18z"/></g> +<g id="flash-auto"><path d="M3,2v12h3v9l7-12H9l4-9H3z M19,2h-2l-3.2,9h1.9l0.7-2h3.2l0.7,2h1.9L19,2z M16.9,7.6L18,4l1.1,3.6H16.9z"/></g> +<g id="flash-off"><path d="M3.3,3L2,4.3l5,5V13h3v9l3.6-6.1l4.1,4.1l1.3-1.3L3.3,3z M17,10h-4l4-8H7v2.2l8.5,8.5L17,10z"/></g> +<g id="flash-on"><polygon points="7,2 7,13 10,13 10,22 17,10 13,10 17,2 "/></g> +<g id="image"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> +<g id="landscape"><path d="M14,6l-3.8,5l2.9,3.8L11.5,16C9.8,13.8,7,10,7,10l-6,8h22L14,6z"/></g> +<g id="palette"><path d="M12,3c-5,0-9,4-9,9s4,9,9,9c0.8,0,1.5-0.7,1.5-1.5c0-0.4-0.1-0.7-0.4-1c-0.2-0.3-0.4-0.6-0.4-1c0-0.8,0.7-1.5,1.5-1.5H16c2.8,0,5-2.2,5-5C21,6.6,17,3,12,3z M6.5,12C5.7,12,5,11.3,5,10.5S5.7,9,6.5,9C7.3,9,8,9.7,8,10.5S7.3,12,6.5,12z M9.5,8C8.7,8,8,7.3,8,6.5S8.7,5,9.5,5C10.3,5,11,5.7,11,6.5S10.3,8,9.5,8z M14.5,8C13.7,8,13,7.3,13,6.5S13.7,5,14.5,5C15.3,5,16,5.7,16,6.5S15.3,8,14.5,8z M17.5,12c-0.8,0-1.5-0.7-1.5-1.5S16.7,9,17.5,9c0.8,0,1.5,0.7,1.5,1.5S18.3,12,17.5,12z"/></g> +<g id="panorama"><path d="M23,18V6c0-1.1-0.9-2-2-2H3C1.9,4,1,4.9,1,6v12c0,1.1,0.9,2,2,2h18C22.1,20,23,19.1,23,18z M8.5,12.5l2.5,3l3.5-4.5l4.5,6H5L8.5,12.5z"/></g> +<g id="photo"><path d="M21,19V5c0-1.1-0.9-2-2-2H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14C20.1,21,21,20.1,21,19z M8.5,13.5l2.5,3l3.5-4.5l4.5,6H5L8.5,13.5z"/></g> +<g id="photo-album"><path d="M18,2h-6v7L9.5,7.5L7,9V2H6C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M6,19l3-3.9l2.1,2.6l3-3.9L18,19H6z"/></g> +<g id="photo-library"><path d="M23,17V3c0-1.1-0.9-2-2-2H7C5.9,1,5,1.9,5,3v14c0,1.1,0.9,2,2,2h14C22.1,19,23,18.1,23,17z M10.5,11.5l2.5,3l3.5-4.5l4.5,6H7L10.5,11.5z M1,5v16c0,1.1,0.9,2,2,2h16v-2H3V5H1z"/></g> +<g id="portrait"><path d="M12,12.2c1.2,0,2.2-1,2.2-2.2c0-1.2-1-2.2-2.2-2.2c-1.2,0-2.2,1-2.2,2.2C9.8,11.2,10.8,12.2,12,12.2z M16.5,16.2c0-1.5-3-2.2-4.5-2.2s-4.5,0.8-4.5,2.2V17h9V16.2z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h14V19z"/></g> +<g id="slideshow"><path d="M10,8v8l5-4L10,8z M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19L5,19V5h14V19z"/></g> +<g id="switch-camera"><path d="M20,4h-3.2L15,2H9L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M15,15.5V13H9v2.5L5.5,12L9,8.5V11h6V8.5l3.5,3.5L15,15.5z"/></g> +<g id="switch-video"><path d="M18,9.5V6c0-0.6-0.4-1-1-1H3C2.4,5,2,5.4,2,6v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-3.5l4,4v-13L18,9.5z M13,15.5V13H7v2.5L3.5,12L7,8.5V11h6V8.5l3.5,3.5L13,15.5z"/></g> +<g id="tag-faces"><path d="M17,11c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1C16,10.6,16.4,11,17,11z M15,16c1.9,0,3.4-1.3,3.8-3h-7.6C11.6,14.7,13.1,16,15,16z M13,11c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1C12,10.6,12.4,11,13,11z M22,3L7.6,3C7,3,6.4,3.3,6,3.8L0,12l6,8.2C6.4,20.7,7,21,7.6,21H22c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M4,13c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C5,12.6,4.6,13,4,13z M15,18c-3.3,0-6-2.7-6-6c0-3.3,2.7-6,6-6c3.3,0,6,2.7,6,6C21,15.3,18.3,18,15,18z"/></g> +<g id="timelapse"><path d="M16.2,7.8C15.1,6.6,13.5,6,12,6v6l-4.2,4.2c2.3,2.3,6.1,2.3,8.5,0C18.6,13.9,18.6,10.1,16.2,7.8z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z"/></g> +<g id="unknown-1"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M5.5,7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5z M19,19L5,19L19,5V19z M17,17v-1.5h-5V17H17z"/></g> +<g id="unknown-2"><path d="M12,16h5v-1.5h-5V16z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M6,8h2V6h1.5v2h2v1.5h-2v2H8v-2H6V8z M12,20c-2.2,0-4.2-0.9-5.7-2.3L17.7,6.3C19.1,7.8,20,9.8,20,12C20,16.4,16.4,20,12,20z"/></g> +<g id="unknown-3"><path d="M13,8h-2v3H8v2h3v3h2v-3h3v-2h-3V8z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z"/></g> +<g id="unknown-4"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z M8,13h8v-2H8V13z"/></g> +<g id="unknown-5"><path d="M12,10H4v2h8V10z M12,2L12,2l0,2c4.4,0,8,3.6,8,8c0,4.4-3.6,8-8,8c-2.2,0-4.2-0.9-5.7-2.3l-1.4,1.4C6.7,20.9,9.2,22,12,22c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z"/></g> +<g id="unknown-6"><path d="M16,10h-2v2h2V10z M16,14h-2v2h2V14z M8,10H6v2h2V10z M12,10h-2v2h2V10z M20,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18L4,18V6h16V18z"/></g> +<g id="unknown-7"><path d="M14,16h5v-5h3l-5.5-5.5L11,11h3V16z M11,20h11v-2H11V20z M5.5,7l-3.2,9h1.9l0.7-2h3.2l0.7,2h1.9L7.5,7H5.5z M5.4,12.6L6.5,9l1.1,3.6H5.4z"/></g> +<g id="wb-auto"><path d="M6.9,12.6h2.3L8,9L6.9,12.6z M22,7l-1.2,6.3L19.3,7h-1.6l-1.5,6.3L15,7h-0.8C12.8,5.2,10.5,4,8,4c-4.4,0-8,3.6-8,8s3.6,8,8,8c3.1,0,5.8-1.8,7.2-4.4l0.1,0.4H17l1.5-6.1L20,16h1.8l2-9H22z M10.3,16l-0.7-2H6.4l-0.7,2H3.8L7,7h2l3.2,9H10.3z"/></g> +<g id="wb-cloudy"><path d="M19.4,10c-0.7-3.4-3.7-6-7.4-6C9.1,4,6.6,5.6,5.4,8C2.3,8.4,0,10.9,0,14c0,3.3,2.7,6,6,6h13c2.8,0,5-2.2,5-5C24,12.4,21.9,10.2,19.4,10z"/></g> +<g id="wb-incandescent"><path d="M3.5,18.5L5,20l1.8-1.8l-1.4-1.4L3.5,18.5z M11,22.4c0.3,0,2,0,2,0v-2.9h-2V22.4z M4,10.5H1v2h3V10.5z M15,6.3V1.5H9v4.8c-1.8,1-3,3-3,5.2c0,3.3,2.7,6,6,6s6-2.7,6-6C18,9.3,16.8,7.3,15,6.3z M20,10.5v2h3v-2H20z M17.2,18.2L19,20l1.4-1.4l-1.8-1.8L17.2,18.2z"/></g> +<g id="wb-irradescent"><path d="M5,14.5h14v-6H5V14.5z M11,0.6v2.9h2V0.6H11z M19,3l-1.8,1.8l1.4,1.4l1.8-1.8L19,3z M13,22.4v-2.9h-2v2.9C11.3,22.5,13,22.4,13,22.4z M20.5,18.5l-1.8-1.8l-1.4,1.4L19,20L20.5,18.5z M3.5,4.5l1.8,1.8l1.4-1.4L5,3L3.5,4.5z M5,20l1.8-1.8l-1.4-1.4l-1.8,1.8L5,20z"/></g> +<g id="wb-sunny"><path d="M6.8,4.8L5,3L3.5,4.5l1.8,1.8L6.8,4.8z M4,10.5H1v2h3V10.5z M13,0.6h-2v2.9h2V0.6z M20.5,4.5L19,3l-1.8,1.8l1.4,1.4L20.5,4.5z M17.2,18.2L19,20l1.4-1.4l-1.8-1.8L17.2,18.2z M20,10.5v2h3v-2H20z M12,5.5c-3.3,0-6,2.7-6,6s2.7,6,6,6s6-2.7,6-6S15.3,5.5,12,5.5z M11,22.4c0.3,0,2,0,2,0v-2.9h-2V22.4z M3.5,18.5L5,20l1.8-1.8l-1.4-1.4L3.5,18.5z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/index.html b/third_party/polymer/components-chromium/core-icons/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-icons/maps-icons.html b/third_party/polymer/components-chromium/core-icons/maps-icons.html new file mode 100644 index 0000000..5a5101d --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/maps-icons.html @@ -0,0 +1,69 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="maps" iconSize="24"> +<svg><defs> +<g id="beenhere"><path d="M19,1H5C3.9,1,3,1.9,3,3l0,12.9c0,0.7,0.3,1.3,0.9,1.7L12,23l8.1-5.4c0.5-0.4,0.9-1,0.9-1.7L21,3C21,1.9,20.1,1,19,1z M10,16l-5-5l1.4-1.4l3.6,3.6l7.6-7.6L19,7L10,16z"/></g> +<g id="directions"><path d="M21.7,11.3l-9-9l0,0c-0.4-0.4-1-0.4-1.4,0l-9,9c-0.4,0.4-0.4,1,0,1.4l9,9c0,0,0,0,0,0c0.4,0.4,1,0.4,1.4,0l9-9C22.1,12.3,22.1,11.7,21.7,11.3z M14,14.5V12h-4v3H8v-4c0-0.6,0.4-1,1-1h5V7.5l3.5,3.5L14,14.5z"/></g> +<g id="directions-bike"><path d="M16,4.8c1,0,1.8-0.8,1.8-1.8S17,1.2,16,1.2c-1,0-1.8,0.8-1.8,1.8S15,4.8,16,4.8z M19,12c-2.8,0-5,2.2-5,5c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5C24,14.2,21.8,12,19,12z M19,20.5c-1.9,0-3.5-1.6-3.5-3.5s1.6-3.5,3.5-3.5c1.9,0,3.5,1.6,3.5,3.5S20.9,20.5,19,20.5z M14.8,10H19V8.2h-3.2l-1.9-3.3c-0.3-0.5-0.8-0.8-1.5-0.8c-0.5,0-0.9,0.2-1.2,0.5L7.5,8.3C7.2,8.6,7,9,7,9.5c0,0.6,0.3,1.2,0.8,1.5l3.4,2v5H13v-6.5l-2.2-1.7l2.3-2.3L14.8,10z M5,12c-2.8,0-5,2.2-5,5c0,2.8,2.2,5,5,5c2.8,0,5-2.2,5-5C10,14.2,7.8,12,5,12z M5,20.5c-1.9,0-3.5-1.6-3.5-3.5s1.6-3.5,3.5-3.5c1.9,0,3.5,1.6,3.5,3.5S6.9,20.5,5,20.5z"/></g> +<g id="directions-bus"><path d="M4,16c0,0.9,0.4,1.7,1,2.2V20c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h8v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1.8c0.6-0.5,1-1.3,1-2.2V6c0-3.5-3.6-4-8-4C7.6,2,4,2.5,4,6V16z M7.5,17C6.7,17,6,16.3,6,15.5S6.7,14,7.5,14C8.3,14,9,14.7,9,15.5S8.3,17,7.5,17z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S17.3,17,16.5,17z M18,11H6V6h12V11z"/></g> +<g id="directions-car"><path d="M18.9,6c-0.2-0.6-0.8-1-1.4-1h-11C5.8,5,5.3,5.4,5.1,6L3,12v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,6z M6.5,16C5.7,16,5,15.3,5,14.5S5.7,13,6.5,13C7.3,13,8,13.7,8,14.5S7.3,16,6.5,16z M17.5,16c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,16,17.5,16z M5,11l1.5-4.5h11L19,11H5z"/></g> +<g id="directions-ferry"><path d="M20,21c-1.4,0-2.8-0.5-4-1.3c-2.4,1.7-5.6,1.7-8,0C6.8,20.5,5.4,21,4,21H2v2h2c1.4,0,2.7-0.3,4-1c2.5,1.3,5.5,1.3,8,0c1.3,0.6,2.6,1,4,1h2v-2H20z M3.9,19L3.9,19C5.6,19,7,18.1,8,17c1,1.1,2.4,2,4,2c1.6,0,3-0.9,4-2c1,1.1,2.4,2,4,2h0.1l1.9-6.7c0.1-0.3,0.1-0.5-0.1-0.8c-0.1-0.2-0.3-0.4-0.6-0.5L20,10.6V6c0-1.1-0.9-2-2-2h-3V1H9v3H6C4.9,4,4,4.9,4,6v4.6L2.7,11c-0.3,0.1-0.5,0.3-0.6,0.5C2,11.8,2,12.1,2.1,12.3L3.9,19z M6,6h12v4l-6-2l-6,2V6z"/></g> +<g id="directions-subway"><path d="M12,2C7.6,2,4,2.5,4,6v9.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V6C20,2.5,16.4,2,12,2z M7.5,17C6.7,17,6,16.3,6,15.5C6,14.7,6.7,14,7.5,14C8.3,14,9,14.7,9,15.5C9,16.3,8.3,17,7.5,17z M11,11H6V6h5V11z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C18,16.3,17.3,17,16.5,17z M18,11h-5V6h5V11z"/></g> +<g id="directions-train"><path d="M4,15.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V5c0-3.5-3.6-4-8-4C7.6,1,4,1.5,4,5V15.5z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,17,12,17z M18,10H6V5h12V10z"/></g> +<g id="directions-transit"><path d="M12,2C7.6,2,4,2.5,4,6v9.5C4,17.4,5.6,19,7.5,19L6,20.5V21h12v-0.5L16.5,19c1.9,0,3.5-1.6,3.5-3.5V6C20,2.5,16.4,2,12,2z M7.5,17C6.7,17,6,16.3,6,15.5C6,14.7,6.7,14,7.5,14C8.3,14,9,14.7,9,15.5C9,16.3,8.3,17,7.5,17z M11,11H6V6h5V11z M16.5,17c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C18,16.3,17.3,17,16.5,17z M18,11h-5V6h5V11z"/></g> +<g id="directions-walk"><path d="M14,3.8c1,0,1.8-0.8,1.8-1.8c0-1-0.8-1.8-1.8-1.8c-1,0-1.8,0.8-1.8,1.8C12.2,3,13,3.8,14,3.8z M14.1,10H19V8.2h-3.6l-2-3.3C13.1,4.4,12.5,4,11.9,4c-0.2,0-0.3,0-0.5,0.1L6,5.8V11h1.8V7.3l2.1-0.7L6,22h1.8l2.9-8.1L13,17v5h1.8v-6.4l-2.5-4.5L13,8.2L14.1,10z"/></g> +<g id="earth"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20.2c-1.1,0-2.2-0.2-3.2-0.6c-0.6-1.5-0.6-2.6,1.1-2.1c0,0,3.9,1.5,8,0.1C16.5,19.2,14.4,20.2,12,20.2z M19.1,16.1c-0.9,0.4-2.1,1-4,1c-1.9,0-3.5-0.8-5.6-1.4c-1.9-0.6-2.6-1.5-3.8-1.5c-0.7,0-1,0.7-1.2,1.2c-0.5-1-0.8-2.2-0.8-3.4c0-0.8,0.1-1.6,0.3-2.3c1.3-1.6,3.2-2.6,6-0.4c0,0,6.2,4.7,9.8,5C19.7,14.9,19.4,15.5,19.1,16.1z M12.4,7.6C9.6,4.9,7.3,5.7,6.3,6.1c0.7-0.7,1.6-1.3,2.6-1.7c2.8-0.1,5.9,0.4,7.6,2.9c0,0,2.4,4.2,3.3,2.3c0.2,0.7,0.3,1.5,0.3,2.3c0,0.3,0,0.6,0,0.9C18.1,12.6,15.3,10.3,12.4,7.6z"/></g> +<g id="explore-nearby"><path d="M12,7.2c-2.1,0-3.8,1.7-3.8,3.8c0,3,3.8,6.5,3.8,6.5s3.8-3.5,3.8-6.5C15.8,8.9,14.1,7.2,12,7.2z M12,12.5c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C13.5,11.8,12.8,12.5,12,12.5z M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/></g> +<g id="flight"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2S10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> +<g id="hotel"><path d="M7,13c1.7,0,3-1.3,3-3S8.7,7,7,7c-1.7,0-3,1.3-3,3S5.3,13,7,13z M19,7h-8v7H3V5H1v15h2v-3h18v3h2v-9C23,8.8,21.2,7,19,7z"/></g> +<g id="local-airport"><path d="M21,16v-2l-8-5V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5V9l-8,5v2l8-2.5V19l-2,1.5V22l3.5-1l3.5,1v-1.5L13,19v-5.5L21,16z"/></g> +<g id="local-atm"><path d="M11,17h2v-1h1c0.6,0,1-0.4,1-1v-3c0-0.6-0.4-1-1-1h-3v-1h4V8h-2V7h-2v1h-1C9.4,8,9,8.4,9,9v3c0,0.6,0.4,1,1,1h3v1H9v2h2V17z M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,18H4V6h16V18z"/></g> +<g id="local-attraction"><path d="M20,12c0-1.1,0.9-2,2-2V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6l0,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2l0,4c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-4C20.9,14,20,13.1,20,12z M15.6,16.8L12,14.5l-3.6,2.3l1.1-4.1L6.2,10l4.2-0.2L12,5.8l1.5,3.9l4.2,0.2l-3.3,2.7L15.6,16.8z"/></g> +<g id="local-bar"><path d="M11,13v6H6v2h12v-2h-5v-6l8-8V3H3v2L11,13z M7.5,7l-2-2h13l-2,2H7.5z"/></g> +<g id="local-cafe"><path d="M20,3H4v10c0,2.2,1.8,4,4,4h6c2.2,0,4-1.8,4-4v-3h2c1.1,0,2-0.9,2-2V5C22,3.9,21.1,3,20,3z M20,8h-2V5h2V8z M2,21h18v-2H2V21z"/></g> +<g id="local-car-wash"><path d="M17,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7s-1.5,1.7-1.5,2.7C15.5,4.3,16.2,5,17,5z M12,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7s-1.5,1.7-1.5,2.7C10.5,4.3,11.2,5,12,5z M7,5c0.8,0,1.5-0.7,1.5-1.5c0-1-1.5-2.7-1.5-2.7S5.5,2.5,5.5,3.5C5.5,4.3,6.2,5,7,5z M18.9,8c-0.2-0.6-0.8-1-1.4-1h-11C5.8,7,5.3,7.4,5.1,8L3,14v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,8z M6.5,18C5.7,18,5,17.3,5,16.5C5,15.7,5.7,15,6.5,15C7.3,15,8,15.7,8,16.5C8,17.3,7.3,18,6.5,18z M17.5,18c-0.8,0-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5C19,17.3,18.3,18,17.5,18z M5,13l1.5-4.5h11L19,13H5z"/></g> +<g id="local-convenience-store"><path d="M19,7V4H5v3H2v13h8v-4h4v4h8V7H19z M11,10H9v1h2v1H8V9h2V8H8V7h3V10z M16,12h-1v-2h-2V7h1v2h1V7h1V12z"/></g> +<g id="local-drink"><path d="M3,2l2,18.2c0.1,1,1,1.8,2,1.8h10c1,0,1.9-0.8,2-1.8L21,2H3z M12,19c-1.7,0-3-1.3-3-3c0-2,3-5.4,3-5.4s3,3.4,3,5.4C15,17.7,13.7,19,12,19z M18.3,8H5.7L5.2,4h13.5L18.3,8z"/></g> +<g id="local-florist"><path d="M12,22c5,0,9-4,9-9C16,13,12,17,12,22z M5.6,10.2c0,1.4,1.1,2.5,2.5,2.5c0.5,0,1-0.2,1.4-0.4c0,0.1,0,0.1,0,0.2c0,1.4,1.1,2.5,2.5,2.5s2.5-1.1,2.5-2.5c0-0.1,0-0.1,0-0.2c0.4,0.3,0.9,0.4,1.4,0.4c1.4,0,2.5-1.1,2.5-2.5c0-1-0.6-1.8-1.4-2.2c0.8-0.4,1.4-1.3,1.4-2.2c0-1.4-1.1-2.5-2.5-2.5c-0.5,0-1,0.2-1.4,0.4c0-0.1,0-0.1,0-0.2C14.5,2.1,13.4,1,12,1S9.5,2.1,9.5,3.5c0,0.1,0,0.1,0,0.2C9.1,3.4,8.6,3.2,8.1,3.2c-1.4,0-2.5,1.1-2.5,2.5c0,1,0.6,1.8,1.4,2.2C6.2,8.4,5.6,9.3,5.6,10.2z M12,5.5c1.4,0,2.5,1.1,2.5,2.5s-1.1,2.5-2.5,2.5S9.5,9.4,9.5,8S10.6,5.5,12,5.5z M3,13c0,5,4,9,9,9C12,17,8,13,3,13z"/></g> +<g id="local-gas-station"><path d="M19.8,7.2L19.8,7.2l-3.7-3.7L15,4.6l2.1,2.1C16.2,7,15.5,7.9,15.5,9c0,1.4,1.1,2.5,2.5,2.5c0.4,0,0.7-0.1,1-0.2v7.2c0,0.6-0.4,1-1,1s-1-0.4-1-1V14c0-1.1-0.9-2-2-2h-1V5c0-1.1-0.9-2-2-2H6C4.9,3,4,3.9,4,5v16h10v-7.5h1.5v5c0,1.4,1.1,2.5,2.5,2.5c1.4,0,2.5-1.1,2.5-2.5V9C20.5,8.3,20.2,7.7,19.8,7.2z M12,10H6V5h6V10z M18,10c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1C19,9.6,18.6,10,18,10z"/></g> +<g id="local-grocery-store"><path d="M7,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S8.1,18,7,18z M1,2v2h2l3.6,7.6L5.2,14C5.1,14.3,5,14.7,5,15c0,1.1,0.9,2,2,2h12v-2H7.4c-0.1,0-0.2-0.1-0.2-0.2c0,0,0-0.1,0-0.1L8.1,13h7.4c0.8,0,1.4-0.4,1.7-1l3.6-6.5C21,5.3,21,5.2,21,5c0-0.6-0.4-1-1-1H5.2L4.3,2H1z M17,18c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S18.1,18,17,18z"/></g> +<g id="local-hospital"><path d="M19,3H5C3.9,3,3,3.9,3,5l0,14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,14h-4v4h-4v-4H6v-4h4V6h4v4h4V14z"/></g> +<g id="local-hotel"><path d="M7,13c1.7,0,3-1.3,3-3S8.7,7,7,7s-3,1.3-3,3S5.3,13,7,13z M19,7h-8v7H3V5H1v15h2v-3h18v3h2v-9C23,8.8,21.2,7,19,7z"/></g> +<g id="local-laundry-service"><path d="M9.2,16.8c1.6,1.6,4.1,1.6,5.7,0c1.6-1.6,1.6-4.1,0-5.7L9.2,16.8z M18,2L6,2C4.9,2,4,2.9,4,4v16c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M10,4c0.6,0,1,0.4,1,1s-0.4,1-1,1C9.4,6,9,5.6,9,5S9.4,4,10,4z M7,4c0.6,0,1,0.4,1,1S7.6,6,7,6S6,5.6,6,5S6.4,4,7,4z M12,20c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,20,12,20z"/></g> +<g id="local-library"><path d="M12,11.5C9.6,9.4,6.5,8,3,8v11c3.5,0,6.6,1.4,9,3.5c2.4-2.2,5.5-3.5,9-3.5V8C17.5,8,14.4,9.4,12,11.5z M12,8c1.7,0,3-1.3,3-3s-1.3-3-3-3S9,3.3,9,5S10.3,8,12,8z"/></g> +<g id="local-mall"><path d="M19,6h-2c0-2.8-2.2-5-5-5S7,3.2,7,6H5C3.9,6,3,6.9,3,8l0,12c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V8C21,6.9,20.1,6,19,6z M12,3c1.7,0,3,1.3,3,3H9C9,4.3,10.3,3,12,3z M12,13c-2.8,0-5-2.2-5-5h2c0,1.7,1.3,3,3,3s3-1.3,3-3h2C17,10.8,14.8,13,12,13z"/></g> +<g id="local-movies"><path d="M18,3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3H18z M8,17H6v-2h2V17z M8,13H6v-2h2V13z M8,9H6V7h2V9z M18,17h-2v-2h2V17z M18,13h-2v-2h2V13z M18,9h-2V7h2V9z"/></g> +<g id="local-offer"><path d="M21.4,11.6l-9-9C12.1,2.2,11.6,2,11,2H4C2.9,2,2,2.9,2,4v7c0,0.6,0.2,1.1,0.6,1.4l9,9c0.4,0.4,0.9,0.6,1.4,0.6c0.6,0,1.1-0.2,1.4-0.6l7-7c0.4-0.4,0.6-0.9,0.6-1.4C22,12.4,21.8,11.9,21.4,11.6z M5.5,7C4.7,7,4,6.3,4,5.5S4.7,4,5.5,4C6.3,4,7,4.7,7,5.5S6.3,7,5.5,7z"/></g> +<g id="local-parking"><path d="M13,3H6v18h4v-6h3c3.3,0,6-2.7,6-6S16.3,3,13,3z M13.2,11H10V7h3.2c1.1,0,2,0.9,2,2S14.3,11,13.2,11z"/></g> +<g id="local-pharmacy"><path d="M21,5h-2.6l1.1-3.1L17.2,1l-1.5,4H3v2l2,6l-2,6v2h18v-2l-2-6l2-6V5z M16,14h-3v3h-2v-3H8v-2h3V9h2v3h3V14z"/></g> +<g id="local-phone"><path d="M6.6,10.8c1.4,2.8,3.8,5.1,6.6,6.6l2.2-2.2c0.3-0.3,0.7-0.4,1-0.2c1.1,0.4,2.3,0.6,3.6,0.6c0.6,0,1,0.4,1,1V20c0,0.6-0.4,1-1,1C10.6,21,3,13.4,3,4c0-0.6,0.4-1,1-1h3.5c0.6,0,1,0.4,1,1c0,1.2,0.2,2.4,0.6,3.6c0.1,0.3,0,0.7-0.2,1L6.6,10.8z"/></g> +<g id="local-pizza"><path d="M12,2C8.4,2,5.2,3.5,3,6l9,16l9-16C18.8,3.5,15.6,2,12,2z M7,7c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2s-0.9,2-2,2C7.9,9,7,8.1,7,7z M12,15c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,15,12,15z"/></g> +<g id="local-play"><path d="M20,12c0-1.1,0.9-2,2-2V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6l0,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2l0,4c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-4C20.9,14,20,13.1,20,12z M15.6,16.8L12,14.5l-3.6,2.3l1.1-4.1L6.2,10l4.2-0.2L12,5.8l1.5,3.9l4.2,0.2l-3.3,2.7L15.6,16.8z"/></g> +<g id="local-post-office"><path d="M20,4H4C2.9,4,2,4.9,2,6l0,12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M20,8l-8,5L4,8V6l8,5l8-5V8z"/></g> +<g id="local-print-shop"><path d="M19,8H5c-1.7,0-3,1.3-3,3v6h4v4h12v-4h4v-6C22,9.3,20.7,8,19,8z M16,19H8v-5h8V19z M19,12c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S19.6,12,19,12z M18,3H6v4h12V3z"/></g> +<g id="local-restaurant"><path d="M8.1,13.3l2.8-2.8l-7-7c-1.6,1.6-1.6,4.1,0,5.7L8.1,13.3z"/><path d="M14.9,11.5c1.5,0.7,3.7,0.2,5.3-1.4C22.1,8.2,22.4,5.5,21,4c-1.5-1.5-4.2-1.1-6.1,0.8c-1.6,1.6-2.1,3.7-1.4,5.3c-2.2,2.2-9.8,9.8-9.8,9.8l1.4,1.4l6.9-6.9l6.9,6.9l1.4-1.4L13.4,13L14.9,11.5z"/></g> +<g id="local-see"><circle cx="12" cy="12" r="3.2"/><path d="M9,2L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6c0-1.1-0.9-2-2-2h-3.2L15,2H9z M12,17c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S14.8,17,12,17z"/></g> +<g id="local-shipping"><path d="M20,8h-3V4H3C1.9,4,1,4.9,1,6v11h2c0,1.7,1.3,3,3,3s3-1.3,3-3h6c0,1.7,1.3,3,3,3s3-1.3,3-3h2v-5L20,8z M6,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S6.8,18.5,6,18.5z M19.5,9.5l2,2.5H17V9.5H19.5z M18,18.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5s1.5,0.7,1.5,1.5S18.8,18.5,18,18.5z"/></g> +<g id="local-taxi"><path d="M18.9,6c-0.2-0.6-0.8-1-1.4-1H15V3H9v2H6.5C5.8,5,5.3,5.4,5.1,6L3,12v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,6z M6.5,16C5.7,16,5,15.3,5,14.5S5.7,13,6.5,13C7.3,13,8,13.7,8,14.5S7.3,16,6.5,16z M17.5,16c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,16,17.5,16z M5,11l1.5-4.5h11L19,11H5z"/></g> +<g id="location-history"><path d="M19,2H5C3.9,2,3,2.9,3,4v14c0,1.1,0.9,2,2,2h4l3,3l3-3h4c1.1,0,2-0.9,2-2V4C21,2.9,20.1,2,19,2z M12,5.3c1.5,0,2.7,1.2,2.7,2.7c0,1.5-1.2,2.7-2.7,2.7c-1.5,0-2.7-1.2-2.7-2.7C9.3,6.5,10.5,5.3,12,5.3z M18,16H6v-0.9c0-2,4-3.1,6-3.1c2,0,6,1.1,6,3.1V16z"/></g> +<g id="map"><path d="M20.5,3c-0.1,0-0.1,0-0.2,0L15,5.1L9,3L3.4,4.9C3.2,5,3,5.1,3,5.4v15.1C3,20.8,3.2,21,3.5,21c0.1,0,0.1,0,0.2,0L9,18.9l6,2.1l5.6-1.9c0.2-0.1,0.4-0.3,0.4-0.5V3.5C21,3.2,20.8,3,20.5,3z M15,19l-6-2.1V5l6,2.1V19z"/></g> +<g id="menu"><path d="M8.1,13.3l2.8-2.8l-7-7c-1.6,1.6-1.6,4.1,0,5.7L8.1,13.3z"/><path d="M14.9,11.5c1.5,0.7,3.7,0.2,5.3-1.4C22.1,8.2,22.4,5.5,21,4c-1.5-1.5-4.2-1.1-6.1,0.8c-1.6,1.6-2.1,3.7-1.4,5.3c-2.2,2.2-9.8,9.8-9.8,9.8l1.4,1.4l6.9-6.9l6.9,6.9l1.4-1.4L13.4,13L14.9,11.5z"/></g> +<g id="my-location"><path d="M12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4s4-1.8,4-4C16,9.8,14.2,8,12,8z M20.9,11c-0.5-4.2-3.8-7.5-7.9-7.9V1h-2v2.1C6.8,3.5,3.5,6.8,3.1,11H1v2h2.1c0.5,4.2,3.8,7.5,7.9,7.9V23h2v-2.1c4.2-0.5,7.5-3.8,7.9-7.9H23v-2H20.9z M12,19c-3.9,0-7-3.1-7-7c0-3.9,3.1-7,7-7s7,3.1,7,7C19,15.9,15.9,19,12,19z"/></g> +<g id="navigation"><polygon points="12,2 4.5,20.3 5.2,21 12,18 18.8,21 19.5,20.3 "/></g> +<g id="place"><path d="M12,2C8.1,2,5,5.1,5,9c0,5.2,7,13,7,13s7-7.8,7-13C19,5.1,15.9,2,12,2z M12,11.5c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5c1.4,0,2.5,1.1,2.5,2.5S13.4,11.5,12,11.5z"/></g> +<g id="rate-review"><path d="M15.4,6.4l-1.8-1.8c-0.2-0.2-0.5-0.2-0.7,0L6,11.5V14h2.5l6.9-6.9C15.5,6.9,15.5,6.6,15.4,6.4z"/><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M6,14v-2.5l6.9-6.9c0.2-0.2,0.5-0.2,0.7,0l1.8,1.8c0.2,0.2,0.2,0.5,0,0.7L8.5,14H6z M18,14h-7.5l2-2H18V14z"/></g> +<g id="satellite"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M5,5h3c0,1.7-1.3,3-3,3V5z M5,12v-2c2.8,0,5-2.2,5-5h2C12,8.9,8.9,12,5,12z M5,18l3.5-4.5l2.5,3l3.5-4.5l4.5,6H5z"/></g> +<g id="store-mall-directory"><path d="M20,4H4v2h16V4z M21,14v-2l-1-5H4l-1,5v2h1v6h10v-6h4v6h2v-6H21z M12,18H6v-4h6V18z"/></g> +<g id="terrain"><path d="M14,6l-3.8,5l2.9,3.8L11.5,16C9.8,13.8,7,10,7,10l-6,8h22L14,6z"/></g> +<g id="traffic"><path d="M20,10h-3V8.9c1.7-0.4,3-2,3-3.9h-3V4c0-0.6-0.4-1-1-1H8C7.4,3,7,3.4,7,4v1H4c0,1.9,1.3,3.4,3,3.9V10H4c0,1.9,1.3,3.4,3,3.9V15H4c0,1.9,1.3,3.4,3,3.9V20c0,0.6,0.4,1,1,1h8c0.6,0,1-0.4,1-1v-1.1c1.7-0.4,3-2,3-3.9h-3v-1.1C18.7,13.4,20,11.9,20,10z M12,19c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,19,12,19z M12,14c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S13.1,14,12,14z M12,9c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C14,8.1,13.1,9,12,9z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/notification-icons.html b/third_party/polymer/components-chromium/core-icons/notification-icons.html new file mode 100644 index 0000000..d2646f8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/notification-icons.html @@ -0,0 +1,45 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="notification" iconSize="24"> +<svg><defs> +<g id="adb"><path d="M5,16c0,3.9,3.1,7,7,7c3.9,0,7-3.1,7-7v-4H5V16z M16.1,4.4l2.1-2.1l-0.8-0.8l-2.3,2.3C14.2,3.3,13.1,3,12,3c-1.1,0-2.2,0.3-3.1,0.7L6.6,1.4L5.8,2.3l2.1,2.1C6.1,5.6,5,7.7,5,10v1h14v-1C19,7.7,17.9,5.6,16.1,4.4z M9,9C8.4,9,8,8.6,8,8s0.4-1,1-1c0.6,0,1,0.4,1,1S9.6,9,9,9z M15,9c-0.6,0-1-0.4-1-1s0.4-1,1-1c0.6,0,1,0.4,1,1S15.6,9,15,9z"/></g> +<g id="bluetooth-audio"><path d="M14.2,12l2.3,2.3c0.3-0.7,0.4-1.5,0.4-2.3c0-0.8-0.2-1.6-0.4-2.3L14.2,12z M19.5,6.7L18.3,8c0.6,1.2,1,2.6,1,4s-0.4,2.8-1,4l1.2,1.2c1-1.5,1.5-3.4,1.5-5.3C21,10,20.5,8.2,19.5,6.7z M15.7,7.7L10,2H9v7.6L4.4,5L3,6.4L8.6,12L3,17.6L4.4,19L9,14.4V22h1l5.7-5.7L11.4,12L15.7,7.7z M11,5.8l1.9,1.9L11,9.6V5.8z M12.9,16.3L11,18.2v-3.8L12.9,16.3z"/></g> +<g id="disc-full"><path d="M20,16h2v-2h-2V16z M20,7v5h2V7H20z M10,4c-4.4,0-8,3.6-8,8c0,4.4,3.6,8,8,8s8-3.6,8-8C18,7.6,14.4,4,10,4z M10,14c-1.1,0-2-0.9-2-2s0.9-2,2-2c1.1,0,2,0.9,2,2S11.1,14,10,14z"/></g> +<g id="dnd-on"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M4,12c0-4.4,3.6-8,8-8c1.8,0,3.5,0.6,4.9,1.7L5.7,16.9C4.6,15.5,4,13.8,4,12z M12,20c-1.8,0-3.5-0.6-4.9-1.7L18.3,7.1C19.4,8.5,20,10.2,20,12C20,16.4,16.4,20,12,20z"/></g> +<g id="drive-eta"><path d="M18.9,5c-0.2-0.6-0.8-1-1.4-1h-11C5.8,4,5.3,4.4,5.1,5L3,11v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,5z M6.5,15C5.7,15,5,14.3,5,13.5S5.7,12,6.5,12C7.3,12,8,12.7,8,13.5S7.3,15,6.5,15z M17.5,15c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,15,17.5,15z M5,10l1.5-4.5h11L19,10H5z"/></g> +<g id="mms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M5,14l3.5-4.5l2.5,3L14.5,8l4.5,6H5z"/></g> +<g id="more"><path d="M22,3H7C6.3,3,5.8,3.4,5.4,3.9L0,12l5.4,8.1c0.4,0.5,1,0.9,1.7,0.9H22c1.1,0,2-0.9,2-2V5C24,3.9,23.1,3,22,3z M9,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S9.8,13.5,9,13.5z M14,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S14.8,13.5,14,13.5z M19,13.5c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S19.8,13.5,19,13.5z"/></g> +<g id="phone-bluetooth-speaker"><path d="M14.7,9.5L17,7.2V11h0.5l2.9-2.9L18.2,6l2.1-2.1L17.5,1H17v3.8l-2.3-2.3L14,3.2L16.8,6L14,8.8L14.7,9.5z M18,2.9l0.9,0.9L18,4.8V2.9z M18,7.2l0.9,0.9L18,9.1V7.2z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z"/></g> +<g id="phone-forwarded"><path d="M18,11l5-5l-5-5v3h-4v4h4V11z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z"/></g> +<g id="phone-in-talk"><path d="M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,12h2c0-5-4-9-9-9v2C15.9,5,19,8.1,19,12z M15,12h2c0-2.8-2.2-5-5-5v2C13.7,9,15,10.3,15,12z"/></g> +<g id="phone-locked"><path d="M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M20,4V3.5C20,2.1,18.9,1,17.5,1C16.1,1,15,2.1,15,3.5V4c-0.6,0-1,0.4-1,1v4c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V5C21,4.4,20.6,4,20,4z M19.2,4h-3.4V3.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V4z"/></g> +<g id="phone-missed"><path d="M6.5,5.5L12,11l7-7l-1-1l-6,6L7.5,4.5H11V3H5v6h1.5V5.5z M23.7,16.7c-3-2.9-7.2-4.7-11.7-4.7c-4.5,0-8.7,1.8-11.7,4.7C0.1,16.9,0,17.1,0,17.4s0.1,0.5,0.3,0.7l2.5,2.5c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3c0.8-0.7,1.7-1.4,2.7-1.9c0.3-0.2,0.6-0.5,0.6-0.9v-3.1c1.4-0.5,3-0.7,4.6-0.7c1.6,0,3.2,0.3,4.6,0.7v3.1c0,0.4,0.2,0.7,0.6,0.9c1,0.5,1.9,1.1,2.7,1.9c0.2,0.2,0.4,0.3,0.7,0.3c0.3,0,0.5-0.1,0.7-0.3l2.5-2.5c0.2-0.2,0.3-0.4,0.3-0.7S23.9,16.9,23.7,16.7z"/></g> +<g id="phone-paused"><path d="M17,3h-2v7h2V3z M20,15.5c-1.2,0-2.4-0.2-3.6-0.6c-0.3-0.1-0.7,0-1,0.2l-2.2,2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c0.3-0.3,0.4-0.7,0.2-1C8.7,6.4,8.5,5.2,8.5,4c0-0.6-0.4-1-1-1H4C3.4,3,3,3.4,3,4c0,9.4,7.6,17,17,17c0.6,0,1-0.4,1-1v-3.5C21,15.9,20.6,15.5,20,15.5z M19,3v7h2V3H19z"/></g> +<g id="play-download"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M12,19l-5-5h3v-4h4v4h3L12,19z"/></g> +<g id="play-install"><path d="M20,6h-4V4l-2-2h-4L8,4v2H4C2.9,6,2,6.9,2,8l0,11c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M10.5,17.5L7,14l1.4-1.4l2.1,2.1l5.2-5.2l1.4,1.4L10.5,17.5z"/></g> +<g id="sd-card"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M12,8h-2V4h2V8z M15,8h-2V4h2V8z M18,8h-2V4h2V8z"/></g> +<g id="sim-card-alert"><path d="M18,2h-8L4,8l0,12c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M13,17h-2v-2h2V17z M13,13h-2V8h2V13z"/></g> +<g id="sms"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M9,11H7V9h2V11z M13,11h-2V9h2V11z M17,11h-2V9h2V11z"/></g> +<g id="sms-failed"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M13,14h-2v-2h2V14z M13,10h-2V6h2V10z"/></g> +<g id="sync"><path d="M12,4V1L8,5l4,4V6c3.3,0,6,2.7,6,6c0,1-0.3,2-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12C20,7.6,16.4,4,12,4z M12,18c-3.3,0-6-2.7-6-6c0-1,0.3-2,0.7-2.8L5.2,7.7C4.5,9,4,10.4,4,12c0,4.4,3.6,8,8,8v3l4-4l-4-4V18z"/></g> +<g id="sync-disabled"><path d="M10,6.3V4.3c-0.8,0.2-1.5,0.5-2.2,1l1.5,1.5C9.5,6.6,9.7,6.4,10,6.3z M2.9,5.4l2.4,2.4C4.5,9,4,10.4,4,12c0,2.2,0.9,4.2,2.4,5.6L4,20h6v-6l-2.2,2.2C6.7,15.2,6,13.7,6,12c0-1,0.2-1.9,0.7-2.8l8.1,8.1c-0.2,0.1-0.5,0.2-0.8,0.3v2.1c0.8-0.2,1.5-0.5,2.2-1l2.4,2.4l1.3-1.3L4.1,4.1L2.9,5.4z M20,4h-6v6l2.2-2.2C17.3,8.8,18,10.3,18,12c0,1-0.2,1.9-0.7,2.8l1.5,1.5C19.5,15,20,13.6,20,12c0-2.2-0.9-4.2-2.4-5.6L20,4z"/></g> +<g id="sync-green"><path d="M4,12c0,2.2,0.9,4.2,2.4,5.6L4,20h6v-6l-2.2,2.2C6.7,15.2,6,13.7,6,12c0-2.6,1.7-4.8,4-5.7V4.3C6.6,5.2,4,8.3,4,12z M20,4h-6v6l2.2-2.2C17.3,8.8,18,10.3,18,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L20,4z"/></g> +<g id="sync-problem"><path d="M3,12c0,2.2,0.9,4.2,2.4,5.6L3,20h6v-6l-2.2,2.2C5.7,15.2,5,13.7,5,12c0-2.6,1.7-4.8,4-5.7V4.3C5.6,5.2,3,8.3,3,12z M11,17h2v-2h-2V17z M21,4h-6v6l2.2-2.2C18.3,8.8,19,10.3,19,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L21,4z M11,13h2V7h-2V13z"/></g> +<g id="sync-problem-red"><path d="M3,12c0,2.2,0.9,4.2,2.4,5.6L3,20h6v-6l-2.2,2.2C5.7,15.2,5,13.7,5,12c0-2.6,1.7-4.8,4-5.7V4.3C5.6,5.2,3,8.3,3,12z M11,17h2v-2h-2V17z M21,4h-6v6l2.2-2.2C18.3,8.8,19,10.3,19,12c0,2.6-1.7,4.8-4,5.7v2.1c3.4-0.9,6-4,6-7.7c0-2.2-0.9-4.2-2.4-5.6L21,4z M11,13h2V7h-2V13z"/></g> +<g id="system-update"><path d="M17,1L7,1C5.9,1,5,1.9,5,3v18c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z M17,19H7V5h10V19z M16,13h-3V8h-2v5H8l4,4L16,13z"/></g> +<g id="tap-and-play"><path d="M2,16v2c2.8,0,5,2.2,5,5h2C9,19.1,5.9,16,2,16z M2,20v3h3C5,21.3,3.7,20,2,20z M2,12v2c5,0,9,4,9,9h2C13,16.9,8.1,12,2,12z M17,1L7,1C5.9,1,5,1.9,5,3v7.4c0.7,0.2,1.4,0.4,2,0.6V5h10v13h-3c0.5,1.2,0.8,2.6,0.9,4H17c1.1,0,2-0.9,2-2V3C19,1.9,18.1,1,17,1z"/></g> +<g id="time-to-leave"><path d="M18.9,5c-0.2-0.6-0.8-1-1.4-1h-11C5.8,4,5.3,4.4,5.1,5L3,11v8c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-1h12v1c0,0.6,0.4,1,1,1h1c0.6,0,1-0.4,1-1v-8L18.9,5z M6.5,15C5.7,15,5,14.3,5,13.5S5.7,12,6.5,12C7.3,12,8,12.7,8,13.5S7.3,15,6.5,15z M17.5,15c-0.8,0-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5c0.8,0,1.5,0.7,1.5,1.5S18.3,15,17.5,15z M5,10l1.5-4.5h11L19,10H5z"/></g> +<g id="vibration"><path d="M0,15h2V9H0V15z M3,17h2V7H3V17z M22,9v6h2V9H22z M19,17h2V7h-2V17z M16.5,3h-9C6.7,3,6,3.7,6,4.5v15C6,20.3,6.7,21,7.5,21h9c0.8,0,1.5-0.7,1.5-1.5v-15C18,3.7,17.3,3,16.5,3z M16,19H8V5h8V19z"/></g> +<g id="voice-chat"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,18l4-4h14c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M18,14l-4-3.2V14H6V6h8v3.2L18,6V14z"/></g> +<g id="vpn"><path d="M22,4V3.5C22,2.1,20.9,1,19.5,1C18.1,1,17,2.1,17,3.5V4c-0.6,0-1,0.4-1,1v4c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V5C23,4.4,22.6,4,22,4z M21.2,4h-3.4V3.5c0-0.9,0.8-1.7,1.7-1.7c0.9,0,1.7,0.8,1.7,1.7V4z M18.9,12c0,0.3,0.1,0.7,0.1,1c0,2.1-0.8,4-2.1,5.4c-0.3-0.8-1-1.4-1.9-1.4h-1v-3c0-0.6-0.4-1-1-1H7v-2h2c0.6,0,1-0.4,1-1V8h2c1.1,0,2-0.9,2-2V3.5C13.1,3.2,12,3,11,3C5.5,3,1,7.5,1,13c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10c0-0.3,0-0.7-0.1-1H18.9z M10,20.9c-3.9-0.5-7-3.9-7-7.9c0-0.6,0.1-1.2,0.2-1.8L8,16v1c0,1.1,0.9,2,2,2V20.9z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-icons/png-icons.html b/third_party/polymer/components-chromium/core-icons/png-icons.html new file mode 100644 index 0000000..5347c6b --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/png-icons.html @@ -0,0 +1,19 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<core-iconset id="core-icons" src="../core-action-icons/action-icons.png" width="24" iconSize="24" + icons="drawer menu search dropdown close add trash refresh settings dialoga + left right down up grid contact account plus time marker + briefcase array columns list modules quilt stream maximize shrink sort + shortcut dialog twitter facebook favorite gplus filter tag plusone dots"> + + <property theme="core-light-theme" offsetX="24"></property> + <property theme="core-dark-theme" offsetX="72"></property> +</core-iconset> diff --git a/third_party/polymer/components-chromium/core-icons/social-icons.html b/third_party/polymer/components-chromium/core-icons/social-icons.html new file mode 100644 index 0000000..102c544 --- /dev/null +++ b/third_party/polymer/components-chromium/core-icons/social-icons.html @@ -0,0 +1,52 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="../core-iconset-svg/core-iconset-svg.html"> +<core-iconset-svg id="social" iconSize="24"> +<svg><defs> +<g id="cake"><path d="M12,7c1.1,0,2-0.9,2-2c0-0.4-0.1-0.7-0.3-1L12,1l-1.7,3C10.1,4.3,10,4.6,10,5C10,6.1,10.9,7,12,7z M21,21v-4c0-1.1-0.9-2-2-2h-1v-3c0-1.1-0.9-2-2-2h-3V8h-2v2H8c-1.1,0-2,0.9-2,2v3H5c-1.1,0-2,0.9-2,2v4H1v2h22v-2H21z"/></g> +<g id="circles"><path d="M16.7,15c-0.8,2.3-3,4-5.7,4c-3.3,0-6-2.7-6-6c0-2.6,1.7-4.8,4-5.7C9,7.2,9,7.1,9,7c0-1,0.2-2,0.5-2.9C5.3,4.8,2,8.5,2,13c0,5,4,9,9,9c4.5,0,8.2-3.3,8.9-7.5C19,14.8,18,15,17,15C16.9,15,16.8,15,16.7,15z"/><path d="M17,1c-3.3,0-6,2.7-6,6s2.7,6,6,6c3.3,0,6-2.7,6-6S20.3,1,17,1z M17,10c-1.7,0-3-1.3-3-3s1.3-3,3-3c1.7,0,3,1.3,3,3S18.7,10,17,10z"/></g> +<g id="circles-add"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10s10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z"/><path d="M13,11V8h-2v3H8v2h3v3h2v-3h3v-2H13z"/></g> +<g id="circles-extended"><path d="M12,10c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4C9.8,2,8,3.8,8,6C8,8.2,9.8,10,12,10z M12,4c1.1,0,2,0.9,2,2c0,1.1-0.9,2-2,2c-1.1,0-2-0.9-2-2C10,4.9,10.9,4,12,4z M6,13c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C10,14.8,8.2,13,6,13z M6,19c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C8,18.1,7.1,19,6,19z M12,11.1c-1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9c1,0,1.9-0.9,1.9-1.9S13,11.1,12,11.1z M18,13c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C22,14.8,20.2,13,18,13z M18,19c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C20,18.1,19.1,19,18,19z"/></g> +<g id="communities"><path d="M9,12c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S10.1,12,9,12z M14,9c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2s0.9,2,2,2C13.1,11,14,10.1,14,9z M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8c0-4.4,3.6-8,8-8c4.4,0,8,3.6,8,8C20,16.4,16.4,20,12,20z M15,12c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S16.1,12,15,12z"/></g> +<g id="domain"><path d="M12,7V3H2v18h20V7H12z M6,19H4v-2h2V19z M6,15H4v-2h2V15z M6,11H4V9h2V11z M6,7H4V5h2V7z M10,19H8v-2h2V19z M10,15H8v-2h2V15z M10,11H8V9h2V11z M10,7H8V5h2V7z M20,19h-8v-2h2v-2h-2v-2h2v-2h-2V9h8V19z M18,11h-2v2h2V11z M18,15h-2v2h2V15z"/></g> +<g id="group"><path d="M16,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C13,9.7,14.3,11,16,11z M8,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3C6.3,5,5,6.3,5,8C5,9.7,6.3,11,8,11z M8,13c-2.3,0-7,1.2-7,3.5V19h14v-2.5C15,14.2,10.3,13,8,13z M16,13c-0.3,0-0.6,0-1,0.1c1.2,0.8,2,2,2,3.4V19h6v-2.5C23,14.2,18.3,13,16,13z"/></g> +<g id="group-add"><path d="M8,10H5V7H3v3H0v2h3v3h2v-3h3V10z M18,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-0.3,0-0.6,0.1-0.9,0.1C17.7,6,18,6.9,18,8s-0.3,2-0.9,2.9C17.4,10.9,17.7,11,18,11z M13,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C10,9.7,11.3,11,13,11z M19.6,13.2c0.8,0.7,1.4,1.7,1.4,2.8v2h3v-2C24,14.5,21.6,13.5,19.6,13.2z M13,13c-2,0-6,1-6,3v2h12v-2C19,14,15,13,13,13z"/></g> +<g id="location-city"><path d="M15,11V5l-3-3L9,5v2H3v14h18V11H15z M7,19H5v-2h2V19z M7,15H5v-2h2V15z M7,11H5V9h2V11z M13,19h-2v-2h2V19z M13,15h-2v-2h2V15z M13,11h-2V9h2V11z M13,7h-2V5h2V7z M19,19h-2v-2h2V19z M19,15h-2v-2h2V15z"/></g> +<g id="mood"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10c5.5,0,10-4.5,10-10S17.5,2,12,2z M12,20c-4.4,0-8-3.6-8-8s3.6-8,8-8c4.4,0,8,3.6,8,8S16.4,20,12,20z M15.5,11c0.8,0,1.5-0.7,1.5-1.5S16.3,8,15.5,8S14,8.7,14,9.5S14.7,11,15.5,11z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11z M12,17.5c2.3,0,4.3-1.5,5.1-3.5H6.9C7.7,16,9.7,17.5,12,17.5z"/></g> +<g id="notifications"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z"/></g> +<g id="notifications-none"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z M16,17H7v-6.5C7,8,9,6,11.5,6C14,6,16,8,16,10.5V17z"/></g> +<g id="notifications-off"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,10.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7C9.5,4.3,9,4.5,8.6,4.7l9.4,9.4V10.5z M17.7,19l2,2l1.3-1.3L4.3,3L3,4.3l2.9,2.9C5.3,8.2,5,9.3,5,10.5V16l-2,2v1H17.7z"/></g> +<g id="notifications-on"><path d="M6.6,3.6L5.2,2.2C2.8,4,1.2,6.8,1,10h2C3.2,7.3,4.5,5,6.6,3.6z M20,10h2c-0.2-3.2-1.7-6-4.1-7.8l-1.4,1.4C18.5,5,19.8,7.3,20,10z M18,10.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1l-2-2V10.5z M11.5,22c0.1,0,0.3,0,0.4,0c0.7-0.1,1.2-0.6,1.4-1.2c0.1-0.2,0.2-0.5,0.2-0.8h-4C9.5,21.1,10.4,22,11.5,22z"/></g> +<g id="notifications-paused"><path d="M11.5,22c1.1,0,2-0.9,2-2h-4C9.5,21.1,10.4,22,11.5,22z M18,16v-5.5c0-3.1-2.1-5.6-5-6.3V3.5C13,2.7,12.3,2,11.5,2C10.7,2,10,2.7,10,3.5v0.7c-2.9,0.7-5,3.2-5,6.3V16l-2,2v1h17v-1L18,16z M14,9.8l-2.8,3.4H14V15H9v-1.8l2.8-3.4H9V8h5V9.8z"/></g> +<g id="pages"><path d="M3,5v6h5L7,7l4,1V3H5C3.9,3,3,3.9,3,5z M8,13H3v6c0,1.1,0.9,2,2,2h6v-5l-4,1L8,13z M17,17l-4-1v5h6c1.1,0,2-0.9,2-2v-6l-5,0L17,17z M19,3h-6v5l4-1l-1,4h5V5C21,3.9,20.1,3,19,3z"/></g> +<g id="party-mode"><path d="M20,4h-3.2L15,2H9L7.2,4H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V6C22,4.9,21.1,4,20,4z M12,7c1.6,0,3.1,0.8,4,2h-4c-1.7,0-3,1.3-3,3c0,0.4,0.1,0.7,0.2,1H7.1C7,12.7,7,12.3,7,12C7,9.2,9.2,7,12,7z M12,17c-1.6,0-3.1-0.8-4-2h4c1.7,0,3-1.3,3-3c0-0.4-0.1-0.7-0.2-1h2.1c0.1,0.3,0.1,0.7,0.1,1C17,14.8,14.8,17,12,17z"/></g> +<g id="people"><path d="M16,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3c-1.7,0-3,1.3-3,3C13,9.7,14.3,11,16,11z M8,11c1.7,0,3-1.3,3-3c0-1.7-1.3-3-3-3C6.3,5,5,6.3,5,8C5,9.7,6.3,11,8,11z M8,13c-2.3,0-7,1.2-7,3.5V19h14v-2.5C15,14.2,10.3,13,8,13z M16,13c-0.3,0-0.6,0-1,0.1c1.2,0.8,2,2,2,3.4V19h6v-2.5C23,14.2,18.3,13,16,13z"/></g> +<g id="person"><path d="M12,12c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4C9.8,4,8,5.8,8,8C8,10.2,9.8,12,12,12z M12,14c-2.7,0-8,1.3-8,4v2h16v-2C20,15.3,14.7,14,12,14z"/></g> +<g id="person-add"><path d="M15,12c2.2,0,4-1.8,4-4c0-2.2-1.8-4-4-4c-2.2,0-4,1.8-4,4C11,10.2,12.8,12,15,12z M6,10V7H4v3H1v2h3v3h2v-3h3v-2H6z M15,14c-2.7,0-8,1.3-8,4v2h16v-2C23,15.3,17.7,14,15,14z"/></g> +<g id="person-outline"><path d="M12,5.9c1.2,0,2.1,0.9,2.1,2.1s-0.9,2.1-2.1,2.1S9.9,9.2,9.9,8S10.8,5.9,12,5.9 M12,14.9c3,0,6.1,1.5,6.1,2.1v1.1H5.9V17C5.9,16.4,9,14.9,12,14.9 M12,4C9.8,4,8,5.8,8,8c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,5.8,14.2,4,12,4L12,4z M12,13c-2.7,0-8,1.3-8,4v3h16v-3C20,14.3,14.7,13,12,13L12,13z"/></g> +<g id="plus-one"><polygon points="10,8 8,8 8,12 4,12 4,14 8,14 8,18 10,18 10,14 14,14 14,12 10,12 "/><polygon points="14.5,6.1 14.5,7.9 17,7.4 17,18 19,18 19,5 "/></g> +<g id="poll"><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M9,17H7v-7h2V17z M13,17h-2V7h2V17z M17,17h-2v-4h2V17z"/></g> +<g id="post-blogger"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M16,9v1c0,0.6,0.4,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7,15.8c0,1.1,1,2.2,3,2.2c1.5,0,2.4-1,2.4-2C12.4,15.3,11.9,14.8,10.6,13.8z M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M9.1,19.2c-2.8,0-4.1-1.6-4.1-3c0-0.5,0.1-1.6,1.5-2.4c0.8-0.5,1.8-0.8,3.1-0.9c-0.2-0.2-0.3-0.5-0.3-1c0-0.2,0-0.3,0.1-0.5H9c-2,0-3.2-1.5-3.2-3c0-1.7,1.3-3.6,4.1-3.6h4.2l-0.3,0.3l-0.7,0.7L13,5.9h-0.7c0.4,0.4,0.9,1.1,0.9,2.2c0,1.4-0.7,2.1-1.6,2.7c-0.2,0.1-0.4,0.4-0.4,0.7c0,0.3,0.2,0.5,0.4,0.6c0.1,0.1,0.3,0.2,0.5,0.3c0.8,0.6,1.9,1.3,1.9,2.9C14,17.1,12.7,19.2,9.1,19.2z M19,12h-2v2h-1v-2h-2v-1h2V9h1v2h2V12z"/></g> +<g id="post-instagram"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M12,8c2.2,0,4,1.8,4,4s-1.8,4-4,4c-2.2,0-4-1.8-4-4S9.8,8,12,8z M4.5,20C4.2,20,4,19.8,4,19.5V11h2.1C6,11.3,6,11.7,6,12c0,3.3,2.7,6,6,6c3.3,0,6-2.7,6-6c0-0.3,0-0.7-0.1-1H20v8.5c0,0.3-0.2,0.5-0.5,0.5H4.5z M20,6.5C20,6.8,19.8,7,19.5,7h-2C17.2,7,17,6.8,17,6.5v-2C17,4.2,17.2,4,17.5,4h2C19.8,4,20,4.2,20,4.5V6.5z"/></g> +<g id="post-linkedin"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M8,19H5v-9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H13v3h3V11z"/></g> +<g id="post-twitter"><path d="M20,2H4C2.9,2,2,2.9,2,4l0,16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M17.7,9.3c-0.1,4.6-3,7.8-7.4,8c-1.8,0.1-3.1-0.5-4.3-1.2c1.3,0.2,3-0.3,3.9-1.1c-1.3-0.1-2.1-0.8-2.5-1.9c0.4,0.1,0.8,0,1.1,0c-1.2-0.4-2-1.1-2.1-2.7c0.3,0.2,0.7,0.3,1.1,0.3c-0.9-0.5-1.5-2.4-0.8-3.6c1.3,1.4,2.9,2.6,5.5,2.8c-0.7-2.8,3.1-4.3,4.6-2.4c0.7-0.1,1.2-0.4,1.7-0.6c-0.2,0.7-0.6,1.1-1.1,1.5c0.5-0.1,1-0.2,1.4-0.4C18.7,8.5,18.2,8.9,17.7,9.3z"/></g> +<g id="public"><path d="M12,2C6.5,2,2,6.5,2,12c0,5.5,4.5,10,10,10c5.5,0,10-4.5,10-10C22,6.5,17.5,2,12,2z M11,19.9c-3.9-0.5-7-3.9-7-7.9c0-0.6,0.1-1.2,0.2-1.8L9,15v1c0,1.1,0.9,2,2,2V19.9z M17.9,17.4c-0.3-0.8-1-1.4-1.9-1.4h-1v-3c0-0.6-0.4-1-1-1H8v-2h2c0.6,0,1-0.4,1-1V7h2c1.1,0,2-0.9,2-2V4.6c2.9,1.2,5,4.1,5,7.4C20,14.1,19.2,16,17.9,17.4z"/></g> +<g id="school"><path d="M5,13.2v4l7,3.8l7-3.8v-4L12,17L5,13.2z M12,3L1,9l11,6l9-4.9V17h2V9L12,3z"/></g> +<g id="share"><path d="M21,11l-7-7v4C7,9,4,14,3,19c2.5-3.5,6-5.1,11-5.1V18L21,11z"/></g> +<g id="share-alt"><path d="M18,16.1c-0.8,0-1.5,0.3-2,0.8l-7.1-4.2C9,12.5,9,12.2,9,12s0-0.5-0.1-0.7L16,7.2C16.5,7.7,17.2,8,18,8c1.7,0,3-1.3,3-3s-1.3-3-3-3s-3,1.3-3,3c0,0.2,0,0.5,0.1,0.7L8,9.8C7.5,9.3,6.8,9,6,9c-1.7,0-2.9,1.2-2.9,2.9c0,1.7,1.3,3,3,3c0.8,0,1.5-0.3,2-0.8l7.1,4.2c-0.1,0.3-0.1,0.5-0.1,0.7c0,1.6,1.3,2.9,2.9,2.9s2.9-1.3,2.9-2.9S19.6,16.1,18,16.1z"/></g> +<g id="whatshot"><path d="M13.5,0.7c0,0,0.7,2.6,0.7,4.8c0,2.1-1.4,3.7-3.4,3.7c-2.1,0-3.6-1.7-3.6-3.7l0-0.4C5.2,7.5,4,10.6,4,14c0,4.4,3.6,8,8,8c4.4,0,8-3.6,8-8C20,8.6,17.4,3.8,13.5,0.7z M11.7,19c-1.8,0-3.2-1.4-3.2-3.1c0-1.6,1-2.8,2.8-3.1c1.8-0.4,3.6-1.2,4.6-2.6c0.4,1.3,0.6,2.6,0.6,4C16.5,16.8,14.4,19,11.7,19z"/></g> +</defs></svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-iconset-svg/.bower.json b/third_party/polymer/components-chromium/core-iconset-svg/.bower.json new file mode 100644 index 0000000..ebf9400 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-iconset-svg", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-iconset-svg", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "383b57cc78b2065c113e839713b0b97688f6bade" + }, + "_source": "git://github.com/Polymer/core-iconset-svg.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-iconset-svg" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset-svg/README.md b/third_party/polymer/components-chromium/core-iconset-svg/README.md new file mode 100644 index 0000000..5e4b048 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/README.md @@ -0,0 +1,4 @@ +core-iconset-svg +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset-svg) for more information. diff --git a/third_party/polymer/components-chromium/core-iconset-svg/bower.json b/third_party/polymer/components-chromium/core-iconset-svg/bower.json new file mode 100644 index 0000000..50978ac --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-iconset-svg", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg-extracted.js b/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg-extracted.js new file mode 100644 index 0000000..a443ed2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg-extracted.js @@ -0,0 +1,113 @@ + + + Polymer('core-iconset-svg', { + + + /** + * The size of an individual icon. Note that icons must be square. + * + * @attribute iconSize + * @type number + * @default 24 + */ + iconSize: 24, + type: 'iconset', + + created: function() { + this._icons = {}; + }, + + ready: function() { + this.super(); + this.updateIcons(); + }, + + iconById: function(id) { + return this._icons[id] || (this._icons[id] = this.querySelector('#' + id)); + }, + + cloneIcon: function(id) { + var icon = this.iconById(id); + if (icon) { + var content = icon.cloneNode(true); + content.removeAttribute('id'); + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('viewBox', '0 0 ' + this.iconSize + ' ' + + this.iconSize); + // NOTE(dfreedm): work around https://crbug.com/370136 + svg.style.pointerEvents = 'none'; + svg.appendChild(content); + return svg; + } + }, + + get iconNames() { + if (!this._iconNames) { + this._iconNames = this.findIconNames(); + } + return this._iconNames; + }, + + findIconNames: function() { + var icons = this.querySelectorAll('[id]').array(); + if (icons.length) { + return icons.map(function(n){ return n.id }); + } + }, + + /** + * Applies an icon to the given element. The svg icon is added to the + * element's shadowRoot if one exists or directly to itself. + * + * @method applyIcon + * @param {Element} element The element to which the icon is + * applied. + * @param {String|Number} icon The name the icon to apply. + * @return {Element} The icon element + */ + applyIcon: function(element, icon) { + var root = element; + // remove old + var old = root.querySelector('svg'); + if (old) { + old.remove(); + } + // install new + var svg = this.cloneIcon(icon); + if (!svg) { + return; + } + svg.setAttribute('height', '100%'); + svg.setAttribute('width', '100%'); + svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); + svg.style.display = 'block'; + root.insertBefore(svg, root.firstElementChild); + return svg; + }, + + /** + * Tell users of the iconset, that the set has loaded. + * This finds all elements matching the selector argument and calls + * the method argument on them. + * @method updateIcons + * @param selector {string} css selector to identify iconset users, + * defaults to '[icon]' + * @param method {string} method to call on found elements, + * defaults to 'updateIcon' + */ + updateIcons: function(selector, method) { + selector = selector || '[icon]'; + method = method || 'updateIcon'; + var deep = window.ShadowDOMPolyfill ? '' : 'html /deep/ '; + var i$ = document.querySelectorAll(deep + selector); + for (var i=0, e; e=i$[i]; i++) { + if (e[method]) { + e[method].call(e); + } + } + } + + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg.html b/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg.html new file mode 100644 index 0000000..da2d7cf --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/core-iconset-svg.html @@ -0,0 +1,57 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Polymer Core Elements + * + * The `core-iconset-svg` element allows users to define their own icon sets + * that contain svg icons. The svg icon elements should be children of the + * `core-iconset-svg` element. Multiple icons should be given distinct id's. + * + * Using svg elements to create icons has a few advantages over traditional + * bitmap graphics like jpg or png. Icons that use svg are vector based so they + * are resolution independent and should look good on any device. They are + * stylable via css. Icons can be themed, colorized, and even animated. + * + * Example: + * + * <core-iconset-svg id="my-svg-icons" iconSize="24"> + * <svg> + * <defs> + * <g id="shape"> + * <rect x="50" y="50" width="50" height="50" /> + * <circle cx="50" cy="50" r="50" /> + * </g> + * </defs> + * </svg> + * </core-iconset-svg> + * + * This will automatically register the icon set "my-svg-icons" to the iconset + * database. To use these icons from within another element, make a + * `core-iconset` element and call the `byId` method + * to retrieve a given iconset. To apply a particular icon inside an + * element use the `applyIcon` method. For example: + * + * iconset.applyIcon(iconNode, 'car'); + * + * @element core-iconset-svg + * @extends core-meta + * @homepage github.io + */ +--> + +<link rel="import" href="../core-iconset/core-iconset.html"> + +<polymer-element name="core-iconset-svg" extends="core-meta" attributes="iconSize" assetpath=""> + + + +</polymer-element> +<script src="core-iconset-svg-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset-svg/demo.html b/third_party/polymer/components-chromium/core-iconset-svg/demo.html new file mode 100644 index 0000000..5995cd6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/demo.html @@ -0,0 +1,66 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<html> +<head> + + <title>core-iconset-svg</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="svg-sample-icons.html"> + <style shim-shadowdom> + .embiggen core-icon { + height: 128px; + width: 128px; + } + + core-icon:nth-of-type(1) { + fill: orange; + } + + core-icon:nth-of-type(2) { + fill: green; + stroke: orange; + } + + core-icon:nth-of-type(3) { + fill: navy; + } + + core-icon { + transition: all 0.5s; + -webkit-transition: all 0.5s; + } + + core-icon:hover { + -webkit-filter: drop-shadow( 2px 2px 2px #333 ); + filter: drop-shadow( 2px 2px 2px #333 ); + } + </style> +</head> +<body unresolved> + + <template is="auto-binding"> + <div class="embiggen"> + <template repeat="{{icon in icons}}"> + <core-icon icon="{{icon}}"></core-icon> + </template> + </div> + <core-meta id="meta" type="iconset"></core-meta> + </template> + <script> + addEventListener('template-bound', function(e) { + var template = e.target; + var setName = 'svg-sample-icons'; + var icons = template.$.meta.byId(setName).iconNames; + template.icons = icons.map(function(ic){ return setName + ':' +ic }); + }); + </script> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-iconset-svg/index.html b/third_party/polymer/components-chromium/core-iconset-svg/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-iconset-svg/svg-sample-icons.html b/third_party/polymer/components-chromium/core-iconset-svg/svg-sample-icons.html new file mode 100644 index 0000000..9f5ef3d --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset-svg/svg-sample-icons.html @@ -0,0 +1,68 @@ + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="core-iconset-svg.html"> + +<core-iconset-svg id="svg-sample-icons" iconSize="100"> + <svg> + <defs> + <g id="codepen"> + <path class="outer-ring" d="M50,0C22.385,0,0,22.385,0,50c0,27.615,22.385,50,50,50c27.614,0,50-22.385,50-50C100,22.385,77.615,0,50,0z M50,91.789 + C26.958,91.789,8.212,73.042,8.212,50C8.212,26.958,26.958,8.212,50,8.212c23.042,0,41.788,18.747,41.788,41.789 + C91.788,73.042,73.042,91.789,50,91.789z"></path> + <path class="inner-logo" d="M80.893,40.234c-0.006-0.039-0.016-0.076-0.022-0.115c-0.013-0.075-0.027-0.15-0.046-0.223 + c-0.012-0.044-0.028-0.086-0.042-0.128c-0.021-0.065-0.042-0.13-0.068-0.193c-0.018-0.044-0.039-0.088-0.059-0.13 + c-0.028-0.06-0.057-0.119-0.09-0.175c-0.024-0.042-0.051-0.083-0.076-0.124c-0.036-0.055-0.073-0.109-0.112-0.161 + c-0.029-0.039-0.06-0.078-0.091-0.115c-0.042-0.049-0.086-0.098-0.132-0.143c-0.035-0.036-0.069-0.072-0.106-0.104 + c-0.049-0.044-0.099-0.086-0.15-0.127c-0.04-0.031-0.079-0.062-0.12-0.091c-0.016-0.01-0.029-0.023-0.044-0.033L51.474,19.531 + c-0.893-0.595-2.055-0.595-2.947,0L20.267,38.371c-0.015,0.01-0.028,0.023-0.044,0.033c-0.042,0.029-0.081,0.06-0.12,0.091 + c-0.052,0.041-0.102,0.083-0.15,0.127c-0.037,0.032-0.071,0.068-0.106,0.104c-0.046,0.045-0.09,0.094-0.132,0.143 + c-0.031,0.038-0.062,0.077-0.092,0.115c-0.039,0.052-0.076,0.106-0.111,0.161c-0.027,0.041-0.052,0.082-0.076,0.124 + c-0.033,0.057-0.062,0.115-0.09,0.175c-0.021,0.042-0.042,0.086-0.06,0.13c-0.026,0.063-0.047,0.128-0.068,0.193 + c-0.014,0.042-0.029,0.084-0.042,0.128c-0.02,0.073-0.032,0.148-0.046,0.223c-0.006,0.039-0.016,0.076-0.021,0.115 + c-0.016,0.114-0.024,0.229-0.024,0.346V59.42c0,0.117,0.009,0.233,0.024,0.348c0.005,0.038,0.015,0.077,0.021,0.114 + c0.014,0.075,0.027,0.149,0.046,0.223c0.012,0.043,0.028,0.086,0.042,0.128c0.021,0.065,0.042,0.13,0.068,0.195 + c0.018,0.044,0.039,0.086,0.06,0.129c0.028,0.06,0.058,0.118,0.09,0.177c0.024,0.041,0.049,0.082,0.076,0.122 + c0.035,0.056,0.072,0.109,0.111,0.161c0.029,0.041,0.061,0.078,0.092,0.115c0.042,0.049,0.086,0.098,0.132,0.144 + c0.035,0.036,0.069,0.071,0.106,0.104c0.048,0.044,0.099,0.086,0.15,0.127c0.039,0.031,0.078,0.062,0.12,0.091 + c0.016,0.01,0.029,0.023,0.044,0.032l28.259,18.84c0.446,0.297,0.96,0.447,1.474,0.447c0.513,0,1.027-0.149,1.473-0.447 + l28.259-18.84c0.015-0.009,0.028-0.022,0.044-0.032c0.042-0.029,0.081-0.06,0.12-0.091c0.051-0.041,0.102-0.083,0.15-0.127 + c0.037-0.033,0.071-0.068,0.106-0.104c0.046-0.046,0.09-0.095,0.132-0.144c0.031-0.037,0.062-0.075,0.091-0.115 + c0.04-0.052,0.076-0.105,0.112-0.161c0.025-0.041,0.051-0.081,0.076-0.122c0.033-0.059,0.062-0.117,0.09-0.177 + c0.02-0.042,0.041-0.085,0.059-0.129c0.026-0.065,0.047-0.13,0.068-0.195c0.014-0.042,0.03-0.085,0.042-0.128 + c0.02-0.074,0.033-0.148,0.046-0.223c0.006-0.037,0.016-0.076,0.022-0.114c0.014-0.115,0.023-0.231,0.023-0.348V40.581 + C80.916,40.464,80.907,40.348,80.893,40.234z M52.657,26.707l20.817,13.877l-9.298,6.221l-11.519-7.706V26.707z M47.343,26.707 + v12.393l-11.518,7.706l-9.299-6.221L47.343,26.707z M24.398,45.554L31.046,50l-6.648,4.446V45.554z M47.343,73.294L26.525,59.417 + l9.299-6.219l11.518,7.704V73.294z M50,56.286L40.603,50L50,43.715L59.397,50L50,56.286z M52.657,73.294V60.902l11.519-7.704 + l9.298,6.219L52.657,73.294z M75.602,54.447L68.955,50l6.647-4.446V54.447z"></path> + </g> + + <path id="twitter" d="M100.001,17.942c-3.681,1.688-7.633,2.826-11.783,3.339 + c4.236-2.624,7.49-6.779,9.021-11.73c-3.965,2.432-8.354,4.193-13.026,5.146C80.47,10.575,75.138,8,69.234,8 + c-11.33,0-20.518,9.494-20.518,21.205c0,1.662,0.183,3.281,0.533,4.833c-17.052-0.884-32.168-9.326-42.288-22.155 + c-1.767,3.133-2.778,6.773-2.778,10.659c0,7.357,3.622,13.849,9.127,17.65c-3.363-0.109-6.525-1.064-9.293-2.651 + c-0.002,0.089-0.002,0.178-0.002,0.268c0,10.272,7.072,18.845,16.458,20.793c-1.721,0.484-3.534,0.744-5.405,0.744 + c-1.322,0-2.606-0.134-3.859-0.379c2.609,8.424,10.187,14.555,19.166,14.726c-7.021,5.688-15.867,9.077-25.48,9.077 + c-1.656,0-3.289-0.102-4.895-0.297C9.08,88.491,19.865,92,31.449,92c37.737,0,58.374-32.312,58.374-60.336 + c0-0.92-0.02-1.834-0.059-2.743C93.771,25.929,97.251,22.195,100.001,17.942L100.001,17.942z"></path> + + <g id="youtube"> + <path class="youtube" d="M98.77,27.492c-1.225-5.064-5.576-8.799-10.811-9.354C75.561,16.818,63.01,15.993,50.514,16 + c-12.495-0.007-25.045,0.816-37.446,2.139c-5.235,0.557-9.583,4.289-10.806,9.354C0.522,34.704,0.5,42.574,0.5,50.001 + c0,7.426,0,15.296,1.741,22.509c1.224,5.061,5.572,8.799,10.807,9.352c12.399,1.32,24.949,2.145,37.446,2.14 + c12.494,0.005,25.047-0.817,37.443-2.14c5.234-0.555,9.586-4.291,10.81-9.352c1.741-7.213,1.753-15.083,1.753-22.509 + S100.51,34.704,98.77,27.492 M67.549,52.203L43.977,64.391c-2.344,1.213-4.262,0.119-4.262-2.428V38.036 + c0-2.548,1.917-3.644,4.262-2.429l23.572,12.188C69.896,49.008,69.896,50.992,67.549,52.203"></path> + </g> + + </defs> + </svg> +</core-iconset-svg> diff --git a/third_party/polymer/components-chromium/core-iconset/.bower.json b/third_party/polymer/components-chromium/core-iconset/.bower.json new file mode 100644 index 0000000..81af334 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "core-iconset", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-iconset", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "76bf6beb0e7ffc1b67485ab2dc13b188915e8233" + }, + "_source": "git://github.com/Polymer/core-iconset.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-iconset" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset/README.md b/third_party/polymer/components-chromium/core-iconset/README.md new file mode 100644 index 0000000..7a3a217 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/README.md @@ -0,0 +1,4 @@ +core-iconset +============ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset) for more information. diff --git a/third_party/polymer/components-chromium/core-iconset/bower.json b/third_party/polymer/components-chromium/core-iconset/bower.json new file mode 100644 index 0000000..d783d98 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/bower.json @@ -0,0 +1,9 @@ +{ + "name": "core-iconset", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/core-iconset.html b/third_party/polymer/components-chromium/core-iconset/core-iconset-extracted.js index 7ab2d34..a56841b 100644 --- a/third_party/polymer/components/core-iconset-svg/core-iconset.html +++ b/third_party/polymer/components-chromium/core-iconset/core-iconset-extracted.js @@ -1,68 +1,4 @@ -<!-- -Copyright (c) 2014 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt ---> -<!-- -/** - * @group Polymer Core Elements - * - * The `core-iconset` element allows users to define their own icon sets. - * The `src` property specifies the url of the icon image. Multiple icons may - * be included in this image and they may be organized into rows. - * The `icons` property is a space separated list of names corresponding to the - * icons. The names must be ordered as the icons are ordered in the icon image. - * Icons are expected to be square and are the size specified by the `iconSize` - * property. The `width` property corresponds to the width of the icon image - * and must be specified if icons are arranged into multiple rows in the image. - * - * All `core-iconset` elements are available for use by other `core-iconset` - * elements via a database keyed by id. Typically, an element author that wants - * to support a set of custom icons uses a `core-iconset` to retrieve - * and use another, user-defined iconset. - * - * Example: - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * </core-iconset> - * - * This will automatically register the icon set "my-icons" to the iconset - * database. To use these icons from within another element, make a - * `core-iconset` element and call the `byId` method to retrieve a - * given iconset. To apply a particular icon to an element, use the - * `applyIcon` method. For example: - * - * iconset.applyIcon(iconNode, 'car'); - * - * Themed icon sets are also supported. The `core-iconset` can contain child - * `property` elements that specify a theme with an offsetX and offsetY of the - * theme within the icon resource. For example. - * - * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - * icons="location place starta stopb bus car train walk"> - * <property theme="special" offsetX="256" offsetY="24"></property> - * </core-iconset> - * - * Then a themed icon can be applied like this: - * - * iconset.applyIcon(iconNode, 'car', 'special'); - * - * @element core-iconset - * @extends core-meta - * @homepage github.io - */ ---> - -<link rel="import" href="../core-meta/core-meta.html"> - -<polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize"> - - <script> Polymer('core-iconset', { @@ -236,6 +172,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); - </script> - -</polymer-element> +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset/core-iconset.html b/third_party/polymer/components-chromium/core-iconset/core-iconset.html new file mode 100644 index 0000000..f17d66f --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/core-iconset.html @@ -0,0 +1,68 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Polymer Core Elements + * + * The `core-iconset` element allows users to define their own icon sets. + * The `src` property specifies the url of the icon image. Multiple icons may + * be included in this image and they may be organized into rows. + * The `icons` property is a space separated list of names corresponding to the + * icons. The names must be ordered as the icons are ordered in the icon image. + * Icons are expected to be square and are the size specified by the `iconSize` + * property. The `width` property corresponds to the width of the icon image + * and must be specified if icons are arranged into multiple rows in the image. + * + * All `core-iconset` elements are available for use by other `core-iconset` + * elements via a database keyed by id. Typically, an element author that wants + * to support a set of custom icons uses a `core-iconset` to retrieve + * and use another, user-defined iconset. + * + * Example: + * + * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" + * icons="location place starta stopb bus car train walk"> + * </core-iconset> + * + * This will automatically register the icon set "my-icons" to the iconset + * database. To use these icons from within another element, make a + * `core-iconset` element and call the `byId` method to retrieve a + * given iconset. To apply a particular icon to an element, use the + * `applyIcon` method. For example: + * + * iconset.applyIcon(iconNode, 'car'); + * + * Themed icon sets are also supported. The `core-iconset` can contain child + * `property` elements that specify a theme with an offsetX and offsetY of the + * theme within the icon resource. For example. + * + * <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" + * icons="location place starta stopb bus car train walk"> + * <property theme="special" offsetX="256" offsetY="24"></property> + * </core-iconset> + * + * Then a themed icon can be applied like this: + * + * iconset.applyIcon(iconNode, 'car', 'special'); + * + * @element core-iconset + * @extends core-meta + * @homepage github.io + */ +--> + +<link rel="import" href="../core-meta/core-meta.html"> + +<polymer-element name="core-iconset" extends="core-meta" attributes="src width icons iconSize" assetpath=""> + + + +</polymer-element> +<script src="core-iconset-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-iconset/demo.html b/third_party/polymer/components-chromium/core-iconset/demo.html new file mode 100644 index 0000000..82ea67a --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/demo.html @@ -0,0 +1,62 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<html> +<head> + + <title>core-iconset</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-iconset.html"> + <link rel="import" href="../core-icon/core-icon.html"> + +</head> +<body unresolved> + + <!-- Register an icon set; you can do this anywhere, including an HTMLImport! --> + <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" + icons="location place starta stopb bus car train walk"> + </core-iconset> + + <core-iconset id="my-icons-big" src="my-icons-big.png" width="192" iconSize="48" + icons="location place starta stopb bus car train walk"> + </core-iconset> + + <!-- Now create a bunch of icons using our iconset --> + <core-icon icon="my-icons:location"></core-icon> + <core-icon icon="my-icons:place"></core-icon> + <core-icon icon="my-icons:starta"></core-icon> + <core-icon icon="my-icons:stopb"></core-icon> + <core-icon icon="my-icons:bus"></core-icon> + <core-icon icon="my-icons:car"></core-icon> + <core-icon icon="my-icons:train"></core-icon> + <core-icon icon="my-icons:walk"></core-icon> + <br> + <!-- icons may also be specified by index --> + <style> + .embiggen core-icon { + width: 48px; + height: 48px; + } + </style> + + <div class="embiggen"> + <core-icon icon="my-icons-big:0"></core-icon> + <core-icon icon="my-icons-big:1"></core-icon> + <core-icon icon="my-icons-big:2"></core-icon> + <core-icon icon="my-icons-big:3"></core-icon> + <core-icon icon="my-icons-big:4"></core-icon> + <core-icon icon="my-icons-big:5"></core-icon> + <core-icon icon="my-icons-big:6"></core-icon> + <core-icon icon="my-icons-big:7"></core-icon> + </div> + + </body> +</html> diff --git a/third_party/polymer/components-chromium/core-iconset/index.html b/third_party/polymer/components-chromium/core-iconset/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-iconset/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components/core-iconset-svg/my-icons-big.png b/third_party/polymer/components-chromium/core-iconset/my-icons-big.png Binary files differindex f019f3f..f019f3f 100644 --- a/third_party/polymer/components/core-iconset-svg/my-icons-big.png +++ b/third_party/polymer/components-chromium/core-iconset/my-icons-big.png diff --git a/third_party/polymer/components/core-iconset-svg/my-icons.png b/third_party/polymer/components-chromium/core-iconset/my-icons.png Binary files differindex a7d223b..a7d223b 100644 --- a/third_party/polymer/components/core-iconset-svg/my-icons.png +++ b/third_party/polymer/components-chromium/core-iconset/my-icons.png diff --git a/third_party/polymer/components-chromium/core-input/.bower.json b/third_party/polymer/components-chromium/core-input/.bower.json new file mode 100644 index 0000000..2f1a23b --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/.bower.json @@ -0,0 +1,17 @@ +{ + "name": "core-input", + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-input", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "03b52ae6a53a554f315311921e9aafb9448e21b0" + }, + "_source": "git://github.com/Polymer/core-input.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-input" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-input/README.md b/third_party/polymer/components-chromium/core-input/README.md new file mode 100644 index 0000000..ca86fcb --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/README.md @@ -0,0 +1,2 @@ +core-input +========== diff --git a/third_party/polymer/components-chromium/core-input/bower.json b/third_party/polymer/components-chromium/core-input/bower.json new file mode 100644 index 0000000..2513292 --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/bower.json @@ -0,0 +1,6 @@ +{ + "name": "core-input", + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-input/core-input-extracted.js b/third_party/polymer/components-chromium/core-input/core-input-extracted.js new file mode 100644 index 0000000..d64cbd3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/core-input-extracted.js @@ -0,0 +1,324 @@ + + + Polymer('core-input', { + publish: { + /** + * Placeholder text that hints to the user what can be entered in + * the input. + * + * @attribute placeholder + * @type string + * @default '' + */ + placeholder: '', + + /** + * If true, this input cannot be focused and the user cannot change + * its value. + * + * @attribute disabled + * @type boolean + * @default false + */ + disabled: false, + + /** + * If true, the user cannot modify the value of the input. + * + * @attribute readonly + * @type boolean + * @default false + */ + readonly: false, + + /** + * If true, this input will automatically gain focus on page load. + * + * @attribute autofocus + * @type boolean + * @default false + */ + autofocus: false, + + /** + * If true, this input accepts multi-line input like a `<textarea>` + * + * @attribute multiline + * @type boolean + * @default false + */ + multiline: false, + + /** + * (multiline only) The height of this text input in rows. The input + * will scroll internally if more input is entered beyond the size + * of the component. This property is meaningless if multiline is + * false. You can also set this property to "fit" and size the + * component with CSS to make the input fit the CSS size. + * + * @attribute rows + * @type number|'fit' + * @default 'fit' + */ + rows: 'fit', + + /** + * The current value of this input. Changing inputValue programmatically + * will cause value to be out of sync. Instead, change value directly + * or call commit() after changing inputValue. + * + * @attribute inputValue + * @type string + * @default '' + */ + inputValue: '', + + /** + * The value of the input committed by the user, either by changing the + * inputValue and blurring the input, or by hitting the `enter` key. + * + * @attribute value + * @type string + * @default '' + */ + value: '', + + /** + * Set the input type. Not supported for `multiline`. + * + * @attribute type + * @type string + * @default text + */ + type: 'text', + + /** + * If true, the input is invalid if its value is null. + * + * @attribute required + * @type boolean + * @default false + */ + required: false, + + /** + * A regular expression to validate the input value against. See + * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes + * for more info. Not supported if `multiline` is true. + * + * @attribute pattern + * @type string + * @default '.*' + */ + // FIXME(yvonne): The default is set to .* because we can't bind to pattern such + // that the attribute is unset if pattern is null. + pattern: '.*', + + /** + * If set, the input is invalid if the value is less than this property. See + * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes + * for more info. Not supported if `multiline` is true. + * + * @attribute min + */ + min: null, + + /** + * If set, the input is invalid if the value is greater than this property. See + * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes + * for more info. Not supported if `multiline` is true. + * + * @attribute max + */ + max: null, + + /** + * If set, the input is invalid if the value is not `min` plus an integral multiple + * of this property. See + * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation#Validation-related_attributes + * for more info. Not supported if `multiline` is true. + * + * @attribute step + */ + step: null, + + /** + * The maximum length of the input value. + * + * @attribute maxlength + * @type number + */ + maxlength: null, + + /** + * If this property is true, the text input's inputValue failed validation. + * + * @attribute invalid + * @type boolean + * @default false + */ + invalid: false + }, + + ready: function() { + this.handleTabindex(this.getAttribute('tabindex')); + }, + + invalidChanged: function() { + this.classList.toggle('invalid', this.invalid); + this.fire('input-'+ (this.invalid ? 'invalid' : 'valid'), {value: this.inputValue}); + }, + + inputValueChanged: function() { + this.updateValidity_(); + }, + + valueChanged: function() { + this.inputValue = this.value; + }, + + requiredChanged: function() { + this.updateValidity_(); + }, + + attributeChanged: function(attr, oldVal, curVal) { + if (attr === 'tabindex') { + this.handleTabindex(curVal); + } + }, + + handleTabindex: function(tabindex) { + if (tabindex > 0) { + this.$.input.setAttribute('tabindex', -1); + } else { + this.$.input.removeAttribute('tabindex'); + } + }, + + /** + * Commits the inputValue to value. + * + * @method commit + */ + commit: function() { + this.value = this.inputValue; + }, + + updateValidity_: function() { + if (this.$.input.willValidate) { + this.invalid = !this.$.input.validity.valid; + } + }, + + keydownAction: function() { + // for type = number, the value is the empty string unless the input is a valid number. + // FIXME(yvonne): check other types + if (this.type === 'number') { + this.async(function() { + this.updateValidity_(); + }); + } + }, + + inputChangeAction: function() { + this.commit(); + if (!window.ShadowDOMPolyfill) { + // re-fire event that does not bubble across shadow roots + this.fire('change', null, this); + } + }, + + focusAction: function(e) { + if (this.getAttribute('tabindex') > 0) { + // Forward focus to the inner input if tabindex is set on the element + // This will not cause an infinite loop because focus will not fire on the <input> + // again if it's already focused. + this.$.input.focus(); + } + }, + + inputFocusAction: function(e) { + if (window.ShadowDOMPolyfill) { + // re-fire non-bubbling event if polyfill + this.fire('focus', null, this, false); + } + }, + + inputBlurAction: function() { + if (window.ShadowDOMPolyfill) { + // re-fire non-bubbling event + this.fire('blur', null, this, false); + } + }, + + blur: function() { + // forward blur method to the internal input / textarea element + this.$.input.blur(); + }, + + click: function() { + // forward click method to the internal input / textarea element + this.$.input.click(); + }, + + focus: function() { + // forward focus method to the internal input / textarea element + this.$.input.focus(); + }, + + select: function() { + // forward select method to the internal input / textarea element + this.$.input.focus(); + }, + + setSelectionRange: function(selectionStart, selectionEnd, selectionDirection) { + // forward setSelectionRange method to the internal input / textarea element + this.$.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection); + }, + + setRangeText: function(replacement, start, end, selectMode) { + // forward setRangeText method to the internal input element + if (!this.multiline) { + this.$.input.setRangeText(replacement, start, end, selectMode); + } + }, + + stepDown: function(n) { + // forward stepDown method to the internal input element + if (!this.multiline) { + this.$.input.stepDown(n); + } + }, + + stepUp: function(n) { + // forward stepUp method to the internal input element + if (!this.multiline) { + this.$.input.stepUp(n); + } + }, + + get willValidate() { + return this.$.input.willValidate; + }, + + get validity() { + return this.$.input.validity; + }, + + get validationMessage() { + return this.$.input.validationMessage; + }, + + checkValidity: function() { + var r = this.$.input.checkValidity(); + this.updateValidity_(); + return r; + }, + + setCustomValidity: function(message) { + this.$.input.setCustomValidity(message); + this.updateValidity_(); + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-input/core-input.css b/third_party/polymer/components-chromium/core-input/core-input.css new file mode 100644 index 0000000..7303061 --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/core-input.css @@ -0,0 +1,35 @@ +:host { + display: inline-block; + text-align: inherit; + color: #ccc; + position: relative; + width: 20em; +} + +:host:hover { + cursor: text; +} + +input, +textarea { + font: inherit; + width: 100%; + margin: 0; + padding: 0; + background-color: transparent; + border: none; + outline: none; + width: 100%; +} + +textarea { + resize: none; +} + +textarea[fit] { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-input/core-input.html b/third_party/polymer/components-chromium/core-input/core-input.html new file mode 100644 index 0000000..0a5ad7e --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/core-input.html @@ -0,0 +1,110 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> + +<!-- +/** + * core-input is an unstyled single- or multi-line text field where user can + * enter input. + * + * Example: + * + * <core-input placeholder="Placeholder text here"></core-input> + * + * <core-input multiline placeholder="Enter multiple lines here"></core-input> + * + * The text input's value is considered "committed" if the user hits the "enter" + * key or blurs the input after changing the value. The `change` event is fired + * when the value becomes committed, and the committed value is stored in the + * `value` property. The current value of the input is stored in the `inputValue` + * property. + * + * Validation + * ---------- + * + * core-input can optionally validate the value using the HTML5 constraints API, + * similar to native inputs. There are two methods to enable input validation: + * + * 1. By setting the `type` attribute. For example, setting it to `email` will + * check the value is a valid email, and setting it to `number` will check + * the input is a number. + * + * 2. By setting attributes related to validation. The attributes are `pattern`, + * `min`, `max`, `step` and `required`. + * + * Only `required` is supported for multiline inputs currently. + * + * Example: + * + * <core-input type="email" placeholder="enter your email"></core-input> + * + * <core-input type="number" min="5" placeholder="enter a number greater than or equal to 5"></core-input> + * + * <core-input pattern=".*abc.*" placeholder="enter something containing 'abc'"></core-input> + * + * See https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation + * for more info on validation. + * + * @group Polymer Core Elements + * @element core-input + * @homepage github.io + */ +--> + +<!-- +Fired when the inputValue of is changed. This is the same event as the DOM +"input" event. + +@event input +--> + +<!-- +Fired when the user commits the value of the input, either by the hitting the +`enter` key or blurring the input after the changing the inputValue. Also see the +DOM "change" event. + +@event change +--> + +<!-- +Fired when the inputValue of this text input changes and fails validation. + +@event input-invalid +@param {Object} detail +@param {string} value The text input's inputValue. +--> + +<!-- +Fired when the inputValue of this text input changes and passes validation. + +@event input-valid +@param {Object} detail +@param {string} value The text input's inputValue. +--> +<link href="../polymer/polymer.html" rel="import"> + +<polymer-element name="core-input" on-focus="{{focusAction}}" assetpath=""> + + <template> + + <link href="core-input.css" rel="stylesheet"> + + <template if="{{multiline}}"> + <textarea id="input" value="{{inputValue}}" rows="{{rows}}" fit?="{{rows === 'fit'}}" disabled?="{{disabled}}" placeholder="{{placeholder}}" autofocus?="{{autofocus}}" required?="{{required}}" readonly?="{{readonly}}" aria-label="{{label || placeholder}}" aria-invalid="{{invalid}}" on-change="{{inputChangeAction}}" on-focus="{{inputFocusAction}}" on-blur="{{inputBlurAction}}"></textarea> + </template> + + <template if="{{!multiline}}"> + <input id="input" value="{{inputValue}}" disabled?="{{disabled}}" type="{{type}}" placeholder="{{placeholder}}" autofocus?="{{autofocus}}" required?="{{required}}" readonly?="{{readonly}}" pattern="{{pattern}}" min="{{min}}" max="{{max}}" step="{{step}}" maxlength="{{maxlength}}" aria-label="{{label || placeholder}}" aria-invalid="{{invalid}}" on-keydown="{{keydownAction}}" on-change="{{inputChangeAction}}" on-focus="{{inputFocusAction}}" on-blur="{{inputBlurAction}}"> + </template> + + </template> + + + +</polymer-element> +<script src="core-input-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-input/demo.html b/third_party/polymer/components-chromium/core-input/demo.html new file mode 100644 index 0000000..c519f8e --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/demo.html @@ -0,0 +1,133 @@ +<!doctype html> +<html> +<head> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>core-input</title> + + <script src="../platform/platform.js"></script> + + <link href="core-input.html" rel="import"> + + <style> + body { + padding: 24px; + margin: 0; + -webkit-transform: translateZ(0); + font-family: sans-serif; + font-size: 16px; + } + + section { + margin: 2em 0; + } + + aside { + background: #ccc; + padding: 1em; + margin-right: 2em; + font-size: 12px; + width: 250px; + border-radius: 3px; + } + + core-input { + margin: 1em; + } + + core-input[multiline] { + border: 1px dotted #ccc; + } + + core-input.sized { + width: 500px; + height: 200px; + } + + .validation core-input, + .validation core-input[multiline] { + border: solid 1px lime; + } + + .validation core-input.invalid, + .validation core-input[multiline].invalid { + border: solid 1px red; + } + + </style> + +</head> +<body> + + <section horizontal start layout> + <aside>A single-line text input. See console for committed values.</aside> + <core-input id="single" placeholder="Type something..."></core-input> + <script> + var single = document.getElementById('single'); + single.addEventListener('change', function() { + console.log('single: value committed: ', single.value); + }); + </script> + </section> + + <section horizontal start layout> + <aside>The <code>type</code> attribute is supported. This is a single-line input with <code>type = password</code>. See console for committed values.</aside> + <core-input id="password" type="password" placeholder="Enter password..."></core-input> + <script> + var password = document.getElementById('password'); + password.addEventListener('change', function() { + console.log('password: value committed: ', password.value); + }); + </script> + </section> + + <section horizontal start layout> + <aside>A multi-line text input with 3 rows. The input is normally unstyled but here is styled with a dotted border to show its size.</aside> + <core-input multiline rows="3" placeholder="Type many lines here..."></core-input> + </section> + + <section horizontal start layout> + <aside>A multi-line text input sized with CSS. The input is normally unstyled but here is styled with a dotted border to show its size.</aside> + <core-input class="sized" multiline rows="fit" placeholder="This input is 500px * 200px"></core-input> + </section> + + <section horizontal start layout> + <aside>Inputs with the <code>tabindex</code> attribute.</aside> + <div> + <core-input tabindex="2" placeholder="tabindex = 2"></core-input> + <br> + <core-input tabindex="3" placeholder="tabindex = 3"></core-input> + <br> + <core-input tabindex="1" placeholder="tabindex = 1"></core-input> + </div> + </section> + + <section horizontal start layout> + <aside>Validation examples. The border color reflects the current validation state. See console for validation events.</aside> + <div class="validation"> + <core-input id="validate-number" type="number" placeholder="type = number"></core-input> + <br> + <core-input id="validate-email" type="email" placeholder="type = email"></core-input> + <br> + <core-input id="validate-required" required placeholder="required"></core-input> + <br> + <core-input id="validate-ml-required" multiline rows="3" required placeholder="required (multiline)"></core-input> + <br> + <core-input id="validate-pattern" pattern="a*bc" placeholder="with pattern = a*bc"></core-input> + <br> + <core-input id="validate-min-max" type="number" min="5" max="10" placeholder="type = number, min = 5, max = 10"></core-input> + <br> + <core-input id="validate-step" type="number" step="2" placeholder="type = number, step = 2"></core-input> + </div> + <script> + document.querySelector('.validation').addEventListener('input-invalid', function(e, value, s) { + console.log(e.target.id, 'invalid, inputValue:', e.detail.value, e.target.validity); + }); + document.querySelector('.validation').addEventListener('input-valid', function(e, value, s) { + console.log(e.target.id, 'valid, inputValue:', e.detail.value, e.target.validity); + }); + </script> + </section> + + +</body> diff --git a/third_party/polymer/components-chromium/core-input/index.html b/third_party/polymer/components-chromium/core-input/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-input/metadata.html b/third_party/polymer/components-chromium/core-input/metadata.html new file mode 100644 index 0000000..01f69bb --- /dev/null +++ b/third_party/polymer/components-chromium/core-input/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="core-input" label="Input" group="Core" isEditor> + + <template> + <core-input placeholder="Type something..." style="padding: 15px;"></core-input> + </template> + + <template id="imports"> + <link rel="import" href="core-input.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-item/.bower.json b/third_party/polymer/components-chromium/core-item/.bower.json new file mode 100644 index 0000000..a498db0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-item", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-item", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "9d4c6a97a7e70ebfb62bd9266892cfe13de7b70b" + }, + "_source": "git://github.com/Polymer/core-item.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-item" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-item/README.md b/third_party/polymer/components-chromium/core-item/README.md new file mode 100644 index 0000000..ab1d0cd --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/README.md @@ -0,0 +1,4 @@ +core-item +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-item) for more information. diff --git a/third_party/polymer/components-chromium/core-item/bower.json b/third_party/polymer/components-chromium/core-item/bower.json new file mode 100644 index 0000000..4b46e03 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-item", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-item/core-item-extracted.js b/third_party/polymer/components-chromium/core-item/core-item-extracted.js new file mode 100644 index 0000000..b98f4e3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/core-item-extracted.js @@ -0,0 +1,30 @@ + + + Polymer('core-item', { + + /** + * The URL of an image for the icon. + * + * @attribute src + * @type string + * @default '' + */ + + /** + * Specifies the icon from the Polymer icon set. + * + * @attribute icon + * @type string + * @default '' + */ + + /** + * Specifies the label for the menu item. + * + * @attribute label + * @type string + * @default '' + */ + + }); + diff --git a/third_party/polymer/components-chromium/core-item/core-item.css b/third_party/polymer/components-chromium/core-item/core-item.css new file mode 100644 index 0000000..fa13705 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/core-item.css @@ -0,0 +1,41 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +html /deep/ core-item { + display: block; + position: relative; + min-height: 40px; + white-space: nowrap; +} + +html /deep/ core-item.font-scalable { + min-height: 2.5em; +} + +html /deep/ core-item.core-selected { + font-weight: bold; +} + +html /deep/ core-item::shadow core-icon { + margin: 0 16px 0 4px; +} + +html /deep/ core-item.font-scalable::shadow core-icon { + margin: 0 1em 0 0.25em; + height: 1.5em; + width: 1.5em; +} + +html /deep/ core-item::shadow ::content > a { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} diff --git a/third_party/polymer/components-chromium/core-item/core-item.html b/third_party/polymer/components-chromium/core-item/core-item.html new file mode 100644 index 0000000..8937dc6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/core-item.html @@ -0,0 +1,45 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-item` is a simple line-item object: a label and/or an icon that can also +act as a link. + +Example: + + <core-item icon="settings" label="Settings"></core-item> + +To use as a link, put <a> element in the item. + +Example: + + <core-item icon="settings" label="Settings"> + <a href="#settings" target="_self"></a> + </core-item> + +@group Polymer Core Elements +@element core-item +@homepage github.io +--> + +<link rel="import" href="../core-icon/core-icon.html"> + +<link rel="stylesheet" href="core-item.css" shim-shadowdom=""> + +<polymer-element name="core-item" attributes="label icon src" horizontal="" center="" layout="" assetpath=""> +<template> + + <core-icon src="{{src}}" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon> + <div id="label">{{label}}</div> + <content></content> + +</template> + +</polymer-element> +<script src="core-item-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-item/demo.html b/third_party/polymer/components-chromium/core-item/demo.html new file mode 100644 index 0000000..9f1b6f4 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/demo.html @@ -0,0 +1,83 @@ +<!doctype html> +<html> +<head> + + <title>core-item</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="core-item.html"> + + <style> + + body { + font-family: sans-serif; + font-size: 16px; + margin: 20px; + } + + core-item { + width: 300px; + } + + core-item.big { + font-size: 24px; + } + + core-item.small { + font-size: 12px; + } + + core-item.contact-item { + height: 50px; + background-color: #efefef; + border: 1px solid #ddd; + } + + core-item.contact-item .name { + font-size: 1.125em; + } + + core-item.contact-item .address { + font-size: 0.75em; + } + + </style> + +</head> +<body unresolved> + + <h2>items with icon and label:</h2> + + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="account-box" label="Account"></core-item> + + <h2>items with label only:</h2> + + <core-item label="Settings"></core-item> + <core-item label="Account"></core-item> + + <h2>links (via <a>):</h2> + + <core-item icon="settings" label="Settings"><a href="#settings" target="_self"></a></core-item> + <core-item icon="account-box" label="Account"><a href="#account" target="_self"></a></core-item> + + <h2>items sized with CSS:</h2> + <core-item icon="settings" label="Settings" class="font-scalable big"></core-item> + <core-item icon="account-box" label="Account" class="font-scalable big"></core-item> + <core-item icon="settings" label="Settings" class="font-scalable small"></core-item> + <core-item icon="account-box" label="Account" class="font-scalable small"></core-item> + + <h2>custom item:</h2> + + <core-item icon="account-circle" class="contact-item"> + <div flex> + <div class="name">John Doe</div> + <div class="address">123 A Street, San Francisco, CA</div> + </div> + <core-icon icon="more-vert"></core-icon> + </core-item> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-item/index.html b/third_party/polymer/components-chromium/core-item/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-item/metadata.html b/third_party/polymer/components-chromium/core-item/metadata.html new file mode 100644 index 0000000..63e7979 --- /dev/null +++ b/third_party/polymer/components-chromium/core-item/metadata.html @@ -0,0 +1,15 @@ +<x-meta id="core-item" label="Item" group="Core"> + + <template> + + <core-item icon="settings" label="Item"></core-item> + + </template> + + <template id="imports"> + + <link rel="import" href="core-item.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-grid/.bower.json b/third_party/polymer/components-chromium/core-layout-grid/.bower.json new file mode 100644 index 0000000..dc5bd26 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-layout-grid", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-layout-grid", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "1ecfd18678529b78f08230da6166c330fe39bc03" + }, + "_source": "git://github.com/Polymer/core-layout-grid.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-layout-grid" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-grid/README.md b/third_party/polymer/components-chromium/core-layout-grid/README.md new file mode 100644 index 0000000..e612651 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/README.md @@ -0,0 +1,4 @@ +core-layout-grid +================ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-layout-grid) for more information. diff --git a/third_party/polymer/components-chromium/core-layout-grid/bower.json b/third_party/polymer/components-chromium/core-layout-grid/bower.json new file mode 100644 index 0000000..844907a --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-layout-grid", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid-extracted.js b/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid-extracted.js new file mode 100644 index 0000000..11fb5cb --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid-extracted.js @@ -0,0 +1,326 @@ + + (function() { + + Polymer('core-layout-grid', { + + nodes: null, + layout: null, + auto: false, + + created: function() { + this.layout = []; + }, + + nodesChanged: function() { + this.invalidate(); + }, + + layoutChanged: function() { + this.invalidate(); + }, + + autoNodes: function() { + this.nodes = this.parentNode.children.array().filter( + function(node) { + switch(node.localName) { + case 'core-layout-grid': + case 'style': + return false; + } + return true; + } + ); + }, + + invalidate: function() { + if (this.layout && this.layout.length) { + // job debounces layout, only letting it occur every N ms + this.layoutJob = this.job(this.layoutJob, this.relayout); + } + }, + + relayout: function() { + if (!this.nodes || this.auto) { + this.autoNodes(); + } + layout(this.layout, this.nodes); + this.asyncFire('core-layout'); + } + + }); + + // + + var lineParent; + + function line(axis, p, d) { + var l = document.createElement('line'); + var extent = (axis === 'left' ? 'width' : + (axis === 'top' ? 'height' : axis)); + l.setAttribute('extent', extent); + if (d < 0) { + axis = (axis === 'left' ? 'right' : + (axis === 'top' ? 'bottom' : axis)); + } + p = Math.abs(p); + l.style[axis] = p + 'px'; + l.style[extent] = '0px'; + lineParent.appendChild(l); + } + + var colCount, colOwners, rowCount, rowOwners; + + function matrixillate(matrix) { + // mesaure the matrix, must be rectangular + rowCount = matrix.length; + colCount = rowCount && matrix[0].length || 0; + // transpose matrix + var transpose = []; + for (var i=0; i<colCount; i++) { + var c = []; + for (var j=0; j<rowCount; j++) { + c.push(matrix[j][i]); + } + transpose.push(c); + } + // assign sizing control + colOwners = findOwners(matrix); + rowOwners = findOwners(transpose); + //console.log('colOwners', colOwners); + //console.log('rowOwners', rowOwners); + } + + function findOwners(matrix) { + var majCount = matrix.length; + var minCount = majCount && matrix[0].length || 0; + var owners = []; + // for each column (e.g.) + for (var i=0; i<minCount; i++) { + // array of contained areas + var contained = {}; + // look at each row to find a containing area + for (var j=0; j<majCount; j++) { + // get the row vector + var vector = matrix[j] + // node index at [i,j] + var nodei = vector[i]; + // if a node is there + if (nodei) { + // determine if it bounds this column + var owns = false; + if (i === 0) { + owns = (i === minCount-1) || (nodei !== vector[i+1]); + } else if (i === minCount - 1) { + owns = (i === 0) || (nodei !== vector[i-1]); + } else { + owns = nodei !== vector[i-1] && nodei !== vector[i+1]; + } + if (owns) { + contained[nodei] = 1; + } + } + // store the owners for this column + owners[i] = contained; + } + } + return owners; + } + + var nodes; + + function colWidth(i) { + for (var col in colOwners[i]) { + col = Number(col); + if (col === 0) { + return 96; + } + var node = nodes[col - 1]; + if (node.hasAttribute('h-flex') || node.hasAttribute('flex')) { + return -1; + } + var w = node.offsetWidth; + //console.log('colWidth(' + i + ') ==', w); + return w; + } + return -1; + } + + function rowHeight(i) { + for (var row in rowOwners[i]) { + row = Number(row); + if (row === 0) { + return 96; + } + var node = nodes[row - 1]; + if (node.hasAttribute('v-flex') || node.hasAttribute('flex')) { + return -1; + } + var h = node.offsetHeight; + //console.log('rowHeight(' + i + ') ==', h); + return h; + } + return -1; + } + + var m = 0; + + function railize(count, sizeFn) { + // + // create rails for `count` tracks using + // sizing function `sizeFn(trackNo)` + // + // for n tracks there are (n+1) rails + // + // |track|track|track| + // 0|->sz0|->sz1|<-sz2|0 + // + // |track|track|track| + // 0|->sz0| |<-sz2|0 + // + // there can be one elastic track per set + // + // |track|track|track|track| + // 0|-->s0|-->s1|<--s1|<--s2|0 + // + // sz1 spans multiple tracks which makes + // it elastic (it's underconstrained) + // + var rails = []; + var a = 0; + for (var i=0, x; i<count; i++) { + rails[i] = {p: a, s: 1}; + x = sizeFn(i) + m + m; + if (x == -1) { + break; + } + a += x; + } + if (i === count) { + rails[i] = {p: 0, s: -1}; + } + var b = 0; + for (var ii=count, x; ii>i; ii--) { + rails[ii] = {p: b, s: -1}; + x = sizeFn(ii - 1) + m + m; + if (x !== -1) { + b += x; + } + } + return rails; + } + + // TODO(sjmiles): this code tries to preserve actual position, + // so 'unposition' is really 'naturalize' or something + function unposition(box) { + var style = box.style; + //style.right = style.bottom = style.width = style.height = ''; + style.position = 'absolute'; + style.display = 'inline-block'; + style.boxSizing = style.mozBoxSizing = 'border-box'; + } + + function _position(style, maj, min, ext, a, b) { + style[maj] = style[min] = ''; + style[ext] = 'auto'; + if (a.s < 0 && b.s < 0) { + var siz = a.p - b.p - m - m; + style[ext] = siz + 'px'; + var c = 'calc(100% - ' + (b.p + siz + m) + 'px' + ')'; + style[maj] = '-webkit-' + c; + style[maj] = c; + } else if (b.s < 0) { + style[maj] = a.p + m + 'px'; + style[min] = b.p + m + 'px'; + } else { + style[maj] = a.p + m + 'px'; + style[ext] = b.p - a.p - m - m + 'px'; + } + } + + function position(elt, left, right, top, bottom) { + _position(elt.style, 'top', 'bottom', 'height', rows[top], + rows[bottom]); + _position(elt.style, 'left', 'right', 'width', columns[left], + columns[right]); + } + + function layout(matrix, anodes, alineParent) { + //console.group('layout'); + + lineParent = alineParent; + nodes = anodes; + matrixillate(matrix); + + nodes.forEach(unposition); + + columns = railize(colCount, colWidth); + rows = railize(rowCount, rowHeight); + + if (alineParent) { + //console.group('column rails'); + columns.forEach(function(c) { + //console.log(c.p, c.s); + line('left', c.p, c.s); + }); + //console.groupEnd(); + + //console.group('row rails'); + rows.forEach(function(r) { + //console.log(r.p, r.s); + line('top', r.p, r.s); + }); + //console.groupEnd(); + } + + //console.group('rail boundaries'); + nodes.forEach(function(node, i) { + // node indices are 1-based + var n = i + 1; + // boundary rails + var l, r, t = 1e10, b = -1e10; + matrix.forEach(function(vector, i) { + var f = vector.indexOf(n); + if (f > -1) { + l = f; + r = vector.lastIndexOf(n) + 1; + t = Math.min(t, i); + b = Math.max(b, i) + 1; + } + }); + if (l == undefined) { + //console.log('unused'); + node.style.position = 'absolute'; + var offscreen = node.getAttribute('offscreen'); + switch (offscreen) { + case 'basement': + node.style.zIndex = 0; + break; + case 'left': + case 'top': + node.style[offscreen] = node.offsetWidth * -2 + 'px'; + break; + case 'right': + node.style.left = node.offsetParent.offsetWidth + + node.offsetWidth + 'px'; + break; + case 'bottom': + node.style.top = node.parentNode.offsetHeight + + node.offsetHeight + 'px'; + break; + default: + node.style[Math.random() >= 0.5 ? 'left' : 'top'] = '-110%'; + } + //node.style.opacity = 0; + node.style.pointerEvents = 'none'; + } else { + node.style.pointerEvents = ''; + //node.style.opacity = ''; + //console.log(l, r, t, b); + position(node, l, r, t, b); + } + }); + //console.groupEnd(); + //console.groupEnd(); + } + + })(); diff --git a/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid.html b/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid.html new file mode 100644 index 0000000..2f872cc2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/core-layout-grid.html @@ -0,0 +1,24 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + + +<!-- +@group Polymer Core Elements + +@element core-layout-grid +@status beta +@homepage github.io + +TODO +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-layout-grid" attributes="nodes layout auto" assetpath=""> + +</polymer-element><script src="core-layout-grid-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-grid/demo.html b/third_party/polymer/components-chromium/core-layout-grid/demo.html new file mode 100644 index 0000000..c03fb4e --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/demo.html @@ -0,0 +1,107 @@ +<!doctype html> +<html> +<head> + + <title>core-layout-grid example</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-layout-grid.html"> + + <style> + body { + font-family: sans-serif; + overflow: hidden; + } + </style> + +</head> +<body unresolved> + + <grid-test></grid-test> + + <polymer-element name="grid-test" on-tap="{{rotate}}"> + <template> + + <style> + * { + -webkit-transition: top, right, bottom, left; + -webkit-transition-duration: 0.3s; + } + + panel { + display: inline-block; + border: 4px dotted lightblue; + padding: 16px; + background-color: whitesmoke; + } + + #outputToolbar { + width: 400px; + } + + #output { + width: 400px; + } + + #workspace { + border-color: orange; + } + </style> + + <core-layout-grid nodes="{{nodes}}" layout="{{layout}}"></core-layout-grid> + + <panel id="toolbar">toolbar (click to rotate)</panel> + <panel id="sidebar">sidebar</panel> + <panel id="workspace">workspace</panel> + <panel id="outputToolbar">otherbar</panel> + <panel id="output"> + output + <h2>Documentation</h2> + <h1>Verbiage</h1> + <p>In backbone record integer LED amplified internet protocol a extension reflective. + Array kilohertz LED. Wavelength extension patch supporting wave an by prompt.</p> + </panel> + + </template> + <script> + + Polymer('grid-test', { + arrangements: [[ + [1, 1, 1, 1], + [2, 3, 3, 4], + [2, 3, 3, 5] + ], [ + [4, 3, 2], + [5, 3, 2], + [5, 1, 1] + ], [ + [1, 1], + [2, 3], + [4, 3] + ]], + + outputLayout: 0, + + ready: function() { + this.outputLayoutChanged(); + }, + + outputLayoutChanged: function() { + this.layout = this.arrangements[this.outputLayout]; + }, + + toggleLayout: function() { + this.outputLayout = (this.outputLayout + 1) % this.arrangements.length; + }, + + rotate: function() { + this.toggleLayout(); + } + }); + + </script> + </polymer-element> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout-grid/index.html b/third_party/polymer/components-chromium/core-layout-grid/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout-grid/metadata.html b/third_party/polymer/components-chromium/core-layout-grid/metadata.html new file mode 100644 index 0000000..cdf11b3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-grid/metadata.html @@ -0,0 +1,13 @@ +<x-meta id="core-layout-grid" label="Layout: Grid" group="Core" isContainer> + + <template> + <core-layout-grid></core-layout-grid> + </template> + + <property name="layout" kind="json"></property> + + <template id="imports"> + <link rel="import" href="core-layout-grid.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-layout-trbl/.bower.json b/third_party/polymer/components-chromium/core-layout-trbl/.bower.json new file mode 100644 index 0000000..8a2b441 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-layout-trbl", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-layout-trbl", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "cf7dd6a4371b2fcdd396599d006c412a86ff606f" + }, + "_source": "git://github.com/Polymer/core-layout-trbl.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-layout-trbl" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/README.md b/third_party/polymer/components-chromium/core-layout-trbl/README.md new file mode 100644 index 0000000..438ccc4 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/README.md @@ -0,0 +1,4 @@ +core-layout-trbl +================ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-layout-trbl) for more information. diff --git a/third_party/polymer/components-chromium/core-layout-trbl/bower.json b/third_party/polymer/components-chromium/core-layout-trbl/bower.json new file mode 100644 index 0000000..84ca4c5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-layout-trbl", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl-extracted.js b/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl-extracted.js new file mode 100644 index 0000000..58c21f0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl-extracted.js @@ -0,0 +1,130 @@ + + + Polymer('core-layout-trbl', { + + vertical: false, + + ready: function() { + this.setAttribute('nolayout', ''); + }, + + attached: function() { + this.asyncMethod(function() { + this.prepare(); + this.layout(); + }); + }, + + prepare: function() { + var parent = this.parentNode.host || this.parentNode; + // explicit position harmful on <body> + if (parent.localName !== 'body') { + // may recalc + var cs = window.getComputedStyle(parent); + if (cs.position === 'static') { + parent.style.position = 'relative'; + } + //parent.style.overflow = 'hidden'; + } + // changes will cause another recalc at next validation step + var stylize = this.stylize, vertical; + this.parentNode.childNodes.array().forEach(function(c, i) { + if (c.nodeType === Node.ELEMENT_NODE && !c.hasAttribute('nolayout')) { + stylize(c, { + position: 'absolute', + boxSizing: 'border-box', + MozBoxSizing: 'border-box', + }); + // test for auto-vertical + if (vertical === undefined) { + vertical = (c.offsetWidth == 0 && c.offsetHeight !== 0); + } + } + }); + this.vertical = this.vertical || vertical; + }, + + /** + * Arrange sibling nodes end-to-end in one dimension. + * + * Arrangement is horizontal unless the `vertical` + * attribute is applied on this node. + * + * @method layout + */ + layout: function() { + var parent = this.parentNode.host || this.parentNode; + var vertical = this.vertical; + var ww = 0, hh = 0, pre = [], fit, post = []; + var list = pre; + // gather element information (at most one recalc) + this.parentNode.childNodes.array().forEach(function(c, i) { + if (c.nodeType===Node.ELEMENT_NODE && !c.hasAttribute('nolayout')) { + var info = { + element: c, + w: c.offsetWidth, + h: c.offsetHeight + }; + if (!c.hasAttribute('fit') && !c.hasAttribute('flex')) { + ww += c.offsetWidth; + hh += c.offsetHeight; + list.push(info); + } else { + fit = c; + list = post; + ww = hh = 0; + } + } + }); + // update layout styles (invalidate, no recalc) + var v = 0; + var mxp = 0, myp = 0; + var stylize = this.stylize; + pre.forEach(function(info) { + if (vertical) { + stylize(info.element, { + top: v + 'px', right: mxp, height: info.h + 'px', left: mxp + }); + } else { + stylize(info.element, { + top: myp, width: info.w + 'px', bottom: myp, left: v + 'px' + }); + } + v += vertical ? info.h : info.w; + }); + if (fit) { + if (vertical) { + stylize(fit, { + top: v + 'px', right: mxp, bottom: hh + 'px', left: mxp + }); + } else { + stylize(fit, { + top: myp, right: ww + 'px', bottom: myp, left: v + 'px' + }); + } + v = vertical ? hh : ww; + post.forEach(function(info) { + v -= vertical ? info.h : info.w; + if (vertical) { + stylize(info.element, { + height: info.h + 'px', right: mxp, bottom: v + 'px', left: mxp + }); + } else { + stylize(info.element, { + top: myp, right: v + 'px', bottom: myp, width: info.w + 'px' + }); + } + }); + } + }, + + stylize: function(element, styles) { + var style = element.style; + Object.keys(styles).forEach(function(k){ + style[k] = styles[k]; + }); + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl.html b/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl.html new file mode 100644 index 0000000..eed198b --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/core-layout-trbl.html @@ -0,0 +1,141 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`<core-layout-trbl>` arranges nodes horizontally via absolute positioning. +Set the `vertical` attribute (boolean) to arrange vertically instead. + +`<core-layout-trbl>` arranges it's <b>sibling elements</b>, not +it's children. + +One arranged node may be marked as elastic by giving it a `flex` +attribute (boolean). + +You may remove a node from layout by giving it a `nolayout` +attribute (boolean). + +CSS Notes: + +`padding` is ignored on the parent node. +`margin` is ignored on arranged nodes. +`min-width` is ignored on arranged nodes, use `min-width` on the parent node +instead. + +Example: + +Arrange three `div` into columns. `flex` attribute on Column Two makes that +column elastic. + + <core-layout-trbl></core-layout-trbl> + <div>Column One</div> + <div flex>Column Two</div> + <div>Column Three</div> + +Remember that `<core-layout-trbl>` arranges it's sibling elements, not it's children. + +If body has width 52 device pixels (in this case, ascii characters), call that 52px. +Column One has it's natural width of 12px (including border), Column Three has it's +natural width of 14px, body border uses 2px, and Column Two automatically uses the +remaining space: 24px. + + |- 52px -| + ---------------------------------------------------- + ||Column One|| Column Two ||Column Three|| + ---------------------------------------------------- + |- 12px -||- (24px) -|| 14px -| + +As the parent node resizes, the elastic column reacts via CSS to adjust it's size. +No javascript is used during parent resizing, for best performance. + +Changes in content or sibling size are not handled automatically. + + ---------------------------------------------------------------- + ||Column One| Column Two |Column Three|| + ---------------------------------------------------------------- + + -------------------------------------- + ||Column One|Column Two|Column Three|| + -------------------------------------- + +Arrange in rows by adding the `vertical` attribute. + +Example: + + <core-layout-trbl vertical></core-layout-trbl> + <div>Row One</div> + <div flex>Row Two</div> + <div>Row Three</div> + +This setup will cause Row Two to stretch to fill the container. + + ----------- ----------- + |---------| |---------| + | | | | + |Row One | |Row One | + | | | | + |---------| |---------| + | | | | + |Row Two | |Row Two | + | | | | + |---------| | | + | | | | + |Row Three| | | + | | |---------| + |---------| | | + ----------- |Row Three| + | | + |---------| + |---------| + +Layouts can be nested arbitrarily. + + <core-layout-trbl></core-layout-trbl> + <div>Menu</div> + <div flex> + <core-layout-trbl vertical></core-layout-trbl> + <div>Title</div> + <div>Toolbar</div> + <div flex>Main</div> + <div>Footer</div> + </div> + +Renders something like this + + -------------------------------- + ||Menu ||Title || + || ||-----------------|| + || ||Toolbar || + || ||-----------------|| + || ||Main || + || || || + || ||-----------------|| + || ||Footer || + -------------------------------- + +@group Polymer Core Elements +@element core-layout-trbl +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-layout-trbl" attributes="vertical" assetpath=""> + + <template> + + <style> + :host { + display: none; + } + </style> + + </template> + + + +</polymer-element> +<script src="core-layout-trbl-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/core-slide-extracted.js b/third_party/polymer/components-chromium/core-layout-trbl/core-slide-extracted.js new file mode 100644 index 0000000..17b46f0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/core-slide-extracted.js @@ -0,0 +1,156 @@ + + + Polymer('core-slide', { + + closed: false, + open: true, + vertical: false, + targetId: '', + target: null, + + ready: function() { + this.setAttribute('nolayout', ''); + }, + + attached: function() { + this.target = this.parentNode; + }, + + targetIdChanged: function() { + var p = this.parentNode; + while (p.parentNode) {p = p.parentNode;}; + this.target = p.querySelector('#' + this.targetId); + }, + + targetChanged: function() { + if (this.closed) { + this.asyncMethod(this.update); + } + }, + + toggle: function() { + this.open = !this.open; + }, + + closedChanged: function() { + this.open = !this.closed; + }, + + openChanged: function() { + this.asyncMethod(this.update); + }, + + update: function() { + this.closed = !this.open; + if (this.target) { + if (this.vertical) { + if (this.target.style.top !== '') { + this.updateTop(); + } else { + this.updateBottom(); + } + } else { + if (this.target.style.left !== '') { + this.updateLeft(); + } else { + this.updateRight(); + } + } + } + }, + + updateLeft: function() { + var w = this.target.offsetWidth; + var l = this.open ? 0 : -w; + this.target.style.left = l + 'px'; + var s = this.target.nextElementSibling; + while (s) { + if (!s.hasAttribute('nolayout')) { + if (s.style.left === '' && s.style.right !== '') { + break; + } + l += w; + s.style.left = l + 'px'; + w = s.offsetWidth; + } + s = s.nextElementSibling; + } + }, + + updateRight: function() { + var w = this.target.offsetWidth; + var r = this.open ? 0 : -w; + this.target.style.right = r + 'px'; + //var s = this.target.previousElementSibling; + var s = previousElementSibling(this.target); + while (s) { + if (!s.hasAttribute('nolayout')) { + if (s.style.right === '' && s.style.left !== '') { + break; + } + r += w; + s.style.right = r + 'px'; + w = s.offsetWidth; + } + //if (s == s.previousElementSibling) { + // console.error(s.localName + ' is its own sibling', s); + // break; + //} + //s = s.previousElementSibling; + s = previousElementSibling(s); + } + }, + + updateTop: function() { + var h = this.target.offsetHeight; + var t = this.open ? 0 : -h; + this.target.style.top = t + 'px'; + var s = this.target.nextElementSibling; + while (s) { + if (!s.hasAttribute('nolayout')) { + if (s.style.top === '' && s.style.bottom !== '') { + break; + } + t += h; + s.style.top = t + 'px'; + h = s.offsetHeight; + } + s = s.nextElementSibling; + } + }, + + updateBottom: function() { + var h = this.target.offsetHeight; + var b = this.open ? 0 : -h; + this.target.style.bottom = b + 'px'; + //var s = this.target.previousElementSibling; + var s = previousElementSibling(this.target); + while (s) { + if (!s.hasAttribute('nolayout')) { + if (s.style.bottom === '' && s.style.top !== '') { + break; + } + b = b + h; + s.style.bottom = b + 'px'; + h = s.offsetHeight; + } + //if (s == s.previousElementSibling) { + // console.error(s.localName + ' is its own sibling', s); + // break; + //} + //s = s.previousElementSibling; + s = previousElementSibling(s); + } + } + + }); + + // TODO(sjmiles): temporary workaround for b0rked property in ShadowDOMPolyfill + function previousElementSibling(e) { + do { + e = e.previousSibling; + } while (e && e.nodeType !== Node.ELEMENT_NODE); + return e; + }; + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/core-slide.html b/third_party/polymer/components-chromium/core-layout-trbl/core-slide.html new file mode 100644 index 0000000..7abf2c6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/core-slide.html @@ -0,0 +1,27 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-slide" attributes="open closed vertical target targetId" assetpath=""> + + <template> + + <style> + :host { + display: none; + } + </style> + + </template> + + + +</polymer-element> +<script src="core-slide-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout-trbl/demo.html b/third_party/polymer/components-chromium/core-layout-trbl/demo.html new file mode 100644 index 0000000..3812ccf --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/demo.html @@ -0,0 +1,58 @@ +<!DOCTYPE html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+
+<html>
+<head>
+
+ <title>core-layout-trbl demo</title>
+
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="core-layout-trbl.html">
+ <link rel="import" href="core-slide.html">
+
+ <style>
+ div {
+ padding: 8px;
+ border: 3px solid lightblue;
+ -webkit-transition: all 0.3s;
+ }
+ [vertical] ~ div {
+ border: 3px solid orange;
+ }
+ </style>
+
+</head>
+<body unresolved>
+
+ <div style="height: 600px; overflow: hidden;">
+ <core-layout-trbl></core-layout-trbl>
+ <div id="left">Hi I'm some content</div>
+ <div id="left2" onclick="leftSlide.closed = !leftSlide.closed;">Click Me First</div>
+ <div onclick="leftSlide2.closed = !leftSlide2.closed;">Click Me Second</div>
+ <div fit>
+ <core-layout-trbl vertical></core-layout-trbl>
+ <div id="top">Gribble gribble</div>
+ <div onclick="topSlide.closed = !topSlide.closed;">Click Me</div>
+ <div fit>Squids!</div>
+ <div onclick="bottomSlide.closed = !bottomSlide.closed;">Click Me</div>
+ <div>More is more</div>
+ <div id="bottom">Squids are larger than they appear.</div>
+ </div>
+ <div onclick="rightSlide.closed = !rightSlide.closed;">Click me</div>
+ <div id="right">A last bit, like a panel</div>
+ </div>
+ <core-slide id="leftSlide" targetid="left"></core-slide>
+ <core-slide id="leftSlide2" targetid="left2"></core-slide>
+ <core-slide id="rightSlide" targetid="right"></core-slide>
+ <core-slide id="topSlide" vertical targetid="top"></core-slide>
+ <core-slide id="bottomSlide" vertical targetid="bottom"></core-slide>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-layout-trbl/index.html b/third_party/polymer/components-chromium/core-layout-trbl/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout-trbl/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/.bower.json b/third_party/polymer/components-chromium/core-layout/.bower.json new file mode 100644 index 0000000..6a615b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-layout", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "version": "0.3.5", + "homepage": "https://github.com/Polymer/core-layout", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "b3e60118a0f859868ddc60d180ea28f42426c0f8" + }, + "_source": "git://github.com/Polymer/core-layout.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-layout" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout/README.md b/third_party/polymer/components-chromium/core-layout/README.md new file mode 100644 index 0000000..11ec2d0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/README.md @@ -0,0 +1,4 @@ +core-layout +=========== + +## DEPRECATED (in favor of layout attributes) diff --git a/third_party/polymer/components-chromium/core-layout/bower.json b/third_party/polymer/components-chromium/core-layout/bower.json new file mode 100644 index 0000000..56dd1f1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-layout", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "version": "0.3.0" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout/core-layout-extracted.js b/third_party/polymer/components-chromium/core-layout/core-layout-extracted.js new file mode 100644 index 0000000..a761287 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/core-layout-extracted.js @@ -0,0 +1,121 @@ + + + (function() { + + Polymer('core-layout', { + + isContainer: false, + /** + * Controls if the element lays out vertically or not. + * + * @attribute vertical + * @type boolean + * @default false + */ + vertical: false, + /** + * Controls how the items are aligned in the main-axis direction. For + * example for a horizontal layout, this controls how each item is aligned + * horizontally. + * + * @attribute justify + * @type string start|center|end|between + * @default '' + */ + justify: '', + /** + * Controls how the items are aligned in cross-axis direction. For + * example for a horizontal layout, this controls how each item is aligned + * vertically. + * + * @attribute align + * @type string start|center|end + * @default '' + */ + align: '', + /** + * Controls whether or not the items layout in reverse order. + * + * @attribute reverse + * @type boolean + * @default false + */ + reverse: false, + layoutPrefix: 'core-', + + // NOTE: include template so that styles are loaded, but remove + // so that we can decide dynamically what part to include + registerCallback: function(polymerElement) { + var template = polymerElement.querySelector('template'); + this.styles = template.content.querySelectorAll('style').array(); + this.styles.forEach(function(s) { + s.removeAttribute('no-shim'); + }) + }, + + fetchTemplate: function() { + return null; + }, + + attached: function() { + this.installScopeStyle(this.styles[0]); + if (this.children.length) { + this.isContainer = true; + } + var container = this.isContainer ? this : this.parentNode; + // detect if laying out a shadowRoot host. + var forHost = container instanceof ShadowRoot; + if (forHost) { + this.installScopeStyle(this.styles[1], 'host'); + container = container.host || document.body; + } + this.layoutContainer = container; + }, + + detached: function() { + this.layoutContainer = null; + }, + + layoutContainerChanged: function(old) { + this.style.display = this.layoutContainer === this ? null : 'none'; + this.verticalChanged(); + this.alignChanged(); + this.justifyChanged(); + }, + + setLayoutClass: function(prefix, old, newValue) { + if (this.layoutContainer) { + prefix = this.layoutPrefix + prefix; + if (old) { + this.layoutContainer.classList.remove(prefix + old); + } + if (newValue) { + this.layoutContainer.classList.add(prefix + newValue); + } + } + }, + + verticalChanged: function(old) { + old = old ? 'v' : 'h'; + var vertical = this.vertical ? 'v' : 'h'; + this.setLayoutClass('', old, vertical); + }, + + alignChanged: function(old) { + this.setLayoutClass('align-', old, this.align); + }, + + justifyChanged: function(old) { + this.setLayoutClass('justify-', old, this.justify); + }, + + reverseChanged: function(old) { + old = old ? 'reverse' : ''; + var newValue = this.reverse ? 'reverse' : ''; + this.setLayoutClass('', old, newValue); + } + + }); + + })(); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout/core-layout-host.css b/third_party/polymer/components-chromium/core-layout/core-layout-host.css new file mode 100644 index 0000000..aa5f845 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/core-layout-host.css @@ -0,0 +1,106 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: -moz-flex !important; + display: -webkit-flex !important; + display: flex !important; +} + +:host(.core-h) { + -webkit-box-orient: horizontal; + -ms-flex-direction: row; + -moz-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; +} + +:host(.core-v) { + -webkit-box-orient: vertical; + -ms-flex-direction: column; + -moz-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} + +:host(.core-h.core-reverse) { + -webkit-box-direction: reverse; + -ms-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +:host(.core-v.core-reverse) { + -webkit-box-direction: reverse; + -ms-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +/* alignment in main axis */ +:host(.core-justify-start) { + -webkit-box-pack: start; + -ms-flex-pack: start; + -moz-justify-content: flex-start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +:host(.core-justify-center) { + -webkit-box-pack: center; + -ms-flex-pack: center; + -moz-justify-content: center; + -webkit-justify-content: center; + justify-content: center; +} + +:host(.core-justify-end) { + -webkit-box-pack: end; + -ms-flex-pack: end; + -moz-justify-content: flex-end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +:host(.core-justify-between) { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -moz-justify-content: space-between; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +/* alignment in cross axis */ +:host(.core-align-start) { + -webkit-box-align: start; + -ms-flex-align: start; + -moz-align-items: flex-start; + -webkit-align-items: flex-start; + align-items: flex-start; +} + +:host(.core-align-center) { + -webkit-box-align: center; + -ms-flex-align: center; + -moz-align-items: center; + -webkit-align-items: center; + align-items: center; +} + +:host(.core-align-end) { + -webkit-box-align: end; + -ms-flex-align: end; + -moz-align-items: flex-end; + -webkit-align-items: flex-end; + align-items: flex-end; +} diff --git a/third_party/polymer/components-chromium/core-layout/core-layout.css b/third_party/polymer/components-chromium/core-layout/core-layout.css new file mode 100644 index 0000000..80f64b0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/core-layout.css @@ -0,0 +1,216 @@ +/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ + +.core-h, .core-v { + display: -webkit-box !important; + display: -ms-flexbox !important; + display: -moz-flex !important; + display: -webkit-flex !important; + display: flex !important; +} + +.core-h { + -webkit-box-orient: horizontal; + -ms-flex-direction: row; + -moz-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; +} + +.core-h.core-reverse { + -webkit-box-direction: reverse; + -ms-flex-direction: row-reverse; + -moz-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +.core-v { + -webkit-box-orient: vertical; + -ms-flex-direction: column; + -moz-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} + +.core-v.core-reverse { + -webkit-box-direction: reverse; + -ms-flex-direction: column-reverse; + -moz-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +.core-relative { + position: relative; +} + +.core-fit { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +body.core-fit { + margin: 0; +} + +.core-flex, [core-flex] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +.core-flex-auto, [core-flex-auto] { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + -moz-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; +} + +.core-flex-none, [core-flex-none] { + -webkit-box-flex: none; + -ms-flex: none; + -moz-flex: none; + -webkit-flex: none; + flex: none; +} + +.core-flex1, [core-flex=1] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +.core-flex2, [core-flex=2] { + -webkit-box-flex: 2; + -ms-flex: 2; + -moz-flex: 2; + -webkit-flex: 2; + flex: 2; +} + +.core-flex3, [core-flex=3] { + -webkit-box-flex: 3; + -ms-flex: 3; + -moz-flex: 3; + -webkit-flex: 3; + flex: 3; +} + +/* distributed elements */ +::content > .core-flex, ::content > [core-flex] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +::content > .core-flex-auto, ::content > [core-flex-auto] { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + -moz-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; +} + +::content > .core-flex-none, ::content > [core-flex-none] { + -webkit-box-flex: none; + -ms-flex: none; + -moz-flex: none; + -webkit-flex: none; + flex: none; +} + +::content > .core-flex1, ::content > [core-flex=1] { + -webkit-box-flex: 1; + -ms-flex: 1; + -moz-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +::content > .core-flex2, ::content > [core-flex=2] { + -webkit-box-flex: 2; + -ms-flex: 2; + -moz-flex: 2; + -webkit-flex: 2; + flex: 2; +} + +::content > .core-flex3, ::content > [core-flex=3] { + -webkit-box-flex: 3; + -ms-flex: 3; + -moz-flex: 3; + -webkit-flex: 3; + flex: 3; +} + +/* alignment in main axis */ +.core-justify-start { + -webkit-box-pack: start; + -ms-flex-pack: start; + -moz-justify-content: flex-start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +.core-justify-center { + -webkit-box-pack: center; + -ms-flex-pack: center; + -moz-justify-content: center; + -webkit-justify-content: center; + justify-content: center; +} + +.core-justify-end { + -webkit-box-pack: end; + -ms-flex-pack: end; + -moz-justify-content: flex-end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +.core-justify-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -moz-justify-content: space-between; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +/* alignment in cross axis */ +.core-align-start { + -webkit-box-align: start; + -ms-flex-align: start; + -moz-align-items: flex-start; + -webkit-align-items: flex-start; + align-items: flex-start; +} + +.core-align-center { + -webkit-box-align: center; + -ms-flex-align: center; + -moz-align-items: center; + -webkit-align-items: center; + align-items: center; +} + +.core-align-end { + -webkit-box-align: end; + -ms-flex-align: end; + -moz-align-items: flex-end; + -webkit-align-items: flex-end; + align-items: flex-end; +} diff --git a/third_party/polymer/components-chromium/core-layout/core-layout.html b/third_party/polymer/components-chromium/core-layout/core-layout.html new file mode 100644 index 0000000..d9c56f7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/core-layout.html @@ -0,0 +1,169 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The `core-layout` element is a helper for using +[CSS3 Flexible Boxes](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes). +A `core-layout` element enables a set of css selectors for easy flexbox styling. + +Example: + + <core-layout> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + </core-layout> + + Renders something like this: + + --------------------------------- + |-------------------------------| + ||Left| Main |Right|| + |-------------------------------| + --------------------------------- + +__Note__: the `core-layout` element applies layout to itself if it has children or to +its parent element, if it does not. This feature allows you to apply layout to an +arbitrary parent. + +Elements can layout horizontally, such that their items stack +left to right or vertically, such that their items stack top to bottom. The +default is horizontal. Set `vertical` to true to layout the elements vertically. + +To make a particular child _flexible_, use the `core-flex` attribute. +You can control flexibility from 1 to 3 by giving the attribute a +corresponding value. For other values, apply the css manually. + +It's common in flexbox parlance to hear the terms _main axis_ and _cross axis_. +For a horizontal layout the main axis is horizontal and the cross axis is vertical. +These are exchanged for a vertical layout. + +To effect alignment in the main axis, use the `justify` attribute. The +supported values are `start`, `center`, `end`, and `between`. + +To effect alignment in the cross axis, use the `align` attribute. The +supported values are `start`, `center`, and `end`. + +Note, it's also possible to include the `core-layout.css` stylesheet separate +from the `core-layout` element. Including the element automatically includes +the stylesheet. To use the stylesheet independent of the element, css classes +should be used of the following form: `core-h`, `core-v`, `core-flex`, +`core-justify-start`, and `core-align-start`. + +The `core-layout` and css file also provide a few commonly needed layout +behaviors. Apply the `core-fit` class to fit an element to its container. To +ensure a container will contain an element inside it with the `core-fit` class +give it the `core-relative` class. + +More examples: + + <core-layout vertical> + + <div>Header</div> + <div core-flex>Body</div> + <div>Footer</div> + + </core-layout> + + ---------- + ||------|| + ||Header|| + ||------|| + ||Body || + || || + || || + || || + || || + || || + || || + ||------|| + ||Footer|| + ||------|| + ---------- + +Justify: + + <core-layout justify="end"> + <div core-flex>Left</div> + <div>Main</div> + <div>Right</div> + </core-layout> + + --------------------------------- + |-------------------------------| + || Left|Main|Right|| + |-------------------------------| + --------------------------------- + +Align: + + <core-layout align="center"> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + </core-layout> + + --------------------------------- + |-------------------------------| + || | | || + ||Left| Main |Right|| + || | | || + |-------------------------------| + --------------------------------- + + +To layout contents of a parent element, place a `core-layout` inside of it: + + <some-element> + <core-layout></core-layout> + <div>Left</div> + <div core-flex>Main</div> + <div>Right</div> + </some-element> + + --------------------------------- + |-------------------------------| + ||Left| Main |Right|| + |-------------------------------| + --------------------------------- + +You may also use the `core-layout` stylesheet directly: + + <link rel="stylesheet" href="../core-layout/core-layout.css"> + <div class="core-h core-justify-end"> + <div core-flex>Left</div> + <div>Main</div> + <div>Right</div> + </div> + + --------------------------------- + |-------------------------------| + || Left|Main|Right|| + |-------------------------------| + --------------------------------- + +@group Polymer Core Elements +@element core-layout + +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-layout" attributes="vertical justify align isContainer reverse" assetpath=""> + + <template> + + <link no-shim="" rel="stylesheet" href="core-layout.css"> + <link no-shim="" rel="stylesheet" href="core-layout-host.css"> + + </template> + + + +</polymer-element> +<script src="core-layout-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-layout/demo-body.html b/third_party/polymer/components-chromium/core-layout/demo-body.html new file mode 100644 index 0000000..ab92311 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/demo-body.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> +<head> + <title>core-layout demo</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-layout.html"> + <style> + .scroll { + overflow: auto; + } + + .content { + height: 2000px; + } + + div { + border: 3px solid green; + padding: 10px; + } + </style> +</head> +<body is="polymer-body" class="core-fit" unresolved> + <core-layout vertical></core-layout> + <div>Header</div> + <div class="scroll core-flex"> + <section class="content"></section> + </div> + <div>Footer</div> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/demo-css.html b/third_party/polymer/components-chromium/core-layout/demo-css.html new file mode 100644 index 0000000..f8fed78 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/demo-css.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-layout demo</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-layout.html"> + + <style> + body { + font-size: 20px; + } + + layout-demo { + height: 300px; + } + + </style> + +</head> +<body unresolved> + + <polymer-element name="layout-demo" noscript> + <template> + <style> + div { + box-sizing: border-box; + -moz-box-sizing: border-box; + border: 2px solid #ccc; + } + + .abs { + position: absolute; + font-size: 14px; + padding: 4px; + right: 10%; + bottom: 10px; + height: 30px; + width: 70px; + border-radius: 10px; + background: seagreen; + border: none; + } + </style> + <link rel="stylesheet" href="core-layout.css"> + <link rel="stylesheet" href="core-layout-host.css"> + <div class="core-flex core-h"> + <div>Hi I'm some content</div> + <div class="core-flex core-v"> + <div class="core-h core-align-center"> + <h3>Title</h3> + <button>hello</button> + </div> + <div class="core-flex core-h"> + <div class="core-flex core-relative"> + Main content + <div class="abs">abs pos :)</div> + </div> + <div>Sidebar content</div> + </div> + <div>Some more stuffs...</div> + <div class="core-h core-justify-end"> + <b>Footer</b> + </div> + </div> + <div>A last bit, like a panel</div> + </div> + </template> + </polymer-element> + + <h3>core-layout example</h3> + <layout-demo></layout-demo> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/demo-parent.html b/third_party/polymer/components-chromium/core-layout/demo-parent.html new file mode 100644 index 0000000..8700763 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/demo-parent.html @@ -0,0 +1,87 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-layout demo</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-layout.html"> + + <style> + body { + font-size: 20px; + } + + layout-demo { + height: 300px; + } + + </style> + +</head> +<body unresolved> + + <polymer-element name="layout-demo" noscript> + <template> + <style> + div { + box-sizing: border-flow; + -moz-flow-sizing: border-flow; + border: 2px solid #ccc; + } + + .abs { + position: absolute; + font-size: 14px; + padding: 4px; + right: 10%; + bottom: 10px; + height: 30px; + width: 70px; + border-radius: 10px; + background: seagreen; + border: none; + } + </style> + <core-layout></core-layout> + <div core-flex> + <core-layout></core-layout> + <div>Hi I'm some content</div> + <div core-flex> + <core-layout vertical></core-layout> + <div> + <core-layout align="center"></core-layout> + <h3>Title</h3> + <button>hello</button> + </div> + <div core-flex> + <core-layout></core-layout> + <div core-flex class="core-relative"> + Main content + <div class="abs">abs pos :)</div> + </div> + <div>Sidebar content</div> + </div> + <div>Some more stuffs...</div> + <div> + <core-layout justify="end"></core-layout> + <b>Footer</b> + </div> + </div> + <div>A last bit, like a panel</div> + </div> + </template> + </polymer-element> + + <h3>core-layout example</h3> + <layout-demo></layout-demo> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/demo.html b/third_party/polymer/components-chromium/core-layout/demo.html new file mode 100644 index 0000000..46c91b5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/demo.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-layout demo</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-layout.html"> + + <style> + body { + font-size: 20px; + } + + layout-demo { + height: 300px; + } + + </style> + +</head> +<body unresolved> + + <polymer-element name="layout-demo" noscript> + <template> + <style> + div, core-layout { + box-sizing: border-flow; + -moz-flow-sizing: border-flow; + border: 2px solid #ccc; + } + + .abs { + position: absolute; + font-size: 14px; + padding: 4px; + right: 10%; + bottom: 10px; + height: 30px; + width: 70px; + border-radius: 10px; + background: seagreen; + border: none; + } + </style> + <core-layout></core-layout> + <core-layout core-flex> + <div>Hi I'm some content</div> + <core-layout core-flex vertical> + <core-layout align="center"> + <h3>Title</h3> + <button>hello</button> + </core-layout> + <core-layout core-flex> + <div core-flex class="core-relative"> + Main content + <div class="abs">abs pos :)</div> + </div> + <div>Sidebar content</div> + </core-layout> + <div>Some more stuffs...</div> + <core-layout justify="end"> + <b>Footer</b> + </core-layout> + </core-layout> + <div>A last bit, like a panel</div> + </core-layout> + </template> + </polymer-element> + + <h3>core-layout example</h3> + <layout-demo></layout-demo> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/index.html b/third_party/polymer/components-chromium/core-layout/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-layout/metadata.html b/third_party/polymer/components-chromium/core-layout/metadata.html new file mode 100644 index 0000000..e2bbac1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-layout/metadata.html @@ -0,0 +1,15 @@ +<x-meta id="core-layout" label="Layout" group="Core" isContainer> + + <template> + + <core-layout isContainer style="width: 400px; height: 400px;"></core-layout> + + </template> + + <template id="imports"> + + <link rel="import" href="core-layout.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-list/.bower.json b/third_party/polymer/components-chromium/core-list/.bower.json new file mode 100644 index 0000000..286a011 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-list", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-list", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "eac2a2a06e40a0879ab221e73382ebbec5597080" + }, + "_source": "git://github.com/Polymer/core-list.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-list" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-list/README.md b/third_party/polymer/components-chromium/core-list/README.md new file mode 100644 index 0000000..0142d51 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/README.md @@ -0,0 +1,4 @@ +core-list
+============
+
+See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-list) for more information.
diff --git a/third_party/polymer/components-chromium/core-list/bower.json b/third_party/polymer/components-chromium/core-list/bower.json new file mode 100644 index 0000000..40a5bee --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-list", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-list/core-list-extracted.js b/third_party/polymer/components-chromium/core-list/core-list-extracted.js new file mode 100644 index 0000000..bd4c8c6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/core-list-extracted.js @@ -0,0 +1,361 @@ +
+(function() {
+
+ Polymer('core-list', {
+
+ publish: {
+ /**
+ * Fired when an item element is tapped.
+ *
+ * @event core-activate
+ * @param {Object} detail
+ * @param {Object} detail.item the item element
+ */
+
+ /**
+ *
+ * An array of source data for the list to display.
+ *
+ * @attribute data
+ * @type array
+ * @default null
+ */
+ data: null,
+
+ /**
+ *
+ * An optional element on which to listen for scroll events.
+ *
+ * @attribute scrollTarget
+ * @type Element
+ * @default core-list
+ */
+ scrollTarget: null,
+
+ /**
+ *
+ * The height of a list item. `core-list` currently supports only fixed-height
+ * list items. This height must be specified via the height property.
+ *
+ * @attribute height
+ * @type number
+ * @default 80
+ */
+ height: 80,
+
+ /**
+ *
+ * The number of extra items rendered above the minimum set required to
+ * fill the list's height.
+ *
+ * @attribute extraItems
+ * @type number
+ * @default 30
+ */
+ extraItems: 30,
+
+ /**
+ *
+ * The property set on the list view data to represent selection state.
+ * This should set so that it does not conflict with other data properties.
+ * Note, selection data is not stored on the data in given in the data property.
+ *
+ * @attribute selectedProperty
+ * @type string
+ * @default 'selected'
+ */
+ selectedProperty: 'selected',
+
+ // TODO(sorvell): experimental
+ /**
+ *
+ * If true, data is sync'd from the list back to the list's data.
+ *
+ * @attribute sync
+ * @type boolean
+ * @default false
+ */
+ sync: false,
+
+ /**
+ *
+ * Set to true to support multiple selection.
+ *
+ * @attribute multi
+ * @type boolean
+ * @default false
+ */
+ multi: false
+
+ },
+
+ observe: {
+ 'data template scrollTarget': 'initialize'
+ },
+
+ ready: function() {
+ this.clearSelection();
+ this._boundScrollHandler = this.scrollHandler.bind(this);
+ },
+
+ attached: function() {
+ this.template = this.querySelector('template');
+ },
+
+ // TODO(sorvell): it'd be nice to dispense with 'data' and just use
+ // template repeat's model. However, we need tighter integration
+ // with TemplateBinding for this.
+ initialize: function() {
+ if (!this.data || !this.template) {
+ return;
+ }
+ var target = this.scrollTarget || this;
+ if (this._target !== target) {
+ if (this._target) {
+ this._target.removeEventListener('scroll', this._boundScrollHandler, false);
+ }
+ this._target = target;
+ this._target.addEventListener('scroll', this._boundScrollHandler, false);
+ }
+
+ this.initializeViewport();
+ this.initalizeData();
+ this.onMutation(this, this.initializeItems);
+ },
+
+ // TODO(sorvell): need to handle resizing
+ initializeViewport: function() {
+ this.$.viewport.style.height = this.height * this.data.length + 'px';
+ this._visibleCount = Math.ceil(this._target.offsetHeight / this.height);
+ this._physicalCount = Math.min(this._visibleCount + this.extraItems,
+ this.data.length);
+ this._physicalHeight = this.height * this._physicalCount;
+ },
+
+ // TODO(sorvell): selection currently cannot be maintained when
+ // items are added or deleted.
+ initalizeData: function() {
+ var exampleDatum = this.data[0] || {};
+ this._propertyNames = Object.getOwnPropertyNames(exampleDatum);
+ this._physicalData = new Array(this._physicalCount);
+ for (var i = 0; i < this._physicalCount; ++i) {
+ this._physicalData[i] = {};
+ this.updateItem(i, i);
+ }
+ this.template.model = this._physicalData;
+ this.template.setAttribute('repeat', '');
+ },
+
+ initializeItems: function() {
+ this._physicalItems = new Array(this._physicalCount);
+ for (var i = 0, item = this.template.nextElementSibling;
+ item && i < this._physicalCount;
+ ++i, item = item.nextElementSibling) {
+ this._physicalItems[i] = item;
+ item._transformValue = 0;
+ }
+ this.refresh(false);
+ },
+
+ updateItem: function(virtualIndex, physicalIndex) {
+ var virtualDatum = this.data[virtualIndex];
+ var physicalDatum = this._physicalData[physicalIndex];
+ this.pushItemData(virtualDatum, physicalDatum);
+ physicalDatum._physicalIndex = physicalIndex;
+ physicalDatum._virtualIndex = virtualIndex;
+ if (this.selectedProperty) {
+ physicalDatum[this.selectedProperty] = this._selectedData.get(virtualDatum);
+ }
+ },
+
+ pushItemData: function(source, dest) {
+ for (var i = 0; i < this._propertyNames.length; ++i) {
+ var propertyName = this._propertyNames[i];
+ dest[propertyName] = source[propertyName];
+ }
+ },
+
+ // experimental: push physical data back to this.data.
+ // this is optional when scrolling and needs to be called at other times.
+ syncData: function() {
+ if (this.firstPhysicalIndex === undefined ||
+ this.baseVirtualIndex === undefined) {
+ return;
+ }
+ var p, v;
+ for (var i = 0; i < this.firstPhysicalIndex; ++i) {
+ p = this._physicalData[i];
+ v = this.data[this.baseVirtualIndex + this._physicalCount + i];
+ this.pushItemData(p, v);
+ }
+ for (var i = this.firstPhysicalIndex; i < this._physicalCount; ++i) {
+ p = this._physicalData[i];
+ v = this.data[this.baseVirtualIndex + i];
+ this.pushItemData(p, v);
+ }
+ },
+
+ scrollHandler: function(e, detail) {
+ this._scrollTop = e.detail ? e.detail.target.scrollTop : e.target.scrollTop;
+ this.refresh(false);
+ },
+
+ /**
+ * Refresh the list at the current scroll position.
+ *
+ * @method refresh
+ */
+ refresh: function(force) {
+ var firstVisibleIndex = Math.floor(this._scrollTop / this.height);
+ var visibleMidpoint = firstVisibleIndex + this._visibleCount / 2;
+
+ var firstReifiedIndex = Math.max(0, Math.floor(visibleMidpoint -
+ this._physicalCount / 2));
+ firstReifiedIndex = Math.min(firstReifiedIndex, this.data.length -
+ this._physicalCount);
+
+ var firstPhysicalIndex = firstReifiedIndex % this._physicalCount;
+ var baseVirtualIndex = firstReifiedIndex - firstPhysicalIndex;
+
+ var baseTransformValue = Math.floor(this.height * baseVirtualIndex);
+ var nextTransformValue = Math.floor(baseTransformValue +
+ this._physicalHeight);
+
+ var baseTransformString = 'translate3d(0,' + baseTransformValue + 'px,0)';
+ var nextTransformString = 'translate3d(0,' + nextTransformValue + 'px,0)';
+ // TODO(sorvell): experiemental for sync'ing back to virtual data.
+ if (this.sync) {
+ this.syncData();
+ }
+ this.firstPhysicalIndex = firstPhysicalIndex;
+ this.baseVirtualIndex = baseVirtualIndex;
+
+ for (var i = 0; i < firstPhysicalIndex; ++i) {
+ var item = this._physicalItems[i];
+ if (force || item._transformValue != nextTransformValue) {
+ this.updateItem(baseVirtualIndex + this._physicalCount + i, i);
+ setTransform(item, nextTransformString, nextTransformValue);
+ }
+ }
+ for (var i = firstPhysicalIndex; i < this._physicalCount; ++i) {
+ var item = this._physicalItems[i];
+ if (force || item._transformValue != baseTransformValue) {
+ this.updateItem(baseVirtualIndex + i, i);
+ setTransform(item, baseTransformString, baseTransformValue);
+ }
+ }
+ },
+
+ // list selection
+ tapHandler: function(e) {
+ if (e.target === this) {
+ return;
+ }
+ if (this.sync) {
+ this.syncData();
+ }
+ var n = e.target;
+ var model = n.templateInstance && n.templateInstance.model;
+ if (model) {
+ var vi = model._virtualIndex, pi = model._physicalIndex;
+ var data = this.data[vi], item = this._physicalItems[pi];
+ this.$.selection.select(data);
+ this.asyncFire('core-activate', {data: data, item: item});
+ }
+ },
+
+ selectedHandler: function(e, detail) {
+ if (this.selectedProperty) {
+ var i$ = this.indexesForData(detail.item);
+ // TODO(sorvell): we should be relying on selection to store the
+ // selected data but we want to optimize for lookup.
+ this._selectedData.set(detail.item, detail.isSelected);
+ if (i$.physical >= 0) {
+ this.updateItem(i$.virtual, i$.physical);
+ }
+ }
+ },
+
+ /**
+ * Select the list item at the given index.
+ *
+ * @method selectItem
+ * @param {number} index
+ */
+ selectItem: function(index) {
+ var data = this.data[index];
+ if (data) {
+ this.$.selection.select(data);
+ }
+ },
+
+ /**
+ * Set the selected state of the list item at the given index.
+ *
+ * @method setItemSelected
+ * @param {number} index
+ * @param {boolean} isSelected
+ */
+ setItemSelected: function(index, isSelected) {
+ var data = this.data[index];
+ if (data) {
+ this.$.selection.setItemSelected(data, isSelected);
+ }
+ },
+
+ indexesForData: function(data) {
+ var virtual = this.data.indexOf(data);
+ var physical = this.virtualToPhysicalIndex(virtual);
+ return { virtual: virtual, physical: physical };
+ },
+
+ virtualToPhysicalIndex: function(index) {
+ for (var i=0, l=this._physicalData.length; i<l; i++) {
+ if (this._physicalData[i]._virtualIndex === index) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ get selection() {
+ return this.$.selection.getSelection();
+ },
+
+ selectedChanged: function() {
+ this.$.selection.select(this.selected);
+ },
+
+ clearSelection: function() {
+ this._selectedData = new WeakMap();
+ if (this.multi) {
+ var s$ = this.selection;
+ for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {
+ this.$.selection.setItemSelected(s, false);
+ }
+ } else {
+ this.$.selection.setItemSelected(this.selection, false);
+ }
+ this.$.selection.clear();
+ },
+
+ scrollToItem: function(index) {
+ this.scrollTop = index * this.height;
+ }
+
+ });
+
+ // determine proper transform mechanizm
+ if (document.documentElement.style.transform !== undefined) {
+ function setTransform(element, string, value) {
+ element.style.transform = string;
+ element._transformValue = value;
+ }
+ } else {
+ function setTransform(element, string, value) {
+ element.style.webkitTransform = string;
+ element._transformValue = value;
+ }
+ }
+
+})();
diff --git a/third_party/polymer/components-chromium/core-list/core-list.css b/third_party/polymer/components-chromium/core-list/core-list.css new file mode 100644 index 0000000..1e2c9ea --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/core-list.css @@ -0,0 +1,20 @@ +:host {
+ display: block;
+ overflow: auto;
+ /*-webkit-overflow-scrolling: touch;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0);*/
+}
+
+.core-list-viewport > * {
+ overflow: hidden;
+}
+
+.core-list-viewport.horizontal {
+ height: 100%;
+ white-space: nowrap;
+}
+
+.core-list-viewport.horizontal > * {
+ display: inline-block;
+}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-list/core-list.html b/third_party/polymer/components-chromium/core-list/core-list.html new file mode 100644 index 0000000..d15140d --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/core-list.html @@ -0,0 +1,43 @@ +<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+
+<!--
+`core-list` displays a virtual, 'infinite' list. The template inside the
+`core-list` element represents the dom to create for each list item. The
+`data` property specifies an array of list item data. The `height` property
+represents the height of a list item.
+
+By default, the list supports selection via tapping. Styling the selection
+should be done via binding. The `selectedProperty` property is set on the
+list view data for each selected item.
+
+`core-list` manages a viewport of data based on the current scroll position.
+For performance reasons, not every item in the list is rendered at once.
+
+ <core-list data="{{data}}" height="80">
+ <template>
+ <div class="{{ {selected: selected} | tokenList }}">List row: {{index}}</div>
+ </template>
+ </core-list>
+
+@group Polymer Core Elements
+@element core-list
+-->
+<link rel="import" href="../polymer/polymer.html">
+<link rel="import" href="../core-selection/core-selection.html">
+
+<polymer-element name="core-list" on-tap="{{tapHandler}}" assetpath="">
+<template>
+ <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectedHandler}}"></core-selection>
+ <link rel="stylesheet" href="core-list.css">
+ <div id="viewport" class="core-list-viewport"><content></content></div>
+</template>
+
+</polymer-element>
+<script src="core-list-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-list/demo-divider.html b/third_party/polymer/components-chromium/core-list/demo-divider.html new file mode 100644 index 0000000..e3c5984 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/demo-divider.html @@ -0,0 +1,178 @@ +<!doctype html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<html>
+<head>
+ <title>core-list: divider</title>
+ <meta name="viewport" content="width=device-width">
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="core-list.html">
+ <style>
+ html, body {
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ height: 100%;
+ margin: 0;
+ }
+
+ list-test {
+ display: block;
+ height: 100%;
+ margin: 0 auto;
+ }
+
+ .stuff {
+ min-height: 60px;
+ background: red !important;
+ border-bottom: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+
+<list-test></list-test>
+
+<polymer-element name="list-test">
+<template>
+ <style>
+ core-list {
+ height: 100%;
+ }
+
+ .item {
+ box-sizing: border-box;
+ height: 80px;
+ border-bottom: 1px solid #ddd;
+ cursor: default;
+ overflow: hidden;
+ }
+
+ .selected {
+ background: silver;
+ }
+
+ .message {
+ padding-left: 77px;
+ line-height: 167%;
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 60px;
+ }
+
+ .from {
+ display: inline;
+ font-weight: bold;
+ }
+
+ .timestamp {
+ margin-left: 10px;
+ font-size: 12px;
+ opacity: 0.8;
+ }
+
+ .body {
+ font-size: 12px;
+ }
+
+ .hidden {
+ display: none;
+ }
+
+ .divider {
+ height: 80px;
+ box-sizing: border-box;
+ box-shadow: inset 0 8px 40px 0 rgba(0, 0, 0, 0.1);
+ text-transform: uppercase;
+ padding: 36px 20px 0;
+ font-size: 40px;
+ }
+
+ .main {
+ padding: 4px;
+ background-color: white;
+ }
+ </style>
+ <core-list id="list" data="{{data}}" height="80">
+ <template repeat>
+ <div class="item {{ {selected: selected} | tokenList }}">
+ <div class="divider {{ {hidden: !divider} |tokenList}}">{{divider}}</div>
+ <div class="message {{ {hidden: divider} |tokenList}}" style="background-image: url(images/{{index % 4}}.png);">
+ <span class="from">{{name}}</span>
+ <span class="timestamp">{{time}}</span>
+ <div class="subject">Infinite List. {{index}}</div>
+ <div class="body">{{details}}</div>
+ </div>
+ </div>
+ </template>
+ </core-list>
+
+</template>
+<script>
+(function() {
+ var strings = [
+ "PARKOUR!",
+ "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...",
+ "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
+ ];
+
+ var namegen = {
+ generateString: function(inLength) {
+ var s = '';
+ for (var i=0; i<inLength; i++) {
+ s += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
+ }
+ return s;
+ },
+ generateName: function(inMin, inMax) {
+ return this.generateString(Math.floor(Math.random() * (inMax - inMin + 1) + inMin));
+ }
+ };
+
+ Polymer('list-test', {
+ count: 1000,
+ ready: function() {
+ this.data = this.generateData();
+ },
+ generateData: function() {
+ var names = [], data = [];
+ for (var i=0; i<this.count; i++) {
+ names.push(namegen.generateName(4, 8));
+ }
+ names.sort();
+ for (var i=0, o; i<this.count; i++) {
+ var name = names[i];
+ var divider = name.charAt(0);
+ if (divider === (names[i-1] || '').charAt(0)) {
+ divider = null;
+ }
+ o = {
+ index: i,
+ name: name,
+ divider: divider,
+ details: strings[i % 3],
+ time: '8:29pm'
+ };
+ data.push(o);
+ if (divider) {
+ o = Object.create(o);
+ o.divider = false;
+ data.push(o);
+ }
+ }
+ return data;
+ },
+ tapAction: function(e) {
+ console.log('tap', e);
+ }
+ });
+})();
+</script>
+</polymer-element>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-list/demo.html b/third_party/polymer/components-chromium/core-list/demo.html new file mode 100644 index 0000000..8233733 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/demo.html @@ -0,0 +1,154 @@ +<!doctype html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<html>
+<head>
+ <title>core-list</title>
+ <meta name="viewport" content="width=device-width">
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="core-list.html">
+ <style>
+ html, body {
+ height: 100%;
+ margin: 0;
+ }
+
+ list-test {
+ display: block;
+ height: 100%;
+ margin: 0 auto;
+ }
+
+ .stuff {
+ min-height: 60px;
+ background: red !important;
+ border-bottom: 1px solid black;
+ }
+ </style>
+</head>
+<body>
+
+<list-test></list-test>
+
+<polymer-element name="list-test">
+<template>
+ <style>
+ core-list {
+ height: 100%;
+ }
+
+ .item {
+ box-sizing: border-box;
+ height: 80px;
+ border-bottom: 1px solid #ddd;
+ padding: 4px;
+ cursor: default;
+ background-color: white;
+ overflow: hidden;
+ }
+
+ .selected {
+ background: silver;
+ }
+
+ .message {
+ padding-left: 77px;
+ line-height: 167%;
+ background-repeat: no-repeat;
+ background-position: 10px 10px;
+ background-size: 60px;
+ }
+
+ .from {
+ display: inline;
+ font-weight: bold;
+ }
+
+ .timestamp {
+ margin-left: 10px;
+ font-size: 12px;
+ opacity: 0.8;
+ }
+
+ .body {
+ font-size: 12px;
+ }
+ </style>
+ <core-list id="list" data="{{data}}" height="80">
+ <template>
+ <div class="item {{ {selected: selected} | tokenList }}">
+ <div class="message" style="background-image: url(images/{{index % 4}}.png);">
+ <span class="from">{{name}}</span>
+ <span class="timestamp">{{time}}</span>
+ <div class="subject">Infinite List. {{index}}</div>
+ <div class="body">{{details}}</div>
+ </div>
+ </div>
+ </template>
+ </core-list>
+
+</template>
+<script>
+(function() {
+ var strings = [
+ "PARKOUR!",
+ "Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...",
+ "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
+ ];
+
+ var namegen = {
+ generateString: function(inLength) {
+ var s = '';
+ for (var i=0; i<inLength; i++) {
+ s += String.fromCharCode(Math.floor(Math.random() * 26) + 97);
+ }
+ return s;
+ },
+ generateName: function(inMin, inMax) {
+ return this.generateString(Math.floor(Math.random() * (inMax - inMin + 1) + inMin));
+ }
+ };
+
+ Polymer('list-test', {
+ count: 50000,
+ ready: function() {
+ this.data = this.generateData();
+ },
+ generateData: function() {
+ var names = [], data = [];
+ for (var i=0; i<this.count; i++) {
+ names.push(namegen.generateName(4, 8));
+ }
+ names.sort();
+ for (var i=0; i<this.count; i++) {
+ var name = names[i];
+ var divider = name.charAt(0);
+ if (divider === (names[i-1] || '').charAt(0)) {
+ divider = null;
+ }
+ data.push({
+ index: i,
+ name: name,
+ divider: divider,
+ details: strings[i % 3],
+ time: '8:29pm'
+ });
+ }
+ return data;
+ },
+ tapAction: function(e) {
+ console.log('tap', e);
+ }
+ });
+})();
+</script>
+</polymer-element>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-list/images/0.png b/third_party/polymer/components-chromium/core-list/images/0.png Binary files differnew file mode 100644 index 0000000..12397a9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/images/0.png diff --git a/third_party/polymer/components-chromium/core-list/images/1.png b/third_party/polymer/components-chromium/core-list/images/1.png Binary files differnew file mode 100644 index 0000000..6b7e49f --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/images/1.png diff --git a/third_party/polymer/components-chromium/core-list/images/2.png b/third_party/polymer/components-chromium/core-list/images/2.png Binary files differnew file mode 100644 index 0000000..6fba511 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/images/2.png diff --git a/third_party/polymer/components-chromium/core-list/images/3.png b/third_party/polymer/components-chromium/core-list/images/3.png Binary files differnew file mode 100644 index 0000000..d629633 --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/images/3.png diff --git a/third_party/polymer/components-chromium/core-list/index.html b/third_party/polymer/components-chromium/core-list/index.html new file mode 100644 index 0000000..e75c2ca --- /dev/null +++ b/third_party/polymer/components-chromium/core-list/index.html @@ -0,0 +1,22 @@ +<!doctype html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<html>
+<head>
+
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="../core-component-page/core-component-page.html">
+
+</head>
+<body unresolved>
+
+ <core-component-page></core-component-page>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-localstorage/.bower.json b/third_party/polymer/components-chromium/core-localstorage/.bower.json new file mode 100644 index 0000000..8331406 --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-localstorage", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-localstorage", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "fcd9792aa1bf34e52a6b976f7d025d5d5a5c199d" + }, + "_source": "git://github.com/Polymer/core-localstorage.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-localstorage" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-localstorage/README.md b/third_party/polymer/components-chromium/core-localstorage/README.md new file mode 100644 index 0000000..241035b --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/README.md @@ -0,0 +1,4 @@ +core-localstorage +================= + +See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-localstorage) for more information. diff --git a/third_party/polymer/components-chromium/core-localstorage/bower.json b/third_party/polymer/components-chromium/core-localstorage/bower.json new file mode 100644 index 0000000..2b2f2f8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-localstorage", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-localstorage/core-localstorage-extracted.js b/third_party/polymer/components-chromium/core-localstorage/core-localstorage-extracted.js new file mode 100644 index 0000000..38f0ac9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/core-localstorage-extracted.js @@ -0,0 +1,97 @@ + + + Polymer('core-localstorage', { + + /** + * Fired when a value is loaded from localStorage. + * @event core-localstorage-load + */ + + /** + * The key to the data stored in localStorage. + * + * @attribute name + * @type string + * @default null + */ + name: '', + + /** + * The data associated with the specified name. + * + * @attribute value + * @type object + * @default null + */ + value: null, + + /** + * If true, the value is stored and retrieved without JSON processing. + * + * @attribute useRaw + * @type boolean + * @default false + */ + useRaw: false, + + /** + * If true, auto save is disabled. + * + * @attribute autoSaveDisabled + * @type boolean + * @default false + */ + autoSaveDisabled: false, + + attached: function() { + // wait for bindings are all setup + this.async('load'); + }, + + valueChanged: function() { + if (this.loaded && !this.autoSaveDisabled) { + this.save(); + } + }, + + load: function() { + var v = localStorage.getItem(this.name); + if (this.useRaw) { + this.value = v; + } else { + // localStorage has a flaw that makes it difficult to determine + // if a key actually exists or not (getItem returns null if the + // key doesn't exist, which is not distinguishable from a stored + // null value) + // however, if not `useRaw`, an (unparsed) null value unambiguously + // signals that there is no value in storage (a stored null value would + // be escaped, i.e. "null") + // in this case we save any non-null current (default) value + if (v === null) { + if (this.value !== null) { + this.save(); + } + } else { + try { + v = JSON.parse(v); + } catch(x) { + } + this.value = v; + } + } + this.loaded = true; + this.asyncFire('core-localstorage-load'); + }, + + /** + * Saves the value to localStorage. + * + * @method save + */ + save: function() { + var v = this.useRaw ? this.value : JSON.stringify(this.value); + localStorage.setItem(this.name, v); + } + + }); + diff --git a/third_party/polymer/components-chromium/core-localstorage/core-localstorage.html b/third_party/polymer/components-chromium/core-localstorage/core-localstorage.html new file mode 100644 index 0000000..b28bd6a --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/core-localstorage.html @@ -0,0 +1,32 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +Element access to localStorage. The "name" property +is the key to the data ("value" property) stored in localStorage. + +`core-localstorage` automatically saves the value to localStorage when +value is changed. Note that if value is an object auto-save will be +triggered only when value is a different instance. + + <core-localstorage name="my-app-storage" value="{{value}}"></core-localstorage> + +@group Polymer Core Elements +@element core-localstorage +@blurb Element access to localStorage. +@url github.io +@categories Data +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-localstorage" attributes="name value useRaw autoSaveDisabled" hidden assetpath=""> + +</polymer-element> +<script src="core-localstorage-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-localstorage/demo.html b/third_party/polymer/components-chromium/core-localstorage/demo.html new file mode 100644 index 0000000..428ea7d --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/demo.html @@ -0,0 +1,41 @@ +<!doctype html> +<html> +<head> + + <title>polymer-localstorage</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-localstorage.html"> + +</head> +<body> + + <x-test1></x-test1> + + <polymer-element name="x-test1" noscript> + <template> + string entered below will be stored in localStorage and automatically retrived from localStorage when the page is reloaded<br> + <input value="{{value}}"> + <core-localstorage name="polymer-localstorage-x-test1" value="{{value}}"></core-localstorage> + </template> + </polymer-element> + + <br><br> + + <x-test2></x-test2> + + <polymer-element name="x-test2"> + <template> + <input type="checkbox" checked="{{mode}}"> + <core-localstorage name="polymer-localstorage-x-test2" value="{{mode}}"></core-localstorage> + </template> + <script> + Polymer('x-test2', { + mode: false + }); + </script> + </polymer-element> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-localstorage/index.html b/third_party/polymer/components-chromium/core-localstorage/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-localstorage/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-media-query/.bower.json b/third_party/polymer/components-chromium/core-media-query/.bower.json new file mode 100644 index 0000000..1d58491 --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-media-query", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-media-query", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "a6e34b10bc9a8cf0a5bcefec818ac0d9f3fca1b2" + }, + "_source": "git://github.com/Polymer/core-media-query.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-media-query" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-media-query/README.md b/third_party/polymer/components-chromium/core-media-query/README.md new file mode 100644 index 0000000..2eeb93e --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/README.md @@ -0,0 +1,4 @@ +core-media-query +================ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-media-query) for more information. diff --git a/third_party/polymer/components-chromium/core-media-query/bower.json b/third_party/polymer/components-chromium/core-media-query/bower.json new file mode 100644 index 0000000..4dff6e2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-media-query", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-media-query/core-media-query-extracted.js b/third_party/polymer/components-chromium/core-media-query/core-media-query-extracted.js new file mode 100644 index 0000000..c73f58b --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/core-media-query-extracted.js @@ -0,0 +1,42 @@ + + Polymer('core-media-query', { + + /** + * The Boolean return value of the media query + * + * @attribute queryMatches + * @type Boolean + * @default false + */ + queryMatches: false, + + /** + * The CSS media query to evaulate + * + * @attribute query + * @type string + * @default '' + */ + query: '', + ready: function() { + this._mqHandler = this.queryHandler.bind(this); + this._mq = null; + }, + queryChanged: function() { + if (this._mq) { + this._mq.removeListener(this._mqHandler); + } + var query = this.query; + if (query[0] !== '(') { + query = '(' + this.query + ')'; + } + this._mq = window.matchMedia(query); + this._mq.addListener(this._mqHandler); + this.queryHandler(this._mq); + }, + queryHandler: function(mq) { + this.queryMatches = mq.matches; + this.asyncFire('core-media-change', mq); + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-media-query/core-media-query.html b/third_party/polymer/components-chromium/core-media-query/core-media-query.html new file mode 100644 index 0000000..2858832 --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/core-media-query.html @@ -0,0 +1,47 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +/** + * @group Polymer Core Elements + * @element core-media-query + * @status beta + * @homepage github.io + * + * core-media-query can be used to data bind to a CSS media query. + * The "query" property is a bare CSS media query. + * The "queryMatches" property will be a boolean representing if the page matches that media query. + * + * core-media-query uses media query listeners to dynamically update the "queryMatches" property. + * A "core-media-change" event also fires when queryMatches changes. + * + * Example: + * + * <core-media-query query="max-width: 640px" queryMatches="{{phoneScreen}}"></core-media-query> + * + */ + + /** + * Fired when the media query state changes + * + * @event core-media-change + */ +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-media-query" attributes="query queryMatches" assetpath=""> + <template> + <style> + :host { + display: none; + } + </style> + </template> + +</polymer-element> +<script src="core-media-query-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-media-query/demo.html b/third_party/polymer/components-chromium/core-media-query/demo.html new file mode 100644 index 0000000..b45494a --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/demo.html @@ -0,0 +1,44 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Polymer match media</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="core-media-query.html" /> +</head> +<body> + + <polymer-element name="match-example"> + <template> + <core-media-query query="{{query}}" queryMatches="{{qMatches}}"></core-media-query> + My query of "{{query}}" {{qMatches ? "matches" : "doesn't match"}} + </template> + <script> + Polymer('match-example', { + query: 'min-width: 600px' + }); + </script> + </polymer-element> + + <match-example id="me"></match-example> + <pre id="output"> + Log of 'mediachange' events on document, from polymer-match-media: + </pre> + + <script> + var output = document.querySelector('#output'); + // on-mediachange would give true or false as second param to the handler + document.addEventListener('core-media-change', function(e) { + output.textContent += '\nevent: ' + e.type + ' query: ' + e.detail.media + ' matches: ' + e.detail.matches; + }); + </script> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-media-query/index.html b/third_party/polymer/components-chromium/core-media-query/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-media-query/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-menu-button/.bower.json b/third_party/polymer/components-chromium/core-menu-button/.bower.json new file mode 100644 index 0000000..032e280 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/.bower.json @@ -0,0 +1,22 @@ +{ + "name": "core-menu-button", + "private": false, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-menu-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "9457832fed31a58b392c2a04911b209ca10252cd" + }, + "_source": "git://github.com/Polymer/core-menu-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-menu-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu-button/README.md b/third_party/polymer/components-chromium/core-menu-button/README.md new file mode 100644 index 0000000..033027e --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/README.md @@ -0,0 +1,2 @@ +core-menu-button +================ diff --git a/third_party/polymer/components-chromium/core-menu-button/bower.json b/third_party/polymer/components-chromium/core-menu-button/bower.json new file mode 100644 index 0000000..c63493e --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/bower.json @@ -0,0 +1,11 @@ +{ + "name": "core-menu-button", + "private": false, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu-button/core-menu-button-extracted.js b/third_party/polymer/components-chromium/core-menu-button/core-menu-button-extracted.js new file mode 100644 index 0000000..4bc658c --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/core-menu-button-extracted.js @@ -0,0 +1,63 @@ + + Polymer('core-menu-button', { + /** + * The icon to display. + * @attribute icon + * @type string + */ + icon: 'dots', + src: '', + /** + * The index of the selected menu item. + * @attribute selected + * @type number + */ + selected: '', + /** + * Set to true to open the menu. + * @attribute opened + * @type boolean + */ + opened: false, + /** + * Set to true to cause the menu popup to be displayed inline rather + * than in its own layer. + * @attribute inlineMenu + * @type boolean + */ + inlineMenu: false, + /** + * Horizontally align the overlay with the button. Accepted values are + * ["left", "center", "right"]. + * @attribute halign + * @type string + */ + halign: 'center', + /** + * Display the overlay on top or below the button. Accepted values are + * ["top", "bottom"]. + * @attribute valign + * @type string + */ + valign: 'bottom', + multi: false, + closeAction: function() { + this.opened = false; + }, + /** + * Toggle the opened state of the dropdown. + * @method toggle + */ + toggle: function() { + this.opened = !this.opened; + }, + /** + * The selected menu item. + * @property selection + * @type Node + */ + get selection() { + return this.$.menu.selection; + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu-button/core-menu-button.css b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.css new file mode 100644 index 0000000..03b5bb5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.css @@ -0,0 +1,10 @@ +/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ + +:host { + position: relative; + display: inline-block; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html new file mode 100644 index 0000000..bb7348f --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/core-menu-button.html @@ -0,0 +1,76 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +/** + * @module Polymer Core Elements + */ +/** + * core-menu-button is a core-icon-button with a drop down menu + * that allows the user to select an option. The drop down menu is styled with + * an arrow pointing to the button, and can be positioned to the top or the + * bottom of the button with the valign property. The valign property aligns + * the menu to the left or right edge of the button. + * + * Example: + * + * <core-menu-button selected="0"> + * <core-item icon="settings" label="Settings"></core-item> + * <core-item icon="dialog" label="Dialog"></core-item> + * <core-item icon="search" label="Search"></core-item> + * </core-menu-button> + * + * @class core-menu-button + */ +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-icon-button/core-icon-button.html" rel="import"> +<link href="../core-menu/core-menu.html" rel="import"> +<link href="../core-overlay/core-overlay.html" rel="import"> + +<polymer-element name="core-menu-button" attributes="icon label src selected opened halign valign valueattr multi inlineMenu" assetpath=""> + <template> + <link rel="stylesheet" href="core-menu-button.css"> + <core-overlay target="{{$.overlay}}" opened="{{opened}}" layered?="{{!inlineMenu}}"></core-overlay> + <core-icon-button id="button" on-tap="{{toggle}}" src="{{src}}" icon="{{icon}}" active="{{opened}}"><span>{{label}}</span></core-icon-button> + <div id="overlay" halign="{{halign}}" valign="{{valign}}"> + <style> + #overlay { + position: absolute; + left: 0px; + top: 40px; + padding: 8px; + background: #fff; + border: 1px solid #ccc; + border-radius: 3px; + /* overlay styling must be complete */ + font-size: 1rem; + } + + core-menu { + margin: 0; + } + + #overlay[halign=right] { + left: auto; + right: 0px; + } + + #overlay[valign=top] { + top: auto; + bottom: 40px; + } + </style> + <core-menu id="menu" selected="{{selected}}" selecteditem="{{selectedItem}}" selectedclass="{{selectedClass}}" valueattr="{{valueattr}}" multi="{{multi}}" on-core-select="{{closeAction}}"> + <content select="*"></content> + </core-menu> + </div> + </template> + +</polymer-element> +<script src="core-menu-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu-button/demo.html b/third_party/polymer/components-chromium/core-menu-button/demo.html new file mode 100644 index 0000000..6235b31 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/demo.html @@ -0,0 +1,90 @@ + +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>core-menu-button</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="core-menu-button.html"> + <link rel="import" href="../core-item/core-item.html"> + <link rel="import" href="../core-toolbar/core-toolbar.html"> + <style> + body { + margin: 0; + font-family: sans-serif; + } + + core-toolbar { + background-color: #cfa0e9; + overflow: hidden; + } + + .small::shadow core-icon-button { + padding: 12px; + } + + .small::shadow core-icon-button::shadow core-icon { + display: block; + height: 14px; + width: 14px; + } + + </style> +</head> +<body class="core-body-text" unresolved> + + + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <br> + <core-toolbar> + + <core-menu-button icon="menu"> + + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="add" label="Add"></core-item> + <core-item icon="search" label="Search"></core-item> + + </core-menu-button> + + <core-menu-button icon="menu" class="small"> + + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="add" label="Add"></core-item> + <core-item icon="search" label="Search"></core-item> + + </core-menu-button> + + <div core-flex>Toolbar</div> + + <core-menu-button icon="add" halign="right"> + + <core-item icon="star-rate" label="Rate"></core-item> + <core-item icon="today" label="Today"></core-item> + <core-item icon="keep" label="Keep"></core-item> + + </core-menu-button> + + <core-menu-button icon="more-vert" halign="right" valign="top"> + + <core-item icon="visibility" label="Visibility"></core-item> + <core-item icon="extension" label="Extension"></core-item> + <core-item icon="info" label="Info"></core-item> + + </core-menu-button> + + </core-toolbar> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-menu-button/index.html b/third_party/polymer/components-chromium/core-menu-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-menu-button/metadata.html b/third_party/polymer/components-chromium/core-menu-button/metadata.html new file mode 100644 index 0000000..7f9f545 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu-button/metadata.html @@ -0,0 +1,17 @@ +<x-meta id="core-menu-button" label="Menu Button" group="Core" isContainer> + + <template> + <core-menu-button icon="more-vert" selected="0"> + <core-item icon="content-cut" label="Cut"></core-item> + <core-item icon="content-copy" label="Copy"></core-item> + <core-item icon="content-paste" label="Paste"></core-item> + </core-menu-button> + </template> + + <template id="imports"> + <link rel="import" href="core-menu-button.html"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="../core-item/core-item.html"> + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu/.bower.json b/third_party/polymer/components-chromium/core-menu/.bower.json new file mode 100644 index 0000000..ebd2e88 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "core-menu", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-collapse": "Polymer/core-collapse#>=0.3.0 <1.0.0", + "core-item": "Polymer/core-item#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-menu", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "854fbf7e6e3a6cc406a50825733796f66ae588cc" + }, + "_source": "git://github.com/Polymer/core-menu.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-menu" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu/README.md b/third_party/polymer/components-chromium/core-menu/README.md new file mode 100644 index 0000000..a6b2cfd --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/README.md @@ -0,0 +1,4 @@ +core-menu +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-menu) for more information. diff --git a/third_party/polymer/components-chromium/core-menu/bower.json b/third_party/polymer/components-chromium/core-menu/bower.json new file mode 100644 index 0000000..3f49f80 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/bower.json @@ -0,0 +1,9 @@ +{ + "name": "core-menu", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-collapse": "Polymer/core-collapse#>=0.3.0 <1.0.0", + "core-item": "Polymer/core-item#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu/core-menu.css b/third_party/polymer/components-chromium/core-menu/core-menu.css new file mode 100644 index 0000000..7cf6ab5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/core-menu.css @@ -0,0 +1,18 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +html /deep/ core-menu { + display: block; + margin: 12px; +} + +polyfill-next-selector { content: 'core-menu > core-item'; } +html /deep/ core-menu::shadow ::content > core-item { + cursor: default; +} diff --git a/third_party/polymer/components-chromium/core-menu/core-menu.html b/third_party/polymer/components-chromium/core-menu/core-menu.html new file mode 100644 index 0000000..e9aba77 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/core-menu.html @@ -0,0 +1,62 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-menu` is a selector which styles to looks like a menu. + + <core-menu selected="0"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + +When an item is selected the `core-selected` class is added to it. The user can +use the class to add more stylings to the selected item. + + core-item.core-selected { + color: red; + } + +The `selectedItem` property references the selected item. + + <core-menu selected="0" selectedItem="{{item}}"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + + <div>selected label: {{item.label}}</div> + +The `core-select` event signals selection change. + + <core-menu selected="0" on-core-select="{{selectAction}}"> + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="dialog" label="Dialog"></core-item> + <core-item icon="search" label="Search"></core-item> + </core-menu> + + ... + + selectAction: function(e, detail) { + if (detail.isSelected) { + var selectedItem = detail.item; + ... + } + } + +@group Polymer Core Elements +@element core-menu +@extends core-selector +--> + +<link rel="import" href="../core-selector/core-selector.html"> + +<link rel="stylesheet" href="core-menu.css" shim-shadowdom> + +<polymer-element name="core-menu" extends="core-selector" noscript></polymer-element> diff --git a/third_party/polymer/components-chromium/core-menu/core-submenu-extracted.js b/third_party/polymer/components-chromium/core-menu/core-submenu-extracted.js new file mode 100644 index 0000000..0f0c385 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/core-submenu-extracted.js @@ -0,0 +1,45 @@ + + + Polymer('core-submenu', { + + publish: { + active: {value: false, reflect: true} + }, + + opened: false, + + get items() { + return this.$.submenu.items; + }, + + hasItems: function() { + return !!this.items.length; + }, + + unselectAllItems: function() { + this.$.submenu.selected = null; + this.$.submenu.clearSelection(); + }, + + activeChanged: function() { + if (this.hasItems()) { + this.opened = this.active; + } + if (!this.active) { + this.unselectAllItems(); + } + }, + + toggle: function() { + this.opened = !this.opened; + }, + + activate: function() { + if (this.hasItems() && this.active) { + this.toggle(); + this.unselectAllItems(); + } + } + + }); + diff --git a/third_party/polymer/components-chromium/core-menu/core-submenu.css b/third_party/polymer/components-chromium/core-menu/core-submenu.css new file mode 100644 index 0000000..54c7f5b --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/core-submenu.css @@ -0,0 +1,29 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +*/ + +:host { + display: block; + height: auto; +} + +:host(.core-selected, [active]) { + font-weight: initial; +} + +core-item { + cursor: default; +} + +::content > core-item { + cursor: default; +} + +#submenu { + margin: 0 0 0 44px; +} diff --git a/third_party/polymer/components-chromium/core-menu/core-submenu.html b/third_party/polymer/components-chromium/core-menu/core-submenu.html new file mode 100644 index 0000000..1323548 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/core-submenu.html @@ -0,0 +1,62 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> + +<!-- +Use to create nested menus inside of `core-menu` elements. + + <core-menu selected="0"> + + <core-submenu icon="settings" label="Topics"> + <core-item label="Topic 1"></core-item> + <core-item label="Topic 2"></core-item> + </core-submenu> + + <core-submenu icon="settings" label="Favorites"> + <core-item label="Favorite 1"></core-item> + <core-item label="Favorite 2"></core-item> + <core-item label="Favorite 3"></core-item> + </core-submenu> + + </core-menu> + +There is a margin set on the submenu to indent the items. +You can override the margin by doing: + + core-submenu::shadow #submenu { + margin-left: 20px; + } + +@group Polymer Core Elements +@element core-submenu +@extends core-item +--> + +<link rel="import" href="../core-item/core-item.html"> +<link rel="import" href="core-menu.html"> +<link rel="import" href="../core-collapse/core-collapse.html"> + +<polymer-element name="core-submenu" attributes="selected selectedItem label icon src valueattr" assetpath=""> +<template> + + <link rel="stylesheet" href="core-submenu.css"> + + <core-item src="{{src}}" label="{{label}}" icon="{{icon}}" class="{{ {'core-selected' : active} | tokenList}}" on-tap="{{activate}}"> + <content select=".item-content"></content> + </core-item> + + <core-menu id="submenu" selected="{{selected}}" selecteditem="{{selectedItem}}" valueattr="{{valueattr}}"> + <content></content> + </core-menu> + + <core-collapse target="{{$.submenu}}" opened="{{opened}}"></core-collapse> + +</template> + +</polymer-element> +<script src="core-submenu-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-menu/demo.html b/third_party/polymer/components-chromium/core-menu/demo.html new file mode 100644 index 0000000..edb9581 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/demo.html @@ -0,0 +1,101 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + + <title>core-menu</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="core-menu.html"> + <link rel="import" href="core-submenu.html"> + <link rel="import" href="../core-item/core-item.html"> + + <style> + + body { + font-family: sans-serif; + margin: 20px; + } + + section { + width: 300px; + } + + .dark { + background-color: #333; + } + + .dark core-item { + color: #fafafa; + fill: #fafafa; + } + + </style> + +</head> +<body> + + <h2>simple menu:</h2> + + <section> + + <core-menu selected="0"> + + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="favorite" label="Favorite"></core-item> + <core-item icon="account-box" label="Account"></core-item> + + </core-menu> + + </section> + + <h2>simple menu:</h2> + + <section class="dark"> + + <core-menu selected="0"> + + <core-item icon="settings" label="Settings"></core-item> + <core-item icon="favorite" label="Favorite"></core-item> + <core-item icon="account-box" label="Account"></core-item> + + </core-menu> + + </section> + + <h2>submenu:</h2> + + <section> + + <core-menu selected="0"> + + <core-submenu icon="settings" label="Topics"> + + <core-item label="Topic 1"></core-item> + <core-item label="Topic 2"></core-item> + + </core-submenu> + + <core-submenu icon="settings" label="Favorites"> + + <core-item label="Favorite 1"></core-item> + <core-item label="Favorite 2"></core-item> + <core-item label="Favorite 3"></core-item> + + </core-submenu> + + </core-menu> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-menu/index.html b/third_party/polymer/components-chromium/core-menu/index.html new file mode 100644 index 0000000..524991f --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["core-menu.html", "core-submenu.html", "../core-selector/core-selector.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-menu/metadata.html b/third_party/polymer/components-chromium/core-menu/metadata.html new file mode 100644 index 0000000..4fa1f39 --- /dev/null +++ b/third_party/polymer/components-chromium/core-menu/metadata.html @@ -0,0 +1,53 @@ +<x-meta id="core-menu" label="Menu" group="Core" isContainer> + + <template> + + <core-menu selected="0" style="font-size: 16px;"> + + <core-submenu icon="settings" label="Topics"> + + <core-item label="Topic 1"></core-item> + <core-item label="Topic 2"></core-item> + + </core-submenu> + + <core-submenu icon="settings" label="Favorites"> + + <core-item label="Favorite 1"></core-item> + <core-item label="Favorite 2"></core-item> + <core-item label="Favorite 3"></core-item> + + </core-submenu> + + </core-menu> + + </template> + + <template id="imports"> + + <link rel="import" href="core-submenu.html"> + + </template> + +</x-meta> + +<x-meta id="core-submenu" label="Sub Menu" group="Core" isContainer> + + <template> + + <core-submenu icon="settings" label="Topics"> + + <core-item label="Topic 1"></core-item> + <core-item label="Topic 2"></core-item> + + </core-submenu> + + </template> + + <template id="imports"> + + <link rel="import" href="core-submenu.html"> + + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-meta/.bower.json b/third_party/polymer/components-chromium/core-meta/.bower.json new file mode 100644 index 0000000..561477b --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-meta", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-meta", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "4d2a4cf723403a6ee0575e3863be843648db32ec" + }, + "_source": "git://github.com/Polymer/core-meta.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-meta" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-meta/README.md b/third_party/polymer/components-chromium/core-meta/README.md new file mode 100644 index 0000000..d8da644 --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/README.md @@ -0,0 +1,4 @@ +core-meta +========= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-meta) for more information. diff --git a/third_party/polymer/components-chromium/core-meta/bower.json b/third_party/polymer/components-chromium/core-meta/bower.json new file mode 100644 index 0000000..1ae7894 --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-meta", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-meta/core-meta-extracted.js b/third_party/polymer/components-chromium/core-meta/core-meta-extracted.js new file mode 100644 index 0000000..c4e60a3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/core-meta-extracted.js @@ -0,0 +1,83 @@ + + + (function() { + + var SKIP_ID = 'meta'; + var metaData = {}, metaArray = {}; + + Polymer('core-meta', { + + /** + * The type of meta-data. All meta-data with the same type with be + * stored together. + * + * @attribute type + * @type string + * @default 'default' + */ + type: 'default', + + alwaysPrepare: true, + + ready: function() { + this.register(this.id); + }, + + get metaArray() { + var t = this.type; + if (!metaArray[t]) { + metaArray[t] = []; + } + return metaArray[t]; + }, + + get metaData() { + var t = this.type; + if (!metaData[t]) { + metaData[t] = {}; + } + return metaData[t]; + }, + + register: function(id, old) { + if (id && id !== SKIP_ID) { + this.unregister(this, old); + this.metaData[id] = this; + this.metaArray.push(this); + } + }, + + unregister: function(meta, id) { + delete this.metaData[id || meta.id]; + var i = this.metaArray.indexOf(meta); + if (i >= 0) { + this.metaArray.splice(i, 1); + } + }, + + /** + * Returns a list of all meta-data elements with the same type. + * + * @property list + * @type array + * @default [] + */ + get list() { + return this.metaArray; + }, + + /** + * Retrieves meta-data by ID. + * + * @method byId + * @param {String} id The ID of the meta-data to be returned. + * @returns Returns meta-data. + */ + byId: function(id) { + return this.metaData[id]; + } + + }); + + })(); + diff --git a/third_party/polymer/components-chromium/core-meta/core-meta.html b/third_party/polymer/components-chromium/core-meta/core-meta.html new file mode 100644 index 0000000..376f93e --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/core-meta.html @@ -0,0 +1,63 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-meta` provides a method of constructing a self-organizing database. +It is useful to collate element meta-data for things like catalogs and for +designer. + +Example, an element folder has a `metadata.html` file in it, that contains a +`core-meta`, something like this: + + <core-meta id="my-element" label="My Element"> + <property name="color" value="blue"></property> + </core-meta> + +An application can import as many of these files as it wants, and then use +`core-meta` again to access the collected data. + + <script> + var meta = document.createElement('core-meta'); + console.log(meta.list); // dump a list of all meta-data elements that have been created + </script> + +Use `byId(id)` to retrive a specific core-meta. + + <script> + var meta = document.createElement('core-meta'); + console.log(meta.byId('my-element')); + </script> + +By default all meta-data are stored in a single databse. If your meta-data +have different types and want them to be stored separately, use `type` to +differentiate them. + +Example: + + <core-meta id="x-foo" type="xElt"></core-meta> + <core-meta id="x-bar" type="xElt"></core-meta> + <core-meta id="y-bar" type="yElt"></core-meta> + + <script> + var meta = document.createElement('core-meta'); + meta.type = 'xElt'; + console.log(meta.list); + </script> + +@group Polymer Core Elements +@element core-meta +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-meta" attributes="label type" hidden assetpath=""> + +</polymer-element> +<script src="core-meta-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-meta/demo.html b/third_party/polymer/components-chromium/core-meta/demo.html new file mode 100644 index 0000000..dbcf01e --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/demo.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-meta</title> + + <script src="../platform/platform.js"></script> + <link rel="import" href="core-meta.html"> +</head> + +<body> + + <core-meta id="x-foo" label="foo"></core-meta> + <core-meta id="x-bar" label="bar"></core-meta> + <core-meta id="x-zot" label="zot"></core-meta> + + <core-meta id="apple" label="apple" type="fruit"></core-meta> + <core-meta id="orange" label="orange" type="fruit"></core-meta> + <core-meta id="grape" label="grape" type="fruit"></core-meta> + + <h2>meta-data</h2> + + <template id="default" repeat="{{metadata}}"> + <div>{{label}}</div> + </template> + + <h2>meta-data (type: fruit)</h2> + + <template id="fruit" repeat="{{metadata}}"> + <div>{{label}}</div> + </template> + + <script> + + document.addEventListener('polymer-ready', function() { + var meta = document.createElement('core-meta'); + document.querySelector('template#default').model = { + metadata: meta.list + }; + + var fruitMeta = document.createElement('core-meta'); + fruitMeta.type = 'fruit'; + document.querySelector('template#fruit').model = { + metadata: fruitMeta.list + }; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-meta/index.html b/third_party/polymer/components-chromium/core-meta/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-meta/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-overlay/.bower.json b/third_party/polymer/components-chromium/core-overlay/.bower.json new file mode 100644 index 0000000..b3df2b6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-overlay", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-overlay", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "4912afb4418ce4a173b37e09020d6622870054e2" + }, + "_source": "git://github.com/Polymer/core-overlay.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-overlay" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/README.md b/third_party/polymer/components-chromium/core-overlay/README.md new file mode 100644 index 0000000..54713e0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/README.md @@ -0,0 +1,4 @@ +core-overlay +============ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-overlay) for more information. diff --git a/third_party/polymer/components-chromium/core-overlay/bower.json b/third_party/polymer/components-chromium/core-overlay/bower.json new file mode 100644 index 0000000..6f91dbe --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-overlay", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/core-key-helper-extracted.js b/third_party/polymer/components-chromium/core-overlay/core-key-helper-extracted.js new file mode 100644 index 0000000..31f0f70 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-key-helper-extracted.js @@ -0,0 +1,6 @@ + + Polymer('core-key-helper', { + ENTER_KEY: 13, + ESCAPE_KEY: 27 + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/core-key-helper.html b/third_party/polymer/components-chromium/core-overlay/core-key-helper.html new file mode 100644 index 0000000..061d089 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-key-helper.html @@ -0,0 +1,15 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-key-helper" assetpath=""> + +</polymer-element> +<script src="core-key-helper-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/core-overlay-extracted.js b/third_party/polymer/components-chromium/core-overlay/core-overlay-extracted.js new file mode 100644 index 0000000..5899529 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-overlay-extracted.js @@ -0,0 +1,588 @@ + +(function() { + + Polymer('core-overlay', { + + publish: { + /** + * The target element that will be shown when the overlay is + * opened. If unspecified, the core-overlay itself is the target. + * + * @attribute target + * @type Object + * @default the overlay element + */ + target: null, + + + /** + * A `core-overlay`'s size is guaranteed to be + * constrained to the window size. To achieve this, the sizingElement + * is sized with a max-height/width. By default this element is the + * target element, but it can be specifically set to a specific element + * inside the target if that is more appropriate. This is useful, for + * example, when a region inside the overlay should scroll if needed. + * + * @attribute sizingTarget + * @type Object + * @default the target element + */ + sizingTarget: null, + + /** + * Set opened to true to show an overlay and to false to hide it. + * A `core-overlay` may be made initially opened by setting its + * `opened` attribute. + * @attribute opened + * @type boolean + * @default false + */ + opened: false, + + /** + * If true, the overlay has a backdrop darkening the rest of the screen. + * The backdrop element is attached to the document body and may be styled + * with the class `core-overlay-backdrop`. When opened the `core-opened` + * class is applied. + * + * @attribute backdrop + * @type boolean + * @default false + */ + backdrop: false, + + /** + * If true, the overlay is guaranteed to display above page content. + * + * @attribute layered + * @type boolean + * @default false + */ + layered: false, + + /** + * By default an overlay will close automatically if the user + * taps outside it or presses the escape key. Disable this + * behavior by setting the `autoCloseDisabled` property to true. + * @attribute autoCloseDisabled + * @type boolean + * @default false + */ + autoCloseDisabled: false, + + /** + * This property specifies an attribute on elements that should + * close the overlay on tap. Should not set `closeSelector` if this + * is set. + * + * @attribute closeAttribute + * @type string + * @default "core-overlay-toggle" + */ + closeAttribute: 'core-overlay-toggle', + + /** + * This property specifies a selector matching elements that should + * close the overlay on tap. Should not set `closeAttribute` if this + * is set. + * + * @attribute closeSelector + * @type string + * @default "" + */ + closeSelector: '', + + /** + * A `core-overlay` target's size is constrained to the window size. + * The `margin` property specifies a pixel amount around the overlay + * that will be reserved. It's useful for ensuring that, for example, + * a shadow displayed outside the target will always be visible. + * + * @attribute margin + * @type number + * @default 0 + */ + margin: 0, + + /** + * The transition property specifies a string which identifies a + * <a href="../core-transition/">`core-transition`</a> element that + * will be used to help the overlay open and close. The default + * `core-transition-fade` will cause the overlay to fade in and out. + * + * @attribute transition + * @type string + * @default 'core-transition-fade' + */ + transition: 'core-transition-fade' + + }, + + captureEventName: 'tap', + targetListeners: { + 'tap': 'tapHandler', + 'keydown': 'keydownHandler', + 'core-transitionend': 'transitionend' + }, + + registerCallback: function(element) { + this.layer = document.createElement('core-overlay-layer'); + this.keyHelper = document.createElement('core-key-helper'); + this.meta = document.createElement('core-transition'); + this.scrim = document.createElement('div'); + this.scrim.className = 'core-overlay-backdrop'; + }, + + ready: function() { + this.target = this.target || this; + // flush to ensure styles are installed before paint + Platform.flush(); + }, + + /** + * Toggle the opened state of the overlay. + * @method toggle + */ + toggle: function() { + this.opened = !this.opened; + }, + + /** + * Open the overlay. This is equivalent to setting the `opened` + * property to true. + * @method open + */ + open: function() { + this.opened = true; + }, + + /** + * Close the overlay. This is equivalent to setting the `opened` + * property to false. + * @method close + */ + close: function() { + this.opened = false; + }, + + domReady: function() { + this.ensureTargetSetup(); + }, + + targetChanged: function(old) { + if (this.target) { + // really make sure tabIndex is set + if (this.target.tabIndex < 0) { + this.target.tabIndex = -1; + } + this.addElementListenerList(this.target, this.targetListeners); + this.target.style.display = 'none'; + } + if (old) { + this.removeElementListenerList(old, this.targetListeners); + var transition = this.getTransition(); + if (transition) { + transition.teardown(old); + } else { + old.style.position = ''; + old.style.outline = ''; + } + old.style.display = ''; + } + }, + + // NOTE: wait to call this until we're as sure as possible that target + // is styled. + ensureTargetSetup: function() { + if (!this.target || this.target.__overlaySetup) { + return; + } + this.target.__overlaySetup = true; + this.target.style.display = ''; + var transition = this.getTransition(); + if (transition) { + transition.setup(this.target); + } + var computed = getComputedStyle(this.target); + this.targetStyle = { + position: computed.position === 'static' ? 'fixed' : + computed.position + } + if (!transition) { + this.target.style.position = this.targetStyle.position; + this.target.style.outline = 'none'; + } + this.target.style.display = 'none'; + }, + + openedChanged: function() { + this.transitioning = true; + this.ensureTargetSetup(); + this.prepareRenderOpened(); + // continue styling after delay so display state can change + // without aborting transitions + // note: we wait a full frame so that transition changes executed + // during measuring do not cause transition + this.async(function() { + this.target.style.display = ''; + this.async('renderOpened'); + }); + this.fire('core-overlay-open', this.opened); + }, + + // tasks which must occur before opening; e.g. making the element visible + prepareRenderOpened: function() { + if (this.opened) { + addOverlay(this); + } + this.prepareBackdrop(); + // async so we don't auto-close immediately via a click. + this.async(function() { + if (!this.autoCloseDisabled) { + this.enableElementListener(this.opened, document, + this.captureEventName, 'captureHandler', true); + } + }); + this.enableElementListener(this.opened, window, 'resize', + 'resizeHandler'); + + if (this.opened) { + // TODO(sorvell): force SD Polyfill to render + forcePolyfillRender(this.target); + if (!this._shouldPosition) { + this.target.style.position = 'absolute'; + var computed = getComputedStyle(this.target); + var t = (computed.top === 'auto' && computed.bottom === 'auto'); + var l = (computed.left === 'auto' && computed.right === 'auto'); + this.target.style.position = this.targetStyle.position; + this._shouldPosition = {top: t, left: l}; + } + // if we are showing, then take care when measuring + this.prepareMeasure(this.target); + this.updateTargetDimensions(); + this.finishMeasure(this.target); + if (this.layered) { + this.layer.addElement(this.target); + this.layer.opened = this.opened; + } + } + }, + + // tasks which cause the overlay to actually open; typically play an + // animation + renderOpened: function() { + var transition = this.getTransition(); + if (transition) { + transition.go(this.target, {opened: this.opened}); + } else { + this.transitionend(); + } + this.renderBackdropOpened(); + }, + + // finishing tasks; typically called via a transition + transitionend: function(e) { + // make sure this is our transition event. + if (e && e.target !== this.target) { + return; + } + this.transitioning = false; + if (!this.opened) { + this.resetTargetDimensions(); + this.target.style.display = 'none'; + this.completeBackdrop(); + removeOverlay(this); + if (this.layered) { + if (!currentOverlay()) { + this.layer.opened = this.opened; + } + this.layer.removeElement(this.target); + } + } + this.applyFocus(); + }, + + prepareBackdrop: function() { + if (this.backdrop && this.opened) { + if (!this.scrim.parentNode) { + document.body.appendChild(this.scrim); + this.scrim.style.zIndex = currentOverlayZ() - 1; + } + trackBackdrop(this); + } + }, + + renderBackdropOpened: function() { + if (this.backdrop && getBackdrops().length < 2) { + this.scrim.classList.toggle('core-opened', this.opened); + } + }, + + completeBackdrop: function() { + if (this.backdrop) { + trackBackdrop(this); + if (getBackdrops().length === 0) { + this.scrim.parentNode.removeChild(this.scrim); + } + } + }, + + prepareMeasure: function(target) { + target.style.transition = target.style.webkitTransition = 'none'; + target.style.transform = target.style.webkitTransform = 'none'; + target.style.display = ''; + }, + + finishMeasure: function(target) { + target.style.display = 'none'; + target.style.transform = target.style.webkitTransform = ''; + target.style.transition = target.style.webkitTransition = ''; + }, + + getTransition: function() { + return this.meta.byId(this.transition); + }, + + getFocusNode: function() { + return this.target.querySelector('[autofocus]') || this.target; + }, + + applyFocus: function() { + var focusNode = this.getFocusNode(); + if (this.opened) { + focusNode.focus(); + } else { + focusNode.blur(); + if (currentOverlay() == this) { + console.warn('Current core-overlay is attempting to focus itself as next! (bug)'); + } else { + focusOverlay(); + } + } + }, + + updateTargetDimensions: function() { + this.positionTarget(); + this.sizeTarget(); + // + if (this.layered) { + var rect = this.target.getBoundingClientRect(); + this.target.style.top = rect.top + 'px'; + this.target.style.left = rect.left + 'px'; + this.target.style.right = this.target.style.bottom = 'auto'; + } + }, + + sizeTarget: function() { + var sizer = this.sizingTarget || this.target; + var rect = sizer.getBoundingClientRect(); + var mt = rect.top === this.margin ? this.margin : this.margin * 2; + var ml = rect.left === this.margin ? this.margin : this.margin * 2; + var h = window.innerHeight - rect.top - mt; + var w = window.innerWidth - rect.left - ml; + sizer.style.maxHeight = h + 'px'; + sizer.style.maxWidth = w + 'px'; + sizer.style.boxSizing = 'border-box'; + }, + + positionTarget: function() { + // vertically and horizontally center if not positioned + if (this._shouldPosition.top) { + var t = Math.max((window.innerHeight - + this.target.offsetHeight - this.margin*2) / 2, this.margin); + this.target.style.top = t + 'px'; + } + if (this._shouldPosition.left) { + var l = Math.max((window.innerWidth - + this.target.offsetWidth - this.margin*2) / 2, this.margin); + this.target.style.left = l + 'px'; + } + }, + + resetTargetDimensions: function() { + this.target.style.top = this.target.style.left = ''; + this.target.style.right = this.target.style.bottom = ''; + this.target.style.width = this.target.style.height = ''; + this._shouldPosition = null; + }, + + tapHandler: function(e) { + // closeSelector takes precedence since closeAttribute has a default non-null value. + if (e.target && + (this.closeSelector && e.target.matches(this.closeSelector)) || + (this.closeAttribute && e.target.hasAttribute(this.closeAttribute))) { + this.toggle(); + } else { + if (this.autoCloseJob) { + this.autoCloseJob.stop(); + this.autoCloseJob = null; + } + } + }, + + // We use the traditional approach of capturing events on document + // to to determine if the overlay needs to close. However, due to + // ShadowDOM event retargeting, the event target is not useful. Instead + // of using it, we attempt to close asynchronously and prevent the close + // if a tap event is immediately heard on the target. + // TODO(sorvell): This approach will not work with modal. For + // this we need a scrim. + captureHandler: function(e) { + if (!this.autoCloseDisabled && (currentOverlay() == this)) { + this.autoCloseJob = this.job(this.autoCloseJob, function() { + this.close(); + }); + } + }, + + keydownHandler: function(e) { + if (!this.autoCloseDisabled && (e.keyCode == this.keyHelper.ESCAPE_KEY)) { + this.close(); + e.stopPropagation(); + } + }, + + /** + * Extensions of core-overlay should implement the `resizeHandler` + * method to adjust the size and position of the overlay when the + * browser window resizes. + * @method resizeHandler + */ + resizeHandler: function() { + this.updateTargetDimensions(); + }, + + // TODO(sorvell): these utility methods should not be here. + addElementListenerList: function(node, events) { + for (var i in events) { + this.addElementListener(node, i, events[i]); + } + }, + + removeElementListenerList: function(node, events) { + for (var i in events) { + this.removeElementListener(node, i, events[i]); + } + }, + + enableElementListener: function(enable, node, event, methodName, capture) { + if (enable) { + this.addElementListener(node, event, methodName, capture); + } else { + this.removeElementListener(node, event, methodName, capture); + } + }, + + addElementListener: function(node, event, methodName, capture) { + var fn = this._makeBoundListener(methodName); + if (node && fn) { + Polymer.addEventListener(node, event, fn, capture); + } + }, + + removeElementListener: function(node, event, methodName, capture) { + var fn = this._makeBoundListener(methodName); + if (node && fn) { + Polymer.removeEventListener(node, event, fn, capture); + } + }, + + _makeBoundListener: function(methodName) { + var self = this, method = this[methodName]; + if (!method) { + return; + } + var bound = '_bound' + methodName; + if (!this[bound]) { + this[bound] = function(e) { + method.call(self, e); + } + } + return this[bound]; + }, + }); + + function forcePolyfillRender(target) { + if (window.ShadowDOMPolyfill) { + target.offsetHeight; + } + } + + // TODO(sorvell): This should be an element with private state so it can + // be independent of overlay. + // track overlays for z-index and focus managemant + var overlays = []; + function addOverlay(overlay) { + var z0 = currentOverlayZ(); + overlays.push(overlay); + var z1 = currentOverlayZ(); + if (z1 <= z0) { + applyOverlayZ(overlay, z0); + } + } + + function removeOverlay(overlay) { + var i = overlays.indexOf(overlay); + if (i >= 0) { + overlays.splice(i, 1); + setZ(overlay, ''); + } + } + + function applyOverlayZ(overlay, aboveZ) { + setZ(overlay.target, aboveZ + 2); + } + + function setZ(element, z) { + element.style.zIndex = z; + } + + function currentOverlay() { + return overlays[overlays.length-1]; + } + + var DEFAULT_Z = 10; + + function currentOverlayZ() { + var z; + var current = currentOverlay(); + if (current) { + var z1 = window.getComputedStyle(current.target).zIndex; + if (!isNaN(z1)) { + z = Number(z1); + } + } + return z || DEFAULT_Z; + } + + function focusOverlay() { + var current = currentOverlay(); + // We have to be careful to focus the next overlay _after_ any current + // transitions are complete (due to the state being toggled prior to the + // transition). Otherwise, we risk infinite recursion when a transitioning + // (closed) overlay becomes the current overlay. + // + // NOTE: We make the assumption that any overlay that completes a transition + // will call into focusOverlay to kick the process back off. Currently: + // transitionend -> applyFocus -> focusOverlay. + if (current && !current.transitioning) { + current.applyFocus(); + } + } + + var backdrops = []; + function trackBackdrop(element) { + if (element.opened) { + backdrops.push(element); + } else { + var i = backdrops.indexOf(element); + if (i >= 0) { + backdrops.splice(i, 1); + } + } + } + + function getBackdrops() { + return backdrops; + } +})(); diff --git a/third_party/polymer/components-chromium/core-overlay/core-overlay-layer-extracted.js b/third_party/polymer/components-chromium/core-overlay/core-overlay-layer-extracted.js new file mode 100644 index 0000000..3f98964 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-overlay-layer-extracted.js @@ -0,0 +1,84 @@ +
+(function() {
+
+ Polymer('core-overlay-layer', {
+ publish: {
+ opened: false
+ },
+ openedChanged: function() {
+ this.classList.toggle('core-opened', this.opened);
+ },
+ /**
+ * Adds an element to the overlay layer
+ */
+ addElement: function(element) {
+ if (!this.parentNode) {
+ document.querySelector('body').appendChild(this);
+ }
+ if (element.parentNode !== this) {
+ element.__contents = [];
+ var ip$ = element.querySelectorAll('content');
+ for (var i=0, l=ip$.length, n; (i<l) && (n = ip$[i]); i++) {
+ this.moveInsertedElements(n);
+ this.cacheDomLocation(n);
+ n.parentNode.removeChild(n);
+ element.__contents.push(n);
+ }
+ this.cacheDomLocation(element);
+ this.updateEventController(element);
+ var h = this.makeHost();
+ h.shadowRoot.appendChild(element);
+ element.__host = h;
+ }
+ },
+ makeHost: function() {
+ var h = document.createElement('overlay-host');
+ h.createShadowRoot();
+ this.appendChild(h);
+ return h;
+ },
+ moveInsertedElements: function(insertionPoint) {
+ var n$ = insertionPoint.getDistributedNodes();
+ var parent = insertionPoint.parentNode;
+ insertionPoint.__contents = [];
+ for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
+ this.cacheDomLocation(n);
+ this.updateEventController(n);
+ insertionPoint.__contents.push(n);
+ parent.appendChild(n);
+ }
+ },
+ updateEventController: function(element) {
+ element.eventController = this.element.findController(element);
+ },
+ /**
+ * Removes an element from the overlay layer
+ */
+ removeElement: function(element) {
+ element.eventController = null;
+ this.replaceElement(element);
+ var h = element.__host;
+ if (h) {
+ h.parentNode.removeChild(h);
+ }
+ },
+ replaceElement: function(element) {
+ if (element.__contents) {
+ for (var i=0, c$=element.__contents, c; (c=c$[i]); i++) {
+ this.replaceElement(c);
+ }
+ element.__contents = null;
+ }
+ if (element.__parentNode) {
+ var n = element.__nextElementSibling && element.__nextElementSibling
+ === element.__parentNode ? element.__nextElementSibling : null;
+ element.__parentNode.insertBefore(element, n);
+ }
+ },
+ cacheDomLocation: function(element) {
+ element.__nextElementSibling = element.nextElementSibling;
+ element.__parentNode = element.parentNode;
+ }
+ });
+
+})();
diff --git a/third_party/polymer/components-chromium/core-overlay/core-overlay-layer.html b/third_party/polymer/components-chromium/core-overlay/core-overlay-layer.html new file mode 100644 index 0000000..5aa30c0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-overlay-layer.html @@ -0,0 +1,29 @@ +<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+
+<polymer-element name="core-overlay-layer" assetpath="">
+<template>
+ <style>
+ :host {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ }
+
+ :host(.core-opened) {
+ display: block;
+ }
+ </style>
+ <content></content>
+</template>
+
+</polymer-element>
+<script src="core-overlay-layer-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/core-overlay.html b/third_party/polymer/components-chromium/core-overlay/core-overlay.html new file mode 100644 index 0000000..4b185e9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/core-overlay.html @@ -0,0 +1,89 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../core-transition/core-transition.html"> +<link rel="import" href="core-key-helper.html"> +<link rel="import" href="core-overlay-layer.html"> + +<!-- +The `core-overlay` element displays overlayed on top of other content. It starts +out hidden and is displayed by setting its `opened` property to true. +A `core-overlay's` opened state can be toggled by calling the `toggle` +method. + +The `core-overlay` will, by default, show/hide itself when it's opened. The +`target` property may be set to another element to cause that element to +be shown when the overlay is opened. + +It's common to want a `core-overlay` to animate to its opened +position. The `core-overlay` element uses a `core-transition` to handle +animation. The default transition is `core-transition-fade` which +causes the overlay to fade in when displayed. See +<a href="../core-transition/">`core-transition`</a> for more +information about customizing a `core-overlay's` opening animation. The +`backdrop` property can be set to true to show a backdrop behind the overlay +that will darken the rest of the window. + +An element that should close the `core-overlay` will automatically +do so if it's given the `core-overlay-toggle` attribute. This attribute +can be customized with the `closeAttribute` property. You can also use +`closeSelector` if more general matching is needed. + +By default `core-overlay` will close whenever the user taps outside it or +presses the escape key. This behavior can be turned off via the +`autoCloseDisabled` property. + + <core-overlay> + <h2>Dialog</h2> + <input placeholder="say something..." autofocus> + <div>I agree with this wholeheartedly.</div> + <button core-overlay-toggle>OK</button> + </core-overlay> + +`core-overlay` will automatically size and position itself according to the +following rules. If the target's style.top and style.left are unset, the +target will be centered. The size of the target is constrained to be no larger +than the window dimensions. The `margin` property specifies the extra amount +of space that should be reserved around the overlay. This can be used to ensure +that, for example, a drop shadow is always visible around the overlay. + +@group Core Elements +@element core-overlay +@homepage github.io +--> +<!-- +Fired when the `core-overlay`'s `opened` property changes. + +@event core-overlay-open +@param {Object} detail +@param {Object} detail.opened the opened state +--> + +<style> + .core-overlay-backdrop { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: black; + opacity: 0; + transition: opacity 0.2s; + } + + .core-overlay-backdrop.core-opened { + opacity: 0.6; + } +</style> + +<polymer-element name="core-overlay" assetpath=""> + +</polymer-element> +<script src="core-overlay-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-overlay/demo.html b/third_party/polymer/components-chromium/core-overlay/demo.html new file mode 100644 index 0000000..fda6207 --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/demo.html @@ -0,0 +1,146 @@ +<!DOCTYPE html> +<html> +<head> + <title>core-overlay</title> + <meta name="viewport" content="width=device-width, user-scalable=no"> + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-transition/core-transition-css.html"> + <link rel="import" href="core-overlay.html"> + <style> + body { + margin: 0; + } + + section { + padding: 24px; + } + </style> +</head> +<body unresolved> + <section> + <x-container></x-container> + </section> + + <!-- a simple dialog element made with core-overlay --> + <polymer-element name="x-dialog" attributes="opened autoCloseDisabled"> + <template> + <style> + + :host { + box-sizing: border-box; + -moz-box-sizing: border-box; + font-family: Arial, Helvetica, sans-serif; + font-size: 13px; + -webkit-user-select: none; + -moz-user-select: none; + overflow: hidden; + background: white; + padding:30px 42px; + outline: 1px solid rgba(0,0,0,0.2); + box-shadow: 0 4px 16px rgba(0,0,0,0.2); + } + </style> + <core-overlay id="overlay" layered backdrop opened="{{opened}}" autoCloseDisabled="{{autoCloseDisabled}}" transition="core-transition-center"></core-overlay> + <content></content> + </template> + <script> + + Polymer('x-dialog', { + + ready: function() { + this.$.overlay.target = this; + }, + + toggle: function() { + this.$.overlay.toggle(); + } + + }); + + </script> + </polymer-element> + + + <!-- an element that uses the x-dialog element and core-overlay --> + <polymer-element name="x-container"> + <template> + <x-dialog id="dialog" class="dialog"> + <!-- place all overlay styles inside the overlay target --> + <style no-shim> + .dialog { + box-sizing: border-box; + -moz-box-sizing: border-box; + font-family: Arial, Helvetica, sans-serif; + font-size: 13px; + -webkit-user-select: none; + -moz-user-select: none; + overflow: hidden; + background: white; + padding:30px 42px; + outline: 1px solid rgba(0,0,0,0.2); + box-shadow: 0 4px 16px rgba(0,0,0,0.2); + } + + #dialog { + width: 500px; + } + </style> + <h2>Dialog</h2> + <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fringilla sapien sed enim sollicitudin laoreet. Suspendisse suscipit, metus ac volutpat sodales, libero magna semper lacus, molestie fringilla massa orci ut arcu. Nullam sodales urna sit amet odio vehicula mattis.</div><br><br> + <div>Ut aliquam vulputate congue. Vestibulum pretium pretium nulla quis sollicitudin. Praesent lacinia congue erat nec mattis. Fusce commodo lacus est. Duis turpis eros, ultrices sed aliquet non, blandit egestas velit. Integer a augue nec lorem tristique hendrerit. Curabitur imperdiet risus id enim bibendum vestibulum. Integer id magna at arcu faucibus fermentum vel a augue. Sed fringilla venenatis dolor, in blandit magna molestie luctus. Vestibulum dignissim posuere ultrices. Aenean urna nisl, tincidunt vitae iaculis ut, pharetra nec eros.</div><br><br> + + <div> + <input placeholder="say something..." autofocus on-input="{{inputHandler}}" /><br> + I agree with this wholeheartedly. + <core-overlay layered id="confirmation" class="dialog" backdrop transition="core-transition-top"> + <!-- place all overlay styles inside the overlay target --> + <style no-shim> + .dialog { + box-sizing: border-box; + -moz-box-sizing: border-box; + font-family: Arial, Helvetica, sans-serif; + font-size: 13px; + -webkit-user-select: none; + -moz-user-select: none; + overflow: hidden; + background: white; + padding:30px 42px; + outline: 1px solid rgba(0,0,0,0.2); + box-shadow: 0 4px 16px rgba(0,0,0,0.2); + } + + #confirmation { + box-sizing: border-box; + text-align: center; + width: 150px; + } + </style> + Thank you. + </core-overlay> + </div><br><br> + <button core-overlay-toggle>OK</button> + </x-dialog> + + <button on-tap="{{tapHandler}}">Toggle Dialog</button> + </template> + <script> + + Polymer('x-container', { + + inputHandler: function(e) { + if (e.target.value === 'something') { + this.$.confirmation.toggle(); + } + }, + + tapHandler: function() { + this.$.dialog.toggle(); + } + + }); + + </script> + </polymer-element> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-overlay/index.html b/third_party/polymer/components-chromium/core-overlay/index.html new file mode 100644 index 0000000..4b2f63c --- /dev/null +++ b/third_party/polymer/components-chromium/core-overlay/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-pages/.bower.json b/third_party/polymer/components-chromium/core-pages/.bower.json new file mode 100644 index 0000000..a7c8606 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-pages", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-pages", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "e0a16a0de8ad5c2cf2394407415851dfd2424149" + }, + "_source": "git://github.com/Polymer/core-pages.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-pages" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-pages/README.md b/third_party/polymer/components-chromium/core-pages/README.md new file mode 100644 index 0000000..cf2d283 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/README.md @@ -0,0 +1,4 @@ +core-pages +========== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-pages) for more information. diff --git a/third_party/polymer/components-chromium/core-pages/bower.json b/third_party/polymer/components-chromium/core-pages/bower.json new file mode 100644 index 0000000..dd5b382 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-pages", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-pages/core-pages-extracted.js b/third_party/polymer/components-chromium/core-pages/core-pages-extracted.js new file mode 100644 index 0000000..497bdea --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/core-pages-extracted.js @@ -0,0 +1 @@ +Polymer('core-pages');
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-pages/core-pages.css b/third_party/polymer/components-chromium/core-pages/core-pages.css new file mode 100644 index 0000000..8cca77d --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/core-pages.css @@ -0,0 +1,30 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; +} + +polyfill-next-selector { content: ':host > *'; } +::content > * { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + visibility: hidden; + z-index: -1000; +} + +polyfill-next-selector { content: ':host > .core-selected'; } +::content > .core-selected { + visibility: visible; + z-index: auto; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-pages/core-pages.html b/third_party/polymer/components-chromium/core-pages/core-pages.html new file mode 100644 index 0000000..e1ad2b3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/core-pages.html @@ -0,0 +1,45 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-pages` is used to select one of its children to show. One use is to cycle through a list of children "pages". + +Example: + + <core-pages selected="0"> + <div>One</div> + <div>Two</div> + <div>Three</div> + </core-pages> + + <script> + document.addEventListener('click', function(e) { + var pages = document.querySelector('core-pages'); + pages.selected = (pages.selected + 1) % pages.children.length; + }); + </script> + +@group Polymer Core Elements +@class core-pages +@extends core-selector +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../core-selector/core-selector.html"> + +<polymer-element name="core-pages" extends="core-selector" selected="0" notap="" assetpath=""> +<template> + + <link rel="stylesheet" href="core-pages.css"> + + <shadow></shadow> + +</template> +</polymer-element> +<script src="core-pages-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-pages/demo.html b/third_party/polymer/components-chromium/core-pages/demo.html new file mode 100644 index 0000000..a980653 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/demo.html @@ -0,0 +1,130 @@ +<!doctype html>
+<html>
+<head>
+
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+
+ <title>core-pages</title>
+
+ <script src="../platform/platform.js"></script>
+
+ <link rel="import" href="core-pages.html">
+
+ <style>
+
+ html, body {
+ height: 100%;
+ }
+
+ body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ font-family: sans-serif;
+ }
+
+ core-pages {
+ width: 300px;
+ height: 300px;
+ border: 1px solid black;
+ -webkit-user-select: none;
+ border-radius: 5px;
+ }
+
+ core-pages > div {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-radius: inherit;
+ }
+
+ core-pages.fancy {
+ border: none;
+ margin-left: 2em;
+ }
+
+ core-pages.fancy > div {
+ opacity: 0;
+ -webkit-transform: translate3d(-100px, 0, 0) scale(0.9);
+ transform: translate3d(-100px, 0, 0) scale(0.9);
+ transition: all 1s cubic-bezier(.03,.56,.7,.98);
+ color: white;
+ }
+
+ core-pages.fancy > div:nth-child(1) {
+ background-color: red;
+ }
+
+ core-pages.fancy > div:nth-child(2) {
+ background-color: green;
+ }
+
+ core-pages.fancy > div:nth-child(3) {
+ background-color: blue;
+ }
+
+ core-pages.fancy > div:nth-child(4) {
+ background-color: purple;
+ }
+
+ core-pages.fancy > div:nth-child(5) {
+ background-color: black;
+ }
+
+ core-pages.fancy .core-selected + div {
+ -webkit-transform: translate3d(100px, 0, 0) scale(0.9);
+ transform: translate3d(100px, 0, 0) scale(1);
+ }
+
+ core-pages.fancy .core-selected {
+ opacity: 1;
+ -webkit-transform: translateX(0);
+ transform: translateX(0);
+ }
+
+ core-pages.fancy div.begin {
+ -webkit-transform: translate3d(100px, 0, 0) scale(0.9);
+ transform: translate3d(100px, 0, 0) scale(0.9);
+ }
+
+ </style>
+
+</head>
+<body unresolved>
+
+ <core-pages id="first" selected="0">
+ <div>One</div>
+ <div>Two</div>
+ <div>Three</div>
+ <div>Four</div>
+ <div>Five</div>
+ </core-pages>
+
+ <core-pages class="fancy" selected="0">
+ <div>One</div>
+ <div>Two</div>
+ <div>Three</div>
+ <div>Four</div>
+ <div>Five</div>
+ </core-pages>
+
+ <script>
+ document.querySelector('#first').onclick = function(e) {
+ this.selected = (this.selected + 1) % this.items.length;
+ };
+
+ document.querySelector('core-pages.fancy').onclick = function(e) {
+ this.selected = (this.selected + 1) % this.items.length;
+ this.async(function() {
+ if (this.selectedIndex == 0) {
+ this.selectedItem.classList.remove('begin');
+ } else if (this.selectedIndex == this.items.length - 1) {
+ this.items[0].classList.add('begin');
+ }
+ });
+ };
+ </script>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-pages/index.html b/third_party/polymer/components-chromium/core-pages/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-pages/metadata.html b/third_party/polymer/components-chromium/core-pages/metadata.html new file mode 100644 index 0000000..bc8501e --- /dev/null +++ b/third_party/polymer/components-chromium/core-pages/metadata.html @@ -0,0 +1,16 @@ +<x-meta id="core-pages" label="Pages" group="Core" isContainer> + + <template> + <core-pages style="width: 400px; height: 400px; border: 1px solid silver;"> + <section>Page One</section> + <section>Page Two</section> + </core-pages> + </template> + + <template id="imports"> + <link rel="import" href="core-pages.html"> + </template> + +</x-meta> + +<x-meta id="section" isContainer isHidden></x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-range/.bower.json b/third_party/polymer/components-chromium/core-range/.bower.json new file mode 100644 index 0000000..3e97fcc --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-range", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-range", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "df0a1a38e891ce4af074a25ac436fa03b76c6397" + }, + "_source": "git://github.com/Polymer/core-range.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-range" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-range/README.md b/third_party/polymer/components-chromium/core-range/README.md new file mode 100644 index 0000000..b14d06e --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/README.md @@ -0,0 +1,2 @@ +core-range +========== diff --git a/third_party/polymer/components-chromium/core-range/bower.json b/third_party/polymer/components-chromium/core-range/bower.json new file mode 100644 index 0000000..7d38994 --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-range", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-range/core-range-extracted.js b/third_party/polymer/components-chromium/core-range/core-range-extracted.js new file mode 100644 index 0000000..5650bfd --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/core-range-extracted.js @@ -0,0 +1,78 @@ + + + Polymer('core-range', { + + /** + * The number that represents the current value. + * + * @attribute value + * @type number + * @default 0 + */ + value: 0, + + /** + * The number that indicates the minimum value of the range. + * + * @attribute min + * @type number + * @default 0 + */ + min: 0, + + /** + * The number that indicates the maximum value of the range. + * + * @attribute max + * @type number + * @default 100 + */ + max: 100, + + /** + * Specifies the value granularity of the range's value. + * + * @attribute step + * @type number + * @default 1 + */ + step: 1, + + /** + * Returns the ratio of the value. + * + * @attribute ratio + * @type number + * @default 0 + */ + ratio: 0, + + observe: { + 'value min max step': 'update' + }, + + calcRatio: function(value) { + return (this.clampValue(value) - this.min) / (this.max - this.min); + }, + + clampValue: function(value) { + return Math.min(this.max, Math.max(this.min, this.calcStep(value))); + }, + + calcStep: function(value) { + return this.step ? (Math.round(value / this.step) / (1 / this.step)) : value; + }, + + validateValue: function() { + var v = this.clampValue(this.value); + this.value = this.oldValue = isNaN(v) ? this.oldValue : v; + return this.value !== v; + }, + + update: function() { + this.validateValue(); + this.ratio = this.calcRatio(this.value) * 100; + } + + }); + diff --git a/third_party/polymer/components-chromium/core-range/core-range.html b/third_party/polymer/components-chromium/core-range/core-range.html new file mode 100644 index 0000000..207341e --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/core-range.html @@ -0,0 +1,31 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The `core-range` element is used for managing a numeric value within a given +range. It has no visual appearance and is typically used in conjunction with +another element. + +One can build a progress bar using `core-range` like this: + + <core-range min="0" max="200" value="100" ratio="{{ratio}}"></core-range> + <div class="progress-bar" style="width: {{ratio}}%;"></div> + +@group Polymer Core Elements +@element core-range +@homepage github.io + +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-range" attributes="value min max step ratio" assetpath=""> + +</polymer-element> +<script src="core-range-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-range/demo.html b/third_party/polymer/components-chromium/core-range/demo.html new file mode 100644 index 0000000..338ca2a --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/demo.html @@ -0,0 +1,55 @@ +<!doctype html> +<html> + <head> + <title>core-range</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-range.html"> + + <style> + + + </style> + + </head> + + <body unresolved> + + <polymer-element name="x-test" noscript attributes="value"> + + <template> + + <style> + + :host { + display: inline-block; + height: 25px; + width: 300px; + background-color: #ddd; + } + + .progress { + background-color: red; + height: 100%; + padding: 5px 0; + box-sizing: border-box; + -moz-box-sizing: border-box; + } + + </style> + + <core-range min="0" max="200" value="{{value}}" ratio="{{ratio}}"></core-range> + + <div class="progress" style="width: {{ratio}}%;">{{ratio}}%</div><br> + + value (0 - 200): <input value="{{value}}"> + + </template> + + </polymer-element> + + <x-test value="100"></x-test> + + </body> +</html> diff --git a/third_party/polymer/components-chromium/core-range/index.html b/third_party/polymer/components-chromium/core-range/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-range/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scaffold/.bower.json b/third_party/polymer/components-chromium/core-scaffold/.bower.json new file mode 100644 index 0000000..2445fae --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "core-scaffold", + "private": true, + "dependencies": { + "core-drawer-panel": "Polymer/core-drawer-panel#>=0.3.0 <1.0.0", + "core-header-panel": "Polymer/core-header-panel#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-scaffold", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "69d6d9aa04258341956e74dec099ef551dd4a0be" + }, + "_source": "git://github.com/Polymer/core-scaffold.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-scaffold" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scaffold/README.md b/third_party/polymer/components-chromium/core-scaffold/README.md new file mode 100644 index 0000000..7f89389 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/README.md @@ -0,0 +1,4 @@ +core-scaffold +============= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-scaffold) for more information. diff --git a/third_party/polymer/components-chromium/core-scaffold/bower.json b/third_party/polymer/components-chromium/core-scaffold/bower.json new file mode 100644 index 0000000..3c04ded --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/bower.json @@ -0,0 +1,10 @@ +{ + "name": "core-scaffold", + "private": true, + "dependencies": { + "core-drawer-panel": "Polymer/core-drawer-panel#>=0.3.0 <1.0.0", + "core-header-panel": "Polymer/core-header-panel#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scaffold/core-scaffold-extracted.js b/third_party/polymer/components-chromium/core-scaffold/core-scaffold-extracted.js new file mode 100644 index 0000000..de5795e --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/core-scaffold-extracted.js @@ -0,0 +1,52 @@ + + + Polymer('core-scaffold', { + + publish: { + /** + * When the browser window size is smaller than the `responsiveWidth`, + * `core-drawer-panel` changes to a narrow layout. In narrow layout, + * the drawer will be stacked on top of the main panel. + * + * @attribute responsiveWidth + * @type string + * @default '600px' + */ + responsiveWidth: '600px', + + /** + * Used to control the header and scrolling behaviour of `core-header-panel` + * + * @attribute mode + * @type string + * @default 'seamed' + */ + mode: {value: 'seamed', reflect: true} + }, + + /** + * Toggle the drawer panel + * @method togglePanel + */ + togglePanel: function() { + this.$.drawerPanel.togglePanel(); + }, + + /** + * Open the drawer panel + * @method openDrawer + */ + openDrawer: function() { + this.$.drawerPanel.openDrawer(); + }, + + /** + * Close the drawer panel + * @method closeDrawer + */ + closeDrawer: function() { + this.$.drawerPanel.closeDrawer(); + } + + }); + diff --git a/third_party/polymer/components-chromium/core-scaffold/core-scaffold.html b/third_party/polymer/components-chromium/core-scaffold/core-scaffold.html new file mode 100644 index 0000000..ee149e2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/core-scaffold.html @@ -0,0 +1,106 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-scaffold` provides general application layout, introducing a +responsive scaffold containing a header, toolbar, menu, title and +areas for application content. + +Example: + + <core-scaffold> + <core-header-panel navigation flex mode="seamed"> + <core-toolbar>Application</core-toolbar> + <core-menu theme="core-light-theme"> + <core-item icon="settings" label="item1"></core-item> + <core-item icon="settings" label="item2"></core-item> + </core-menu> + </core-header-panel> + <div tool>Title</div> + <div>Content goes here...</div> + </core-scaffold> + +Use `mode` to control the header and scrolling behavior of `core-header-panel` +and `responsiveWidth` to change the layout of the scaffold. + +To have the content fits to the main area, use `fit` attribute. + + <core-scaffold> + <core-header-panel navigation flex mode="seamed"> + .... + </core-header-panel> + <div tool>Title</div> + <div fit>Content fits to the main area</div> + </core-scaffold> + +@group Polymer Core Elements +@element core-scaffold +@homepage github.io +--> + +<link rel="import" href="../core-toolbar/core-toolbar.html"> +<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> +<link rel="import" href="../core-header-panel/core-header-panel.html"> +<link rel="import" href="../core-icon-button/core-icon-button.html"> + +<polymer-element name="core-scaffold" assetpath=""> +<template> + + <style> + + :host { + display: block; + } + + [drawer] { + background-color: #fff; + box-shadow: 1px 0 1px rgba(0, 0, 0, 0.1); + } + + [main] { + height: 100%; + background-color: #eee; + } + + core-toolbar { + background-color: #526E9C; + color: #fff; + } + + #drawerPanel:not([narrow]) #menuButton { + display: none; + } + + </style> + + <core-drawer-panel id="drawerPanel" narrow="{{narrow}}" responsivewidth="{{responsiveWidth}}"> + + <div vertical="" layout="" drawer=""> + + <content select="[navigation], nav"></content> + + </div> + + <core-header-panel main="" mode="{{mode}}"> + + <core-toolbar> + <core-icon-button id="menuButton" icon="menu" on-tap="{{togglePanel}}"></core-icon-button> + <content select="[tool]"></content> + </core-toolbar> + + <content select="*"></content> + + </core-header-panel> + + </core-drawer-panel> + +</template> + +</polymer-element> +<script src="core-scaffold-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scaffold/demo.html b/third_party/polymer/components-chromium/core-scaffold/demo.html new file mode 100644 index 0000000..647ba11 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/demo.html @@ -0,0 +1,82 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scaffold</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-scaffold.html"> + <link rel="import" href="../core-header-panel/core-header-panel.html"> + <link rel="import" href="../core-menu/core-menu.html"> + <link rel="import" href="../core-item/core-item.html"> + + <style> + + html, body { + height: 100%; + margin: 0; + } + + body { + font-family: sans-serif; + } + + core-scaffold { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + .content { + background-color: #fff; + height: 5000px; + padding: 20px; + } + + /* some default styles for mode="cover" on core-scaffold */ + core-scaffold[mode=cover]::shadow core-header-panel::shadow #mainContainer { + left: 120px; + } + + core-scaffold[mode=cover] .content { + margin: 20px 100px 20px 0; + } + + </style> + +</head> + +<body unresolved> + + <core-scaffold> + + <core-header-panel navigation flex mode="seamed"> + <core-toolbar style="background-color: #526E9C; color: #fff;">Application</core-toolbar> + <core-menu> + <core-item icon="settings" label="item1"></core-item> + <core-item icon="settings" label="item2"></core-item> + </core-menu> + </core-header-panel> + + <div tool>Title</div> + + <div class="content">Content goes here...</div> + + </core-scaffold> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scaffold/index.html b/third_party/polymer/components-chromium/core-scaffold/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scaffold/metadata.html b/third_party/polymer/components-chromium/core-scaffold/metadata.html new file mode 100644 index 0000000..9225d48 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scaffold/metadata.html @@ -0,0 +1,43 @@ +<x-meta id="core-scaffold" label="Scaffold" isContainer group="Core"> + + <template> + + <core-scaffold style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;"> + + <core-header-panel navigation flex mode="seamed" style="background-color: #fff;"> + + <core-toolbar style="background-color: #4F7DC9 ; color: #fff;"></core-toolbar> + + <core-menu valueattr="label" style="font-size: 16px;" theme="core-light-theme"> + <core-item icon="settings" label="Item1"></core-item> + <core-item icon="settings" label="Item2"></core-item> + </core-menu> + + </core-header-panel> + + <div tool>Title</div> + + </core-scaffold> + + </template> + + <template id="imports"> + + <link rel="import" href="core-scaffold.html"> + <link rel="import" href="../core-header-panel/core-header-panel.html"> + <link rel="import" href="../core-menu/core-menu.html"> + <link rel="import" href="../core-item/core-item.html"> + + </template> + +</x-meta> + +<x-meta id="core-card" label="Card" isContainer group="Core"> + + <template> + + <core-card style="position: absolute; width: 300px; height: 300px; background-color: #fff; border-radius: 2px; box-shadow: rgba(0, 0, 0, 0.098) 0px 2px 4px, rgba(0, 0, 0, 0.098) 0px 0px 3px;" layout vertical></core-card> + + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/.bower.json b/third_party/polymer/components-chromium/core-scroll-header-panel/.bower.json new file mode 100644 index 0000000..40a0128 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/.bower.json @@ -0,0 +1,22 @@ +{ + "name": "core-scroll-header-panel", + "private": true, + "dependencies": { + "core-field": "Polymer/core-field#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-scroll-header-panel", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "d7ce265b1fed1d419e069d00a828fd627b014fa3" + }, + "_source": "git://github.com/Polymer/core-scroll-header-panel.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-scroll-header-panel" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/README.md b/third_party/polymer/components-chromium/core-scroll-header-panel/README.md new file mode 100644 index 0000000..dcdd864 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/README.md @@ -0,0 +1,4 @@ +core-scroll-header-panel +======================== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-scroll-header-panel) for more information. diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/bower.json b/third_party/polymer/components-chromium/core-scroll-header-panel/bower.json new file mode 100644 index 0000000..008279a --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/bower.json @@ -0,0 +1,11 @@ +{ + "name": "core-scroll-header-panel", + "private": true, + "dependencies": { + "core-field": "Polymer/core-field#>=0.3.0 <1.0.0", + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0", + "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel-extracted.js b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel-extracted.js new file mode 100644 index 0000000..edba969 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel-extracted.js @@ -0,0 +1,223 @@ + + + Polymer('core-scroll-header-panel', { + + /** + * Fired when the content has been scrolled. + * + * @event scroll + */ + + /** + * Fired when the header is transformed. + * + * @event core-header-transform + */ + + publish: { + /** + * If true, the header's height will condense to `_condensedHeaderHeight` + * as the user scrolls down from the top of the content area. + * + * @attribute condenses + * @type boolean + * @default false + */ + condenses: false, + + /** + * If true, no cross-fade transition from one background to another. + * + * @attribute noDissolve + * @type boolean + * @default false + */ + noDissolve: false, + + /** + * If true, the header doesn't slide back in when scrolling back up. + * + * @attribute noReveal + * @type boolean + * @default false + */ + noReveal: false, + + /** + * If true, the header is fixed to the top and never moves away. + * + * @attribute fixed + * @type boolean + * @default false + */ + fixed: false, + + /** + * If true, the condensed header is always shown and does not move away. + * + * @attribute keepCondensedHeader + * @type boolean + * @default false + */ + keepCondensedHeader: false, + + /** + * The height of the header when it is at its full size. + * + * By default, the height will be measured when it is ready. If the height + * changes later the user needs to either set this value to reflect the + * new height or invoke `measureHeaderHeight()`. + * + * @attribute headerHeight + * @type number + */ + headerHeight: 0, + + /** + * The height of the header when it is condensed. + * + * By default, `_condensedHeaderHeight` is 1/3 of `headerHeight` unless + * this is specified. + * + * @attribute condensedHeaderHeight + * @type number + */ + condensedHeaderHeight: 0 + }, + + prevScrollTop: 0, + + headerMargin: 0, + + y: 0, + + observe: { + 'headerMargin fixed': 'setup' + }, + + domReady: function() { + this.async('measureHeaderHeight'); + }, + + get header() { + return this.$.headerContent.getDistributedNodes()[0]; + }, + + get scroller() { + return this.$.mainContainer; + }, + + measureHeaderHeight: function() { + var header = this.header; + if (this.header) { + this.headerHeight = header.offsetHeight; + } + }, + + headerHeightChanged: function() { + if (!this.condensedHeaderHeight) { + // assume _condensedHeaderHeight is 1/3 of the headerHeight + this._condensedHeaderHeight = this.headerHeight * 1 / 3; + } + this.condensedHeaderHeightChanged(); + }, + + condensedHeaderHeightChanged: function() { + if (this.condensedHeaderHeight) { + this._condensedHeaderHeight = this.condensedHeaderHeight; + } + if (this.headerHeight) { + this.headerMargin = this.headerHeight - this._condensedHeaderHeight; + } + }, + + condensesChanged: function() { + if (this.condenses) { + this.scroll(); + } else { + // reset transform/opacity set on the header + this.condenseHeader(null); + } + }, + + setup: function() { + var s = this.scroller.style; + s.paddingTop = this.fixed ? '' : this.headerHeight + 'px'; + s.top = this.fixed ? this.headerHeight + 'px' : ''; + if (this.fixed) { + this.transformHeader(null); + } else { + this.scroll(); + } + }, + + transformHeader: function(y) { + var s = this.$.headerContainer.style; + this.translateY(s, -y); + + if (this.condenses) { + this.condenseHeader(y); + } + + this.fire('core-header-transform', {y: y, height: this.headerHeight, + condensedHeight: this._condensedHeaderHeight}); + }, + + condenseHeader: function(y) { + var reset = y == null; + // adjust top bar in core-header so the top bar stays at the top + if (this.header.$ && this.header.$.topBar) { + this.translateY(this.header.$.topBar.style, + reset ? null : Math.min(y, this.headerMargin)); + } + // transition header bg + var hbg = this.$.headerBg.style; + if (!this.noDissolve) { + hbg.opacity = reset ? '' : (this.headerMargin - y) / this.headerMargin; + } + // adjust header bg so it stays at the center + this.translateY(hbg, reset ? null : y / 2); + // transition condensed header bg + var chbg = this.$.condensedHeaderBg.style; + if (!this.noDissolve) { + chbg = this.$.condensedHeaderBg.style; + chbg.opacity = reset ? '' : y / this.headerMargin; + // adjust condensed header bg so it stays at the center + this.translateY(chbg, reset ? null : y / 2); + } + }, + + translateY: function(s, y) { + s.transform = s.webkitTransform = y == null ? '' : + 'translate3d(0, ' + y + 'px, 0)'; + }, + + scroll: function(event) { + if (!this.header) { + return; + } + + var sTop = this.scroller.scrollTop; + + var y = Math.min(this.keepCondensedHeader ? + this.headerMargin : this.headerHeight, Math.max(0, + (this.noReveal ? sTop : this.y + sTop - this.prevScrollTop))); + + if (this.condenses && this.prevScrollTop >= sTop && sTop > this.headerMargin) { + y = Math.max(y, this.headerMargin); + } + + if (!event || !this.fixed && y !== this.y) { + requestAnimationFrame(this.transformHeader.bind(this, y)); + } + + this.prevScrollTop = sTop; + this.y = y; + + if (event) { + this.fire('scroll', {target: this.scroller}, this, false); + } + } + + }); + diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.css b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.css new file mode 100644 index 0000000..07a0956 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.css @@ -0,0 +1,58 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; + overflow: hidden; +} + +#mainContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-overflow-scrolling: touch; + overflow-x: hidden; + overflow-y: auto; +} + +#headerContainer { + position: absolute; + top: 0; + right: 0; + left: 0; +} + +.bg-container { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + overflow: hidden; +} + +#headerBg, #condensedHeaderBg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-repeat: no-repeat; + background-size: cover; + background-position: center center; +} + +#condensedHeaderBg { + opacity: 0; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.html b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.html new file mode 100644 index 0000000..ec5e2b3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/core-scroll-header-panel.html @@ -0,0 +1,80 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-scroll-header-panel` contains a header section and a content section. The +header is initially on the top part of the view but it scrolls away with the +rest of the scrollable content. Upon scrolling slightly up at any point, the +header scrolls back into view. This saves screen space and allows users to +access important controls by easily moving them back to the view. + +__Important:__ The `core-scroll-header-panel` will not display if its parent does not have a height. + +Using [layout attributes](http://www.polymer-project.org/docs/polymer/layout-attrs.html), you can easily make the `core-scroll-header-panel` fill the screen + + <body fullbleed layout vertical> + <core-scroll-header-panel flex> + <core-toolbar> + <div>Hello World!</div> + </core-toolbar> + </core-scroll-header-panel> + </body> + +or, if you would prefer to do it in CSS, just give `html`, `body`, and `core-scroll-header-panel` a height of 100%: + + html, body { + height: 100%; + margin: 0; + } + core-scroll-header-panel { + height: 100%; + } + +`core-scroll-header-panel` works well with `core-toolbar` but can use any element +that represents a header by adding a `core-header` class to it. Use the attribute +or class `content` to delineate the content section. + + <core-scroll-header-panel> + <core-toolbar>Header</core-toolbar> + <div content>Content goes here...</div> + </core-scroll-header-panel> + +@group Polymer Core Elements +@element core-scroll-header-panel +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-scroll-header-panel" assetpath=""> +<template> + + <link rel="stylesheet" href="core-scroll-header-panel.css"> + + <div id="mainContainer" on-scroll="{{scroll}}"> + + <content id="mainContent" select="[content], .content"></content> + + </div> + + <div id="headerContainer"> + + <div class="bg-container"> + <div id="condensedHeaderBg"></div> + <div id="headerBg"></div> + </div> + + <content id="headerContent" select="core-toolbar, .core-header"></content> + + </div> + +</template> + +</polymer-element> +<script src="core-scroll-header-panel-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demo.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demo.html new file mode 100644 index 0000000..1e833db --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demo.html @@ -0,0 +1,111 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-scroll-header-panel.html"> + <link rel="import" href="demos/lorem-ipsum.html"> + <link rel="import" href="../core-toolbar/core-toolbar.html"> + <link rel="import" href="../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(demos/images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: #f4b400; + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + background-color: transparent; + } + + .title { + -webkit-transform-origin: 0; + transform-origin: 0; + font-size: 40px; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses> + + <core-toolbar class="tall"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + <div class="bottom indent title">Title</div> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + + <script> + + // custom transformation: scale header's title + var titleStyle = document.querySelector('.title').style; + addEventListener('core-header-transform', function(e) { + var d = e.detail; + var m = d.height - d.condensedHeight; + var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); + titleStyle.transform = titleStyle.webkitTransform = + 'scale(' + scale + ') translateZ(0)'; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo1.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo1.html new file mode 100644 index 0000000..39eba41 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo1.html @@ -0,0 +1,80 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo1</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + core-toolbar { + background-color: #4285f4; + color: #f1f1f1; + fill: #f1f1f1; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel> + + <core-toolbar> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex>Title</div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo2.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo2.html new file mode 100644 index 0000000..974016a --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo2.html @@ -0,0 +1,82 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo2</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + core-toolbar { + background-color: #4285f4; + color: #f1f1f1; + fill: #f1f1f1; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses> + + <core-toolbar class="tall"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + + <div class="bottom indent">Title</div> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo3.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo3.html new file mode 100644 index 0000000..162df33 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo3.html @@ -0,0 +1,81 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo3</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg3.jpg); + } + + core-toolbar { + background-color: transparent; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses noReveal noDissolve> + + <core-toolbar class="tall"> + + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo4.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo4.html new file mode 100644 index 0000000..77d9fec --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo4.html @@ -0,0 +1,109 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo4</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg6.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: #ff5722; + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + background-color: transparent; + } + + .title { + font-size: 40px; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses> + + <core-toolbar class="tall"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + <div class="bottom indent title">Title</div> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + + <script> + + // custom transformation: scale header's title + var titleStyle = document.querySelector('.title').style; + addEventListener('core-header-transform', function(e) { + var d = e.detail; + var m = d.height - d.condensedHeight; + var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); + titleStyle.transform = titleStyle.webkitTransform = + 'scale(' + scale + ') translateZ(0)'; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo5.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo5.html new file mode 100644 index 0000000..f66482e --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo5.html @@ -0,0 +1,109 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo5</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: #f4b400; + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + background-color: transparent; + } + + .title { + font-size: 40px; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses> + + <core-toolbar class="tall"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + <div class="bottom indent title">Title</div> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + + <script> + + // custom transformation: scale header's title + var titleStyle = document.querySelector('.title').style; + addEventListener('core-header-transform', function(e) { + var d = e.detail; + var m = d.height - d.condensedHeight; + var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); + titleStyle.transform = titleStyle.webkitTransform = + 'scale(' + scale + ') translateZ(0)'; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo6.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo6.html new file mode 100644 index 0000000..6b252e5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo6.html @@ -0,0 +1,113 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo6</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-image: url(images/bg2.jpg); + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + /* custom toolbar height */ + height: 256px; + background-color: transparent; + } + + .title { + font-size: 40px; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <!-- By default condensedHeaderHeight is 1/3 of the header's height. Here + we want to set the condensed header's height to be 64px. --> + <core-scroll-header-panel condenses condensedHeaderHeight="64"> + + <core-toolbar> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + <div class="bottom indent title">Title</div> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + + <script> + + // custom transformation: scale header's title + var titleStyle = document.querySelector('.title').style; + addEventListener('core-header-transform', function(e) { + var d = e.detail; + var m = d.height - d.condensedHeight; + var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); + titleStyle.transform = titleStyle.webkitTransform = + 'scale(' + scale + ') translateZ(0)'; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo7.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo7.html new file mode 100644 index 0000000..5e94276 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo7.html @@ -0,0 +1,120 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo7</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + <link rel="import" href="../../core-media-query/core-media-query.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: #f4b400; + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + background-color: transparent; + } + + .title { + font-size: 40px; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <core-scroll-header-panel condenses> + + <core-toolbar class="tall"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + <div class="bottom indent title">Title</div> + + </core-toolbar> + + <div class="content"> + + <h3>Resize window to toggle between fixed header and scrolled header</h3> + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + + <core-media-query id="mquery" query="min-width: 600px"></core-media-query> + + <script> + + // toggle fixed header based on screen size + var panel = document.querySelector('core-scroll-header-panel'); + var mquery = document.querySelector('#mquery'); + mquery.addEventListener('core-media-change', function() { + panel.fixed = mquery.queryMatches; + }); + + // custom transformation: scale header's title + var titleStyle = document.querySelector('.title').style; + addEventListener('core-header-transform', function(e) { + var d = e.detail; + var m = d.height - d.condensedHeight; + var scale = Math.max(0.75, (m - d.y) / (m / 0.25) + 0.75); + titleStyle.transform = titleStyle.webkitTransform = + 'scale(' + scale + ') translateZ(0)'; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo8.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo8.html new file mode 100644 index 0000000..fded942 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo8.html @@ -0,0 +1,122 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo8</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: #673ab7; + } + + core-toolbar { + color: #f1f1f1; + fill: #f1f1f1; + /* custom toolbar height */ + height: 256px; + background-color: transparent; + } + + .bottom-text { + -webkit-transform: translateZ(0); + transform: translateZ(0); + font-size: 20px; + padding-bottom: 10px; + } + + .subtitle { + padding-top: 4px; + font-size: 16px; + color: #ccc; + } + + .bookmark { + position: absolute; + bottom: -24px; + right: 24px; + fill: #4285f4; + height: 48px; + width: 48px; + } + + .content { + padding: 20px 20px 20px 68px; + } + + </style> + +</head> +<body unresolved> + + <!-- `keepCondensedHeader` makes the condensed header to not scroll away --> + <core-scroll-header-panel condenses keepCondensedHeader condensedHeaderHeight="140"> + + <core-toolbar> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="thumb-up"></core-icon-button> + <core-icon-button icon="mail"></core-icon-button> + + <div class="bottom indent bottom-text" self-end> + <div>Lorem ipsum dolor sit amet</div> + <div class="subtitle">Iisque perfecto dissentiet cum et</div> + </div> + + <core-icon class="bottom bookmark" icon="bookmark"></core-icon> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo9.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo9.html new file mode 100644 index 0000000..820bcae --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/demo9.html @@ -0,0 +1,100 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-scroll-header-panel: demo9</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../../platform/platform.js"></script> + + <link rel="import" href="../core-scroll-header-panel.html"> + <link rel="import" href="lorem-ipsum.html"> + <link rel="import" href="../../core-icons/core-icons.html"> + <link rel="import" href="../../core-icons/av-icons.html"> + <link rel="import" href="../../core-toolbar/core-toolbar.html"> + <link rel="import" href="../../core-field/core-field.html"> + <link rel="import" href="../../core-input/core-input.html"> + + <style shim-shadowdom> + + html, body { + height: 100%; + } + + body { + margin: 0; + font-family: sans-serif; + color: #333; + } + + core-scroll-header-panel { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + } + + /* background for toolbar when it is at its full size */ + core-scroll-header-panel::shadow #headerBg { + background-image: url(images/bg9.jpg); + } + + /* background for toolbar when it is condensed */ + core-scroll-header-panel::shadow #condensedHeaderBg { + background-color: transparent; + } + + core-field { + background-color: #fff; + border: 1px solid #eee; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + } + + core-toolbar { + background-color: transparent; + } + + .content { + padding: 10px 30px; + } + + </style> + +</head> +<body unresolved> + + <!-- Instead of using 1/3 of the header's height, we want to manually set the + condensed header's height to 64px --> + <core-scroll-header-panel condenses condensedHeaderHeight="64"> + + <core-toolbar class="medium-tall"> + + <core-field flex class="bottom"> + <core-icon icon="menu"></core-icon> + <core-input flex></core-input> + <core-icon icon="av:mic"></core-icon> + </core-field> + + </core-toolbar> + + <div class="content"> + + <lorem-ipsum paragraphs="100"></lorem-ipsum> + + </div> + + </core-scroll-header-panel> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg2.jpg b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg2.jpg Binary files differnew file mode 100644 index 0000000..9aad0a9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg2.jpg diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg3.jpg b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg3.jpg Binary files differnew file mode 100644 index 0000000..5079b4e8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg3.jpg diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg5.jpg b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg5.jpg Binary files differnew file mode 100644 index 0000000..979ef17 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg5.jpg diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg6.jpg b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg6.jpg Binary files differnew file mode 100644 index 0000000..1dec3f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg6.jpg diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg9.jpg b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg9.jpg Binary files differnew file mode 100644 index 0000000..c9a2e658 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/images/bg9.jpg diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/demos/lorem-ipsum.html b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/lorem-ipsum.html new file mode 100644 index 0000000..0c32aa9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/demos/lorem-ipsum.html @@ -0,0 +1,33 @@ +<polymer-element name="lorem-ipsum" attributes="paragraphs"> + + <script> + + var strings = [ + 'Lorem ipsum dolor sit amet, per in nusquam nominavi periculis, sit elit oportere ea, id minim maiestatis incorrupte duo. Dolorum verterem ad ius, his et nullam verterem. Eu alia debet usu, an doming tritani est. Vix ad ponderum petentium suavitate, eum eu tempor populo, graece sententiae constituam vim ex. Cu torquatos reprimique neglegentur nec, voluptua periculis has ut, at eos discere deleniti sensibus.', + 'Ut labores minimum atomorum pro. Laudem tibique ut has. No nam ipsum lorem aliquip, accumsan quaerendum ei usu. Maiestatis vituperatoribus qui at, ne suscipit volutpat tractatos nam. Nonumy semper mollis vis an, nam et harum detracto. An pri dolor percipitur, vel maluisset disputationi te.', + 'Fugit adolescens vis et, ei graeci forensibus sed. Denique argumentum comprehensam ei vis, id has facete accommodare, quo scripta utroque id. Autem nullam doming ad eam, te nam dicam iriure periculis. Quem vocent veritus eu vis, nam ut hinc idque feugait.', + 'Convenire definiebas scriptorem eu cum. Sit dolor dicunt consectetuer no, in vix nisl velit, duo ridens abhorreant delicatissimi ut. Pro ei libris omnium scripserit, natum volumus propriae no eam. Suscipit pericula explicari sed ei, te usu iudicabit forensibus efficiantur. Has quot dicam animal id.', + 'Ea duis bonorum nec, falli paulo aliquid ei eum. Cu mei vide viris gloriatur, at populo eripuit sit. Idque molestiae duo ne. Qui id tempor accusamus sadipscing. His odio feugait et. Ne vis vide labitur, eu corpora appareat interpretaris mel.', + 'Usu eu novum principes, vel quodsi aliquip ea. Labore mandamus persequeris id mea, has eripuit neglegentur id, illum noster nec in. Ea nam quod quando cetero, per qualisque tincidunt in. Qui ne meliore commune voluptatibus, qui justo labores no. Et dicat cotidieque eos, vis homero legere et, eam timeam nominavi in. Pri dicam option placerat an, cu qui aliquam adipiscing signiferumque. Vis euismod accusamus no, soluta vocibus ei cum.', + 'Has at minim mucius aliquam, est id tempor laoreet. Ius officiis convenire ex, in vim iuvaret patrioque similique, veritus detraxit sed ad. Mel no admodum abhorreant cotidieque, et duo possim postulant, consul convenire adolescens cu mel. Duo in decore soleat doming. Fabellas interpretaris eos at. No cum unum novum dicit.', + 'Pro saepe pertinax ei, ad pri animal labores suscipiantur. Modus commodo minimum eum te, vero utinam assueverit per eu, zril oportere suscipiantur pri te. Partem percipitur deterruisset ad sea, at eam suas luptatum dissentiunt. No error alienum pro, erant senserit ex mei, pri semper alterum no. Ut habemus menandri vulputate mea. Feugiat verterem ut sed. Dolores maiestatis id per.', + 'Detracto suavitate repudiandae no eum. Id adhuc minim soluta nam, novum denique ad eum. At mucius malorum meliore his, te ferri tritani cum, eu mel legendos ocurreret. His te ludus aperiam malorum, mundi nominati deseruisse pro ne, mel discere intellegat in. Vero dissentiunt quo in, vel cu meis maiestatis adversarium. In sit summo nostrum petentium, ea vix amet nullam minimum, ornatus sensibus theophrastus ex nam.', + 'Iisque perfecto dissentiet cum et, sit ut quot mandamus, ut vim tibique splendide instructior. Id nam odio natum malorum, tibique copiosae expetenda mel ea. Mea melius malorum ut. Ut nec tollit vocent timeam. Facer nonumy numquam id his, munere salutatus consequuntur eum et, eum cotidieque definitionem signiferumque id. Ei oblique graecis patrioque vis, et probatus dignissim inciderint vel. Sed id paulo erroribus, autem semper accusamus in mel.' + ]; + + Polymer('lorem-ipsum', { + + paragraphs: 1, + + paragraphsChanged: function() { + this.innerHTML = ''; + for (var i = 0; i < this.paragraphs; i++) { + this.innerHTML += '<p>' + strings[Math.floor(Math.random() * strings.length)] + '</p>'; + } + } + + }); + + </script> + +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/index.html b/third_party/polymer/components-chromium/core-scroll-header-panel/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-scroll-header-panel/metadata.html b/third_party/polymer/components-chromium/core-scroll-header-panel/metadata.html new file mode 100644 index 0000000..09f6170 --- /dev/null +++ b/third_party/polymer/components-chromium/core-scroll-header-panel/metadata.html @@ -0,0 +1,32 @@ +<x-meta id="core-scroll-header-panel" label="Scroll Header Panel" isContainer group="Core"> + + <template> + + <core-scroll-header-panel condenses style="width: 380px; height: 460px;"> + + <core-toolbar class="tall" style="background-color: #4285f4; color: #f1f1f1; fill: #f1f1f1;"> + + <core-icon-button icon="arrow-back"></core-icon-button> + <div flex></div> + <core-icon-button icon="search"></core-icon-button> + <core-icon-button icon="more-vert"></core-icon-button> + + <div class="bottom indent">Title</div> + + </core-toolbar> + + <section content style="height: 5000px; background: linear-gradient(rgb(214, 227, 231), lightblue);"></section> + + </core-scroll-header-panel> + + </template> + + <template id="imports"> + + <link rel="import" href="../core-icon-button/core-icon-button.html"> + <link rel="import" href="../core-toolbar/core-toolbar.html"> + <link rel="import" href="core-scroll-header-panel.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selection/.bower.json b/third_party/polymer/components-chromium/core-selection/.bower.json new file mode 100644 index 0000000..63c30f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-selection", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-selection", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "9311ad9bf5914f21f124bd44d3161f7420fe5ab1" + }, + "_source": "git://github.com/Polymer/core-selection.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-selection" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selection/README.md b/third_party/polymer/components-chromium/core-selection/README.md new file mode 100644 index 0000000..6287468 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/README.md @@ -0,0 +1,4 @@ +core-selection +============== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-selection) for more information. diff --git a/third_party/polymer/components-chromium/core-selection/bower.json b/third_party/polymer/components-chromium/core-selection/bower.json new file mode 100644 index 0000000..b601e44 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-selection", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selection/core-selection-extracted.js b/third_party/polymer/components-chromium/core-selection/core-selection-extracted.js new file mode 100644 index 0000000..86994c9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/core-selection-extracted.js @@ -0,0 +1,73 @@ + + Polymer('core-selection', { + /** + * If true, multiple selections are allowed. + * + * @attribute multi + * @type boolean + * @default false + */ + multi: false, + ready: function() { + this.clear(); + }, + clear: function() { + this.selection = []; + }, + /** + * Retrieves the selected item(s). + * @method getSelection + * @returns Returns the selected item(s). If the multi property is true, + * getSelection will return an array, otherwise it will return + * the selected item or undefined if there is no selection. + */ + getSelection: function() { + return this.multi ? this.selection : this.selection[0]; + }, + /** + * Indicates if a given item is selected. + * @method isSelected + * @param {any} item The item whose selection state should be checked. + * @returns Returns true if `item` is selected. + */ + isSelected: function(item) { + return this.selection.indexOf(item) >= 0; + }, + setItemSelected: function(item, isSelected) { + if (item !== undefined && item !== null) { + if (isSelected) { + this.selection.push(item); + } else { + var i = this.selection.indexOf(item); + if (i >= 0) { + this.selection.splice(i, 1); + } + } + this.fire("core-select", {isSelected: isSelected, item: item}); + } + }, + /** + * Set the selection state for a given `item`. If the multi property + * is true, then the selected state of `item` will be toggled; otherwise + * the `item` will be selected. + * @method select + * @param {any} item: The item to select. + */ + select: function(item) { + if (this.multi) { + this.toggle(item); + } else if (this.getSelection() !== item) { + this.setItemSelected(this.getSelection(), false); + this.setItemSelected(item, true); + } + }, + /** + * Toggles the selection state for `item`. + * @method toggle + * @param {any} item: The item to toggle. + */ + toggle: function(item) { + this.setItemSelected(item, !this.isSelected(item)); + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selection/core-selection.html b/third_party/polymer/components-chromium/core-selection/core-selection.html new file mode 100644 index 0000000..021b376 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/core-selection.html @@ -0,0 +1,78 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +@group Polymer Core Elements + +The `<core-selection>` element is used to manage selection state. It has no +visual appearance and is typically used in conjunction with another element. +For example, [core-selector](#core-selector) +use a `<core-selection>` to manage selection. + +To mark an item as selected, call the `select(item)` method on +`<core-selection>`. The item itself is an argument to this method. + +The `<core-selection>`element manages selection state for any given set of +items. When an item is selected, the `core-select` event is fired. + +The attribute `multi` indicates if multiple items can be selected at once. + +Example: + + <polymer-element name="selection-example"> + <template> + <style> + polyfill-next-selector { content: ':host > .selected'; } + ::content > .selected { + font-weight: bold; + font-style: italic; + } + </style> + <ul on-tap="{{itemTapAction}}"> + <content></content> + </ul> + <core-selection id="selection" multi + on-core-select="{{selectAction}}"></core-selection> + </template> + <script> + Polymer('selection-example', { + itemTapAction: function(e, detail, sender) { + this.$.selection.select(e.target); + }, + selectAction: function(e, detail, sender) { + detail.item.classList.toggle('selected', detail.isSelected); + } + }); + </script> + </polymer-element> + + <selection-example> + <li>Red</li> + <li>Green</li> + <li>Blue</li> + </selection-example> + +@element core-selection +--> + +<!-- +Fired when an item's selection state is changed. This event is fired both +when an item is selected or deselected. The `isSelected` detail property +contains the selection state. + +@event core-select +@param {Object} detail + @param {boolean} detail.isSelected true for selection and false for de-selection + @param {Object} detail.item the item element +--> +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-selection" attributes="multi" hidden assetpath=""> + +</polymer-element> +<script src="core-selection-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selection/demo.html b/third_party/polymer/components-chromium/core-selection/demo.html new file mode 100644 index 0000000..560f480 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/demo.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>Selection</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="core-selection.html"> +</head> +<body unresolved> + + <polymer-element name="selection-example"> + <template> + <style> + polyfill-next-selector { content: 'ul > *'; } + ::content > * { + cursor: pointer; + } + + polyfill-next-selector { content: 'ul > .selected'; } + ::content > .selected { + font-weight: bold; + font-style: italic; + } + </style> + + <ul on-tap="{{itemTapAction}}"> + <content></content> + </ul> + + <core-selection id="selection" multi on-core-select="{{selectAction}}"></core-selection> + + </template> + <script> + Polymer('selection-example', { + itemTapAction: function(e, detail, sender) { + this.$.selection.select(e.target); + }, + selectAction: function(e, detail, sender) { + detail.item.classList.toggle('selected', detail.isSelected); + } + }); + </script> + </polymer-element> + + <selection-example> + <li>Red</li> + <li>Green</li> + <li>Blue</li> + </selection-example> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-selection/index.html b/third_party/polymer/components-chromium/core-selection/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selection/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-selector/.bower.json b/third_party/polymer/components-chromium/core-selector/.bower.json new file mode 100644 index 0000000..b3ffb9c --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-selector", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-selector", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "8c99bc7559b098ea82ced4fc03b7c0beb65e87da" + }, + "_source": "git://github.com/Polymer/core-selector.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-selector" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selector/README.md b/third_party/polymer/components-chromium/core-selector/README.md new file mode 100644 index 0000000..e4beeea --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/README.md @@ -0,0 +1,4 @@ +core-selector +============== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-selector) for more information. diff --git a/third_party/polymer/components-chromium/core-selector/bower.json b/third_party/polymer/components-chromium/core-selector/bower.json new file mode 100644 index 0000000..e744103 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-selector", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selection": "Polymer/core-selection#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selector/core-selector-extracted.js b/third_party/polymer/components-chromium/core-selector/core-selector-extracted.js new file mode 100644 index 0000000..60bc502 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/core-selector-extracted.js @@ -0,0 +1,348 @@ + + + Polymer('core-selector', { + + /** + * Gets or sets the selected element. Default to use the index + * of the item element. + * + * If you want a specific attribute value of the element to be + * used instead of index, set "valueattr" to that attribute name. + * + * Example: + * + * <core-selector valueattr="label" selected="foo"> + * <div label="foo"></div> + * <div label="bar"></div> + * <div label="zot"></div> + * </core-selector> + * + * In multi-selection this should be an array of values. + * + * Example: + * + * <core-selector id="selector" valueattr="label" multi> + * <div label="foo"></div> + * <div label="bar"></div> + * <div label="zot"></div> + * </core-selector> + * + * this.$.selector.selected = ['foo', 'zot']; + * + * @attribute selected + * @type Object + * @default null + */ + selected: null, + + /** + * If true, multiple selections are allowed. + * + * @attribute multi + * @type boolean + * @default false + */ + multi: false, + + /** + * Specifies the attribute to be used for "selected" attribute. + * + * @attribute valueattr + * @type string + * @default 'name' + */ + valueattr: 'name', + + /** + * Specifies the CSS class to be used to add to the selected element. + * + * @attribute selectedClass + * @type string + * @default 'core-selected' + */ + selectedClass: 'core-selected', + + /** + * Specifies the property to be used to set on the selected element + * to indicate its active state. + * + * @attribute selectedProperty + * @type string + * @default '' + */ + selectedProperty: '', + + /** + * Specifies the attribute to set on the selected element to indicate + * its active state. + * + * @attribute selectedAttribute + * @type string + * @default 'active' + */ + selectedAttribute: 'active', + + /** + * Returns the currently selected element. In multi-selection this returns + * an array of selected elements. + * + * @attribute selectedItem + * @type Object + * @default null + */ + selectedItem: null, + + /** + * In single selection, this returns the model associated with the + * selected element. + * + * @attribute selectedModel + * @type Object + * @default null + */ + selectedModel: null, + + /** + * In single selection, this returns the selected index. + * + * @attribute selectedIndex + * @type number + * @default -1 + */ + selectedIndex: -1, + + /** + * The target element that contains items. If this is not set + * core-selector is the container. + * + * @attribute target + * @type Object + * @default null + */ + target: null, + + /** + * This can be used to query nodes from the target node to be used for + * selection items. Note this only works if the 'target' property is set. + * + * Example: + * + * <core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]"></core-selector> + * <form id="myForm"> + * <label><input type="radio" name="color" value="red"> Red</label> <br> + * <label><input type="radio" name="color" value="green"> Green</label> <br> + * <label><input type="radio" name="color" value="blue"> Blue</label> <br> + * <p>color = {{color}}</p> + * </form> + * + * @attribute itemsSelector + * @type string + * @default '' + */ + itemsSelector: '', + + /** + * The event that would be fired from the item element to indicate + * it is being selected. + * + * @attribute activateEvent + * @type string + * @default 'tap' + */ + activateEvent: 'tap', + + /** + * Set this to true to disallow changing the selection via the + * `activateEvent`. + * + * @attribute notap + * @type boolean + * @default false + */ + notap: false, + + ready: function() { + this.activateListener = this.activateHandler.bind(this); + this.observer = new MutationObserver(this.updateSelected.bind(this)); + if (!this.target) { + this.target = this; + } + }, + + get items() { + if (!this.target) { + return []; + } + var nodes = this.target !== this ? (this.itemsSelector ? + this.target.querySelectorAll(this.itemsSelector) : + this.target.children) : this.$.items.getDistributedNodes(); + return Array.prototype.filter.call(nodes || [], function(n) { + return n && n.localName !== 'template'; + }); + }, + + targetChanged: function(old) { + if (old) { + this.removeListener(old); + this.observer.disconnect(); + this.clearSelection(); + } + if (this.target) { + this.addListener(this.target); + this.observer.observe(this.target, {childList: true}); + this.updateSelected(); + } + }, + + addListener: function(node) { + Polymer.addEventListener(node, this.activateEvent, this.activateListener); + }, + + removeListener: function(node) { + Polymer.removeEventListener(node, this.activateEvent, this.activateListener); + }, + + get selection() { + return this.$.selection.getSelection(); + }, + + selectedChanged: function() { + this.updateSelected(); + }, + + updateSelected: function() { + this.validateSelected(); + if (this.multi) { + this.clearSelection(); + this.selected && this.selected.forEach(function(s) { + this.valueToSelection(s); + }, this); + } else { + this.valueToSelection(this.selected); + } + }, + + validateSelected: function() { + // convert to an array for multi-selection + if (this.multi && !Array.isArray(this.selected) && + this.selected !== null && this.selected !== undefined) { + this.selected = [this.selected]; + } + }, + + clearSelection: function() { + if (this.multi) { + this.selection.slice().forEach(function(s) { + this.$.selection.setItemSelected(s, false); + }, this); + } else { + this.$.selection.setItemSelected(this.selection, false); + } + this.selectedItem = null; + this.$.selection.clear(); + }, + + valueToSelection: function(value) { + var item = (value === null || value === undefined) ? + null : this.items[this.valueToIndex(value)]; + this.$.selection.select(item); + }, + + updateSelectedItem: function() { + this.selectedItem = this.selection; + }, + + selectedItemChanged: function() { + if (this.selectedItem) { + var t = this.selectedItem.templateInstance; + this.selectedModel = t ? t.model : undefined; + } else { + this.selectedModel = null; + } + this.selectedIndex = this.selectedItem ? + parseInt(this.valueToIndex(this.selected)) : -1; + }, + + valueToIndex: function(value) { + // find an item with value == value and return it's index + for (var i=0, items=this.items, c; (c=items[i]); i++) { + if (this.valueForNode(c) == value) { + return i; + } + } + // if no item found, the value itself is probably the index + return value; + }, + + valueForNode: function(node) { + return node[this.valueattr] || node.getAttribute(this.valueattr); + }, + + // events fired from <core-selection> object + selectionSelect: function(e, detail) { + this.updateSelectedItem(); + if (detail.item) { + this.applySelection(detail.item, detail.isSelected); + } + }, + + applySelection: function(item, isSelected) { + if (this.selectedClass) { + item.classList.toggle(this.selectedClass, isSelected); + } + if (this.selectedProperty) { + item[this.selectedProperty] = isSelected; + } + if (this.selectedAttribute && item.setAttribute) { + if (isSelected) { + item.setAttribute(this.selectedAttribute, ''); + } else { + item.removeAttribute(this.selectedAttribute); + } + } + }, + + // event fired from host + activateHandler: function(e) { + if (!this.notap) { + var i = this.findDistributedTarget(e.target, this.items); + if (i >= 0) { + var item = this.items[i]; + var s = this.valueForNode(item) || i; + if (this.multi) { + if (this.selected) { + this.addRemoveSelected(s); + } else { + this.selected = [s]; + } + } else { + this.selected = s; + } + this.asyncFire('core-activate', {item: item}); + } + } + }, + + addRemoveSelected: function(value) { + var i = this.selected.indexOf(value); + if (i >= 0) { + this.selected.splice(i, 1); + } else { + this.selected.push(value); + } + this.valueToSelection(value); + }, + + findDistributedTarget: function(target, nodes) { + // find first ancestor of target (including itself) that + // is in nodes, if any + while (target && target != this) { + var i = Array.prototype.indexOf.call(nodes, target); + if (i >= 0) { + return i; + } + target = target.parentNode; + } + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selector/core-selector.html b/third_party/polymer/components-chromium/core-selector/core-selector.html new file mode 100644 index 0000000..dfd01c4 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/core-selector.html @@ -0,0 +1,77 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Polymer Core Elements + +`<core-selector>` is used to manage a list of elements that can be selected. + +The attribute `selected` indicates which item element is being selected. +The attribute `multi` indicates if multiple items can be selected at once. +Tapping on the item element would fire `core-activate` event. Use +`core-select` event to listen for selection changes. + +Example: + + <core-selector selected="0"> + <div>Item 1</div> + <div>Item 2</div> + <div>Item 3</div> + </core-selector> + +`<core-selector>` is not styled. Use the `core-selected` CSS class to style the selected element. + + <style> + .item.core-selected { + background: #eee; + } + </style> + ... + <core-selector> + <div class="item">Item 1</div> + <div class="item">Item 2</div> + <div class="item">Item 3</div> + </core-selector> + +@element core-selector +@status stable +@homepage github.io +--> + +<!-- +Fired when an item's selection state is changed. This event is fired both +when an item is selected or deselected. The `isSelected` detail property +contains the selection state. + +@event core-select +@param {Object} detail + @param {boolean} detail.isSelected true for selection and false for deselection + @param {Object} detail.item the item element +--> +<!-- +Fired when an item element is tapped. + +@event core-activate +@param {Object} detail + @param {Object} detail.item the item element +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../core-selection/core-selection.html"> + +<polymer-element name="core-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent" assetpath=""> + + <template> + <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection> + <content id="items" select="*"></content> + </template> + + +</polymer-element> +<script src="core-selector-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-selector/demo.html b/third_party/polymer/components-chromium/core-selector/demo.html new file mode 100644 index 0000000..de58696 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/demo.html @@ -0,0 +1,106 @@ +<!DOCTYPE html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>Selector</title> + <script src="../platform/platform.js"></script> + <link rel="import" href="core-selector.html"> +</head> +<body unresolved> + <polymer-element name="selector-examples"> + <template> + <style> + .list { + display: block; + border: 1px solid #ccc; + border-bottom: none; + background: #666; + color: white; + list-style: none; + margin: 0; + padding: 0; + } + + .list > * { + height: 40px; + line-height: 40px; + padding: 0 20px; + border-bottom: 1px solid #ccc; + } + + .list > *.core-selected { + background: #333; + } + + li { + height: 30px; + } + + li.core-selected:after { + content: "\2713"; + position: absolute; + padding-left: 10px; + } + </style> + + <h2>basic</h2> + <core-selector class="list" selected="0"> + <div>Item 0</div> + <div>Item 1</div> + <div>Item 2</div> + <div>Item 3</div> + <div>Item 4</div> + </core-selector> + + <h2>multi-selection</h2> + <core-selector class="list" selected="{{multiSelected}}" multi> + <div>Item 0</div> + <div>Item 1</div> + <div>Item 2</div> + <div>Item 3</div> + <div>Item 4</div> + </core-selector> + + <h2>list</h2> + <core-selector target="{{$.list}}" selected="0"></core-selector> + <ul id="list"> + <li>Item 0</li> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3</li> + <li>Item 4</li> + </ul> + + <h2>binding of a group of radio buttons to a variable</h2> + <core-selector target="{{$.myForm}}" itemsSelector="input[type=radio]" + selected="{{color}}" valueattr="value" selectedProperty="checked" + activateEvent="change"></core-selector> + <form id="myForm"> + <label><input type="radio" name="color" value="red"> Red</label> <br> + <label><input type="radio" name="color" value="green"> Green</label> <br> + <label><input type="radio" name="color" value="blue"> Blue</label> <br> + <p>color = {{color}}</p> + </form> + + </template> + + <script> + Polymer('selector-examples', { + ready: function() { + this.multiSelected = [1, 3]; + this.color = 'green'; + } + }); + </script> + </polymer-element> + + <selector-examples></selector-examples> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-selector/index.html b/third_party/polymer/components-chromium/core-selector/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-selector/metadata.html b/third_party/polymer/components-chromium/core-selector/metadata.html new file mode 100644 index 0000000..fe0bf18 --- /dev/null +++ b/third_party/polymer/components-chromium/core-selector/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="core-selector" label="Selector" group="Core" isContainer> + + <template> + <core-selector selected="0" style="width:100%;height:50px;"></core-selector> + </template> + + <template> + <link rel="import" href="core-selector.html"> + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-shared-lib/.bower.json b/third_party/polymer/components-chromium/core-shared-lib/.bower.json new file mode 100644 index 0000000..15b08d5 --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-shared-lib", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-shared-lib", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "55ae7ea8b185677bfa5adf704502aade2ed7ab95" + }, + "_source": "git://github.com/Polymer/core-shared-lib.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-shared-lib" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-shared-lib/README.md b/third_party/polymer/components-chromium/core-shared-lib/README.md new file mode 100644 index 0000000..32c53ce --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/README.md @@ -0,0 +1,4 @@ +core-shared-lib +=============== + +See the [component landing page](http://polymer-project.org/docs/elements/core-elements.html#core-shared-lib) for more information. diff --git a/third_party/polymer/components-chromium/core-shared-lib/bower.json b/third_party/polymer/components-chromium/core-shared-lib/bower.json new file mode 100644 index 0000000..4989fd0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-shared-lib", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib-extracted.js b/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib-extracted.js new file mode 100644 index 0000000..93627ba --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib-extracted.js @@ -0,0 +1,116 @@ + +(function() { + + Polymer('core-shared-lib',{ + + notifyEvent: 'core-shared-lib-load', + + ready: function() { + if (!this.url && this.defaultUrl) { + this.url = this.defaultUrl; + } + }, + + urlChanged: function() { + require(this.url, this, this.callbackName); + }, + + provide: function() { + this.async('notify'); + }, + + notify: function() { + this.fire(this.notifyEvent, arguments); + } + + }); + + var apiMap = {}; + + function require(url, notifiee, callbackName) { + // make hashable string form url + var name = nameFromUrl(url); + // lookup existing loader instance + var loader = apiMap[name]; + // create a loader as needed + if (!loader) { + loader = apiMap[name] = new Loader(name, url, callbackName); + } + loader.requestNotify(notifiee); + } + + function nameFromUrl(url) { + return url.replace(/[\:\/\%\?\&\.\=\-]/g, '_') + '_api'; + } + + var Loader = function(name, url, callbackName) { + this.instances = []; + this.callbackName = callbackName; + if (this.callbackName) { + window[this.callbackName] = this.success.bind(this); + } else { + if (url.indexOf(this.callbackMacro) >= 0) { + this.callbackName = name + '_loaded'; + window[this.callbackName] = this.success.bind(this); + url = url.replace(this.callbackMacro, this.callbackName); + } else { + // TODO(sjmiles): we should probably fallback to listening to script.load + throw 'core-shared-api: a %%callback%% parameter is required in the API url'; + } + } + // + this.addScript(url); + }; + + Loader.prototype = { + + callbackMacro: '%%callback%%', + loaded: false, + + addScript: function(src) { + var script = document.createElement('script'); + script.src = src; + script.onerror = this.error.bind(this); + var s = document.querySelector('script'); + s.parentNode.insertBefore(script, s); + this.script = script; + }, + + removeScript: function() { + if (this.script.parentNode) { + this.script.parentNode.removeChild(this.script); + } + this.script = null; + }, + + error: function() { + this.cleanup(); + }, + + success: function() { + this.loaded = true; + this.cleanup(); + this.result = Array.prototype.slice.call(arguments); + this.instances.forEach(this.provide, this); + this.instances = null; + }, + + cleanup: function() { + delete window[this.callbackName]; + }, + + provide: function(instance) { + instance.notify(instance, this.result); + }, + + requestNotify: function(instance) { + if (this.loaded) { + this.provide(instance); + } else { + this.instances.push(instance); + } + } + + }; + +})(); diff --git a/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib.html b/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib.html new file mode 100644 index 0000000..2819de7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/core-shared-lib.html @@ -0,0 +1,36 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<link rel="import" href="../polymer/polymer.html"> + +<!-- +Supports sharing a JSONP-based JavaScript library. + + <core-shared-lib on-core-shared-lib-load="{{load}}" url="https://apis.google.com/js/plusone.js?onload=%%callback%%"> + +Multiple components can request a library using a `core-shared-lib` component and only one copy of that library will +loaded from the network. + +Currently, the library must support JSONP to work as a shared-lib. + +Some libraries require a specific global function be defined. If this is the case, specify the `callbackName` property. + +Where possible, you should use an HTML Import to load library dependencies. Rather than using this element, +create an import (`<link rel="import" href="lib.html">`) that wraps loading the .js file: + +lib.html: + + <script src="lib.js"></script> + +@group Polymer Core Elements +@element core-shared-lib +--> +<polymer-element name="core-shared-lib" attributes="url notifyEvent callbackName" assetpath=""> + +</polymer-element> +<script src="core-shared-lib-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-shared-lib/demo.html b/third_party/polymer/components-chromium/core-shared-lib/demo.html new file mode 100644 index 0000000..a18ef95 --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/demo.html @@ -0,0 +1,33 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title></title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-shared-lib.html"> + +</head> +<body> + + <!-- three instances, but only one actual network transaction --> + <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> + <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> + <core-shared-lib url="https://apis.google.com/js/client.js?onload=%%callback%%"></core-shared-lib> + + <script> + addEventListener('core-shared-lib-load', function() { + console.log('client.js lib load notify'); + }); + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-shared-lib/index.html b/third_party/polymer/components-chromium/core-shared-lib/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-shared-lib/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-signals/.bower.json b/third_party/polymer/components-chromium/core-signals/.bower.json new file mode 100644 index 0000000..57eec41 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-signals", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-signals", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "9d727f813b322f91c97fc347dfa1c64a359d5cfa" + }, + "_source": "git://github.com/Polymer/core-signals.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-signals" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-signals/README.md b/third_party/polymer/components-chromium/core-signals/README.md new file mode 100644 index 0000000..05d4a61 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/README.md @@ -0,0 +1,4 @@ +core-signals +============ + +See the [component page](http://www.polymer-project.org/docs/elements/core-elements.html#core-signals) for more information. diff --git a/third_party/polymer/components-chromium/core-signals/bower.json b/third_party/polymer/components-chromium/core-signals/bower.json new file mode 100644 index 0000000..85449b8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-signals", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-signals/core-signals-extracted.js b/third_party/polymer/components-chromium/core-signals/core-signals-extracted.js new file mode 100644 index 0000000..badea27 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/core-signals-extracted.js @@ -0,0 +1,45 @@ + +(function(){ + + Polymer('core-signals',{ + attached: function() { + signals.push(this); + }, + removed: function() { + var i = signals.indexOf(this); + if (i >= 0) { + signals.splice(i, 1); + } + } + }); + + // private shared database + var signals = []; + + // signal dispatcher + function notify(name, data) { + // convert generic-signal event to named-signal event + var signal = new CustomEvent('core-signal-' + name, { + // if signals bubble, it's easy to get confusing duplicates + // (1) listen on a container on behalf of local child + // (2) some deep child ignores the event and it bubbles + // up to said container + // (3) local child event bubbles up to container + // also, for performance, we avoid signals flying up the + // tree from all over the place + bubbles: false, + detail: data + }); + // dispatch named-signal to all 'signals' instances, + // only interested listeners will react + signals.forEach(function(s) { + s.dispatchEvent(signal); + }); + } + + // signal listener at document + document.addEventListener('core-signal', function(e) { + notify(e.detail.name, e.detail.data); + }); + +})(); diff --git a/third_party/polymer/components-chromium/core-signals/core-signals.html b/third_party/polymer/components-chromium/core-signals/core-signals.html new file mode 100644 index 0000000..c0e9e5b9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/core-signals.html @@ -0,0 +1,40 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<link rel="import" href="../polymer/polymer.html"> + +<!-- +`core-signals` provides basic publish-subscribe functionality. + +Note: avoid using `core-signals` whenever you can use +a controller (parent element) to mediate communication +instead. + +To send a signal, fire a custom event of type `core-signal`, with +a detail object containing `name` and `data` fields. + + this.fire('core-signal', {name: 'hello', data: null}); + +To receive a signal, listen for `core-signal-<name>` event on a +`core-signal` element. + + <core-signal on-core-signal-hello="{{helloSignal}}"> + +You can fire a signal event from anywhere, and all +`core-signal` elements will receive the event, regardless +of where they are in DOM. + +@group Polymer Core Elements +@element core-signals +@status stable +@homepage github.io +--> +<polymer-element name="core-signals" assetpath=""> + +</polymer-element> +<script src="core-signals-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-signals/demo.html b/third_party/polymer/components-chromium/core-signals/demo.html new file mode 100644 index 0000000..b3c4cc1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/demo.html @@ -0,0 +1,53 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!doctype html> +<html> +<head> + +<title></title> + +<script src="../platform/platform.js"></script> + +<link rel="import" href="core-signals.html"> + +</head> +<body> + +<my-element></my-element> +<my-app></my-app> + +<polymer-element name="my-element"> +<template> + Hello +</template> +<script> + Polymer('my-element', { + ready: function() { + this.asyncFire('core-signal', {name: "foo", data: "Foo!"}); + } + }); +</script> +</polymer-element> + +<polymer-element name="my-app"> +<template> + <core-signals on-core-signal-foo="{{fooSignal}}"></core-signals> + <content></content> +</template> +<script> + Polymer('my-app', { + fooSignal: function(e, detail, sender) { + this.innerHTML += '<br>[my-app] got a [' + detail + '] signal<br>'; + } + }); +</script> +</polymer-element> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-signals/index.html b/third_party/polymer/components-chromium/core-signals/index.html new file mode 100644 index 0000000..a003379 --- /dev/null +++ b/third_party/polymer/components-chromium/core-signals/index.html @@ -0,0 +1,22 @@ +<!doctype html>
+<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
+The complete set of authors may be found at http://polymer.github.io/AUTHORS
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
+-->
+<html>
+<head>
+
+ <script src="../platform/platform.js"></script>
+ <link rel="import" href="../core-component-page/core-component-page.html">
+
+</head>
+<body unresolved>
+
+ <core-component-page></core-component-page>
+
+</body>
+</html>
diff --git a/third_party/polymer/components-chromium/core-splitter/.bower.json b/third_party/polymer/components-chromium/core-splitter/.bower.json new file mode 100644 index 0000000..50ef0c8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-splitter", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-splitter", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "f803b7e279fea797bdde3d751ecf3926d01b38de" + }, + "_source": "git://github.com/Polymer/core-splitter.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-splitter" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-splitter/README.md b/third_party/polymer/components-chromium/core-splitter/README.md new file mode 100644 index 0000000..d788648 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/README.md @@ -0,0 +1,4 @@ +core-splitter +============= + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-splitter) for more information. diff --git a/third_party/polymer/components-chromium/core-splitter/bower.json b/third_party/polymer/components-chromium/core-splitter/bower.json new file mode 100644 index 0000000..62e3bf9 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-splitter", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-splitter/core-splitter-extracted.js b/third_party/polymer/components-chromium/core-splitter/core-splitter-extracted.js new file mode 100644 index 0000000..32135ab --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/core-splitter-extracted.js @@ -0,0 +1,92 @@ + + + Polymer('core-splitter', { + + /** + * Possible values are "left", "right", "up" and "down". + * + * @attribute direction + * @type string + * @default 'left' + */ + direction: 'left', + + /** + * Minimum width to which the splitter target can be sized + * + * @attribute minSize + * @type number + * @default 0 + */ + minSize: 0, + + /** + * Locks the split bar so it can't be dragged. + * + * @attribute locked + * @type boolean + * @default false + */ + locked: false, + + /** + * By default the parent and siblings of the splitter are set to overflow hidden. This helps + * avoid elements bleeding outside the splitter regions. Set this property to true to allow + * these elements to overflow. + * + * @attribute allowOverflow + * @type boolean + * @default false + */ + allowOverflow: false, + + ready: function() { + this.directionChanged(); + }, + + domReady: function() { + if (!this.allowOverflow) { + this.parentNode.style.overflow = this.nextElementSibling.style.overflow = + this.previousElementSibling.style.overflow = 'hidden'; + } + }, + + directionChanged: function() { + this.isNext = this.direction === 'right' || this.direction === 'down'; + this.horizontal = this.direction === 'up' || this.direction === 'down'; + this.update(); + }, + + update: function() { + this.target = this.isNext ? this.nextElementSibling : this.previousElementSibling; + this.dimension = this.horizontal ? 'height' : 'width'; + this.classList.toggle('horizontal', this.horizontal); + }, + + targetChanged: function(old) { + if (old) { + old.style[old.__splitterMinSize] = ''; + } + var min = this.target.__splitterMinSize = this.horizontal ? 'minHeight' : 'minWidth'; + this.target.style[min] = this.minSize + 'px'; + }, + + trackStart: function() { + this.update(); + this.size = parseInt(getComputedStyle(this.target)[this.dimension]); + }, + + track: function(e) { + if (this.locked) { + return; + } + var d = e[this.horizontal ? 'dy' : 'dx']; + this.target.style[this.dimension] = + this.size + (this.isNext ? -d : d) + 'px'; + }, + + preventSelection: function(e) { + e.preventDefault(); + } + }); + diff --git a/third_party/polymer/components-chromium/core-splitter/core-splitter.css b/third_party/polymer/components-chromium/core-splitter/core-splitter.css new file mode 100644 index 0000000..75d62d0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/core-splitter.css @@ -0,0 +1,27 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + width: 12px; + background: #efefef url(handle.svg) no-repeat center; + box-shadow: inset 0 0 2px 1px #ccc; + cursor: col-resize; +} + +:host(.horizontal) { + width: auto; + height: 12px; + cursor: row-resize; + background-image: url(handle-h.svg); +} + +:host(:hover, :active) { + background-color: #ddd; +} diff --git a/third_party/polymer/components-chromium/core-splitter/core-splitter.html b/third_party/polymer/components-chromium/core-splitter/core-splitter.html new file mode 100644 index 0000000..a574551 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/core-splitter.html @@ -0,0 +1,54 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-splitter` provides a split bar and dragging on the split bar +will resize the sibling element. Use its `direction` property to indicate +which sibling element to be resized and the orientation. Usually you would want +to use `core-splitter` along with flex layout so that the other sibling +element can be _flexible_. + +Example: + + <div horizontal layout> + <div>left</div> + <core-splitter direction="left"></core-splitter> + <div flex>right</div> + </div> + +In the above example, dragging the splitter will resize the _left_ element. And +since the parent container is a flexbox and the _right_ element has +`flex`, the _right_ element will be auto-resized. + +For horizontal splitter set `direction` to "up" or "down". + +Example: + + <div vertical layout> + <div>top</div> + <core-splitter direction="up"></core-splitter> + <div flex>bottom</div> + </div> + +@group Polymer Core Elements +@element core-splitter +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-splitter" attributes="direction locked minSize allowOverflow" on-trackstart="{{trackStart}}" on-track="{{track}}" on-down="{{preventSelection}}" assetpath=""> + +<template> + + <link rel="stylesheet" href="core-splitter.css"> + +</template> + +</polymer-element><script src="core-splitter-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-splitter/demo.html b/third_party/polymer/components-chromium/core-splitter/demo.html new file mode 100644 index 0000000..2cdb9d6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/demo.html @@ -0,0 +1,82 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-splitter</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-splitter.html"> + + <style> + + body { + -webkit-user-select: none; + -moz-user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + margin: 24px; + } + + .container { + width: 400px; + height: 200px; + border: 4px solid #aaa; + } + + #box1, #box3, #box5, #box6 { + width: 100px; + } + + #box2, #box4 { + height: 40px; + } + + </style> + +</head> +<body unresolved> + <div class="container" horizontal layout> + <div>left</div> + <core-splitter direction="left" minSize="128"></core-splitter> + <div flex>right</div> + </div> + + <br> + + <div class="container" vertical layout> + <div id="box2">top</div> + <core-splitter direction="up"></core-splitter> + <div flex>bottom</div> + </div> + + <br> + + <div class="container" horizontal layout> + <div id="box3">1</div> + <core-splitter direction="left"></core-splitter> + <div flex vertical layout> + <div id="box4">2</div> + <core-splitter direction="up"></core-splitter> + <div flex>3</div> + </div> + </div> + + <br> + + <div class="container" horizontal layout> + <div id="box5">left</div> + <core-splitter direction="left"></core-splitter> + <div flex>center</div> + <core-splitter direction="right"></core-splitter> + <div id="box6">right</div> + </div> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-splitter/handle-h.svg b/third_party/polymer/components-chromium/core-splitter/handle-h.svg new file mode 100644 index 0000000..13dc623 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/handle-h.svg @@ -0,0 +1,4 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"> +<g id="more-horiz"><path d="M6,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S7.1,10,6,10z M18,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S19.1,10,18,10z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z"/></g> +</svg> + diff --git a/third_party/polymer/components-chromium/core-splitter/handle.svg b/third_party/polymer/components-chromium/core-splitter/handle.svg new file mode 100644 index 0000000..124412e --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/handle.svg @@ -0,0 +1,4 @@ +<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"> +<g id="more-vert"><path d="M12,8c1.1,0,2-0.9,2-2s-0.9-2-2-2c-1.1,0-2,0.9-2,2S10.9,8,12,8z M12,10c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,10,12,10z M12,16c-1.1,0-2,0.9-2,2s0.9,2,2,2c1.1,0,2-0.9,2-2S13.1,16,12,16z"/></g> +</svg> + diff --git a/third_party/polymer/components-chromium/core-splitter/index.html b/third_party/polymer/components-chromium/core-splitter/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-splitter/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-style/.bower.json b/third_party/polymer/components-chromium/core-style/.bower.json new file mode 100644 index 0000000..2b80b6a --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-style", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-style", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "f5c5847be698afefe3d311c6e4062becb56ca832" + }, + "_source": "git://github.com/Polymer/core-style.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-style" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-style/README.md b/third_party/polymer/components-chromium/core-style/README.md new file mode 100644 index 0000000..89f4546 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/README.md @@ -0,0 +1,4 @@ +core-style +========== + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-style) for more information. diff --git a/third_party/polymer/components-chromium/core-style/bower.json b/third_party/polymer/components-chromium/core-style/bower.json new file mode 100644 index 0000000..6240018 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-style", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-style/core-style-extracted.js b/third_party/polymer/components-chromium/core-style/core-style-extracted.js new file mode 100644 index 0000000..4bad9d7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/core-style-extracted.js @@ -0,0 +1,284 @@ +
+(function() {
+
+window.CoreStyle = window.CoreStyle || {
+ g: {},
+ list: {},
+ refMap: {}
+};
+
+Polymer('core-style', {
+ /**
+ * The `id` property should be set if the `core-style` is a producer
+ * of styles. In this case, the `core-style` should have text content
+ * that is cssText.
+ *
+ * @attribute id
+ * @type string
+ * @default ''
+ */
+
+
+ publish: {
+ /**
+ * The `ref` property should be set if the `core-style` element is a
+ * consumer of styles. Set it to the `id` of the desired `core-style`
+ * element.
+ *
+ * @attribute ref
+ * @type string
+ * @default ''
+ */
+ ref: ''
+ },
+
+ // static
+ g: CoreStyle.g,
+ refMap: CoreStyle.refMap,
+
+ /**
+ * The `list` is a map of all `core-style` producers stored by `id`. It
+ * should be considered readonly. It's useful for nesting one `core-style`
+ * inside another.
+ *
+ * @attribute list
+ * @type object (readonly)
+ * @default {map of all `core-style` producers}
+ */
+ list: CoreStyle.list,
+
+ // if we have an id, we provide style
+ // if we have a ref, we consume/require style
+ ready: function() {
+ if (this.id) {
+ this.provide();
+ } else {
+ this.registerRef(this.ref);
+ if (!window.ShadowDOMPolyfill) {
+ this.require();
+ }
+ }
+ },
+
+ // can't shim until attached if using SD polyfill because need to find host
+ attached: function() {
+ if (!this.id && window.ShadowDOMPolyfill) {
+ this.require();
+ }
+ },
+
+ /****** producer stuff *******/
+
+ provide: function() {
+ this.register();
+ // we want to do this asap, especially so we can do so before definitions
+ // that use this core-style are registered.
+ if (this.textContent) {
+ this._completeProvide();
+ } else {
+ this.async(this._completeProvide);
+ }
+ },
+
+ register: function() {
+ var i = this.list[this.id];
+ if (i) {
+ if (!Array.isArray(i)) {
+ this.list[this.id] = [i];
+ }
+ this.list[this.id].push(this);
+ } else {
+ this.list[this.id] = this;
+ }
+ },
+
+ // stamp into a shadowRoot so we can monitor dom of the bound output
+ _completeProvide: function() {
+ this.createShadowRoot();
+ this.domObserver = new MutationObserver(this.domModified.bind(this))
+ .observe(this.shadowRoot, {subtree: true,
+ characterData: true, childList: true});
+ this.provideContent();
+ },
+
+ provideContent: function() {
+ this.ensureTemplate();
+ this.shadowRoot.textContent = '';
+ this.shadowRoot.appendChild(this.instanceTemplate(this.template));
+ this.cssText = this.shadowRoot.textContent;
+ },
+
+ ensureTemplate: function() {
+ if (!this.template) {
+ this.template = this.querySelector('template:not([repeat]):not([bind])');
+ // move content into the template
+ if (!this.template) {
+ this.template = document.createElement('template');
+ var n = this.firstChild;
+ while (n) {
+ this.template.content.appendChild(n.cloneNode(true));
+ n = n.nextSibling;
+ }
+ }
+ }
+ },
+
+ domModified: function() {
+ this.cssText = this.shadowRoot.textContent;
+ this.notify();
+ },
+
+ // notify instances that reference this element
+ notify: function() {
+ var s$ = this.refMap[this.id];
+ if (s$) {
+ for (var i=0, s; (s=s$[i]); i++) {
+ s.require();
+ }
+ }
+ },
+
+ /****** consumer stuff *******/
+
+ registerRef: function(ref) {
+ //console.log('register', ref);
+ this.refMap[this.ref] = this.refMap[this.ref] || [];
+ this.refMap[this.ref].push(this);
+ },
+
+ applyRef: function(ref) {
+ this.ref = ref;
+ this.registerRef(this.ref);
+ this.require();
+ },
+
+ require: function() {
+ var cssText = this.cssTextForRef(this.ref);
+ //console.log('require', this.ref, cssText);
+ if (cssText) {
+ this.ensureStyleElement();
+ // do nothing if cssText has not changed
+ if (this.styleElement._cssText === cssText) {
+ return;
+ }
+ this.styleElement._cssText = cssText;
+ if (window.ShadowDOMPolyfill) {
+ this.styleElement.textContent = cssText;
+ cssText = Platform.ShadowCSS.shimStyle(this.styleElement,
+ this.getScopeSelector());
+ }
+ this.styleElement.textContent = cssText;
+ }
+ },
+
+ cssTextForRef: function(ref) {
+ var s$ = this.byId(ref);
+ var cssText = '';
+ if (s$) {
+ if (Array.isArray(s$)) {
+ var p = [];
+ for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {
+ p.push(s.cssText);
+ }
+ cssText = p.join('\n\n');
+ } else {
+ cssText = s$.cssText;
+ }
+ }
+ if (s$ && !cssText) {
+ console.warn('No styles provided for ref:', ref);
+ }
+ return cssText;
+ },
+
+ byId: function(id) {
+ return this.list[id];
+ },
+
+ ensureStyleElement: function() {
+ if (!this.styleElement) {
+ this.styleElement = window.ShadowDOMPolyfill ?
+ this.makeShimStyle() :
+ this.makeRootStyle();
+ }
+ if (!this.styleElement) {
+ console.warn(this.localName, 'could not setup style.');
+ }
+ },
+
+ makeRootStyle: function() {
+ var style = document.createElement('style');
+ this.appendChild(style);
+ return style;
+ },
+
+ makeShimStyle: function() {
+ var host = this.findHost(this);
+ if (host) {
+ var name = host.localName;
+ var style = document.querySelector('style[' + name + '=' + this.ref +']');
+ if (!style) {
+ style = document.createElement('style');
+ style.setAttribute(name, this.ref);
+ document.head.appendChild(style);
+ }
+ return style;
+ }
+ },
+
+ getScopeSelector: function() {
+ if (!this._scopeSelector) {
+ var selector = '', host = this.findHost(this);
+ if (host) {
+ var typeExtension = host.hasAttribute('is');
+ var name = typeExtension ? host.getAttribute('is') : host.localName;
+ selector = Platform.ShadowCSS.makeScopeSelector(name,
+ typeExtension);
+ }
+ this._scopeSelector = selector;
+ }
+ return this._scopeSelector;
+ },
+
+ findHost: function(node) {
+ while (node.parentNode) {
+ node = node.parentNode;
+ }
+ return node.host || wrap(document.documentElement);
+ },
+
+ /* filters! */
+ // TODO(dfreedm): add more filters!
+
+ cycle: function(rgb, amount) {
+ if (rgb.match('#')) {
+ var o = this.hexToRgb(rgb);
+ if (!o) {
+ return rgb;
+ }
+ rgb = 'rgb(' + o.r + ',' + o.b + ',' + o.g + ')';
+ }
+
+ function cycleChannel(v) {
+ return Math.abs((Number(v) - amount) % 255);
+ }
+
+ return rgb.replace(/rgb\(([^,]*),([^,]*),([^,]*)\)/, function(m, a, b, c) {
+ return 'rgb(' + cycleChannel(a) + ',' + cycleChannel(b) + ', '
+ + cycleChannel(c) + ')';
+ });
+ },
+
+ hexToRgb: function(hex) {
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+ return result ? {
+ r: parseInt(result[1], 16),
+ g: parseInt(result[2], 16),
+ b: parseInt(result[3], 16)
+ } : null;
+ }
+
+});
+
+
+})();
diff --git a/third_party/polymer/components-chromium/core-style/core-style.html b/third_party/polymer/components-chromium/core-style/core-style.html new file mode 100644 index 0000000..cb893b3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/core-style.html @@ -0,0 +1,104 @@ +<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+<!--
+
+The `core-style` element helps manage styling inside other elements and can
+be used to make themes. The `core-style` element can be either a producer
+or consumer of styling. If it has its `id` property set, it's a producer.
+Elements that are producers should include css styling as their text content.
+If a `core-style` has its `ref` property set, it's a consumer. A `core-style`
+typically sets its `ref` property to the value of the `id` property of the
+`core-style` it wants to use. This allows a single producer to be used in
+multiple places, for example, in many different elements.
+
+It's common to place `core-style` producer elements inside HTMLImports.
+Remote stylesheets should be included this way, the @import css mechanism is
+not currently supported.
+
+Here's a basic example:
+
+ <polymer-element name="x-test" noscript>
+ <template>
+ <core-style ref="x-test"></core-style>
+ <content></content>
+ </template>
+ </polymer-element>
+
+The `x-test` element above will be styled by any `core-style` elements that have
+`id` set to `x-test`. These `core-style` producers are separate from the element
+definition, allowing a user of the element to style it independent of the author's
+styling. For example:
+
+ <core-style id="x-test">
+ :host {
+ backgound-color: steelblue;
+ }
+ </core-style>
+
+The content of the `x-test` `core-style` producer gets included inside the
+shadowRoot of the `x-test` element. If the content of the `x-test` producer
+`core-style` changes, all consumers of it are automatically kept in sync. This
+allows updating styling on the fly.
+
+The `core-style` element also supports bindings and it is the producer
+`core-style` element is the model for its content. Here's an example:
+
+ <core-style id="x-test">
+ :host {
+ background-color: {{myColor}};
+ }
+ </core-style>
+ <script>
+ document._currentScript.ownerDocument.getElementById('x-test').myColor = 'orange';
+ </script>
+
+Finally, to facilitate sharing data between `core-style` elements, all
+`core-style` elements have a `g` property which is set to the global
+`CoreStyle.g`. Here's an example:
+
+ <core-style id="x-test">
+ :host {
+ background-color: {{g.myColor}};
+ }
+ </core-style>
+ <script>
+ CoreStyle.g.myColor = 'tomato';
+ </script>
+
+Finally, one `core-style` can be nested inside another. The `core-style`
+element has a `list` property which is a map of all the `core-style` producers.
+A `core-style` producer's content is available via its `cssText` property.
+Putting this together:
+
+ <core-style id="common">
+ :host {
+ font-family: sans-serif;
+ }
+ </core-style>
+
+ <core-style id="x-test">
+ {{list.common.cssText}}
+
+ :host {
+ background-color: {{g.myColor}};
+ }
+ </core-style>
+
+
+@group Polymer Core Elements
+@element core-style
+@homepage github.io
+-->
+
+<link rel="import" href="../polymer/polymer.html">
+
+<polymer-element name="core-style" hidden assetpath="">
+
+</polymer-element>
+<script src="core-style-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-style/demo.html b/third_party/polymer/components-chromium/core-style/demo.html new file mode 100644 index 0000000..0681c6c --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/demo.html @@ -0,0 +1,58 @@ +<!DOCTYPE html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>core-style</title> + <script src="../platform/platform.js"></script> + + <link rel="import" href="elements.html"> + <link rel="import" href="my-theme.html"> + +</head> +<body unresolved fullbleed vertical layout> + <core-style ref="main"></core-style> + + <template is="auto-binding"> + <my-toolbar> + <span flex>core-style</span> + <input type="color" value="{{g.theme.colorOne}}"> + <input type="color" value="{{g.theme.colorTwo}}"> + <input type="color" value="{{g.theme.colorThree}}"> + <input type="range" min="1" max="8" value="{{g.columns}}"> + <button>A button</button> + </my-toolbar> + <section flex horizontal wrap layout> + <template repeat="{{item in items}}"> + <my-panel>{{item}}</my-panel> + </template> + </section> + </template> + + <script> + (function() { + + addEventListener('polymer-ready', function() { + var items = []; + for (var i=0; i < 100; i++) { + items.push(i); + } + + CoreStyle.g.items = items; + + addEventListener('template-bound', function(e) { + e.target.g = CoreStyle.g; + e.target.items = items; + }); + }); + + })(); + </script> + +</body> +</html> + + diff --git a/third_party/polymer/components-chromium/core-style/elements-extracted.js b/third_party/polymer/components-chromium/core-style/elements-extracted.js new file mode 100644 index 0000000..f2daa00 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/elements-extracted.js @@ -0,0 +1,5 @@ +Polymer('my-toolbar');; + + CoreStyle.g.columns = 3; +; +Polymer('my-panel');
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-style/elements.html b/third_party/polymer/components-chromium/core-style/elements.html new file mode 100644 index 0000000..7e6664a --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/elements.html @@ -0,0 +1,44 @@ +<link rel="import" href="core-style.html"> + +<core-style id="my-toolbar"> + :host { + height: 54px; + font-size: 1.3rem; + background-color: steelblue; + color: white; + } + + polyfill-next-selector { + content: ':host > *'; + } + ::content > * { + margin: 8px; + } +</core-style> + +<polymer-element name="my-toolbar" horizontal="" center="" layout="" assetpath=""> + <template> + <core-style ref="my-toolbar"></core-style> + <content></content> + </template> +</polymer-element> + +<core-style id="my-panel"> + :host { + display: inline-block; + height: 200px; + width: calc({{ 100 / g.columns }}% - 16px); + font-size: 50px; + background: gray; + margin: 8px; + } +</core-style> + + + +<polymer-element name="my-panel" vertical="" center="" center-justified="" layout="" assetpath=""> + <template> + <core-style ref="my-panel"></core-style> + <content></content> + </template> +</polymer-element><script src="elements-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-style/index.html b/third_party/polymer/components-chromium/core-style/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-style/my-theme-extracted.js b/third_party/polymer/components-chromium/core-style/my-theme-extracted.js new file mode 100644 index 0000000..fd55299 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/my-theme-extracted.js @@ -0,0 +1,7 @@ + + + CoreStyle.g.theme = { + colorOne: '#abcdef', + colorTwo: '#123456', + colorThree: '#224433' + } diff --git a/third_party/polymer/components-chromium/core-style/my-theme.html b/third_party/polymer/components-chromium/core-style/my-theme.html new file mode 100644 index 0000000..9dee3b7 --- /dev/null +++ b/third_party/polymer/components-chromium/core-style/my-theme.html @@ -0,0 +1,57 @@ +<link rel="import" href="core-style.html"> + + + +<core-style id="main"> + body { + font-family: sans-serif; + } + + section { + overflow: auto; + } + + button { + border: 1px solid {{g.theme.colorOne | cycle(-50)}}; + border-radius: 4px; + background-color: {{g.theme.colorOne}}; + color: {{g.theme.colorTwo}}; + } + + button:active { + border: 1px solid {{g.theme.colorTwo | cycle(50)}}; + border-radius: 4px; + background-color: {{g.theme.colorTwo}}; + color: {{g.theme.colorOne}}; + } + + <template repeat="{{item in g.items}}"> + my-panel:nth-of-type({{item+1}}) { + background-color: {{ g.theme.colorThree | cycle(item * -1) }}; + } + </template> +</core-style> + +<core-style id="my-toolbar"> + :host { + border-bottom: 8px solid {{g.theme.colorOne}}; + color: {{g.theme.colorOne | cycle(100)}}; + background-color: {{g.theme.colorTwo}}; + } +</core-style> + +<core-style id="my-panel"> + :host { + box-sizing: border-box; + background-color: {{g.theme.colorOne}}; + border: 8px solid {{g.theme.colorOne | cycle(50)}}; + color: {{g.theme.colorOne | cycle(-100)}}; + } + + :host(:nth-of-type(2n + 1)) { + background-color: {{g.theme.colorTwo}}; + border: 8px solid {{g.theme.colorTwo | cycle(-50)}}; + color: {{g.theme.colorTwo | cycle(100)}} + } + +</core-style><script src="my-theme-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-toolbar/.bower.json b/third_party/polymer/components-chromium/core-toolbar/.bower.json new file mode 100644 index 0000000..f757185 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-toolbar", + "private": true, + "dependencies": { + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-toolbar", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "e6f0423da98b946357bd450215803b6d02271d2b" + }, + "_source": "git://github.com/Polymer/core-toolbar.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-toolbar" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-toolbar/README.md b/third_party/polymer/components-chromium/core-toolbar/README.md new file mode 100644 index 0000000..f1600d8 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/README.md @@ -0,0 +1,4 @@ +core-toolbar
+============
+
+See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-toolbar) for more information.
diff --git a/third_party/polymer/components-chromium/core-toolbar/bower.json b/third_party/polymer/components-chromium/core-toolbar/bower.json new file mode 100644 index 0000000..d391679 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-toolbar", + "private": true, + "dependencies": { + "core-icon-button": "Polymer/core-icon-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-toolbar/core-toolbar.css b/third_party/polymer/components-chromium/core-toolbar/core-toolbar.css new file mode 100644 index 0000000..d9a050a --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/core-toolbar.css @@ -0,0 +1,110 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + /* technical */ + display: block; + position: relative; + box-sizing: border-box; + -moz-box-sizing: border-box; + /* size */ + height: 64px; + /* typography */ + font-size: 1.3em; + /* background */ + background-color: #CFD8DC; +} + +:host(.animate) { + /* transition */ + transition: height 0.18s ease-in; +} + +:host(.medium-tall) { + height: 128px; +} + +:host(.tall) { + height: 192px; +} + +.toolbar-tools { + position: relative; + height: 64px; + padding: 0 8px; + pointer-events: none; +} + +/* narrow layout */ +:host(.narrow) { + height: 56px; +} + +:host(.narrow.medium-tall) { + height: 112px; +} + +:host(.narrow.tall) { + height: 168px; +} + +:host(.narrow) .toolbar-tools { + height: 56px; + padding: 0; +} + +/* middle bar */ +#middleBar { + position: absolute; + top: 0; + right: 0; + left: 0; +} + +:host(.tall, .medium-tall) #middleBar { + -webkit-transform: translateY(100%); + transform: translateY(100%); +} + +/* bottom bar */ +#bottomBar { + position: absolute; + right: 0; + bottom: 0; + left: 0; +} + +/* make elements (e.g. buttons) respond to mouse/touch events */ +polyfill-next-selector { content: '.toolbar-tools > *'; } +::content > * { + pointer-events: auto; +} + +/* elements spacing */ +polyfill-next-selector { content: '.toolbar-tools > *'; } +::content > * { + margin: 0px 8px; +} + +/* misc helpers */ +polyfill-next-selector { content: '.toolbar-tools > .fit'; } +::content > .fit { + position: absolute; + top: auto; + right: 0; + bottom: 0; + left: 0; + width: auto; + margin: 0; +} + +polyfill-next-selector { content: ':host .indent'; } +::content > .indent { + margin-left: 60px; +} diff --git a/third_party/polymer/components-chromium/core-toolbar/core-toolbar.html b/third_party/polymer/components-chromium/core-toolbar/core-toolbar.html new file mode 100644 index 0000000..5cb7369 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/core-toolbar.html @@ -0,0 +1,74 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`core-toolbar` is a horizontal bar containing elements that can be used for +label, navigation, search and actions. + + <core-toolbar> + <core-icon-button icon="menu" on-tap="{{menuAction}}"></core-icon-button> + <div flex>Title</div> + <core-icon-button icon="more" on-tap="{{moreAction}}"></core-icon-button> + </core-toolbar> + +`core-toolbar` has a standard height, but can made be taller by setting `tall` +class on the `core-toolbar`. This will make the toolbar 3x the normal height. + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + </core-toolbar> + +Apply `medium-tall` class to make the toolbar medium tall. This will make the +toolbar 2x the normal height. + + <core-toolbar class="medium-tall"> + <core-icon-button icon="menu"></core-icon-button> + </core-toolbar> + +When taller, elements can pin to either the top (default), middle or bottom. + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + <div class="middle indent">Middle Title</div> + <div class="bottom indent">Bottom Title</div> + </core-toolbar> + +To make an element completely fit at the bottom of the toolbar, use `fit` along +with `bottom`. + + <core-toolbar class="tall"> + <div id="progressBar" class="bottom fit"></div> + </core-toolbar> + +@group Polymer Core Elements +@element core-toolbar +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="core-toolbar" noscript> +<template> + + <link rel="stylesheet" href="core-toolbar.css"> + + <div id="bottomBar" class="toolbar-tools" center horizontal layout> + <content select=".bottom"></content> + </div> + + <div id="middleBar" class="toolbar-tools" center horizontal layout> + <content select=".middle"></content> + </div> + + <div id="topBar" class="toolbar-tools" center horizontal layout> + <content></content> + </div> + +</template> +</polymer-element> diff --git a/third_party/polymer/components-chromium/core-toolbar/demo.html b/third_party/polymer/components-chromium/core-toolbar/demo.html new file mode 100644 index 0000000..03a7ac0 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/demo.html @@ -0,0 +1,107 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<html> +<head> + <title>core-toolbar</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-toolbar.html"> + <link rel="import" href="../core-icon-button/core-icon-button.html"> + + <style shim-shadowdom> + + body { + font-family: sans-serif; + } + + core-toolbar { + background-color: #CFA0E9; + } + + core-toolbar.dark-theme { + background-color: #7D25AC; + color: #f1f1f1; + fill: #f1f1f1; + } + + </style> + +</head> +<body unresolved> + + <core-toolbar> + <core-icon-button icon="menu"></core-icon-button> + <span flex>Toolbar</span> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + </core-toolbar> + + <br> + + <core-toolbar class="dark-theme"> + <core-icon-button icon="menu"></core-icon-button> + <span flex>Toolbar: dark-theme</span> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + </core-toolbar> + + <br> + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + <span flex>Toolbar: tall</span> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + </core-toolbar> + + <br> + + <core-toolbar class="tall"> + <core-icon-button icon="menu" class="bottom"></core-icon-button> + <span flex class="bottom">Toolbar: tall with elements pin to the bottom</span> + <core-icon-button icon="refresh" class="bottom"></core-icon-button> + <core-icon-button icon="add" class="bottom"></core-icon-button> + </core-toolbar> + + <br> + + <core-toolbar class="medium-tall"> + <core-icon-button icon="menu"></core-icon-button> + <span flex></span> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + <span class="bottom indent">Toolbar: medium-tall with label aligns to the bottom</span> + </core-toolbar> + + <br> + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + <div flex></div> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + <div class="middle indent">label aligns to the middle</div> + <div class="bottom indent" style="color: #666; font-size: 18px;">some stuffs align to the bottom</div> + </core-toolbar> + + <br> + + <core-toolbar class="tall"> + <core-icon-button icon="menu"></core-icon-button> + <div flex></div> + <core-icon-button icon="refresh"></core-icon-button> + <core-icon-button icon="add"></core-icon-button> + <div class="middle indent">element (e.g. progress) fits at the bottom of the toolbar</div> + <div class="bottom fit" style="height: 20px; background-color: #0f9d58;"></div> + </core-toolbar> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-toolbar/index.html b/third_party/polymer/components-chromium/core-toolbar/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-toolbar/metadata.html b/third_party/polymer/components-chromium/core-toolbar/metadata.html new file mode 100644 index 0000000..e9a48b6 --- /dev/null +++ b/third_party/polymer/components-chromium/core-toolbar/metadata.html @@ -0,0 +1,19 @@ +<x-meta id="core-toolbar" label="Toolbar" group="Core" isContainer> + + <template> + + <core-toolbar style="right: 0px; left: 0px; background-color: #4F7DC9; color: #fff; fill: #fff;"> + <core-icon-button icon="menu"></core-icon-button> + <div flex>Toolbar</div> + </core-toolbar> + + </template> + + <template id="imports"> + + <link rel="import" href="../core-icon-button/core-icon-button.html"> + <link rel="import" href="core-toolbar.html"> + + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/.bower.json b/third_party/polymer/components-chromium/core-tooltip/.bower.json new file mode 100644 index 0000000..3abc499 --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "core-tooltip", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-tooltip", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "c0abe47824167800043f459a04d7a3ef731cd4e7" + }, + "_source": "git://github.com/Polymer/core-tooltip.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-tooltip" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/README.md b/third_party/polymer/components-chromium/core-tooltip/README.md new file mode 100644 index 0000000..22d55c1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/README.md @@ -0,0 +1,4 @@ +core-tooltip +============ + +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-tooltip) for more information. diff --git a/third_party/polymer/components-chromium/core-tooltip/bower.json b/third_party/polymer/components-chromium/core-tooltip/bower.json new file mode 100644 index 0000000..4bd73aef --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/bower.json @@ -0,0 +1,7 @@ +{ + "name": "core-tooltip", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/core-tooltip-extracted.js b/third_party/polymer/components-chromium/core-tooltip/core-tooltip-extracted.js new file mode 100644 index 0000000..6f1a19a --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/core-tooltip-extracted.js @@ -0,0 +1,73 @@ + + + Polymer('core-tooltip', { + + /** + * A simple string label for the tooltip to display. To display a rich + * that includes HTML, use the `tip` attribute on the content. + * + * @attribute label + * @type string + * @default null + */ + label: null, + + /** + * If true, the tooltip an arrow pointing towards the content. + * + * @attribute noarrow + * @type boolean + * @default false + */ + noarrow: false, + + /** + * If true, the tooltip displays by default. + * + * @attribute show + * @type boolean + * @default false + */ + show: false, + + /** + * Positions the tooltip to the top, right, bottom, left of its content. + * + * @attribute position + * @type string + * @default 'bottom' + */ + position: 'bottom', + + attached: function() { + this.setPosition(); + }, + + labelChanged: function(oldVal, newVal) { + // Run if we're not after attached(). + if (oldVal) { + this.setPosition(); + } + }, + + setPosition: function() { + var controlWidth = this.clientWidth; + var controlHeight = this.clientHeight; + + var styles = getComputedStyle(this.$.tooltip); + var toolTipWidth = parseFloat(styles.width); + var toolTipHeight = parseFloat(styles.height); + + switch (this.position) { + case 'top': + case 'bottom': + this.$.tooltip.style.left = (controlWidth - toolTipWidth) / 2 + 'px'; + break; + case 'left': + case 'right': + this.$.tooltip.style.top = (controlHeight - toolTipHeight) / 2 + 'px'; + break; + } + } + }); + diff --git a/third_party/polymer/components-chromium/core-tooltip/core-tooltip.css b/third_party/polymer/components-chromium/core-tooltip/core-tooltip.css new file mode 100644 index 0000000..09c0b3b --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/core-tooltip.css @@ -0,0 +1,103 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +:host { + box-sizing: border-box; + position: relative; + display: inline-block; +} + +:host(:hover) .polymer-tooltip { + visibility: visible !important; +} + +:host(:focus) .polymer-tooltip { + visibility: visible !important; +} + +.polymer-tooltip:not(.show) { + visibility: hidden; +} + +.polymer-tooltip { + pointer-events: none; + position: absolute; + display: flex; + font-size: 10px; + font-family: sans-serif; + padding: 8px; + color: white; + background-color: rgba(0,0,0,0.8); + box-sizing: border-box; + border-radius: 3px; /* TODO: not in spec. */ + white-space: nowrap; + line-height: 6px; + z-index: 1002; /* TODO: this is brittle. */ +} + +:host([large]) .polymer-tooltip { + line-height: 14px; + font-size: 14px; + padding: 16px; +} + +.polymer-tooltip.noarrow::after { + display: none; +} + +.polymer-tooltip::after { + position: absolute; + border: solid transparent; + content: ''; + height: 0; + width: 0; + border-width: 4px; +} + +.top { + margin-bottom: 10px; /* TODO: not specified in spec */ + bottom: 100%; +} + +.right { + margin-left: 10px; /* TODO: not specified in spec */ + left: 100%; +} + +.bottom { + top: 100%; + margin-top: 10px; /* TODO: not specified in spec */ +} + +.left { + margin-right: 10px; /* TODO: not specified in spec */ + right: 100%; +} + +.polymer-tooltip.bottom::after { + bottom: 100%; + left: calc(50% - 4px); + border-bottom-color: rgba(0,0,0,0.8); +} + +.polymer-tooltip.left::after { + left: 100%; + top: calc(50% - 4px); + border-left-color: rgba(0,0,0,0.8); +} + +.polymer-tooltip.top::after { + top: 100%; + left: calc(50% - 4px); + border-top-color: rgba(0,0,0,0.8); +} + +.polymer-tooltip.right::after { + right: 100%; + top: calc(50% - 4px); + border-right-color: rgba(0,0,0,0.8); +} diff --git a/third_party/polymer/components-chromium/core-tooltip/core-tooltip.html b/third_party/polymer/components-chromium/core-tooltip/core-tooltip.html new file mode 100644 index 0000000..38c6d71 --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/core-tooltip.html @@ -0,0 +1,72 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The `core-tooltip` element creates a hover tooltip centered for the content +it contains. It can be positioned on the top|bottom|left|right of content using +the `position` attribute. + +To include HTML in the tooltip, include the `tip` attribute on the relevant +content. + +<b>Example</b>: + + <core-tooltip label="I'm a tooltip"> + <span>Hover over me.</span> + </core-tooltip> + +<b>Example</b> - positioning the tooltip to the right: + + <core-tooltip label="I'm a tooltip to the right" position="right"> + <polymer-ui-icon-button icon="drawer"></polymer-ui-icon-button> + </core-tooltip> + +<b>Example</b> - no arrow and showing by default: + + <core-tooltip label="Tooltip with no arrow and always on" noarrow show> + <img src="image.jpg"> + </core-tooltip> + +<b>Example</b> - rich tooltip using the `tip` attribute: + + <core-tooltip> + <div>Example of a rich information tooltip</div> + <div tip> + <img src="profile.jpg">Foo <b>Bar</b> - <a href="#">@baz</a> + </div> + </core-tooltip> + +@group Polymer Core Elements +@element core-tooltip +@homepage http://polymer.github.io/core-tooltip +--> + +<link rel="import" href="../polymer/polymer.html"> + +<!-- TODO: would be nice to inherit from label to get .htmlFor, and .control, + but the latter is readonly. --> +<!-- TODO: support off center arrows. --> +<!-- TODO: detect mobile and apply the .large class, instead of manual + control. --> +<!-- TODO: possibly reuse core-overlay. --> +<polymer-element name="core-tooltip" attributes="noarrow position label show" tabindex="0" assetpath=""> +<template> + + <link rel="stylesheet" href="core-tooltip.css"> + + <div id="tooltip" class="polymer-tooltip {{position}} {{ {noarrow: noarrow, show: show} | tokenList}}"> + <content select="[tip]">{{label}}</content> + </div> + + <content></content> + +</template> + +</polymer-element> +<script src="core-tooltip-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/demo.html b/third_party/polymer/components-chromium/core-tooltip/demo.html new file mode 100644 index 0000000..bdb7b8c --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/demo.html @@ -0,0 +1,171 @@ +<!doctype html> +<html lang="en"> +<head> + + <meta charset="utf-8"> + <title>Core Tooltip</title> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="core-tooltip.html"> + + <style> + body { + font-family: "Open Sans", sans-serif; + font-weight: 300; + padding: 24px; + } + + section { + display: flex; + justify-content: center; + align-items: center; + } + + .example { + margin: 35px 15px; + } + + .example > * { + margin: 0 15px; + } + + .fakebutton { + box-shadow: 0 0 3px #aaa inset; + border-radius: 3px; + padding: 7px 5px; + } + .fakebutton:hover { + background-color: white; + } + + img { + width: 400px; + height: 150px; + object-fit: cover; + } + + img.large { + border: 15px solid white; + box-sizing: border-box; + } + + .profile { + width: 60px; + height: auto; + border-radius: 50%; + vertical-align: middle; + } + + a { + color: currentcolor; + text-decoration: none; + } + + .rich { + background: hotpink; + color: white; + padding:20px; + border-radius: 5px; + } + + core-tooltip.fancy::shadow .polymer-tooltip { + opacity: 0; + -webkit-transition: all 300ms cubic-bezier(0,1.92,.99,1.07); + transition: all 300ms cubic-bezier(0,1.92,.99,1.07); + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0); + } + + core-tooltip.fancy:hover::shadow .polymer-tooltip, + core-tooltip.fancy:focus::shadow .polymer-tooltip { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + </style> + <style shim-shadowdom2> + .on /deep/ .polymer-tooltip { + visibility: visible; + } + </style> + +</head> +<body unresolved> + + <article onclick="this.classList.toggle('on');"> + + <em>click the page to toggle all examples...</em> + + <section class="small"> + + <div class="example"> + + <core-tooltip label='position="left"' position="left"> + <div class="fakebutton">|||</div> + </core-tooltip> + + <core-tooltip label='position="top"' position="top"> + <div class="fakebutton">|||</div> + </core-tooltip> + + <core-tooltip label='position="bottom"' position="bottom"> + <div class="fakebutton">|||</div> + </core-tooltip> + + <core-tooltip label='position="right"' position="right"> + <div class="fakebutton">|||</div> + </core-tooltip> + + </div> + + <div class="example"> + + <core-tooltip label="Fancy effect" class="fancy"> + <img src="https://pbs.twimg.com/profile_images/378800000548263523/c110b0a4c3e3e4d3dcce1d2020f3eded.jpeg + " class="profile"> + </core-tooltip> + + </div> + + </section> + + <section> + + <div class="example"> + + <core-tooltip> + <div class="rich">Rich tooltip with HTML</div> + <div tip> + <img src="https://pbs.twimg.com/profile_images/378800000548263523/c110b0a4c3e3e4d3dcce1d2020f3eded.jpeg + " class="profile" style="width: 40px;margin-right: 8px;">Eric <b>Bidelman</b> - <a href="#">@ebidel</a></div> + </core-tooltip> + + </div> + + <div class="example"> + + <core-tooltip label="<core-tooltip large>" large> + Larger tooltips for mobile + </core-tooltip> + + </div> + + </section> + + <section> + + <div class="example"> + + <core-tooltip label="Tooltip with no arrow and always on: <core-tooltip noarrow show>" position="bottom" noarrow show> + <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/building.jpg" class="large"> + </core-tooltip> + + </div> + + </section> + + </article> + +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/index.html b/third_party/polymer/components-chromium/core-tooltip/index.html new file mode 100644 index 0000000..484a759 --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/index.html @@ -0,0 +1,23 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <meta charset="utf-8"> + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-tooltip/metadata.html b/third_party/polymer/components-chromium/core-tooltip/metadata.html new file mode 100644 index 0000000..157c995 --- /dev/null +++ b/third_party/polymer/components-chromium/core-tooltip/metadata.html @@ -0,0 +1,9 @@ +<x-meta id="core-tooltip" label="Tooltip" group="Core">
+ <template>
+ <core-tooltip></core-tooltip>
+ </template>
+ <template id="imports">
+ <link rel="import" href="core-tooltip.html">
+ </template>
+</x-meta>
+
diff --git a/third_party/polymer/components-chromium/core-transition/.bower.json b/third_party/polymer/components-chromium/core-transition/.bower.json new file mode 100644 index 0000000..dca4be3 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "core-transition", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/core-transition", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "12960cd196487364d35492d6d172c30aeccb70a9" + }, + "_source": "git://github.com/Polymer/core-transition.git", + "_target": "0.3.5", + "_originalSource": "Polymer/core-transition" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/README.md b/third_party/polymer/components-chromium/core-transition/README.md new file mode 100644 index 0000000..c280251 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/README.md @@ -0,0 +1,2 @@ +core-transition +=============== diff --git a/third_party/polymer/components-chromium/core-transition/bower.json b/third_party/polymer/components-chromium/core-transition/bower.json new file mode 100644 index 0000000..b994821 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/bower.json @@ -0,0 +1,8 @@ +{ + "name": "core-transition", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/core-transition-css-extracted.js b/third_party/polymer/components-chromium/core-transition/core-transition-css-extracted.js new file mode 100644 index 0000000..07b468b --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/core-transition-css-extracted.js @@ -0,0 +1,102 @@ + + + Polymer('core-transition-css', { + + /** + * The class that will be applied to all animated nodes. + * + * @attribute baseClass + * @type string + * @default "core-transition" + */ + baseClass: 'core-transition', + + /** + * The class that will be applied to nodes in the opened state. + * + * @attribute openedClass + * @type string + * @default "core-opened" + */ + openedClass: 'core-opened', + + /** + * The class that will be applied to nodes in the closed state. + * + * @attribute closedClass + * @type string + * @default "core-closed" + */ + closedClass: 'core-closed', + + /** + * Event to listen to for animation completion. + * + * @attribute completeEventName + * @type string + * @default "transitionEnd" + */ + completeEventName: 'transitionend', + + publish: { + /** + * A secondary configuration attribute for the animation. The class + * `<baseClass>-<transitionType` is applied to the animated node during + * `setup`. + * + * @attribute transitionType + * @type string + */ + transitionType: null + }, + + registerCallback: function(element) { + this.transitionStyle = element.templateContent().firstElementChild; + }, + + // template is just for loading styles, we don't need a shadowRoot + fetchTemplate: function() { + return null; + }, + + go: function(node, state) { + if (state.opened !== undefined) { + this.transitionOpened(node, state.opened); + } + }, + + setup: function(node) { + if (!node._hasTransitionStyle) { + if (!node.shadowRoot) { + node.createShadowRoot().innerHTML = '<content></content>'; + } + this.installScopeStyle(this.transitionStyle, 'transition', + node.shadowRoot); + node._hasTransitionStyle = true; + } + node.classList.add(this.baseClass); + if (this.transitionType) { + node.classList.add(this.baseClass + '-' + this.transitionType); + } + }, + + teardown: function(node) { + node.classList.remove(this.baseClass); + if (this.transitionType) { + node.classList.remove(this.baseClass + '-' + this.transitionType); + } + }, + + transitionOpened: function(node, opened) { + this.listenOnce(node, this.completeEventName, function() { + node.classList.toggle(this.revealedClass, opened); + if (!opened) { + node.classList.remove(this.closedClass); + } + this.complete(node); + }); + node.classList.toggle(this.openedClass, opened); + node.classList.toggle(this.closedClass, !opened); + } + + }); diff --git a/third_party/polymer/components-chromium/core-transition/core-transition-css.html b/third_party/polymer/components-chromium/core-transition/core-transition-css.html new file mode 100644 index 0000000..5907101 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/core-transition-css.html @@ -0,0 +1,120 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- + +`<core-transition-css>` implements CSS transitions as `<core-transition>` objects so they can be +reused in a pluggable transition system such as in `<core-overlay>`. Currently this class has +some specific support to animate an element from and to the viewport such as a dialog, but you +can override it for different effects. + +Example: + +my-css-transition.html: + + <polymer-element name="my-css-transition" extends="core-transition-css"> + <template> + <style> + :host(.my-transition) { + opacity: 0; + transition: transform 1s ease-out, opacity 1s ease-out; + } + :host(.my-transition.my-opened) { + opacity: 1; + transform: none; + } + :host(.my-transition-top) { + transform: translateY(-100vh); + } + :host(.my-transition-bottom) { + transform: translateY(100vh); + } + </style> + </template> + <script> + Polymer({ + baseClass: 'my-transition', + openedClass: 'my-opened' + }); + </script> + </polymer-element> + + <my-css-transition id="my-transition-top" transitionType="top"></my-css-transition> + <my-css-transition id="my-transition-bottom" transitionType="bottom"></my-css-transition> + +my-css-transition-demo.html + + <link href="components/core-meta/core-meta.html" rel="import"> + <link href="my-css-transition.html"> + + <div id="animate-me"></div> + + <script> + // Get the core-transition + var meta = document.createElement('core-meta'); + meta.type = 'transition'; + var transition1 = meta.byId('my-transition-top'); + + // Set up the animation + var animated = document.getElementById('animate-me'); + transition1.setup(animated); + transition1.go(animated, {opened: true}); + </script> + +The first element in the template of a `<core-transition-css>` object should be a stylesheet. It +will be injected to the scope of the animated node in the `setup` function. The node is initially +invisible with `opacity: 0`, and you can transition it to an "opened" state by passing +`{opened: true}` to the `go` function. + +All nodes being animated will get the class `my-transition` added in the `setup` function. +Additionally, the class `my-transition-<transitionType>` will be applied. You can use the +`transitionType` attribute to implement several different behaviors with the same +`<core-transition-css>` object. In the above example, `<my-css-transition>` implements both +sliding the node from the top of the viewport and from the bottom of the viewport. + +Available transitions +--------------------- + +`<core-transition-css>` includes several commonly used transitions. + +`core-transition-fade`: Animates from `opacity: 0` to `opacity: 1` when it opens. + +`core-transition-center`: Zooms the node into the final size. + +`core-transition-top`: Slides the node into the final position from the top. + +`core-transition-bottom`: Slides the node into the final position from the bottom. + +`core-transition-left`: Slides the node into the final position from the left. + +`core-transition-right`: Slides the node into the final position from the right. + +@group Polymer Core Elements +@element core-transition-css +@extends core-transition +@status beta +@homepage github.io +--> + +<link rel="import" href="core-transition.html"> + +<polymer-element name="core-transition-css" extends="core-transition" attributes="transitionType" assetpath=""> +<template> + <link no-shim="" rel="stylesheet" href="core-transition-overlay.css"> +</template> + +</polymer-element> + +<core-transition-css id="core-transition-fade"></core-transition-css> +<core-transition-css id="core-transition-center" transitiontype="center"></core-transition-css> +<core-transition-css id="core-transition-top" transitiontype="top"></core-transition-css> +<core-transition-css id="core-transition-bottom" transitiontype="bottom"></core-transition-css> +<core-transition-css id="core-transition-left" transitiontype="left"></core-transition-css> +<core-transition-css id="core-transition-right" transitiontype="right"></core-transition-css> +<script src="core-transition-css-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/core-transition-extracted.js b/third_party/polymer/components-chromium/core-transition/core-transition-extracted.js new file mode 100644 index 0000000..e509dd2 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/core-transition-extracted.js @@ -0,0 +1,66 @@ + + Polymer('core-transition', { + + type: 'transition', + + /** + * Run the animation. + * + * @method go + * @param {Node} node The node to apply the animation on + * @param {Object} state State info + */ + go: function(node, state) { + this.complete(node); + }, + + /** + * Set up the animation. This may include injecting a stylesheet, + * applying styles, creating a web animations object, etc.. This + * + * @method setup + * @param {Node} node The animated node + */ + setup: function(node) { + }, + + /** + * Tear down the animation. + * + * @method teardown + * @param {Node} node The animated node + */ + teardown: function(node) { + }, + + /** + * Called when the animation completes. This function also fires the + * `core-transitionend` event. + * + * @method complete + * @param {Node} node The animated node + */ + complete: function(node) { + this.fire('core-transitionend', null, node); + }, + + /** + * Utility function to listen to an event on a node once. + * + * @method listenOnce + * @param {Node} node The animated node + * @param {string} event Name of an event + * @param {Function} fn Event handler + * @param {Array} args Additional arguments to pass to `fn` + */ + listenOnce: function(node, event, fn, args) { + var self = this; + var listener = function() { + fn.apply(self, args); + node.removeEventListener(event, listener, false); + } + node.addEventListener(event, listener, false); + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/core-transition-overlay.css b/third_party/polymer/components-chromium/core-transition/core-transition-overlay.css new file mode 100644 index 0000000..07b2d69 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/core-transition-overlay.css @@ -0,0 +1,46 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +:host(.core-transition) { + outline: none; + overflow: hidden; + opacity: 0; + transition: transform 0.2s ease-in-out, opacity 0.2s ease-in; + -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in; +} + + +:host(.core-transition.core-opened) { + opacity: 1; + transform: none; + -webkit-transform: none; +} + +:host(.core-transition-center) { + transform: scale(0.5); + -webkit-transform: scale(0.5); +} + +:host(.core-transition-top) { + transform: translateY(-200%); + -webkit-transform: translateY(-200%); +} + +:host(.core-transition-bottom) { + transform: translateY(200%); + -webkit-transform: translateY(200%); +} + +:host(.core-transition-left) { + transform: translateX(-200%); + -webkit-transform: translateX(-200%); +} + +:host(.core-transition-right) { + transform: translateX(200%); + -webkit-transform: translateX(200%); +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/core-transition.html b/third_party/polymer/components-chromium/core-transition/core-transition.html new file mode 100644 index 0000000..3cf94b1 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/core-transition.html @@ -0,0 +1,75 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- + +`<core-transition>` is an abstraction of an animation. It is used to implement pluggable +transitions, for example in `<core-overlay>`. You can extend this class to create a custom +animation, instantiate it, and import it where you need the animation. + +All instances of `<core-transition>` are stored in a single database with `type=transition`. +For more about the database, please see the documentation for `<core-meta>`. + +Each instance of `<core-transition>` objects are shared across all the clients, so you should +not store state information specific to the animated element in the transition. Rather, store +it on the element. + +Example: + +my-transition.html: + + <polymer-element name="my-transition" extends="core-transition"> + <script> + go: function(node) { + node.style.transition = 'opacity 1s ease-out'; + node.style.opacity = 0; + } + </script> + </polymer-element> + + <my-transition id="my-fade-out"></my-transition> + +my-transition-demo.html: + + <link href="components/core-meta/core-meta.html" rel="import"> + <link href="my-transition.html" rel="import"> + + <div id="animate-me"></div> + + <script> + // Get the core-transition + var meta = document.createElement('core-meta'); + meta.type = 'transition'; + var transition = meta.byId('my-fade-out'); + + // Run the animation + var animated = document.getElementById('animate-me'); + transition.go(animated); + </script> + +@group Polymer Core Elements +@element core-transition +@extends core-meta +@status beta +@homepage github.io +--> +<!-- +Fired when the animation finishes. + +@event core-transitionend +@param {Object} detail +@param {Object} detail.node The animated node +--> + +<link rel="import" href="../core-meta/core-meta.html"> + +<polymer-element name="core-transition" extends="core-meta" assetpath=""> + + +</polymer-element><script src="core-transition-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/core-transition/demo.html b/third_party/polymer/components-chromium/core-transition/demo.html new file mode 100644 index 0000000..9efd403 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/demo.html @@ -0,0 +1,87 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>core-transition</title> + + <script src="../platform/platform.js"></script> + + <link href="core-transition-css.html" rel="import"> + + <style> + #animate-me { + background-color: lime; + position: fixed; + top: 100px; + width: 100%; + height: 100%; + } + </style> + +</head> +<body unresolved> + + <div id="animate-me" hidden></div> + + <select id="sel" onchange="setup();"> + <option value="core-transition-fade" selected>core-transition-fade</option> + <option value="core-transition-center">core-transition-center</option> + <option value="core-transition-top">core-transition-top</option> + <option value="core-transition-bottom">core-transition-bottom</option> + <option value="core-transition-left">core-transition-left</option> + <option value="core-transition-right">core-transition-right</option> + </select> + + <button onclick="stuff();">toggle</button> + + <script> + + document.addEventListener('polymer-ready', function() { + // initial setup + setup(); + document.getElementById('animate-me').removeAttribute('hidden'); + }); + + var meta; + var transition; + var state = { + opened: false + } + + function getMeta() { + if (!meta) { + meta = document.createElement('core-meta'); + meta.type = 'transition'; + } + return meta; + } + + function setup() { + var target = document.getElementById('animate-me'); + + if (transition) { + transition.teardown(target); + } + + var value = document.getElementById('sel').selectedOptions[0].value; + transition = getMeta().byId(value); + transition.setup(target); + } + + function stuff() { + var target = document.getElementById('animate-me'); + state.opened = !state.opened; + transition.go(target, state); + } + </script> +</body> +</html> diff --git a/third_party/polymer/components-chromium/core-transition/index.html b/third_party/polymer/components-chromium/core-transition/index.html new file mode 100644 index 0000000..8a75554 --- /dev/null +++ b/third_party/polymer/components-chromium/core-transition/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["core-transition.html","../core-meta/core-meta.html","core-transition-css.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/font-roboto/.bower.json b/third_party/polymer/components-chromium/font-roboto/.bower.json new file mode 100644 index 0000000..d6919f3 --- /dev/null +++ b/third_party/polymer/components-chromium/font-roboto/.bower.json @@ -0,0 +1,14 @@ +{ + "name": "font-roboto", + "homepage": "https://github.com/Polymer/font-roboto", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "3515cb3b0d19e5df52ae8c4ad9606ab9a67b8fa6" + }, + "_source": "git://github.com/Polymer/font-roboto.git", + "_target": "0.3.5", + "_originalSource": "Polymer/font-roboto" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/font-roboto/roboto.html b/third_party/polymer/components-chromium/font-roboto/roboto.html new file mode 100644 index 0000000..c379ebf --- /dev/null +++ b/third_party/polymer/components-chromium/font-roboto/roboto.html @@ -0,0 +1,9 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<link href='//fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en' rel='stylesheet' type='text/css'> diff --git a/third_party/polymer/components-chromium/paper-button/.bower.json b/third_party/polymer/components-chromium/paper-button/.bower.json new file mode 100644 index 0000000..bf90392 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/.bower.json @@ -0,0 +1,22 @@ +{ + "name": "paper-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "1ca7459275aa5ae511153a1d06931239577f1677" + }, + "_source": "git://github.com/Polymer/paper-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-button/README.md b/third_party/polymer/components-chromium/paper-button/README.md new file mode 100644 index 0000000..75919a5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/README.md @@ -0,0 +1,4 @@ +paper-button +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-button) for more information. diff --git a/third_party/polymer/components-chromium/paper-button/bower.json b/third_party/polymer/components-chromium/paper-button/bower.json new file mode 100644 index 0000000..951e47d --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/bower.json @@ -0,0 +1,11 @@ +{ + "name": "paper-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-button/demo.html b/third_party/polymer/components-chromium/paper-button/demo.html new file mode 100644 index 0000000..fb71815 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/demo.html @@ -0,0 +1,99 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>paper-button</title> + + <script src="../platform/platform.js"></script> + + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="paper-button.html" rel="import"> + + <style shim-shadowdom> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + transform: translateZ(0); + -webkit-transform: translateZ(0); + } + + section { + padding: 20px 0; + } + + section > div { + padding: 14px;:width; + } + + paper-button { + margin: 1em; + width: 10em; + } + + paper-button.colored { + color: #4285f4; + fill: #4285f4; + } + + paper-button[raisedButton].colored { + background: #4285f4; + color: #fff; + } + + paper-button[raisedButton].colored #ripple, + paper-button[raisedButton].colored::shadow #ripple { + color: #2a56c6; + } + + paper-button[raisedButton].colored #focusBg, + paper-button[raisedButton].colored::shadow #focusBg { + background: #3367d6; + } + + </style> +</head> +<body unresolved> + + <section> + + <div>Flat buttons</div> + + <paper-button label="button"></paper-button> + <paper-button class="colored" label="colored"></paper-button> + <!-- <paper-button focused label="focused"></paper-button> --> + <paper-button disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> + + </section> + + <br> + + <section> + + <div>Raised buttons</div> + + <paper-button raisedButton label="button"></paper-button> + <paper-button raisedButton class="colored" label="colored"></paper-button> + <!-- <paper-button raisedButton focused label="focused"></paper-button> --> + <paper-button raisedButton disabled label="disabled" onclick="alert('should not be clickable');"></paper-button> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-button/demo2.html b/third_party/polymer/components-chromium/paper-button/demo2.html new file mode 100644 index 0000000..29cbb32 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/demo2.html @@ -0,0 +1,136 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>paper-button</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <script src="../platform/platform.js"></script> + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="paper-button.html" rel="import"> + <style shim-shadowdom> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + font-size: 14px; + text-align: center; + padding: 1em 2em; + transform: translateZ(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); + } + h1 { + margin-bottom: 2em; + } + + section { + display: inline-block; + background: #f7f7f7; + border-radius: 3px; + width: 25%; + text-align: center; + margin: 1%; + padding: 1em; + } + + paper-button { + margin: 1em; + width: 10em; + } + + paper-button.colored { + color: #4285f4; + fill: #4285f4; + } + + paper-button[raisedButton].colored { + background: #4285f4; + color: #fff; + } + paper-button[raisedButton].colored.hover:hover { + background: #3367d6; + } + paper-button[raisedButton].colored::shadow #ripple { + color: #2a56c6; + } + paper-button[raisedButton].colored::shadow #focusBg { + background: #3367d6; + } + + .label { + text-align: left; + color: #bbb; + font-size: 12px; + margin-top: 2em; + } + </style> +</head> +<body unresolved> + + <h1><paper-button></h1> + + <section> + <paper-button label="button"></paper-button> + <br> + <paper-button class="colored" label="colored"></paper-button> + <br> + <paper-button disabled label="disabled"></paper-button> + <br> + <div class="label">flat</div> + </section> + + <section> + <paper-button raisedButton label="button"></paper-button> + <br> + <paper-button raisedButton class="colored" label="colored"></paper-button> + <br> + <paper-button raisedButton disabled label="disabled"></paper-button> + <br> + <div class="label">raised</div> + </section> + + <br> + <br> + + <section> + <paper-button class="hover" label="button"></paper-button> + <br> + <paper-button class="colored hover" label="colored"></paper-button> + <br> + <div class="label">flat + hover state</div> + </section> + + <section> + <paper-button raisedButton class="hover" label="button"></paper-button> + <br> + <paper-button raisedButton class="colored hover" label="colored"></paper-button> + <br> + <div class="label">raised + hover state</div> + </section> + + <br> + <br> + + <section> + <paper-button focused label="button"></paper-button> + <br> + <paper-button focused class="colored" label="colored"></paper-button> + <br> + <div class="label">flat + focused</div> + </section> + + <section> + <paper-button raisedButton focused label="button"></paper-button> + <br> + <paper-button raisedButton focused class="colored" label="colored"></paper-button> + <br> + <div class="label">raised + focused</div> + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-button/index.html b/third_party/polymer/components-chromium/paper-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-button/metadata.html b/third_party/polymer/components-chromium/paper-button/metadata.html new file mode 100644 index 0000000..a532812 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-button" label="Button" group="Paper" isContainer> + <template> + <paper-button label="Paper Button"></paper-button> + </template> + <template id="imports"> + <link rel="import" href="paper-button.html"> + </template> +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-button/paper-button-extracted.js b/third_party/polymer/components-chromium/paper-button/paper-button-extracted.js new file mode 100644 index 0000000..23490b5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/paper-button-extracted.js @@ -0,0 +1,127 @@ + + Polymer('paper-button', { + + publish: { + + /** + * The label of the button. + * + * @attribute label + * @type string + * @default '' + */ + label: '', + + /** + * If true, the button will be styled as a "raised" button. + * + * @attribute raisedButton + * @type boolean + * @default false + */ + raisedButton: {value: false, reflect: true}, + + /** + * (optional) The URL of an image for an icon to use in the button. + * Should not use `icon` property if you are using this property. + * + * @attribute iconSrc + * @type string + * @default '' + */ + iconSrc: '', + + /** + * (optional) Specifies the icon name or index in the set of icons + * available in the icon set. If using this property, load the icon + * set separately where the icon is used. Should not use `src` + * if you are using this property. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '' + + }, + + z: 1, + + attached: function() { + if (this.textContent && !this.textContent.match(/\s+/)) { + console.warn('Using textContent to label the button is deprecated. Use the "label" property instead'); + this.label = this.textContent; + } + }, + + activeChanged: function() { + this.super(); + + if (this.active) { + // FIXME: remove when paper-ripple can have a default 'down' state. + if (!this.lastEvent) { + var rect = this.getBoundingClientRect(); + this.lastEvent = { + x: rect.left + rect.width / 2, + y: rect.top + rect.height / 2 + } + } + this.$.ripple.downAction(this.lastEvent); + } else { + this.$.ripple.upAction(); + } + this.adjustZ(); + }, + + focusedChanged: function() { + this.super(); + this.adjustZ(); + }, + + disabledChanged: function() { + this.super(); + this.adjustZ(); + }, + + // waitForSpillCompleted: function(callback) { + // this.async(callback, null, (this.$.ink.spillCompleted ? 0 : this.duration)); + // }, + + // resetInk: function() { + // this.active = false; + // this.$.ink.reset(); + // }, + + insideButton: function(x, y) { + var rect = this.getBoundingClientRect(); + return (rect.left <= x) && (x <= rect.right) && (rect.top <= y) && (y <= rect.bottom); + }, + + adjustZ: function() { + if (this.focused) { + this.classList.add('paper-shadow-animate-z-1-z-2'); + } else { + this.classList.remove('paper-shadow-animate-z-1-z-2'); + + if (this.active) { + this.z = 2; + } else if (this.disabled) { + this.z = 0; + } else { + this.z = 1; + } + + } + }, + + downAction: function(e) { + this.super(e); + this.lastEvent = e; + }, + + labelChanged: function() { + this.setAttribute('aria-label', this.label); + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-button/paper-button.css b/third_party/polymer/components-chromium/paper-button/paper-button.css new file mode 100644 index 0000000..e8954ac --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/paper-button.css @@ -0,0 +1,115 @@ +:host { + display: inline-block; + position: relative; + border: 0; + background: transparent; + text-align: center; + font: inherit; + text-transform: uppercase; + outline: none; + border-radius: 3px; + -webkit-user-select: none; + user-select: none; + cursor: pointer; +} + +:host(.hover:hover) { + background: #e4e4e4; +} + +:host([raisedButton]) { + background: #dfdfdf; +} + +:host([raisedButton].hover:hover) { + background: #d6d6d6; +} + +:host([disabled]) { + background: #eaeaea !important; + color: #a8a8a8 !important; + cursor: auto; +} + +#shadow-container { + border-radius: inherit; +} + +#clip { + position: relative; + border-radius: inherit; + overflow: hidden; +} + +/* +#focusBg { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + opacity: 0; + border-radius: inherit; + background: #c3c3c3; + -webkit-transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); +} + +:host([focused]) #focusBg { + -webkit-transition: none; + transition: none; + -webkit-animation: focus-fade 0.7s infinite alternate; + animation: focus-fade 0.7s infinite alternate; +} + +@-webkit-keyframes focus-fade { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes focus-fade { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} +*/ + +#ripple { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + color: #d1d1d1; + pointer-events: none; +} + +:host([raisedButton]) #ripple { + color: #cecece; +} + +#ripple::shadow canvas { + top: 0; + left: 0; +} + +#content { + /* needed to position the ink behind the content */ + position: relative; +} + +#icon { + margin: 8px; +} + +#content > span { + display: inline-block; + margin: 0.5em; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-button/paper-button.html b/third_party/polymer/components-chromium/paper-button/paper-button.html new file mode 100644 index 0000000..b02f7bb --- /dev/null +++ b/third_party/polymer/components-chromium/paper-button/paper-button.html @@ -0,0 +1,85 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Paper Elements + +`paper-button` is a button containing text or an image. When the user touches +the button, a ripple effect emanates from the point of contact. + +A `paper-button` may be flat or raised. A raised button behaves like a piece +of paper resting on another sheet, and lifts up upon press. Flat buttons do +not raise up. Add the `raisedButton` attribute to make a raised button. + +Example: + + <paper-button label="flat button"></paper-button> + <paper-button label="raised button" raisedButton></paper-button> + +A button should be styled with a background color, text color, ripple color +and hover color. + +To style the background, text and hover color, apply the `background` and +`color` CSS properties to the button. To style the ripple color, apply the +`color` CSS property to the `#ripple` element in the button's shadow root: + + /* Style #my-button blue with white text and darker blue ink. */ + #my-button { + background: #4285f4; + color: #fff; + } + + #my-button:hover { + background: #2a56c6; + } + + #my-button::shadow #ripple { + color: #2a56c6; + } + +@element paper-button +@extends paper-focusable +--> + +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-icon/core-icon.html" rel="import"> +<link href="../paper-focusable/paper-focusable.html" rel="import"> +<link href="../paper-ripple/paper-ripple.html" rel="import"> +<link href="../paper-shadow/paper-shadow.html" rel="import"> + +<polymer-element name="paper-button" extends="paper-focusable" attributes="label raisedButton iconSrc icon" role="button" assetpath=""> + + <template> + + <link href="paper-button.css" rel="stylesheet"> + + <template if="{{raisedButton}}"> + <div fit="" id="shadow-container"> + <paper-shadow id="shadow" z="{{z}}" animated=""></paper-shadow> + </div> + </template> + + <div id="clip"> + <!-- <div id="focusBg"></div> --> + <paper-ripple id="ripple"></paper-ripple> + <div id="content"> + <template if="{{iconSrc || icon}}"> + <core-icon id="icon" src="{{iconSrc}}" icon="{{icon}}"></core-icon> + </template> + <template if="{{label}}"> + <span>{{label}}</span> + </template> + </div> + </div> + + </template> + + +</polymer-element> +<script src="paper-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-checkbox/.bower.json b/third_party/polymer/components-chromium/paper-checkbox/.bower.json new file mode 100644 index 0000000..964e097 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "paper-checkbox", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-checkbox", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "3e99039c345409bceb291b8e1b2056f3a8885b6b" + }, + "_source": "git://github.com/Polymer/paper-checkbox.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-checkbox" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-checkbox/README.md b/third_party/polymer/components-chromium/paper-checkbox/README.md new file mode 100644 index 0000000..374e62d --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/README.md @@ -0,0 +1,4 @@ +paper-checkbox +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-checkbox) for more information. diff --git a/third_party/polymer/components-chromium/paper-checkbox/bower.json b/third_party/polymer/components-chromium/paper-checkbox/bower.json new file mode 100644 index 0000000..281773b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/bower.json @@ -0,0 +1,8 @@ +{ + "name": "paper-checkbox", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-checkbox/demo.html b/third_party/polymer/components-chromium/paper-checkbox/demo.html new file mode 100644 index 0000000..0b8b115 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/demo.html @@ -0,0 +1,104 @@ +<!doctype html> +<html> +<head> + <title>paper-checkbox</title> + + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-checkbox.html"> + <link rel="import" href="../font-roboto/roboto.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + paper-checkbox { + padding: 20px 20px 20px 0; + } + + section { + width: 300px; + } + + paper-checkbox.blue::shadow #ink[checked] { + color: #4285f4; + } + + paper-checkbox.blue::shadow #checkbox.checked { + border-color: #4285f4; + } + + </style> + +</head> +<body unresolved> + + <div horizontal layout> + <paper-checkbox></paper-checkbox> + <div vertical layout> + <h4>Notifications</h4> + <div>Notify me about updates to apps or games that I've downloaded</div> + </div> + </div> + + <br> + + <div horizontal layout> + <paper-checkbox checked></paper-checkbox> + <div vertical layout> + <h4>Auto-updates</h4> + <div>Auto-update apps over wifi only</div> + </div> + </div> + + <br> + + <div horizontal layout> + <paper-checkbox></paper-checkbox> + <div vertical layout> + <h4>Clear search history</h4> + <div>Remove all the searches you have ever performed</div> + </div> + </div> + + <br> + <br> + <br> + + <section> + + <h3>Sound</h3> + + <div center horizontal layout> + <div flex>Touch sounds</div> + <paper-checkbox class="blue" checked></paper-checkbox> + </div> + + <div center horizontal layout> + <div flex>Screen lock sound</div> + <paper-checkbox class="blue"></paper-checkbox> + </div> + + <div center horizontal layout> + <div flex>Vibrate on touch</div> + <paper-checkbox class="blue"></paper-checkbox> + </div> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-checkbox/index.html b/third_party/polymer/components-chromium/paper-checkbox/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-checkbox/metadata.html b/third_party/polymer/components-chromium/paper-checkbox/metadata.html new file mode 100644 index 0000000..8aa1cef --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-checkbox" label="Checkbox" group="Paper"> + <template> + <paper-checkbox label="click me"></paper-checkbox> + </template> + <template id="imports"> + <link rel="import" href="paper-checkbox.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox-extracted.js b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox-extracted.js new file mode 100644 index 0000000..9959e20 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox-extracted.js @@ -0,0 +1,30 @@ +
+
+ Polymer('paper-checkbox', {
+
+ /**
+ * Fired when the checked state changes.
+ *
+ * @event change
+ */
+
+ toggles: true,
+
+ checkedChanged: function() {
+ var cl = this.$.checkbox.classList;
+ cl.toggle('checked', this.checked);
+ cl.toggle('unchecked', !this.checked);
+ cl.toggle('checkmark', !this.checked);
+ cl.toggle('box', this.checked);
+ this.setAttribute('aria-checked', this.checked ? 'true': 'false');
+ this.fire('change');
+ },
+
+ checkboxAnimationEnd: function() {
+ var cl = this.$.checkbox.classList;
+ cl.toggle('checkmark', this.checked && !cl.contains('checkmark'));
+ cl.toggle('box', !this.checked && !cl.contains('box'));
+ }
+
+ });
+
diff --git a/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.css b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.css new file mode 100644 index 0000000..4d636fd --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.css @@ -0,0 +1,262 @@ +/*
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block;
+ white-space: nowrap; +} + +:host(:focus) { + outline: none; +} + +#checkboxContainer { + position: relative; + width: 18px; + height: 18px;
+ cursor: pointer;
+ -webkit-transform: translateZ(0);
+ transform: translateZ(0); +} + +#checkboxContainer.labeled { + display: inline-block; + vertical-align: middle; +} + +#ink { + position: absolute; + top: -15px; + left: -15px; + width: 48px; + height: 48px;
+ color: #5a5f5a; +}
+
+#ink[checked] {
+ color: #0f9d58;
+} + +#checkbox { + position: absolute; + box-sizing: border-box; + top: 0px; + left: 0px; + width: 18px; + height: 18px; + border: solid 2px;
+ border-color: #5a5a5a;
+ pointer-events: none;
+}
+
+/* checkbox checked animations */ +#checkbox.checked.box {
+ border: solid 2px; + -webkit-animation: box-shrink 140ms ease-out forwards; + animation: box-shrink 140ms ease-out forwards; +} + +@-webkit-keyframes box-shrink { + 0% { + -webkit-transform: rotate(0deg); + top: 0px; + left: 0px; + width: 18px; + height: 18px; + } + 100% { + -webkit-transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } +} + +@keyframes box-shrink { + 0% { + transform: rotate(0deg); + top: 0px; + left: 0px; + width: 18px; + height: 18px; + } + 100% { + transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } +} + +#checkbox.checked.checkmark { + border-left: none; + border-top: none;
+ -webkit-animation: checkmark-expand 140ms ease-out forwards; + animation: checkmark-expand 140ms ease-out forwards; +} + +@-webkit-keyframes checkmark-expand { + 0% { + -webkit-transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } + 100% { + -webkit-transform: rotate(45deg); + top: -4px; + left: 6px; + width: 10px; + height: 21px; + border-right-width: 2px; + border-bottom-width: 2px; + } +} + +@keyframes checkmark-expand { + 0% { + transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } + 100% { + transform: rotate(45deg); + top: -4px; + left: 6px; + width: 10px; + height: 21px; + border-right-width: 2px;
+ border-bottom-width: 2px; + } +} + +#checkbox.checked { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + top: -4px; + left: 6px; + width: 10px; + height: 21px; + border-top: none; + border-left: none;
+ border-right-width: 2px; + border-bottom-width: 2px;
+ border-color: #0f9d58; +} + +/* checkbox unchecked animations */ +#checkbox.unchecked.checkmark { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); + border-left: none; + border-top: none; + -webkit-animation: checkmark-shrink 140ms ease-out forwards; + animation: checkmark-shrink 140ms ease-out forwards; +} + +@-webkit-keyframes checkmark-shrink { + 0% { + top: -4px; + left: 6px; + width: 10px; + height: 21px; + border-right-width: 2px;
+ border-bottom-width: 2px; + } + 100% { + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } +} + +@keyframes checkmark-shrink { + 0% { + top: -4px; + left: 6px; + width: 10px; + height: 21px; + border-right-width: 2px;
+ border-bottom-width: 2px; + } + 100% { + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } +} + +#checkbox.unchecked.box { + -webkit-animation: box-expand 140ms ease-out forwards; + animation: box-expand 140ms ease-out forwards; +} + +@-webkit-keyframes box-expand { + 0% { + -webkit-transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } + 100% { + -webkit-transform: rotate(0deg); + top: 0px; + left: 0px; + width: 18px; + height: 18px; + } +} + +@keyframes box-expand { + 0% { + transform: rotate(45deg); + top: 13px; + left: 5px; + width: 4px; + height: 4px; + } + 100% { + transform: rotate(0deg); + top: 0px; + left: 0px; + width: 18px; + height: 18px; + } +} + +/* label */ +#checkboxLabel { + position: relative; + display: inline-block;
+ vertical-align: middle; + padding-left: 8px;
+ white-space: normal;
+ pointer-events: none; +} + +#checkboxLabel[hidden] { + display: none; +}
+
+/* disabled state */
+:host([disabled]) {
+ pointer-events: none;
+}
+
+:host([disabled]) #checkbox {
+ border-color: #eaeaea !important;
+}
diff --git a/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.html b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.html new file mode 100644 index 0000000..89d2576 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-checkbox/paper-checkbox.html @@ -0,0 +1,75 @@ +<!--
+Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+-->
+
+<!--
+`paper-checkbox` is a button that can be either checked or unchecked. User
+can tap the checkbox to check or uncheck it. Usually you use checkboxes
+to allow user to select multiple options from a set. If you have a single
+ON/OFF option, avoid using a single checkbox and use `paper-toggle-button`
+instead.
+
+Example:
+
+ <paper-checkbox></paper-checkbox>
+
+ <paper-checkbox checked></paper-checkbox>
+
+Styling checkbox:
+
+To change the ink color for checked state:
+
+ paper-checkbox::shadow #ink[checked] {
+ color: #4285f4;
+ }
+
+To change the checkbox checked color:
+
+ paper-checkbox::shadow #checkbox.checked {
+ border-color: #4285f4;
+ }
+
+To change the ink color for unchecked state:
+
+ paper-checkbox::shadow #ink {
+ color: #b5b5b5;
+ }
+
+To change the checbox unchecked color:
+
+ paper-checkbox::shadow #checkbox {
+ border-color: #b5b5b5;
+ }
+
+@group Paper Elements
+@element paper-checkbox
+@extends paper-radio-button
+@homepage github.io
+-->
+
+<link rel="import" href="../paper-radio-button/paper-radio-button.html">
+
+<polymer-element name="paper-checkbox" extends="paper-radio-button" role="checkbox" assetpath="">
+<template>
+
+ <link rel="stylesheet" href="paper-checkbox.css">
+
+ <div id="checkboxContainer" class="{{ {labeled: label} | tokenList }}">
+
+ <paper-ripple id="ink" class="circle recenteringTouch" checked?="{{!checked}}"></paper-ripple>
+
+ <div id="checkbox" on-animationend="{{checkboxAnimationEnd}}" on-webkitanimationend="{{checkboxAnimationEnd}}"></div>
+
+ </div>
+
+ <div id="checkboxLabel" hidden?="{{!label}}">{{label}}<content></content></div>
+
+</template>
+
+</polymer-element>
+<script src="paper-checkbox-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-dialog/.bower.json b/third_party/polymer/components-chromium/paper-dialog/.bower.json new file mode 100644 index 0000000..ae83584 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "paper-dialog", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-dialog", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "8d83f11fc97fbd97959c289022ae2f897f51b109" + }, + "_source": "git://github.com/Polymer/paper-dialog.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-dialog" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-dialog/.gitignore b/third_party/polymer/components-chromium/paper-dialog/.gitignore new file mode 100644 index 0000000..9f7d5aa --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/.gitignore @@ -0,0 +1 @@ +vulcanized.html diff --git a/third_party/polymer/components-chromium/paper-dialog/README.md b/third_party/polymer/components-chromium/paper-dialog/README.md new file mode 100644 index 0000000..70c3e03 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/README.md @@ -0,0 +1,4 @@ +paper-dialog +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-dialog) for more information. diff --git a/third_party/polymer/components-chromium/paper-dialog/bower.json b/third_party/polymer/components-chromium/paper-dialog/bower.json new file mode 100644 index 0000000..1cca8bc --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/bower.json @@ -0,0 +1,10 @@ +{ + "name": "paper-dialog", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-dialog/demo.html b/third_party/polymer/components-chromium/paper-dialog/demo.html new file mode 100644 index 0000000..cba90ac --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/demo.html @@ -0,0 +1,75 @@ +<!doctype html> +<html> +<head> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <title>paper-dialog</title> + <script src="../platform/platform.js"></script> + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../paper-button/paper-button.html" rel="import"> + <link rel="import" href="paper-dialog-transition.html"> + <link href="paper-dialog.html" rel="import"> + <style> + body { + -webkit-transform: translateZ(0); + transform: translateZ(0); + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + font-size: 16px; + color: rgba(0, 0, 0, 0.87); + } + + paper-dialog { + width: 50%; + min-width: 430px; + } + + p { + margin-bottom: 0; + } + + paper-dialog paper-button { + font-weight: bold; + } + + paper-button[autofocus] { + color: #4285f4; + } + </style> +</head> +<body unresolved> + <paper-dialog heading="Dialog" transition="paper-dialog-transition-center"> + <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> + + <p>Id qui scripta laboramus dissentiet, verterem partiendo vim at. Stet dissentiet ut mei. Iriure facilis eloquentiam pro eu, nec an esse inciderint. In meliore abhorreant sea. Eros nostro ocurreret at nec. Cu per regione persecuti.</p> + + <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> + + <paper-button label="More Info..." dismissive></paper-button> + <paper-button label="Decline" affirmative></paper-button> + <paper-button label="Accept" affirmative autofocus></paper-button> + + </paper-dialog> + + <paper-dialog heading="Dialog" transition="paper-dialog-transition-bottom"> + <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> + + <p>Id qui scripta laboramus dissentiet, verterem partiendo vim at. Stet dissentiet ut mei. Iriure facilis eloquentiam pro eu, nec an esse inciderint. In meliore abhorreant sea. Eros nostro ocurreret at nec. Cu per regione persecuti.</p> + + <p>Lorem ipsum dolor sit amet, doming noster at quo, nostrud lucilius rationibus ea duo. Vim no mucius dolores. No bonorum voluptatum vis, has iudicabit consectetuer ne. Nullam sensibus vim id, et quo graeci perpetua.</p> + + <paper-button label="More Info..." dismissive></paper-button> + <paper-button label="Decline" affirmative></paper-button> + <paper-button label="Accept" affirmative autofocus></paper-button> + + </paper-dialog> + + <paper-button label="Transition A" onclick="toggleDialog('paper-dialog-transition-bottom')"></paper-button> + <paper-button label="Transition B" onclick="toggleDialog('paper-dialog-transition-center')"></paper-button> + <script> + function toggleDialog(transition) { + var dialog = document.querySelector('paper-dialog[transition=' + transition + ']'); + dialog.toggle(); + } + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-dialog/index.html b/third_party/polymer/components-chromium/paper-dialog/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js new file mode 100644 index 0000000..e78c0d4 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js @@ -0,0 +1,87 @@ + + + Polymer('paper-dialog', { + + /** + * Set opened to true to show the dialog and to false to hide it. + * A dialog may be made intially opened by setting its opened attribute. + + * @attribute opened + * @type boolean + * @default false + */ + opened: false, + + /** + * If true, the dialog has a backdrop darkening the rest of the screen. + * The backdrop element is attached to the document body and may be styled + * with the class `core-overlay-backdrop`. When opened the `core-opened` + * class is applied. + * + * @attribute backdrop + * @type boolean + * @default false + */ + backdrop: false, + + /** + * If true, the dialog is guaranteed to display above page content. + * + * @attribute layered + * @type boolean + * @default false + */ + layered: false, + + /** + * By default a dialog will close automatically if the user + * taps outside it or presses the escape key. Disable this + * behavior by setting the `autoCloseDisabled` property to true. + * @attribute autoCloseDisabled + * @type boolean + * @default false + */ + autoCloseDisabled: false, + + /** + * This property specifies a selector matching elements that should + * close the dialog on tap. + * + * @attribute closeSelector + * @type string + * @default "" + */ + closeSelector: '[dismissive],[affirmative]', + + /** + * @attribute heading + * @type string + * @default '' + */ + heading: '', + + /** + * Set this property to the id of a <core-transition> element to specify + * the transition to use when opening/closing this dialog. + * + * @attribute transition + * @type string + * @default '' + */ + transition: '', + + /** + * Toggle the dialog's opened state. + * @method toggle + */ + toggle: function() { + this.$.overlay.toggle(); + }, + + headingChanged: function() { + this.setAttribute('aria-label', this.heading); + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition-extracted.js b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition-extracted.js new file mode 100644 index 0000000..0e0421f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition-extracted.js @@ -0,0 +1,4 @@ + + Polymer('paper-dialog-transition',{ + baseClass: 'paper-dialog-transition' + }); diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.css b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.css new file mode 100644 index 0000000..6a55d2b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.css @@ -0,0 +1,59 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +:host(.paper-dialog-transition) { + outline: none; + opacity: 0; + transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); + -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1); +} + +:host(.paper-dialog-transition.core-opened) { + opacity: 1; + transform: none; + -webkit-transform: none; +} + +:host(.paper-dialog-transition-bottom) { + transform: scale(0.9) translateY(200%); + -webkit-transform: scale(0.9) translateY(200%); +} + +:host(.paper-dialog-transition-center.core-opened) { + animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1); + -webkit-animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1); +} + +@keyframes paper-dialog-transition-center-keyframes { + 0% { + transform: scale(0.5) translateY(0); + -webkit-transform: scale(0.5) translateY(0); + } + 90% { + transform: scale(1) translateY(-10px); + -webkit-transform: scale(1) translateY(-10px); + } + 100% { + transform: scale(1) translateY(0); + -webkit-transform: scale(1) translateY(0); + } +} + +@-webkit-keyframes paper-dialog-transition-center-keyframes { + 0% { + transform: scale(0.5) translateY(0); + -webkit-transform: scale(0.5) translateY(0); + } + 90% { + transform: scale(1) translateY(-10px); + -webkit-transform: scale(1) translateY(-10px); + } + 100% { + transform: scale(1) translateY(0); + -webkit-transform: scale(1) translateY(0); + } +} diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.html b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.html new file mode 100644 index 0000000..479899f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-transition.html @@ -0,0 +1,23 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link href="../core-transition/core-transition-css.html" rel="import"> + +<polymer-element name="paper-dialog-transition" extends="core-transition-css" assetpath=""> + +<template> + <link no-shim="" href="paper-dialog-transition.css" rel="stylesheet"> +</template> + + + +</polymer-element> + +<paper-dialog-transition id="paper-dialog-transition-bottom" transitiontype="bottom"></paper-dialog-transition> +<paper-dialog-transition id="paper-dialog-transition-center" transitiontype="center"></paper-dialog-transition><script src="paper-dialog-transition-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog.css b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.css new file mode 100644 index 0000000..73096be --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.css @@ -0,0 +1,43 @@ +:host { + background: white; + color: rgba(0, 0, 0, 0.87); +} + +#shadow { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: -1; +} + +#container { + overflow: hidden; +} + +#main { + height: auto; + -webkit-order: 1; + -ms-flex-order: 1; + order: 1; + padding: 24px; + overflow: auto; +} + +h1 { + margin: 0; +} + +#actions { + -webkit-order: 2; + -ms-flex-order: 2; + order: 2; + padding: 4px 16px 20px; +} + +polymer-next-selector { content: ':host > *'; } +::content > * { + font: inherit; + border: 0; +} diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html new file mode 100644 index 0000000..a79c8da --- /dev/null +++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html @@ -0,0 +1,91 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +Provides a dialog overlay. + +Child elements that include a `dismissive` attribute are positioned in the lower left corner of the dialog. Elements that use the `affirmative` attribute are positioned in the lower right corner. + +Child elements that include the `dismissive` or `affirmative` attribute will automatically toggle the dialog when clicked. + +One child element should have the `autofocus` attribute so that the Enter key will automatically take action. This is +especially important for screen reader environments. + +Example: + + <paper-dialog heading="Title for dialog"> + <p>Lorem ipsum ....</p> + <p>Id qui scripta ...</p> + <paper-button label="More Info..." dismissive></paper-button> + <paper-button label="Decline" affirmative></paper-button> + <paper-button label="Accept" affirmative autofocus></paper-button> + </paper-dialog> + +#### Transitions + +`<paper-dialog>` can be used with `<paper-transition>` to transition the overlay open and close. + +To use a transition, import `paper-dialog-transition.html` alongside paper-dialog: + + <link rel="import" href="paper-dialog/paper-dialog-transition.html"> + +Then set the `transition` attribute: + + <paper-dialog heading="Title for dialog" transition="paper-transition-center"> + + <paper-dialog heading="Title for dialog" transition="paper-transition-bottom"> + +@group Paper Elements +@element paper-dialog +@homepage github.io +--> +<!-- +Fired when the dialog's `opened` property changes. + +@event core-overlay-open +@param {Object} detail +@param {Object} detail.opened the opened state +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-overlay/core-overlay.html" rel="import"> +<link href="../paper-shadow/paper-shadow.html" rel="import"> + +<polymer-element name="paper-dialog" attributes="opened heading transition autoCloseDisabled backdrop layered closeSelector" role="dialog" assetpath=""> + + <template> + + <link href="paper-dialog.css" rel="stylesheet"> + + <div id="shadow"> + <paper-shadow z="3" hasposition=""></paper-shadow> + </div> + + <core-overlay id="overlay" opened="{{opened}}" autoclosedisabled?="{{autoCloseDisabled}}" backdrop?="{{backdrop}}" layered?="{{layered}}" target="{{}}" sizingtarget="{{$.container}}" closeselector="{{closeSelector}}" transition="{{transition}}" margin="20"></core-overlay> + + <div id="container" layout="" vertical=""> + + <div id="actions" layout="" horizontal=""> + <content select="[dismissive]"></content> + <div flex="" auto=""></div> + <content select="[affirmative]"></content> + </div> + + <div id="main" flex="" auto=""> + <h1>{{heading}}</h1> + <content></content> + </div> + + </div> + + </template> + + + +</polymer-element> +<script src="paper-dialog-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-fab/.bower.json b/third_party/polymer/components-chromium/paper-fab/.bower.json new file mode 100644 index 0000000..e3667a9 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "paper-fab", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-fab", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "4fbc9fedd3462bc01b64967e51ddc49882728da7" + }, + "_source": "git://github.com/Polymer/paper-fab.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-fab" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-fab/README.md b/third_party/polymer/components-chromium/paper-fab/README.md new file mode 100644 index 0000000..a210f0f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/README.md @@ -0,0 +1,4 @@ +paper-fab +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-fab) for more information. diff --git a/third_party/polymer/components-chromium/paper-fab/bower.json b/third_party/polymer/components-chromium/paper-fab/bower.json new file mode 100644 index 0000000..4601add --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/bower.json @@ -0,0 +1,8 @@ +{ + "name": "paper-fab", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-fab/demo.html b/third_party/polymer/components-chromium/paper-fab/demo.html new file mode 100644 index 0000000..6e2ac6c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/demo.html @@ -0,0 +1,72 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>paper-fab</title> + + <script src="../platform/platform.js"></script> + + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="paper-fab.html" rel="import"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + transform: translateZ(0); + -webkit-transform: translateZ(0); + } + + paper-fab { + color: #FFF; + margin-right:2em; + } + + paper-fab.blue { + background: #5677fc; + } + + paper-fab.green { + background: #259b24; + } + + paper-fab.yellow { + background: #ffeb3b; + color: #000; + } + + </style> + +</head> +<body unresolved> + + <h3>Regular</h3> + + <paper-fab icon="arrow-forward"></paper-fab> + <paper-fab icon="create" class="blue"></paper-fab> + + <h3>Mini</h3> + + <paper-fab icon="done" class="mini green"></paper-fab> + <paper-fab icon="reply" class="mini yellow"></paper-fab> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-fab/demo2.html b/third_party/polymer/components-chromium/paper-fab/demo2.html new file mode 100644 index 0000000..d1b69c7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/demo2.html @@ -0,0 +1,103 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>paper-fab</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <script src="../platform/platform.js"></script> + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="../core-icons/image-icons.html" rel="import"> + <link href="../core-layout/core-layout.html" rel="import"> + <link href="paper-fab.html" rel="import"> + <style shim-shadowdom> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + font-size: 14px; + padding: 10em; + background: #f7f7f7; + transform: translateZ(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); + } + + core-layout { + display: inline-block; + position: relative; + background: #f7f7f7; + border-radius: 3px; + width: 320px; + height: 480px; + border-radius: 3px; + overflow: hidden; + } + + core-layout > .inner { + border-radius: 3px; + } + + .inner { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: -1; + } + + .toolbar { + background: #4555a5; + position: relative; + padding: 1em; + } + + .photo { + background: #eee; + height: 30%; + } + + [core-flex] { + background: #fff; + padding: 0 1em; + overflow: auto; + } + + paper-fab { + position: absolute !important; + top: 167px; + right: 1em; + } + + core-icon::shadow path { + fill: #fff; + } + + </style> +</head> +<body unresolved> + + <p>In this demo, the FAB is in the "focused" state on load.</p> + + <core-layout class="card paper-shadow-top-z-1" vertical> + <div class="inner paper-shadow-bottom-z-1"></div> + <div class="toolbar paper-shadow-top-z-1"> + <div class="inner paper-shadow-bottom-z-1"></div> + <core-icon icon="arrow-back"></core-icon> + </div> + <div class="photo"> + </div> + <paper-fab focused icon="image:camera-alt"></paper-fab> + <div core-flex> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> + </div> + </core-layout> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-fab/index.html b/third_party/polymer/components-chromium/paper-fab/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-fab/metadata.html b/third_party/polymer/components-chromium/paper-fab/metadata.html new file mode 100644 index 0000000..ef95232 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/metadata.html @@ -0,0 +1,27 @@ +<x-meta id="paper-fab" label="Floating Action Button" group="Paper"> + + <template> + <paper-fab icon="av:play-arrow"></paper-fab> + </template> + + <template id="imports"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="../core-icons/av-icons.html"> + <link rel="import" href="paper-fab.html"> + </template> + +</x-meta> + +<x-meta id="paper-fab-right-aligned" label="Floating Action Button Panel" group="Paper"> + + <template> + <div layout horizontal> + <paper-fab icon="check"></paper-fab> + </div> + </template> + + <template id="imports"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="paper-fab.html"> + </template> +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-fab/paper-fab-extracted.js b/third_party/polymer/components-chromium/paper-fab/paper-fab-extracted.js new file mode 100644 index 0000000..1f6bf13 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/paper-fab-extracted.js @@ -0,0 +1,18 @@ + + Polymer('paper-fab', { + + publish: { + + /** + * See [`<paper-button>`](../paper-button). + * + * @attribute raisedButton + * @type boolean + * @default true + */ + raisedButton: {value: true, reflect: true} + + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-fab/paper-fab.css b/third_party/polymer/components-chromium/paper-fab/paper-fab.css new file mode 100644 index 0000000..4f333e6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/paper-fab.css @@ -0,0 +1,26 @@ +:host { + box-sizing: border-box; + width: 56px; + height: 56px; + background: #d23f31; + border-radius: 50%; + fill: #fff; +} + +:host(.mini) { + width: 40px; + height: 40px; +} + +:host /deep/ #focusBg { + display: none; +} + +:host /deep/ #icon { + display: block; + margin: 16px; +} + +:host(.mini) /deep/ #icon { + margin: 8px; +} diff --git a/third_party/polymer/components-chromium/paper-fab/paper-fab.html b/third_party/polymer/components-chromium/paper-fab/paper-fab.html new file mode 100644 index 0000000..c8f09e6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-fab/paper-fab.html @@ -0,0 +1,40 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`<paper-fab>` is a floating action button with an icon. It comes in two sizes: regular +size and a smaller size by applying the class `mini`. + +Example: + + <paper-fab icon="favorite"></paper-fab> + <paper-fab class="mini"></paper-fab> + +@group Paper Elements +@element paper-fab +@homepage github.io +@extends paper-icon-button +--> + +<link href="../polymer/polymer.html" rel="import"> +<link href="../paper-icon-button/paper-icon-button.html" rel="import"> + +<polymer-element name="paper-fab" extends="paper-icon-button" assetpath=""> + + <template> + + <link href="paper-fab.css" rel="stylesheet"> + + <shadow></shadow> + + </template> + + +</polymer-element> +<script src="paper-fab-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-focusable/.bower.json b/third_party/polymer/components-chromium/paper-focusable/.bower.json new file mode 100644 index 0000000..8dcb240 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "paper-focusable", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-focusable", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "fdeb4fa52af811ab504612963eae4a2db13f7f43" + }, + "_source": "git://github.com/Polymer/paper-focusable.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-focusable" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-focusable/README.md b/third_party/polymer/components-chromium/paper-focusable/README.md new file mode 100644 index 0000000..ab2965a --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/README.md @@ -0,0 +1,4 @@ +paper-focusable +=============== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-focusable) for more information. diff --git a/third_party/polymer/components-chromium/paper-focusable/bower.json b/third_party/polymer/components-chromium/paper-focusable/bower.json new file mode 100644 index 0000000..324f9d2 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/bower.json @@ -0,0 +1,7 @@ +{ + "name": "paper-focusable", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-focusable/demo.html b/third_party/polymer/components-chromium/paper-focusable/demo.html new file mode 100644 index 0000000..9fd58a2 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/demo.html @@ -0,0 +1,155 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>paper-focusable</title> + + <script src="../platform/platform.js"></script> + + <link href="../font-roboto/roboto.html" rel="import"> + <link href="paper-focusable.html" rel="import"> + + <style shim-shadowdom> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + -webkit-transform: translateZ(0); + transform: translateZ(0); + } + + section { + padding: 20px 0; + + width: 37em; + } + + section > div { + padding: 14px 0; + + font-size: 1.5em; + } + + paper-focusable[active].focusable-active { + + background: #9c27b0; + + } + + paper-focusable[active].focusable-toggle { + + background: #9c27b0; + + } + + paper-focusable[pressed].focusable-pressed { + + background: #ff80ab; + + } + + paper-focusable[focused].focusable-focused { + + background: #ec407a; + + } + + paper-focusable[disabled].focusable-disabled { + + opacity: 0.5; + + } + + + </style> +</head> +<body unresolved> + + <div class="main-descriptor"> + + The "paper-focused" item allows you to handle focusing on items. + + </div> + + <section> + + <div>Focusable Item - active</div> + + <paper-focusable class="focusable-active"> + + This paragraph shows a style with the "paper-focusable[active]" selector. + It functions much like using the "pressed" attribute. + </paper-focusable> + + </section> + + <section> + + <div>Focusable Item - pressed</div> + + <paper-focusable class="focusable-pressed"> + + This paragraph shows a style with the "paper-focusable[pressed]" selector. + It functions much like usin the "active" attribute. + + </paper-focusable> + + </section> + + <section> + + <div>Focusable Item - focused</div> + + <paper-focusable class="focusable-focused"> + + This paragraph shows a style with the "paper-focusable[focused]" selector. + This will be active on items that are focused but not active or pressed. + + </paper-focusable> + + </section> + + <section> + + <div>Focusable Item - disabled</div> + + <paper-focusable disabled class="focusable-disabled"> + + This paragraph shows a style with the "disabled" attribute. + The "paper-focusable" item with a "disabled" attribute cannot be selected, + and will prevent mouse actions. + + </paper-focusable> + + </section> + + <section> + + <div>Focusable Item - toggle</div> + + <paper-focusable isToggle class="focusable-toggle"> + + This paragraph shows a style with the "isToggle" attribute. + The "paper-focusable" item with an "isToggle" toggles the active state on each tap. + + </paper-focusable> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-focusable/paper-focusable-extracted.js b/third_party/polymer/components-chromium/paper-focusable/paper-focusable-extracted.js new file mode 100644 index 0000000..6b4173c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/paper-focusable-extracted.js @@ -0,0 +1,111 @@ + + Polymer('paper-focusable', { + + publish: { + + /** + * If true, the button is currently active either because the + * user is holding down the button, or the button is a toggle + * and is currently in the active state. + * + * @attribute active + * @type boolean + * @default false + */ + active: {value: false, reflect: true}, + + /** + * If true, the element currently has focus due to keyboard + * navigation. + * + * @attribute focused + * @type boolean + * @default false + */ + focused: {value: false, reflect: true}, + + /** + * If true, the user is currently holding down the button. + * + * @attribute pressed + * @type boolean + * @default false + */ + pressed: {value: false, reflect: true}, + + /** + * If true, the user cannot interact with this element. + * + * @attribute disabled + * @type boolean + * @default false + */ + disabled: {value: false, reflect: true}, + + /** + * If true, the button toggles the active state with each tap. + * Otherwise, the button becomes active when the user is holding + * it down. + * + * @attribute isToggle + * @type boolean + * @default false + */ + isToggle: {value: false, reflect: false} + + }, + + disabledChanged: function() { + if (this.disabled) { + this.removeAttribute('tabindex'); + } else { + this.setAttribute('tabindex', 0); + } + }, + + downAction: function() { + this.pressed = true; + this.focused = false; + + if (this.isToggle) { + this.active = !this.active; + } else { + this.active = true; + } + }, + + // Pulling up the context menu for an item should focus it; but we need to + // be careful about how we deal with down/up events surrounding context + // menus. The up event typically does not fire until the context menu + // closes: so we focus immediately. + // + // This fires _after_ downAction. + contextMenuAction: function(e) { + // Note that upAction may fire _again_ on the actual up event. + this.upAction(e); + this.focusAction(); + }, + + upAction: function() { + this.pressed = false; + + if (!this.isToggle) { + this.active = false; + } + }, + + focusAction: function() { + if (!this.pressed) { + // Only render the "focused" state if the element gains focus due to + // keyboard navigation. + this.focused = true; + } + }, + + blurAction: function() { + this.focused = false; + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-focusable/paper-focusable.html b/third_party/polymer/components-chromium/paper-focusable/paper-focusable.html new file mode 100644 index 0000000..b668141 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-focusable/paper-focusable.html @@ -0,0 +1,37 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Paper Elements + * + * paper-focusable is a base class for paper elements that can be focused. + * + * @element paper-focusable + * @status beta + * @homepage github.io + */ +--> + +<link href="../polymer/polymer.html" rel="import"> + +<polymer-element name="paper-focusable" attributes="active focused disabled isToggle" tabindex="0" on-down="{{downAction}}" on-up="{{upAction}}" on-focus="{{focusAction}}" on-blur="{{blurAction}}" on-contextmenu="{{contextMenuAction}}" assetpath=""> + + <template> + <style> + :host([disabled]) { + pointer-events: none; + } + </style> + <content></content> + </template> + + +</polymer-element> +<script src="paper-focusable-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/.bower.json b/third_party/polymer/components-chromium/paper-icon-button/.bower.json new file mode 100644 index 0000000..8de328e --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-icon-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-icon-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "55e07d248d0eec1d3044c240a829b96bd6ca916a" + }, + "_source": "git://github.com/Polymer/paper-icon-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-icon-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/README.md b/third_party/polymer/components-chromium/paper-icon-button/README.md new file mode 100644 index 0000000..633a113 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/README.md @@ -0,0 +1,4 @@ +paper-icon-button +================= + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-icon-button) for more information. diff --git a/third_party/polymer/components-chromium/paper-icon-button/bower.json b/third_party/polymer/components-chromium/paper-icon-button/bower.json new file mode 100644 index 0000000..828d0ab --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-icon-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/demo.html b/third_party/polymer/components-chromium/paper-icon-button/demo.html new file mode 100644 index 0000000..bd42d52 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/demo.html @@ -0,0 +1,102 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> + <head> + <title>paper-icon-button</title> + <meta name="viewport" content="width=device-width; initial-scale=1.0; max-scale=1.0; user-scalable=yes"> + <script src="../platform/platform.js"></script> + + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="../core-icons/maps-icons.html"> + <link rel="import" href="../core-icons/social-icons.html"> + <link rel="import" href="../core-selector/core-selector.html"> + <link rel="import" href="paper-icon-button.html"> + + <style shim-shadowdom> + body { + font-family: sans-serif; + } + + column { + display: inline-block; + max-width: 720px; + } + + section { + margin: 1em; + } + + span { + display: inline-block; + text-align: right; + width: 6em; + margin-right: 1em; + } + + paper-icon-button { + vertical-align: middle; + } + + paper-icon-button.red::shadow core-icon { + fill: #fe774d; + } + + core-selector paper-icon-button:not([active])::shadow core-icon { + fill: #c9c9c9; + } + </style> + + </head> + + <body unresolved layout horizontal center-justified> + + <column> + + <section> + <span>icon buttons</span> + <paper-icon-button icon="menu"></paper-icon-button> + <paper-icon-button icon="arrow-back"></paper-icon-button> + <paper-icon-button icon="arrow-forward"></paper-icon-button> + <paper-icon-button icon="check"></paper-icon-button> + <paper-icon-button icon="close"></paper-icon-button> + <paper-icon-button icon="fullscreen"></paper-icon-button> + <paper-icon-button icon="fullscreen-exit"></paper-icon-button> + <paper-icon-button icon="more-vert"></paper-icon-button> + <paper-icon-button icon="refresh"></paper-icon-button> + </section> + + <section> + <span>styled</span> + <paper-icon-button icon="favorite"></paper-icon-button> + <paper-icon-button class="red" icon="favorite"></paper-icon-button> + <paper-icon-button disabled onclick="alert('should not be clickable');" icon="favorite"></paper-icon-button> + </section> + +<!-- <section> + <span>focused</span> + <paper-icon-button focused icon="social:cake"></paper-icon-button> + <paper-icon-button focused icon="social:plus-one"></paper-icon-button> + </section> + --> + <section> + <span>segmented</span> + <core-selector selected="1"> + <paper-icon-button fill isToggle icon="maps:directionswalk"></paper-icon-button> + <paper-icon-button fill isToggle icon="maps:directions-bike"></paper-icon-button> + <paper-icon-button fill isToggle icon="maps:directions-transit"></paper-icon-button> + <paper-icon-button fill isToggle icon="maps:directions-car"></paper-icon-button> + </core-selector> + </section> + + <section> + <span>custom img</span> + <paper-icon-button iconSrc="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png"></paper-icon-button> + </section> + </column> + + </body> +</html> diff --git a/third_party/polymer/components-chromium/paper-icon-button/index.html b/third_party/polymer/components-chromium/paper-icon-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-icon-button/metadata.html b/third_party/polymer/components-chromium/paper-icon-button/metadata.html new file mode 100644 index 0000000..c2e399c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/metadata.html @@ -0,0 +1,12 @@ +<x-meta id="paper-icon-button" label="Icon Button" group="Paper"> + + <template> + <paper-icon-button icon="menu"></paper-icon-button> + </template> + + <template id="imports"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="paper-icon-button.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button-extracted.js b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button-extracted.js new file mode 100644 index 0000000..4a6920b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button-extracted.js @@ -0,0 +1,35 @@ + + + Polymer('paper-icon-button', { + + publish: { + + /** + * If true, the ripple expands to a square to fill the containing box. + * + * @attribute fill + * @type boolean + * @default false + */ + fill: {value: false, reflect: true} + + }, + + ready: function() { + this.$.ripple.classList.add('recenteringTouch'); + this.fillChanged(); + }, + + fillChanged: function() { + this.$.ripple.classList.toggle('circle', !this.fill); + }, + + iconChanged: function(oldIcon) { + if (!this.label) { + this.setAttribute('aria-label', this.icon); + } + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.css b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.css new file mode 100644 index 0000000..313e627 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.css @@ -0,0 +1,17 @@ +/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ + +:host([disabled]) { + background: none !important; +} + +:host([disabled]) /deep/ #icon { + fill: #c9c9c9; +} + +:host(:not([fill])) /deep/ #focusBg { + border-radius: 50%; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.html b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.html new file mode 100644 index 0000000..55b36a7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/paper-icon-button.html @@ -0,0 +1,54 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> + +<!-- +@group Paper Elements +`paper-icon-button` is a button with an image placed at the center. + +Example: + + <paper-icon-button iconSrc="star.png"></paper-icon-button> + +`paper-icon-button` includes a default icon set. Use `icon` to specify +which icon from the icon set to use. + +Example: + + <paper-icon-button icon="menu"></paper-icon-button> + +The icons provided by `core-icons` are SVG, and you can style them with CSS. + +Example: + + <paper-icon-button icon="favorite" style="fill:red;"></paper-icon-button> + +See `core-iconset` for more information about how to use a custom icon set. + +@element paper-icon-button +@extends paper-button +@homepage github.io +--> + +<link href="../core-icon/core-icon.html" rel="import"> +<link href="../paper-button/paper-button.html" rel="import"> + +<polymer-element name="paper-icon-button" extends="paper-button" attributes="fill" assetpath=""> + + <template> + + <link href="paper-icon-button.css" rel="stylesheet"> + + <shadow></shadow> + + </template> + + + +</polymer-element> +<script src="paper-icon-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-icon-button/pulse-ink.css b/third_party/polymer/components-chromium/paper-icon-button/pulse-ink.css new file mode 100644 index 0000000..8d11bc1 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-icon-button/pulse-ink.css @@ -0,0 +1,10 @@ +@-webkit-keyframes pulse-ink { + 0% { + -webkit-transform: scale(0); + opacity: 0; + } + 100% { + -webkit-transform: scale(1); + opacity: 0.9; + } +} diff --git a/third_party/polymer/components-chromium/paper-input/.bower.json b/third_party/polymer/components-chromium/paper-input/.bower.json new file mode 100644 index 0000000..690374f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-input", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", + "core-style": "Polymer/core-style#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-input", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "52a7c021c9aeb7d0020e81d42d8b7ce3884ca68e" + }, + "_source": "git://github.com/Polymer/paper-input.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-input" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-input/.gitignore b/third_party/polymer/components-chromium/paper-input/.gitignore new file mode 100644 index 0000000..9f7d5aa --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/.gitignore @@ -0,0 +1 @@ +vulcanized.html diff --git a/third_party/polymer/components-chromium/paper-input/README.md b/third_party/polymer/components-chromium/paper-input/README.md new file mode 100644 index 0000000..f7617c5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/README.md @@ -0,0 +1,4 @@ +paper-input +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-input) for more information. diff --git a/third_party/polymer/components-chromium/paper-input/bower.json b/third_party/polymer/components-chromium/paper-input/bower.json new file mode 100644 index 0000000..0ad8185 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-input", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-input": "Polymer/core-input#>=0.3.0 <1.0.0", + "core-style": "Polymer/core-style#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-input/demo.html b/third_party/polymer/components-chromium/paper-input/demo.html new file mode 100644 index 0000000..457d587 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/demo.html @@ -0,0 +1,73 @@ +<!doctype html> +<html> +<head> + + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + + <title>paper-input</title> + + <script src="../platform/platform.js"></script> + + <link href="../font-roboto/roboto.html" rel="import"> + <link href="paper-input.html" rel="import"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + </style> + +</head> +<body unresolved> + <section> + + <paper-input label="Type something..."></paper-input> + + <br> + + <paper-input label="Type only numbers..." type="number" error="Input is not a number!"></paper-input> + + <br> + + <paper-input label="Type something..." required error="This input requires a value!"></paper-input> + + <br> + + <paper-input disabled label="I'm disabled"></paper-input> + + <br> + + <paper-input floatingLabel label="Floating label"></paper-input> + + <br> + + <paper-input floatingLabel label="Type only numbers... (floating)" type="number" error="Input is not a number!"></paper-input> + + <br> + + <paper-input multiline label="Type multiple lines here..."></paper-input> + + <br> + + <paper-input multiline rows="3" label="This input is 3 rows high"></paper-input> + + <br> + + <paper-input multiline maxRows="3" label="This input is at most 3 rows high"></paper-input> + + <br> + + <paper-input multiline floatingLabel label="Multiple lines and a floating label"></paper-input> + + </section> +</body> diff --git a/third_party/polymer/components-chromium/paper-input/demo2.html b/third_party/polymer/components-chromium/paper-input/demo2.html new file mode 100644 index 0000000..2fbdd7f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/demo2.html @@ -0,0 +1,114 @@ +<!doctype html> +<html> +<head> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <title>paper-input</title> + <script src="../platform/platform.js"></script> + <link href="../font-roboto/roboto.html" rel="import"> + <link href="paper-input.html" rel="import"> + <style> + body { + padding: 0; + margin: 0; + -webkit-transform: translateZ(0); + transform: translateZ(0); + } + section { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + font-size: 16px; + text-align: center; + padding: 36px 20%; + background: #eee; + } + h1 { + font-size: 2em; + margin-bottom: 2em; + } + .container { + margin: 24px 0; + border-radius: 5px; + } + paper-input { + width: 100%; + text-align: left; + } + .dark-theme { + background: #333333; + color: #ccc; + } + .dark-theme paper-input { + color: #666; + } + .dark-theme input { + color: #fff; + } + .dark-theme /deep/ input { + color: #fff; + } + .dark-theme #underline { + background: #666; + border-bottom-color: #666; + } + .dark-theme /deep/ #underline { + background: #666; + border-bottom-color: #666; + } + .dark-theme .focusedColor { + color: #7d8ad0; + background: #7d8ad0; + } + .dark-theme /deep/ .focusedColor { + color: #7d8ad0; + background: #7d8ad0; + } + </style> +</head> +<body unresolved> + <section> + <h1><paper-input></h1> + <div class="container"> + <paper-input label="Type something..."></paper-input> + </div> + <div class="container"> + <paper-input label="Type only numbers..." validate="^[0-9]*$" error="Input is not a number!"></paper-input> + </div> + <div class="container"> + <paper-input disabled label="I'm disabled"></paper-input> + </div> + <div class="container"> + <paper-input floatingLabel label="Floating label"></paper-input> + </div> + <div class="container"> + <paper-input floatingLabel label="Type only numbers... (floating)" validate="^[0-9]*$" error="Input is not a number!"></paper-input> + </div> + <div class="container"> + <paper-input multiline style="display:none;" label="Type multiple lines here..."></paper-input> + </div> + <div class="container"> + <paper-input multiline rows="3" label="This input is 3 rows high"></paper-input> + </div> + <div class="container"> + <paper-input multiline maxRows="3" label="This input is at most 3 rows high"></paper-input> + </div> + <div class="container"> + <paper-input multiline floatingLabel label="Multiple lines and a floating label"></paper-input> + </div> + </section> + <section class="dark-theme"> + <div class="container"> + <paper-input label="Type something..."></paper-input> + </div> + <div class="container"> + <paper-input label="Type only numbers..." validate="^[0-9]*$" error="Input is not a number!"></paper-input> + </div> + <div class="container"> + <paper-input disabled label="I'm disabled"></paper-input> + </div> + <div class="container"> + <paper-input floatingLabel label="Floating label"></paper-input> + </div> + <div class="container"> + <paper-input floatingLabel label="Type only numbers... (floating)" validate="^[0-9]*$" error="Input is not a number!"></paper-input> + </div> + </section> +</body> diff --git a/third_party/polymer/components-chromium/paper-input/error-100.png b/third_party/polymer/components-chromium/paper-input/error-100.png Binary files differnew file mode 100644 index 0000000..ab5a6b1 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/error-100.png diff --git a/third_party/polymer/components-chromium/paper-input/error-200.png b/third_party/polymer/components-chromium/paper-input/error-200.png Binary files differnew file mode 100644 index 0000000..ede8dd5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/error-200.png diff --git a/third_party/polymer/components-chromium/paper-input/index.html b/third_party/polymer/components-chromium/paper-input/index.html new file mode 100644 index 0000000..b90ad27 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["paper-input.html","../core-input/core-input.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-input/metadata.html b/third_party/polymer/components-chromium/paper-input/metadata.html new file mode 100644 index 0000000..703692d --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/metadata.html @@ -0,0 +1,14 @@ +<x-meta id="paper-input" label="Input" group="Paper" isEditor> + + <template> + <paper-input label="Type something..."></paper-input> + </template> + + <template id="imports"> + <link rel="import" href="paper-input.html"> + </template> + + <property name="validate" kind="string"></property> + <property name="error" kind="string"></property> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-input/paper-input-extracted.js b/third_party/polymer/components-chromium/paper-input/paper-input-extracted.js new file mode 100644 index 0000000..4be0cda --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/paper-input-extracted.js @@ -0,0 +1,327 @@ + + + (function() { + + var paperInput = CoreStyle.g.paperInput = CoreStyle.g.paperInput || {}; + paperInput.focusedColor = '#4059a9'; + paperInput.invalidColor = '#d34336'; + + Polymer('paper-input', { + + /** + * The label for this input. It normally appears as grey text inside + * the text input and disappears once the user enters text. + * + * @attribute label + * @type string + * @default '' + */ + label: '', + + /** + * If true, the label will "float" above the text input once the + * user enters text instead of disappearing. + * + * @attribute floatingLabel + * @type boolean + * @default false + */ + floatingLabel: false, + + /** + * (multiline only) If set to a non-zero value, the height of this + * text input will grow with the value changes until it is maxRows + * rows tall. If the maximum size does not fit the value, the text + * input will scroll internally. + * + * @attribute maxRows + * @type number + * @default 0 + */ + maxRows: 0, + + /** + * The message to display if the input value fails validation. If this + * is unset or the empty string, a default message is displayed depending + * on the type of validation error. + * + * @attribute error + * @type string + */ + error: '', + + focused: false, + pressed: false, + + attached: function() { + if (this.multiline) { + this.resizeInput(); + window.requestAnimationFrame(function() { + this.$.underlineContainer.classList.add('animating'); + }.bind(this)); + } + }, + + resizeInput: function() { + var height = this.$.inputClone.getBoundingClientRect().height; + var bounded = this.maxRows > 0 || this.rows > 0; + if (bounded) { + var minHeight = this.$.minInputHeight.getBoundingClientRect().height; + var maxHeight = this.$.maxInputHeight.getBoundingClientRect().height; + height = Math.max(minHeight, Math.min(height, maxHeight)); + } + this.$.inputContainer.style.height = height + 'px'; + this.$.underlineContainer.style.top = height + 'px'; + }, + + prepareLabelTransform: function() { + var toRect = this.$.floatedLabelSpan.getBoundingClientRect(); + var fromRect = this.$.labelSpan.getBoundingClientRect(); + if (toRect.width !== 0) { + this.$.label.cachedTransform = 'scale(' + (toRect.width / fromRect.width) + ') ' + + 'translateY(' + (toRect.bottom - fromRect.bottom) + 'px)'; + } + }, + + toggleLabel: function(force) { + var v = force !== undefined ? force : this.inputValue; + + if (!this.floatingLabel) { + this.$.label.classList.toggle('hidden', v); + } + + if (this.floatingLabel && !this.focused) { + this.$.label.classList.toggle('hidden', v); + this.$.floatedLabel.classList.toggle('hidden', !v); + } + }, + + rowsChanged: function() { + if (this.multiline && !isNaN(parseInt(this.rows))) { + this.$.minInputHeight.innerHTML = ''; + for (var i = 0; i < this.rows; i++) { + this.$.minInputHeight.appendChild(document.createElement('br')); + } + this.resizeInput(); + } + }, + + maxRowsChanged: function() { + if (this.multiline && !isNaN(parseInt(this.maxRows))) { + this.$.maxInputHeight.innerHTML = ''; + for (var i = 0; i < this.maxRows; i++) { + this.$.maxInputHeight.appendChild(document.createElement('br')); + } + this.resizeInput(); + } + }, + + inputValueChanged: function() { + this.super(); + + if (this.multiline) { + var escaped = this.inputValue.replace(/\n/gm, '<br>'); + if (!escaped || escaped.lastIndexOf('<br>') === escaped.length - 4) { + escaped += ' '; + } + this.$.inputCloneSpan.innerHTML = escaped; + this.resizeInput(); + } + + this.toggleLabel(); + }, + + labelChanged: function() { + if (this.floatingLabel && this.$.floatedLabel && this.$.label) { + // If the element is created programmatically, labelChanged is called before + // binding. Run the measuring code in async so the DOM is ready. + this.async(function() { + this.prepareLabelTransform(); + }); + } + }, + + placeholderChanged: function() { + this.label = this.placeholder; + }, + + inputFocusAction: function() { + if (!this.pressed) { + if (this.floatingLabel) { + this.$.floatedLabel.classList.remove('hidden'); + this.$.floatedLabel.classList.add('focused'); + this.$.floatedLabel.classList.add('focusedColor'); + } + this.$.label.classList.add('hidden'); + this.$.underlineHighlight.classList.add('focused'); + this.$.caret.classList.add('focused'); + + this.super(arguments); + } + this.focused = true; + }, + + shouldFloatLabel: function() { + // if type = number, the input value is the empty string until a valid number + // is entered so we must do some hacks here + return this.inputValue || (this.type === 'number' && !this.validity.valid); + }, + + inputBlurAction: function() { + this.super(arguments); + + this.$.underlineHighlight.classList.remove('focused'); + this.$.caret.classList.remove('focused'); + + if (this.floatingLabel) { + this.$.floatedLabel.classList.remove('focused'); + this.$.floatedLabel.classList.remove('focusedColor'); + if (!this.shouldFloatLabel()) { + this.$.floatedLabel.classList.add('hidden'); + } + } + + // type = number hack. see core-input for more info + if (!this.shouldFloatLabel()) { + this.$.label.classList.remove('hidden'); + this.$.label.classList.add('animating'); + this.async(function() { + this.$.label.style.webkitTransform = 'none'; + this.$.label.style.transform = 'none'; + }); + } + + this.focused = false; + }, + + downAction: function(e) { + if (this.disabled) { + return; + } + + if (this.focused) { + return; + } + + this.pressed = true; + var rect = this.$.underline.getBoundingClientRect(); + var right = e.x - rect.left; + this.$.underlineHighlight.style.webkitTransformOriginX = right + 'px'; + this.$.underlineHighlight.style.transformOriginX = right + 'px'; + this.$.underlineHighlight.classList.remove('focused'); + this.underlineAsync = this.async(function() { + this.$.underlineHighlight.classList.add('pressed'); + }, null, 200); + + // No caret animation if there is text in the input. + if (!this.inputValue) { + this.$.caret.classList.remove('focused'); + } + }, + + upAction: function(e) { + if (this.disabled) { + return; + } + + if (!this.pressed) { + return; + } + + // if a touchevent caused the up, the synthentic mouseevents will blur + // the input, make sure to prevent those from being generated. + if (e._source === 'touch') { + e.preventDefault(); + } + + if (this.underlineAsync) { + clearTimeout(this.underlineAsync); + this.underlineAsync = null; + } + + // Focus the input here to bring up the virtual keyboard. + this.$.input.focus(); + this.pressed = false; + this.animating = true; + + this.$.underlineHighlight.classList.remove('pressed'); + this.$.underlineHighlight.classList.add('animating'); + this.async(function() { + this.$.underlineHighlight.classList.add('focused'); + }); + + // No caret animation if there is text in the input. + if (!this.inputValue) { + this.$.caret.classList.add('animating'); + this.async(function() { + this.$.caret.classList.add('focused'); + }, null, 100); + } + + if (this.floatingLabel) { + this.$.label.classList.add('focusedColor'); + this.$.label.classList.add('animating'); + if (!this.$.label.cachedTransform) { + this.prepareLabelTransform(); + } + this.$.label.style.webkitTransform = this.$.label.cachedTransform; + this.$.label.style.transform = this.$.label.cachedTransform; + } + }, + + keydownAction: function() { + this.super(); + + // more type = number hacks. see core-input for more info + if (this.type === 'number') { + this.async(function() { + if (!this.inputValue) { + this.toggleLabel(!this.validity.valid); + } + }); + } + }, + + keypressAction: function() { + if (this.animating) { + this.transitionEndAction(); + } + }, + + transitionEndAction: function(e) { + this.animating = false; + if (this.pressed) { + return; + } + + if (this.focused) { + + if (this.floatingLabel || this.inputValue) { + this.$.label.classList.add('hidden'); + } + + if (this.floatingLabel) { + this.$.label.classList.remove('focusedColor'); + this.$.label.classList.remove('animating'); + this.$.floatedLabel.classList.remove('hidden'); + this.$.floatedLabel.classList.add('focused'); + this.$.floatedLabel.classList.add('focusedColor'); + } + + this.async(function() { + this.$.underlineHighlight.classList.remove('animating'); + this.$.caret.classList.remove('animating'); + }, null, 100); + + } else { + + this.$.label.classList.remove('animating'); + + } + } + + }); + + }()); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-input/paper-input.css b/third_party/polymer/components-chromium/paper-input/paper-input.css new file mode 100644 index 0000000..31120f6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/paper-input.css @@ -0,0 +1,211 @@ +:host { + display: inline-block; + outline: none; + text-align: inherit; + color: #757575; +} +:host(:hover) { + cursor: text; +} + +#container { + position: relative; +} + +#inputClone, +#minInputHeight, +#maxInputHeight { + position: absolute; + top: 0; + left: 0; + visibility: hidden; + padding: 0.5em 0; +} + +:host /deep/ input, +:host /deep/ textarea { + font: inherit; + color: #000; + padding: 0; + /* Important to use margin here so the margin remains visible + * when textarea scrolls internally. */ + margin: 0.5em 0; + background-color: transparent; + border: none; + outline: none; + width: 100%; +} + +:host /deep/ input:invalid, +:host /deep/ textarea:invalid { + box-shadow: none; +} + +.host /deep/ textarea { + resize: none; +} + +#floatedLabel { + font-size: 0.75em; + background: transparent; + white-space: nowrap; +} +#floatedLabel.hidden { + visibility: hidden; +} +#floatedLabel.focused { + visibility: visible; +} + +#label { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + width: 100%; + padding: 0.5em 0; + background: transparent; + -moz-transform-origin: 0% 0%; + -webkit-transform-origin: 0% 0%; + transform-origin: 0% 0%; + pointer-events: none; +} +#label.hidden { + display: none; +} +#label.animating { + /* TODO: transforms are unprefixed in M36/ Remove when stable. */ + -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); + transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); +} + +#labelSpan { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: inline-block; + max-width: 100%; +} + +#errorContainer { + visibility: hidden; + display: -webkit-flex; + display: flex; + -webkit-align-items: center; + align-items: center; +} + +:host(.invalid) #errorContainer { + visibility: visible; +} + +#error { + -webkit-flex: 1; + flex: 1; + font-size: 0.75em; + padding: 0.5em 0; +} + +#errorIcon { + background-image: url(error-100.png); + background-size: 24px 24px; + height: 24px; + width: 24px; +} + + +@media (min-resolution: 2dppx) { + #errorIcon { + background-image: url(error-200.png); + background-size: 24px 24px; + } +} + +#underlineContainer { + position: absolute; + left: 0; + right: 0; + bottom: -1px; +} + +:host([multiline]) #underlineContainer { + bottom: auto; +} + +:host([multiline]) #underlineContainer.animating { + -webkit-transition: top 0.2s ease-in; + transition: top 0.2s ease-in; +} + +#underline { + height: 1px; + background: #757575; + border-bottom-color: #757575; +} + +:host([disabled]) #underline { + border-bottom: 1px dashed; + height: 0px; + background: transparent; +} + +#underlineHighlight { + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 2px; + -webkit-transform: scale(0,2); + transform: scale(0,2); +} +#underlineHighlight.pressed { + -webkit-transform: scale(0.1,2); + transform: scale(0.1,2); + /* TODO: transforms are unprefixed in M36/ Remove when stable. */ + -webkit-transition: -webkit-transform 0.1s cubic-bezier(0.2, 0, 0.03, 1); + transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); +} +#underlineHighlight.animating { + /* TODO: transforms are unprefixed in M36/ Remove when stable. */ + -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); + transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); +} +#underlineHighlight.focused { + -webkit-transform: scale(1); + transform: scale(1); +} + +#caret { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + opacity: 0; + -moz-transform-origin: 0%; + -webkit-transform-origin-x: 0%; + transform-origin-x: 0%; + -webkit-transform: scaleX(1) translateX(10%); + transform: scaleX(1) translateX(10%); +} +#caret.animating { + display: block; + /* TODO: transforms are unprefixed in M36/ Remove when stable. */ + -webkit-transition: -webkit-transform 0.2s ease-out, opacity 0.2s ease-out; + transition: transform 0.3s cubic-bezier(0.2, 0, 0.03, 1); +} +#caret.focused { + display: block; + opacity: 0.75; + -webkit-transform: scaleX(0) translateX(0); + transform: scaleX(0) translateX(0); +} +#caretInner { + position: absolute; + top: 0.6em; + left: 0; + height: 1.2em; + width: 25%; +} diff --git a/third_party/polymer/components-chromium/paper-input/paper-input.html b/third_party/polymer/components-chromium/paper-input/paper-input.html new file mode 100644 index 0000000..3e55350 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-input/paper-input.html @@ -0,0 +1,108 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> + +<!-- +`paper-input` is a single- or multi-line text field where user can enter input. +It can optionally have a label. + +Example: + + <paper-input label="Your Name"></paper-input> + <paper-input multiline label="Enter multiple lines here"></paper-input> + +Theming +-------- + +Set `CoreStyle.g.paperInput.focusedColor` and `CoreStyle.g.paperInput.invalidColor` to theme +the focused and invalid states. + +@group Paper Elements +@element paper-input +@extends core-input +@homepage github.io +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-input/core-input.html" rel="import"> +<link href="../core-style/core-style.html" rel="import"> + +<core-style id="paper-input"> + +#label.focused, +#floatedLabel.focused { + color: {{g.paperInput.focusedColor}}; +} + +#underlineHighlight.focused, +#caretInner { + background-color: {{g.paperInput.focusedColor}}; +} + +#error, +:host(.invalid) #label.focused, +:host(.invalid) #floatedLabel.focused { + color: {{g.paperInput.invalidColor}}; +} +:host(.invalid) #underlineHighlight.focused, +:host(.invalid) #caretInner { + background-color: {{g.paperInput.invalidColor}}; +} + +</core-style> + +<polymer-element name="paper-input" extends="core-input" attributes="label floatingLabel maxRows error" on-down="{{downAction}}" on-up="{{upAction}}" assetpath=""> + + <template> + + <link href="paper-input.css" rel="stylesheet"> + + <core-style ref="paper-input"></core-style> + + <div id="floatedLabel" class="hidden" hidden?="{{!floatingLabel}}"><span id="floatedLabelSpan">{{label}}</span></div> + + <div id="container" on-transitionend="{{transitionEndAction}}" on-webkittransitionend="{{transitionEndAction}}"> + + <div id="label"><span id="labelSpan">{{label}}</span></div> + + <div id="inputContainer"> + + <div id="inputClone"> + <span id="inputCloneSpan" aria-hidden="true"> </span> + </div> + + <template if="{{multiline}}"> + <div id="minInputHeight"></div> + <div id="maxInputHeight"></div> + </template> + + <shadow></shadow> + + </div> + + <div id="underlineContainer"> + <div id="underline"></div> + <div id="underlineHighlight" class="focusedColor"></div> + </div> + + <div id="caret"> + <div id="caretInner" class="focusedColor"></div> + </div> + + </div> + + <div id="errorContainer"> + <div id="error" role="alert" aria-hidden="{{!invalid}}">{{error || validationMessage}}</div> + <div id="errorIcon"></div> + </div> + + </template> + + + +</polymer-element> +<script src="paper-input-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/.bower.json b/third_party/polymer/components-chromium/paper-item/.bower.json new file mode 100644 index 0000000..4e9282f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-item", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-item", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "06e4854e71fe1f7c10a39ec0a2cf44b1af11b264" + }, + "_source": "git://github.com/Polymer/paper-item.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-item" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/README.md b/third_party/polymer/components-chromium/paper-item/README.md new file mode 100644 index 0000000..b7ec0ce --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/README.md @@ -0,0 +1,4 @@ +paper-item +========= + +See the [component page](http://polymer-project.org/docs/elements/paper-elements.html#paper-item) for more information. diff --git a/third_party/polymer/components-chromium/paper-item/bower.json b/third_party/polymer/components-chromium/paper-item/bower.json new file mode 100644 index 0000000..cf71cef --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-item", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/demo.html b/third_party/polymer/components-chromium/paper-item/demo.html new file mode 100644 index 0000000..2bf6108 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/demo.html @@ -0,0 +1,37 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>paper-item</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <script src="../platform/platform.js"></script> + <link href="../font-roboto/roboto.html" rel="import"> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="../core-menu/core-menu.html" rel="import"> + <link href="paper-item.html" rel="import"> + <style shim-shadowdom> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + } + + paper-item { + max-width: 320px; + } + </style> +</head> +<body unresolved> + <core-menu> + <paper-item icon="refresh" label="Item 1"></paper-item> + <paper-item label="Item 2"></paper-item> + <paper-item label="Item with a link"> + <a href="http://www.polymer-project.org" target="_self"></a> + </paper-item> + </core-menu> +</body> +</html>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/index.html b/third_party/polymer/components-chromium/paper-item/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-item/metadata.html b/third_party/polymer/components-chromium/paper-item/metadata.html new file mode 100644 index 0000000..eb16cdc --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/metadata.html @@ -0,0 +1,14 @@ +<x-meta id="paper-item" label="Item" group="Paper"> + + <template> + + <paper-item icon="settings" label="Item"></paper-item> + + </template> + + <template id="imports"> + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="paper-item.html"> + </template> + +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/paper-item-extracted.js b/third_party/polymer/components-chromium/paper-item/paper-item-extracted.js new file mode 100644 index 0000000..f52f052 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/paper-item-extracted.js @@ -0,0 +1,52 @@ + + Polymer('paper-item', { + + publish: { + + /** + * The label for the item. + * + * @attribute label + * @type string + * @default '' + */ + label: '', + + /** + * (optional) The URL of an image for an icon to use in the button. + * Should not use `icon` property if you are using this property. + * + * @attribute iconSrc + * @type string + * @default '' + */ + iconSrc: '', + + /** + * (optional) Specifies the icon name or index in the set of icons + * available in the icon set. If using this property, load the icon + * set separately where the icon is used. Should not use `src` + * if you are using this property. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '' + + }, + + eventDelegates: { + 'down': 'downAction', + 'up': 'upAction' + }, + + downAction: function(e) { + this.$.ripple.downAction(e); + }, + + upAction: function(e) { + this.$.ripple.upAction(e); + } + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-item/paper-item.css b/third_party/polymer/components-chromium/paper-item/paper-item.css new file mode 100644 index 0000000..d6a191e --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/paper-item.css @@ -0,0 +1,31 @@ +html /deep/ paper-item { + display: block; + position: relative; + -webkit-user-select: none; + user-select: none; + cursor: pointer; + height: 36px; + padding: 0 12px; + white-space: nowrap; +} + +html /deep/ paper-item::shadow #ripple { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + pointer-events: none; +} + +html /deep/ paper-item::shadow #icon { + margin-right: 8px; +} + +html /deep/ paper-item::shadow ::content > a { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} diff --git a/third_party/polymer/components-chromium/paper-item/paper-item.html b/third_party/polymer/components-chromium/paper-item/paper-item.html new file mode 100644 index 0000000..2e993b0 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-item/paper-item.html @@ -0,0 +1,54 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +@group Paper Elements + +`paper-item` is a list-item object for use in menus. It may contain and icon and/or +a text label. + +Example: + + <core-menu> + <paper-item icon="refresh" label="Refresh"></paper-item> + <paper-item label="Help"></paper-item> + <paper-item label="Sign Out"></paper-item> + </core-menu> + +To use as a link, put an `<a>` element in the item. + +Example: + + <paper-item icon="home" label="Home"> + <a href="http://www.polymer-project.org"></a> + </paper-item> + +@class paper-item +--> + +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-icon/core-icon.html" rel="import"> +<link href="../paper-ripple/paper-ripple.html" rel="import"> + +<link href="paper-item.css" rel="stylesheet" shim-shadowdom=""> + +<polymer-element name="paper-item" attributes="label iconSrc icon" center="" horizontal="" layout="" assetpath=""> + + <template> + + <paper-ripple id="ripple"></paper-ripple> + + <core-icon id="icon" hidden?="{{!iconSrc && !icon}}" src="{{iconSrc}}" icon="{{icon}}"></core-icon> + <div id="label">{{label}}</div> + <content></content> + </template> + + +</polymer-element> +<script src="paper-item-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/.bower.json b/third_party/polymer/components-chromium/paper-menu-button/.bower.json new file mode 100644 index 0000000..4f19c57 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/.bower.json @@ -0,0 +1,28 @@ +{ + "name": "paper-menu-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-animation": "Polymer/core-animation#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", + "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", + "paper-item": "Polymer/paper-item#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-menu-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "557515cf8419a3f22ded36ada44af9f37e4f1742" + }, + "_source": "git://github.com/Polymer/paper-menu-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-menu-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/README.md b/third_party/polymer/components-chromium/paper-menu-button/README.md new file mode 100644 index 0000000..aa0f3bf --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/README.md @@ -0,0 +1,4 @@ +paper-menu-button +================= + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-menu-button) for more information. diff --git a/third_party/polymer/components-chromium/paper-menu-button/bower.json b/third_party/polymer/components-chromium/paper-menu-button/bower.json new file mode 100644 index 0000000..8dfe0ac --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/bower.json @@ -0,0 +1,17 @@ +{ + "name": "paper-menu-button", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", + "core-animation": "Polymer/core-animation#>=0.3.0 <1.0.0", + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "core-menu": "Polymer/core-menu#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "core-transition": "Polymer/core-transition#>=0.3.0 <1.0.0", + "paper-focusable": "Polymer/paper-focusable#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", + "paper-item": "Polymer/paper-item#>=0.3.0 <1.0.0", + "paper-shadow": "Polymer/paper-shadow#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/demo.html b/third_party/polymer/components-chromium/paper-menu-button/demo.html new file mode 100644 index 0000000..ca65df4 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/demo.html @@ -0,0 +1,92 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>paper-menu-button</title> + <script src="../platform/platform.js"></script> + <link href="../core-icons/core-icons.html" rel="import"> + <link href="../paper-icon-button/paper-icon-button.html" rel="import"> + <link href="../paper-item/paper-item.html" rel="import"> + <link href="../paper-shadow/paper-shadow.html" rel="import"> + <link href="paper-menu-button.html" rel="import"> + <style> + body { + margin: 0; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-size: 14px; + background: #f7f7f7; + } + + .card { + background: #fff; + width: 320px; + height: 480px; + margin: 128px 96px; + border-radius: 3px; + } + + .toolbar { + background: #91a7ff; + position: relative; + padding: 0.5em; + border-radius: 3px 3px 0 0; + } + + .inner { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: -1; + } + + body /deep/ core-icon { + fill: #fff; + } + + body /deep/ paper-item::shadow core-icon { + fill: #000; + } + + core-icon { + fill: #fff; + } + + paper-item core-icon { + fill: #000; + } + + </style> +</head> +<body unresolved> + + <paper-shadow></paper-shadow> + + <div class="card paper-shadow-top-z-1"> + <div class="inner paper-shadow-bottom-z-1"></div> + <div layout horizontal class="toolbar paper-shadow-top-z-1"> + <div class="inner paper-shadow-bottom-z-1"></div> + <paper-menu-button icon="menu" halign="left"> + <paper-item label="Menu Item 1"></paper-item> + <paper-item label="Menu Item 2"></paper-item> + <paper-item label="Menu Item 3"></paper-item> + </paper-menu-button> + <div flex></div> + <paper-icon-button icon="search"></paper-icon-button> + <paper-menu-button icon="more-vert" halign="right" slow> + <paper-item label="Refresh"></paper-item> + <paper-item label="Send Feedback"></paper-item> + <paper-item label="Settings"></paper-item> + <paper-item label="Help"></paper-item> + <paper-item label="Sign Out"></paper-item> + </paper-menu-button> + </div> + </div> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-menu-button/index.html b/third_party/polymer/components-chromium/paper-menu-button/index.html new file mode 100644 index 0000000..f83dd36 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources="['paper-menu-button.html','paper-menu-button-overlay.html']"></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-menu-button/metadata.html b/third_party/polymer/components-chromium/paper-menu-button/metadata.html new file mode 100644 index 0000000..f9db2d6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/metadata.html @@ -0,0 +1,12 @@ +<x-meta id="paper-menu-button" label="Menu Button" isContainer> + <template> + <paper-menu-button icon="menu"> + <div>Menu Item 1</div> + <div>Menu Item 2</div> + <div>Menu Item 3</div> + </paper-menu-button> + </template> + <template id="imports"> + <link rel="import" href="paper-menu-button.html"> + </template> +</x-meta>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-extracted.js b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-extracted.js new file mode 100644 index 0000000..99c74aa --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-extracted.js @@ -0,0 +1,77 @@ +Polymer('paper-menu-button-overlay-container');; + + Polymer('paper-menu-button', { + + publish: { + + /** + * If true, this menu is currently visible. + * + * @attribute opened + * @type boolean + * @default false + */ + opened: { value: false, reflect: true }, + + /** + * The horizontal alignment of the pulldown menu relative to the button. + * + * @attribute halign + * @type 'left' | 'right' + * @default 'left' + */ + halign: { value: 'left', reflect: true }, + + /** + * The vertical alignment of the pulldown menu relative to the button. + * + * @attribute valign + * @type 'bottom' | 'top' + * @default 'top' + */ + valign: {value: 'top', reflect: true} + }, + + /** + * The URL of an image for the icon. Should not use `icon` property + * if you are using this property. + * + * @attribute src + * @type string + * @default '' + */ + src: '', + + /** + * Specifies the icon name or index in the set of icons available in + * the icon set. Should not use `src` property if you are using this + * property. + * + * @attribute icon + * @type string + * @default '' + */ + icon: '', + + slow: false, + + tapAction: function() { + if (this.disabled) { + return; + } + + this.super(); + this.toggle(); + }, + + /** + * Toggle the opened state of the menu. + * + * @method toggle + */ + toggle: function() { + this.opened = !this.opened; + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay-extracted.js b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay-extracted.js new file mode 100644 index 0000000..d4fac62 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay-extracted.js @@ -0,0 +1,62 @@ + + Polymer('paper-menu-button-overlay', { + + publish: { + + /** + * The `relatedTarget` is an element used to position the overlay, for example a + * button the user taps to show a menu. + * + * @attribute relatedTarget + * @type Element + */ + relatedTarget: null, + + /** + * The horizontal alignment of the overlay relative to the `relatedTarget`. + * + * @attribute halign + * @type 'left'|'right'|'center' + * @default 'left' + */ + halign: 'left' + + }, + + updateTargetDimensions: function() { + this.super(); + + var t = this.target; + this.target.cachedSize = t.getBoundingClientRect(); + }, + + positionTarget: function() { + if (this.relatedTarget) { + + var rect = this.relatedTarget.getBoundingClientRect(); + + if (this.halign === 'left') { + this.target.style.left = rect.left + 'px'; + } else if (this.halign === 'right') { + this.target.style.right = (window.innerWidth - rect.right) + 'px'; + } else { + this.target.style.left = (rect.left - (rect.width - this.target.cachedSize.width) / 2) + 'px'; + } + + if (this.valign === 'top') { + this.target.style.top = rect.top + 'px'; + } else if (this.valign === 'bottom') { + this.target.style.top = rect.bottom + 'px'; + } else { + this.target.style.top = rect.top + 'px'; + } + + // this.target.style.top = rect.top + 'px'; + + } else { + this.super(); + } + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay.html b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay.html new file mode 100644 index 0000000..36116c7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-overlay.html @@ -0,0 +1,27 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../core-overlay/core-overlay.html"> + +<!-- + +`paper-menu-button-overlay` is a helper class to position an overlay relative to another +element, e.g. the button with a pulldown menu. + +@group Paper Elements +@element paper-menu-button-overlay +@extends core-overlay +@homepage github.io +--> + +<polymer-element name="paper-menu-button-overlay" extends="core-overlay" attributes="relatedTarget halign valign" assetpath=""> + +</polymer-element> +<script src="paper-menu-button-overlay-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition-extracted.js b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition-extracted.js new file mode 100644 index 0000000..7382098 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition-extracted.js @@ -0,0 +1,92 @@ + + Polymer('paper-menu-button-transition', { + + baseClass: 'paper-menu-button-transition', + revealedClass: 'paper-menu-button-revealed', + openedClass: 'paper-menu-button-opened', + closedClass: 'paper-menu-button-closed', + + duration: 500, + + setup: function(node) { + this.super(arguments); + + var bg = node.querySelector('.paper-menu-button-overlay-bg'); + bg.style.transformOrigin = this.transformOrigin; + bg.style.webkitTransformOrigin = this.transformOrigin; + }, + + transitionOpened: function(node, opened) { + this.super(arguments); + + if (opened) { + if (this.player) { + this.player.cancel(); + } + + var anims = []; + + var ink = node.querySelector('.paper-menu-button-overlay-ink'); + var offset = 40 / Math.max(node.cachedSize.width, node.cachedSize.height); + anims.push(new Animation(ink, [{ + 'opacity': 0.9, + 'transform': 'scale(0)', + }, { + 'opacity': 0.9, + 'transform': 'scale(1)' + }], { + duration: this.duration * offset + })); + + var bg = node.querySelector('.paper-menu-button-overlay-bg'); + anims.push(new Animation(bg, [{ + 'opacity': 0.9, + 'transform': 'scale(' + 40 / node.cachedSize.width + ',' + 40 / node.cachedSize.height + ')', + }, { + 'opacity': 1, + 'transform': 'scale(0.95, 0.5)' + }, { + 'opacity': 1, + 'transform': 'scale(1, 1)' + }], { + delay: this.duration * offset, + duration: this.duration * (1 - offset), + fill: 'forwards' + })); + + var nodes = window.ShadowDOMPolyfill ? Platform.queryAllShadows(node.querySelector('core-menu'), 'content').getDistributedNodes() : node.querySelector('core-menu::shadow content').getDistributedNodes().array(); + var items = nodes.filter(function(n) { + return n.nodeType === Node.ELEMENT_NODE; + }); + var itemDelay = offset + (1 - offset) / 2; + var itemDuration = this.duration * (1 - itemDelay) / items.length; + items.forEach(function(item, i) { + anims.push(new Animation(item, [{ + 'opacity': 0 + }, { + 'opacity': 1 + }], { + delay: this.duration * itemDelay + itemDuration * i, + duration: itemDuration, + fill: 'both' + })); + }.bind(this)); + + var shadow = node.querySelector('paper-shadow'); + anims.push(new Animation(shadow, function(t, target) { + if (t > offset * 2 && shadow.z === 0) { + shadow.z = 1 + } + }, { + duration: this.duration + })); + + var group = new AnimationGroup(anims, { + easing: 'cubic-bezier(0.4, 0, 0.2, 1)' + }); + this.player = document.timeline.play(group); + } + }, + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.css b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.css new file mode 100644 index 0000000..6d1ba6e --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.css @@ -0,0 +1,19 @@ +/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ + +:host(.paper-menu-button-transition) { + outline: none; + opacity: 0; + transition: transform 0.2s ease-in-out, opacity 0.2s ease-in; + -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in; +} + +:host(.paper-menu-button-transition.paper-menu-button-opened) { + opacity: 1; + transform: none; + -webkit-transform: none; +} diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.html b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.html new file mode 100644 index 0000000..7aead3b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button-transition.html @@ -0,0 +1,28 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +@group Paper Elements +@class paper-menu-button-transition +@extends core-transition-css +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-transition/core-transition-css.html" rel="import"> +<link href="../core-animation/web-animations.html" rel="import"> + +<polymer-element name="paper-menu-button-transition" extends="core-transition-css" attributes="duration transformOrigin" assetpath=""> + <template> + <link no-shim="" href="paper-menu-button-transition.css" rel="stylesheet"> + </template> + +</polymer-element> + +<paper-menu-button-transition id="paper-menu-button-transition-top-left" transformorigin="0% 0%"></paper-menu-button-transition> +<paper-menu-button-transition id="paper-menu-button-transition-top-right" transformorigin="100% 0%"></paper-menu-button-transition> +<paper-menu-button-transition id="paper-menu-button-transition-top-right-slow" transformorigin="100% 0%" duration="10000"></paper-menu-button-transition> +<script src="paper-menu-button-transition-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.css b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.css new file mode 100644 index 0000000..62971c7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.css @@ -0,0 +1,86 @@ +/* +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +*/ + +:host { + display: inline-block; + padding: 8px; + position: relative; + background-image: none; + outline: none; + user-select: none; + -webkit-user-select: none; + cursor: pointer; + overflow: hidden; +} + +:host([disabled]) { + cursor: auto; +} + +core-icon { + position: relative; +} + +core-icon::shadow svg { + transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transform-origin: 50% 50%; + -webkit-transform-origin: 50% 50%; +} + +:host(:hover) core-icon::shadow svg { + transform: scale(1.2); + -webkit-transform: scale(1.2); +} + +:host([disabled]:hover) core-icon::shadow svg { + transform: none; + -webkit-transform: none; +} + +:host([disabled]) core-icon::shadow path { + fill: #c9c9c9; +} + +#overlay { + display: block; + position: fixed; + border-radius: 3px; +} + +.paper-menu-button-overlay-ink { + position: absolute; + top: 0; + left: 0; + width: 40px; + height: 40px; + border-radius: 20px; + background: #fff; + opacity: 0; + transform: scale(0); + -webkit-transform: scale(0); +} + +:host([halign="right"]) .paper-menu-button-overlay-ink { + left: auto; + right: 0; +} + +.paper-menu-button-overlay-bg { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + border-radius: 3px; + background: #fff; + opacity: 0; +} + +#menu { + position: relative; + margin: 0; +} diff --git a/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.html b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.html new file mode 100644 index 0000000..c1df754 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-menu-button/paper-menu-button.html @@ -0,0 +1,54 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!-- +A `paper-menu-button` is a `paper-icon-button` that opens a drop down menu when tapped. + +Example: + + <paper-menu-button icon="menu"> + <div>Menu Item 1</div> + <div>Menu Item 2</div> + <div>Menu Item 3</div> + </paper-menu-button> + + @group Paper Elements + @element paper-menu-button + @extends paper-focusable +--> +<link href="../polymer/polymer.html" rel="import"> +<link href="../core-icon/core-icon.html" rel="import"> +<link href="../core-menu/core-menu.html" rel="import"> +<link href="../paper-focusable/paper-focusable.html" rel="import"> +<link href="../paper-shadow/paper-shadow.html" rel="import"> +<link href="paper-menu-button-overlay.html" rel="import"> +<link href="paper-menu-button-transition.html" rel="import"> + +<polymer-element name="paper-menu-button-overlay-container" assetpath=""> +<template> + <content></content> +</template> +</polymer-element> + +<polymer-element name="paper-menu-button" extends="paper-focusable" attributes="src icon opened halign valign slow" on-tap="{{tapAction}}" assetpath=""> + <template> + <link rel="stylesheet" href="paper-menu-button.css"> + <paper-menu-button-overlay target="{{$.overlay}}" relatedtarget="{{}}" halign="{{halign}}" valign="{{valign}}" opened="{{opened}}" transition="paper-menu-button-transition-top-{{halign}}{{slow ? '-slow' : ''}}"></paper-menu-button-overlay> + <paper-menu-button-overlay-container id="overlay"> + <paper-shadow target="{{$.overlayBg}}" z="0" hasposition=""></paper-shadow> + <div class="paper-menu-button-overlay-ink"></div> + <div id="overlayBg" class="paper-menu-button-overlay-bg"></div> + <core-menu id="menu"> + <content></content> + </core-menu> + </paper-menu-button-overlay-container> + <core-icon src="{{src}}" icon="{{icon}}"></core-icon> + </template> + +</polymer-element> +<script src="paper-menu-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-progress/.bower.json b/third_party/polymer/components-chromium/paper-progress/.bower.json new file mode 100644 index 0000000..b87b3e8 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "paper-progress", + "private": true, + "dependencies": { + "core-range": "Polymer/core-range#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-progress", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "33d780253eb4d3ba916cfd4b27f614228ef5e0fb" + }, + "_source": "git://github.com/Polymer/paper-progress.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-progress" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-progress/README.md b/third_party/polymer/components-chromium/paper-progress/README.md new file mode 100644 index 0000000..549e768 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/README.md @@ -0,0 +1,4 @@ +paper-progress +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-progress) for more information. diff --git a/third_party/polymer/components-chromium/paper-progress/bower.json b/third_party/polymer/components-chromium/paper-progress/bower.json new file mode 100644 index 0000000..3d1ab87 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/bower.json @@ -0,0 +1,8 @@ +{ + "name": "paper-progress", + "private": true, + "dependencies": { + "core-range": "Polymer/core-range#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-progress/demo.html b/third_party/polymer/components-chromium/paper-progress/demo.html new file mode 100644 index 0000000..7a17bea --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/demo.html @@ -0,0 +1,98 @@ +<!doctype html> +<html> +<head> + <title>paper-progress</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-progress.html"> + <link rel="import" href="../paper-button/paper-button.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + } + + paper-progress { + display: block; + width: 100%; + padding: 25px 0; + } + + paper-progress.pink::shadow #activeProgress { + background-color: #e91e63; + } + + paper-progress.pink::shadow #secondaryProgress { + background-color: #f8bbd0; + } + + </style> + +</head> +<body unresolved> + + <paper-progress></paper-progress> + + <paper-button raisedButton label="Start" onclick="startProgress();"></paper-button> + + <br><br><br> + + <paper-progress value="40"></paper-progress><br> + + <paper-progress value="800" min="100" max="1000"></paper-progress><br> + + <paper-progress value="40" secondaryProgress="80"></paper-progress><br> + + <paper-progress value="200" max="200"></paper-progress><br> + + <paper-progress class="pink" value="80"></paper-progress><br> + + <paper-progress class="pink" value="40" secondaryProgress="80"></paper-progress> + + <script> + + var progress = document.querySelector('paper-progress'); + var button = document.querySelector('paper-button'); + + var repeat, maxRepeat = 5, animating = false; + + function nextProgress() { + animating = true; + if (progress.value < progress.max) { + progress.value += (progress.step || 1); + } else { + if (++repeat >= maxRepeat) { + animating = false; + button.disabled = false; + return; + } + progress.value = progress.min; + } + progress.async(nextProgress); + } + + function startProgress() { + repeat = 0; + progress.value = progress.min; + button.disabled = true; + if (!animating) { + nextProgress(); + } + } + + addEventListener('polymer-ready', function() { + startProgress(); + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-progress/index.html b/third_party/polymer/components-chromium/paper-progress/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-progress/metadata.html b/third_party/polymer/components-chromium/paper-progress/metadata.html new file mode 100644 index 0000000..95148c7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-progress" label="Progress" group="Paper"> + <template> + <paper-progress></paper-progress> + </template> + <template id="imports"> + <link rel="import" href="paper-progress.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-progress/paper-progress-extracted.js b/third_party/polymer/components-chromium/paper-progress/paper-progress-extracted.js new file mode 100644 index 0000000..afff824 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/paper-progress-extracted.js @@ -0,0 +1,28 @@ + + + Polymer('paper-progress', { + + /** + * The number that represents the current secondary progress. + * + * @attribute secondaryProgress + * @type number + * @default 0 + */ + secondaryProgress: 0, + + step: 0, + + observe: { + 'value secondaryProgress min max': 'update' + }, + + update: function() { + this.super(); + this.secondaryProgress = this.clampValue(this.secondaryProgress); + this.secondaryRatio = this.calcRatio(this.secondaryProgress) * 100; + } + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-progress/paper-progress.css b/third_party/polymer/components-chromium/paper-progress/paper-progress.css new file mode 100644 index 0000000..7c03daa --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/paper-progress.css @@ -0,0 +1,35 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block; + width: 200px; + height: 4px; +} + +#progressContainer { + position: relative; + height: 100%; + background-color: #c8c8c8; +} + +#activeProgress, #secondaryProgress { + position: absolute; + top: 0; + left: 0; + bottom: 0; +} + +#activeProgress { + background-color: #0f9d58; +} + +#secondaryProgress { + background-color: #87ceac; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-progress/paper-progress.html b/third_party/polymer/components-chromium/paper-progress/paper-progress.html new file mode 100644 index 0000000..ea82e17 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-progress/paper-progress.html @@ -0,0 +1,72 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The progress bars are for situations where the percentage completed can be +determined. They give users a quick sense of how much longer an operation +will take. + +Example: + + <paper-progress value="10"></paper-progress> + +There is also a secondary progress which is useful for displaying intermediate +progress, such as the buffer level during a streaming playback progress bar. + +Example: + + <paper-progress value="10" secondaryProgesss="30"></paper-progress> + +Styling progress bar: + +To change the active progress bar color: + + paper-progress::shadow #activeProgress { + background-color: #e91e63; + } + +To change the secondary progress bar color: + + paper-progress::shadow #secondaryProgress { + background-color: #f8bbd0; + } + +To change the progress bar background color: + + paper-progress::shadow #progressContainer { + background-color: #64ffda; + } + +@group Paper Elements +@element paper-progress +@extends core-range +@homepage github.io +--> + +<link rel="import" href="../core-range/core-range.html"> + +<polymer-element name="paper-progress" extends="core-range" attributes="secondaryProgress" assetpath=""> + + <template> + + <link rel="stylesheet" href="paper-progress.css"> + + <div id="progressContainer" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="{{min}}" aria-valuemax="{{max}}"> + + <div id="secondaryProgress" style="width: {{secondaryRatio}}%;"></div> + <div id="activeProgress" style="width: {{ratio}}%;"></div> + + </div> + + </template> + + + +</polymer-element> +<script src="paper-progress-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-button/.bower.json b/third_party/polymer/components-chromium/paper-radio-button/.bower.json new file mode 100644 index 0000000..c4afd55 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "paper-radio-button", + "private": true, + "dependencies": { + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-radio-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "bc1a5899421351b4c4a5d3b1296951c09de5cca8" + }, + "_source": "git://github.com/Polymer/paper-radio-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-radio-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-button/README.md b/third_party/polymer/components-chromium/paper-radio-button/README.md new file mode 100644 index 0000000..79b1009c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/README.md @@ -0,0 +1,4 @@ +paper-radio-button +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-radio-button) for more information. diff --git a/third_party/polymer/components-chromium/paper-radio-button/bower.json b/third_party/polymer/components-chromium/paper-radio-button/bower.json new file mode 100644 index 0000000..0aaca42 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/bower.json @@ -0,0 +1,7 @@ +{ + "name": "paper-radio-button", + "private": true, + "dependencies": { + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-button/demo.html b/third_party/polymer/components-chromium/paper-radio-button/demo.html new file mode 100644 index 0000000..837a88e --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/demo.html @@ -0,0 +1,66 @@ +<!doctype html> +<html> +<head> + <title>paper-radio-button</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-radio-button.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + .label { + height: 40px; + color: #4285f4; + font-size: 20px; + } + + section, paper-radio-button { + padding: 20px; + } + + paper-radio-button.blue::shadow #ink[checked] { + color: #4285f4; + } + + paper-radio-button.blue::shadow #onRadio { + background-color: #4285f4; + } + + </style> + +</head> +<body unresolved> + + <section> + <div class="label">Radio button</div> + <paper-radio-button></paper-radio-button> + </section> + + <section> + <div class="label">Radio button (toggles)</div> + <paper-radio-button toggles></paper-radio-button> + </section> + + <section> + <div class="label">Radio button (toggles, Blue)</div> + <paper-radio-button class="blue" toggles></paper-radio-button> + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-radio-button/index.html b/third_party/polymer/components-chromium/paper-radio-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-radio-button/metadata.html b/third_party/polymer/components-chromium/paper-radio-button/metadata.html new file mode 100644 index 0000000..4c92b3e --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-radio-button" label="Radio Button" group="Paper"> + <template> + <paper-radio-button label="Radio Button"></paper-radio-button><br> + </template> + <template id="imports"> + <link rel="import" href="paper-radio-button.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button-extracted.js b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button-extracted.js new file mode 100644 index 0000000..2e066ed --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button-extracted.js @@ -0,0 +1,75 @@ + + + Polymer('paper-radio-button', { + + /** + * Fired when the checked state changes. + * + * @event change + */ + + publish: { + /** + * Gets or sets the state, `true` is checked and `false` is unchecked. + * + * @attribute checked + * @type boolean + * @default false + */ + checked: {value: false, reflect: true}, + + /** + * The label for the radio button. + * + * @attribute label + * @type string + * @default '' + */ + label: '', + + /** + * Normally the user cannot uncheck the radio button by tapping once + * checked. Setting this property to `true` makes the radio button + * toggleable from checked to unchecked. + * + * @attribute toggles + * @type boolean + * @default false + */ + toggles: false, + + /** + * If true, the user cannot interact with this element. + * + * @attribute disabled + * @type boolean + * @default false + */ + disabled: {value: false, reflect: true} + }, + + eventDelegates: { + tap: 'tap' + }, + + tap: function() { + this.toggle(); + this.fire('paper-radio-button-activate'); + }, + + toggle: function() { + this.checked = !this.toggles || !this.checked; + }, + + checkedChanged: function() { + this.$.onRadio.classList.toggle('fill', this.checked); + this.setAttribute('aria-checked', this.checked ? 'true': 'false'); + this.fire('change'); + }, + + labelChanged: function() { + this.setAttribute('aria-label', this.label); + } + + }); + diff --git a/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.css b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.css new file mode 100644 index 0000000..9f91f08 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.css @@ -0,0 +1,98 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block; + white-space: nowrap; +} + +:host(:focus) { + outline: none; +} + +#radioContainer { + position: relative; + width: 16px; + height: 16px; + cursor: pointer; +} + +#radioContainer.labeled { + display: inline-block; + vertical-align: middle; +} + +#ink { + position: absolute; + top: -16px; + left: -16px; + width: 48px; + height: 48px; + color: #5a5a5a; +} + +#ink[checked] { + color: #0f9d58; +} + +#offRadio { + position: absolute; + top: 0px; + left: 0px; + width: 12px; + height: 12px; + border-radius: 50%; + border: solid 2px; + border-color: #5a5a5a; +} + +#onRadio { + position: absolute; + top: 0; + left: 0; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #0f9d58; + -webkit-transform: scale(0); + transform: scale(0); + transition: -webkit-transform ease 0.28s; + transition: transform ease 0.28s; +} + +#onRadio.fill { + -webkit-transform: scale(1.1); + transform: scale(1.1); +} + +#radioLabel { + position: relative; + display: inline-block; + vertical-align: middle; + margin-left: 10px; + white-space: normal; + pointer-events: none; +} + +#radioLabel[hidden] { + display: none; +} + +/* disabled state */ +:host([disabled]) { + pointer-events: none; +} + +:host([disabled]) #offRadio { + border-color: #eaeaea !important; +} + +:host([disabled]) #onRadio { + background-color: #eaeaea !important; +} diff --git a/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.html b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.html new file mode 100644 index 0000000..3fe4bff --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-button/paper-radio-button.html @@ -0,0 +1,74 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-radio-button` is a button that can be either checked or unchecked. +User can tap the radio button to check it. But it cannot be unchecked by +tapping once checked. + +Use `paper-radio-group` to group a set of radio buttons. When radio buttons +are inside a radio group, only one radio button in the group can be checked. + +Example: + + <paper-radio-button></paper-radio-button> + +Styling radio button: + +To change the ink color for checked state: + + paper-radio-button::shadow #ink[checked] { + color: #4285f4; + } + +To change the radio checked color: + + paper-radio-button::shadow #onRadio { + background-color: #4285f4; + } + +To change the ink color for unchecked state: + + paper-radio-button::shadow #ink { + color: #b5b5b5; + } + +To change the radio unchecked color: + + paper-radio-button::shadow #offRadio { + border-color: #b5b5b5; + } + +@group Paper Elements +@element paper-radio-button +@homepage github.io +--> + +<link rel="import" href="../paper-ripple/paper-ripple.html"> + +<polymer-element name="paper-radio-button" role="radio" tabindex="0" aria-checked="false" assetpath=""> +<template> + + <link rel="stylesheet" href="paper-radio-button.css"> + + <div id="radioContainer" class="{{ {labeled: label} | tokenList }}"> + + <div id="offRadio"></div> + <div id="onRadio"></div> + + <paper-ripple id="ink" class="circle recenteringTouch" checked?="{{!checked}}"></paper-ripple> + + </div> + + <div id="radioLabel" aria-hidden="true" hidden?="{{!label}}">{{label}}<content></content></div> + +</template> + +</polymer-element> +<script src="paper-radio-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-group/.bower.json b/third_party/polymer/components-chromium/paper-radio-group/.bower.json new file mode 100644 index 0000000..e04aecd --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-radio-group", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-radio-group", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "a825edbfcd397ea04b4921eb4636f8e697b8cb4b" + }, + "_source": "git://github.com/Polymer/paper-radio-group.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-radio-group" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-group/README.md b/third_party/polymer/components-chromium/paper-radio-group/README.md new file mode 100644 index 0000000..1024a7b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/README.md @@ -0,0 +1,4 @@ +paper-radio-group +================= + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-radio-group) for more information. diff --git a/third_party/polymer/components-chromium/paper-radio-group/bower.json b/third_party/polymer/components-chromium/paper-radio-group/bower.json new file mode 100644 index 0000000..d0fd455 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-radio-group", + "private": true, + "dependencies": { + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-group/demo.html b/third_party/polymer/components-chromium/paper-radio-group/demo.html new file mode 100644 index 0000000..07625e5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/demo.html @@ -0,0 +1,74 @@ +<!doctype html> +<html> +<head> + <title>paper-radio-group</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-radio-group.html"> + <link rel="import" href="../font-roboto/roboto.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + section { + xpadding: 20px; + xbackground-color: #f0f0f0; + } + + paper-radio-group.blue paper-radio-button::shadow #ink[checked] { + color: #4285f4; + } + + paper-radio-group.blue paper-radio-button::shadow #onRadio { + background-color: #4285f4; + } + + </style> + +</head> +<body unresolved> + + <section> + + <h4>Keep Wi-Fi on during sleep</h4> + + <paper-radio-group selected="2"> + <paper-radio-button label="Always"></paper-radio-button><br> + <paper-radio-button label="Only when plugged in"></paper-radio-button><br> + <paper-radio-button label="Never"></paper-radio-button> + </paper-radio-group> + + </section> + + <br> + + <section> + + <h4>Wi-Fi frequency band</h4> + + <paper-radio-group class="blue" selected="0"> + <paper-radio-button label="Auto"></paper-radio-button><br> + <paper-radio-button label="5 GHz only"></paper-radio-button><br> + <paper-radio-button label="2.4 GHz only"></paper-radio-button> + </paper-radio-group> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-radio-group/index.html b/third_party/polymer/components-chromium/paper-radio-group/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-radio-group/metadata.html b/third_party/polymer/components-chromium/paper-radio-group/metadata.html new file mode 100644 index 0000000..590071c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/metadata.html @@ -0,0 +1,13 @@ +<x-meta id="paper-radio-group" label="Radio Group" isContainer group="Paper"> + <template> + <paper-radio-group selected="Small" valueattr="label"> + <paper-radio-button label="Small"></paper-radio-button> + <paper-radio-button label="Medium"></paper-radio-button> + <paper-radio-button label="Large"></paper-radio-button> + </paper-radio-group> + </template> + <template id="imports"> + <link rel="import" href="paper-radio-group.html"> + <link rel="import" href="../paper-radio-button/paper-radio-button.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group-extracted.js b/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group-extracted.js new file mode 100644 index 0000000..fdd6049 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group-extracted.js @@ -0,0 +1,10 @@ + + + Polymer('paper-radio-group', { + + selectedAttribute: 'checked', + activateEvent: 'paper-radio-button-activate' + + }); + +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group.html b/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group.html new file mode 100644 index 0000000..ab905e2 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-radio-group/paper-radio-group.html @@ -0,0 +1,60 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-radio-group` allows user to select only one radio button from a set. +Checking one radio button that belongs to a radio group unchecks any +previously checked radio button within the same group. Use +`selected` to get or set the selected radio button. + +Example: + + <paper-radio-group selected="small"> + <paper-radio-button name="small" label="Small"></paper-radio-button> + <paper-radio-button name="medium" label="Medium"></paper-radio-button> + <paper-radio-button name="large" label="Large"></paper-radio-button> + </paper-radio-group> + +See <a href="../paper-radio-button/">paper-radio-button</a> for more +information about `paper-radio-button`. + +@group Paper Elements +@element paper-radio-group +@extends core-selector +@homepage github.io +--> + +<link rel="import" href="../core-selector/core-selector.html"> +<link rel="import" href="../paper-radio-button/paper-radio-button.html"> + +<polymer-element name="paper-radio-group" extends="core-selector" role="radiogroup" assetpath=""> + + <template> + + <style> + + :host { + display: inline-block; + } + + polyfill-next-selector { content: ':host > *'; } + ::content > * { + padding: 12px; + } + + </style> + + <shadow></shadow> + + </template> + + + +</polymer-element> +<script src="paper-radio-group-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-ripple/.bower.json b/third_party/polymer/components-chromium/paper-ripple/.bower.json new file mode 100644 index 0000000..6e3121b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-ripple", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-ripple", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "1f1773cf275eec867a04e1f8a5ea6f97e4648dbd" + }, + "_source": "git://github.com/Polymer/paper-ripple.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-ripple" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-ripple/README.md b/third_party/polymer/components-chromium/paper-ripple/README.md new file mode 100644 index 0000000..a4ca437 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/README.md @@ -0,0 +1,4 @@ +paper-ripple +============ + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-ripple) for more information. diff --git a/third_party/polymer/components-chromium/paper-ripple/bower.json b/third_party/polymer/components-chromium/paper-ripple/bower.json new file mode 100644 index 0000000..590723f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-ripple", + "private": true, + "dependencies": { + "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0", + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-ripple/demo.html b/third_party/polymer/components-chromium/paper-ripple/demo.html new file mode 100644 index 0000000..baef84f --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/demo.html @@ -0,0 +1,409 @@ +<!doctype html> +<html> +<head> + <title>paper-ripple</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="paper-ripple.html"> + <link rel="import" href="../font-roboto/roboto.html"> + <link rel="import" href="../core-icon/core-icon.html"> + + <style shim-shadowdom> + + body { + background-color: #f9f9f9; + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + section { + padding: 30px 25px; + } + + section > * { + margin: 10px + } + + /* Button */ + .button { + display: inline-block; + position: relative; + width: 120px; + height: 32px; + line-height: 32px; + border-radius: 2px; + font-size: 0.9em; + background-color: #fff; + color: #646464; + } + + .button > paper-ripple { + border-radius: 2px; + overflow: hidden; + } + + .button.narrow { + width: 60px; + } + + .button.grey { + background-color: #eee; + } + + .button.blue { + background-color: #4285f4; + color: #fff; + } + + .button.green { + background-color: #0f9d58; + color: #fff; + } + + .button.raised { + transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition-delay: 0.2s; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + } + + .button.raised:active { + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); + transition-delay: 0s; + } + + /* Icon Button */ + .icon-button { + position: relative; + display: inline-block; + width: 56px; + height: 56px; + } + + .icon-button > core-icon { + margin: 16px; + transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); + } + + .icon-button:hover > core-icon { + -webkit-transform: scale(1.2); + transform: scale(1.2); + } + + .icon-button > paper-ripple { + overflow: hidden; + color: #646464; + } + + .icon-button.red > core-icon::shadow path { + fill: #db4437; + } + + .icon-button.red > paper-ripple { + color: #db4437; + } + + .icon-button.blue > core-icon::shadow path { + fill: #4285f4; + } + + .icon-button.blue > paper-ripple { + color: #4285f4; + } + + /* FAB */ + .fab { + position: relative; + display: inline-block; + width: 56px; + height: 56px; + border-radius: 50%; + color: #fff; + overflow: hidden; + transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1); + transition-delay: 0.2s; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + } + + .fab.red { + background-color: #d23f31; + } + + .fab.blue { + background-color: #4285f4; + } + + .fab.green { + background-color: #0f9d58; + } + + .fab:active { + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); + transition-delay: 0s; + } + + .fab > core-icon { + margin: 16px; + } + + .fab > core-icon::shadow path { + fill: #fff; + } + + /* Menu */ + .menu { + display: inline-block; + width: 180px; + background-color: #fff; + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); + } + + .item { + position: relative; + height: 48px; + line-height: 48px; + color: #646464; + font-size: 0.9em; + } + + .menu.blue > .item { + color: #4285f4; + } + + /* Card, Dialog */ + .card, .dialog { + position: relative; + display: inline-block; + width: 300px; + height: 240px; + vertical-align: top; + background-color: #fff; + box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); + } + + .dialog { + box-sizing: border-box; + padding: 16px; + } + + .dialog > .content { + height: 170px; + font-size: 0.9em; + } + + .dialog > .content > .title { + font-size: 1.3em; + } + + .dialog > .button { + width: 90px; + float: right; + } + + .card.image { + background: url(http://lorempixel.com/300/240/nature/); + color: #fff; + } + + /* Misc */ + .center { + text-align: center; + } + + .label { + padding: 0 16px; + } + + .label-blue { + color: #4285f4; + } + + .label-red { + color: #d23f31; + } + + </style> + +</head> +<body unresolved> + + <section> + + <div class="button raised"> + <div class="center" fit>SUBMIT</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button raised grey"> + <div class="center" fit>CANCEL</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button raised blue"> + <div class="center" fit>COMPOSE</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button raised green"> + <div class="center" fit>OK</div> + <paper-ripple fit></paper-ripple> + </div> + + </section> + + <section> + + <div class="button raised grey narrow"> + <div class="center" fit>+1</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button raised grey narrow label-blue"> + <div class="center" fit>+1</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button raised grey narrow label-red"> + <div class="center" fit>+1</div> + <paper-ripple fit></paper-ripple> + </div> + + </section> + + <section> + + <div class="icon-button"> + <core-icon icon="menu"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + <div class="icon-button"> + <core-icon icon="more-vert"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + <div class="icon-button red"> + <core-icon icon="delete"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + <div class="icon-button blue"> + <core-icon icon="account-box"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + </section> + + <section> + + <div class="fab red"> + <core-icon icon="add"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + <div class="fab blue"> + <core-icon icon="mail"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + <div class="fab green"> + <core-icon icon="create"></core-icon> + <paper-ripple class="circle recenteringTouch" fit></paper-ripple> + </div> + + </section> + + <section> + + <div class="menu"> + + <div class="item"> + <div class="label" fit>Mark as unread</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Mark as important</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Add to Tasks</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Create event</div> + <paper-ripple fit></paper-ripple> + </div> + + </div> + + <div class="menu blue"> + + <div class="item"> + <div class="label" fit>Import</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Export</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Print</div> + <paper-ripple fit></paper-ripple> + </div> + <div class="item"> + <div class="label" fit>Restore contacts</div> + <paper-ripple fit></paper-ripple> + </div> + + </div> + + </section> + + <section> + + <div class="dialog"> + + <div class="content"> + <div class="title">Permission</div><br> + <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</div> + </div> + + <div class="button label-blue"> + <div class="center" fit>ACCEPT</div> + <paper-ripple fit></paper-ripple> + </div> + + <div class="button"> + <div class="center" fit>DECLINE</div> + <paper-ripple fit></paper-ripple> + </div> + + </div> + + <div class="card"> + + <paper-ripple class="recenteringTouch" fit></paper-ripple> + + </div> + + <div class="card image"> + + <paper-ripple class="recenteringTouch" fit></paper-ripple> + + </div> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-ripple/index.html b/third_party/polymer/components-chromium/paper-ripple/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-ripple/metadata.html b/third_party/polymer/components-chromium/paper-ripple/metadata.html new file mode 100644 index 0000000..565ad23 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="paper-ripple" label="Ripple" group="Paper"> + + <template> + <paper-ripple style="width: 300px; height: 300px;"></paper-ripple> + </template> + + <template id="imports"> + <link rel="import" href="paper-ripple.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-ripple/paper-ripple-extracted.js b/third_party/polymer/components-chromium/paper-ripple/paper-ripple-extracted.js new file mode 100644 index 0000000..f3458e4 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/paper-ripple-extracted.js @@ -0,0 +1,338 @@ + + + (function() { + + var waveMaxRadius = 150; + // + // INK EQUATIONS + // + function waveRadiusFn(touchDownMs, touchUpMs, anim) { + // Convert from ms to s. + var touchDown = touchDownMs / 1000; + var touchUp = touchUpMs / 1000; + var totalElapsed = touchDown + touchUp; + var ww = anim.width, hh = anim.height; + // use diagonal size of container to avoid floating point math sadness + var waveRadius = Math.min(Math.sqrt(ww * ww + hh * hh), waveMaxRadius) * 1.1 + 5; + var duration = 1.1 - .2 * (waveRadius / waveMaxRadius); + var tt = (totalElapsed / duration); + + var size = waveRadius * (1 - Math.pow(80, -tt)); + return Math.abs(size); + } + + function waveOpacityFn(td, tu, anim) { + // Convert from ms to s. + var touchDown = td / 1000; + var touchUp = tu / 1000; + var totalElapsed = touchDown + touchUp; + + if (tu <= 0) { // before touch up + return anim.initialOpacity; + } + return Math.max(0, anim.initialOpacity - touchUp * anim.opacityDecayVelocity); + } + + function waveOuterOpacityFn(td, tu, anim) { + // Convert from ms to s. + var touchDown = td / 1000; + var touchUp = tu / 1000; + + // Linear increase in background opacity, capped at the opacity + // of the wavefront (waveOpacity). + var outerOpacity = touchDown * 0.3; + var waveOpacity = waveOpacityFn(td, tu, anim); + return Math.max(0, Math.min(outerOpacity, waveOpacity)); + } + + // Determines whether the wave should be completely removed. + function waveDidFinish(wave, radius, anim) { + var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp, anim); + // If the wave opacity is 0 and the radius exceeds the bounds + // of the element, then this is finished. + if (waveOpacity < 0.01 && radius >= Math.min(wave.maxRadius, waveMaxRadius)) { + return true; + } + return false; + }; + + function waveAtMaximum(wave, radius, anim) { + var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp, anim); + if (waveOpacity >= anim.initialOpacity && radius >= Math.min(wave.maxRadius, waveMaxRadius)) { + return true; + } + return false; + } + + // + // DRAWING + // + function drawRipple(ctx, x, y, radius, innerColor, outerColor) { + if (outerColor) { + ctx.fillStyle = outerColor; + ctx.fillRect(0,0,ctx.canvas.width, ctx.canvas.height); + } + ctx.beginPath(); + ctx.arc(x, y, radius, 0, 2 * Math.PI, false); + ctx.fillStyle = innerColor; + ctx.fill(); + } + + // + // SETUP + // + function createWave(elem) { + var elementStyle = window.getComputedStyle(elem); + var fgColor = elementStyle.color; + + var wave = { + waveColor: fgColor, + maxRadius: 0, + isMouseDown: false, + mouseDownStart: 0.0, + mouseUpStart: 0.0, + tDown: 0, + tUp: 0 + }; + return wave; + } + + function removeWaveFromScope(scope, wave) { + if (scope.waves) { + var pos = scope.waves.indexOf(wave); + scope.waves.splice(pos, 1); + } + }; + + // Shortcuts. + var pow = Math.pow; + var now = Date.now; + if (window.performance && performance.now) { + now = performance.now.bind(performance); + } + + function cssColorWithAlpha(cssColor, alpha) { + var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); + if (typeof alpha == 'undefined') { + alpha = 1; + } + if (!parts) { + return 'rgba(255, 255, 255, ' + alpha + ')'; + } + return 'rgba(' + parts[1] + ', ' + parts[2] + ', ' + parts[3] + ', ' + alpha + ')'; + } + + function dist(p1, p2) { + return Math.sqrt(pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2)); + } + + function distanceFromPointToFurthestCorner(point, size) { + var tl_d = dist(point, {x: 0, y: 0}); + var tr_d = dist(point, {x: size.w, y: 0}); + var bl_d = dist(point, {x: 0, y: size.h}); + var br_d = dist(point, {x: size.w, y: size.h}); + return Math.max(tl_d, tr_d, bl_d, br_d); + } + + Polymer('paper-ripple', { + + /** + * The initial opacity set on the wave. + * + * @attribute initialOpacity + * @type number + * @default 0.25 + */ + initialOpacity: 0.25, + + /** + * How fast (opacity per second) the wave fades out. + * + * @attribute opacityDecayVelocity + * @type number + * @default 0.8 + */ + opacityDecayVelocity: 0.8, + + backgroundFill: true, + pixelDensity: 2, + + eventDelegates: { + down: 'downAction', + up: 'upAction' + }, + + attached: function() { + // create the canvas element manually becase ios + // does not render the canvas element if it is not created in the + // main document (component templates are created in a + // different document). See: + // https://bugs.webkit.org/show_bug.cgi?id=109073. + if (!this.$.canvas) { + var canvas = document.createElement('canvas'); + canvas.id = 'canvas'; + this.shadowRoot.appendChild(canvas); + this.$.canvas = canvas; + } + }, + + ready: function() { + this.waves = []; + }, + + setupCanvas: function() { + this.$.canvas.setAttribute('width', this.$.canvas.clientWidth * this.pixelDensity + "px"); + this.$.canvas.setAttribute('height', this.$.canvas.clientHeight * this.pixelDensity + "px"); + var ctx = this.$.canvas.getContext('2d'); + ctx.scale(this.pixelDensity, this.pixelDensity); + if (!this._loop) { + this._loop = this.animate.bind(this, ctx); + } + }, + + downAction: function(e) { + this.setupCanvas(); + var wave = createWave(this.$.canvas); + + this.cancelled = false; + wave.isMouseDown = true; + wave.tDown = 0.0; + wave.tUp = 0.0; + wave.mouseUpStart = 0.0; + wave.mouseDownStart = now(); + + var width = this.$.canvas.width / 2; // Retina canvas + var height = this.$.canvas.height / 2; + var rect = this.getBoundingClientRect(); + var touchX = e.x - rect.left; + var touchY = e.y - rect.top; + + wave.startPosition = {x:touchX, y:touchY}; + + if (this.classList.contains("recenteringTouch")) { + wave.endPosition = {x: width / 2, y: height / 2}; + wave.slideDistance = dist(wave.startPosition, wave.endPosition); + } + wave.containerSize = Math.max(width, height); + wave.maxRadius = distanceFromPointToFurthestCorner(wave.startPosition, {w: width, h: height}); + this.waves.push(wave); + requestAnimationFrame(this._loop); + }, + + upAction: function() { + for (var i = 0; i < this.waves.length; i++) { + // Declare the next wave that has mouse down to be mouse'ed up. + var wave = this.waves[i]; + if (wave.isMouseDown) { + wave.isMouseDown = false + wave.mouseUpStart = now(); + wave.mouseDownStart = 0; + wave.tUp = 0.0; + break; + } + } + this._loop && requestAnimationFrame(this._loop); + }, + + cancel: function() { + this.cancelled = true; + }, + + animate: function(ctx) { + var shouldRenderNextFrame = false; + + // Clear the canvas + ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); + + var deleteTheseWaves = []; + // The oldest wave's touch down duration + var longestTouchDownDuration = 0; + var longestTouchUpDuration = 0; + // Save the last known wave color + var lastWaveColor = null; + // wave animation values + var anim = { + initialOpacity: this.initialOpacity, + opacityDecayVelocity: this.opacityDecayVelocity, + height: ctx.canvas.height, + width: ctx.canvas.width + } + + for (var i = 0; i < this.waves.length; i++) { + var wave = this.waves[i]; + + if (wave.mouseDownStart > 0) { + wave.tDown = now() - wave.mouseDownStart; + } + if (wave.mouseUpStart > 0) { + wave.tUp = now() - wave.mouseUpStart; + } + + // Determine how long the touch has been up or down. + var tUp = wave.tUp; + var tDown = wave.tDown; + longestTouchDownDuration = Math.max(longestTouchDownDuration, tDown); + longestTouchUpDuration = Math.max(longestTouchUpDuration, tUp); + + // Obtain the instantenous size and alpha of the ripple. + var radius = waveRadiusFn(tDown, tUp, anim); + var waveAlpha = waveOpacityFn(tDown, tUp, anim); + var waveColor = cssColorWithAlpha(wave.waveColor, waveAlpha); + lastWaveColor = wave.waveColor; + + // Position of the ripple. + var x = wave.startPosition.x; + var y = wave.startPosition.y; + + // Ripple gravitational pull to the center of the canvas. + if (wave.endPosition) { + + // This translates from the origin to the center of the view based on the max dimension of + var translateFraction = Math.min(1, radius / wave.containerSize * 2 / Math.sqrt(2) ); + + x += translateFraction * (wave.endPosition.x - wave.startPosition.x); + y += translateFraction * (wave.endPosition.y - wave.startPosition.y); + } + + // If we do a background fill fade too, work out the correct color. + var bgFillColor = null; + if (this.backgroundFill) { + var bgFillAlpha = waveOuterOpacityFn(tDown, tUp, anim); + bgFillColor = cssColorWithAlpha(wave.waveColor, bgFillAlpha); + } + + // Draw the ripple. + drawRipple(ctx, x, y, radius, waveColor, bgFillColor); + + // Determine whether there is any more rendering to be done. + var maximumWave = waveAtMaximum(wave, radius, anim); + var waveDissipated = waveDidFinish(wave, radius, anim); + var shouldKeepWave = !waveDissipated || maximumWave; + var shouldRenderWaveAgain = !waveDissipated && !maximumWave; + shouldRenderNextFrame = shouldRenderNextFrame || shouldRenderWaveAgain; + if (!shouldKeepWave || this.cancelled) { + deleteTheseWaves.push(wave); + } + } + + if (shouldRenderNextFrame) { + requestAnimationFrame(this._loop); + } + + for (var i = 0; i < deleteTheseWaves.length; ++i) { + var wave = deleteTheseWaves[i]; + removeWaveFromScope(this, wave); + } + + if (!this.waves.length) { + // If there is nothing to draw, clear any drawn waves now because + // we're not going to get another requestAnimationFrame any more. + ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); + this._loop = null; + } + } + + }); + + })(); + diff --git a/third_party/polymer/components-chromium/paper-ripple/paper-ripple.html b/third_party/polymer/components-chromium/paper-ripple/paper-ripple.html new file mode 100644 index 0000000..e48a3fe --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/paper-ripple.html @@ -0,0 +1,90 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-ripple` provides a visual effect that other paper elements can +use to simulate a rippling effect emanating from the point of contact. The +effect can be visualized as a concentric circle with motion. + +Example: + + <paper-ripple></paper-ripple> + +`paper-ripple` listens to "down" and "up" events so it would display ripple +effect when touches on it. You can also defeat the default behavior and +manually route the down and up actions to the ripple element. Note that it is +important if you call downAction() you will have to make sure to call upAction() +so that `paper-ripple` would end the animation loop. + +Example: + + <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple> + ... + downAction: function(e) { + this.$.ripple.downAction({x: e.x, y: e.y}); + }, + upAction: function(e) { + this.$.ripple.upAction(); + } + +Styling ripple effect: + + Use CSS color property to style the ripple: + + paper-ripple { + color: #4285f4; + } + + Note that CSS color property is inherited so it is not required to set it on + the `paper-ripple` element directly. + +Apply `recenteringTouch` class to make the recentering rippling effect. + + <paper-ripple class="recenteringTouch"></paper-ripple> + +Apply `circle` class to make the rippling effect within a circle. + + <paper-ripple class="circle"></paper-ripple> + +@group Paper Elements +@element paper-ripple +@homepage github.io +--> + +<link rel="import" href="../polymer/polymer.html"> + +<polymer-element name="paper-ripple" attributes="initialOpacity opacityDecayVelocity" assetpath=""> +<template> + + <style> + + :host { + display: block; + position: relative; + } + + #canvas { + pointer-events: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + + :host(.circle) #canvas { + border-radius: 50%; + } + + </style> + +</template> + +</polymer-element> +<script src="paper-ripple-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-ripple/raw-extracted.js b/third_party/polymer/components-chromium/paper-ripple/raw-extracted.js new file mode 100644 index 0000000..95faeb6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/raw-extracted.js @@ -0,0 +1,410 @@ + + +// +// INK EQUATIONS +// + +// Animation constants. +var globalSpeed = 1; +var waveOpacityDecayVelocity = 0.8 / globalSpeed; // opacity per second. +var waveInitialOpacity = 0.25; +var waveLingerOnTouchUp = 0.2; +var waveMaxRadius = 150; + +// TODOs: +// - rather than max distance to corner, use hypotenuos(sp) (diag) +// - use quadratic for the fall off, move fast at the beginning, +// - on cancel, immediately fade out, reverse the direction + +function waveRadiusFn(touchDownMs, touchUpMs, ww, hh) { + // Convert from ms to s. + var touchDown = touchDownMs / 1000; + var touchUp = touchUpMs / 1000; + var totalElapsed = touchDown + touchUp; + var waveRadius = Math.min(Math.max(ww, hh), waveMaxRadius) * 1.1 + 5; + var dduration = 1.1 - .2 * (waveRadius / waveMaxRadius); + var tt = (totalElapsed / dduration); + + var ssize = waveRadius * (1 - Math.pow(80, -tt)); + return Math.abs(ssize); +} + +function waveOpacityFn(td, tu) { + // Convert from ms to s. + var touchDown = td / 1000; + var touchUp = tu / 1000; + var totalElapsed = touchDown + touchUp; + + if (tu <= 0) { // before touch up + return waveInitialOpacity; + } + return Math.max(0, waveInitialOpacity - touchUp * waveOpacityDecayVelocity); +} + +function waveOuterOpacityFn(td, tu) { + // Convert from ms to s. + var touchDown = td / 1000; + var touchUp = tu / 1000; + + // Linear increase in background opacity, capped at the opacity + // of the wavefront (waveOpacity). + var outerOpacity = touchDown * 0.3; + var waveOpacity = waveOpacityFn(td, tu); + return Math.max(0, Math.min(outerOpacity, waveOpacity)); + +} + +function waveGravityToCenterPercentageFn(td, tu, r) { + // Convert from ms to s. + var touchDown = td / 1000; + var touchUp = tu / 1000; + var totalElapsed = touchDown + touchUp; + + return Math.min(1.0, touchUp * 6); +} + + +// Determines whether the wave should be completely removed. +function waveDidFinish(wave, radius) { + var waveOpacity = waveOpacityFn(wave.tDown, wave.tUp); + // Does not linger any more. + // var lingerTimeMs = waveLingerOnTouchUp * 1000; + + // If the wave opacity is 0 and the radius exceeds the bounds + // of the element, then this is finished. + if (waveOpacity < 0.01 && radius >= wave.maxRadius) { + return true; + } + return false; +}; + +// +// DRAWING +// + +function animateIcon() { + var el = document.getElementById('button_toolbar0'); + el.classList.add('animate'); + setTimeout(function(){ + el.classList.remove('animate'); + el.classList.toggle('selected'); + }, 500); +} + + +function drawRipple(canvas, x, y, radius, innerColor, outerColor, innerColorAlpha, outerColorAlpha) { + var ctx = canvas.getContext('2d'); + if (outerColor) { + ctx.fillStyle = outerColor; + ctx.fillRect(0,0,canvas.width, canvas.height); + } + + ctx.beginPath(); + ctx.arc(x, y, radius, 0, 2 * Math.PI, false); + ctx.fillStyle = innerColor; + ctx.fill(); +} + +function drawLabel(canvas, label, fontSize, color, alignment) { + var ctx = canvas.getContext('2d'); + ctx.font= fontSize + 'px Helvetica'; + + var metrics = ctx.measureText(label); + var width = metrics.width; + var height = metrics.height; + ctx.fillStyle = color; + + var xPos = (canvas.width/2 - width)/2; + + if (alignment === 'left') { xPos = 16; } + + ctx.fillText(label, xPos, canvas.height/2 - (canvas.height/2 - fontSize +2) / 2); +} + +// +// BUTTON SETUP +// + +function createWave(elem) { + var elementStyle = window.getComputedStyle(elem); + var fgColor = elementStyle.color; + + var wave = { + waveColor: fgColor, + maxRadius: 0, + isMouseDown: false, + mouseDownStart: 0.0, + mouseUpStart: 0.0, + tDown: 0, + tUp: 0 + }; + return wave; +} + +function removeWaveFromScope(scope, wave) { + if (scope.waves) { + var pos = scope.waves.indexOf(wave); + scope.waves.splice(pos, 1); + } +}; + + +function setUpPaperByClass( classname ) { + var elems = document.querySelectorAll( classname ); + [].forEach.call( elems, function( el ) { + setUpPaper(el); + }); +} + +function setUpPaper(elem) { + var pixelDensity = 2; + + var elementStyle = window.getComputedStyle(elem); + var fgColor = elementStyle.color; + var bgColor = elementStyle.backgroundColor; + elem.width = elem.clientWidth; + elem.setAttribute('width', elem.clientWidth * pixelDensity + "px"); + elem.setAttribute('height', elem.clientHeight * pixelDensity + "px"); + + var isButton = elem.classList.contains( 'button' ) || elem.classList.contains( 'button_floating' ) | elem.classList.contains( 'button_menu' ); + var isToolbarButton = elem.classList.contains( 'button_toolbar' ); + + elem.getContext('2d').scale(pixelDensity, pixelDensity) + + var scope = { + backgroundFill: true, + element: elem, + label: 'Button', + waves: [], + }; + + + scope.label = elem.getAttribute('value') || elementStyle.content; + scope.labelFontSize = elementStyle.fontSize.split("px")[0]; + + drawLabel(elem, scope.label, scope.labelFontSize, fgColor, elem.style.textAlign); + + + // + // RENDER FOR EACH FRAME + // + var onFrame = function() { + var shouldRenderNextFrame = false; + + // Clear the canvas + var ctx = elem.getContext('2d'); + ctx.clearRect(0, 0, elem.width, elem.height); + + var deleteTheseWaves = []; + // The oldest wave's touch down duration + var longestTouchDownDuration = 0; + var longestTouchUpDuration = 0; + // Save the last known wave color + var lastWaveColor = null; + + for (var i = 0; i < scope.waves.length; i++) { + var wave = scope.waves[i]; + + if (wave.mouseDownStart > 0) { + wave.tDown = now() - wave.mouseDownStart; + } + if (wave.mouseUpStart > 0) { + wave.tUp = now() - wave.mouseUpStart; + } + + // Determine how long the touch has been up or down. + var tUp = wave.tUp; + var tDown = wave.tDown; + longestTouchDownDuration = Math.max(longestTouchDownDuration, tDown); + longestTouchUpDuration = Math.max(longestTouchUpDuration, tUp); + + // Obtain the instantenous size and alpha of the ripple. + var radius = waveRadiusFn(tDown, tUp, elem.width, elem.height); + var waveAlpha = waveOpacityFn(tDown, tUp); + var waveColor = cssColorWithAlpha(wave.waveColor, waveAlpha); + lastWaveColor = wave.waveColor; + + // Position of the ripple. + var x = wave.startPosition.x; + var y = wave.startPosition.y; + + // Ripple gravitational pull to the center of the canvas. + if (wave.endPosition) { + + var translateFraction = waveGravityToCenterPercentageFn(tDown, tUp, wave.maxRadius); + + // This translates from the origin to the center of the view based on the max dimension of + var translateFraction = Math.min(1, radius / wave.containerSize * 2 / Math.sqrt(2) ); + + x += translateFraction * (wave.endPosition.x - wave.startPosition.x); + y += translateFraction * (wave.endPosition.y - wave.startPosition.y); + } + + // If we do a background fill fade too, work out the correct color. + var bgFillColor = null; + if (scope.backgroundFill) { + var bgFillAlpha = waveOuterOpacityFn(tDown, tUp); + bgFillColor = cssColorWithAlpha(wave.waveColor, bgFillAlpha); + } + + // Draw the ripple. + drawRipple(elem, x, y, radius, waveColor, bgFillColor); + + // Determine whether there is any more rendering to be done. + var shouldRenderWaveAgain = !waveDidFinish(wave, radius); + shouldRenderNextFrame = shouldRenderNextFrame || shouldRenderWaveAgain; + if (!shouldRenderWaveAgain) { + deleteTheseWaves.push(wave); + } + } + + if (shouldRenderNextFrame) { + window.requestAnimationFrame(onFrame); + } else { + // If there is nothing to draw, clear any drawn waves now because + // we're not going to get another requestAnimationFrame any more. + var ctx = elem.getContext('2d'); + ctx.clearRect(0, 0, elem.width, elem.height); + } + + // Draw the label at the very last point so it is on top of everything. + drawLabel(elem, scope.label, scope.labelFontSize, fgColor, elem.style.textAlign); + + for (var i = 0; i < deleteTheseWaves.length; ++i) { + var wave = deleteTheseWaves[i]; + removeWaveFromScope(scope, wave); + } + }; + + // + // MOUSE DOWN HANDLER + // + + elem.addEventListener('mousedown', function(e) { + var wave = createWave(e.target); + var elem = scope.element; + + wave.isMouseDown = true; + wave.tDown = 0.0; + wave.tUp = 0.0; + wave.mouseUpStart = 0.0; + wave.mouseDownStart = now(); + + var width = e.target.width / 2; // Retina canvas + var height = e.target.height / 2; + var touchX = e.clientX - e.target.offsetLeft - e.target.offsetParent.offsetLeft; + var touchY = e.clientY - e.target.offsetTop - e.target.offsetParent.offsetTop; + wave.startPosition = {x:touchX, y:touchY}; + + if (elem.classList.contains("recenteringTouch")) { + wave.endPosition = {x: width / 2, y: height / 2}; + wave.slideDistance = dist(wave.startPosition, wave.endPosition); + } + wave.containerSize = Math.max(width, height); + wave.maxRadius = distanceFromPointToFurthestCorner(wave.startPosition, {w: width, h: height}); + elem.classList.add("activated"); + scope.waves.push(wave); + window.requestAnimationFrame(onFrame); + return false; + }); + + // + // MOUSE UP HANDLER + // + + elem.addEventListener('mouseup', function(e) { + elem.classList.remove("activated"); + + for (var i = 0; i < scope.waves.length; i++) { + // Declare the next wave that has mouse down to be mouse'ed up. + var wave = scope.waves[i]; + if (wave.isMouseDown) { + wave.isMouseDown = false + wave.mouseUpStart = now(); + wave.mouseDownStart = 0; + wave.tUp = 0.0; + break; + } + } + return false; + }); + + elem.addEventListener('mouseout', function(e) { + elem.classList.remove("activated"); + + for (var i = 0; i < scope.waves.length; i++) { + // Declare the next wave that has mouse down to be mouse'ed up. + var wave = scope.waves[i]; + if (wave.isMouseDown) { + wave.isMouseDown = false + wave.mouseUpStart = now(); + wave.mouseDownStart = 0; + wave.tUp = 0.0; + wave.cancelled = true; + break; + } + } + return false; + }); + + return scope; +}; + +// Shortcuts. +var pow = Math.pow; +var now = function() { return new Date().getTime(); }; + +// Quad beizer where t is between 0 and 1. +function quadBezier(t, p0, p1, p2, p3) { + return pow(1 - t, 3) * p0 + + 3 * pow(1 - t, 2) * t * p1 + + (1 - t) * pow(t, 2) * p2 + + pow(t, 3) * p3; +} + +function easeIn(t) { + return quadBezier(t, 0.4, 0.0, 1, 1); +} + +function cssColorWithAlpha(cssColor, alpha) { + var parts = cssColor.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); + if (typeof alpha == 'undefined') { + alpha = 1; + } + if (!parts) { + return 'rgba(255, 255, 255, ' + alpha + ')'; + } + return 'rgba(' + parts[1] + ', ' + parts[2] + ', ' + parts[3] + ', ' + alpha + ')'; +} + +function dist(p1, p2) { + return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2)); +} + +function distanceFromPointToFurthestCorner(point, size) { + var tl_d = dist(point, {x: 0, y: 0}); + var tr_d = dist(point, {x: size.w, y: 0}); + var bl_d = dist(point, {x: 0, y: size.h}); + var br_d = dist(point, {x: size.w, y: size.h}); + return Math.max(Math.max(tl_d, tr_d), Math.max(bl_d, br_d)); +} + + +function toggleDialog() { + var el = document.getElementById('dialog'); + el.classList.toggle("visible"); +} + +function toggleMenu() { + var el = document.getElementById('menu'); + el.classList.toggle("visible"); +} + + +// Initialize + +function init() { + setUpPaperByClass( '.paper' ); +} + +window.addEventListener('DOMContentLoaded', init, false); diff --git a/third_party/polymer/components-chromium/paper-ripple/raw.html b/third_party/polymer/components-chromium/paper-ripple/raw.html new file mode 100644 index 0000000..c744aa9 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-ripple/raw.html @@ -0,0 +1,380 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + + +<style type="text/css" media="screen"> + body { + background-color: #f9f9f9; + margin:0; padding:0; + font-family:sans-serif; + font-size:14px; +} + +* { + + -webkit-user-select: none; + cursor:default; +} +.toolbar { + background-color:#673AB7; + height:56px; + overflow:hidden; +} + + +#dialog { + width:250px; + height:120px; + opacity:0.0; + pointer-events:none; + -webkit-transform: scale(0.95) translate3d(0,100px,0);; + -webkit-transition: -webkit-transform 0.3s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, -webkit-box-shadow .5s ease-out; + + -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); + -webkit-transition-delay:0.25s; + +} + +#dialog.visible { + pointer-events:all; + opacity:1.0; + -webkit-transform: scale(1.0) translate3d(0,0,0);; + width:250px; + height:160px; + -webkit-box-shadow:0 19px 19px rgba(0,0,0,0.30), 0 15px 6px rgba(0,0,0,0.22); + -webkit-transition-delay:0.0s; + +} + + +.dialog { + top:120px; + right: 0; + left: 50%; + margin-left:-125px; + padding:24px 16px 20px 24px; + position:absolute; + + background:white; + color:rgba(0,0,0,0.5); + margin-bottom:38px; + overflow:hidden; +} +.dialog h1 { + font-size:20px; + font-weight:normal; + padding:0; margin-top:0; +} + +.dialog .button { + position:absolute; + top:160px; + right:10px; +} + +/*#menu { + width:250px; + height:120px; + opacity:0.0; + pointer-events:none; + -webkit-transform: scale(0.95) translate3d(0,100px,0);; + -webkit-transition: -webkit-transform 0.3s ease-out, height 0.2s ease-out, opacity 0.2s ease-out, -webkit-box-shadow .5s ease-out; + + -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); +} + +#menu.visible { + pointer-events:all; + opacity:1.0; + -webkit-transform: scale(1.0) translate3d(0,0,0);; + width:250px; + height:160px; + -webkit-box-shadow:0 19px 19px rgba(0,0,0,0.30), 0 15px 6px rgba(0,0,0,0.22); +}*/ + + + + +.menu { + width:160px; + height:160px; + background:white; + position:absolute; + right:8px; + top: 8px; + padding:0; + + + opacity:0.0; + pointer-events:none; + -webkit-transform: scale(0.95) translate3d(0,0,0);; + -webkit-transition: -webkit-transform 0.3s ease-out, width 0.2s ease-out, height 0.3s ease-out, opacity 0.1s ease-out, -webkit-box-shadow .5s ease-out; + + -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); + -webkit-transition-delay:0.35s; + overflow:hidden; + + +} + +.menu.visible { + width:180px; + height:192px; + pointer-events:all; + opacity:1.0; + -webkit-transform: scale(1.0) translate3d(0,0,0);; + -webkit-box-shadow:0 10px 10px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); + -webkit-transition-delay:0.15s; + +} + + + +.menu div { + height:48px; + padding:0; + +} + +.menu canvas { + height:48px; + width: 100%; +} + + +.button_floating { + width:56px; + height:56px; + color:#fff; + background-color:#039BE5; + border-radius:28px; + position:absolute; + top:388px; + right:40px; +} + +.container { +} + + + + +.button { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} + +.button_menu.container { + margin: 0px; + height: 48px; + padding: 0; +} + + + +.button_menu { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + text-align:left !important; + color:rgb(100,100,100); +} + +.button_toolbar { + -webkit-border-radius: 84px; + + color: rgb(255,255,255); + width: 80px; + height: 80px; + float:left; + margin-right:-24px; + margin-top:-12px; + background-color: rgba(0, 0, 0, 0); +} + +#button_small { + color: rgb(100, 100, 100); + background-color: #ffffff; + width: 80px; + height: 32px; + +} + +#button_blue { + color: rgb(255, 255, 255); + background-color: #0277BD; + width: 80px; + height: 32px; +} + +#button_borderless_square { + color: #ffffff; + background-color: #f9f9f9; + border: 1px solid #f0f0f0; + width: 100px; + height: 100px; + background-color: rgb(255, 255, 255, 0); + background-image:url(http://wallpaperandbackground.com/wp-content/uploads/2014/03/Field-Landscape.jpg); + background-size:cover; + +} + +#button_borderless { + color: #777777; + background-color: #ffffff; + width:80px; + height: 32px; + margin-right:72px; + content: "CANCEL"; +} + +#button_borderless_blue { + color: #4285F4; + background-color: #ffffff; + width: 64px; + height: 32px; + content:"OK"; +} + +#button_large { + color: rgb(255, 255, 255); + width: 100%; + height: 360px; + background-color:#81D4FA; +} + +#button_toolbar1 { + content: ''; + color:transparent; + margin-left:-4px; + +} + +#button_toolbar2 { + content: '★'; + float:right; +} + +#button_toolbar3 { + content: 'MENU'; + font-size: 14px; + width: 88px; + height:88px; + margin-top: -16px; + color:#7FFFFF; + float:right; + margin-right:0; + +} + +.caption { + z-index: 100; + background-color: red; +} + +#button_toolbar0.animate { + -webkit-animation: play 0.5s steps(16); + +} + + +.button.raised { + -webkit-transition: -webkit-box-shadow 0.2s; + -webkit-transition-delay: 0.2s; + -webkit-box-shadow:0 1px 2px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24); +} + +.button.raised.activated { + -webkit-box-shadow: 0px 10px 10px rgba(0,0,0,0.19), 0px 6px 3px rgba(0,0,0,0.23); + -webkit-transition-delay: 0.0s; +} + + +.floating { + -webkit-transition: -webkit-box-shadow 0.2s; + -webkit-transition-delay: 0.2s; + -webkit-box-shadow:0 3px 3px rgba(0,0,0,0.16), 0 3px 3px rgba(0,0,0,0.23); +} + +.floating.activated { + -webkit-box-shadow: 0px 14px 14px rgba(0,0,0,0.25), 0px 10px 5px rgba(0,0,0,0.22); + -webkit-transition-delay: 0.0s; +} + +#title { + color:white; + font-size:20px; + line-height:58px; + margin-left:24px; +} + +.content { + padding-left:72px; padding-top:24px; padding-right:144px; + line-height:20px; + color:#666; +} + +@-webkit-keyframes play { + from { background-position: 0px 0px; } + to { background-position: 0px -384px; } +} + +#button_toolbar0 { + pointer-events: none; + position:absolute; + top:16px; + left: 24px; + content: "\00a0"; + width:24px; + height:24px; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAGACAYAAAC3NaJiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAABabSURBVHic7Z15tCVVdYe/ej2P0M0g8yARVJAGQZnHBuOEiPMQYxBRJBLFmAViiHHGEUcSxRGj0TggRtEIklZBhAUCQUQcgGZuoAd6et2v37tf/tin+p5b7w51Xz8U5O21at2quqfO70x1zu/svc+pQuXhlIGHNfYJgDoyGaAoCt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CfD/onOZE4n8mZYAAAAASUVORK5CYII=); +} + +#button_toolbar0.selected { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAGACAYAAAC3NaJiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAAAAAAAAB6mUWpAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAABjoSURBVHic7Z15nFxVlce/tzrpdGcle4CQhH0PhiVhBBQVJS6oiDijgjgzbiMqo+I4g4rbuIyC4vhxGXc/47gg4DYgjjguCCg7CMRIBMKWECAhSXenO91Vv/njnNvv1qtXVa86AdHp8/m8z6t69e75vXe387vnnPcqSOLxlMrjqv2JAKCTKpJ0jKQ3SprWTmfcSgO48lskbZP0XkkTywCUqiJJxwCfAZYCAZjg+1KFy1z5zTLZJumjO62KxqK8NEBO+YCkD0ua2k55HmBCkxOeBXwSOBSoARcBXwemS9qlhe4qsMH3AARJhJC1l6TnAZ8G9oqHgEeAQVo3bAV4AHgRsC4erLsDv7qzE+W40rktFKdSA7rSA3UAIYTHJJ0HLB7jHawjqZ4GAAe5TNIQWRsIuBz4ELCV1tNLbINMHu9e9KcbBzsC0vFklwMZlPRBSd1lAEpNdiGEq4AzgVuxRh/xfXt50tgDgFqtFiS1veu2c1EzqVQqomzVxDKdnDwWGQfY+QC1Wq2csR8LgKRpIYTXSTq2k0Jlz5st6XyfWW+QdHArnZ3ORXtI+k9J230+WiXpqTsFQNLBkn4sqebKr2mlvCMAScdK+q0rrkm6VNJBJe64NYCkiqQXSfp9MkV/RdJu7ZTnARrmIkmTgb8D3gUswOaeXwDfAHolLcSm6xHMBtftQwh1Rr+OF0nqAd4NnAVE+ytgCzDkioaBAd/6gP7k+3qMU90XAfJ30IXRldS4B2BGmaoBHsIY4KjkeVG/pHOA2cBz/PAwcDdWBVOBiV6uK7ef6Of0NwVwkHskvRH4rIN0ATcC53rhKb5NTj5PcfBhjKRl0qybSjpI0pVJL/qwd4C20sk4OFLSjQ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1kpa8KHLTndEGo7zoCc1SG29kGG/kEvL/oJF3+mwaUg7zeMifv0V73AH+D6kiv3uZmfIGAAAAAElFTkSuQmCC); +} +</style> +</head> + +<body id=""> + <div class="toolbar"> + <div id="button_toolbar0" class="toolbar_icon"></div> + <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar1" onclick="animateIcon()"></canvas></span> + <span id="title" style="float:left">Ripple test</span> + <span class="container"><canvas onclick="toggleMenu()" class="paper button_toolbar recenteringTouch" id="button_toolbar3"></canvas></span> + <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar2"></canvas></span> + <span class="container"><canvas class="paper button_toolbar recenteringTouch" id="button_toolbar2"></canvas></span> + +</div> + +<div id="dialog" class="dialog visible"> + <h1>Press mah buttons!</h1> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. + <span class="container"><canvas class="paper button" id="button_borderless" value="CANCEL"></canvas></span> + <span class="container"><canvas class="paper button" id="button_borderless_blue" onclick="toggleDialog()" value="OK"></canvas></span> +</div> + +<div id="menu" class="menu visible"> + <div class="container button_menu"><canvas class="paper button_menu" value="Fold" style="text-align:left"></canvas></div> + <div class="container button_menu"><canvas class="paper button_menu" value="Spindle" style="text-align:left"></canvas></div> + <div class="container button_menu"><canvas class="paper button_menu" onclick="" value="Mutilate" style="text-align:left"></canvas></div> + <div class="container button_menu"><canvas class="paper button_menu" onclick="toggleMenu()" value="Dismiss" style="text-align:left"></canvas></div> + +</div> +<div class="container"><canvas class="paper button recenteringTouch" id="button_large"></canvas></div> +<div class="content" style=""> +Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam. sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. +<p></p> +<span class="container" style="margin-right:8px;"><canvas class="paper button raised" id="button_blue" value="ABORT"></canvas></span> +<span class="container" style="margin-right:8px;"><canvas class="paper button raised" id="button_small" value="RETRY"></canvas></span> + <span class="container"><canvas class="paper button raised" id="button_small" value="FAIL"></canvas></span> + + <p></p><p> +<canvas class="paper button" id="button_borderless_square"></canvas> + + +</p></div> +<div class="container"><canvas onclick="toggleDialog()" class="paper button_floating floating recenteringTouch" id="button_floating" value="★"></canvas></div> +<script src="raw-extracted.js"></script></body> +</html> diff --git a/third_party/polymer/components-chromium/paper-shadow/.bower.json b/third_party/polymer/components-chromium/paper-shadow/.bower.json new file mode 100644 index 0000000..6e07f7a --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/.bower.json @@ -0,0 +1,18 @@ +{ + "name": "paper-shadow", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-shadow", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "346e641e4d1c69daacba9d41d1d7e8181f01baee" + }, + "_source": "git://github.com/Polymer/paper-shadow.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-shadow" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-shadow/README.md b/third_party/polymer/components-chromium/paper-shadow/README.md new file mode 100644 index 0000000..87ed91b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/README.md @@ -0,0 +1,4 @@ +paper-shadow +============ + +See the [component page](http://polymer-project.org/docs/elements/paper-elements.html#paper-shadow) for more information. diff --git a/third_party/polymer/components-chromium/paper-shadow/bower.json b/third_party/polymer/components-chromium/paper-shadow/bower.json new file mode 100644 index 0000000..939c7c5 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/bower.json @@ -0,0 +1,7 @@ +{ + "name": "paper-shadow", + "private": true, + "dependencies": { + "polymer": "Polymer/polymer#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-shadow/demo.html b/third_party/polymer/components-chromium/paper-shadow/demo.html new file mode 100644 index 0000000..1718ba3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/demo.html @@ -0,0 +1,249 @@ +<!doctype html> +<!-- +Copyright 2013 The Polymer Authors. All rights reserved. +Use of this source code is governed by a BSD-style +license that can be found in the LICENSE file. +--> +<html> +<head> + <title>paper-shadow</title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> + <script src="../platform/platform.js"></script> + <link href="paper-shadow.html" rel="import"> + <style> + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + transform: translateZ(0); + -webkit-transform: translateZ(0); + transform: translateZ(0); + padding: 16px; + user-select: none; + -webkit-user-select: none; + } + + section { + display: flex; + display: -webkit-flex; + width: 80%; + margin: 16px; + } + + aside { + flex: 1 1 auto; + -webkit-flex: 1 1 auto; + padding: 48px 16px; + user-select: text; + -webkit-user-select: text; + } + + .card { + background: white; + width: 300px; + height: 300px; + position: relative; + margin: 16px; + border-radius: 2px; + } + + .card-inner { + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + border-radius: 2px; + } + + </style> +</head> +<body unresolved> + + <paper-shadow></paper-shadow> + + <section> + <div> + <div class="card"> + </div> + </div> + <aside> + z-depth = 0 + </aside> + </section> + + <section> + <!-- Example of using paper-shadow to add a shadow to an element --> + <div> + <div class="card"> + <paper-shadow z="1"></paper-shadow> + </div> + </div> + <aside> + z-depth = 1 + </aside> + </section> + + <section> + <!-- Example of using paper-shadow as part of a Polymer element --> + <polymer-element name="x-card" attributes="z"> + <template> + <style> + :host { + display: block; + } + </style> + <paper-shadow z="{{z}}"></paper-shadow> + </template> + <script> + Polymer('x-card', { + publish: { + z: {value: 1, reflect: true} + } + }); + </script> + </polymer-element> + <div> + <x-card class="card" z="2"></x-card> + </div> + <aside> + z-depth = 2 + </aside> + </section> + + <section> + <!-- Example of using paper-shadow by adding a class directly --> + <div> + <div class="card paper-shadow-top-z-3"> + <div class="card-inner paper-shadow-bottom-z-3"> + </div> + </div> + </div> + <aside> + z-depth = 3 + </aside> + </section> + + <section> + <div> + <div class="card paper-shadow-top-z-4"> + <div class="card-inner paper-shadow-bottom-z-4"> + </div> + </div> + </div> + <aside> + z-depth = 4 + </aside> + </section> + + <section> + <div> + <div class="card paper-shadow-top-z-5"> + <div class="card-inner paper-shadow-bottom-z-5"> + </div> + </div> + </div> + <aside> + z-depth = 5 + </aside> + </section> + + <br> + <br> + <br> + <br> + + <polymer-element name="x-shadow" attributes="z" on-tap="{{tapAction}}"> + <template> + <style> + :host, + .paper-shadow-bottom { + display: block; + background: white; + color: #ccc; + } + + :host(.fab), + :host(.fab) .paper-shadow-bottom { + width: 48px; + height: 48px; + border-radius: 24px; + } + </style> + <paper-shadow z="{{z}}" animated></paper-shadow> + </template> + <script> + Polymer('x-shadow', { + publish: { + z: {value: 0, reflect: true} + }, + up: true, + zChanged: function() { + this.fire('shadow-z-changed'); + }, + tapAction: function() { + if (this.up) { + if (this.z < 5) { + this.z += 1; + } else { + this.z -= 1; + this.up = false; + } + } else { + if (this.z > 0) { + this.z -= 1; + } else { + this.z += 1; + this.up = true; + } + } + } + }); + </script> + </polymer-element> + + <section> + <div> + <x-shadow id="card" z="0" class="card"></x-shadow> + </div> + <aside> + Tap to lift/drop the card. + <br> + Current z-index = <span id="card-z">0</span> + </aside> + <script> + document.addEventListener('polymer-ready', function() { + var fab = document.getElementById('card'); + fab.addEventListener('shadow-z-changed', function() { + document.getElementById('card-z').textContent = fab.z; + }); + }); + </script> + </section> + + <section> + <div> + <style> + x-shadow.fab { + margin: 48px 142px; + } + </style> + <x-shadow id="fab" z="0" class="fab"></x-shadow> + </div> + <aside> + Tap to lift/drop the button. + <br> + Current z-index = <span id="fab-z">0</span> + </aside> + <script> + document.addEventListener('polymer-ready', function() { + var fab = document.getElementById('fab'); + fab.addEventListener('shadow-z-changed', function() { + document.getElementById('fab-z').textContent = fab.z; + }); + }); + </script> + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-shadow/index.html b/third_party/polymer/components-chromium/paper-shadow/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-shadow/metadata.html b/third_party/polymer/components-chromium/paper-shadow/metadata.html new file mode 100644 index 0000000..07e6edd --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-shadow" label="Shadow" group="Paper"> + <template> + <paper-shadow></paper-shadow> + </template> + <template id="imports"> + <link rel="import" href="paper-shadow.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-shadow/paper-shadow-extracted.js b/third_party/polymer/components-chromium/paper-shadow/paper-shadow-extracted.js new file mode 100644 index 0000000..6082cde --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/paper-shadow-extracted.js @@ -0,0 +1,149 @@ + + Polymer('paper-shadow', { + + publish: { + /** + * If set, the shadow is applied to this node. + * + * @attribute target + * @type Element + * @default null + */ + target: {value: null, reflect: true}, + + /** + * The z-depth of this shadow, from 0-5. + * + * @attribute z + * @type number + * @default 1 + */ + z: {value: 1, reflect: true}, + + /** + * If true, the shadow animates between z-depth changes. + * + * @attribute animated + * @type boolean + * @default false + */ + animated: {value: false, reflect: true}, + + /** + * Workaround: getComputedStyle is wrong sometimes so `paper-shadow` + * may overwrite the `position` CSS property. Set this property to + * true to prevent this. + * + * @attribute hasPosition + * @type boolean + * @default false + */ + hasPosition: {value: false} + }, + + // NOTE: include template so that styles are loaded, but remove + // so that we can decide dynamically what part to include + registerCallback: function(polymerElement) { + var template = polymerElement.querySelector('template'); + this._style = template.content.querySelector('style'); + this._style.removeAttribute('no-shim'); + }, + + fetchTemplate: function() { + return null; + }, + + attached: function() { + this.installScopeStyle(this._style); + + // If no target is bound at attach, default the target to the parent + // element or shadow host. + if (!this.target) { + if (!this.parentElement && this.parentNode.host) { + this.target = this.parentNode.host; + } else if (this.parentElement && (window.ShadowDOMPolyfill ? this.parentElement !== wrap(document.body) : this.parentElement !== document.body)) { + this.target = this.parentElement; + } + } + }, + + targetChanged: function(old) { + if (old) { + this.removeShadow(old); + } + if (this.target) { + this.addShadow(this.target); + } + }, + + zChanged: function(old) { + if (this.target && this.target._paperShadow) { + var shadow = this.target._paperShadow; + ['top', 'bottom'].forEach(function(s) { + shadow[s].classList.remove('paper-shadow-' + s + '-z-' + old); + shadow[s].classList.add('paper-shadow-' + s + '-z-' + this.z); + }.bind(this)); + } + }, + + animatedChanged: function() { + if (this.target && this.target._paperShadow) { + var shadow = this.target._paperShadow; + ['top', 'bottom'].forEach(function(s) { + if (this.animated) { + shadow[s].classList.add('paper-shadow-animated'); + } else { + shadow[s].classList.remove('paper-shadow-animated'); + } + }.bind(this)); + } + }, + + addShadow: function(node) { + if (node._paperShadow) { + return; + } + + var computed = getComputedStyle(node); + if (!this.hasPosition && computed.position === 'static') { + node.style.position = 'relative'; + } + node.style.overflow = 'visible'; + + // Both the top and bottom shadows are children of the target, so + // it does not affect the classes and CSS properties of the target. + ['top', 'bottom'].forEach(function(s) { + var inner = (node._paperShadow && node._paperShadow[s]) || document.createElement('div'); + inner.classList.add('paper-shadow'); + inner.classList.add('paper-shadow-' + s + '-z-' + this.z); + if (this.animated) { + inner.classList.add('paper-shadow-animated'); + } + + if (node.shadowRoot) { + node.shadowRoot.insertBefore(inner, node.shadowRoot.firstChild); + } else { + node.insertBefore(inner, node.firstChild); + } + + node._paperShadow = node._paperShadow || {}; + node._paperShadow[s] = inner; + }.bind(this)); + + }, + + removeShadow: function(node) { + if (!node._paperShadow) { + return; + } + + ['top', 'bottom'].forEach(function(s) { + node._paperShadow[s].remove(); + }); + node._paperShadow = null; + + node.style.position = null; + } + + }); +
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-shadow/paper-shadow.css b/third_party/polymer/components-chromium/paper-shadow/paper-shadow.css new file mode 100644 index 0000000..e5cfec7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/paper-shadow.css @@ -0,0 +1,81 @@ +.paper-shadow { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + border-radius: inherit; + pointer-events: none; +} + +.paper-shadow-animated.paper-shadow { + transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); +} + +.paper-shadow-top-z-1 { + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); +} + +.paper-shadow-bottom-z-1 { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); +} + +.paper-shadow-top-z-2 { + box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} + +.paper-shadow-bottom-z-2 { + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); +} + +.paper-shadow-top-z-3 { + box-shadow: 0 17px 50px 0 rgba(0, 0, 0, 0.19); +} + +.paper-shadow-bottom-z-3 { + box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); +} + +.paper-shadow-top-z-4 { + box-shadow: 0 25px 55px 0 rgba(0, 0, 0, 0.21); +} + +.paper-shadow-bottom-z-4 { + box-shadow: 0 16px 28px 0 rgba(0, 0, 0, 0.22); +} + +.paper-shadow-top-z-5 { + box-shadow: 0 40px 77px 0 rgba(0, 0, 0, 0.22); +} + +.paper-shadow-bottom-z-5 { + box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2); +} + +.paper-shadow-animate-z-1-z-2.paper-shadow-top { + -webkit-transition: none; + -webkit-animation: animate-shadow-top-z-1-z-2 0.7s infinite alternate; +} + +.paper-shadow-animate-z-1-z-2 .paper-shadow-bottom { + -webkit-transition: none; + -webkit-animation: animate-shadow-bottom-z-1-z-2 0.7s infinite alternate; +} + +@-webkit-keyframes animate-shadow-top-z-1-z-2 { + 0% { + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.16); + } + 100% { + box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.19); + } +} + +@-webkit-keyframes animate-shadow-bottom-z-1-z-2 { + 0% { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + } + 100% { + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2); + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-shadow/paper-shadow.html b/third_party/polymer/components-chromium/paper-shadow/paper-shadow.html new file mode 100644 index 0000000..81fcfac --- /dev/null +++ b/third_party/polymer/components-chromium/paper-shadow/paper-shadow.html @@ -0,0 +1,66 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +The `paper-shadow` element is a helper to add shadows to elements. +Paper shadows are composed of two shadows on top of each other. We +mimic this effect by using two elements on top of each other, each with a +different drop shadow. You can apply the shadow to an element by assigning +it as the target. If you do not specify a target, the shadow is applied to +the `paper-shadow` element's parent element or shadow host element if its +parent is a shadow root. Alternatively, you can use the CSS classes included +by this element directly. + +Example: + + <div id="myCard" class="card"></div> + <paper-shadow id="myShadow" z="1"></div> + + // Assign a target explicitly + myShadow.target = document.getElementById('myCard'); + + // Auto-assign the target. + <div class="card"> + <paper-shadow z="1"></paper-shadow> + </div> + + // Use the classes directly + <div class="card paper-shadow-top paper-shadow-top-z-1"> + <div class="card-inner paper-shadow-bottom paper-shadow-bottom-z-1"></div> + </div> + +If you assign a target to a `paper-shadow` element, it creates two nodes and inserts +them as the first children of the target, or the first children of the target's shadow +root if there is one. This implies: + + 1. If the primary node that drops the shadow has styling that affects its shape, + the same styling must be applied to elements with class `paper-shadow`. + `border-radius` is a very common property and is inherited automatically. + + 2. The target's overflow property will be set to `overflow: visible` because the + shadow is rendered beyond the bounds of its container. Position the shadow as a + separate layer and use a different child element for clipping if needed. + +@group Paper Elements +@class paper-shadow +--> + +<link href="../polymer/polymer.html" rel="import"> + +<polymer-element name="paper-shadow" assetpath=""> + + <template> + + <link no-shim="" href="paper-shadow.css" rel="stylesheet"> + + </template> + + +</polymer-element> +<script src="paper-shadow-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-slider/.bower.json b/third_party/polymer/components-chromium/paper-slider/.bower.json new file mode 100644 index 0000000..47d1176 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/.bower.json @@ -0,0 +1,20 @@ +{ + "name": "paper-slider", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-input": "Polymer/paper-input#>=0.3.0 <1.0.0", + "paper-progress": "Polymer/paper-progress#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-slider", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "69f9f3f88336c8b45ddb2cef3a13c9c2e180b8e3" + }, + "_source": "git://github.com/Polymer/paper-slider.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-slider" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-slider/README.md b/third_party/polymer/components-chromium/paper-slider/README.md new file mode 100644 index 0000000..84ae564 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/README.md @@ -0,0 +1,4 @@ +paper-slider +============ + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-slider) for more information. diff --git a/third_party/polymer/components-chromium/paper-slider/bower.json b/third_party/polymer/components-chromium/paper-slider/bower.json new file mode 100644 index 0000000..66cf9df --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/bower.json @@ -0,0 +1,9 @@ +{ + "name": "paper-slider", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-input": "Polymer/paper-input#>=0.3.0 <1.0.0", + "paper-progress": "Polymer/paper-progress#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-slider/demo.html b/third_party/polymer/components-chromium/paper-slider/demo.html new file mode 100644 index 0000000..d5358b4 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/demo.html @@ -0,0 +1,142 @@ +<!doctype html> +<html> +<head> + <title>paper-slider</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-slider.html"> + <link rel="import" href="../font-roboto/roboto.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + paper-slider { + width: 100%; + } + + section { + max-width: 1000px; + padding: 20px 0; + background-color: #f0f0f0; + } + + section > div { + padding: 14px; + } + + .yellow-slider paper-slider::shadow #sliderKnobInner, + .yellow-slider paper-slider::shadow #sliderBar::shadow #activeProgress { + background-color: #f4b400; + } + + .green-slider paper-slider::shadow #sliderKnobInner, + .green-slider paper-slider::shadow #sliderKnobInner::before, + .green-slider paper-slider::shadow #sliderBar::shadow #activeProgress { + background-color: #0f9d58; + } + + #ratingsLabel { + padding-left: 12px; + color: #a0a0a0; + } + + </style> + +</head> +<body unresolved> + + <section class="yellow-slider"> + + <div>Music, video, games & other media</div> + <paper-slider value="50"></paper-slider> + + <br> + <br> + + <div>Notifications</div> + <paper-slider value="50"></paper-slider> + + <br> + <br> + + <div>Alarms</div> + <paper-slider value="80"></paper-slider> + + </section> + + <br> + + <section> + + <div center horizontal layout> + <div>R</div> + <paper-slider value="23" max="255" editable></paper-slider> + </div> + + <br> + <br> + + <div center horizontal layout> + <div>G</div> + <paper-slider value="183" max="255" editable></paper-slider> + </div> + + <br> + <br> + + <div center horizontal layout> + <div>B</div> + <paper-slider value="211" max="255" editable></paper-slider> + </div> + + </section> + + <br> + + <section class="green-slider"> + + <div>Brightness</div> + <br> + <paper-slider pin value="50"></paper-slider> + + </section> + + <br> + + <section class="green-slider"> + + <div> + <span>Ratings</span><span id="ratingsLabel"></span> + </div> + <br> + <paper-slider id="ratings" pin snaps max="10" step="1" value="5"></paper-slider> + + </section> + + <script> + + var ratings = document.querySelector('#ratings'); + ratings.addEventListener('change', function() { + document.querySelector('#ratingsLabel').textContent = ratings.value; + }); + + </script> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-slider/index.html b/third_party/polymer/components-chromium/paper-slider/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-slider/metadata.html b/third_party/polymer/components-chromium/paper-slider/metadata.html new file mode 100644 index 0000000..bf83104 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="paper-slider" label="Slider" group="Paper"> + + <template> + <paper-slider></paper-slider> + </template> + + <template id="imports"> + <link rel="import" href="paper-slider.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-slider/paper-slider-extracted.js b/third_party/polymer/components-chromium/paper-slider/paper-slider-extracted.js new file mode 100644 index 0000000..c6af599 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/paper-slider-extracted.js @@ -0,0 +1,204 @@ + + + Polymer('paper-slider', { + + /** + * Fired when the slider's value changes. + * + * @event change + */ + + /** + * Fired when the slider's value changes due to manual interaction. + * + * Changes to the slider's value due to changes in an underlying + * bound variable will not trigger this event. + * + * @event manual-change + */ + + /** + * If true, the slider thumb snaps to tick marks evenly spaced based + * on the `step` property value. + * + * @attribute snaps + * @type boolean + * @default false + */ + snaps: false, + + /** + * If true, a pin with numeric value label is shown when the slider thumb + * is pressed. Use for settings for which users need to know the exact + * value of the setting. + * + * @attribute pin + * @type boolean + * @default false + */ + pin: false, + + /** + * If true, this slider is disabled. A disabled slider cannot be tapped + * or dragged to change the slider value. + * + * @attribute disabled + * @type boolean + * @default false + */ + disabled: false, + + /** + * The number that represents the current secondary progress. + * + * @attribute secondaryProgress + * @type number + * @default 0 + */ + secondaryProgress: 0, + + /** + * If true, an input is shown and user can use it to set the slider value. + * + * @attribute editable + * @type boolean + * @default false + */ + editable: false, + + /** + * The immediate value of the slider. This value is updated while the user + * is dragging the slider. + * + * @attribute immediateValue + * @type number + * @default 0 + */ + + observe: { + 'min max step snaps': 'update' + }, + + ready: function() { + this.update(); + }, + + update: function() { + this.positionKnob(this.calcRatio(this.value)); + this.updateMarkers(); + }, + + valueChanged: function() { + this.update(); + this.fire('change'); + }, + + expandKnob: function() { + this.$.sliderKnob.classList.add('expand'); + }, + + resetKnob: function() { + this.expandJob && this.expandJob.stop(); + this.$.sliderKnob.classList.remove('expand'); + }, + + positionKnob: function(ratio) { + this._ratio = ratio; + this.immediateValue = this.calcStep(this.calcKnobPosition()) || 0; + if (this.snaps) { + this._ratio = this.calcRatio(this.immediateValue); + } + this.$.sliderKnob.style.left = this._ratio * 100 + '%'; + }, + + immediateValueChanged: function() { + this.$.sliderKnob.classList.toggle('ring', this.immediateValue <= this.min); + }, + + inputChange: function() { + this.value = this.$.input.value; + this.fire('manual-change'); + }, + + calcKnobPosition: function() { + return (this.max - this.min) * this._ratio + this.min; + }, + + measureWidth: function() { + this._w = this.$.sliderBar.offsetWidth; + }, + + trackStart: function(e) { + this.measureWidth(); + this._x = this._ratio * this._w; + this._startx = this._x || 0; + this._minx = - this._startx; + this._maxx = this._w - this._startx; + this.$.sliderKnob.classList.add('dragging'); + e.preventTap(); + }, + + trackx: function(e) { + var x = Math.min(this._maxx, Math.max(this._minx, e.dx)); + this._x = this._startx + x; + this._ratio = this._x / this._w; + this.immediateValue = this.calcStep(this.calcKnobPosition()) || 0; + var s = this.$.sliderKnob.style; + s.transform = s.webkitTransform = 'translate3d(' + (this.snaps ? + (this.calcRatio(this.immediateValue) * this._w) - this._startx : x) + 'px, 0, 0)'; + }, + + trackEnd: function() { + var s = this.$.sliderKnob.style; + s.transform = s.webkitTransform = ''; + this.$.sliderKnob.classList.remove('dragging'); + this.resetKnob(); + this.value = this.immediateValue; + this.fire('manual-change'); + }, + + bardown: function(e) { + this.measureWidth(); + this.$.sliderKnob.classList.add('transiting'); + var rect = this.$.sliderBar.getBoundingClientRect(); + this.positionKnob((e.x - rect.left) / this._w); + this.value = this.calcStep(this.calcKnobPosition()); + this.expandJob = this.job(this.expandJob, this.expandKnob, 60); + this.fire('manual-change'); + }, + + knobTransitionEnd: function() { + this.$.sliderKnob.classList.remove('transiting'); + }, + + updateMarkers: function() { + this.markers = [], l = (this.max - this.min) / this.step; + for (var i = 0; i < l; i++) { + this.markers.push(''); + } + }, + + increment: function() { + this.value = this.clampValue(this.value + this.step); + }, + + decrement: function() { + this.value = this.clampValue(this.value - this.step); + }, + + keydown: function(e) { + if (this.disabled) { + return; + } + var c = e.keyCode; + if (c === 37) { + this.decrement(); + this.fire('manual-change'); + } else if (c === 39) { + this.increment(); + this.fire('manual-change'); + } + } + + }); + diff --git a/third_party/polymer/components-chromium/paper-slider/paper-slider.css b/third_party/polymer/components-chromium/paper-slider/paper-slider.css new file mode 100644 index 0000000..d201acf --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/paper-slider.css @@ -0,0 +1,193 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block; + width: 200px; + cursor: default; +} + +#sliderContainer { + position: relative; + width: calc(100% - 32px); + height: 32px; +} + +:host([editable]) #sliderContainer { + float: left; + width: calc(100% - 72px); +} + +#sliderBar { + position: absolute; + top: 15px; + left: 16px; + height: 2px; + width: 100%; + padding: 8px 0; + margin: -8px 0; +} + +.slider-markers { + position: absolute; + top: 15px; + left: 15px; + height: 2px; + width: calc(100% + 2px); + box-sizing: border-box; + pointer-events: none; + /* background-image: -webkit-linear-gradient(0deg, #ccc, #ccc 1px, transparent 1px, transparent); + background-size: 10%; */ +} + +.slider-markers::after, .slider-marker::after { + content: ""; + display: block; + width: 2px; + height: 2px; + border-radius: 50%; + background-color: black; +} + +#sliderBar::shadow #activeProgress { + background-color: #3f51b5; +} + +#sliderKnob { + position: absolute; + left: 0; + top: 0; + width: 32px; + height: 32px; +} + +#sliderKnob.transiting { + transition: left 0.08s ease; +} + +#sliderKnob:focus { + outline: none; +} + +#sliderKnob.dragging { + transition: none; +} + +#sliderKnob.snaps.dragging { + transition: -webkit-transform 0.08s ease; + transition: transform 0.08s ease; +} + +#sliderKnobInner { + width: 12px; + height: 12px; + box-sizing: border-box; + -moz-box-sizing: border-box; + border-radius: 50%; + background-color: #3f51b5; + /* FIXME(ffu): can't use the following. https://github.com/Polymer/platform/issues/53 */ + /* transition-property: height, width, background-color, border; + transition-duration: 0.1s; + transition-timing-function: ease; */ + transition: height 0.18s ease, width 0.18s ease, background-color 0.28s ease, border 0.18s ease; +} + +#sliderKnob.expand:not(.pin) > #sliderKnobInner { + width: 100%; + height: 100%; + -webkit-transform: translateZ(0); + transform: translateZ(0); +} + +#sliderKnob.ring > #sliderKnobInner { + background-color: #fff; + border: 2px solid #c8c8c8; +} + +#sliderKnobInner::before { + background-color: #3f51b5; +} + +#sliderKnob.pin > #sliderKnobInner::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 26px; + height: 26px; + margin-left: 3px; + border-radius: 50% 50% 50% 0; + -webkit-transform: rotate(-45deg) scale(0) translate(0); + transform: rotate(-45deg) scale(0) translate(0); +} + +#sliderKnobInner::before, #sliderKnobInner::after { + transition: -webkit-transform .2s ease, background-color .18s ease; + transition: transform .2s ease, background-color .18s ease; +} + +#sliderKnob.pin.ring > #sliderKnobInner::before { + background-color: #c8c8c8; +} + +#sliderKnob.pin.expand > #sliderKnobInner::before { + -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); + transform: rotate(-45deg) scale(1) translate(17px, -17px); +} + +#sliderKnob.pin > #sliderKnobInner::after { + /* FIXME(ffu): add dummy quotes to workaround https://github.com/Polymer/platform/issues/57 */ + content: attr(value) ""; + position: absolute; + top: 0; + left: 0; + width: 32px; + height: 26px; + text-align: center; + color: #fff; + font-size: 10px; + -webkit-transform: scale(0) translate(0); + transform: scale(0) translate(0); +} + +#sliderKnob.pin.expand > #sliderKnobInner::after { + -webkit-transform: scale(1) translate(0, -17px); + transform: scale(1) translate(0, -17px); +} + +.slider-input { + width: 40px; + height: 32px; + float: right; +} + +.slider-input::shadow input { + /* FIXME(ffu): should one be able set text-align directly on paper-input? */ + text-align: center; +} + +/* disabled state */ +:host([disabled]) #sliderContainer { + pointer-events: none; +} + +:host([disabled]) { + pointer-events: none; +} + +:host([disabled]) #sliderKnob > #sliderKnobInner { + width: 12px; + height: 12px; + background-color: #c8c8c8; + border: 2px solid #fff; +} + +:host([disabled]) #sliderContainer > #sliderBar::shadow #activeProgress { + background-color: #c8c8c8; +} diff --git a/third_party/polymer/components-chromium/paper-slider/paper-slider.html b/third_party/polymer/components-chromium/paper-slider/paper-slider.html new file mode 100644 index 0000000..cf1e182 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-slider/paper-slider.html @@ -0,0 +1,99 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-slider` allows user to select a value from a range of values by +moving the slider thumb. The interactive nature of the slider makes it a +great choice for settings that reflect intensity levels, such as volume, +brightness, or color saturation. + +Example: + + <paper-slider></paper-slider> + +Use `min` and `max` to specify the slider range. Default is 0 to 100. + +Example: + + <paper-slider min="10" max="200" value="110"></paper-slider> + +Styling slider: + +To change the slider progress bar color: + + paper-slider::shadow #sliderBar::shadow #activeProgress { + background-color: #0f9d58; + } + +To change the slider knob color: + + paper-slider::shadow #sliderKnobInner { + background-color: #0f9d58; + } + +To change the slider pin color: + + paper-slider::shadow #sliderKnobInner::before { + background-color: #0f9d58; + } + +To change the slider pin's value: + + paper-slider::shadow #sliderKnobInner::after { + color: #0f9d58 + } + +To change the slider secondary progress bar color: + + paper-slider::shadow #sliderBar::shadow #secondaryProgress { + background-color: #0f9d58; + } + +@group Paper Elements +@element paper-slider +@extends core-range +@homepage github.io +--> + +<link rel="import" href="../paper-progress/paper-progress.html"> +<link rel="import" href="../paper-input/paper-input.html"> + +<polymer-element name="paper-slider" extends="core-range" attributes="snaps pin disabled secondaryProgress editable immediateValue" assetpath=""> +<template> + + <link rel="stylesheet" href="paper-slider.css"> + + <div id="sliderContainer" on-keydown="{{keydown}}"> + + <paper-progress id="sliderBar" aria-hidden="true" min="{{min}}" max="{{max}}" value="{{immediateValue}}" secondaryprogress="{{secondaryProgress}}" on-down="{{bardown}}" on-up="{{resetKnob}}" on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-progress> + + <template if="{{snaps && !disabled}}"> + <div class="slider-markers" horizontal="" layout=""> + <template repeat="{{markers}}"> + <div flex="" class="slider-marker"></div> + </template> + </div> + </template> + + <div id="sliderKnob" class="{{ {pin : pin, snaps : snaps} | tokenList }}" on-down="{{expandKnob}}" on-up="{{resetKnob}}" on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}" on-transitionend="{{knobTransitionEnd}}" role="slider" aria-valuenow="{{value}}" aria-valuemin="{{min}}" aria-valuemax="{{max}}" aria-valuetext="{{value}}" tabindex="0" center-justified="" center="" horizontal="" layout=""> + + <div id="sliderKnobInner" value="{{immediateValue}}"></div> + + </div> + + </div> + + <template if="{{editable}}"> + <paper-input id="input" class="slider-input" value="{{immediateValue}}" validate="^[-+]?[0-9]*\.?[0-9]+$" disabled?="{{disabled}}" on-change="{{inputChange}}"></paper-input> + </template> + +</template> + +</polymer-element> +<script src="paper-slider-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-tabs/.bower.json b/third_party/polymer/components-chromium/paper-tabs/.bower.json new file mode 100644 index 0000000..cb017f2 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/.bower.json @@ -0,0 +1,23 @@ +{ + "name": "paper-tabs", + "private": true, + "dependencies": { + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-tabs", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "0b840eabda7aa69c2cf005e09e2ae1bb65b7c9c0" + }, + "_source": "git://github.com/Polymer/paper-tabs.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-tabs" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-tabs/README.md b/third_party/polymer/components-chromium/paper-tabs/README.md new file mode 100644 index 0000000..09c73c6 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/README.md @@ -0,0 +1,4 @@ +paper-tabs +============ + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-tabs) for more information. diff --git a/third_party/polymer/components-chromium/paper-tabs/bower.json b/third_party/polymer/components-chromium/paper-tabs/bower.json new file mode 100644 index 0000000..c11003a --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/bower.json @@ -0,0 +1,12 @@ +{ + "name": "paper-tabs", + "private": true, + "dependencies": { + "core-icons": "Polymer/core-icons#>=0.3.0 <1.0.0", + "core-selector": "Polymer/core-selector#>=0.3.0 <1.0.0", + "core-toolbar": "Polymer/core-toolbar#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-icon-button": "Polymer/paper-icon-button#>=0.3.0 <1.0.0", + "paper-ripple": "Polymer/paper-ripple#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-tabs/demo.html b/third_party/polymer/components-chromium/paper-tabs/demo.html new file mode 100644 index 0000000..3067fe7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/demo.html @@ -0,0 +1,157 @@ +<!doctype html> +<html> +<head> + <title>paper-tabs</title> + <meta name="viewport" content="width=device-width; initial-scale=1.0; max-scale=1.0; user-scalable=yes"> + <script src="../platform/platform.js"></script> + + <link rel="import" href="../core-icons/core-icons.html"> + <link rel="import" href="paper-tabs.html"> + <link rel="import" href="../core-toolbar/core-toolbar.html"> + <link rel="import" href="../paper-icon-button/paper-icon-button.html"> + <link rel="import" href="../font-roboto/roboto.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + color: #333; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + paper-tabs, core-toolbar { + background-color: #00bcd4; + color: #fff; + box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); + } + + core-toolbar paper-tabs { + box-shadow: none; + } + + paper-tabs[noink][nobar] paper-tab.core-selected { + color: #ffff8d; + } + + paper-tabs.transparent-teal { + background-color: transparent; + color: #00bcd4; + box-shadow: none; + } + + paper-tabs.transparent-teal::shadow #selectionBar { + background-color: #00bcd4; + } + + paper-tabs.transparent-teal paper-tab::shadow #ink { + color: #00bcd4; + } + + h3 { + font-size: 16px; + font-weight: 400; + } + + </style> + +</head> +<body unresolved> + + <h3>A. No ink effect and no sliding bar</h3> + + <paper-tabs selected="0" noink nobar> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + + </paper-tabs> + + <br> + <br> + + <h3>B. The bar slides to the selected tab</h3> + + <paper-tabs selected="0" noink> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + + </paper-tabs> + + <br> + <br> + + <h3>C. Inky Tabs</h3> + + <paper-tabs selected="0"> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + + </paper-tabs> + + <br> + <br> + + <paper-tabs selected="0" class="transparent-teal"> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + + </paper-tabs> + + <br> + <br> + + <core-toolbar class="medium-tall"> + + <paper-icon-button icon="menu"></paper-icon-button> + <div flex>Title</div> + <paper-icon-button icon="search"></paper-icon-button> + <paper-icon-button icon="more-vert"></paper-icon-button> + + <div class="bottom fit" horizontal layout> + + <paper-tabs selected="0" flex style="max-width: 600px;"> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + + </paper-tabs> + + </div> + + </core-toolbar> + + <br> + <br> + + <core-toolbar class="tall"> + + <paper-tabs selected="0" class="bottom indent" style="width: 200px;" self-end> + + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + + </paper-tabs> + + <div class="bottom" flex></div> + + <paper-icon-button class="bottom" icon="search"></paper-icon-button> + + </core-toolbar> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-tabs/index.html b/third_party/polymer/components-chromium/paper-tabs/index.html new file mode 100644 index 0000000..93257d3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page sources='["paper-tabs.html", "paper-tab.html"]'></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-tabs/metadata.html b/third_party/polymer/components-chromium/paper-tabs/metadata.html new file mode 100644 index 0000000..2bf4c83 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/metadata.html @@ -0,0 +1,49 @@ +<x-meta id="paper-tabs" label="Tabs" group="Paper" isContainer> + + <template> + <paper-tabs selected="0" style="width: 480px; background-color: #00bcd4; color: #fff; box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2);"> + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + <paper-tab>ITEM THREE</paper-tab> + <paper-tab>ITEM FOUR</paper-tab> + <paper-tab>ITEM FIVE</paper-tab> + </paper-tabs> + </template> + + <template id="imports"> + <link rel="import" href="paper-tabs.html"> + </template> + +</x-meta> + + +<x-meta id="paper-tab" label="Tab" group="Paper"> + + <template> + <paper-tab style="width: 120px; height: 40px;">TAB</paper-tab> + </template> + + <template id="imports"> + <link rel="import" href="paper-tab.html"> + </template> + +</x-meta> + +<x-meta id="paper-tab-panel" label="Panel with Tabs" group="Paper" isContainer> + + <template> + <section layout vertical style="width:420px;height:630px;border:5px solid #ccc;"> + <paper-tabs selected="0" noink nobar style="background-color:#00bcd4; color:#fff;box-shadow:0px 3px 2px rgba(0, 0, 0, 0.2);"> + <paper-tab>ITEM ONE</paper-tab> + <paper-tab>ITEM TWO</paper-tab> + </paper-tabs> + <section flex relative> + </section> + </section> + </template> + + <template id="imports"> + <link rel="import" href="paper-tabs.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tab-extracted.js b/third_party/polymer/components-chromium/paper-tabs/paper-tab-extracted.js new file mode 100644 index 0000000..38a99f9 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tab-extracted.js @@ -0,0 +1,15 @@ + + + Polymer('paper-tab', { + + /** + * If true, ink ripple effect is disabled. + * + * @attribute noink + * @type boolean + * @default false + */ + noink: false + + }); + diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tab.css b/third_party/polymer/components-chromium/paper-tabs/paper-tab.css new file mode 100644 index 0000000..74ad3d1 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tab.css @@ -0,0 +1,49 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; + overflow: hidden; +} + +#tabContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +.tab-content { + transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1), color .1s cubic-bezier(0.4, 0.0, 1, 1); + cursor: default; + pointer-events: none; +} + +:host(:not(.core-selected)) .tab-content { + opacity: 0.6; +} + +#ink { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + color: #ffff8d; +} + +:host[noink] #ink { + pointer-events: none; +} + +:host-context(paper-tabs[noink]) #ink { + pointer-events: none; +} diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tab.html b/third_party/polymer/components-chromium/paper-tabs/paper-tab.html new file mode 100644 index 0000000..9129746 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tab.html @@ -0,0 +1,52 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-tab` is styled to look like a tab. It should be used in conjunction with +`paper-tabs`. + +Example: + + <paper-tabs selected="0"> + <paper-tab>TAB 1</paper-tab> + <paper-tab>TAB 2</paper-tab> + <paper-tab>TAB 3</paper-tab> + </paper-tabs> + +Styling tab: + +To change the ink color: + + .pink paper-tab::shadow #ink { + color: #ff4081; + } + +@group Paper Elements +@element paper-tab +@homepage github.io +--> + +<link rel="import" href="../paper-ripple/paper-ripple.html"> + +<polymer-element name="paper-tab" attributes="noink" role="tab" assetpath=""> +<template> + + <link rel="stylesheet" href="paper-tab.css"> + + <div id="tabContainer" center-justified="" center="" horizontal="" layout=""> + + <div class="tab-content"><content></content></div> + <paper-ripple id="ink" initialopacity="0.95" opacitydecayvelocity="0.98"></paper-ripple> + + </div> + +</template> + +</polymer-element> +<script src="paper-tab-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tabs-extracted.js b/third_party/polymer/components-chromium/paper-tabs/paper-tabs-extracted.js new file mode 100644 index 0000000..5c0feee --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tabs-extracted.js @@ -0,0 +1,69 @@ + + + Polymer('paper-tabs', { + + /** + * If true, ink effect is disabled. + * + * @attribute noink + * @type boolean + * @default false + */ + noink: false, + + /** + * If true, the bottom bar to indicate the selected tab will not be shown. + * + * @attribute nobar + * @type boolean + * @default false + */ + nobar: false, + + activateEvent: 'down', + + nostretch: false, + + selectedIndexChanged: function(old) { + var s = this.$.selectionBar.style; + + if (!this.selectedItem) { + s.width = 0; + s.left = 0; + return; + } + + var w = 100 / this.items.length; + + if (this.nostretch || old === null || old === -1) { + s.width = w + '%'; + s.left = this.selectedIndex * w + '%'; + return; + } + + var m = 5; + this.$.selectionBar.classList.add('expand'); + if (old < this.selectedIndex) { + s.width = w + w * (this.selectedIndex - old) - m + '%'; + } else { + s.width = w + w * (old - this.selectedIndex) - m + '%'; + s.left = this.selectedIndex * w + m + '%'; + } + }, + + barTransitionEnd: function() { + var cl = this.$.selectionBar.classList; + if (cl.contains('expand')) { + cl.remove('expand'); + cl.add('contract'); + var s = this.$.selectionBar.style; + var w = 100 / this.items.length; + s.width = w + '%'; + s.left = this.selectedIndex * w + '%'; + } else if (cl.contains('contract')) { + cl.remove('contract'); + } + } + + }); + diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tabs.css b/third_party/polymer/components-chromium/paper-tabs/paper-tabs.css new file mode 100644 index 0000000..b247c1c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tabs.css @@ -0,0 +1,57 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + position: relative; + font-size: 14px; + font-weight: 500; + height: 48px; + overflow: hidden; +} + +#tabsContainer { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + white-space: nowrap; +} + +#selectionBar { + position: absolute; + height: 2px; + bottom: 0; + left: 0; + width: 0; + background-color: #ffff8d; + transition: width, left; +} + +#selectionBar[hidden] { + display: hidden; +} + +#selectionBar.expand { + transition-duration: 0.15s; + transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1); +} + +#selectionBar.contract { + transition-duration: 0.1s; + transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1); +} + +polyfill-next-selector { content: '#tabsContainer > *:not(#selectionBar)'; } +::content > * { + -ms-flex: 1; + -webkit-flex: 1; + flex: 1; +} diff --git a/third_party/polymer/components-chromium/paper-tabs/paper-tabs.html b/third_party/polymer/components-chromium/paper-tabs/paper-tabs.html new file mode 100644 index 0000000..041d62b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-tabs/paper-tabs.html @@ -0,0 +1,60 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-tabs` is a `core-selector` styled to look like tabs. Tabs make it easy to +explore and switch between different views or functional aspects of an app, or +to browse categorized data sets. + +Use `selected` property to get or set the selected tab. + +Example: + + <paper-tabs selected="0"> + <paper-tab>TAB 1</paper-tab> + <paper-tab>TAB 2</paper-tab> + <paper-tab>TAB 3</paper-tab> + </paper-tabs> + +See <a href="#paper-tab">paper-tab</a> for more information about +`paper-tab`. + +Styling tabs: + +To change the sliding bar color: + + paper-tabs.pink::shadow #selectionBar { + background-color: #ff4081; + } + +@group Paper Elements +@element paper-tabs +@extends core-selector +@homepage github.io +--> + +<link rel="import" href="../core-selector/core-selector.html"> +<link rel="import" href="paper-tab.html"> + +<polymer-element name="paper-tabs" extends="core-selector" attributes="noink nobar" role="tablist" assetpath=""> +<template> + + <link rel="stylesheet" href="paper-tabs.css"> + + <div id="tabsContainer" horizontal="" layout=""> + + <shadow></shadow> + <div id="selectionBar" hidden?="{{nobar}}" on-transitionend="{{barTransitionEnd}}"></div> + + </div> + +</template> + +</polymer-element> +<script src="paper-tabs-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toast/.bower.json b/third_party/polymer/components-chromium/paper-toast/.bower.json new file mode 100644 index 0000000..363fdff --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/.bower.json @@ -0,0 +1,21 @@ +{ + "name": "paper-toast", + "private": true, + "dependencies": { + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-toast", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "1e7e60127901675f181f6c4385e520a0bc6df607" + }, + "_source": "git://github.com/Polymer/paper-toast.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-toast" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toast/README.md b/third_party/polymer/components-chromium/paper-toast/README.md new file mode 100644 index 0000000..9db6676 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/README.md @@ -0,0 +1,4 @@ +paper-toast +============ + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-toast) for more information. diff --git a/third_party/polymer/components-chromium/paper-toast/bower.json b/third_party/polymer/components-chromium/paper-toast/bower.json new file mode 100644 index 0000000..3c34334 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/bower.json @@ -0,0 +1,10 @@ +{ + "name": "paper-toast", + "private": true, + "dependencies": { + "core-media-query": "Polymer/core-media-query#>=0.3.0 <1.0.0", + "core-overlay": "Polymer/core-overlay#>=0.3.0 <1.0.0", + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-button": "Polymer/paper-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toast/demo.html b/third_party/polymer/components-chromium/paper-toast/demo.html new file mode 100644 index 0000000..a614973 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/demo.html @@ -0,0 +1,58 @@ +<!doctype html> +<html> +<head> + <title>paper-toast</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-toast.html"> + <link rel="import" href="../font-roboto/roboto.html" > + <link rel="import" href="../paper-button/paper-button.html" > + + <style> + + html, body { + height: 100%; + } + + body { + overflow: hidden; + margin: 0; + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + paper-button { + margin: 20px; + } + + </style> + +</head> +<body unresolved> + + <paper-button raisedButton onclick="document.querySelector('#toast1').show()" label="Discard Draft"></paper-button> + + <paper-button raisedButton onclick="document.querySelector('#toast2').show()" label="Get Messages"></paper-button> + + <paper-button raisedButton onclick="document.querySelector('#toast3').show()" label="Send Message"></paper-button> + + <paper-toast id="toast1" text="Your draft has been discarded."></paper-toast> + + <paper-toast id="toast2" role="alert" text="Connection timed out. Showing limited messages."> + <div style="color: #eeff41;" onclick="console.log('RETRY')">Retry</div> + </paper-toast> + + <paper-toast id="toast3" class="capsule" text="Message sent" style="padding-right: 60px;"></paper-toast> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-toast/index.html b/third_party/polymer/components-chromium/paper-toast/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-toast/metadata.html b/third_party/polymer/components-chromium/paper-toast/metadata.html new file mode 100644 index 0000000..7b65bd7 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/metadata.html @@ -0,0 +1,11 @@ +<x-meta id="paper-toast" label="Toast" group="Paper" isContainer> + + <template> + <paper-toast text="Toast!"></paper-toast> + </template> + + <template id="imports"> + <link rel="import" href="paper-toast.html"> + </template> + +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-toast/paper-toast-extracted.js b/third_party/polymer/components-chromium/paper-toast/paper-toast-extracted.js new file mode 100644 index 0000000..11eb068 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/paper-toast-extracted.js @@ -0,0 +1,169 @@ + + + (function() { + + var currentToast; + + Polymer('paper-toast', { + + /** + * The text shows in a toast. + * + * @attribute text + * @type string + * @default '' + */ + text: '', + + /** + * The duration in milliseconds to show the toast. + * + * @attribute duration + * @type number + * @default 3000 + */ + duration: 3000, + + /** + * Set opened to true to show the toast and to false to hide it. + * + * @attribute opened + * @type boolean + * @default false + */ + opened: false, + + /** + * Min-width when the toast changes to narrow layout. In narrow layout, + * the toast fits at the bottom of the screen when opened. + * + * @attribute responsiveWidth + * @type string + * @default '480px' + */ + responsiveWidth: '480px', + + /** + * If true, the toast can't be swiped. + * + * @attribute swipeDisabled + * @type boolean + * @default false + */ + swipeDisabled: false, + + eventDelegates: { + trackstart: 'trackStart', + track: 'track', + trackend: 'trackEnd', + transitionend: 'transitionEnd' + }, + + narrowModeChanged: function() { + this.classList.toggle('fit-bottom', this.narrowMode); + }, + + openedChanged: function() { + if (this.opened) { + this.dismissJob = this.job(this.dismissJob, this.dismiss, this.duration); + } else { + this.dismissJob && this.dismissJob.stop(); + this.dismiss(); + } + }, + + /** + * Toggle the opened state of the toast. + * @method toggle + */ + toggle: function() { + this.opened = !this.opened; + }, + + /** + * Show the toast for the specified duration + * @method show + */ + show: function() { + if (currentToast) { + currentToast.dismiss(); + } + currentToast = this; + this.opened = true; + }, + + /** + * Dismiss the toast and hide it. + * @method dismiss + */ + dismiss: function() { + if (this.dragging) { + this.shouldDismiss = true; + } else { + this.opened = false; + if (currentToast === this) { + currentToast = null; + } + } + }, + + trackStart: function(e) { + if (!this.swipeDisabled) { + e.preventTap(); + this.vertical = e.yDirection; + this.w = this.offsetWidth; + this.h = this.offsetHeight; + this.dragging = true; + this.classList.add('dragging'); + } + }, + + track: function(e) { + if (this.dragging) { + var s = this.style; + if (this.vertical) { + var y = e.dy; + s.opacity = (this.h - Math.abs(y)) / this.h; + s.webkitTransform = s.transform = 'translate3d(0, ' + y + 'px, 0)'; + } else { + var x = e.dx; + s.opacity = (this.w - Math.abs(x)) / this.w; + s.webkitTransform = s.transform = 'translate3d(' + x + 'px, 0, 0)'; + } + } + }, + + trackEnd: function(e) { + if (this.dragging) { + this.classList.remove('dragging'); + this.style.opacity = null; + this.style.webkitTransform = this.style.transform = null; + var cl = this.classList; + if (this.vertical) { + cl.toggle('fade-out-down', e.yDirection === 1 && e.dy > 0); + cl.toggle('fade-out-up', e.yDirection === -1 && e.dy < 0); + } else { + cl.toggle('fade-out-right', e.xDirection === 1 && e.dx > 0); + cl.toggle('fade-out-left', e.xDirection === -1 && e.dx < 0); + } + this.dragging = false; + } + }, + + transitionEnd: function() { + var cl = this.classList; + if (cl.contains('fade-out-right') || cl.contains('fade-out-left') || + cl.contains('fade-out-down') || cl.contains('fade-out-up')) { + this.dismiss(); + cl.remove('fade-out-right', 'fade-out-left', + 'fade-out-down', 'fade-out-up'); + } else if (this.shouldDismiss) { + this.dismiss(); + } + this.shouldDismiss = false; + } + + }); + + })(); + diff --git a/third_party/polymer/components-chromium/paper-toast/paper-toast.css b/third_party/polymer/components-chromium/paper-toast/paper-toast.css new file mode 100644 index 0000000..a677104 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/paper-toast.css @@ -0,0 +1,80 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block; + background: #323232; + color: #f1f1f1; + min-height: 48px; + min-width: 288px; + padding: 16px 24px 12px; + box-sizing: border-box; + -moz-box-sizing: border-box; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); + border-radius: 2px; + bottom: 12px; + left: 12px; + font-size: 14px; + cursor: default; +} + +:host(.capsule) { + border-radius: 24px; +} + +:host(.fit-bottom) { + bottom: 0; + left: 0; + width: 100%; + min-width: 0; + border-radius: 0; +} + +:host(.core-transition.dragging) { + transition: none; +} + +:host(.core-transition.fade-out-down), +:host(.core-transition.fade-out-up), +:host(.core-transition.fade-out-right), +:host(.core-transition.fade-out-left) { + opacity: 0; + transition: -webkit-transform 0.08s ease-in-out, opacity 0.08s ease-in-out; + transition: transform 0.08s ease-in-out, opacity 0.08s ease-in-out; +} + +:host(.core-transition.fade-out-down) { + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%); +} + +:host(.core-transition.fade-out-up) { + -webkit-transform: translate(0, -100%); + transform: translate(0, -100%); +} + +:host(.core-transition.fade-out-right) { + -webkit-transform: translate(100%, 0); + transform: translate(100%, 0); +} + +:host(.core-transition.fade-out-left) { + -webkit-transform: translate(-100%, 0); + transform: translate(-100%, 0); +} + +.toast-container { + overflow: hidden; +} + +.toast-action { + padding-left: 24px; + cursor: pointer; + text-transform: uppercase; +} diff --git a/third_party/polymer/components-chromium/paper-toast/paper-toast.html b/third_party/polymer/components-chromium/paper-toast/paper-toast.html new file mode 100644 index 0000000..c1378b2 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toast/paper-toast.html @@ -0,0 +1,90 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-toast` provides lightweight feedback about an operation in a small popup +at the base of the screen on mobile and at the lower left on desktop. Toasts are +above all other elements on screen, including the FAB. + +Toasts automatically disappear after a timeout or after user interaction +elsewhere on the screen, whichever comes first. Toasts can be swiped off +screen. There can be only one on the screen at a time. + +Example: + + <paper-toast text="Your draft has been discarded." onclick="discardDraft(el)"></paper-toast> + + <script> + function discardDraft(el) { + el.show(); + } + </script> + +An action button can be presented in the toast. + +Example (using Polymer's data-binding features): + + <paper-toast id="toast2" text="Connection timed out. Showing limited messages."> + <div style="color: blue;" on-tap="{{retry}}">Retry</div> + </paper-toast> + +Positioning toast: + +A standard toast appears near the lower left of the screen. You can change the +position by overriding bottom and left positions. + + paper-toast { + bottom: 40px; + left: 10px; + } + +To make it fit at the bottom of the screen: + + paper-toast { + bottom: 0; + left: 0; + width: 100%; + } + +When the screen size is smaller than the `responsiveWidth` (default to 480px), +the toast will automatically fits at the bottom of the screen. + +@group Paper Elements +@element paper-toast +@homepage github.io +--> + +<link rel="import" href="../core-overlay/core-overlay.html"> +<link rel="import" href="../core-transition/core-transition-css.html"> +<link rel="import" href="../core-media-query/core-media-query.html"> + +<polymer-element name="paper-toast" attributes="text duration opened responsiveWidth swipeDisabled" role="status" assetpath=""> + +<template> + + <link rel="stylesheet" href="paper-toast.css"> + + <core-overlay opened="{{opened}}" target="{{}}" sizingtarget="{{$.container}}" transition="core-transition-bottom"></core-overlay> + + <div class="toast-container" horizontal="" layout=""> + + <div class="toast-text" flex="">{{text}}</div> + + <div class="toast-text toast-action" on-tap="{{dismiss}}"> + <content></content> + </div> + + </div> + + <core-media-query query="max-width: {{responsiveWidth}}" querymatches="{{narrowMode}}"></core-media-query> + +</template> + +</polymer-element> +<script src="paper-toast-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toggle-button/.bower.json b/third_party/polymer/components-chromium/paper-toggle-button/.bower.json new file mode 100644 index 0000000..cdb3e3b --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "paper-toggle-button", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/paper-toggle-button", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "0f73aaad8fa48b13e2b0e26da85af846ee0222cd" + }, + "_source": "git://github.com/Polymer/paper-toggle-button.git", + "_target": "0.3.5", + "_originalSource": "Polymer/paper-toggle-button" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toggle-button/README.md b/third_party/polymer/components-chromium/paper-toggle-button/README.md new file mode 100644 index 0000000..314fd66 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/README.md @@ -0,0 +1,4 @@ +paper-toggle-button +=================== + +See the [component page](http://www.polymer-project.org/docs/elements/paper-elements.html#paper-toggle-button) for more information. diff --git a/third_party/polymer/components-chromium/paper-toggle-button/bower.json b/third_party/polymer/components-chromium/paper-toggle-button/bower.json new file mode 100644 index 0000000..67a2f4c --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/bower.json @@ -0,0 +1,8 @@ +{ + "name": "paper-toggle-button", + "private": true, + "dependencies": { + "font-roboto": "Polymer/font-roboto#>=0.3.0 <1.0.0", + "paper-radio-button": "Polymer/paper-radio-button#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toggle-button/demo.html b/third_party/polymer/components-chromium/paper-toggle-button/demo.html new file mode 100644 index 0000000..72fc07a --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/demo.html @@ -0,0 +1,68 @@ +<!doctype html> +<html> +<head> + <title>paper-toggle-button</title> + + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + + <script src="../platform/platform.js"></script> + + <link rel="import" href="paper-toggle-button.html"> + <link rel="import" href="../font-roboto/roboto.html"> + + <style shim-shadowdom> + + body { + font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial; + margin: 0; + padding: 24px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout: none; + } + + section { + width: 200px; + } + + paper-toggle-button.blue::shadow paper-radio-button::shadow #ink[checked] { + color: #4285f4; + } + + paper-toggle-button.blue::shadow paper-radio-button::shadow #onRadio { + background-color: #4285f4; + } + + paper-toggle-button.blue::shadow #toggleBar[checked] { + background-color: #4285f4; + } + + </style> + +</head> +<body unresolved> + + <section> + + <div center horizontal layout> + <div flex>Wi-Fi</div> + <paper-toggle-button checked></paper-toggle-button> + </div> + + <br> + <br> + + <div center horizontal layout> + <div flex>Bluetooth</div> + <paper-toggle-button class="blue"></paper-toggle-button> + </div> + + </section> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-toggle-button/index.html b/third_party/polymer/components-chromium/paper-toggle-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/index.html @@ -0,0 +1,22 @@ +<!doctype html> +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE +The complete set of authors may be found at http://polymer.github.io/AUTHORS +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS +--> +<html> +<head> + + <script src="../platform/platform.js"></script> + <link rel="import" href="../core-component-page/core-component-page.html"> + +</head> +<body unresolved> + + <core-component-page></core-component-page> + +</body> +</html> diff --git a/third_party/polymer/components-chromium/paper-toggle-button/metadata.html b/third_party/polymer/components-chromium/paper-toggle-button/metadata.html new file mode 100644 index 0000000..bdddd00 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/metadata.html @@ -0,0 +1,8 @@ +<x-meta id="paper-toggle-button" label="Toggle Button" group="Paper"> + <template> + <paper-toggle-button></paper-toggle-button> + </template> + <template id="imports"> + <link rel="import" href="paper-toggle-button.html"> + </template> +</x-meta> diff --git a/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button-extracted.js b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button-extracted.js new file mode 100644 index 0000000..9a30f6a --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button-extracted.js @@ -0,0 +1,46 @@ + + + Polymer('paper-toggle-button', { + + /** + * Fired when the checked state changes. + * + * @event change + */ + + /** + * Gets or sets the state, `true` is checked and `false` is unchecked. + * + * @attribute checked + * @type boolean + * @default false + */ + checked: false, + + trackStart: function(e) { + this._w = this.$.toggleBar.offsetLeft + this.$.toggleBar.offsetWidth; + e.preventTap(); + }, + + trackx: function(e) { + this._x = Math.min(this._w, + Math.max(0, this.checked ? this._w + e.dx : e.dx)); + this.$.toggleRadio.classList.add('dragging'); + var s = this.$.toggleRadio.style; + s.webkitTransform = s.transform = 'translate3d(' + this._x + 'px,0,0)'; + }, + + trackEnd: function() { + var s = this.$.toggleRadio.style; + s.webkitTransform = s.transform = null; + this.$.toggleRadio.classList.remove('dragging'); + this.checked = Math.abs(this._x) > this._w / 2; + }, + + checkedChanged: function() { + this.setAttribute('aria-pressed', Boolean(this.checked)); + this.fire('change'); + } + + }); + diff --git a/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.css b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.css new file mode 100644 index 0000000..3ff5e23 --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.css @@ -0,0 +1,61 @@ +/* +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: inline-block; +} + +:host(:focus) { + outline: none; +} + +#toggleContainer { + position: relative; + width: 64px; + height: 16px; +} + +#toggleBar { + position: absolute; + top: 8px; + left: 16px; + height: 1px; + width: 32px; + background-color: #5a5a5a; + pointer-events: none; +} + +#toggleBar[checked] { + background-color: #0f9d58; +} + +#toggleContainer[checked] #checkedBar { + width: 100%; +} + +#toggleRadio { + position: absolute; + left: 0; + padding: 8px 48px 8px 0; + margin: -8px -48px -8px 0; + transition: -webkit-transform linear .08s; + transition: transform linear .08s; +} + +#toggleRadio[checked] { + -webkit-transform: translate(48px, 0); + transform: translate(48px, 0); + padding: 8px 0 8px 48px; + margin: -8px 0 -8px -48px; +} + +#toggleRadio.dragging { + -webkit-transition: none; + transition: none; +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.html b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.html new file mode 100644 index 0000000..6c7cf1d --- /dev/null +++ b/third_party/polymer/components-chromium/paper-toggle-button/paper-toggle-button.html @@ -0,0 +1,79 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +`paper-toggle-button` provides a ON/OFF switch that user can toggle the state +by tapping or by dragging the swtich. + +Example: + + <paper-toggle-button></paper-toggle-button> + +Styling toggle button: + +To change the ink color for checked state: + + paper-toggle-button::shadow paper-radio-button::shadow #ink[checked] { + color: #4285f4; + } + +To change the radio checked color: + + paper-toggle-button::shadow paper-radio-button::shadow #onRadio { + background-color: #4285f4; + } + +To change the bar color for checked state: + + paper-toggle-button::shadow #toggleBar[checked] { + background-color: #4285f4; + } + +To change the ink color for unchecked state: + + paper-toggle-button::shadow paper-radio-button::shadow #ink { + color: #b5b5b5; + } + +To change the radio unchecked color: + + paper-toggle-button::shadow paper-radio-button::shadow #offRadio { + border-color: #b5b5b5; + } + +To change the bar color for unchecked state: + + paper-toggle-button::shadow #toggleBar { + background-color: red; + } + +@group Paper Elements +@element paper-toggle-button +@homepage github.io +--> + +<link rel="import" href="../paper-radio-button/paper-radio-button.html"> + +<polymer-element name="paper-toggle-button" attributes="checked" role="button" aria-pressed="false" tabindex="0" assetpath=""> +<template> + + <link rel="stylesheet" href="paper-toggle-button.css"> + + <div id="toggleContainer"> + + <div id="toggleBar" checked?="{{checked}}"></div> + + <paper-radio-button id="toggleRadio" toggles="" checked="{{checked}}" on-trackstart="{{trackStart}}" on-trackx="{{trackx}}" on-trackend="{{trackEnd}}"></paper-radio-button> + + </div> + +</template> + +</polymer-element> +<script src="paper-toggle-button-extracted.js"></script>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/platform/.bower.json b/third_party/polymer/components-chromium/platform/.bower.json new file mode 100644 index 0000000..8d1af04 --- /dev/null +++ b/third_party/polymer/components-chromium/platform/.bower.json @@ -0,0 +1,26 @@ +{ + "name": "platform", + "main": "platform.js", + "homepage": "https://github.com/Polymer/platform", + "authors": [ + "The Polymer Authors" + ], + "description": "Integrate platform polyfills: load, build, test", + "keywords": [ + "polymer", + "web", + "components" + ], + "license": "BSD", + "private": true, + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "413707498b62d2c66f923dcac6809d56e7d6dab6" + }, + "_source": "git://github.com/Polymer/platform.git", + "_target": "0.3.5", + "_originalSource": "Polymer/platform" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/platform/README.md b/third_party/polymer/components-chromium/platform/README.md new file mode 100644 index 0000000..65b661e --- /dev/null +++ b/third_party/polymer/components-chromium/platform/README.md @@ -0,0 +1,6 @@ +Platform +======== + +Aggregated polyfills the Polymer platform. + +[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/platform/README)](https://github.com/igrigorik/ga-beacon) diff --git a/third_party/polymer/components-chromium/platform/bower.json b/third_party/polymer/components-chromium/platform/bower.json new file mode 100644 index 0000000..8d2c51d --- /dev/null +++ b/third_party/polymer/components-chromium/platform/bower.json @@ -0,0 +1,16 @@ +{ + "name": "platform", + "main": "platform.js", + "homepage": "https://github.com/Polymer/platform", + "authors": [ + "The Polymer Authors" + ], + "description": "Integrate platform polyfills: load, build, test", + "keywords": [ + "polymer", + "web", + "components" + ], + "license": "BSD", + "private": true +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/platform/build.log b/third_party/polymer/components-chromium/platform/build.log new file mode 100644 index 0000000..90d5a17 --- /dev/null +++ b/third_party/polymer/components-chromium/platform/build.log @@ -0,0 +1,39 @@ +BUILD LOG +--------- +Build Time: 2014-08-07T17:12:14 + +NODEJS INFORMATION +================== +nodejs: v0.10.28 +chai: 1.9.1 +grunt: 0.4.4 +grunt-audit: 0.0.3 +grunt-concat-sourcemap: 0.4.1 +grunt-contrib-concat: 0.4.0 +grunt-contrib-uglify: 0.5.0 +grunt-contrib-yuidoc: 0.5.2 +grunt-karma: 0.8.3 +karma: 0.12.14 +karma-crbot-reporter: 0.0.4 +karma-firefox-launcher: 0.1.3 +karma-ie-launcher: 0.1.5 +karma-mocha: 0.1.4 +karma-safari-launcher: 0.1.1 +karma-script-launcher: 0.1.0 +mocha: 1.20.1 +Platform: 0.3.5 + +REPO REVISIONS +============== +CustomElements: 7fb280cb30f9fe26ed60c0fdb75a1eebe4c9dab1 +HTMLImports: fe9a92700b7a0bc7a9d582f4767ab23ec195a423 +NodeBind: c47bc1b40d1cf0123b29620820a7111471e83ff3 +ShadowDOM: c4da63735ba6c00a7d6af5c1b118f84bd6a2e114 +TemplateBinding: f11e2e7faa074f54e711f5abb40e278f3005500d +WeakMap: 6662df5cb7146707238b08e7a65cf70056ae516a +observe-js: 08b8dfa21bf49d9ac60bc495e77a0bfa57f84cde +platform-dev: e1453ea29013959ee3e1f893eaf97806629631dc + +BUILD HASHES +============ +build/platform.js: d4d1dc11321913bf930bb5109da0b5ed434c0a00
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/platform/platform.js b/third_party/polymer/components-chromium/platform/platform.js new file mode 100644 index 0000000..3cd0e51 --- /dev/null +++ b/third_party/polymer/components-chromium/platform/platform.js @@ -0,0 +1,17 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version: 0.3.5 + +window.Platform=window.Platform||{},window.logFlags=window.logFlags||{},function(a){var b=a.flags||{};location.search.slice(1).split("&").forEach(function(a){a=a.split("="),a[0]&&(b[a[0]]=a[1]||!0)});var c=document.currentScript||document.querySelector('script[src*="platform.js"]');if(c)for(var d,e=c.attributes,f=0;f<e.length;f++)d=e[f],"src"!==d.name&&(b[d.name]=d.value||!0);b.log&&b.log.split(",").forEach(function(a){window.logFlags[a]=!0}),b.shadow=b.shadow||b.shadowdom||b.polyfill,b.shadow="native"===b.shadow?!1:b.shadow||!HTMLElement.prototype.createShadowRoot,b.shadow&&document.querySelectorAll("script").length>1&&console.warn("platform.js is not the first script on the page. See http://www.polymer-project.org/docs/start/platform.html#setup for details."),b.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=b.register),b.imports&&(window.HTMLImports=window.HTMLImports||{flags:{}},window.HTMLImports.flags.imports=b.imports),a.flags=b}(Platform),"undefined"==typeof WeakMap&&!function(){var a=Object.defineProperty,b=Date.now()%1e9,c=function(){this.name="__st"+(1e9*Math.random()>>>0)+(b++ +"__")};c.prototype={set:function(b,c){var d=b[this.name];d&&d[0]===b?d[1]=c:a(b,this.name,{value:[b,c],writable:!0})},get:function(a){var b;return(b=a[this.name])&&b[0]===a?b[1]:void 0},"delete":function(a){var b=a[this.name];if(!b)return!1;var c=b[0]===a;return b[0]=b[1]=void 0,c},has:function(a){var b=a[this.name];return b?b[0]===a:!1}},window.WeakMap=c}(),function(global){"use strict";function detectObjectObserve(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={},d=[];return Object.observe(c,a),Array.observe(d,a),c.id=1,c.id=2,delete c.id,d.push(1,2),d.length=0,Object.deliverChangeRecords(a),5!==b.length?!1:"add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type||"splice"!=b[3].type||"splice"!=b[4].type?!1:(Object.unobserve(c,a),Array.unobserve(d,a),!0)}function detectEval(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var a=new Function("","return true;");return a()}catch(b){return!1}}function isIndex(a){return+a===a>>>0}function toNumber(a){return+a}function isObject(a){return a===Object(a)}function areSameValue(a,b){return a===b?0!==a||1/a===1/b:numberIsNaN(a)&&numberIsNaN(b)?!0:a!==a&&b!==b}function getPathCharType(a){if(void 0===a)return"eof";var b=a.charCodeAt(0);switch(b){case 91:case 93:case 46:case 34:case 39:case 48:return a;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return b>=97&&122>=b||b>=65&&90>=b?"ident":b>=49&&57>=b?"number":"else"}function noop(){}function parsePath(a){function b(){if(!(k>=a.length)){var b=a[k+1];return"inSingleQuote"==l&&"'"==b||"inDoubleQuote"==l&&'"'==b?(k++,d=b,m.append(),!0):void 0}}for(var c,d,e,f,g,h,i,j=[],k=-1,l="beforePath",m={push:function(){void 0!==e&&(j.push(e),e=void 0)},append:function(){void 0===e?e=d:e+=d}};l;)if(k++,c=a[k],"\\"!=c||!b(l)){if(f=getPathCharType(c),i=pathStateMachine[l],g=i[f]||i["else"]||"error","error"==g)return;if(l=g[0],h=m[g[1]]||noop,d=void 0===g[2]?c:g[2],h(),"afterPath"===l)return j}}function isIdent(a){return identRegExp.test(a)}function Path(a,b){if(b!==constructorIsPrivate)throw Error("Use Path.get to retrieve path objects");for(var c=0;c<a.length;c++)this.push(String(a[c]));hasEval&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn())}function getPath(a){if(a instanceof Path)return a;if((null==a||0==a.length)&&(a=""),"string"!=typeof a){if(isIndex(a.length))return new Path(a,constructorIsPrivate);a=String(a)}var b=pathCache[a];if(b)return b;var c=parsePath(a);if(!c)return invalidPath;var b=new Path(c,constructorIsPrivate);return pathCache[a]=b,b}function formatAccessor(a){return isIndex(a)?"["+a+"]":'["'+a.replace(/"/g,'\\"')+'"]'}function dirtyCheck(a){for(var b=0;MAX_DIRTY_CHECK_CYCLES>b&&a.check_();)b++;return testingExposeCycleCount&&(global.dirtyCheckCycleCount=b),b>0}function objectIsEmpty(a){for(var b in a)return!1;return!0}function diffIsEmpty(a){return objectIsEmpty(a.added)&&objectIsEmpty(a.removed)&&objectIsEmpty(a.changed)}function diffObjectFromOldObject(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function runEOMTasks(){if(!eomTasks.length)return!1;for(var a=0;a<eomTasks.length;a++)eomTasks[a]();return eomTasks.length=0,!0}function newObservedObject(){function a(a){b&&b.state_===OPENED&&!d&&b.check_(a)}var b,c,d=!1,e=!0;return{open:function(c){if(b)throw Error("ObservedObject in use");e||Object.deliverChangeRecords(a),b=c,e=!1},observe:function(b,d){c=b,d?Array.observe(c,a):Object.observe(c,a)},deliver:function(b){d=b,Object.deliverChangeRecords(a),d=!1},close:function(){b=void 0,Object.unobserve(c,a),observedObjectCache.push(this)}}}function getObservedObject(a,b,c){var d=observedObjectCache.pop()||newObservedObject();return d.open(a),d.observe(b,c),d}function newObservedSet(){function a(b,f){b&&(b===d&&(e[f]=!0),h.indexOf(b)<0&&(h.push(b),Object.observe(b,c)),a(Object.getPrototypeOf(b),f))}function b(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.object!==d||e[c.name]||"setPrototype"===c.type)return!1}return!0}function c(c){if(!b(c)){for(var d,e=0;e<g.length;e++)d=g[e],d.state_==OPENED&&d.iterateObjects_(a);for(var e=0;e<g.length;e++)d=g[e],d.state_==OPENED&&d.check_()}}var d,e,f=0,g=[],h=[],i={object:void 0,objects:h,open:function(b,c){d||(d=c,e={}),g.push(b),f++,b.iterateObjects_(a)},close:function(){if(f--,!(f>0)){for(var a=0;a<h.length;a++)Object.unobserve(h[a],c),Observer.unobservedCount++;g.length=0,h.length=0,d=void 0,e=void 0,observedSetCache.push(this)}}};return i}function getObservedSet(a,b){return lastObservedSet&&lastObservedSet.object===b||(lastObservedSet=observedSetCache.pop()||newObservedSet(),lastObservedSet.object=b),lastObservedSet.open(a,b),lastObservedSet}function Observer(){this.state_=UNOPENED,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=nextObserverId++}function addToAll(a){Observer._allObserversCount++,collectObservers&&allObservers.push(a)}function removeFromAll(){Observer._allObserversCount--}function ObjectObserver(a){Observer.call(this),this.value_=a,this.oldObject_=void 0}function ArrayObserver(a){if(!Array.isArray(a))throw Error("Provided object is not an Array");ObjectObserver.call(this,a)}function PathObserver(a,b){Observer.call(this),this.object_=a,this.path_=getPath(b),this.directObserver_=void 0}function CompoundObserver(a){Observer.call(this),this.reportChangesOnOpen_=a,this.value_=[],this.directObserver_=void 0,this.observed_=[]}function identFn(a){return a}function ObserverTransform(a,b,c,d){this.callback_=void 0,this.target_=void 0,this.value_=void 0,this.observable_=a,this.getValueFn_=b||identFn,this.setValueFn_=c||identFn,this.dontPassThroughSet_=d}function diffObjectFromChangeRecords(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];expectedRecordTypes[g.type]?(g.name in c||(c[g.name]=g.oldValue),"update"!=g.type&&("add"!=g.type?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}function newSplice(a,b,c){return{index:a,removed:b,addedCount:c}}function ArraySplice(){}function calcSplices(a,b,c,d,e,f){return arraySplice.calcSplices(a,b,c,d,e,f)}function intersect(a,b,c,d){return c>b||a>d?-1:b==c||d==a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function mergeSplice(a,b,c,d){for(var e=newSplice(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=intersect(e.index,e.index+e.removed.length,i.index,i.index+i.addedCount);if(j>=0){a.splice(h,1),h--,g-=i.addedCount-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.removed.length-j;if(e.addedCount||k){var c=i.removed;if(e.index<i.index){var l=e.removed.slice(0,i.index-e.index);Array.prototype.push.apply(l,c),c=l}if(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i.addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index&&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splice(h,0,e),h++;var n=e.addedCount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)}function createInitialSplices(a,b){for(var c=[],d=0;d<b.length;d++){var e=b[d];switch(e.type){case"splice":mergeSplice(c,e.index,e.removed.slice(),e.addedCount);break;case"add":case"update":case"delete":if(!isIndex(e.name))continue;var f=toNumber(e.name);if(0>f)continue;mergeSplice(c,f,[e.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(e))}}return c}function projectArraySplices(a,b){var c=[];return createInitialSplices(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?void(b.removed[0]!==a[b.index]&&c.push(b)):void(c=c.concat(calcSplices(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)))}),c}var testingExposeCycleCount=global.testingExposeCycleCount,hasObserve=detectObjectObserve(),hasEval=detectEval(),numberIsNaN=global.Number.isNaN||function(a){return"number"==typeof a&&global.isNaN(a)},createObject="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},identStart="[$_a-zA-Z]",identPart="[$_a-zA-Z0-9]",identRegExp=new RegExp("^"+identStart+"+"+identPart+"*$"),pathStateMachine={beforePath:{ws:["beforePath"],ident:["inIdent","append"],"[":["beforeElement"],eof:["afterPath"]},inPath:{ws:["inPath"],".":["beforeIdent"],"[":["beforeElement"],eof:["afterPath"]},beforeIdent:{ws:["beforeIdent"],ident:["inIdent","append"]},inIdent:{ident:["inIdent","append"],0:["inIdent","append"],number:["inIdent","append"],ws:["inPath","push"],".":["beforeIdent","push"],"[":["beforeElement","push"],eof:["afterPath","push"]},beforeElement:{ws:["beforeElement"],0:["afterZero","append"],number:["inIndex","append"],"'":["inSingleQuote","append",""],'"':["inDoubleQuote","append",""]},afterZero:{ws:["afterElement","push"],"]":["inPath","push"]},inIndex:{0:["inIndex","append"],number:["inIndex","append"],ws:["afterElement"],"]":["inPath","push"]},inSingleQuote:{"'":["afterElement"],eof:["error"],"else":["inSingleQuote","append"]},inDoubleQuote:{'"':["afterElement"],eof:["error"],"else":["inDoubleQuote","append"]},afterElement:{ws:["afterElement"],"]":["inPath","push"]}},constructorIsPrivate={},pathCache={};Path.get=getPath,Path.prototype=createObject({__proto__:[],valid:!0,toString:function(){for(var a="",b=0;b<this.length;b++){var c=this[b];a+=isIdent(c)?b?"."+c:c:formatAccessor(c)}return a},getValueFrom:function(a){for(var b=0;b<this.length;b++){if(null==a)return;a=a[this[b]]}return a},iterateObjects:function(a,b){for(var c=0;c<this.length;c++){if(c&&(a=a[this[c-1]]),!isObject(a))return;b(a,this[0])}},compiledGetValueFromFn:function(){var a="",b="obj";a+="if (obj != null";for(var c,d=0;d<this.length-1;d++)c=this[d],b+=isIdent(c)?"."+c:formatAccessor(c),a+=" &&\n "+b+" != null";a+=")\n";var c=this[d];return b+=isIdent(c)?"."+c:formatAccessor(c),a+=" return "+b+";\nelse\n return undefined;",new Function("obj",a)},setValueFrom:function(a,b){if(!this.length)return!1;for(var c=0;c<this.length-1;c++){if(!isObject(a))return!1;a=a[this[c]]}return isObject(a)?(a[this[c]]=b,!0):!1}});var invalidPath=new Path("",constructorIsPrivate);invalidPath.valid=!1,invalidPath.getValueFrom=invalidPath.setValueFrom=function(){};var MAX_DIRTY_CHECK_CYCLES=1e3,eomTasks=[],runEOM=hasObserve?function(){var a={pingPong:!0},b=!1;return Object.observe(a,function(){runEOMTasks(),b=!1}),function(c){eomTasks.push(c),b||(b=!0,a.pingPong=!a.pingPong)}}():function(){return function(a){eomTasks.push(a)}}(),observedObjectCache=[],observedSetCache=[],lastObservedSet,UNOPENED=0,OPENED=1,CLOSED=2,RESETTING=3,nextObserverId=1;Observer.prototype={open:function(a,b){if(this.state_!=UNOPENED)throw Error("Observer has already been opened.");return addToAll(this),this.callback_=a,this.target_=b,this.connect_(),this.state_=OPENED,this.value_},close:function(){this.state_==OPENED&&(removeFromAll(this),this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0,this.state_=CLOSED)},deliver:function(){this.state_==OPENED&&dirtyCheck(this)},report_:function(a){try{this.callback_.apply(this.target_,a)}catch(b){Observer._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var collectObservers=!hasObserve,allObservers;Observer._allObserversCount=0,collectObservers&&(allObservers=[]);var runningMicrotaskCheckpoint=!1,hasDebugForceFullDelivery=hasObserve&&hasEval&&function(){try{return eval("%RunMicrotasks()"),!0}catch(ex){return!1}}();global.Platform=global.Platform||{},global.Platform.performMicrotaskCheckpoint=function(){if(!runningMicrotaskCheckpoint){if(hasDebugForceFullDelivery)return void eval("%RunMicrotasks()");if(collectObservers){runningMicrotaskCheckpoint=!0;var cycles=0,anyChanged,toCheck;do{cycles++,toCheck=allObservers,allObservers=[],anyChanged=!1;for(var i=0;i<toCheck.length;i++){var observer=toCheck[i];observer.state_==OPENED&&(observer.check_()&&(anyChanged=!0),allObservers.push(observer))}runEOMTasks()&&(anyChanged=!0)}while(MAX_DIRTY_CHECK_CYCLES>cycles&&anyChanged);testingExposeCycleCount&&(global.dirtyCheckCycleCount=cycles),runningMicrotaskCheckpoint=!1}}},collectObservers&&(global.Platform.clearObservers=function(){allObservers=[]}),ObjectObserver.prototype=createObject({__proto__:Observer.prototype,arrayObserve:!1,connect_:function(){hasObserve?this.directObserver_=getObservedObject(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(a){var b=Array.isArray(a)?[]:{};for(var c in a)b[c]=a[c];return Array.isArray(a)&&(b.length=a.length),b},check_:function(a){var b,c;if(hasObserve){if(!a)return!1;c={},b=diffObjectFromChangeRecords(this.value_,a,c)}else c=this.oldObject_,b=diffObjectFromOldObject(this.value_,this.oldObject_);return diffIsEmpty(b)?!1:(hasObserve||(this.oldObject_=this.copyObject(this.value_)),this.report_([b.added||{},b.removed||{},b.changed||{},function(a){return c[a]}]),!0)},disconnect_:function(){hasObserve?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==OPENED&&(hasObserve?this.directObserver_.deliver(!1):dirtyCheck(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}}),ArrayObserver.prototype=createObject({__proto__:ObjectObserver.prototype,arrayObserve:!0,copyObject:function(a){return a.slice()},check_:function(a){var b;if(hasObserve){if(!a)return!1;b=projectArraySplices(this.value_,a)}else b=calcSplices(this.value_,0,this.value_.length,this.oldObject_,0,this.oldObject_.length);return b&&b.length?(hasObserve||(this.oldObject_=this.copyObject(this.value_)),this.report_([b]),!0):!1}}),ArrayObserver.applySplices=function(a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.length],e=c.index;e<c.index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.apply(a,d)})},PathObserver.prototype=createObject({__proto__:Observer.prototype,get path(){return this.path_},connect_:function(){hasObserve&&(this.directObserver_=getObservedSet(this,this.object_)),this.check_(void 0,!0)},disconnect_:function(){this.value_=void 0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},iterateObjects_:function(a){this.path_.iterateObjects(this.object_,a)},check_:function(a,b){var c=this.value_;return this.value_=this.path_.getValueFrom(this.object_),b||areSameValue(this.value_,c)?!1:(this.report_([this.value_,c,this]),!0)},setValue:function(a){this.path_&&this.path_.setValueFrom(this.object_,a)}});var observerSentinel={};CompoundObserver.prototype=createObject({__proto__:Observer.prototype,connect_:function(){if(hasObserve){for(var a,b=!1,c=0;c<this.observed_.length;c+=2)if(a=this.observed_[c],a!==observerSentinel){b=!0;break}b&&(this.directObserver_=getObservedSet(this,a))}this.check_(void 0,!this.reportChangesOnOpen_)},disconnect_:function(){for(var a=0;a<this.observed_.length;a+=2)this.observed_[a]===observerSentinel&&this.observed_[a+1].close();this.observed_.length=0,this.value_.length=0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},addPath:function(a,b){if(this.state_!=UNOPENED&&this.state_!=RESETTING)throw Error("Cannot add paths once started.");var b=getPath(b);if(this.observed_.push(a,b),this.reportChangesOnOpen_){var c=this.observed_.length/2-1;this.value_[c]=b.getValueFrom(a)}},addObserver:function(a){if(this.state_!=UNOPENED&&this.state_!=RESETTING)throw Error("Cannot add observers once started.");if(this.observed_.push(observerSentinel,a),this.reportChangesOnOpen_){var b=this.observed_.length/2-1;this.value_[b]=a.open(this.deliver,this)}},startReset:function(){if(this.state_!=OPENED)throw Error("Can only reset while open");this.state_=RESETTING,this.disconnect_()},finishReset:function(){if(this.state_!=RESETTING)throw Error("Can only finishReset after startReset");return this.state_=OPENED,this.connect_(),this.value_},iterateObjects_:function(a){for(var b,c=0;c<this.observed_.length;c+=2)b=this.observed_[c],b!==observerSentinel&&this.observed_[c+1].iterateObjects(b,a)},check_:function(a,b){for(var c,d=0;d<this.observed_.length;d+=2){var e,f=this.observed_[d],g=this.observed_[d+1];if(f===observerSentinel){var h=g;e=this.state_===UNOPENED?h.open(this.deliver,this):h.discardChanges()}else e=g.getValueFrom(f);b?this.value_[d/2]=e:areSameValue(e,this.value_[d/2])||(c=c||[],c[d/2]=this.value_[d/2],this.value_[d/2]=e)}return c?(this.report_([this.value_,c,this.observed_]),!0):!1}}),ObserverTransform.prototype={open:function(a,b){return this.callback_=a,this.target_=b,this.value_=this.getValueFn_(this.observable_.open(this.observedCallback_,this)),this.value_},observedCallback_:function(a){if(a=this.getValueFn_(a),!areSameValue(a,this.value_)){var b=this.value_;this.value_=a,this.callback_.call(this.target_,this.value_,b)}},discardChanges:function(){return this.value_=this.getValueFn_(this.observable_.discardChanges()),this.value_},deliver:function(){return this.observable_.deliver()},setValue:function(a){return a=this.setValueFn_(a),!this.dontPassThroughSet_&&this.observable_.setValue?this.observable_.setValue(a):void 0},close:function(){this.observable_&&this.observable_.close(),this.callback_=void 0,this.target_=void 0,this.observable_=void 0,this.value_=void 0,this.getValueFn_=void 0,this.setValueFn_=void 0}};var expectedRecordTypes={add:!0,update:!0,"delete":!0},EDIT_LEAVE=0,EDIT_UPDATE=1,EDIT_ADD=2,EDIT_DELETE=3;ArraySplice.prototype={calcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g==d?e.push(EDIT_LEAVE):(e.push(EDIT_UPDATE),d=g),b--,c--):f==h?(e.push(EDIT_DELETE),b--,d=h):(e.push(EDIT_ADD),c--,d=i)}else e.push(EDIT_DELETE),b--;else e.push(EDIT_ADD),c--;return e.reverse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,c-b==0&&f-e==0)return[];if(b==c){for(var j=newSplice(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[newSplice(b,[],c-b)];for(var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case EDIT_LEAVE:j&&(l.push(j),j=void 0),m++,n++;break;case EDIT_UPDATE:j||(j=newSplice(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case EDIT_ADD:j||(j=newSplice(m,[],0)),j.addedCount++,m++;break;case EDIT_DELETE:j||(j=newSplice(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var arraySplice=new ArraySplice;global.Observer=Observer,global.Observer.runEOM_=runEOM,global.Observer.observerSentinel_=observerSentinel,global.Observer.hasObjectObserve=hasObserve,global.ArrayObserver=ArrayObserver,global.ArrayObserver.calculateSplices=function(a,b){return arraySplice.calculateSplices(a,b)},global.ArraySplice=ArraySplice,global.ObjectObserver=ObjectObserver,global.PathObserver=PathObserver,global.CompoundObserver=CompoundObserver,global.Path=Path,global.ObserverTransform=ObserverTransform}("undefined"!=typeof global&&global&&"undefined"!=typeof module&&module?global:this||window),Platform.flags.shadow?(window.ShadowDOMPolyfill={},function(a){"use strict";function b(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var a=new Function("return true;");return a()}catch(b){return!1}}function c(a){if(!a)throw new Error("Assertion failed")}function d(a,b){for(var c=L(b),d=0;d<c.length;d++){var e=c[d];K(a,e,M(b,e))}return a}function e(a,b){for(var c=L(b),d=0;d<c.length;d++){var e=c[d];switch(e){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}K(a,e,M(b,e))}return a}function f(a,b){for(var c=0;c<b.length;c++)if(b[c]in a)return b[c]}function g(a,b,c){N.value=c,K(a,b,N)}function h(a){var b=a.__proto__||Object.getPrototypeOf(a),c=G.get(b);if(c)return c;var d=h(b),e=v(d);return s(b,e,a),e}function i(a,b){q(a,b,!0)}function j(a,b){q(b,a,!1)}function k(a){return/^on[a-z]+$/.test(a)}function l(a){return/^\w[a-zA-Z_0-9]*$/.test(a)}function m(a){return J&&l(a)?new Function("return this.impl."+a):function(){return this.impl[a]}}function n(a){return J&&l(a)?new Function("v","this.impl."+a+" = v"):function(b){this.impl[a]=b}}function o(a){return J&&l(a)?new Function("return this.impl."+a+".apply(this.impl, arguments)"):function(){return this.impl[a].apply(this.impl,arguments)}}function p(a,b){try{return Object.getOwnPropertyDescriptor(a,b)}catch(c){return P}}function q(b,c,d){for(var e=L(b),f=0;f<e.length;f++){var g=e[f];if("polymerBlackList_"!==g&&!(g in c||b.polymerBlackList_&&b.polymerBlackList_[g])){O&&b.__lookupGetter__(g);var h,i,j=p(b,g);if(d&&"function"==typeof j.value)c[g]=o(g);else{var l=k(g);h=l?a.getEventHandlerGetter(g):m(g),(j.writable||j.set)&&(i=l?a.getEventHandlerSetter(g):n(g)),K(c,g,{get:h,set:i,configurable:j.configurable,enumerable:j.enumerable})}}}}function r(a,b,c){var d=a.prototype;s(d,b,c),e(b,a)}function s(a,b,d){var e=b.prototype;c(void 0===G.get(a)),G.set(a,b),H.set(e,a),i(a,e),d&&j(e,d),g(e,"constructor",b),b.prototype=e}function t(a,b){return G.get(b.prototype)===a}function u(a){var b=Object.getPrototypeOf(a),c=h(b),d=v(c);return s(b,d,a),d}function v(a){function b(b){a.call(this,b)}var c=Object.create(a.prototype);return c.constructor=b,b.prototype=c,b}function w(a){return a instanceof I.EventTarget||a instanceof I.Event||a instanceof I.Range||a instanceof I.DOMImplementation||a instanceof I.CanvasRenderingContext2D||a instanceof I.FormData||I.WebGLRenderingContext&&a instanceof I.WebGLRenderingContext}function x(a){return R&&a instanceof R||a instanceof T||a instanceof S||a instanceof U||a instanceof V||a instanceof Q||a instanceof W||a instanceof Z||X&&a instanceof X||Y&&a instanceof Y}function y(a){return null===a?null:(c(x(a)),a.polymerWrapper_||(a.polymerWrapper_=new(h(a))(a)))}function z(a){return null===a?null:(c(w(a)),a.impl)}function A(a){return a&&w(a)?z(a):a}function B(a){return a&&!w(a)?y(a):a}function C(a,b){null!==b&&(c(x(a)),c(void 0===b||w(b)),a.polymerWrapper_=b)}function D(a,b,c){$.get=c,K(a.prototype,b,$)}function E(a,b){D(a,b,function(){return y(this.impl[b])})}function F(a,b){a.forEach(function(a){b.forEach(function(b){a.prototype[b]=function(){var a=B(this);return a[b].apply(a,arguments)}})})}var G=new WeakMap,H=new WeakMap,I=Object.create(null),J=b(),K=Object.defineProperty,L=Object.getOwnPropertyNames,M=Object.getOwnPropertyDescriptor,N={value:void 0,configurable:!0,enumerable:!1,writable:!0};L(window);var O=/Firefox/.test(navigator.userAgent),P={get:function(){},set:function(){},configurable:!0,enumerable:!0},Q=window.DOMImplementation,R=window.EventTarget,S=window.Event,T=window.Node,U=window.Window,V=window.Range,W=window.CanvasRenderingContext2D,X=window.WebGLRenderingContext,Y=window.SVGElementInstance,Z=window.FormData,$={get:void 0,configurable:!0,enumerable:!0};a.assert=c,a.constructorTable=G,a.defineGetter=D,a.defineWrapGetter=E,a.forwardMethodsToWrapper=F,a.isWrapper=w,a.isWrapperFor=t,a.mixin=d,a.nativePrototypeTable=H,a.oneOf=f,a.registerObject=u,a.registerWrapper=r,a.rewrap=C,a.unwrap=z,a.unwrapIfNeeded=A,a.wrap=y,a.wrapIfNeeded=B,a.wrappers=I}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){g=!1;var a=f.slice(0);f=[];for(var b=0;b<a.length;b++)a[b]()}function c(a){f.push(a),g||(g=!0,d(b,0))}var d,e=window.MutationObserver,f=[],g=!1;if(e){var h=1,i=new e(b),j=document.createTextNode(h);i.observe(j,{characterData:!0}),d=function(){h=(h+1)%2,j.data=h}}else d=window.setImmediate||window.setTimeout;a.setEndOfMicrotask=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(){p||(k(c),p=!0)}function c(){p=!1;do for(var a=o.slice(),b=!1,c=0;c<a.length;c++){var d=a[c],e=d.takeRecords();f(d),e.length&&(d.callback_(e,d),b=!0)}while(b)}function d(a,b){this.type=a,this.target=b,this.addedNodes=new m.NodeList,this.removedNodes=new m.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function e(a,b){for(;a;a=a.parentNode){var c=n.get(a);if(c)for(var d=0;d<c.length;d++){var e=c[d];e.options.subtree&&e.addTransientObserver(b)}}}function f(a){for(var b=0;b<a.nodes_.length;b++){var c=a.nodes_[b],d=n.get(c);if(!d)return;for(var e=0;e<d.length;e++){var f=d[e];f.observer===a&&f.removeTransientObservers()}}}function g(a,c,e){for(var f=Object.create(null),g=Object.create(null),h=a;h;h=h.parentNode){var i=n.get(h);if(i)for(var j=0;j<i.length;j++){var k=i[j],l=k.options;if((h===a||l.subtree)&&!("attributes"===c&&!l.attributes||"attributes"===c&&l.attributeFilter&&(null!==e.namespace||-1===l.attributeFilter.indexOf(e.name))||"characterData"===c&&!l.characterData||"childList"===c&&!l.childList)){var m=k.observer;f[m.uid_]=m,("attributes"===c&&l.attributeOldValue||"characterData"===c&&l.characterDataOldValue)&&(g[m.uid_]=e.oldValue)}}}var o=!1;for(var p in f){var m=f[p],q=new d(c,a);"name"in e&&"namespace"in e&&(q.attributeName=e.name,q.attributeNamespace=e.namespace),e.addedNodes&&(q.addedNodes=e.addedNodes),e.removedNodes&&(q.removedNodes=e.removedNodes),e.previousSibling&&(q.previousSibling=e.previousSibling),e.nextSibling&&(q.nextSibling=e.nextSibling),void 0!==g[p]&&(q.oldValue=g[p]),m.records_.push(q),o=!0}o&&b()}function h(a){if(this.childList=!!a.childList,this.subtree=!!a.subtree,this.attributes="attributes"in a||!("attributeOldValue"in a||"attributeFilter"in a)?!!a.attributes:!0,this.characterData="characterDataOldValue"in a&&!("characterData"in a)?!0:!!a.characterData,!this.attributes&&(a.attributeOldValue||"attributeFilter"in a)||!this.characterData&&a.characterDataOldValue)throw new TypeError;if(this.characterData=!!a.characterData,this.attributeOldValue=!!a.attributeOldValue,this.characterDataOldValue=!!a.characterDataOldValue,"attributeFilter"in a){if(null==a.attributeFilter||"object"!=typeof a.attributeFilter)throw new TypeError;this.attributeFilter=q.call(a.attributeFilter)}else this.attributeFilter=null}function i(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++r,o.push(this)}function j(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var k=a.setEndOfMicrotask,l=a.wrapIfNeeded,m=a.wrappers,n=new WeakMap,o=[],p=!1,q=Array.prototype.slice,r=0;i.prototype={observe:function(a,b){a=l(a);var c,d=new h(b),e=n.get(a);e||n.set(a,e=[]);for(var f=0;f<e.length;f++)e[f].observer===this&&(c=e[f],c.removeTransientObservers(),c.options=d);c||(c=new j(this,a,d),e.push(c),this.nodes_.push(a))},disconnect:function(){this.nodes_.forEach(function(a){for(var b=n.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}},j.prototype={addTransientObserver:function(a){if(a!==this.target){this.transientObservedNodes.push(a);var b=n.get(a);b||n.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[];for(var b=0;b<a.length;b++)for(var c=a[b],d=n.get(c),e=0;e<d.length;e++)if(d[e]===this){d.splice(e,1);break}}},a.enqueueMutation=g,a.registerTransientObservers=e,a.wrappers.MutationObserver=i,a.wrappers.MutationRecord=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){this.root=a,this.parent=b}function c(a,b){if(a.treeScope_!==b){a.treeScope_=b;for(var d=a.shadowRoot;d;d=d.olderShadowRoot)d.treeScope_.parent=b;for(var e=a.firstChild;e;e=e.nextSibling)c(e,b)}}function d(c){if(c instanceof a.wrappers.Window,c.treeScope_)return c.treeScope_;var e,f=c.parentNode;return e=f?d(f):new b(c,null),c.treeScope_=e}b.prototype={get renderer(){return this.root instanceof a.wrappers.ShadowRoot?a.getRendererForHost(this.root.host):null},contains:function(a){for(;a;a=a.parent)if(a===this)return!0;return!1}},a.TreeScope=b,a.getTreeScope=d,a.setTreeScope=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a instanceof Q.ShadowRoot}function c(a){return L(a).root}function d(a,d){var h=[],i=a;for(h.push(i);i;){var j=g(i);if(j&&j.length>0){for(var k=0;k<j.length;k++){var m=j[k];if(f(m)){var n=c(m),o=n.olderShadowRoot;o&&h.push(o)}h.push(m)}i=j[j.length-1]}else if(b(i)){if(l(a,i)&&e(d))break;i=i.host,h.push(i)}else i=i.parentNode,i&&h.push(i)}return h}function e(a){if(!a)return!1;switch(a.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function f(a){return a instanceof HTMLShadowElement}function g(b){return a.getDestinationInsertionPoints(b)}function h(a,b){if(0===a.length)return b;b instanceof Q.Window&&(b=b.document);for(var c=L(b),d=a[0],e=L(d),f=j(c,e),g=0;g<a.length;g++){var h=a[g];if(L(h)===f)return h}return a[a.length-1]}function i(a){for(var b=[];a;a=a.parent)b.push(a);return b}function j(a,b){for(var c=i(a),d=i(b),e=null;c.length>0&&d.length>0;){var f=c.pop(),g=d.pop();if(f!==g)break;e=f}return e}function k(a,b,c){b instanceof Q.Window&&(b=b.document);var e,f=L(b),g=L(c),h=d(c,a),e=j(f,g);e||(e=g.root);for(var i=e;i;i=i.parent)for(var k=0;k<h.length;k++){var l=h[k];if(L(l)===i)return l}return null}function l(a,b){return L(a)===L(b)}function m(a){if(!S.get(a)&&(S.set(a,!0),n(P(a),P(a.target)),J)){var b=J;throw J=null,b}}function n(b,c){if(T.get(b))throw new Error("InvalidStateError");T.set(b,!0),a.renderAllPending(); +var e,f,g,h=b.type;if("load"===h&&!b.bubbles){var i=c;i instanceof Q.Document&&(g=i.defaultView)&&(f=i,e=[])}if(!e)if(c instanceof Q.Window)g=c,e=[];else if(e=d(c,b),"load"!==b.type){var i=e[e.length-1];i instanceof Q.Document&&(g=i.defaultView)}return _.set(b,e),o(b,e,g,f)&&p(b,e,g,f)&&q(b,e,g,f),X.set(b,ab),V.delete(b,null),T.delete(b),b.defaultPrevented}function o(a,b,c,d){var e=bb;if(c&&!r(c,a,e,b,d))return!1;for(var f=b.length-1;f>0;f--)if(!r(b[f],a,e,b,d))return!1;return!0}function p(a,b,c,d){var e=cb,f=b[0]||c;return r(f,a,e,b,d)}function q(a,b,c,d){for(var e=db,f=1;f<b.length;f++)if(!r(b[f],a,e,b,d))return;c&&b.length>0&&r(c,a,e,b,d)}function r(a,b,c,d,e){var f=R.get(a);if(!f)return!0;var g=e||h(d,a);if(g===a){if(c===bb)return!0;c===db&&(c=cb)}else if(c===db&&!b.bubbles)return!0;if("relatedTarget"in b){var i=O(b),j=i.relatedTarget;if(j){if(j instanceof Object&&j.addEventListener){var l=P(j),m=k(b,a,l);if(m===g)return!0}else m=null;W.set(b,m)}}X.set(b,c);var n=b.type,o=!1;U.set(b,g),V.set(b,a),f.depth++;for(var p=0,q=f.length;q>p;p++){var r=f[p];if(r.removed)o=!0;else if(!(r.type!==n||!r.capture&&c===bb||r.capture&&c===db))try{if("function"==typeof r.handler?r.handler.call(a,b):r.handler.handleEvent(b),Z.get(b))return!1}catch(s){J||(J=s)}}if(f.depth--,o&&0===f.depth){var t=f.slice();f.length=0;for(var p=0;p<t.length;p++)t[p].removed||f.push(t[p])}return!Y.get(b)}function s(a,b,c){this.type=a,this.handler=b,this.capture=Boolean(c)}function t(a,b){if(!(a instanceof eb))return P(x(eb,"Event",a,b));var c=a;return pb||"beforeunload"!==c.type?void(this.impl=c):new y(c)}function u(a){return a&&a.relatedTarget?Object.create(a,{relatedTarget:{value:O(a.relatedTarget)}}):a}function v(a,b,c){var d=window[a],e=function(b,c){return b instanceof d?void(this.impl=b):P(x(d,a,b,c))};if(e.prototype=Object.create(b.prototype),c&&M(e.prototype,c),d)try{N(d,e,new d("temp"))}catch(f){N(d,e,document.createEvent(a))}return e}function w(a,b){return function(){arguments[b]=O(arguments[b]);var c=O(this);c[a].apply(c,arguments)}}function x(a,b,c,d){if(nb)return new a(c,u(d));var e=O(document.createEvent(b)),f=mb[b],g=[c];return Object.keys(f).forEach(function(a){var b=null!=d&&a in d?d[a]:f[a];"relatedTarget"===a&&(b=O(b)),g.push(b)}),e["init"+b].apply(e,g),e}function y(a){t.call(this,a)}function z(a){return"function"==typeof a?!0:a&&a.handleEvent}function A(a){switch(a){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function B(a){this.impl=a}function C(a){return a instanceof Q.ShadowRoot&&(a=a.host),O(a)}function D(a,b){var c=R.get(a);if(c)for(var d=0;d<c.length;d++)if(!c[d].removed&&c[d].type===b)return!0;return!1}function E(a,b){for(var c=O(a);c;c=c.parentNode)if(D(P(c),b))return!0;return!1}function F(a){K(a,rb)}function G(b,c,e,f){a.renderAllPending();var g=P(sb.call(c.impl,e,f));if(!g)return null;var i=d(g,null),j=i.lastIndexOf(b);return-1==j?null:(i=i.slice(0,j),h(i,b))}function H(a){return function(){var b=$.get(this);return b&&b[a]&&b[a].value||null}}function I(a){var b=a.slice(2);return function(c){var d=$.get(this);d||(d=Object.create(null),$.set(this,d));var e=d[a];if(e&&this.removeEventListener(b,e.wrapped,!1),"function"==typeof c){var f=function(b){var d=c.call(this,b);d===!1?b.preventDefault():"onbeforeunload"===a&&"string"==typeof d&&(b.returnValue=d)};this.addEventListener(b,f,!1),d[a]={value:c,wrapped:f}}}}var J,K=a.forwardMethodsToWrapper,L=a.getTreeScope,M=a.mixin,N=a.registerWrapper,O=a.unwrap,P=a.wrap,Q=a.wrappers,R=(new WeakMap,new WeakMap),S=new WeakMap,T=new WeakMap,U=new WeakMap,V=new WeakMap,W=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap,$=new WeakMap,_=new WeakMap,ab=0,bb=1,cb=2,db=3;s.prototype={equals:function(a){return this.handler===a.handler&&this.type===a.type&&this.capture===a.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var eb=window.Event;eb.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},t.prototype={get target(){return U.get(this)},get currentTarget(){return V.get(this)},get eventPhase(){return X.get(this)},get path(){var a=_.get(this);return a?a.slice():[]},stopPropagation:function(){Y.set(this,!0)},stopImmediatePropagation:function(){Y.set(this,!0),Z.set(this,!0)}},N(eb,t,document.createEvent("Event"));var fb=v("UIEvent",t),gb=v("CustomEvent",t),hb={get relatedTarget(){var a=W.get(this);return void 0!==a?a:P(O(this).relatedTarget)}},ib=M({initMouseEvent:w("initMouseEvent",14)},hb),jb=M({initFocusEvent:w("initFocusEvent",5)},hb),kb=v("MouseEvent",fb,ib),lb=v("FocusEvent",fb,jb),mb=Object.create(null),nb=function(){try{new window.FocusEvent("focus")}catch(a){return!1}return!0}();if(!nb){var ob=function(a,b,c){if(c){var d=mb[c];b=M(M({},d),b)}mb[a]=b};ob("Event",{bubbles:!1,cancelable:!1}),ob("CustomEvent",{detail:null},"Event"),ob("UIEvent",{view:null,detail:0},"Event"),ob("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ob("FocusEvent",{relatedTarget:null},"UIEvent")}var pb=window.BeforeUnloadEvent;y.prototype=Object.create(t.prototype),M(y.prototype,{get returnValue(){return this.impl.returnValue},set returnValue(a){this.impl.returnValue=a}}),pb&&N(pb,y);var qb=window.EventTarget,rb=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(a){var b=a.prototype;rb.forEach(function(a){Object.defineProperty(b,a+"_",{value:b[a]})})}),B.prototype={addEventListener:function(a,b,c){if(z(b)&&!A(a)){var d=new s(a,b,c),e=R.get(this);if(e){for(var f=0;f<e.length;f++)if(d.equals(e[f]))return}else e=[],e.depth=0,R.set(this,e);e.push(d);var g=C(this);g.addEventListener_(a,m,!0)}},removeEventListener:function(a,b,c){c=Boolean(c);var d=R.get(this);if(d){for(var e=0,f=!1,g=0;g<d.length;g++)d[g].type===a&&d[g].capture===c&&(e++,d[g].handler===b&&(f=!0,d[g].remove()));if(f&&1===e){var h=C(this);h.removeEventListener_(a,m,!0)}}},dispatchEvent:function(b){var c=O(b),d=c.type;S.set(c,!1),a.renderAllPending();var e;E(this,d)||(e=function(){},this.addEventListener(d,e,!0));try{return O(this).dispatchEvent_(c)}finally{e&&this.removeEventListener(d,e,!0)}}},qb&&N(qb,B);var sb=document.elementFromPoint;a.elementFromPoint=G,a.getEventHandlerGetter=H,a.getEventHandlerSetter=I,a.wrapEventTargetMethods=F,a.wrappers.BeforeUnloadEvent=y,a.wrappers.CustomEvent=gb,a.wrappers.Event=t,a.wrappers.EventTarget=B,a.wrappers.FocusEvent=lb,a.wrappers.MouseEvent=kb,a.wrappers.UIEvent=fb}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,o)}function c(a){this.impl=a}function d(){this.length=0,b(this,"length")}function e(a){for(var b=new d,e=0;e<a.length;e++)b[e]=new c(a[e]);return b.length=e,b}function f(a){g.call(this,a)}var g=a.wrappers.UIEvent,h=a.mixin,i=a.registerWrapper,j=a.unwrap,k=a.wrap,l=window.TouchEvent;if(l){var m;try{m=document.createEvent("TouchEvent")}catch(n){return}var o={enumerable:!1};c.prototype={get target(){return k(this.impl.target)}};var p={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(a){p.get=function(){return this.impl[a]},Object.defineProperty(c.prototype,a,p)}),d.prototype={item:function(a){return this[a]}},f.prototype=Object.create(g.prototype),h(f.prototype,{get touches(){return e(j(this).touches)},get targetTouches(){return e(j(this).targetTouches)},get changedTouches(){return e(j(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),i(l,f,m),a.wrappers.Touch=c,a.wrappers.TouchEvent=f,a.wrappers.TouchList=d}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a,b){Object.defineProperty(a,b,g)}function c(){this.length=0,b(this,"length")}function d(a){if(null==a)return a;for(var b=new c,d=0,e=a.length;e>d;d++)b[d]=f(a[d]);return b.length=e,b}function e(a,b){a.prototype[b]=function(){return d(this.impl[b].apply(this.impl,arguments))}}var f=a.wrap,g={enumerable:!1};c.prototype={item:function(a){return this[a]}},b(c.prototype,"item"),a.wrappers.NodeList=c,a.addWrapNodeListMethod=e,a.wrapNodeList=d}(window.ShadowDOMPolyfill),function(a){"use strict";a.wrapHTMLCollection=a.wrapNodeList,a.wrappers.HTMLCollection=a.wrappers.NodeList}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){A(a instanceof w)}function c(a){var b=new y;return b[0]=a,b.length=1,b}function d(a,b,c){C(b,"childList",{removedNodes:c,previousSibling:a.previousSibling,nextSibling:a.nextSibling})}function e(a,b){C(a,"childList",{removedNodes:b})}function f(a,b,d,e){if(a instanceof DocumentFragment){var f=h(a);O=!0;for(var g=f.length-1;g>=0;g--)a.removeChild(f[g]),f[g].parentNode_=b;O=!1;for(var g=0;g<f.length;g++)f[g].previousSibling_=f[g-1]||d,f[g].nextSibling_=f[g+1]||e;return d&&(d.nextSibling_=f[0]),e&&(e.previousSibling_=f[f.length-1]),f}var f=c(a),i=a.parentNode;return i&&i.removeChild(a),a.parentNode_=b,a.previousSibling_=d,a.nextSibling_=e,d&&(d.nextSibling_=a),e&&(e.previousSibling_=a),f}function g(a){if(a instanceof DocumentFragment)return h(a);var b=c(a),e=a.parentNode;return e&&d(a,e,b),b}function h(a){for(var b=new y,c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b.length=c,e(a,b),b}function i(a){return a}function j(a,b){I(a,b),a.nodeIsInserted_()}function k(a,b){for(var c=D(b),d=0;d<a.length;d++)j(a[d],c)}function l(a){I(a,new z(a,null))}function m(a){for(var b=0;b<a.length;b++)l(a[b])}function n(a,b){var c=a.nodeType===w.DOCUMENT_NODE?a:a.ownerDocument;c!==b.ownerDocument&&c.adoptNode(b)}function o(b,c){if(c.length){var d=b.ownerDocument;if(d!==c[0].ownerDocument)for(var e=0;e<c.length;e++)a.adoptNodeNoRemove(c[e],d)}}function p(a,b){o(a,b);var c=b.length;if(1===c)return J(b[0]);for(var d=J(a.ownerDocument.createDocumentFragment()),e=0;c>e;e++)d.appendChild(J(b[e]));return d}function q(a){if(void 0!==a.firstChild_)for(var b=a.firstChild_;b;){var c=b;b=b.nextSibling_,c.parentNode_=c.previousSibling_=c.nextSibling_=void 0}a.firstChild_=a.lastChild_=void 0}function r(a){if(a.invalidateShadowRenderer()){for(var b=a.firstChild;b;){A(b.parentNode===a);var c=b.nextSibling,d=J(b),e=d.parentNode;e&&V.call(e,d),b.previousSibling_=b.nextSibling_=b.parentNode_=null,b=c}a.firstChild_=a.lastChild_=null}else for(var c,f=J(a),g=f.firstChild;g;)c=g.nextSibling,V.call(f,g),g=c}function s(a){var b=a.parentNode;return b&&b.invalidateShadowRenderer()}function t(a){for(var b,c=0;c<a.length;c++)b=a[c],b.parentNode.removeChild(b)}function u(a,b,c){var d;if(d=L(c?P.call(c,a.impl,!1):Q.call(a.impl,!1)),b){for(var e=a.firstChild;e;e=e.nextSibling)d.appendChild(u(e,!0,c));if(a instanceof N.HTMLTemplateElement)for(var f=d.content,e=a.content.firstChild;e;e=e.nextSibling)f.appendChild(u(e,!0,c))}return d}function v(a,b){if(!b||D(a)!==D(b))return!1;for(var c=b;c;c=c.parentNode)if(c===a)return!0;return!1}function w(a){A(a instanceof R),x.call(this,a),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var x=a.wrappers.EventTarget,y=a.wrappers.NodeList,z=a.TreeScope,A=a.assert,B=a.defineWrapGetter,C=a.enqueueMutation,D=a.getTreeScope,E=a.isWrapper,F=a.mixin,G=a.registerTransientObservers,H=a.registerWrapper,I=a.setTreeScope,J=a.unwrap,K=a.unwrapIfNeeded,L=a.wrap,M=a.wrapIfNeeded,N=a.wrappers,O=!1,P=document.importNode,Q=window.Node.prototype.cloneNode,R=window.Node,S=window.DocumentFragment,T=(R.prototype.appendChild,R.prototype.compareDocumentPosition),U=R.prototype.insertBefore,V=R.prototype.removeChild,W=R.prototype.replaceChild,X=/Trident/.test(navigator.userAgent),Y=X?function(a,b){try{V.call(a,b)}catch(c){if(!(a instanceof S))throw c}}:function(a,b){V.call(a,b)};w.prototype=Object.create(x.prototype),F(w.prototype,{appendChild:function(a){return this.insertBefore(a,null)},insertBefore:function(a,c){b(a);var d;c?E(c)?d=J(c):(d=c,c=L(d)):(c=null,d=null),c&&A(c.parentNode===this);var e,h=c?c.previousSibling:this.lastChild,i=!this.invalidateShadowRenderer()&&!s(a);if(e=i?g(a):f(a,this,h,c),i)n(this,a),q(this),U.call(this.impl,J(a),d);else{h||(this.firstChild_=e[0]),c||(this.lastChild_=e[e.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var j=d?d.parentNode:this.impl;j?U.call(j,p(this,e),d):o(this,e)}return C(this,"childList",{addedNodes:e,nextSibling:c,previousSibling:h}),k(e,this),a},removeChild:function(a){if(b(a),a.parentNode!==this){for(var d=!1,e=(this.childNodes,this.firstChild);e;e=e.nextSibling)if(e===a){d=!0;break}if(!d)throw new Error("NotFoundError")}var f=J(a),g=a.nextSibling,h=a.previousSibling;if(this.invalidateShadowRenderer()){var i=this.firstChild,j=this.lastChild,k=f.parentNode;k&&Y(k,f),i===a&&(this.firstChild_=g),j===a&&(this.lastChild_=h),h&&(h.nextSibling_=g),g&&(g.previousSibling_=h),a.previousSibling_=a.nextSibling_=a.parentNode_=void 0}else q(this),Y(this.impl,f);return O||C(this,"childList",{removedNodes:c(a),nextSibling:g,previousSibling:h}),G(this,a),a},replaceChild:function(a,d){b(a);var e;if(E(d)?e=J(d):(e=d,d=L(e)),d.parentNode!==this)throw new Error("NotFoundError");var h,i=d.nextSibling,j=d.previousSibling,m=!this.invalidateShadowRenderer()&&!s(a);return m?h=g(a):(i===a&&(i=a.nextSibling),h=f(a,this,j,i)),m?(n(this,a),q(this),W.call(this.impl,J(a),e)):(this.firstChild===d&&(this.firstChild_=h[0]),this.lastChild===d&&(this.lastChild_=h[h.length-1]),d.previousSibling_=d.nextSibling_=d.parentNode_=void 0,e.parentNode&&W.call(e.parentNode,p(this,h),e)),C(this,"childList",{addedNodes:h,removedNodes:c(d),nextSibling:i,previousSibling:j}),l(d),k(h,this),d},nodeIsInserted_:function(){for(var a=this.firstChild;a;a=a.nextSibling)a.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:L(this.impl.parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:L(this.impl.firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:L(this.impl.lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:L(this.impl.nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:L(this.impl.previousSibling)},get parentElement(){for(var a=this.parentNode;a&&a.nodeType!==w.ELEMENT_NODE;)a=a.parentNode;return a},get textContent(){for(var a="",b=this.firstChild;b;b=b.nextSibling)b.nodeType!=w.COMMENT_NODE&&(a+=b.textContent);return a},set textContent(a){var b=i(this.childNodes);if(this.invalidateShadowRenderer()){if(r(this),""!==a){var c=this.impl.ownerDocument.createTextNode(a);this.appendChild(c)}}else q(this),this.impl.textContent=a;var d=i(this.childNodes);C(this,"childList",{addedNodes:d,removedNodes:b}),m(b),k(d,this)},get childNodes(){for(var a=new y,b=0,c=this.firstChild;c;c=c.nextSibling)a[b++]=c;return a.length=b,a},cloneNode:function(a){return u(this,a)},contains:function(a){return v(this,M(a))},compareDocumentPosition:function(a){return T.call(this.impl,K(a))},normalize:function(){for(var a,b,c=i(this.childNodes),d=[],e="",f=0;f<c.length;f++)b=c[f],b.nodeType===w.TEXT_NODE?a||b.data.length?a?(e+=b.data,d.push(b)):a=b:this.removeNode(b):(a&&d.length&&(a.data+=e,t(d)),d=[],e="",a=null,b.childNodes.length&&b.normalize());a&&d.length&&(a.data+=e,t(d))}}),B(w,"ownerDocument"),H(R,w,document.createDocumentFragment()),delete w.prototype.querySelector,delete w.prototype.querySelectorAll,w.prototype=F(Object.create(x.prototype),w.prototype),a.cloneNode=u,a.nodeWasAdded=j,a.nodeWasRemoved=l,a.nodesWereAdded=k,a.nodesWereRemoved=m,a.snapshotNodeList=i,a.wrappers.Node=w}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c,d){for(var e=null,f=null,g=0,h=b.length;h>g;g++)e=q(b[g]),(f=p(e).root)&&f instanceof a.wrappers.ShadowRoot||(d[c++]=e);return c}function c(a,b){for(var d,e=a.firstElementChild;e;){if(e.matches(b))return e;if(d=c(e,b))return d;e=e.nextElementSibling}return null}function d(a,b){return a.matches(b)}function e(a,b,c){var d=a.localName;return d===b||d===c&&a.namespaceURI===B}function f(){return!0}function g(a,b,c){return a.localName===c}function h(a,b){return a.namespaceURI===b}function i(a,b,c){return a.namespaceURI===b&&a.localName===c}function j(a,b,c,d,e,f){for(var g=a.firstElementChild;g;)d(g,e,f)&&(c[b++]=g),b=j(g,b,c,d,e,f),g=g.nextElementSibling;return b}function k(c,d,e,f){var g,h=this.impl,i=p(this).root;if(i instanceof a.wrappers.ShadowRoot)return j(this,d,e,c,f,null);if(h instanceof z)g=u.call(h,f);else{if(!(h instanceof A))return j(this,d,e,c,f,null);g=t.call(h,f)}return b(g,d,e)}function l(c,d,e,f,g){var h,i=this.impl,k=p(this).root;if(k instanceof a.wrappers.ShadowRoot)return j(this,d,e,c,f,g);if(i instanceof z)h=w.call(i,f,g);else{if(!(i instanceof A))return j(this,d,e,c,f,g);h=v.call(i,f,g)}return b(h,d,e)}function m(c,d,e,f,g){var h,i=this.impl,k=p(this).root;if(k instanceof a.wrappers.ShadowRoot)return j(this,d,e,c,f,g);if(i instanceof z)h=y.call(i,f,g);else{if(!(i instanceof A))return j(this,d,e,c,f,g);h=x.call(i,f,g)}return b(h,d,e)}var n=a.wrappers.HTMLCollection,o=a.wrappers.NodeList,p=a.getTreeScope,q=a.wrap,r=document.querySelector,s=document.documentElement.querySelector,t=document.querySelectorAll,u=document.documentElement.querySelectorAll,v=document.getElementsByTagName,w=document.documentElement.getElementsByTagName,x=document.getElementsByTagNameNS,y=document.documentElement.getElementsByTagNameNS,z=window.Element,A=window.HTMLDocument,B="http://www.w3.org/1999/xhtml",C={querySelector:function(b){var d,e=this.impl,f=p(this).root;if(f instanceof a.wrappers.ShadowRoot)return c(this,b);if(e instanceof z)d=q(s.call(e,b));else{if(!(e instanceof A))return c(this,b);d=q(r.call(e,b))}return d&&(f=p(d).root)&&f instanceof a.wrappers.ShadowRoot?c(this,b):d},querySelectorAll:function(a){var b=new o;return b.length=k.call(this,d,0,b,a),b}},D={getElementsByTagName:function(a){var b=new n,c="*"===a?f:e;return b.length=l.call(this,c,0,b,a,a.toLowerCase()),b},getElementsByClassName:function(a){return this.querySelectorAll("."+a)},getElementsByTagNameNS:function(a,b){var c=new n,d=null;return d="*"===a?"*"===b?f:g:"*"===b?h:i,c.length=m.call(this,d,0,c,a||null,b),c}};a.GetElementsByInterface=D,a.SelectorsInterface=C}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}function c(a){for(;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}var d=a.wrappers.NodeList,e={get firstElementChild(){return b(this.firstChild)},get lastElementChild(){return c(this.lastChild)},get childElementCount(){for(var a=0,b=this.firstElementChild;b;b=b.nextElementSibling)a++;return a},get children(){for(var a=new d,b=0,c=this.firstElementChild;c;c=c.nextElementSibling)a[b++]=c;return a.length=b,a},remove:function(){var a=this.parentNode;a&&a.removeChild(this)}},f={get nextElementSibling(){return b(this.nextSibling)},get previousElementSibling(){return c(this.previousSibling)}};a.ChildNodeInterface=f,a.ParentNodeInterface=e}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}var c=a.ChildNodeInterface,d=a.wrappers.Node,e=a.enqueueMutation,f=a.mixin,g=a.registerWrapper,h=window.CharacterData;b.prototype=Object.create(d.prototype),f(b.prototype,{get textContent(){return this.data},set textContent(a){this.data=a},get data(){return this.impl.data},set data(a){var b=this.impl.data;e(this,"characterData",{oldValue:b}),this.impl.data=a}}),f(b.prototype,c),g(h,b,document.createTextNode("")),a.wrappers.CharacterData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a>>>0}function c(a){d.call(this,a)}var d=a.wrappers.CharacterData,e=(a.enqueueMutation,a.mixin),f=a.registerWrapper,g=window.Text;c.prototype=Object.create(d.prototype),e(c.prototype,{splitText:function(a){a=b(a);var c=this.data;if(a>c.length)throw new Error("IndexSizeError");var d=c.slice(0,a),e=c.slice(a);this.data=d;var f=this.ownerDocument.createTextNode(e);return this.parentNode&&this.parentNode.insertBefore(f,this.nextSibling),f}}),f(g,c,document.createTextNode("")),a.wrappers.Text=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b){a.invalidateRendererBasedOnAttribute(b,"class")}function c(a,b){this.impl=a,this.ownerElement_=b}c.prototype={get length(){return this.impl.length},item:function(a){return this.impl.item(a)},contains:function(a){return this.impl.contains(a)},add:function(){this.impl.add.apply(this.impl,arguments),b(this.ownerElement_)},remove:function(){this.impl.remove.apply(this.impl,arguments),b(this.ownerElement_)},toggle:function(){var a=this.impl.toggle.apply(this.impl,arguments);return b(this.ownerElement_),a},toString:function(){return this.impl.toString()}},a.wrappers.DOMTokenList=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b,c){var d=b.parentNode;if(d&&d.shadowRoot){var e=a.getRendererForHost(d);e.dependsOnAttribute(c)&&e.invalidate()}}function c(a,b,c){k(a,"attributes",{name:b,namespace:null,oldValue:c})}function d(a){g.call(this,a)}var e=a.ChildNodeInterface,f=a.GetElementsByInterface,g=a.wrappers.Node,h=a.wrappers.DOMTokenList,i=a.ParentNodeInterface,j=a.SelectorsInterface,k=(a.addWrapNodeListMethod,a.enqueueMutation),l=a.mixin,m=(a.oneOf,a.registerWrapper),n=a.unwrap,o=a.wrappers,p=window.Element,q=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(a){return p.prototype[a]}),r=q[0],s=p.prototype[r],t=new WeakMap;d.prototype=Object.create(g.prototype),l(d.prototype,{createShadowRoot:function(){var b=new o.ShadowRoot(this);this.impl.polymerShadowRoot_=b;var c=a.getRendererForHost(this);return c.invalidate(),b},get shadowRoot(){return this.impl.polymerShadowRoot_||null},setAttribute:function(a,d){var e=this.impl.getAttribute(a);this.impl.setAttribute(a,d),c(this,a,e),b(this,a)},removeAttribute:function(a){var d=this.impl.getAttribute(a);this.impl.removeAttribute(a),c(this,a,d),b(this,a)},matches:function(a){return s.call(this.impl,a)},get classList(){var a=t.get(this);return a||t.set(this,a=new h(n(this).classList,this)),a},get className(){return n(this).className},set className(a){this.setAttribute("class",a)},get id(){return n(this).id},set id(a){this.setAttribute("id",a)}}),q.forEach(function(a){"matches"!==a&&(d.prototype[a]=function(a){return this.matches(a)})}),p.prototype.webkitCreateShadowRoot&&(d.prototype.webkitCreateShadowRoot=d.prototype.createShadowRoot),l(d.prototype,e),l(d.prototype,f),l(d.prototype,i),l(d.prototype,j),m(p,d,document.createElementNS(null,"x")),a.invalidateRendererBasedOnAttribute=b,a.matchesNames=q,a.wrappers.Element=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xa0":return" "}}function c(a){return a.replace(z,b)}function d(a){return a.replace(A,b)}function e(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}function f(a,b){switch(a.nodeType){case Node.ELEMENT_NODE:for(var e,f=a.tagName.toLowerCase(),h="<"+f,i=a.attributes,j=0;e=i[j];j++)h+=" "+e.name+'="'+c(e.value)+'"';return h+=">",B[f]?h:h+g(a)+"</"+f+">";case Node.TEXT_NODE:var k=a.data;return b&&C[b.localName]?k:d(k);case Node.COMMENT_NODE:return"<!--"+a.data+"-->";default:throw console.error(a),new Error("not implemented")}}function g(a){a instanceof y.HTMLTemplateElement&&(a=a.content);for(var b="",c=a.firstChild;c;c=c.nextSibling)b+=f(c,a);return b}function h(a,b,c){var d=c||"div";a.textContent="";var e=w(a.ownerDocument.createElement(d));e.innerHTML=b;for(var f;f=e.firstChild;)a.appendChild(x(f))}function i(a){o.call(this,a)}function j(a,b){var c=w(a.cloneNode(!1));c.innerHTML=b;for(var d,e=w(document.createDocumentFragment());d=c.firstChild;)e.appendChild(d);return x(e)}function k(b){return function(){return a.renderAllPending(),this.impl[b]}}function l(a){p(i,a,k(a))}function m(b){Object.defineProperty(i.prototype,b,{get:k(b),set:function(c){a.renderAllPending(),this.impl[b]=c},configurable:!0,enumerable:!0})}function n(b){Object.defineProperty(i.prototype,b,{value:function(){return a.renderAllPending(),this.impl[b].apply(this.impl,arguments)},configurable:!0,enumerable:!0})}var o=a.wrappers.Element,p=a.defineGetter,q=a.enqueueMutation,r=a.mixin,s=a.nodesWereAdded,t=a.nodesWereRemoved,u=a.registerWrapper,v=a.snapshotNodeList,w=a.unwrap,x=a.wrap,y=a.wrappers,z=/[&\u00A0"]/g,A=/[&\u00A0<>]/g,B=e(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=e(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D=/MSIE/.test(navigator.userAgent),E=window.HTMLElement,F=window.HTMLTemplateElement;i.prototype=Object.create(o.prototype),r(i.prototype,{get innerHTML(){return g(this)},set innerHTML(a){if(D&&C[this.localName])return void(this.textContent=a);var b=v(this.childNodes);this.invalidateShadowRenderer()?this instanceof y.HTMLTemplateElement?h(this.content,a):h(this,a,this.tagName):!F&&this instanceof y.HTMLTemplateElement?h(this.content,a):this.impl.innerHTML=a;var c=v(this.childNodes);q(this,"childList",{addedNodes:c,removedNodes:b}),t(b),s(c,this)},get outerHTML(){return f(this,this.parentNode)},set outerHTML(a){var b=this.parentNode;if(b){b.invalidateShadowRenderer();var c=j(b,a);b.replaceChild(c,this)}},insertAdjacentHTML:function(a,b){var c,d;switch(String(a).toLowerCase()){case"beforebegin":c=this.parentNode,d=this;break;case"afterend":c=this.parentNode,d=this.nextSibling;break;case"afterbegin":c=this,d=this.firstChild;break;case"beforeend":c=this,d=null;break;default:return}var e=j(c,b);c.insertBefore(e,d)},get hidden(){return this.hasAttribute("hidden")},set hidden(a){a?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(l),["scrollLeft","scrollTop"].forEach(m),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(n),u(E,i,document.createElement("b")),a.wrappers.HTMLElement=i,a.getInnerHTML=g,a.setInnerHTML=h}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.HTMLCanvasElement;b.prototype=Object.create(c.prototype),d(b.prototype,{getContext:function(){var a=this.impl.getContext.apply(this.impl,arguments);return a&&f(a)}}),e(g,b,document.createElement("canvas")),a.wrappers.HTMLCanvasElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=window.HTMLContentElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get select(){return this.getAttribute("select")},set select(a){this.setAttribute("select",a)},setAttribute:function(a,b){c.prototype.setAttribute.call(this,a,b),"select"===String(a).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),f&&e(f,b),a.wrappers.HTMLContentElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=window.HTMLFormElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get elements(){return f(g(this).elements)}}),e(h,b,document.createElement("form")),a.wrappers.HTMLFormElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a,b){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var e=f(document.createElement("img"));d.call(this,e),g(e,this),void 0!==a&&(e.width=a),void 0!==b&&(e.height=b)}var d=a.wrappers.HTMLElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLImageElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("img")),c.prototype=b.prototype,a.wrappers.HTMLImageElement=b,a.wrappers.Image=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=(a.mixin,a.wrappers.NodeList,a.registerWrapper),e=window.HTMLShadowElement;b.prototype=Object.create(c.prototype),e&&d(e,b),a.wrappers.HTMLShadowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){if(!a.defaultView)return a;var b=k.get(a);if(!b){for(b=a.implementation.createHTMLDocument("");b.lastChild;)b.removeChild(b.lastChild);k.set(a,b)}return b}function c(a){for(var c,d=b(a.ownerDocument),e=h(d.createDocumentFragment());c=a.firstChild;)e.appendChild(c);return e}function d(a){if(e.call(this,a),!l){var b=c(a);j.set(this,i(b))}}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.unwrap,i=a.wrap,j=new WeakMap,k=new WeakMap,l=window.HTMLTemplateElement;d.prototype=Object.create(e.prototype),f(d.prototype,{get content(){return l?i(this.impl.content):j.get(this)}}),l&&g(l,d),a.wrappers.HTMLTemplateElement=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.registerWrapper,e=window.HTMLMediaElement;b.prototype=Object.create(c.prototype),d(e,b,document.createElement("audio")),a.wrappers.HTMLMediaElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){d.call(this,a)}function c(a){if(!(this instanceof c))throw new TypeError("DOM object constructor cannot be called as a function.");var b=f(document.createElement("audio"));d.call(this,b),g(b,this),b.setAttribute("preload","auto"),void 0!==a&&b.setAttribute("src",a)}var d=a.wrappers.HTMLMediaElement,e=a.registerWrapper,f=a.unwrap,g=a.rewrap,h=window.HTMLAudioElement;b.prototype=Object.create(d.prototype),e(h,b,document.createElement("audio")),c.prototype=b.prototype,a.wrappers.HTMLAudioElement=b,a.wrappers.Audio=c}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){return a.replace(/\s+/g," ").trim()}function c(a){e.call(this,a)}function d(a,b,c,f){if(!(this instanceof d))throw new TypeError("DOM object constructor cannot be called as a function.");var g=i(document.createElement("option"));e.call(this,g),h(g,this),void 0!==a&&(g.text=a),void 0!==b&&g.setAttribute("value",b),c===!0&&g.setAttribute("selected",""),g.selected=f===!0}var e=a.wrappers.HTMLElement,f=a.mixin,g=a.registerWrapper,h=a.rewrap,i=a.unwrap,j=a.wrap,k=window.HTMLOptionElement;c.prototype=Object.create(e.prototype),f(c.prototype,{get text(){return b(this.textContent)},set text(a){this.textContent=b(String(a))},get form(){return j(i(this).form)}}),g(k,c,document.createElement("option")),d.prototype=c.prototype,a.wrappers.HTMLOptionElement=c,a.wrappers.Option=d}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=window.HTMLSelectElement;b.prototype=Object.create(c.prototype),d(b.prototype,{add:function(a,b){"object"==typeof b&&(b=f(b)),f(this).add(f(a),b)},remove:function(a){return void 0===a?void c.prototype.remove.call(this):("object"==typeof a&&(a=f(a)),void f(this).remove(a))},get form(){return g(f(this).form)}}),e(h,b,document.createElement("select")),a.wrappers.HTMLSelectElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.unwrap,g=a.wrap,h=a.wrapHTMLCollection,i=window.HTMLTableElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get caption(){return g(f(this).caption)},createCaption:function(){return g(f(this).createCaption())},get tHead(){return g(f(this).tHead)},createTHead:function(){return g(f(this).createTHead())},createTFoot:function(){return g(f(this).createTFoot())},get tFoot(){return g(f(this).tFoot)},get tBodies(){return h(f(this).tBodies) +},createTBody:function(){return g(f(this).createTBody())},get rows(){return h(f(this).rows)},insertRow:function(a){return g(f(this).insertRow(a))}}),e(i,b,document.createElement("table")),a.wrappers.HTMLTableElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableSectionElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get rows(){return f(g(this).rows)},insertRow:function(a){return h(g(this).insertRow(a))}}),e(i,b,document.createElement("thead")),a.wrappers.HTMLTableSectionElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.HTMLElement,d=a.mixin,e=a.registerWrapper,f=a.wrapHTMLCollection,g=a.unwrap,h=a.wrap,i=window.HTMLTableRowElement;b.prototype=Object.create(c.prototype),d(b.prototype,{get cells(){return f(g(this).cells)},insertCell:function(a){return h(g(this).insertCell(a))}}),e(i,b,document.createElement("tr")),a.wrappers.HTMLTableRowElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){switch(a.localName){case"content":return new c(a);case"shadow":return new e(a);case"template":return new f(a)}d.call(this,a)}var c=a.wrappers.HTMLContentElement,d=a.wrappers.HTMLElement,e=a.wrappers.HTMLShadowElement,f=a.wrappers.HTMLTemplateElement,g=(a.mixin,a.registerWrapper),h=window.HTMLUnknownElement;b.prototype=Object.create(d.prototype),g(h,b),a.wrappers.HTMLUnknownElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.wrappers.Element,c=a.wrappers.HTMLElement,d=a.registerObject,e="http://www.w3.org/2000/svg",f=document.createElementNS(e,"title"),g=d(f),h=Object.getPrototypeOf(g.prototype).constructor;if(!("classList"in f)){var i=Object.getOwnPropertyDescriptor(b.prototype,"classList");Object.defineProperty(c.prototype,"classList",i),delete b.prototype.classList}a.wrappers.SVGElement=h}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){m.call(this,a)}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.wrap,g=window.SVGUseElement,h="http://www.w3.org/2000/svg",i=f(document.createElementNS(h,"g")),j=document.createElementNS(h,"use"),k=i.constructor,l=Object.getPrototypeOf(k.prototype),m=l.constructor;b.prototype=Object.create(l),"instanceRoot"in j&&c(b.prototype,{get instanceRoot(){return f(e(this).instanceRoot)},get animatedInstanceRoot(){return f(e(this).animatedInstanceRoot)}}),d(g,b,j),a.wrappers.SVGUseElement=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.mixin,e=a.registerWrapper,f=a.wrap,g=window.SVGElementInstance;g&&(b.prototype=Object.create(c.prototype),d(b.prototype,{get correspondingElement(){return f(this.impl.correspondingElement)},get correspondingUseElement(){return f(this.impl.correspondingUseElement)},get parentNode(){return f(this.impl.parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return f(this.impl.firstChild)},get lastChild(){return f(this.impl.lastChild)},get previousSibling(){return f(this.impl.previousSibling)},get nextSibling(){return f(this.impl.nextSibling)}}),e(g,b),a.wrappers.SVGElementInstance=b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrap,f=a.unwrapIfNeeded,g=a.wrap,h=window.CanvasRenderingContext2D;c(b.prototype,{get canvas(){return g(this.impl.canvas)},drawImage:function(){arguments[0]=f(arguments[0]),this.impl.drawImage.apply(this.impl,arguments)},createPattern:function(){return arguments[0]=e(arguments[0]),this.impl.createPattern.apply(this.impl,arguments)}}),d(h,b,document.createElement("canvas").getContext("2d")),a.wrappers.CanvasRenderingContext2D=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.mixin,d=a.registerWrapper,e=a.unwrapIfNeeded,f=a.wrap,g=window.WebGLRenderingContext;if(g){c(b.prototype,{get canvas(){return f(this.impl.canvas)},texImage2D:function(){arguments[5]=e(arguments[5]),this.impl.texImage2D.apply(this.impl,arguments)},texSubImage2D:function(){arguments[6]=e(arguments[6]),this.impl.texSubImage2D.apply(this.impl,arguments)}});var h=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};d(g,b,h),a.wrappers.WebGLRenderingContext=b}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap,g=window.Range;b.prototype={get startContainer(){return f(this.impl.startContainer)},get endContainer(){return f(this.impl.endContainer)},get commonAncestorContainer(){return f(this.impl.commonAncestorContainer)},setStart:function(a,b){this.impl.setStart(e(a),b)},setEnd:function(a,b){this.impl.setEnd(e(a),b)},setStartBefore:function(a){this.impl.setStartBefore(e(a))},setStartAfter:function(a){this.impl.setStartAfter(e(a))},setEndBefore:function(a){this.impl.setEndBefore(e(a))},setEndAfter:function(a){this.impl.setEndAfter(e(a))},selectNode:function(a){this.impl.selectNode(e(a))},selectNodeContents:function(a){this.impl.selectNodeContents(e(a))},compareBoundaryPoints:function(a,b){return this.impl.compareBoundaryPoints(a,d(b))},extractContents:function(){return f(this.impl.extractContents())},cloneContents:function(){return f(this.impl.cloneContents())},insertNode:function(a){this.impl.insertNode(e(a))},surroundContents:function(a){this.impl.surroundContents(e(a))},cloneRange:function(){return f(this.impl.cloneRange())},isPointInRange:function(a,b){return this.impl.isPointInRange(e(a),b)},comparePoint:function(a,b){return this.impl.comparePoint(e(a),b)},intersectsNode:function(a){return this.impl.intersectsNode(e(a))},toString:function(){return this.impl.toString()}},g.prototype.createContextualFragment&&(b.prototype.createContextualFragment=function(a){return f(this.impl.createContextualFragment(a))}),c(window.Range,b,document.createRange()),a.wrappers.Range=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.GetElementsByInterface,c=a.ParentNodeInterface,d=a.SelectorsInterface,e=a.mixin,f=a.registerObject,g=f(document.createDocumentFragment());e(g.prototype,c),e(g.prototype,d),e(g.prototype,b);var h=f(document.createComment(""));a.wrappers.Comment=h,a.wrappers.DocumentFragment=g}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=k(a.impl.ownerDocument.createDocumentFragment());c.call(this,b),i(b,this);var e=a.shadowRoot;m.set(this,e),this.treeScope_=new d(this,g(e||a)),l.set(this,a)}var c=a.wrappers.DocumentFragment,d=a.TreeScope,e=a.elementFromPoint,f=a.getInnerHTML,g=a.getTreeScope,h=a.mixin,i=a.rewrap,j=a.setInnerHTML,k=a.unwrap,l=new WeakMap,m=new WeakMap,n=/[ \t\n\r\f]/;b.prototype=Object.create(c.prototype),h(b.prototype,{get innerHTML(){return f(this)},set innerHTML(a){j(this,a),this.invalidateShadowRenderer()},get olderShadowRoot(){return m.get(this)||null},get host(){return l.get(this)||null},invalidateShadowRenderer:function(){return l.get(this).invalidateShadowRenderer()},elementFromPoint:function(a,b){return e(this,this.ownerDocument,a,b)},getElementById:function(a){return n.test(a)?null:this.querySelector('[id="'+a+'"]')}}),a.wrappers.ShadowRoot=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){a.previousSibling_=a.previousSibling,a.nextSibling_=a.nextSibling,a.parentNode_=a.parentNode}function c(a,c,e){var f=G(a),g=G(c),h=e?G(e):null;if(d(c),b(c),e)a.firstChild===e&&(a.firstChild_=e),e.previousSibling_=e.previousSibling;else{a.lastChild_=a.lastChild,a.lastChild===a.firstChild&&(a.firstChild_=a.firstChild);var i=H(f.lastChild);i&&(i.nextSibling_=i.nextSibling)}f.insertBefore(g,h)}function d(a){var c=G(a),d=c.parentNode;if(d){var e=H(d);b(a),a.previousSibling&&(a.previousSibling.nextSibling_=a),a.nextSibling&&(a.nextSibling.previousSibling_=a),e.lastChild===a&&(e.lastChild_=a),e.firstChild===a&&(e.firstChild_=a),d.removeChild(c)}}function e(a){I.set(a,[])}function f(a){var b=I.get(a);return b||I.set(a,b=[]),b}function g(a){for(var b=[],c=0,d=a.firstChild;d;d=d.nextSibling)b[c++]=d;return b}function h(){for(var a=0;a<M.length;a++){var b=M[a],c=b.parentRenderer;c&&c.dirty||b.render()}M=[]}function i(){y=null,h()}function j(a){var b=K.get(a);return b||(b=new n(a),K.set(a,b)),b}function k(a){var b=E(a).root;return b instanceof D?b:null}function l(a){return j(a.host)}function m(a){this.skip=!1,this.node=a,this.childNodes=[]}function n(a){this.host=a,this.dirty=!1,this.invalidateAttributes(),this.associateNode(a)}function o(a){for(var b=[],c=a.firstChild;c;c=c.nextSibling)v(c)?b.push.apply(b,f(c)):b.push(c);return b}function p(a){if(a instanceof B)return a;if(a instanceof A)return null;for(var b=a.firstChild;b;b=b.nextSibling){var c=p(b);if(c)return c}return null}function q(a,b){f(b).push(a);var c=J.get(a);c?c.push(b):J.set(a,[b])}function r(a){return J.get(a)}function s(a){J.set(a,void 0)}function t(a,b){var c=b.getAttribute("select");if(!c)return!0;if(c=c.trim(),!c)return!0;if(!(a instanceof z))return!1;if(!O.test(c))return!1;try{return a.matches(c)}catch(d){return!1}}function u(a,b){var c=r(b);return c&&c[c.length-1]===a}function v(a){return a instanceof A||a instanceof B}function w(a){return a.shadowRoot}function x(a){for(var b=[],c=a.shadowRoot;c;c=c.olderShadowRoot)b.push(c);return b}var y,z=a.wrappers.Element,A=a.wrappers.HTMLContentElement,B=a.wrappers.HTMLShadowElement,C=a.wrappers.Node,D=a.wrappers.ShadowRoot,E=(a.assert,a.getTreeScope),F=(a.mixin,a.oneOf),G=a.unwrap,H=a.wrap,I=new WeakMap,J=new WeakMap,K=new WeakMap,L=F(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),M=[],N=new ArraySplice;N.equals=function(a,b){return G(a.node)===b},m.prototype={append:function(a){var b=new m(a);return this.childNodes.push(b),b},sync:function(a){if(!this.skip){for(var b=this.node,e=this.childNodes,f=g(G(b)),h=a||new WeakMap,i=N.calculateSplices(e,f),j=0,k=0,l=0,m=0;m<i.length;m++){for(var n=i[m];l<n.index;l++)k++,e[j++].sync(h);for(var o=n.removed.length,p=0;o>p;p++){var q=H(f[k++]);h.get(q)||d(q)}for(var r=n.addedCount,s=f[k]&&H(f[k]),p=0;r>p;p++){var t=e[j++],u=t.node;c(b,u,s),h.set(u,!0),t.sync(h)}l+=r}for(var m=l;m<e.length;m++)e[m].sync(h)}}},n.prototype={render:function(a){if(this.dirty){this.invalidateAttributes();var b=this.host;this.distribution(b);var c=a||new m(b);this.buildRenderTree(c,b);var d=!a;d&&c.sync(),this.dirty=!1}},get parentRenderer(){return E(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var a=this.parentRenderer;if(a&&a.invalidate(),M.push(this),y)return;y=window[L](i,0)}},distribution:function(a){this.resetAll(a),this.distributionResolution(a)},resetAll:function(a){v(a)?e(a):s(a);for(var b=a.firstChild;b;b=b.nextSibling)this.resetAll(b);a.shadowRoot&&this.resetAll(a.shadowRoot),a.olderShadowRoot&&this.resetAll(a.olderShadowRoot)},distributionResolution:function(a){if(w(a)){for(var b=a,c=o(b),d=x(b),e=0;e<d.length;e++)this.poolDistribution(d[e],c);for(var e=d.length-1;e>=0;e--){var f=d[e],g=p(f);if(g){var h=f.olderShadowRoot;h&&(c=o(h));for(var i=0;i<c.length;i++)q(c[i],g)}this.distributionResolution(f)}}for(var j=a.firstChild;j;j=j.nextSibling)this.distributionResolution(j)},poolDistribution:function(a,b){if(!(a instanceof B))if(a instanceof A){var c=a;this.updateDependentAttributes(c.getAttribute("select"));for(var d=!1,e=0;e<b.length;e++){var a=b[e];a&&t(a,c)&&(q(a,c),b[e]=void 0,d=!0)}if(!d)for(var f=c.firstChild;f;f=f.nextSibling)q(f,c)}else for(var f=a.firstChild;f;f=f.nextSibling)this.poolDistribution(f,b)},buildRenderTree:function(a,b){for(var c=this.compose(b),d=0;d<c.length;d++){var e=c[d],f=a.append(e);this.buildRenderTree(f,e)}if(w(b)){var g=j(b);g.dirty=!1}},compose:function(a){for(var b=[],c=a.shadowRoot||a,d=c.firstChild;d;d=d.nextSibling)if(v(d)){this.associateNode(c);for(var e=f(d),g=0;g<e.length;g++){var h=e[g];u(d,h)&&b.push(h)}}else b.push(d);return b},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(a){if(a){var b=this.attributes;/\.\w+/.test(a)&&(b["class"]=!0),/#\w+/.test(a)&&(b.id=!0),a.replace(/\[\s*([^\s=\|~\]]+)/g,function(a,c){b[c]=!0})}},dependsOnAttribute:function(a){return this.attributes[a]},associateNode:function(a){a.impl.polymerShadowRenderer_=this}};var O=/^[*.#[a-zA-Z_|]/;C.prototype.invalidateShadowRenderer=function(){var a=this.impl.polymerShadowRenderer_;return a?(a.invalidate(),!0):!1},A.prototype.getDistributedNodes=B.prototype.getDistributedNodes=function(){return h(),f(this)},z.prototype.getDestinationInsertionPoints=function(){return h(),r(this)||[]},A.prototype.nodeIsInserted_=B.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var a,b=k(this);b&&(a=l(b)),this.impl.polymerShadowRenderer_=a,a&&a.invalidate()},a.getRendererForHost=j,a.getShadowTrees=x,a.renderAllPending=h,a.getDestinationInsertionPoints=r,a.visual={insertBefore:c,remove:d}}(window.ShadowDOMPolyfill),function(a){"use strict";function b(b){if(window[b]){d(!a.wrappers[b]);var i=function(a){c.call(this,a)};i.prototype=Object.create(c.prototype),e(i.prototype,{get form(){return h(g(this).form)}}),f(window[b],i,document.createElement(b.slice(4,-7))),a.wrappers[b]=i}}var c=a.wrappers.HTMLElement,d=a.assert,e=a.mixin,f=a.registerWrapper,g=a.unwrap,h=a.wrap,i=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];i.forEach(b)}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a}{var c=a.registerWrapper,d=a.unwrap,e=a.unwrapIfNeeded,f=a.wrap;window.Selection}b.prototype={get anchorNode(){return f(this.impl.anchorNode)},get focusNode(){return f(this.impl.focusNode)},addRange:function(a){this.impl.addRange(d(a))},collapse:function(a,b){this.impl.collapse(e(a),b)},containsNode:function(a,b){return this.impl.containsNode(e(a),b)},extend:function(a,b){this.impl.extend(e(a),b)},getRangeAt:function(a){return f(this.impl.getRangeAt(a))},removeRange:function(a){this.impl.removeRange(d(a))},selectAllChildren:function(a){this.impl.selectAllChildren(e(a))},toString:function(){return this.impl.toString()}},c(window.Selection,b,window.getSelection()),a.wrappers.Selection=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){k.call(this,a),this.treeScope_=new p(this,null)}function c(a){var c=document[a];b.prototype[a]=function(){return A(c.apply(this.impl,arguments))}}function d(a,b){D.call(b.impl,z(a)),e(a,b)}function e(a,b){a.shadowRoot&&b.adoptNode(a.shadowRoot),a instanceof o&&f(a,b);for(var c=a.firstChild;c;c=c.nextSibling)e(c,b)}function f(a,b){var c=a.olderShadowRoot;c&&b.adoptNode(c)}function g(a){this.impl=a}function h(a,b){var c=document.implementation[b];a.prototype[b]=function(){return A(c.apply(this.impl,arguments))}}function i(a,b){var c=document.implementation[b];a.prototype[b]=function(){return c.apply(this.impl,arguments)}}var j=a.GetElementsByInterface,k=a.wrappers.Node,l=a.ParentNodeInterface,m=a.wrappers.Selection,n=a.SelectorsInterface,o=a.wrappers.ShadowRoot,p=a.TreeScope,q=a.cloneNode,r=a.defineWrapGetter,s=a.elementFromPoint,t=a.forwardMethodsToWrapper,u=a.matchesNames,v=a.mixin,w=a.registerWrapper,x=a.renderAllPending,y=a.rewrap,z=a.unwrap,A=a.wrap,B=a.wrapEventTargetMethods,C=(a.wrapNodeList,new WeakMap);b.prototype=Object.create(k.prototype),r(b,"documentElement"),r(b,"body"),r(b,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(c);var D=document.adoptNode,E=document.getSelection;if(v(b.prototype,{adoptNode:function(a){return a.parentNode&&a.parentNode.removeChild(a),d(a,this),a},elementFromPoint:function(a,b){return s(this,this,a,b)},importNode:function(a,b){return q(a,b,this.impl)},getSelection:function(){return x(),new m(E.call(z(this)))},getElementsByName:function(a){return n.querySelectorAll.call(this,"[name="+JSON.stringify(String(a))+"]")}}),document.registerElement){var F=document.registerElement;b.prototype.registerElement=function(b,c){function d(a){return a?void(this.impl=a):f?document.createElement(f,b):document.createElement(b)}var e,f;if(void 0!==c&&(e=c.prototype,f=c.extends),e||(e=Object.create(HTMLElement.prototype)),a.nativePrototypeTable.get(e))throw new Error("NotSupportedError");for(var g,h=Object.getPrototypeOf(e),i=[];h&&!(g=a.nativePrototypeTable.get(h));)i.push(h),h=Object.getPrototypeOf(h);if(!g)throw new Error("NotSupportedError");for(var j=Object.create(g),k=i.length-1;k>=0;k--)j=Object.create(j);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(a){var b=e[a];b&&(j[a]=function(){A(this)instanceof d||y(this),b.apply(A(this),arguments)})});var l={prototype:j};f&&(l.extends=f),d.prototype=e,d.prototype.constructor=d,a.constructorTable.set(j,d),a.nativePrototypeTable.set(e,j);F.call(z(this),b,l);return d},t([window.HTMLDocument||window.Document],["registerElement"])}t([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"].concat(u)),t([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","elementFromPoint","getElementById","getElementsByName","getSelection"]),v(b.prototype,j),v(b.prototype,l),v(b.prototype,n),v(b.prototype,{get implementation(){var a=C.get(this);return a?a:(a=new g(z(this).implementation),C.set(this,a),a)},get defaultView(){return A(z(this).defaultView)}}),w(window.Document,b,document.implementation.createHTMLDocument("")),window.HTMLDocument&&w(window.HTMLDocument,b),B([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),h(g,"createDocumentType"),h(g,"createDocument"),h(g,"createHTMLDocument"),i(g,"hasFeature"),w(window.DOMImplementation,g),t([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),a.adoptNodeNoRemove=d,a.wrappers.DOMImplementation=g,a.wrappers.Document=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){c.call(this,a)}var c=a.wrappers.EventTarget,d=a.wrappers.Selection,e=a.mixin,f=a.registerWrapper,g=a.renderAllPending,h=a.unwrap,i=a.unwrapIfNeeded,j=a.wrap,k=window.Window,l=window.getComputedStyle,m=window.getDefaultComputedStyle,n=window.getSelection;b.prototype=Object.create(c.prototype),k.prototype.getComputedStyle=function(a,b){return j(this||window).getComputedStyle(i(a),b)},m&&(k.prototype.getDefaultComputedStyle=function(a,b){return j(this||window).getDefaultComputedStyle(i(a),b)}),k.prototype.getSelection=function(){return j(this||window).getSelection()},delete window.getComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(a){k.prototype[a]=function(){var b=j(this||window);return b[a].apply(b,arguments)},delete window[a]}),e(b.prototype,{getComputedStyle:function(a,b){return g(),l.call(h(this),i(a),b)},getSelection:function(){return g(),new d(n.call(h(this)))},get document(){return j(h(this).document)}}),m&&(b.prototype.getDefaultComputedStyle=function(a,b){return g(),m.call(h(this),i(a),b)}),f(k,b,window),a.wrappers.Window=b}(window.ShadowDOMPolyfill),function(a){"use strict";var b=a.unwrap,c=window.DataTransfer||window.Clipboard,d=c.prototype.setDragImage;d&&(c.prototype.setDragImage=function(a,c,e){d.call(this,b(a),c,e)})}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){this.impl=a instanceof e?a:new e(a&&d(a))}var c=a.registerWrapper,d=a.unwrap,e=window.FormData;c(e,b,new e),a.wrappers.FormData=b}(window.ShadowDOMPolyfill),function(a){"use strict";function b(a){var b=c[a],d=window[b];if(d){var e=document.createElement(a),f=e.constructor;window[b]=f}}var c=(a.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(c).forEach(b),Object.getOwnPropertyNames(a.wrappers).forEach(function(b){window[b]=a.wrappers[b]})}(window.ShadowDOMPolyfill),function(a){function b(a,c){var d,e,f,g,h=a.firstElementChild;for(e=[],f=a.shadowRoot;f;)e.push(f),f=f.olderShadowRoot;for(g=e.length-1;g>=0;g--)if(d=e[g].querySelector(c))return d;for(;h;){if(d=b(h,c))return d;h=h.nextElementSibling}return null}function c(a,b,d){var e,f,g,h,i,j=a.firstElementChild;for(g=[],f=a.shadowRoot;f;)g.push(f),f=f.olderShadowRoot;for(h=g.length-1;h>=0;h--)for(e=g[h].querySelectorAll(b),i=0;i<e.length;i++)d.push(e[i]);for(;j;)c(j,b,d),j=j.nextElementSibling;return d}window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded,Object.defineProperty(Element.prototype,"webkitShadowRoot",Object.getOwnPropertyDescriptor(Element.prototype,"shadowRoot"));var d=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var a=d.call(this);return CustomElements.watchShadow(this),a},Element.prototype.webkitCreateShadowRoot=Element.prototype.createShadowRoot,a.queryAllShadows=function(a,d,e){return e?c(a,d,[]):b(a,d)}}(window.Platform),function(a){function b(a,b){var c="";return Array.prototype.forEach.call(a,function(a){c+=a.textContent+"\n\n"}),b||(c=c.replace(l,"")),c}function c(a){var b=document.createElement("style");return b.textContent=a,b}function d(a){var b=c(a);document.head.appendChild(b);var d=[];if(b.sheet)try{d=b.sheet.cssRules}catch(e){}else console.warn("sheet not found",b);return b.parentNode.removeChild(b),d}function e(){v.initialized=!0,document.body.appendChild(v);var a=v.contentDocument,b=a.createElement("base");b.href=document.baseURI,a.head.appendChild(b)}function f(a){v.initialized||e(),document.body.appendChild(v),a(v.contentDocument),document.body.removeChild(v)}function g(a,b){if(b){var e;if(a.match("@import")&&x){var g=c(a);f(function(a){a.head.appendChild(g.impl),e=g.sheet.cssRules,b(e)})}else e=d(a),b(e)}}function h(a){a&&j().appendChild(document.createTextNode(a))}function i(a,b){var d=c(a);d.setAttribute(b,""),d.setAttribute(z,""),document.head.appendChild(d)}function j(){return w||(w=document.createElement("style"),w.setAttribute(z,""),w[z]=!0),w}var k={strictStyling:!1,registry:{},shimStyling:function(a,c,d){var e=this.prepareRoot(a,c,d),f=this.isTypeExtension(d),g=this.makeScopeSelector(c,f),h=b(e,!0);h=this.scopeCssText(h,g),a&&(a.shimmedStyle=h),this.addCssToDocument(h,c)},shimStyle:function(a,b){return this.shimCssText(a.textContent,b)},shimCssText:function(a,b){return a=this.insertDirectives(a),this.scopeCssText(a,b)},makeScopeSelector:function(a,b){return a?b?"[is="+a+"]":a:""},isTypeExtension:function(a){return a&&a.indexOf("-")<0},prepareRoot:function(a,b,c){var d=this.registerRoot(a,b,c);return this.replaceTextInStyles(d.rootStyles,this.insertDirectives),this.removeStyles(a,d.rootStyles),this.strictStyling&&this.applyScopeToContent(a,b),d.scopeStyles},removeStyles:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)c.parentNode.removeChild(c)},registerRoot:function(a,b,c){var d=this.registry[b]={root:a,name:b,extendsName:c},e=this.findStyles(a);d.rootStyles=e,d.scopeStyles=d.rootStyles;var f=this.registry[d.extendsName];return f&&(d.scopeStyles=f.scopeStyles.concat(d.scopeStyles)),d},findStyles:function(a){if(!a)return[];var b=a.querySelectorAll("style");return Array.prototype.filter.call(b,function(a){return!a.hasAttribute(A)})},applyScopeToContent:function(a,b){a&&(Array.prototype.forEach.call(a.querySelectorAll("*"),function(a){a.setAttribute(b,"")}),Array.prototype.forEach.call(a.querySelectorAll("template"),function(a){this.applyScopeToContent(a.content,b)},this))},insertDirectives:function(a){return a=this.insertPolyfillDirectivesInCssText(a),this.insertPolyfillRulesInCssText(a)},insertPolyfillDirectivesInCssText:function(a){return a=a.replace(m,function(a,b){return b.slice(0,-2)+"{"}),a.replace(n,function(a,b){return b+" {"})},insertPolyfillRulesInCssText:function(a){return a=a.replace(o,function(a,b){return b.slice(0,-1)}),a.replace(p,function(a,b,c,d){var e=a.replace(b,"").replace(c,"");return d+e})},scopeCssText:function(a,b){var c=this.extractUnscopedRulesFromCssText(a);if(a=this.insertPolyfillHostInCssText(a),a=this.convertColonHost(a),a=this.convertColonHostContext(a),a=this.convertShadowDOMSelectors(a),b){var a,d=this;g(a,function(c){a=d.scopeRules(c,b)})}return a=a+"\n"+c,a.trim()},extractUnscopedRulesFromCssText:function(a){for(var b,c="";b=q.exec(a);)c+=b[1].slice(0,-1)+"\n\n";for(;b=r.exec(a);)c+=b[0].replace(b[2],"").replace(b[1],b[3])+"\n\n";return c},convertColonHost:function(a){return this.convertColonRule(a,cssColonHostRe,this.colonHostPartReplacer)},convertColonHostContext:function(a){return this.convertColonRule(a,cssColonHostContextRe,this.colonHostContextPartReplacer)},convertColonRule:function(a,b,c){return a.replace(b,function(a,b,d,e){if(b=polyfillHostNoCombinator,d){for(var f,g=d.split(","),h=[],i=0,j=g.length;j>i&&(f=g[i]);i++)f=f.trim(),h.push(c(b,f,e));return h.join(",")}return b+e})},colonHostContextPartReplacer:function(a,b,c){return b.match(s)?this.colonHostPartReplacer(a,b,c):a+b+c+", "+b+" "+a+c},colonHostPartReplacer:function(a,b,c){return a+b.replace(s,"")+c},convertShadowDOMSelectors:function(a){for(var b=0;b<shadowDOMSelectorsRe.length;b++)a=a.replace(shadowDOMSelectorsRe[b]," ");return a},scopeRules:function(a,b){var c="";return a&&Array.prototype.forEach.call(a,function(a){if(a.selectorText&&a.style&&void 0!==a.style.cssText)c+=this.scopeSelector(a.selectorText,b,this.strictStyling)+" {\n ",c+=this.propertiesFromRule(a)+"\n}\n\n";else if(a.type===CSSRule.MEDIA_RULE)c+="@media "+a.media.mediaText+" {\n",c+=this.scopeRules(a.cssRules,b),c+="\n}\n\n";else try{a.cssText&&(c+=a.cssText+"\n\n")}catch(d){}},this),c},scopeSelector:function(a,b,c){var d=[],e=a.split(",");return e.forEach(function(a){a=a.trim(),this.selectorNeedsScoping(a,b)&&(a=c&&!a.match(polyfillHostNoCombinator)?this.applyStrictSelectorScope(a,b):this.applySelectorScope(a,b)),d.push(a)},this),d.join(", ")},selectorNeedsScoping:function(a,b){if(Array.isArray(b))return!0;var c=this.makeScopeMatcher(b);return!a.match(c)},makeScopeMatcher:function(a){return a=a.replace(/\[/g,"\\[").replace(/\[/g,"\\]"),new RegExp("^("+a+")"+selectorReSuffix,"m")},applySelectorScope:function(a,b){return Array.isArray(b)?this.applySelectorScopeList(a,b):this.applySimpleSelectorScope(a,b)},applySelectorScopeList:function(a,b){for(var c,d=[],e=0;c=b[e];e++)d.push(this.applySimpleSelectorScope(a,c));return d.join(", ")},applySimpleSelectorScope:function(a,b){return a.match(polyfillHostRe)?(a=a.replace(polyfillHostNoCombinator,b),a.replace(polyfillHostRe,b+" ")):b+" "+a},applyStrictSelectorScope:function(a,b){b=b.replace(/\[is=([^\]]*)\]/g,"$1");var c=[" ",">","+","~"],d=a,e="["+b+"]";return c.forEach(function(a){var b=d.split(a);d=b.map(function(a){var b=a.trim().replace(polyfillHostRe,"");return b&&c.indexOf(b)<0&&b.indexOf(e)<0&&(a=b.replace(/([^:]*)(:*)(.*)/,"$1"+e+"$2$3")),a}).join(a)}),d},insertPolyfillHostInCssText:function(a){return a.replace(colonHostContextRe,t).replace(colonHostRe,s)},propertiesFromRule:function(a){var b=a.style.cssText;a.style.content&&!a.style.content.match(/['"]+|attr/)&&(b=b.replace(/content:[^;]*;/g,"content: '"+a.style.content+"';"));var c=a.style;for(var d in c)"initial"===c[d]&&(b+=d+": initial; ");return b},replaceTextInStyles:function(a,b){a&&b&&(a instanceof Array||(a=[a]),Array.prototype.forEach.call(a,function(a){a.textContent=b.call(this,a.textContent)},this))},addCssToDocument:function(a,b){a.match("@import")?i(a,b):h(a)}},l=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,m=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,n=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,o=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,p=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,q=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,r=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,s="-shadowcsshost",t="-shadowcsscontext",u=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)";cssColonHostRe=new RegExp("("+s+u,"gim"),cssColonHostContextRe=new RegExp("("+t+u,"gim"),selectorReSuffix="([>\\s~+[.,{:][\\s\\S]*)?$",colonHostRe=/\:host/gim,colonHostContextRe=/\:host-context/gim,polyfillHostNoCombinator=s+"-no-combinator",polyfillHostRe=new RegExp(s,"gim"),polyfillHostContextRe=new RegExp(t,"gim"),shadowDOMSelectorsRe=[/\^\^/g,/\^/g,/\/shadow\//g,/\/shadow-deep\//g,/::shadow/g,/\/deep\//g,/::content/g];var v=document.createElement("iframe");v.style.display="none";var w,x=navigator.userAgent.match("Chrome"),y="shim-shadowdom",z="shim-shadowdom-css",A="no-shim";if(window.ShadowDOMPolyfill){h("style { display: none !important; }\n");var B=wrap(document),C=B.querySelector("head");C.insertBefore(j(),C.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){var b=a.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var c="link[rel=stylesheet]["+y+"]",d="style["+y+"]";HTMLImports.importer.documentPreloadSelectors+=","+c,HTMLImports.importer.importsPreloadSelectors+=","+c,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,c,d].join(",");var e=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(a){if(!a[z]){var c=a.__importElement||a;if(!c.hasAttribute(y))return void e.call(this,a);a.__resource?(c=a.ownerDocument.createElement("style"),c.textContent=b.resolveCssText(a.__resource,a.href)):b.resolveStyle(c),c.textContent=k.shimStyle(c),c.removeAttribute(y,""),c.setAttribute(z,""),c[z]=!0,c.parentNode!==C&&(a.parentNode===C?C.replaceChild(c,a):this.addElementToDocument(c)),c.__importParsed=!0,this.markParsingComplete(a),this.parseNext()}};var f=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(a){return"link"===a.localName&&"stylesheet"===a.rel&&a.hasAttribute(y)?a.__resource:f.call(this,a)}}})}a.ShadowCSS=k}(window.Platform)):!function(){window.wrap=window.unwrap=function(a){return a +},addEventListener("DOMContentLoaded",function(){if(CustomElements.useNative===!1){var a=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var b=a.call(this);return CustomElements.watchShadow(this),b}}}),Platform.templateContent=function(a){if(window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(a),!a.content&&!a._content){for(var b=document.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a._content=b}return a.content||a._content}}(window.Platform),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x<l.length;x++){var y=l[x];if(" "!=y&&"\n"!=y&&"\r"!=y)if(":"!=y||null!==this._password){var z=e(y);null!==this._password?this._password+=z:this._username+=z}else this._password="";else i("Invalid whitespace in authority.")}l=""}else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){k-=l.length,l="",j="host";continue}l+=u}break;case"file host":if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){2!=l.length||!p.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?j="relative path start":(this._host=d.call(this,l),l="",j="relative path start"):j="relative path";continue}" "==u||"\n"==u||"\r"==u?i("Invalid whitespace in file host."):l+=u;break;case"host":case"hostname":if(":"!=u||s){if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){if(this._host=d.call(this,l),l="",j="relative path start",g)break a;continue}" "!=u&&"\n"!=u&&"\r"!=u?("["==u?s=!0:"]"==u&&(s=!1),l+=u):i("Invalid code point in host/hostname: "+u)}else if(this._host=d.call(this,l),l="",j="port","hostname"==g)break a;break;case"port":if(/[0-9]/.test(u))l+=u;else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u||g){if(""!=l){var A=parseInt(l,10);A!=m[this._scheme]&&(this._port=A+""),l=""}if(g)break a;j="relative path start";continue}" "==u||"\n"==u||"\r"==u?i("Invalid code point in port: "+u):c.call(this)}break;case"relative path start":if("\\"==u&&i("'\\' not allowed in path."),j="relative path","/"!=u&&"\\"!=u)continue;break;case"relative path":if(o!=u&&"/"!=u&&"\\"!=u&&(g||"?"!=u&&"#"!=u))" "!=u&&"\n"!=u&&"\r"!=u&&(l+=e(u));else{"\\"==u&&i("\\ not allowed in relative path.");var B;(B=n[l.toLowerCase()])&&(l=B),".."==l?(this._path.pop(),"/"!=u&&"\\"!=u&&this._path.push("")):"."==l&&"/"!=u&&"\\"!=u?this._path.push(""):"."!=l&&("file"==this._scheme&&0==this._path.length&&2==l.length&&p.test(l[0])&&"|"==l[1]&&(l=l[0]+":"),this._path.push(l)),l="","?"==u?(this._query="?",j="query"):"#"==u&&(this._fragment="#",j="fragment")}break;case"query":g||"#"!=u?o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._query+=f(u)):(this._fragment="#",j="fragment");break;case"fragment":o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._fragment+=u)}k++}}function h(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function i(a,b){void 0===b||b instanceof i||(b=new i(String(b))),this._url=a,h.call(this);var c=a.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");g.call(this,c,null,b)}var j=!1;if(!a.forceJURL)try{var k=new URL("b","http://a");j="http://a/b"===k.href}catch(l){}if(!j){var m=Object.create(null);m.ftp=21,m.file=0,m.gopher=70,m.http=80,m.https=443,m.ws=80,m.wss=443;var n=Object.create(null);n["%2e"]=".",n[".%2e"]="..",n["%2e."]="..",n["%2e%2e"]="..";var o=void 0,p=/[a-zA-Z]/,q=/[a-zA-Z0-9\+\-\.]/;i.prototype={get href(){if(this._isInvalid)return this._url;var a="";return(""!=this._username||null!=this._password)&&(a=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+a+this.host:"")+this.pathname+this._query+this._fragment},set href(a){h.call(this),g.call(this,a)},get protocol(){return this._scheme+":"},set protocol(a){this._isInvalid||g.call(this,a+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"host")},get hostname(){return this._host},set hostname(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"hostname")},get port(){return this._port},set port(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(a){!this._isInvalid&&this._isRelative&&(this._path=[],g.call(this,a,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(a){!this._isInvalid&&this._isRelative&&(this._query="?","?"==a[0]&&(a=a.slice(1)),g.call(this,a,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(a){this._isInvalid||(this._fragment="#","#"==a[0]&&(a=a.slice(1)),g.call(this,a,"fragment"))}};var r=a.URL;r&&(i.createObjectURL=function(){return r.createObjectURL.apply(r,arguments)},i.revokeObjectURL=function(a){r.revokeObjectURL(a)}),a.URL=i}}(this),function(a){function b(a){for(var b=a||{},d=1;d<arguments.length;d++){var e=arguments[d];try{for(var f in e)c(f,e,b)}catch(g){}}return b}function c(a,b,c){var e=d(b,a);Object.defineProperty(c,a,e)}function d(a,b){if(a){var c=Object.getOwnPropertyDescriptor(a,b);return c||d(Object.getPrototypeOf(a),b)}}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();return d.push.apply(d,arguments),b.apply(a,d)}}),a.mixin=b}(window.Platform),function(a){"use strict";function b(a,b,c){var d="string"==typeof a?document.createElement(a):a.cloneNode(!0);if(d.innerHTML=b,c)for(var e in c)d.setAttribute(e,c[e]);return d}var c=DOMTokenList.prototype.add,d=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var a=0;a<arguments.length;a++)c.call(this,arguments[a])},DOMTokenList.prototype.remove=function(){for(var a=0;a<arguments.length;a++)d.call(this,arguments[a])},DOMTokenList.prototype.toggle=function(a,b){1==arguments.length&&(b=!this.contains(a)),b?this.add(a):this.remove(a)},DOMTokenList.prototype.switch=function(a,b){a&&this.remove(a),b&&this.add(b)};var e=function(){return Array.prototype.slice.call(this)},f=window.NamedNodeMap||window.MozNamedAttrMap||{};if(NodeList.prototype.array=e,f.prototype.array=e,HTMLCollection.prototype.array=e,!window.performance){var g=Date.now();window.performance={now:function(){return Date.now()-g}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var a=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return a?function(b){return a(function(){b(performance.now())})}:function(a){return window.setTimeout(a,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(a){clearTimeout(a)}}());var h=[],i=function(){h.push(arguments)};window.Polymer=i,a.deliverDeclarations=function(){return a.deliverDeclarations=function(){throw"Possible attempt to load Polymer twice"},h},window.addEventListener("DOMContentLoaded",function(){window.Polymer===i&&(window.Polymer=function(){console.error('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/polymer.html">')})}),a.createDOM=b}(window.Platform),function(a){a.templateContent=a.templateContent||function(a){return a.content}}(window.Platform),function(a){a=a||(window.Inspector={});var b;window.sinspect=function(a,d){b||(b=window.open("","ShadowDOM Inspector",null,!0),b.document.write(c),b.api={shadowize:shadowize}),f(a||wrap(document.body),d)};var c=["<!DOCTYPE html>","<html>"," <head>"," <title>ShadowDOM Inspector</title>"," <style>"," body {"," }"," pre {",' font: 9pt "Courier New", monospace;'," line-height: 1.5em;"," }"," tag {"," color: purple;"," }"," ul {"," margin: 0;"," padding: 0;"," list-style: none;"," }"," li {"," display: inline-block;"," background-color: #f1f1f1;"," padding: 4px 6px;"," border-radius: 4px;"," margin-right: 4px;"," }"," </style>"," </head>"," <body>",' <ul id="crumbs">'," </ul>",' <div id="tree"></div>'," </body>","</html>"].join("\n"),d=[],e=function(){var a=b.document,c=a.querySelector("#crumbs");c.textContent="";for(var e,g=0;e=d[g];g++){var h=a.createElement("a");h.href="#",h.textContent=e.localName,h.idx=g,h.onclick=function(a){for(var b;d.length>this.idx;)b=d.pop();f(b.shadow||b,b),a.preventDefault()},c.appendChild(a.createElement("li")).appendChild(h)}},f=function(a,c){var f=b.document;k=[];var g=c||a;d.push(g),e(),f.body.querySelector("#tree").innerHTML="<pre>"+j(a,a.childNodes)+"</pre>"},g=Array.prototype.forEach.call.bind(Array.prototype.forEach),h={STYLE:1,SCRIPT:1,"#comment":1,TEMPLATE:1},i=function(a){return h[a.nodeName]},j=function(a,b,c){if(i(a))return"";var d=c||"";if(a.localName||11==a.nodeType){var e=a.localName||"shadow-root",f=d+l(a);"content"==e&&(b=a.getDistributedNodes()),f+="<br/>";var h=d+" ";g(b,function(a){f+=j(a,a.childNodes,h)}),f+=d,{br:1}[e]||(f+="<tag></"+e+"></tag>",f+="<br/>")}else{var k=a.textContent.trim();f=k?d+'"'+k+'"<br/>':""}return f},k=[],l=function(a){var b="<tag><",c=a.localName||"shadow-root";return a.webkitShadowRoot||a.shadowRoot?(b+=' <button idx="'+k.length+'" onclick="api.shadowize.call(this)">'+c+"</button>",k.push(a)):b+=c||"shadow-root",a.attributes&&g(a.attributes,function(a){b+=" "+a.name+(a.value?'="'+a.value+'"':"")}),b+="></tag>"};shadowize=function(){var a=Number(this.attributes.idx.value),b=k[a];b?f(b.webkitShadowRoot||b.shadowRoot,b):(console.log("bad shadowize node"),console.dir(this))},a.output=j}(window.Inspector),function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)}(Platform),function(a){function b(a,b){return b=b||[],b.map||(b=[b]),a.apply(this,b.map(d))}function c(a,c,d){var e;switch(arguments.length){case 0:return;case 1:e=null;break;case 2:e=c.apply(this);break;default:e=b(d,c)}f[a]=e}function d(a){return f[a]}function e(a,c){HTMLImports.whenImportsReady(function(){b(c,a)})}var f={};a.marshal=d,a.modularize=c,a.using=e}(window),function(a){function b(a){f.textContent=d++,e.push(a)}function c(){for(;e.length;)e.shift()()}var d=0,e=[],f=document.createTextNode("");new(window.MutationObserver||JsMutationObserver)(c).observe(f,{characterData:!0}),a.endOfMicrotask=b}(Platform),function(a){function b(a,b,d,e){return a.replace(e,function(a,e,f,g){var h=f.replace(/["']/g,"");return h=c(b,h,d),e+"'"+h+"'"+g})}function c(a,b,c){if(b&&"/"===b[0])return b;var e=new URL(b,a);return c?e.href:d(e.href)}function d(a){var b=new URL(document.baseURI),c=new URL(a,b);return c.host===b.host&&c.port===b.port&&c.protocol===b.protocol?e(b,c):a}function e(a,b){for(var c=a.pathname,d=b.pathname,e=c.split("/"),f=d.split("/");e.length&&e[0]===f[0];)e.shift(),f.shift();for(var g=0,h=e.length-1;h>g;g++)f.unshift("..");return f.join("/")+b.search+b.hash}var f={resolveDom:function(a,b){b=b||a.ownerDocument.baseURI,this.resolveAttributes(a,b),this.resolveStyles(a,b);var c=a.querySelectorAll("template");if(c)for(var d,e=0,f=c.length;f>e&&(d=c[e]);e++)d.content&&this.resolveDom(d.content,b)},resolveTemplate:function(a){this.resolveDom(a.content,a.ownerDocument.baseURI)},resolveStyles:function(a,b){var c=a.querySelectorAll("style");if(c)for(var d,e=0,f=c.length;f>e&&(d=c[e]);e++)this.resolveStyle(d,b)},resolveStyle:function(a,b){b=b||a.ownerDocument.baseURI,a.textContent=this.resolveCssText(a.textContent,b)},resolveCssText:function(a,c,d){return a=b(a,c,d,g),b(a,c,d,h)},resolveAttributes:function(a,b){a.hasAttributes&&a.hasAttributes()&&this.resolveElementAttributes(a,b);var c=a&&a.querySelectorAll(j);if(c)for(var d,e=0,f=c.length;f>e&&(d=c[e]);e++)this.resolveElementAttributes(d,b)},resolveElementAttributes:function(a,d){d=d||a.ownerDocument.baseURI,i.forEach(function(e){var f,h=a.attributes[e],i=h&&h.value;i&&i.search(k)<0&&(f="style"===e?b(i,d,!1,g):c(d,i),h.value=f)})}},g=/(url\()([^)]*)(\))/g,h=/(@import[\s]+(?!url\())([^;]*)(;)/g,i=["href","src","action","style","url"],j="["+i.join("],[")+"]",k="{{.*}}";a.urlResolver=f}(Platform),function(a){function b(a){u.push(a),t||(t=!0,q(d))}function c(a){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(a)||a}function d(){t=!1;var a=u;u=[],a.sort(function(a,b){return a.uid_-b.uid_});var b=!1;a.forEach(function(a){var c=a.takeRecords();e(a),c.length&&(a.callback_(c,a),b=!0)}),b&&d()}function e(a){a.nodes_.forEach(function(b){var c=p.get(b);c&&c.forEach(function(b){b.observer===a&&b.removeTransientObservers()})})}function f(a,b){for(var c=a;c;c=c.parentNode){var d=p.get(c);if(d)for(var e=0;e<d.length;e++){var f=d[e],g=f.options;if(c===a||g.subtree){var h=b(g);h&&f.enqueue(h)}}}}function g(a){this.callback_=a,this.nodes_=[],this.records_=[],this.uid_=++v}function h(a,b){this.type=a,this.target=b,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function i(a){var b=new h(a.type,a.target);return b.addedNodes=a.addedNodes.slice(),b.removedNodes=a.removedNodes.slice(),b.previousSibling=a.previousSibling,b.nextSibling=a.nextSibling,b.attributeName=a.attributeName,b.attributeNamespace=a.attributeNamespace,b.oldValue=a.oldValue,b}function j(a,b){return w=new h(a,b)}function k(a){return x?x:(x=i(w),x.oldValue=a,x)}function l(){w=x=void 0}function m(a){return a===x||a===w}function n(a,b){return a===b?a:x&&m(a)?x:null}function o(a,b,c){this.observer=a,this.target=b,this.options=c,this.transientObservedNodes=[]}var p=new WeakMap,q=window.msSetImmediate;if(!q){var r=[],s=String(Math.random());window.addEventListener("message",function(a){if(a.data===s){var b=r;r=[],b.forEach(function(a){a()})}}),q=function(a){r.push(a),window.postMessage(s,"*")}}var t=!1,u=[],v=0;g.prototype={observe:function(a,b){if(a=c(a),!b.childList&&!b.attributes&&!b.characterData||b.attributeOldValue&&!b.attributes||b.attributeFilter&&b.attributeFilter.length&&!b.attributes||b.characterDataOldValue&&!b.characterData)throw new SyntaxError;var d=p.get(a);d||p.set(a,d=[]);for(var e,f=0;f<d.length;f++)if(d[f].observer===this){e=d[f],e.removeListeners(),e.options=b;break}e||(e=new o(this,a,b),d.push(e),this.nodes_.push(a)),e.addListeners()},disconnect:function(){this.nodes_.forEach(function(a){for(var b=p.get(a),c=0;c<b.length;c++){var d=b[c];if(d.observer===this){d.removeListeners(),b.splice(c,1);break}}},this),this.records_=[]},takeRecords:function(){var a=this.records_;return this.records_=[],a}};var w,x;o.prototype={enqueue:function(a){var c=this.observer.records_,d=c.length;if(c.length>0){var e=c[d-1],f=n(e,a);if(f)return void(c[d-1]=f)}else b(this.observer);c[d]=a},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(a){var b=this.options;b.attributes&&a.addEventListener("DOMAttrModified",this,!0),b.characterData&&a.addEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.addEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(a){var b=this.options;b.attributes&&a.removeEventListener("DOMAttrModified",this,!0),b.characterData&&a.removeEventListener("DOMCharacterDataModified",this,!0),b.childList&&a.removeEventListener("DOMNodeInserted",this,!0),(b.childList||b.subtree)&&a.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(a){if(a!==this.target){this.addListeners_(a),this.transientObservedNodes.push(a);var b=p.get(a);b||p.set(a,b=[]),b.push(this)}},removeTransientObservers:function(){var a=this.transientObservedNodes;this.transientObservedNodes=[],a.forEach(function(a){this.removeListeners_(a);for(var b=p.get(a),c=0;c<b.length;c++)if(b[c]===this){b.splice(c,1);break}},this)},handleEvent:function(a){switch(a.stopImmediatePropagation(),a.type){case"DOMAttrModified":var b=a.attrName,c=a.relatedNode.namespaceURI,d=a.target,e=new j("attributes",d);e.attributeName=b,e.attributeNamespace=c;var g=a.attrChange===MutationEvent.ADDITION?null:a.prevValue;f(d,function(a){return!a.attributes||a.attributeFilter&&a.attributeFilter.length&&-1===a.attributeFilter.indexOf(b)&&-1===a.attributeFilter.indexOf(c)?void 0:a.attributeOldValue?k(g):e});break;case"DOMCharacterDataModified":var d=a.target,e=j("characterData",d),g=a.prevValue;f(d,function(a){return a.characterData?a.characterDataOldValue?k(g):e:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(a.target);case"DOMNodeInserted":var h,i,d=a.relatedNode,m=a.target;"DOMNodeInserted"===a.type?(h=[m],i=[]):(h=[],i=[m]);var n=m.previousSibling,o=m.nextSibling,e=j("childList",d);e.addedNodes=h,e.removedNodes=i,e.previousSibling=n,e.nextSibling=o,f(d,function(a){return a.childList?e:void 0})}l()}},a.JsMutationObserver=g,a.MutationObserver||(a.MutationObserver=g)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(a){var b=(a.path,a.xhr),c=a.flags,d=function(a,b){this.cache={},this.onload=a,this.oncomplete=b,this.inflight=0,this.pending={}};d.prototype={addNodes:function(a){this.inflight+=a.length;for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)this.require(b);this.checkDone()},addNode:function(a){this.inflight++,this.require(a),this.checkDone()},require:function(a){var b=a.src||a.href;a.__nodeUrl=b,this.dedupe(b,a)||this.fetch(b,a)},dedupe:function(a,b){if(this.pending[a])return this.pending[a].push(b),!0;return this.cache[a]?(this.onload(a,b,this.cache[a]),this.tail(),!0):(this.pending[a]=[b],!1)},fetch:function(a,d){if(c.load&&console.log("fetch",a,d),a.match(/^data:/)){var e=a.split(","),f=e[0],g=e[1];g=f.indexOf(";base64")>-1?atob(g):decodeURIComponent(g),setTimeout(function(){this.receive(a,d,null,g)}.bind(this),0)}else{var h=function(b,c,e){this.receive(a,d,b,c,e)}.bind(this);b.load(a,h)}},receive:function(a,b,c,d,e){this.cache[a]=d;var f=this.pending[a];e&&e!==a&&(this.cache[e]=d,f=f.concat(this.pending[e]));for(var g,h=0,i=f.length;i>h&&(g=f[h]);h++)this.onload(e||a,g,d),this.tail();this.pending[a]=null,e&&e!==a&&(this.pending[e]=null)},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},b=b||{async:!0,ok:function(a){return a.status>=200&&a.status<300||304===a.status||0===a.status},load:function(c,d,e){var f=new XMLHttpRequest;return(a.flags.debug||a.flags.bust)&&(c+="?"+Math.random()),f.open("GET",c,b.async),f.addEventListener("readystatechange",function(){if(4===f.readyState){var a=f.getResponseHeader("Location"),c=null;if(a)var c="/"===a.substr(0,1)?location.origin+a:c;d.call(e,!b.ok(f)&&f,f.response||f.responseText,c)}}),f.send(),f},loadDocument:function(a,b,c){this.load(a,b,c).responseType="document"}},a.xhr=b,a.Loader=d}(window.HTMLImports),function(a){function b(a){return"link"===a.localName&&a.rel===g}function c(a){var b=d(a),c="data:text/javascript";try{c+=";base64,"+btoa(b)}catch(e){c+=";charset=utf-8,"+encodeURIComponent(b)}return c}function d(a){return a.textContent+e(a)}function e(a){var b=a.__nodeUrl;if(!b){b=a.ownerDocument.baseURI;var c="["+Math.floor(1e3*(Math.random()+1))+"]",d=a.textContent.match(/Polymer\(['"]([^'"]*)/);c=d&&d[1]||c,b+="/"+c+".js"}return"\n//# sourceURL="+b+"\n"}function f(a){var b=a.ownerDocument.createElement("style");return b.textContent=a.textContent,n.resolveUrlsInStyle(b),b}var g="import",h=a.flags,i=/Trident/.test(navigator.userAgent),j=window.ShadowDOMPolyfill?window.ShadowDOMPolyfill.wrapIfNeeded(document):document,k={documentSelectors:"link[rel="+g+"]",importsSelectors:["link[rel="+g+"]","link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},parseNext:function(){var a=this.nextToParse();a&&this.parse(a)},parse:function(a){if(this.isParsed(a))return void(h.parse&&console.log("[%s] is already parsed",a.localName));var b=this[this.map[a.localName]];b&&(this.markParsing(a),b.call(this,a))},markParsing:function(a){h.parse&&console.log("parsing",a),this.parsingElement=a},markParsingComplete:function(a){a.__importParsed=!0,a.__importElement&&(a.__importElement.__importParsed=!0),this.parsingElement=null,h.parse&&console.log("completed",a)},invalidateParse:function(a){a&&a.__importLink&&(a.__importParsed=a.__importLink.__importParsed=!1,this.parseSoon())},parseSoon:function(){this._parseSoon&&cancelAnimationFrame(this._parseDelay);var a=this;this._parseSoon=requestAnimationFrame(function(){a.parseNext()})},parseImport:function(a){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(a),a.import.__importParsed=!0,this.markParsingComplete(a),a.dispatchEvent(a.__resource?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),a.__pending)for(var b;a.__pending.length;)b=a.__pending.shift(),b&&b({target:a});this.parseNext()},parseLink:function(a){b(a)?this.parseImport(a):(a.href=a.href,this.parseGeneric(a))},parseStyle:function(a){var b=a;a=f(a),a.__importElement=b,this.parseGeneric(a)},parseGeneric:function(a){this.trackElement(a),this.addElementToDocument(a)},rootImportForElement:function(a){for(var b=a;b.ownerDocument.__importLink;)b=b.ownerDocument.__importLink;return b},addElementToDocument:function(a){for(var b=this.rootImportForElement(a.__importElement||a),c=b.__insertedElements=b.__insertedElements||0,d=b.nextElementSibling,e=0;c>e;e++)d=d&&d.nextElementSibling;b.parentNode.insertBefore(a,d)},trackElement:function(a,b){var c=this,d=function(d){b&&b(d),c.markParsingComplete(a),c.parseNext()};if(a.addEventListener("load",d),a.addEventListener("error",d),i&&"style"===a.localName){var e=!1;if(-1==a.textContent.indexOf("@import"))e=!0;else if(a.sheet){e=!0;for(var f,g=a.sheet.cssRules,h=g?g.length:0,j=0;h>j&&(f=g[j]);j++)f.type===CSSRule.IMPORT_RULE&&(e=e&&Boolean(f.styleSheet))}e&&a.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(b){var d=document.createElement("script");d.__importElement=b,d.src=b.src?b.src:c(b),a.currentScript=b,this.trackElement(d,function(){d.parentNode.removeChild(d),a.currentScript=null}),this.addElementToDocument(d)},nextToParse:function(){return!this.parsingElement&&this.nextToParseInDoc(j)},nextToParseInDoc:function(a,c){for(var d,e=a.querySelectorAll(this.parseSelectorsForNode(a)),f=0,g=e.length;g>f&&(d=e[f]);f++)if(!this.isParsed(d))return this.hasResource(d)?b(d)?this.nextToParseInDoc(d.import,d):d:void 0;return c},parseSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===j?this.documentSelectors:this.importsSelectors},isParsed:function(a){return a.__importParsed},hasResource:function(a){return b(a)&&!a.import?!1:!0}},l=/(url\()([^)]*)(\))/g,m=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(a){var b=a.ownerDocument,c=b.createElement("a");return a.textContent=this.resolveUrlsInCssText(a.textContent,c),a},resolveUrlsInCssText:function(a,b){var c=this.replaceUrls(a,b,l);return c=this.replaceUrls(c,b,m)},replaceUrls:function(a,b,c){return a.replace(c,function(a,c,d,e){var f=d.replace(/["']/g,"");return b.href=f,f=b.href,c+"'"+f+"'"+e})}};a.parser=k,a.path=n,a.isIE=i}(HTMLImports),function(a){function b(a){return c(a,q)}function c(a,b){return"link"===a.localName&&a.getAttribute("rel")===b}function d(a,b){var c=a;c instanceof Document||(c=document.implementation.createHTMLDocument(q)),c._URL=b;var d=c.createElement("base");d.setAttribute("href",b),c.baseURI||(c.baseURI=b);var e=c.createElement("meta");return e.setAttribute("charset","utf-8"),c.head.appendChild(e),c.head.appendChild(d),a instanceof Document||(c.body.innerHTML=a),window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(c),c}function e(a,b){b=b||r,g(function(){h(a,b)},b)}function f(a){return"complete"===a.readyState||a.readyState===y}function g(a,b){if(f(b))a&&a();else{var c=function(){("complete"===b.readyState||b.readyState===y)&&(b.removeEventListener(z,c),g(a,b))};b.addEventListener(z,c)}}function h(a,b){function c(){f==g&&a&&a()}function d(){f++,c()}var e=b.querySelectorAll("link[rel=import]"),f=0,g=e.length;if(g)for(var h,j=0;g>j&&(h=e[j]);j++)i(h)?d.call(h):(h.addEventListener("load",d),h.addEventListener("error",d));else c()}function i(a){return o?a.import&&"loading"!==a.import.readyState||a.__loaded:a.__importParsed}function j(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)k(b)&&l(b)}function k(a){return"link"===a.localName&&"import"===a.rel}function l(a){var b=a.import;b?m({target:a}):(a.addEventListener("load",m),a.addEventListener("error",m))}function m(a){a.target.__loaded=!0}var n="import"in document.createElement("link"),o=n,p=a.flags,q="import",r=window.ShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(document):document;if(o)var s={};else var t=(a.xhr,a.Loader),u=a.parser,s={documents:{},documentPreloadSelectors:"link[rel="+q+"]",importsPreloadSelectors:["link[rel="+q+"]"].join(","),loadNode:function(a){v.addNode(a)},loadSubtree:function(a){var b=this.marshalNodes(a);v.addNodes(b)},marshalNodes:function(a){return a.querySelectorAll(this.loadSelectorsForNode(a))},loadSelectorsForNode:function(a){var b=a.ownerDocument||a;return b===r?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(a,c,e){if(p.load&&console.log("loaded",a,c),c.__resource=e,b(c)){var f=this.documents[a];f||(f=d(e,a),f.__importLink=c,this.bootDocument(f),this.documents[a]=f),c.import=f}u.parseNext()},bootDocument:function(a){this.loadSubtree(a),this.observe(a),u.parseNext()},loadedAll:function(){u.parseNext()}},v=new t(s.loaded.bind(s),s.loadedAll.bind(s));var w={get:function(){return HTMLImports.currentScript||document.currentScript},configurable:!0};if(Object.defineProperty(document,"_currentScript",w),Object.defineProperty(r,"_currentScript",w),!document.baseURI){var x={get:function(){return window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",x),Object.defineProperty(r,"baseURI",x)}var y=HTMLImports.isIE?"complete":"interactive",z="readystatechange";o&&new MutationObserver(function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.addedNodes&&j(b.addedNodes)}).observe(document.head,{childList:!0}),a.hasNative=n,a.useNative=o,a.importer=s,a.IMPORT_LINK_TYPE=q,a.isImportLoaded=i,a.importLoader=v,a.whenReady=e,a.whenImportsReady=e}(window.HTMLImports),function(a){function b(a){for(var b,d=0,e=a.length;e>d&&(b=a[d]);d++)"childList"===b.type&&b.addedNodes.length&&c(b.addedNodes)}function c(a){for(var b,e,g=0,h=a.length;h>g&&(e=a[g]);g++)b=b||e.ownerDocument,d(e)&&f.loadNode(e),e.children&&e.children.length&&c(e.children)}function d(a){return 1===a.nodeType&&g.call(a,f.loadSelectorsForNode(a))}function e(a){h.observe(a,{childList:!0,subtree:!0})}var f=(a.IMPORT_LINK_TYPE,a.importer),g=(a.parser,HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector),h=new MutationObserver(b);a.observe=e,f.observe=e}(HTMLImports),function(){function a(){HTMLImports.importer.bootDocument(b)}"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a,b){var c=document.createEvent("HTMLEvents");return c.initEvent(a,b.bubbles===!1?!1:!0,b.cancelable===!1?!1:!0,b.detail),c});var b=window.ShadowDOMPolyfill?window.ShadowDOMPolyfill.wrapIfNeeded(document):document;HTMLImports.whenImportsReady(function(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),b.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}),HTMLImports.useNative||("complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?a():document.addEventListener("DOMContentLoaded",a))}(),window.CustomElements=window.CustomElements||{flags:{}},function(a){function b(a,c,d){var e=a.firstElementChild;if(!e)for(e=a.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;for(;e;)c(e,d)!==!0&&b(e,c,d),e=e.nextElementSibling;return null}function c(a,b){for(var c=a.shadowRoot;c;)d(c,b),c=c.olderShadowRoot}function d(a,d){b(a,function(a){return d(a)?!0:void c(a,d)}),c(a,d)}function e(a){return h(a)?(i(a),!0):void l(a)}function f(a){d(a,function(a){return e(a)?!0:void 0})}function g(a){return e(a)||f(a)}function h(b){if(!b.__upgraded__&&b.nodeType===Node.ELEMENT_NODE){var c=b.getAttribute("is")||b.localName,d=a.registry[c];if(d)return A.dom&&console.group("upgrade:",b.localName),a.upgrade(b),A.dom&&console.groupEnd(),!0}}function i(a){l(a),r(a)&&d(a,function(a){l(a)})}function j(a){if(E.push(a),!D){D=!0;var b=window.Platform&&window.Platform.endOfMicrotask||setTimeout;b(k)}}function k(){D=!1;for(var a,b=E,c=0,d=b.length;d>c&&(a=b[c]);c++)a();E=[]}function l(a){C?j(function(){m(a)}):m(a)}function m(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("inserted:",a.localName),r(a)&&(a.__inserted=(a.__inserted||0)+1,a.__inserted<1&&(a.__inserted=1),a.__inserted>1?A.dom&&console.warn("inserted:",a.localName,"insert/remove count:",a.__inserted):a.attachedCallback&&(A.dom&&console.log("inserted:",a.localName),a.attachedCallback())),A.dom&&console.groupEnd()) +}function n(a){o(a),d(a,function(a){o(a)})}function o(a){C?j(function(){p(a)}):p(a)}function p(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("removed:",a.localName),r(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?A.dom&&console.warn("removed:",a.localName,"insert/remove count:",a.__inserted):a.detachedCallback&&a.detachedCallback()),A.dom&&console.groupEnd())}function q(a){return window.ShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(a):a}function r(a){for(var b=a,c=q(document);b;){if(b==c)return!0;b=b.parentNode||b.host}}function s(a){if(a.shadowRoot&&!a.shadowRoot.__watched){A.dom&&console.log("watching shadow-root for: ",a.localName);for(var b=a.shadowRoot;b;)t(b),b=b.olderShadowRoot}}function t(a){a.__watched||(w(a),a.__watched=!0)}function u(a){if(A.dom){var b=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(var c=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;var d=c&&(c.URL||c._URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",a.length,d||"")}a.forEach(function(a){"childList"===a.type&&(G(a.addedNodes,function(a){a.localName&&g(a)}),G(a.removedNodes,function(a){a.localName&&n(a)}))}),A.dom&&console.groupEnd()}function v(){u(F.takeRecords()),k()}function w(a){F.observe(a,{childList:!0,subtree:!0})}function x(a){w(a)}function y(a){A.dom&&console.group("upgradeDocument: ",a.baseURI.split("/").pop()),g(a),A.dom&&console.groupEnd()}function z(a){a=q(a);for(var b,c=a.querySelectorAll("link[rel="+B+"]"),d=0,e=c.length;e>d&&(b=c[d]);d++)b.import&&b.import.__parsed&&z(b.import);y(a)}var A=window.logFlags||{},B=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",C=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.hasPolyfillMutations=C;var D=!1,E=[],F=new MutationObserver(u),G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.IMPORT_LINK_TYPE=B,a.watchShadow=s,a.upgradeDocumentTree=z,a.upgradeAll=g,a.upgradeSubtree=f,a.insertedNode=i,a.observeDocument=x,a.upgradeDocument=y,a.takeRecords=v}(window.CustomElements),function(a){function b(b,g){var h=g||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(b)+"'.");if(c(b))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(b)+"'. The type name is invalid.");if(n(b))throw new Error("DuplicateDefinitionError: a type with name '"+String(b)+"' is already registered");if(!h.prototype)throw new Error("Options missing required prototype property");return h.__name=b.toLowerCase(),h.lifecycle=h.lifecycle||{},h.ancestry=d(h.extends),e(h),f(h),l(h.prototype),o(h.__name,h),h.ctor=p(h),h.ctor.prototype=h.prototype,h.prototype.constructor=h.ctor,a.ready&&a.upgradeDocumentTree(document),h.ctor}function c(a){for(var b=0;b<y.length;b++)if(a===y[b])return!0}function d(a){var b=n(a);return b?d(b.extends).concat([b]):[]}function e(a){for(var b,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c||a.__name,c&&(a.is=a.__name)}function f(a){if(!Object.__proto__){var b=HTMLElement.prototype;if(a.is){var c=document.createElement(a.tag),d=Object.getPrototypeOf(c);d===a.prototype&&(b=d)}for(var e,f=a.prototype;f&&f!==b;)e=Object.getPrototypeOf(f),f.__proto__=e,f=e;a.native=b}}function g(a){return h(B(a.tag),a)}function h(b,c){return c.is&&b.setAttribute("is",c.is),i(b,c),b.__upgraded__=!0,k(b),a.insertedNode(b),a.upgradeSubtree(b),b}function i(a,b){Object.__proto__?a.__proto__=b.prototype:(j(a,b.prototype,b.native),a.__proto__=b.prototype)}function j(a,b,c){for(var d={},e=b;e!==c&&e!==HTMLElement.prototype;){for(var f,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}function k(a){a.createdCallback&&a.createdCallback()}function l(a){if(!a.setAttribute._polyfilled){var b=a.setAttribute;a.setAttribute=function(a,c){m.call(this,a,c,b)};var c=a.removeAttribute;a.removeAttribute=function(a){m.call(this,a,null,c)},a.setAttribute._polyfilled=!0}}function m(a,b,c){a=a.toLowerCase();var d=this.getAttribute(a);c.apply(this,arguments);var e=this.getAttribute(a);this.attributeChangedCallback&&e!==d&&this.attributeChangedCallback(a,d,e)}function n(a){return a?z[a.toLowerCase()]:void 0}function o(a,b){z[a]=b}function p(a){return function(){return g(a)}}function q(a,b,c){return a===A?r(b,c):C(a,b)}function r(a,b){var c=n(b||a);if(c){if(a==c.tag&&b==c.is)return new c.ctor;if(!b&&!c.is)return new c.ctor}if(b){var d=r(a);return d.setAttribute("is",b),d}var d=B(a);return a.indexOf("-")>=0&&i(d,HTMLElement),d}function s(a){if(!a.__upgraded__&&a.nodeType===Node.ELEMENT_NODE){var b=a.getAttribute("is"),c=n(b||a.localName);if(c){if(b&&c.tag==a.localName)return h(a,c);if(!b&&!c.extends)return h(a,c)}}}function t(b){var c=D.call(this,b);return a.upgradeAll(c),c}a||(a=window.CustomElements={flags:{}});var u=a.flags,v=Boolean(document.registerElement),w=!u.register&&v&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative);if(w){var x=function(){};a.registry={},a.upgradeElement=x,a.watchShadow=x,a.upgrade=x,a.upgradeAll=x,a.upgradeSubtree=x,a.observeDocument=x,a.upgradeDocument=x,a.upgradeDocumentTree=x,a.takeRecords=x,a.reservedTagList=[]}else{var y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],z={},A="http://www.w3.org/1999/xhtml",B=document.createElement.bind(document),C=document.createElementNS.bind(document),D=Node.prototype.cloneNode;document.registerElement=b,document.createElement=r,document.createElementNS=q,Node.prototype.cloneNode=t,a.registry=z,a.upgrade=s}var E;E=Object.__proto__||w?function(a,b){return a instanceof b}:function(a,b){for(var c=a;c;){if(c===b.prototype)return!0;c=c.__proto__}return!1},a.instanceof=E,a.reservedTagList=y,document.register=document.registerElement,a.hasNative=v,a.useNative=w}(window.CustomElements),function(a){function b(a){return"link"===a.localName&&a.getAttribute("rel")===c}var c=a.IMPORT_LINK_TYPE,d={selectors:["link[rel="+c+"]"],map:{link:"parseLink"},parse:function(a){if(!a.__parsed){a.__parsed=!0;var b=a.querySelectorAll(d.selectors);e(b,function(a){d[d.map[a.localName]](a)}),CustomElements.upgradeDocument(a),CustomElements.observeDocument(a)}},parseLink:function(a){b(a)&&this.parseImport(a)},parseImport:function(a){a.import&&d.parse(a.import)}},e=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.parser=d,a.IMPORT_LINK_TYPE=c}(window.CustomElements),function(a){function b(){CustomElements.parser.parse(document),CustomElements.upgradeDocument(document);var a=window.Platform&&Platform.endOfMicrotask?Platform.endOfMicrotask:setTimeout;a(function(){CustomElements.ready=!0,CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0})),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(a){CustomElements.parser.parse(a.import)})})}if("function"!=typeof window.CustomEvent&&(window.CustomEvent=function(a,b){b=b||{};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,Boolean(b.bubbles),Boolean(b.cancelable),b.detail),c},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||a.flags.eager)b();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var c=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(c,b)}else b()}(window.CustomElements),function(){if(window.ShadowDOMPolyfill){var a=["upgradeAll","upgradeSubtree","observeDocument","upgradeDocument"],b={};a.forEach(function(a){b[a]=CustomElements[a]}),a.forEach(function(a){CustomElements[a]=function(c){return b[a](wrap(c))}})}}(),function(a){function b(a){this.cache=Object.create(null),this.map=Object.create(null),this.requests=0,this.regex=a}var c=a.endOfMicrotask;b.prototype={extractUrls:function(a,b){for(var c,d,e=[];c=this.regex.exec(a);)d=new URL(c[1],b),e.push({matched:c[0],url:d.href});return e},process:function(a,b,c){var d=this.extractUrls(a,b),e=c.bind(null,this.map);this.fetch(d,e)},fetch:function(a,b){var c=a.length;if(!c)return b();for(var d,e,f,g=function(){0===--c&&b()},h=0;c>h;h++)d=a[h],f=d.url,e=this.cache[f],e||(e=this.xhr(f),e.match=d,this.cache[f]=e),e.wait(g)},handleXhr:function(a){var b=a.match,c=b.url,d=a.response||a.responseText||"";this.map[c]=d,this.fetch(this.extractUrls(d,c),a.resolve)},xhr:function(a){this.requests++;var b=new XMLHttpRequest;return b.open("GET",a,!0),b.send(),b.onerror=b.onload=this.handleXhr.bind(this,b),b.pending=[],b.resolve=function(){for(var a=b.pending,c=0;c<a.length;c++)a[c]();b.pending=null},b.wait=function(a){b.pending?b.pending.push(a):c(a)},b}},a.Loader=b}(window.Platform),function(a){function b(){this.loader=new d(this.regex)}var c=a.urlResolver,d=a.Loader;b.prototype={regex:/@import\s+(?:url)?["'\(]*([^'"\)]*)['"\)]*;/g,resolve:function(a,b,c){var d=function(d){c(this.flatten(a,b,d))}.bind(this);this.loader.process(a,b,d)},resolveNode:function(a,b,c){var d=a.textContent,e=function(b){a.textContent=b,c(a)};this.resolve(d,b,e)},flatten:function(a,b,d){for(var e,f,g,h=this.loader.extractUrls(a,b),i=0;i<h.length;i++)e=h[i],f=e.url,g=c.resolveCssText(d[f],f,!0),g=this.flatten(g,b,d),a=a.replace(e.matched,g);return a},loadStyles:function(a,b,c){function d(){f++,f===g&&c&&c()}for(var e,f=0,g=a.length,h=0;g>h&&(e=a[h]);h++)this.resolveNode(e,b,d)}};var e=new b;a.styleResolver=e}(window.Platform),function(){"use strict";function a(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a:null}function b(a,b,c){var d=a.bindings_;return d||(d=a.bindings_={}),d[b]&&c[b].close(),d[b]=c}function c(a,b,c){return c}function d(a){return null==a?"":a}function e(a,b){a.data=d(b)}function f(a){return function(b){return e(a,b)}}function g(a,b,c,e){return c?void(e?a.setAttribute(b,""):a.removeAttribute(b)):void a.setAttribute(b,d(e))}function h(a,b,c){return function(d){g(a,b,c,d)}}function i(a){switch(a.type){case"checkbox":return u;case"radio":case"select-multiple":case"select-one":return"change";case"range":if(/Trident|MSIE/.test(navigator.userAgent))return"change";default:return"input"}}function j(a,b,c,e){a[b]=(e||d)(c)}function k(a,b,c){return function(d){return j(a,b,d,c)}}function l(){}function m(a,b,c,d){function e(){c.setValue(a[b]),c.discardChanges(),(d||l)(a),Platform.performMicrotaskCheckpoint()}var f=i(a);return a.addEventListener(f,e),{close:function(){a.removeEventListener(f,e),c.close()},observable_:c}}function n(a){return Boolean(a)}function o(b){if(b.form)return s(b.form.elements,function(a){return a!=b&&"INPUT"==a.tagName&&"radio"==a.type&&a.name==b.name});var c=a(b);if(!c)return[];var d=c.querySelectorAll('input[type="radio"][name="'+b.name+'"]');return s(d,function(a){return a!=b&&!a.form})}function p(a){"INPUT"===a.tagName&&"radio"===a.type&&o(a).forEach(function(a){var b=a.bindings_.checked;b&&b.observable_.setValue(!1)})}function q(a,b){var c,e,f,g=a.parentNode;g instanceof HTMLSelectElement&&g.bindings_&&g.bindings_.value&&(c=g,e=c.bindings_.value,f=c.value),a.value=d(b),c&&c.value!=f&&(e.observable_.setValue(c.value),e.observable_.discardChanges(),Platform.performMicrotaskCheckpoint())}function r(a){return function(b){q(a,b)}}var s=Array.prototype.filter.call.bind(Array.prototype.filter);Node.prototype.bind=function(a,b){console.error("Unhandled binding to Node: ",this,a,b)},Node.prototype.bindFinished=function(){};var t=c;Object.defineProperty(Platform,"enableBindingsReflection",{get:function(){return t===b},set:function(a){return t=a?b:c,a},configurable:!0}),Text.prototype.bind=function(a,b,c){if("textContent"!==a)return Node.prototype.bind.call(this,a,b,c);if(c)return e(this,b);var d=b;return e(this,d.open(f(this))),t(this,a,d)},Element.prototype.bind=function(a,b,c){var d="?"==a[a.length-1];if(d&&(this.removeAttribute(a),a=a.slice(0,-1)),c)return g(this,a,d,b);var e=b;return g(this,a,d,e.open(h(this,a,d))),t(this,a,e)};var u;!function(){var a=document.createElement("div"),b=a.appendChild(document.createElement("input"));b.setAttribute("type","checkbox");var c,d=0;b.addEventListener("click",function(){d++,c=c||"click"}),b.addEventListener("change",function(){d++,c=c||"change"});var e=document.createEvent("MouseEvent");e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(e),u=1==d?"change":c}(),HTMLInputElement.prototype.bind=function(a,c,e){if("value"!==a&&"checked"!==a)return HTMLElement.prototype.bind.call(this,a,c,e);this.removeAttribute(a);var f="checked"==a?n:d,g="checked"==a?p:l;if(e)return j(this,a,c,f);var h=c,i=m(this,a,h,g);return j(this,a,h.open(k(this,a,f)),f),b(this,a,i)},HTMLTextAreaElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return j(this,"value",b);var e=b,f=m(this,"value",e);return j(this,"value",e.open(k(this,"value",d))),t(this,a,f)},HTMLOptionElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return q(this,b);var d=b,e=m(this,"value",d);return q(this,d.open(r(this))),t(this,a,e)},HTMLSelectElement.prototype.bind=function(a,c,d){if("selectedindex"===a&&(a="selectedIndex"),"selectedIndex"!==a&&"value"!==a)return HTMLElement.prototype.bind.call(this,a,c,d);if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(this,a,e.open(k(this,a))),b(this,a,f)}}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(var b;b=a.parentNode;)a=b;return a}function d(a,b){if(b){for(var d,e="#"+b;!d&&(a=c(a),a.protoContent_?d=a.protoContent_.querySelector(e):a.getElementById&&(d=a.getElementById(b)),!d&&a.templateCreator_);)a=a.templateCreator_;return d}}function e(a){return"template"==a.tagName&&"http://www.w3.org/2000/svg"==a.namespaceURI}function f(a){return"TEMPLATE"==a.tagName&&"http://www.w3.org/1999/xhtml"==a.namespaceURI}function g(a){return Boolean(L[a.tagName]&&a.hasAttribute("template"))}function h(a){return void 0===a.isTemplate_&&(a.isTemplate_="TEMPLATE"==a.tagName||g(a)),a.isTemplate_}function i(a,b){var c=a.querySelectorAll(N);h(a)&&b(a),G(c,b)}function j(a){function b(a){HTMLTemplateElement.decorate(a)||j(a.content)}i(a,b)}function k(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function l(a){var b=a.ownerDocument;if(!b.defaultView)return b;var c=b.templateContentsOwner_;if(!c){for(c=b.implementation.createHTMLDocument("");c.lastChild;)c.removeChild(c.lastChild);b.templateContentsOwner_=c}return c}function m(a){if(!a.stagingDocument_){var b=a.ownerDocument;if(!b.stagingDocument_){b.stagingDocument_=b.implementation.createHTMLDocument(""),b.stagingDocument_.isStagingDocument=!0;var c=b.stagingDocument_.createElement("base");c.href=document.baseURI,b.stagingDocument_.head.appendChild(c),b.stagingDocument_.stagingDocument_=b.stagingDocument_}a.stagingDocument_=b.stagingDocument_}return a.stagingDocument_}function n(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];K[e.name]&&("template"!==e.name&&b.setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function o(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];b.setAttribute(e.name,e.value),a.removeAttribute(e.name)}return a.parentNode.removeChild(a),b}function p(a,b,c){var d=a.content;if(c)return void d.appendChild(b);for(var e;e=b.firstChild;)d.appendChild(e)}function q(a){P?a.__proto__=HTMLTemplateElement.prototype:k(a,HTMLTemplateElement.prototype)}function r(a){a.setModelFn_||(a.setModelFn_=function(){a.setModelFnScheduled_=!1;var b=z(a,a.delegate_&&a.delegate_.prepareBinding);w(a,b,a.model_)}),a.setModelFnScheduled_||(a.setModelFnScheduled_=!0,Observer.runEOM_(a.setModelFn_))}function s(a,b,c,d){if(a&&a.length){for(var e,f=a.length,g=0,h=0,i=0,j=!0;f>h;){var g=a.indexOf("{{",h),k=a.indexOf("[[",h),l=!1,m="}}";if(k>=0&&(0>g||g>k)&&(g=k,l=!0,m="]]"),i=0>g?-1:a.indexOf(m,g+2),0>i){if(!e)return;e.push(a.slice(h));break}e=e||[],e.push(a.slice(h,g));var n=a.slice(g+2,i).trim();e.push(l),j=j&&l;var o=d&&d(n,b,c);e.push(null==o?Path.get(n):null),e.push(o),h=i+2}return h===f&&e.push(""),e.hasOnePath=5===e.length,e.isSimplePath=e.hasOnePath&&""==e[0]&&""==e[4],e.onlyOneTime=j,e.combinator=function(a){for(var b=e[0],c=1;c<e.length;c+=4){var d=e.hasOnePath?a:a[(c-1)/4];void 0!==d&&(b+=d),b+=e[c+3]}return b},e}}function t(a,b,c,d){if(b.hasOnePath){var e=b[3],f=e?e(d,c,!0):b[2].getValueFrom(d);return b.isSimplePath?f:b.combinator(f)}for(var g=[],h=1;h<b.length;h+=4){var e=b[h+2];g[(h-1)/4]=e?e(d,c):b[h+1].getValueFrom(d)}return b.combinator(g)}function u(a,b,c,d){var e=b[3],f=e?e(d,c,!1):new PathObserver(d,b[2]);return b.isSimplePath?f:new ObserverTransform(f,b.combinator)}function v(a,b,c,d){if(b.onlyOneTime)return t(a,b,c,d);if(b.hasOnePath)return u(a,b,c,d);for(var e=new CompoundObserver,f=1;f<b.length;f+=4){var g=b[f],h=b[f+2];if(h){var i=h(d,c,g);g?e.addPath(i):e.addObserver(i)}else{var j=b[f+1];g?e.addPath(j.getValueFrom(d)):e.addPath(d,j)}}return new ObserverTransform(e,b.combinator)}function w(a,b,c,d){for(var e=0;e<b.length;e+=2){var f=b[e],g=b[e+1],h=v(f,g,a,c),i=a.bind(f,h,g.onlyOneTime);i&&d&&d.push(i)}if(a.bindFinished(),b.isTemplate){a.model_=c;var j=a.processBindingDirectives_(b);d&&j&&d.push(j)}}function x(a,b,c){var d=a.getAttribute(b);return s(""==d?"{{}}":d,b,a,c)}function y(a,c){b(a);for(var d=[],e=0;e<a.attributes.length;e++){for(var f=a.attributes[e],g=f.name,i=f.value;"_"===g[0];)g=g.substring(1);if(!h(a)||g!==J&&g!==H&&g!==I){var j=s(i,g,a,c);j&&d.push(g,j)}}return h(a)&&(d.isTemplate=!0,d.if=x(a,J,c),d.bind=x(a,H,c),d.repeat=x(a,I,c),!d.if||d.bind||d.repeat||(d.bind=s("{{}}",H,a,c))),d}function z(a,b){if(a.nodeType===Node.ELEMENT_NODE)return y(a,b);if(a.nodeType===Node.TEXT_NODE){var c=s(a.data,"textContent",a,b);if(c)return["textContent",c]}return[]}function A(a,b,c,d,e,f,g){for(var h=b.appendChild(c.importNode(a,!1)),i=0,j=a.firstChild;j;j=j.nextSibling)A(j,h,c,d.children[i++],e,f,g);return d.isTemplate&&(HTMLTemplateElement.decorate(h,a),f&&h.setDelegate_(f)),w(h,d,e,g),h}function B(a,b){var c=z(a,b);c.children={};for(var d=0,e=a.firstChild;e;e=e.nextSibling)c.children[d++]=B(e,b);return c}function C(a){var b=a.id_;return b||(b=a.id_=S++),b}function D(a,b){var c=C(a);if(b){var d=b.bindingMaps[c];return d||(d=b.bindingMaps[c]=B(a,b.prepareBinding)||[]),d}var d=a.bindingMap_;return d||(d=a.bindingMap_=B(a,void 0)||[]),d}function E(a){this.closed=!1,this.templateElement_=a,this.instances=[],this.deps=void 0,this.iteratedValue=[],this.presentValue=void 0,this.arrayObserver=void 0}var F,G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.Map&&"function"==typeof a.Map.prototype.forEach?F=a.Map:(F=function(){this.keys=[],this.values=[]},F.prototype={set:function(a,b){var c=this.keys.indexOf(a);0>c?(this.keys.push(a),this.values.push(b)):this.values[c]=b},get:function(a){var b=this.keys.indexOf(a);if(!(0>b))return this.values[b]},"delete":function(a){var b=this.keys.indexOf(a);return 0>b?!1:(this.keys.splice(b,1),this.values.splice(b,1),!0)},forEach:function(a,b){for(var c=0;c<this.keys.length;c++)a.call(b||this,this.values[c],this.keys[c],this)}});"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var H="bind",I="repeat",J="if",K={template:!0,repeat:!0,bind:!0,ref:!0},L={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},M="undefined"!=typeof HTMLTemplateElement;M&&!function(){var a=document.createElement("template"),b=a.content.ownerDocument,c=b.appendChild(b.createElement("html")),d=c.appendChild(b.createElement("head")),e=b.createElement("base");e.href=document.baseURI,d.appendChild(e)}();var N="template, "+Object.keys(L).map(function(a){return a.toLowerCase()+"[template]"}).join(", ");document.addEventListener("DOMContentLoaded",function(){j(document),Platform.performMicrotaskCheckpoint()},!1),M||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")});var O,P="__proto__"in{};"function"==typeof MutationObserver&&(O=new MutationObserver(function(a){for(var b=0;b<a.length;b++)a[b].target.refChanged_()})),HTMLTemplateElement.decorate=function(a,c){if(a.templateIsDecorated_)return!1;var d=a;d.templateIsDecorated_=!0;var h=f(d)&&M,i=h,k=!h,m=!1;if(h||(g(d)?(b(!c),d=n(a),d.templateIsDecorated_=!0,h=M,m=!0):e(d)&&(d=o(a),d.templateIsDecorated_=!0,h=M)),!h){q(d);var r=l(d);d.content_=r.createDocumentFragment()}return c?d.instanceRef_=c:k?p(d,a,m):i&&j(d.content),!0},HTMLTemplateElement.bootstrap=j;var Q=a.HTMLUnknownElement||HTMLElement,R={get:function(){return this.content_},enumerable:!0,configurable:!0};M||(HTMLTemplateElement.prototype=Object.create(Q.prototype),Object.defineProperty(HTMLTemplateElement.prototype,"content",R)),k(HTMLTemplateElement.prototype,{bind:function(a,b,c){if("ref"!=a)return Element.prototype.bind.call(this,a,b,c);var d=this,e=c?b:b.open(function(a){d.setAttribute("ref",a),d.refChanged_()});return this.setAttribute("ref",e),this.refChanged_(),c?void 0:(this.bindings_?this.bindings_.ref=b:this.bindings_={ref:b},b)},processBindingDirectives_:function(a){return this.iterator_&&this.iterator_.closeDeps(),a.if||a.bind||a.repeat?(this.iterator_||(this.iterator_=new E(this)),this.iterator_.updateDependencies(a,this.model_),O&&O.observe(this,{attributes:!0,attributeFilter:["ref"]}),this.iterator_):void(this.iterator_&&(this.iterator_.close(),this.iterator_=void 0))},createInstance:function(a,b,c){b?c=this.newDelegate_(b):c||(c=this.delegate_),this.refContent_||(this.refContent_=this.ref_.content);var d=this.refContent_;if(null===d.firstChild)return T;var e=D(d,c),f=m(this),g=f.createDocumentFragment();g.templateCreator_=this,g.protoContent_=d,g.bindings_=[],g.terminator_=null;for(var h=g.templateInstance_={firstNode:null,lastNode:null,model:a},i=0,j=!1,k=d.firstChild;k;k=k.nextSibling){null===k.nextSibling&&(j=!0);var l=A(k,g,f,e.children[i++],a,c,g.bindings_);l.templateInstance_=h,j&&(g.terminator_=l)}return h.firstNode=g.firstChild,h.lastNode=g.lastChild,g.templateCreator_=void 0,g.protoContent_=void 0,g},get model(){return this.model_},set model(a){this.model_=a,r(this)},get bindingDelegate(){return this.delegate_&&this.delegate_.raw},refChanged_:function(){this.iterator_&&this.refContent_!==this.ref_.content&&(this.refContent_=void 0,this.iterator_.valueChanged(),this.iterator_.updateIteratedValue(this.iterator_.getUpdatedValue()))},clear:function(){this.model_=void 0,this.delegate_=void 0,this.bindings_&&this.bindings_.ref&&this.bindings_.ref.close(),this.refContent_=void 0,this.iterator_&&(this.iterator_.valueChanged(),this.iterator_.close(),this.iterator_=void 0)},setDelegate_:function(a){this.delegate_=a,this.bindingMap_=void 0,this.iterator_&&(this.iterator_.instancePositionChangedFn_=void 0,this.iterator_.instanceModelFn_=void 0)},newDelegate_:function(a){function b(b){var c=a&&a[b];if("function"==typeof c)return function(){return c.apply(a,arguments)}}if(a)return{bindingMaps:{},raw:a,prepareBinding:b("prepareBinding"),prepareInstanceModel:b("prepareInstanceModel"),prepareInstancePositionChanged:b("prepareInstancePositionChanged")}},set bindingDelegate(a){if(this.delegate_)throw Error("Template must be cleared before a new bindingDelegate can be assigned");this.setDelegate_(this.newDelegate_(a))},get ref_(){var a=d(this,this.getAttribute("ref"));if(a||(a=this.instanceRef_),!a)return this;var b=a.ref_;return b?b:a}});var S=1;Object.defineProperty(Node.prototype,"templateInstance",{get:function(){var a=this.templateInstance_;return a?a:this.parentNode?this.parentNode.templateInstance:void 0}});var T=document.createDocumentFragment();T.bindings_=[],T.terminator_=null,E.prototype={closeDeps:function(){var a=this.deps;a&&(a.ifOneTime===!1&&a.ifValue.close(),a.oneTime===!1&&a.value.close())},updateDependencies:function(a,b){this.closeDeps();var c=this.deps={},d=this.templateElement_,e=!0;if(a.if){if(c.hasIf=!0,c.ifOneTime=a.if.onlyOneTime,c.ifValue=v(J,a.if,d,b),e=c.ifValue,c.ifOneTime&&!e)return void this.valueChanged();c.ifOneTime||(e=e.open(this.updateIfValue,this))}a.repeat?(c.repeat=!0,c.oneTime=a.repeat.onlyOneTime,c.value=v(I,a.repeat,d,b)):(c.repeat=!1,c.oneTime=a.bind.onlyOneTime,c.value=v(H,a.bind,d,b));var f=c.value;return c.oneTime||(f=f.open(this.updateIteratedValue,this)),e?void this.updateValue(f):void this.valueChanged()},getUpdatedValue:function(){var a=this.deps.value;return this.deps.oneTime||(a=a.discardChanges()),a},updateIfValue:function(a){return a?void this.updateValue(this.getUpdatedValue()):void this.valueChanged()},updateIteratedValue:function(a){if(this.deps.hasIf){var b=this.deps.ifValue;if(this.deps.ifOneTime||(b=b.discardChanges()),!b)return void this.valueChanged()}this.updateValue(a)},updateValue:function(a){this.deps.repeat||(a=[a]);var b=this.deps.repeat&&!this.deps.oneTime&&Array.isArray(a);this.valueChanged(a,b)},valueChanged:function(a,b){Array.isArray(a)||(a=[]),a!==this.iteratedValue&&(this.unobserve(),this.presentValue=a,b&&(this.arrayObserver=new ArrayObserver(this.presentValue),this.arrayObserver.open(this.handleSplices,this)),this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,this.iteratedValue)))},getLastInstanceNode:function(a){if(-1==a)return this.templateElement_;var b=this.instances[a],c=b.terminator_;if(!c)return this.getLastInstanceNode(a-1);if(c.nodeType!==Node.ELEMENT_NODE||this.templateElement_===c)return c;var d=c.iterator_;return d?d.getLastTemplateNode():c},getLastTemplateNode:function(){return this.getLastInstanceNode(this.instances.length-1)},insertInstanceAt:function(a,b){var c=this.getLastInstanceNode(a-1),d=this.templateElement_.parentNode;this.instances.splice(a,0,b),d.insertBefore(b,c.nextSibling)},extractInstanceAt:function(a){for(var b=this.getLastInstanceNode(a-1),c=this.getLastInstanceNode(a),d=this.templateElement_.parentNode,e=this.instances.splice(a,1)[0];c!==b;){var f=b.nextSibling;f==c&&(c=b),e.appendChild(d.removeChild(f))}return e},getDelegateFn:function(a){return a=a&&a(this.templateElement_),"function"==typeof a?a:null},handleSplices:function(a){if(!this.closed&&a.length){var b=this.templateElement_;if(!b.parentNode)return void this.close();ArrayObserver.applySplices(this.iteratedValue,this.presentValue,a);var c=b.delegate_;void 0===this.instanceModelFn_&&(this.instanceModelFn_=this.getDelegateFn(c&&c.prepareInstanceModel)),void 0===this.instancePositionChangedFn_&&(this.instancePositionChangedFn_=this.getDelegateFn(c&&c.prepareInstancePositionChanged));for(var d=new F,e=0,f=0;f<a.length;f++){for(var g=a[f],h=g.removed,i=0;i<h.length;i++){var j=h[i],k=this.extractInstanceAt(g.index+e);k!==T&&d.set(j,k)}e-=g.addedCount}for(var f=0;f<a.length;f++)for(var g=a[f],l=g.index;l<g.index+g.addedCount;l++){var j=this.iteratedValue[l],k=d.get(j);k?d.delete(j):(this.instanceModelFn_&&(j=this.instanceModelFn_(j)),k=void 0===j?T:b.createInstance(j,void 0,c)),this.insertInstanceAt(l,k)}d.forEach(function(a){this.closeInstanceBindings(a)},this),this.instancePositionChangedFn_&&this.reportInstancesMoved(a)}},reportInstanceMoved:function(a){var b=this.instances[a];b!==T&&this.instancePositionChangedFn_(b.templateInstance_,a)},reportInstancesMoved:function(a){for(var b=0,c=0,d=0;d<a.length;d++){var e=a[d];if(0!=c)for(;b<e.index;)this.reportInstanceMoved(b),b++;else b=e.index;for(;b<e.index+e.addedCount;)this.reportInstanceMoved(b),b++;c+=e.addedCount-e.removed.length}if(0!=c)for(var f=this.instances.length;f>b;)this.reportInstanceMoved(b),b++},closeInstanceBindings:function(a){for(var b=a.bindings_,c=0;c<b.length;c++)b[c].close()},unobserve:function(){this.arrayObserver&&(this.arrayObserver.close(),this.arrayObserver=void 0)},close:function(){if(!this.closed){this.unobserve();for(var a=0;a<this.instances.length;a++)this.closeInstanceBindings(this.instances[a]);this.instances.length=0,this.closeDeps(),this.templateElement_.iterator_=void 0,this.closed=!0}}},HTMLTemplateElement.forAllTemplatesFrom_=i}(this),function(a){function b(){e||(e=!0,a.endOfMicrotask(function(){e=!1,logFlags.data&&console.group("Platform.flush()"),a.performMicrotaskCheckpoint(),logFlags.data&&console.groupEnd()}))}var c=document.createElement("style");c.textContent="template {display: none !important;} /* injected by platform.js */";var d=document.querySelector("head");d.insertBefore(c,d.firstChild);var e;if(Observer.hasObjectObserve)b=function(){};else{var f=125;window.addEventListener("WebComponentsReady",function(){b(),a.flushPoll=setInterval(b,f)})}if(window.CustomElements&&!CustomElements.useNative){var g=Document.prototype.importNode;Document.prototype.importNode=function(a,b){var c=g.call(this,a,b);return CustomElements.upgradeAll(c),c}}a.flush=b}(window.Platform); +//# sourceMappingURL=platform.js.map
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/platform/platform.js.map b/third_party/polymer/components-chromium/platform/platform.js.map new file mode 100644 index 0000000..bf670fb --- /dev/null +++ b/third_party/polymer/components-chromium/platform/platform.js.map @@ -0,0 +1 @@ +{"version":3,"file":"platform.js","sources":["build/boot.js","../WeakMap/weakmap.js","../observe-js/src/observe.js","build/if-poly.js","../ShadowDOM/src/wrappers.js","../ShadowDOM/src/microtask.js","../ShadowDOM/src/MutationObserver.js","../ShadowDOM/src/TreeScope.js","../ShadowDOM/src/wrappers/events.js","../ShadowDOM/src/wrappers/TouchEvent.js","../ShadowDOM/src/wrappers/NodeList.js","../ShadowDOM/src/wrappers/HTMLCollection.js","../ShadowDOM/src/wrappers/Node.js","../ShadowDOM/src/querySelector.js","../ShadowDOM/src/wrappers/node-interfaces.js","../ShadowDOM/src/wrappers/CharacterData.js","../ShadowDOM/src/wrappers/Text.js","../ShadowDOM/src/wrappers/DOMTokenList.js","../ShadowDOM/src/wrappers/Element.js","../ShadowDOM/src/wrappers/HTMLElement.js","../ShadowDOM/src/wrappers/HTMLCanvasElement.js","../ShadowDOM/src/wrappers/HTMLContentElement.js","../ShadowDOM/src/wrappers/HTMLFormElement.js","../ShadowDOM/src/wrappers/HTMLImageElement.js","../ShadowDOM/src/wrappers/HTMLShadowElement.js","../ShadowDOM/src/wrappers/HTMLTemplateElement.js","../ShadowDOM/src/wrappers/HTMLMediaElement.js","../ShadowDOM/src/wrappers/HTMLAudioElement.js","../ShadowDOM/src/wrappers/HTMLOptionElement.js","../ShadowDOM/src/wrappers/HTMLSelectElement.js","../ShadowDOM/src/wrappers/HTMLTableElement.js","../ShadowDOM/src/wrappers/HTMLTableSectionElement.js","../ShadowDOM/src/wrappers/HTMLTableRowElement.js","../ShadowDOM/src/wrappers/HTMLUnknownElement.js","../ShadowDOM/src/wrappers/SVGElement.js","../ShadowDOM/src/wrappers/SVGUseElement.js","../ShadowDOM/src/wrappers/SVGElementInstance.js","../ShadowDOM/src/wrappers/CanvasRenderingContext2D.js","../ShadowDOM/src/wrappers/WebGLRenderingContext.js","../ShadowDOM/src/wrappers/Range.js","../ShadowDOM/src/wrappers/generic.js","../ShadowDOM/src/wrappers/ShadowRoot.js","../ShadowDOM/src/ShadowRenderer.js","../ShadowDOM/src/wrappers/elements-with-form-property.js","../ShadowDOM/src/wrappers/Selection.js","../ShadowDOM/src/wrappers/Document.js","../ShadowDOM/src/wrappers/Window.js","../ShadowDOM/src/wrappers/DataTransfer.js","../ShadowDOM/src/wrappers/FormData.js","../ShadowDOM/src/wrappers/override-constructors.js","src/patches-shadowdom-polyfill.js","src/ShadowCSS.js","src/patches-shadowdom-native.js","../URL/url.js","src/lang.js","src/dom.js","src/template.js","src/inspector.js","src/unresolved.js","src/module.js","src/microtask.js","src/url.js","../MutationObservers/MutationObserver.js","../HTMLImports/src/scope.js","../HTMLImports/src/Loader.js","../HTMLImports/src/Parser.js","../HTMLImports/src/HTMLImports.js","../HTMLImports/src/Observer.js","../HTMLImports/src/boot.js","../CustomElements/src/scope.js","../CustomElements/src/Observer.js","../CustomElements/src/CustomElements.js","../CustomElements/src/Parser.js","../CustomElements/src/boot.js","src/patches-custom-elements.js","src/loader.js","src/styleloader.js","../NodeBind/src/NodeBind.js","../TemplateBinding/src/TemplateBinding.js","src/patches-mdv.js"],"names":[],"mappings":";;;;;;;;;;;AASA,OAAA,SAAA,OAAA,aAEA,OAAA,SAAA,OAAA,aAEA,SAAA,GAEA,GAAA,GAAA,EAAA,SAEA,UAAA,OAAA,MAAA,GAAA,MAAA,KAAA,QAAA,SAAA,GACA,E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,GAAA,EAAA,KAAA,KAAA,EAAA,EAEA,OADA,gBAAA,WAAA,GACA,GAKA,EAAA,MAAA,GAEA,OAAA","sourcesContent":["/**\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://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\nwindow.Platform = window.Platform || {};\n// prepopulate window.logFlags if necessary\nwindow.logFlags = window.logFlags || {};\n// process flags\n(function(scope){\n // import\n var flags = scope.flags || {};\n // populate flags from location\n location.search.slice(1).split('&').forEach(function(o) {\n o = o.split('=');\n o[0] && (flags[o[0]] = o[1] || true);\n });\n var entryPoint = document.currentScript ||\n document.querySelector('script[src*=\"platform.js\"]');\n if (entryPoint) {\n var a = entryPoint.attributes;\n for (var i = 0, n; i < a.length; i++) {\n n = a[i];\n if (n.name !== 'src') {\n flags[n.name] = n.value || true;\n }\n }\n }\n if (flags.log) {\n flags.log.split(',').forEach(function(f) {\n window.logFlags[f] = true;\n });\n }\n // If any of these flags match 'native', then force native ShadowDOM; any\n // other truthy value, or failure to detect native\n // ShadowDOM, results in polyfill\n flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;\n if (flags.shadow === 'native') {\n flags.shadow = false;\n } else {\n flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;\n }\n\n if (flags.shadow && document.querySelectorAll('script').length > 1) {\n console.warn('platform.js is not the first script on the page. ' +\n 'See http://www.polymer-project.org/docs/start/platform.html#setup ' +\n 'for details.');\n }\n\n // CustomElements polyfill flag\n if (flags.register) {\n window.CustomElements = window.CustomElements || {flags: {}};\n window.CustomElements.flags.register = flags.register;\n }\n\n if (flags.imports) {\n window.HTMLImports = window.HTMLImports || {flags: {}};\n window.HTMLImports.flags.imports = flags.imports;\n }\n\n // export\n scope.flags = flags;\n})(Platform);\n","/*\n * Copyright 2012 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\nif (typeof WeakMap === 'undefined') {\n (function() {\n var defineProperty = Object.defineProperty;\n var counter = Date.now() % 1e9;\n\n var WeakMap = function() {\n this.name = '__st' + (Math.random() * 1e9 >>> 0) + (counter++ + '__');\n };\n\n WeakMap.prototype = {\n set: function(key, value) {\n var entry = key[this.name];\n if (entry && entry[0] === key)\n entry[1] = value;\n else\n defineProperty(key, this.name, {value: [key, value], writable: true});\n },\n get: function(key) {\n var entry;\n return (entry = key[this.name]) && entry[0] === key ?\n entry[1] : undefined;\n },\n delete: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n var hasValue = entry[0] === key;\n entry[0] = entry[1] = undefined;\n return hasValue;\n },\n has: function(key) {\n var entry = key[this.name];\n if (!entry) return false;\n return entry[0] === key;\n }\n };\n\n window.WeakMap = WeakMap;\n })();\n}\n","// Copyright 2012 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n(function(global) {\n 'use strict';\n\n var testingExposeCycleCount = global.testingExposeCycleCount;\n\n // Detect and do basic sanity checking on Object/Array.observe.\n function detectObjectObserve() {\n if (typeof Object.observe !== 'function' ||\n typeof Array.observe !== 'function') {\n return false;\n }\n\n var records = [];\n\n function callback(recs) {\n records = recs;\n }\n\n var test = {};\n var arr = [];\n Object.observe(test, callback);\n Array.observe(arr, callback);\n test.id = 1;\n test.id = 2;\n delete test.id;\n arr.push(1, 2);\n arr.length = 0;\n\n Object.deliverChangeRecords(callback);\n if (records.length !== 5)\n return false;\n\n if (records[0].type != 'add' ||\n records[1].type != 'update' ||\n records[2].type != 'delete' ||\n records[3].type != 'splice' ||\n records[4].type != 'splice') {\n return false;\n }\n\n Object.unobserve(test, callback);\n Array.unobserve(arr, callback);\n\n return true;\n }\n\n var hasObserve = detectObjectObserve();\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function isIndex(s) {\n return +s === s >>> 0;\n }\n\n function toNumber(s) {\n return +s;\n }\n\n function isObject(obj) {\n return obj === Object(obj);\n }\n\n var numberIsNaN = global.Number.isNaN || function(value) {\n return typeof value === 'number' && global.isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n var identStart = '[\\$_a-zA-Z]';\n var identPart = '[\\$_a-zA-Z0-9]';\n var identRegExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');\n\n function getPathCharType(char) {\n if (char === undefined)\n return 'eof';\n\n var code = char.charCodeAt(0);\n\n switch(code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n case 0x30: // 0\n return char;\n\n case 0x5F: // _\n case 0x24: // $\n return 'ident';\n\n case 0x20: // Space\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws';\n }\n\n // a-z, A-Z\n if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))\n return 'ident';\n\n // 1-9\n if (0x31 <= code && code <= 0x39)\n return 'number';\n\n return 'else';\n }\n\n var pathStateMachine = {\n 'beforePath': {\n 'ws': ['beforePath'],\n 'ident': ['inIdent', 'append'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'inPath': {\n 'ws': ['inPath'],\n '.': ['beforeIdent'],\n '[': ['beforeElement'],\n 'eof': ['afterPath']\n },\n\n 'beforeIdent': {\n 'ws': ['beforeIdent'],\n 'ident': ['inIdent', 'append']\n },\n\n 'inIdent': {\n 'ident': ['inIdent', 'append'],\n '0': ['inIdent', 'append'],\n 'number': ['inIdent', 'append'],\n 'ws': ['inPath', 'push'],\n '.': ['beforeIdent', 'push'],\n '[': ['beforeElement', 'push'],\n 'eof': ['afterPath', 'push']\n },\n\n 'beforeElement': {\n 'ws': ['beforeElement'],\n '0': ['afterZero', 'append'],\n 'number': ['inIndex', 'append'],\n \"'\": ['inSingleQuote', 'append', ''],\n '\"': ['inDoubleQuote', 'append', '']\n },\n\n 'afterZero': {\n 'ws': ['afterElement', 'push'],\n ']': ['inPath', 'push']\n },\n\n 'inIndex': {\n '0': ['inIndex', 'append'],\n 'number': ['inIndex', 'append'],\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n },\n\n 'inSingleQuote': {\n \"'\": ['afterElement'],\n 'eof': ['error'],\n 'else': ['inSingleQuote', 'append']\n },\n\n 'inDoubleQuote': {\n '\"': ['afterElement'],\n 'eof': ['error'],\n 'else': ['inDoubleQuote', 'append']\n },\n\n 'afterElement': {\n 'ws': ['afterElement'],\n ']': ['inPath', 'push']\n }\n }\n\n function noop() {}\n\n function parsePath(path) {\n var keys = [];\n var index = -1;\n var c, newChar, key, type, transition, action, typeMap, mode = 'beforePath';\n\n var actions = {\n push: function() {\n if (key === undefined)\n return;\n\n keys.push(key);\n key = undefined;\n },\n\n append: function() {\n if (key === undefined)\n key = newChar\n else\n key += newChar;\n }\n };\n\n function maybeUnescapeQuote() {\n if (index >= path.length)\n return;\n\n var nextChar = path[index + 1];\n if ((mode == 'inSingleQuote' && nextChar == \"'\") ||\n (mode == 'inDoubleQuote' && nextChar == '\"')) {\n index++;\n newChar = nextChar;\n actions.append();\n return true;\n }\n }\n\n while (mode) {\n index++;\n c = path[index];\n\n if (c == '\\\\' && maybeUnescapeQuote(mode))\n continue;\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || 'error';\n\n if (transition == 'error')\n return; // parse error;\n\n mode = transition[0];\n action = actions[transition[1]] || noop;\n newChar = transition[2] === undefined ? c : transition[2];\n action();\n\n if (mode === 'afterPath') {\n return keys;\n }\n }\n\n return; // parse error\n }\n\n function isIdent(s) {\n return identRegExp.test(s);\n }\n\n var constructorIsPrivate = {};\n\n function Path(parts, privateToken) {\n if (privateToken !== constructorIsPrivate)\n throw Error('Use Path.get to retrieve path objects');\n\n for (var i = 0; i < parts.length; i++) {\n this.push(String(parts[i]));\n }\n\n if (hasEval && this.length) {\n this.getValueFrom = this.compiledGetValueFromFn();\n }\n }\n\n // TODO(rafaelw): Make simple LRU cache\n var pathCache = {};\n\n function getPath(pathString) {\n if (pathString instanceof Path)\n return pathString;\n\n if (pathString == null || pathString.length == 0)\n pathString = '';\n\n if (typeof pathString != 'string') {\n if (isIndex(pathString.length)) {\n // Constructed with array-like (pre-parsed) keys\n return new Path(pathString, constructorIsPrivate);\n }\n\n pathString = String(pathString);\n }\n\n var path = pathCache[pathString];\n if (path)\n return path;\n\n var parts = parsePath(pathString);\n if (!parts)\n return invalidPath;\n\n var path = new Path(parts, constructorIsPrivate);\n pathCache[pathString] = path;\n return path;\n }\n\n Path.get = getPath;\n\n function formatAccessor(key) {\n if (isIndex(key)) {\n return '[' + key + ']';\n } else {\n return '[\"' + key.replace(/\"/g, '\\\\\"') + '\"]';\n }\n }\n\n Path.prototype = createObject({\n __proto__: [],\n valid: true,\n\n toString: function() {\n var pathString = '';\n for (var i = 0; i < this.length; i++) {\n var key = this[i];\n if (isIdent(key)) {\n pathString += i ? '.' + key : key;\n } else {\n pathString += formatAccessor(key);\n }\n }\n\n return pathString;\n },\n\n getValueFrom: function(obj, directObserver) {\n for (var i = 0; i < this.length; i++) {\n if (obj == null)\n return;\n obj = obj[this[i]];\n }\n return obj;\n },\n\n iterateObjects: function(obj, observe) {\n for (var i = 0; i < this.length; i++) {\n if (i)\n obj = obj[this[i - 1]];\n if (!isObject(obj))\n return;\n observe(obj, this[0]);\n }\n },\n\n compiledGetValueFromFn: function() {\n var str = '';\n var pathString = 'obj';\n str += 'if (obj != null';\n var i = 0;\n var key;\n for (; i < (this.length - 1); i++) {\n key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n str += ' &&\\n ' + pathString + ' != null';\n }\n str += ')\\n';\n\n var key = this[i];\n pathString += isIdent(key) ? '.' + key : formatAccessor(key);\n\n str += ' return ' + pathString + ';\\nelse\\n return undefined;';\n return new Function('obj', str);\n },\n\n setValueFrom: function(obj, value) {\n if (!this.length)\n return false;\n\n for (var i = 0; i < this.length - 1; i++) {\n if (!isObject(obj))\n return false;\n obj = obj[this[i]];\n }\n\n if (!isObject(obj))\n return false;\n\n obj[this[i]] = value;\n return true;\n }\n });\n\n var invalidPath = new Path('', constructorIsPrivate);\n invalidPath.valid = false;\n invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};\n\n var MAX_DIRTY_CHECK_CYCLES = 1000;\n\n function dirtyCheck(observer) {\n var cycles = 0;\n while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {\n cycles++;\n }\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n return cycles > 0;\n }\n\n function objectIsEmpty(object) {\n for (var prop in object)\n return false;\n return true;\n }\n\n function diffIsEmpty(diff) {\n return objectIsEmpty(diff.added) &&\n objectIsEmpty(diff.removed) &&\n objectIsEmpty(diff.changed);\n }\n\n function diffObjectFromOldObject(object, oldObject) {\n var added = {};\n var removed = {};\n var changed = {};\n\n for (var prop in oldObject) {\n var newValue = object[prop];\n\n if (newValue !== undefined && newValue === oldObject[prop])\n continue;\n\n if (!(prop in object)) {\n removed[prop] = undefined;\n continue;\n }\n\n if (newValue !== oldObject[prop])\n changed[prop] = newValue;\n }\n\n for (var prop in object) {\n if (prop in oldObject)\n continue;\n\n added[prop] = object[prop];\n }\n\n if (Array.isArray(object) && object.length !== oldObject.length)\n changed.length = object.length;\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n var eomTasks = [];\n function runEOMTasks() {\n if (!eomTasks.length)\n return false;\n\n for (var i = 0; i < eomTasks.length; i++) {\n eomTasks[i]();\n }\n eomTasks.length = 0;\n return true;\n }\n\n var runEOM = hasObserve ? (function(){\n var eomObj = { pingPong: true };\n var eomRunScheduled = false;\n\n Object.observe(eomObj, function() {\n runEOMTasks();\n eomRunScheduled = false;\n });\n\n return function(fn) {\n eomTasks.push(fn);\n if (!eomRunScheduled) {\n eomRunScheduled = true;\n eomObj.pingPong = !eomObj.pingPong;\n }\n };\n })() :\n (function() {\n return function(fn) {\n eomTasks.push(fn);\n };\n })();\n\n var observedObjectCache = [];\n\n function newObservedObject() {\n var observer;\n var object;\n var discardRecords = false;\n var first = true;\n\n function callback(records) {\n if (observer && observer.state_ === OPENED && !discardRecords)\n observer.check_(records);\n }\n\n return {\n open: function(obs) {\n if (observer)\n throw Error('ObservedObject in use');\n\n if (!first)\n Object.deliverChangeRecords(callback);\n\n observer = obs;\n first = false;\n },\n observe: function(obj, arrayObserve) {\n object = obj;\n if (arrayObserve)\n Array.observe(object, callback);\n else\n Object.observe(object, callback);\n },\n deliver: function(discard) {\n discardRecords = discard;\n Object.deliverChangeRecords(callback);\n discardRecords = false;\n },\n close: function() {\n observer = undefined;\n Object.unobserve(object, callback);\n observedObjectCache.push(this);\n }\n };\n }\n\n /*\n * The observedSet abstraction is a perf optimization which reduces the total\n * number of Object.observe observations of a set of objects. The idea is that\n * groups of Observers will have some object dependencies in common and this\n * observed set ensures that each object in the transitive closure of\n * dependencies is only observed once. The observedSet acts as a write barrier\n * such that whenever any change comes through, all Observers are checked for\n * changed values.\n *\n * Note that this optimization is explicitly moving work from setup-time to\n * change-time.\n *\n * TODO(rafaelw): Implement \"garbage collection\". In order to move work off\n * the critical path, when Observers are closed, their observed objects are\n * not Object.unobserve(d). As a result, it's possible that if the observedSet\n * is kept open, but some Observers have been closed, it could cause \"leaks\"\n * (prevent otherwise collectable objects from being collected). At some\n * point, we should implement incremental \"gc\" which keeps a list of\n * observedSets which may need clean-up and does small amounts of cleanup on a\n * timeout until all is clean.\n */\n\n function getObservedObject(observer, object, arrayObserve) {\n var dir = observedObjectCache.pop() || newObservedObject();\n dir.open(observer);\n dir.observe(object, arrayObserve);\n return dir;\n }\n\n var observedSetCache = [];\n\n function newObservedSet() {\n var observerCount = 0;\n var observers = [];\n var objects = [];\n var rootObj;\n var rootObjProps;\n\n function observe(obj, prop) {\n if (!obj)\n return;\n\n if (obj === rootObj)\n rootObjProps[prop] = true;\n\n if (objects.indexOf(obj) < 0) {\n objects.push(obj);\n Object.observe(obj, callback);\n }\n\n observe(Object.getPrototypeOf(obj), prop);\n }\n\n function allRootObjNonObservedProps(recs) {\n for (var i = 0; i < recs.length; i++) {\n var rec = recs[i];\n if (rec.object !== rootObj ||\n rootObjProps[rec.name] ||\n rec.type === 'setPrototype') {\n return false;\n }\n }\n return true;\n }\n\n function callback(recs) {\n if (allRootObjNonObservedProps(recs))\n return;\n\n var observer;\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.iterateObjects_(observe);\n }\n }\n\n for (var i = 0; i < observers.length; i++) {\n observer = observers[i];\n if (observer.state_ == OPENED) {\n observer.check_();\n }\n }\n }\n\n var record = {\n object: undefined,\n objects: objects,\n open: function(obs, object) {\n if (!rootObj) {\n rootObj = object;\n rootObjProps = {};\n }\n\n observers.push(obs);\n observerCount++;\n obs.iterateObjects_(observe);\n },\n close: function(obs) {\n observerCount--;\n if (observerCount > 0) {\n return;\n }\n\n for (var i = 0; i < objects.length; i++) {\n Object.unobserve(objects[i], callback);\n Observer.unobservedCount++;\n }\n\n observers.length = 0;\n objects.length = 0;\n rootObj = undefined;\n rootObjProps = undefined;\n observedSetCache.push(this);\n }\n };\n\n return record;\n }\n\n var lastObservedSet;\n\n function getObservedSet(observer, obj) {\n if (!lastObservedSet || lastObservedSet.object !== obj) {\n lastObservedSet = observedSetCache.pop() || newObservedSet();\n lastObservedSet.object = obj;\n }\n lastObservedSet.open(observer, obj);\n return lastObservedSet;\n }\n\n var UNOPENED = 0;\n var OPENED = 1;\n var CLOSED = 2;\n var RESETTING = 3;\n\n var nextObserverId = 1;\n\n function Observer() {\n this.state_ = UNOPENED;\n this.callback_ = undefined;\n this.target_ = undefined; // TODO(rafaelw): Should be WeakRef\n this.directObserver_ = undefined;\n this.value_ = undefined;\n this.id_ = nextObserverId++;\n }\n\n Observer.prototype = {\n open: function(callback, target) {\n if (this.state_ != UNOPENED)\n throw Error('Observer has already been opened.');\n\n addToAll(this);\n this.callback_ = callback;\n this.target_ = target;\n this.connect_();\n this.state_ = OPENED;\n return this.value_;\n },\n\n close: function() {\n if (this.state_ != OPENED)\n return;\n\n removeFromAll(this);\n this.disconnect_();\n this.value_ = undefined;\n this.callback_ = undefined;\n this.target_ = undefined;\n this.state_ = CLOSED;\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n dirtyCheck(this);\n },\n\n report_: function(changes) {\n try {\n this.callback_.apply(this.target_, changes);\n } catch (ex) {\n Observer._errorThrownDuringCallback = true;\n console.error('Exception caught during observer callback: ' +\n (ex.stack || ex));\n }\n },\n\n discardChanges: function() {\n this.check_(undefined, true);\n return this.value_;\n }\n }\n\n var collectObservers = !hasObserve;\n var allObservers;\n Observer._allObserversCount = 0;\n\n if (collectObservers) {\n allObservers = [];\n }\n\n function addToAll(observer) {\n Observer._allObserversCount++;\n if (!collectObservers)\n return;\n\n allObservers.push(observer);\n }\n\n function removeFromAll(observer) {\n Observer._allObserversCount--;\n }\n\n var runningMicrotaskCheckpoint = false;\n\n var hasDebugForceFullDelivery = hasObserve && hasEval && (function() {\n try {\n eval('%RunMicrotasks()');\n return true;\n } catch (ex) {\n return false;\n }\n })();\n\n global.Platform = global.Platform || {};\n\n global.Platform.performMicrotaskCheckpoint = function() {\n if (runningMicrotaskCheckpoint)\n return;\n\n if (hasDebugForceFullDelivery) {\n eval('%RunMicrotasks()');\n return;\n }\n\n if (!collectObservers)\n return;\n\n runningMicrotaskCheckpoint = true;\n\n var cycles = 0;\n var anyChanged, toCheck;\n\n do {\n cycles++;\n toCheck = allObservers;\n allObservers = [];\n anyChanged = false;\n\n for (var i = 0; i < toCheck.length; i++) {\n var observer = toCheck[i];\n if (observer.state_ != OPENED)\n continue;\n\n if (observer.check_())\n anyChanged = true;\n\n allObservers.push(observer);\n }\n if (runEOMTasks())\n anyChanged = true;\n } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);\n\n if (testingExposeCycleCount)\n global.dirtyCheckCycleCount = cycles;\n\n runningMicrotaskCheckpoint = false;\n };\n\n if (collectObservers) {\n global.Platform.clearObservers = function() {\n allObservers = [];\n };\n }\n\n function ObjectObserver(object) {\n Observer.call(this);\n this.value_ = object;\n this.oldObject_ = undefined;\n }\n\n ObjectObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n arrayObserve: false,\n\n connect_: function(callback, target) {\n if (hasObserve) {\n this.directObserver_ = getObservedObject(this, this.value_,\n this.arrayObserve);\n } else {\n this.oldObject_ = this.copyObject(this.value_);\n }\n\n },\n\n copyObject: function(object) {\n var copy = Array.isArray(object) ? [] : {};\n for (var prop in object) {\n copy[prop] = object[prop];\n };\n if (Array.isArray(object))\n copy.length = object.length;\n return copy;\n },\n\n check_: function(changeRecords, skipChanges) {\n var diff;\n var oldValues;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n\n oldValues = {};\n diff = diffObjectFromChangeRecords(this.value_, changeRecords,\n oldValues);\n } else {\n oldValues = this.oldObject_;\n diff = diffObjectFromOldObject(this.value_, this.oldObject_);\n }\n\n if (diffIsEmpty(diff))\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([\n diff.added || {},\n diff.removed || {},\n diff.changed || {},\n function(property) {\n return oldValues[property];\n }\n ]);\n\n return true;\n },\n\n disconnect_: function() {\n if (hasObserve) {\n this.directObserver_.close();\n this.directObserver_ = undefined;\n } else {\n this.oldObject_ = undefined;\n }\n },\n\n deliver: function() {\n if (this.state_ != OPENED)\n return;\n\n if (hasObserve)\n this.directObserver_.deliver(false);\n else\n dirtyCheck(this);\n },\n\n discardChanges: function() {\n if (this.directObserver_)\n this.directObserver_.deliver(true);\n else\n this.oldObject_ = this.copyObject(this.value_);\n\n return this.value_;\n }\n });\n\n function ArrayObserver(array) {\n if (!Array.isArray(array))\n throw Error('Provided object is not an Array');\n ObjectObserver.call(this, array);\n }\n\n ArrayObserver.prototype = createObject({\n\n __proto__: ObjectObserver.prototype,\n\n arrayObserve: true,\n\n copyObject: function(arr) {\n return arr.slice();\n },\n\n check_: function(changeRecords) {\n var splices;\n if (hasObserve) {\n if (!changeRecords)\n return false;\n splices = projectArraySplices(this.value_, changeRecords);\n } else {\n splices = calcSplices(this.value_, 0, this.value_.length,\n this.oldObject_, 0, this.oldObject_.length);\n }\n\n if (!splices || !splices.length)\n return false;\n\n if (!hasObserve)\n this.oldObject_ = this.copyObject(this.value_);\n\n this.report_([splices]);\n return true;\n }\n });\n\n ArrayObserver.applySplices = function(previous, current, splices) {\n splices.forEach(function(splice) {\n var spliceArgs = [splice.index, splice.removed.length];\n var addIndex = splice.index;\n while (addIndex < splice.index + splice.addedCount) {\n spliceArgs.push(current[addIndex]);\n addIndex++;\n }\n\n Array.prototype.splice.apply(previous, spliceArgs);\n });\n };\n\n function PathObserver(object, path) {\n Observer.call(this);\n\n this.object_ = object;\n this.path_ = getPath(path);\n this.directObserver_ = undefined;\n }\n\n PathObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n get path() {\n return this.path_;\n },\n\n connect_: function() {\n if (hasObserve)\n this.directObserver_ = getObservedSet(this, this.object_);\n\n this.check_(undefined, true);\n },\n\n disconnect_: function() {\n this.value_ = undefined;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n iterateObjects_: function(observe) {\n this.path_.iterateObjects(this.object_, observe);\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValue = this.value_;\n this.value_ = this.path_.getValueFrom(this.object_);\n if (skipChanges || areSameValue(this.value_, oldValue))\n return false;\n\n this.report_([this.value_, oldValue, this]);\n return true;\n },\n\n setValue: function(newValue) {\n if (this.path_)\n this.path_.setValueFrom(this.object_, newValue);\n }\n });\n\n function CompoundObserver(reportChangesOnOpen) {\n Observer.call(this);\n\n this.reportChangesOnOpen_ = reportChangesOnOpen;\n this.value_ = [];\n this.directObserver_ = undefined;\n this.observed_ = [];\n }\n\n var observerSentinel = {};\n\n CompoundObserver.prototype = createObject({\n __proto__: Observer.prototype,\n\n connect_: function() {\n if (hasObserve) {\n var object;\n var needsDirectObserver = false;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel) {\n needsDirectObserver = true;\n break;\n }\n }\n\n if (needsDirectObserver)\n this.directObserver_ = getObservedSet(this, object);\n }\n\n this.check_(undefined, !this.reportChangesOnOpen_);\n },\n\n disconnect_: function() {\n for (var i = 0; i < this.observed_.length; i += 2) {\n if (this.observed_[i] === observerSentinel)\n this.observed_[i + 1].close();\n }\n this.observed_.length = 0;\n this.value_.length = 0;\n\n if (this.directObserver_) {\n this.directObserver_.close(this);\n this.directObserver_ = undefined;\n }\n },\n\n addPath: function(object, path) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add paths once started.');\n\n var path = getPath(path);\n this.observed_.push(object, path);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = path.getValueFrom(object);\n },\n\n addObserver: function(observer) {\n if (this.state_ != UNOPENED && this.state_ != RESETTING)\n throw Error('Cannot add observers once started.');\n\n this.observed_.push(observerSentinel, observer);\n if (!this.reportChangesOnOpen_)\n return;\n var index = this.observed_.length / 2 - 1;\n this.value_[index] = observer.open(this.deliver, this);\n },\n\n startReset: function() {\n if (this.state_ != OPENED)\n throw Error('Can only reset while open');\n\n this.state_ = RESETTING;\n this.disconnect_();\n },\n\n finishReset: function() {\n if (this.state_ != RESETTING)\n throw Error('Can only finishReset after startReset');\n this.state_ = OPENED;\n this.connect_();\n\n return this.value_;\n },\n\n iterateObjects_: function(observe) {\n var object;\n for (var i = 0; i < this.observed_.length; i += 2) {\n object = this.observed_[i]\n if (object !== observerSentinel)\n this.observed_[i + 1].iterateObjects(object, observe)\n }\n },\n\n check_: function(changeRecords, skipChanges) {\n var oldValues;\n for (var i = 0; i < this.observed_.length; i += 2) {\n var object = this.observed_[i];\n var path = this.observed_[i+1];\n var value;\n if (object === observerSentinel) {\n var observable = path;\n value = this.state_ === UNOPENED ?\n observable.open(this.deliver, this) :\n observable.discardChanges();\n } else {\n value = path.getValueFrom(object);\n }\n\n if (skipChanges) {\n this.value_[i / 2] = value;\n continue;\n }\n\n if (areSameValue(value, this.value_[i / 2]))\n continue;\n\n oldValues = oldValues || [];\n oldValues[i / 2] = this.value_[i / 2];\n this.value_[i / 2] = value;\n }\n\n if (!oldValues)\n return false;\n\n // TODO(rafaelw): Having observed_ as the third callback arg here is\n // pretty lame API. Fix.\n this.report_([this.value_, oldValues, this.observed_]);\n return true;\n }\n });\n\n function identFn(value) { return value; }\n\n function ObserverTransform(observable, getValueFn, setValueFn,\n dontPassThroughSet) {\n this.callback_ = undefined;\n this.target_ = undefined;\n this.value_ = undefined;\n this.observable_ = observable;\n this.getValueFn_ = getValueFn || identFn;\n this.setValueFn_ = setValueFn || identFn;\n // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this\n // at the moment because of a bug in it's dependency tracking.\n this.dontPassThroughSet_ = dontPassThroughSet;\n }\n\n ObserverTransform.prototype = {\n open: function(callback, target) {\n this.callback_ = callback;\n this.target_ = target;\n this.value_ =\n this.getValueFn_(this.observable_.open(this.observedCallback_, this));\n return this.value_;\n },\n\n observedCallback_: function(value) {\n value = this.getValueFn_(value);\n if (areSameValue(value, this.value_))\n return;\n var oldValue = this.value_;\n this.value_ = value;\n this.callback_.call(this.target_, this.value_, oldValue);\n },\n\n discardChanges: function() {\n this.value_ = this.getValueFn_(this.observable_.discardChanges());\n return this.value_;\n },\n\n deliver: function() {\n return this.observable_.deliver();\n },\n\n setValue: function(value) {\n value = this.setValueFn_(value);\n if (!this.dontPassThroughSet_ && this.observable_.setValue)\n return this.observable_.setValue(value);\n },\n\n close: function() {\n if (this.observable_)\n this.observable_.close();\n this.callback_ = undefined;\n this.target_ = undefined;\n this.observable_ = undefined;\n this.value_ = undefined;\n this.getValueFn_ = undefined;\n this.setValueFn_ = undefined;\n }\n }\n\n var expectedRecordTypes = {\n add: true,\n update: true,\n delete: true\n };\n\n function diffObjectFromChangeRecords(object, changeRecords, oldValues) {\n var added = {};\n var removed = {};\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n if (!expectedRecordTypes[record.type]) {\n console.error('Unknown changeRecord type: ' + record.type);\n console.error(record);\n continue;\n }\n\n if (!(record.name in oldValues))\n oldValues[record.name] = record.oldValue;\n\n if (record.type == 'update')\n continue;\n\n if (record.type == 'add') {\n if (record.name in removed)\n delete removed[record.name];\n else\n added[record.name] = true;\n\n continue;\n }\n\n // type = 'delete'\n if (record.name in added) {\n delete added[record.name];\n delete oldValues[record.name];\n } else {\n removed[record.name] = true;\n }\n }\n\n for (var prop in added)\n added[prop] = object[prop];\n\n for (var prop in removed)\n removed[prop] = undefined;\n\n var changed = {};\n for (var prop in oldValues) {\n if (prop in added || prop in removed)\n continue;\n\n var newValue = object[prop];\n if (oldValues[prop] !== newValue)\n changed[prop] = newValue;\n }\n\n return {\n added: added,\n removed: removed,\n changed: changed\n };\n }\n\n function newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n }\n\n var EDIT_LEAVE = 0;\n var EDIT_UPDATE = 1;\n var EDIT_ADD = 2;\n var EDIT_DELETE = 3;\n\n function ArraySplice() {}\n\n ArraySplice.prototype = {\n\n // Note: This function is *based* on the computation of the Levenshtein\n // \"edit\" distance. The one change is that \"updates\" are treated as two\n // edits - not one. With Array splices, an update is really a delete\n // followed by an add. By retaining this, we optimize for \"keeping\" the\n // maximum array items in the original array. For example:\n //\n // 'xxxx123' -> '123yyyy'\n //\n // With 1-edit updates, the shortest path would be just to update all seven\n // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This\n // leaves the substring '123' intact.\n calcEditDistances: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n // \"Deletion\" columns\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n\n // \"Addition\" rows. Initialize null column.\n for (var i = 0; i < rowCount; i++) {\n distances[i] = new Array(columnCount);\n distances[i][0] = i;\n }\n\n // Initialize null row\n for (var j = 0; j < columnCount; j++)\n distances[0][j] = j;\n\n for (var i = 1; i < rowCount; i++) {\n for (var j = 1; j < columnCount; j++) {\n if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))\n distances[i][j] = distances[i - 1][j - 1];\n else {\n var north = distances[i - 1][j] + 1;\n var west = distances[i][j - 1] + 1;\n distances[i][j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n // This starts at the final weight, and walks \"backward\" by finding\n // the minimum previous weight recursively until the origin of the weight\n // matrix.\n spliceOperationsFromEditDistances: function(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i == 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j == 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min;\n if (west < north)\n min = west < northWest ? west : northWest;\n else\n min = north < northWest ? north : northWest;\n\n if (min == northWest) {\n if (northWest == current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min == west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n /**\n * Splice Projection functions:\n *\n * A splice map is a representation of how a previous array of items\n * was transformed into a new array of items. Conceptually it is a list of\n * tuples of\n *\n * <index, removed, addedCount>\n *\n * which are kept in ascending index order of. The tuple represents that at\n * the |index|, |removed| sequence of items were removed, and counting forward\n * from |index|, |addedCount| items were added.\n */\n\n /**\n * Lacking individual splice mutation information, the minimal set of\n * splices can be synthesized given the previous state and final state of an\n * array. The basic approach is to calculate the edit distance matrix and\n * choose the shortest path through it.\n *\n * Complexity: O(l * p)\n * l: The length of the current array\n * p: The length of the old array\n */\n calcSplices: function(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart == 0 && oldStart == 0)\n prefixCount = this.sharedPrefix(current, old, minLength);\n\n if (currentEnd == current.length && oldEnd == old.length)\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)\n return [];\n\n if (currentStart == currentEnd) {\n var splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd)\n splice.removed.push(old[oldStart++]);\n\n return [ splice ];\n } else if (oldStart == oldEnd)\n return [ newSplice(currentStart, [], currentEnd - currentStart) ];\n\n var ops = this.spliceOperationsFromEditDistances(\n this.calcEditDistances(current, currentStart, currentEnd,\n old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var i = 0; i < ops.length; i++) {\n switch(ops[i]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice)\n splice = newSplice(index, [], 0);\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function(current, old, searchLength) {\n for (var i = 0; i < searchLength; i++)\n if (!this.equals(current[i], old[i]))\n return i;\n return searchLength;\n },\n\n sharedSuffix: function(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2]))\n count++;\n\n return count;\n },\n\n calculateSplices: function(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0,\n previous.length);\n },\n\n equals: function(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n };\n\n var arraySplice = new ArraySplice();\n\n function calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd,\n old, oldStart, oldEnd);\n }\n\n function intersect(start1, end1, start2, end2) {\n // Disjoint\n if (end1 < start2 || end2 < start1)\n return -1;\n\n // Adjacent\n if (end1 == start2 || end2 == start1)\n return 0;\n\n // Non-zero intersect, span1 first\n if (start1 < start2) {\n if (end1 < end2)\n return end1 - start2; // Overlap\n else\n return end2 - start2; // Contained\n } else {\n // Non-zero intersect, span2 first\n if (end2 < end1)\n return end2 - start1; // Overlap\n else\n return end1 - start1; // Contained\n }\n }\n\n function mergeSplice(splices, index, removed, addedCount) {\n\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var i = 0; i < splices.length; i++) {\n var current = splices[i];\n current.index += insertionOffset;\n\n if (inserted)\n continue;\n\n var intersectCount = intersect(splice.index,\n splice.index + splice.removed.length,\n current.index,\n current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n // Merge the two splices\n\n splices.splice(i, 1);\n i--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length +\n current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n // merged splice is a noop. discard.\n inserted = true;\n } else {\n var removed = current.removed;\n\n if (splice.index < current.index) {\n // some prefix of splice.removed is prepended to current.removed.\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, removed);\n removed = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n // some suffix of splice.removed is appended to current.removed.\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(removed, append);\n }\n\n splice.removed = removed;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n // Insert splice here.\n\n inserted = true;\n\n splices.splice(i, 0, splice);\n i++;\n\n var offset = splice.addedCount - splice.removed.length\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted)\n splices.push(splice);\n }\n\n function createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var i = 0; i < changeRecords.length; i++) {\n var record = changeRecords[i];\n switch(record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case 'add':\n case 'update':\n case 'delete':\n if (!isIndex(record.name))\n continue;\n var index = toNumber(record.name);\n if (index < 0)\n continue;\n mergeSplice(splices, index, [record.oldValue], 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n }\n\n function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function(splice) {\n if (splice.addedCount == 1 && splice.removed.length == 1) {\n if (splice.removed[0] !== array[splice.index])\n splices.push(splice);\n\n return\n };\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,\n splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n }\n\n global.Observer = Observer;\n global.Observer.runEOM_ = runEOM;\n global.Observer.observerSentinel_ = observerSentinel; // for testing.\n global.Observer.hasObjectObserve = hasObserve;\n global.ArrayObserver = ArrayObserver;\n global.ArrayObserver.calculateSplices = function(current, previous) {\n return arraySplice.calculateSplices(current, previous);\n };\n\n global.ArraySplice = ArraySplice;\n global.ObjectObserver = ObjectObserver;\n global.PathObserver = PathObserver;\n global.CompoundObserver = CompoundObserver;\n global.Path = Path;\n global.ObserverTransform = ObserverTransform;\n})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);\n","// select ShadowDOM impl\r\nif (Platform.flags.shadow) {\r\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\nwindow.ShadowDOMPolyfill = {};\n\n(function(scope) {\n 'use strict';\n\n var constructorTable = new WeakMap();\n var nativePrototypeTable = new WeakMap();\n var wrappers = Object.create(null);\n\n function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('return true;');\n return f();\n } catch (ex) {\n return false;\n }\n }\n\n var hasEval = detectEval();\n\n function assert(b) {\n if (!b)\n throw new Error('Assertion failed');\n };\n\n var defineProperty = Object.defineProperty;\n var getOwnPropertyNames = Object.getOwnPropertyNames;\n var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n function mixin(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function mixinStatics(to, from) {\n var names = getOwnPropertyNames(from);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n switch (name) {\n case 'arguments':\n case 'caller':\n case 'length':\n case 'name':\n case 'prototype':\n case 'toString':\n continue;\n }\n defineProperty(to, name, getOwnPropertyDescriptor(from, name));\n }\n return to;\n };\n\n function oneOf(object, propertyNames) {\n for (var i = 0; i < propertyNames.length; i++) {\n if (propertyNames[i] in object)\n return propertyNames[i];\n }\n }\n\n var nonEnumerableDataDescriptor = {\n value: undefined,\n configurable: true,\n enumerable: false,\n writable: true\n };\n\n function defineNonEnumerableDataProperty(object, name, value) {\n nonEnumerableDataDescriptor.value = value;\n defineProperty(object, name, nonEnumerableDataDescriptor);\n }\n\n // Mozilla's old DOM bindings are bretty busted:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=855844\n // Make sure they are create before we start modifying things.\n getOwnPropertyNames(window);\n\n function getWrapperConstructor(node) {\n var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);\n var wrapperConstructor = constructorTable.get(nativePrototype);\n if (wrapperConstructor)\n return wrapperConstructor;\n\n var parentWrapperConstructor = getWrapperConstructor(nativePrototype);\n\n var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, node);\n\n return GeneratedWrapper;\n }\n\n function addForwardingProperties(nativePrototype, wrapperPrototype) {\n installProperty(nativePrototype, wrapperPrototype, true);\n }\n\n function registerInstanceProperties(wrapperPrototype, instanceObject) {\n installProperty(instanceObject, wrapperPrototype, false);\n }\n\n var isFirefox = /Firefox/.test(navigator.userAgent);\n\n // This is used as a fallback when getting the descriptor fails in\n // installProperty.\n var dummyDescriptor = {\n get: function() {},\n set: function(v) {},\n configurable: true,\n enumerable: true\n };\n\n function isEventHandlerName(name) {\n return /^on[a-z]+$/.test(name);\n }\n\n function isIdentifierName(name) {\n return /^\\w[a-zA-Z_0-9]*$/.test(name);\n }\n\n function getGetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name) :\n function() { return this.impl[name]; };\n }\n\n function getSetter(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('v', 'this.impl.' + name + ' = v') :\n function(v) { this.impl[name] = v; };\n }\n\n function getMethod(name) {\n return hasEval && isIdentifierName(name) ?\n new Function('return this.impl.' + name +\n '.apply(this.impl, arguments)') :\n function() { return this.impl[name].apply(this.impl, arguments); };\n }\n\n function getDescriptor(source, name) {\n try {\n return Object.getOwnPropertyDescriptor(source, name);\n } catch (ex) {\n // JSC and V8 both use data properties instead of accessors which can\n // cause getting the property desciptor to throw an exception.\n // https://bugs.webkit.org/show_bug.cgi?id=49739\n return dummyDescriptor;\n }\n }\n\n function installProperty(source, target, allowMethod, opt_blacklist) {\n var names = getOwnPropertyNames(source);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n if (name === 'polymerBlackList_')\n continue;\n\n if (name in target)\n continue;\n\n if (source.polymerBlackList_ && source.polymerBlackList_[name])\n continue;\n\n if (isFirefox) {\n // Tickle Firefox's old bindings.\n source.__lookupGetter__(name);\n }\n var descriptor = getDescriptor(source, name);\n var getter, setter;\n if (allowMethod && typeof descriptor.value === 'function') {\n target[name] = getMethod(name);\n continue;\n }\n\n var isEvent = isEventHandlerName(name);\n if (isEvent)\n getter = scope.getEventHandlerGetter(name);\n else\n getter = getGetter(name);\n\n if (descriptor.writable || descriptor.set) {\n if (isEvent)\n setter = scope.getEventHandlerSetter(name);\n else\n setter = getSetter(name);\n }\n\n defineProperty(target, name, {\n get: getter,\n set: setter,\n configurable: descriptor.configurable,\n enumerable: descriptor.enumerable\n });\n }\n }\n\n /**\n * @param {Function} nativeConstructor\n * @param {Function} wrapperConstructor\n * @param {Object=} opt_instance If present, this is used to extract\n * properties from an instance object.\n */\n function register(nativeConstructor, wrapperConstructor, opt_instance) {\n var nativePrototype = nativeConstructor.prototype;\n registerInternal(nativePrototype, wrapperConstructor, opt_instance);\n mixinStatics(wrapperConstructor, nativeConstructor);\n }\n\n function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {\n var wrapperPrototype = wrapperConstructor.prototype;\n assert(constructorTable.get(nativePrototype) === undefined);\n\n constructorTable.set(nativePrototype, wrapperConstructor);\n nativePrototypeTable.set(wrapperPrototype, nativePrototype);\n\n addForwardingProperties(nativePrototype, wrapperPrototype);\n if (opt_instance)\n registerInstanceProperties(wrapperPrototype, opt_instance);\n\n defineNonEnumerableDataProperty(\n wrapperPrototype, 'constructor', wrapperConstructor);\n // Set it again. Some VMs optimizes objects that are used as prototypes.\n wrapperConstructor.prototype = wrapperPrototype;\n }\n\n function isWrapperFor(wrapperConstructor, nativeConstructor) {\n return constructorTable.get(nativeConstructor.prototype) ===\n wrapperConstructor;\n }\n\n /**\n * Creates a generic wrapper constructor based on |object| and its\n * constructor.\n * @param {Node} object\n * @return {Function} The generated constructor.\n */\n function registerObject(object) {\n var nativePrototype = Object.getPrototypeOf(object);\n\n var superWrapperConstructor = getWrapperConstructor(nativePrototype);\n var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);\n registerInternal(nativePrototype, GeneratedWrapper, object);\n\n return GeneratedWrapper;\n }\n\n function createWrapperConstructor(superWrapperConstructor) {\n function GeneratedWrapper(node) {\n superWrapperConstructor.call(this, node);\n }\n var p = Object.create(superWrapperConstructor.prototype);\n p.constructor = GeneratedWrapper;\n GeneratedWrapper.prototype = p;\n\n return GeneratedWrapper;\n }\n\n var OriginalDOMImplementation = window.DOMImplementation;\n var OriginalEventTarget = window.EventTarget;\n var OriginalEvent = window.Event;\n var OriginalNode = window.Node;\n var OriginalWindow = window.Window;\n var OriginalRange = window.Range;\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n var OriginalSVGElementInstance = window.SVGElementInstance;\n var OriginalFormData = window.FormData;\n \n function isWrapper(object) {\n return object instanceof wrappers.EventTarget ||\n object instanceof wrappers.Event ||\n object instanceof wrappers.Range ||\n object instanceof wrappers.DOMImplementation ||\n object instanceof wrappers.CanvasRenderingContext2D ||\n object instanceof wrappers.FormData ||\n wrappers.WebGLRenderingContext &&\n object instanceof wrappers.WebGLRenderingContext;\n }\n\n function isNative(object) {\n return OriginalEventTarget && object instanceof OriginalEventTarget ||\n object instanceof OriginalNode ||\n object instanceof OriginalEvent ||\n object instanceof OriginalWindow ||\n object instanceof OriginalRange ||\n object instanceof OriginalDOMImplementation ||\n object instanceof OriginalCanvasRenderingContext2D ||\n object instanceof OriginalFormData ||\n OriginalWebGLRenderingContext &&\n object instanceof OriginalWebGLRenderingContext ||\n OriginalSVGElementInstance &&\n object instanceof OriginalSVGElementInstance;\n }\n\n /**\n * Wraps a node in a WrapperNode. If there already exists a wrapper for the\n * |node| that wrapper is returned instead.\n * @param {Node} node\n * @return {WrapperNode}\n */\n function wrap(impl) {\n if (impl === null)\n return null;\n\n assert(isNative(impl));\n return impl.polymerWrapper_ ||\n (impl.polymerWrapper_ = new (getWrapperConstructor(impl))(impl));\n }\n\n /**\n * Unwraps a wrapper and returns the node it is wrapping.\n * @param {WrapperNode} wrapper\n * @return {Node}\n */\n function unwrap(wrapper) {\n if (wrapper === null)\n return null;\n assert(isWrapper(wrapper));\n return wrapper.impl;\n }\n\n /**\n * Unwraps object if it is a wrapper.\n * @param {Object} object\n * @return {Object} The native implementation object.\n */\n function unwrapIfNeeded(object) {\n return object && isWrapper(object) ? unwrap(object) : object;\n }\n\n /**\n * Wraps object if it is not a wrapper.\n * @param {Object} object\n * @return {Object} The wrapper for object.\n */\n function wrapIfNeeded(object) {\n return object && !isWrapper(object) ? wrap(object) : object;\n }\n\n /**\n * Overrides the current wrapper (if any) for node.\n * @param {Node} node\n * @param {WrapperNode=} wrapper If left out the wrapper will be created as\n * needed next time someone wraps the node.\n */\n function rewrap(node, wrapper) {\n if (wrapper === null)\n return;\n assert(isNative(node));\n assert(wrapper === undefined || isWrapper(wrapper));\n node.polymerWrapper_ = wrapper;\n }\n\n var getterDescriptor = {\n get: undefined,\n configurable: true,\n enumerable: true\n };\n\n function defineGetter(constructor, name, getter) {\n getterDescriptor.get = getter;\n defineProperty(constructor.prototype, name, getterDescriptor);\n }\n\n function defineWrapGetter(constructor, name) {\n defineGetter(constructor, name, function() {\n return wrap(this.impl[name]);\n });\n }\n\n /**\n * Forwards existing methods on the native object to the wrapper methods.\n * This does not wrap any of the arguments or the return value since the\n * wrapper implementation already takes care of that.\n * @param {Array.<Function>} constructors\n * @parem {Array.<string>} names\n */\n function forwardMethodsToWrapper(constructors, names) {\n constructors.forEach(function(constructor) {\n names.forEach(function(name) {\n constructor.prototype[name] = function() {\n var w = wrapIfNeeded(this);\n return w[name].apply(w, arguments);\n };\n });\n });\n }\n\n scope.assert = assert;\n scope.constructorTable = constructorTable;\n scope.defineGetter = defineGetter;\n scope.defineWrapGetter = defineWrapGetter;\n scope.forwardMethodsToWrapper = forwardMethodsToWrapper;\n scope.isWrapper = isWrapper;\n scope.isWrapperFor = isWrapperFor;\n scope.mixin = mixin;\n scope.nativePrototypeTable = nativePrototypeTable;\n scope.oneOf = oneOf;\n scope.registerObject = registerObject;\n scope.registerWrapper = register;\n scope.rewrap = rewrap;\n scope.unwrap = unwrap;\n scope.unwrapIfNeeded = unwrapIfNeeded;\n scope.wrap = wrap;\n scope.wrapIfNeeded = wrapIfNeeded;\n scope.wrappers = wrappers;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(context) {\n 'use strict';\n\n var OriginalMutationObserver = window.MutationObserver;\n var callbacks = [];\n var pending = false;\n var timerFunc;\n\n function handle() {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks = [];\n for (var i = 0; i < copies.length; i++) {\n (0, copies[i])();\n }\n }\n\n if (OriginalMutationObserver) {\n var counter = 1;\n var observer = new OriginalMutationObserver(handle);\n var textNode = document.createTextNode(counter);\n observer.observe(textNode, {characterData: true});\n\n timerFunc = function() {\n counter = (counter + 1) % 2;\n textNode.data = counter;\n };\n\n } else {\n timerFunc = window.setImmediate || window.setTimeout;\n }\n\n function setEndOfMicrotask(func) {\n callbacks.push(func);\n if (pending)\n return;\n pending = true;\n timerFunc(handle, 0);\n }\n\n context.setEndOfMicrotask = setEndOfMicrotask;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var setEndOfMicrotask = scope.setEndOfMicrotask\n var wrapIfNeeded = scope.wrapIfNeeded\n var wrappers = scope.wrappers;\n\n var registrationsTable = new WeakMap();\n var globalMutationObservers = [];\n var isScheduled = false;\n\n function scheduleCallback(observer) {\n if (isScheduled)\n return;\n setEndOfMicrotask(notifyObservers);\n isScheduled = true;\n }\n\n // http://dom.spec.whatwg.org/#mutation-observers\n function notifyObservers() {\n isScheduled = false;\n\n do {\n var notifyList = globalMutationObservers.slice();\n var anyNonEmpty = false;\n for (var i = 0; i < notifyList.length; i++) {\n var mo = notifyList[i];\n var queue = mo.takeRecords();\n removeTransientObserversFor(mo);\n if (queue.length) {\n mo.callback_(queue, mo);\n anyNonEmpty = true;\n }\n }\n } while (anyNonEmpty);\n }\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = new wrappers.NodeList();\n this.removedNodes = new wrappers.NodeList();\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n /**\n * Registers transient observers to ancestor and its ancesors for the node\n * which was removed.\n * @param {!Node} ancestor\n * @param {!Node} node\n */\n function registerTransientObservers(ancestor, node) {\n for (; ancestor; ancestor = ancestor.parentNode) {\n var registrations = registrationsTable.get(ancestor);\n if (!registrations)\n continue;\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.options.subtree)\n registration.addTransientObserver(node);\n }\n }\n }\n\n function removeTransientObserversFor(observer) {\n for (var i = 0; i < observer.nodes_.length; i++) {\n var node = observer.nodes_[i];\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n if (registration.observer === observer)\n registration.removeTransientObservers();\n }\n }\n }\n\n // http://dom.spec.whatwg.org/#queue-a-mutation-record\n function enqueueMutation(target, type, data) {\n // 1.\n var interestedObservers = Object.create(null);\n var associatedStrings = Object.create(null);\n\n // 2.\n for (var node = target; node; node = node.parentNode) {\n // 3.\n var registrations = registrationsTable.get(node);\n if (!registrations)\n continue;\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n // 1.\n if (node !== target && !options.subtree)\n continue;\n\n // 2.\n if (type === 'attributes' && !options.attributes)\n continue;\n\n // 3. If type is \"attributes\", options's attributeFilter is present, and\n // either options's attributeFilter does not contain name or namespace\n // is non-null, continue.\n if (type === 'attributes' && options.attributeFilter &&\n (data.namespace !== null ||\n options.attributeFilter.indexOf(data.name) === -1)) {\n continue;\n }\n\n // 4.\n if (type === 'characterData' && !options.characterData)\n continue;\n\n // 5.\n if (type === 'childList' && !options.childList)\n continue;\n\n // 6.\n var observer = registration.observer;\n interestedObservers[observer.uid_] = observer;\n\n // 7. If either type is \"attributes\" and options's attributeOldValue is\n // true, or type is \"characterData\" and options's characterDataOldValue\n // is true, set the paired string of registered observer's observer in\n // interested observers to oldValue.\n if (type === 'attributes' && options.attributeOldValue ||\n type === 'characterData' && options.characterDataOldValue) {\n associatedStrings[observer.uid_] = data.oldValue;\n }\n }\n }\n\n var anyRecordsEnqueued = false;\n\n // 4.\n for (var uid in interestedObservers) {\n var observer = interestedObservers[uid];\n var record = new MutationRecord(type, target);\n\n // 2.\n if ('name' in data && 'namespace' in data) {\n record.attributeName = data.name;\n record.attributeNamespace = data.namespace;\n }\n\n // 3.\n if (data.addedNodes)\n record.addedNodes = data.addedNodes;\n\n // 4.\n if (data.removedNodes)\n record.removedNodes = data.removedNodes;\n\n // 5.\n if (data.previousSibling)\n record.previousSibling = data.previousSibling;\n\n // 6.\n if (data.nextSibling)\n record.nextSibling = data.nextSibling;\n\n // 7.\n if (associatedStrings[uid] !== undefined)\n record.oldValue = associatedStrings[uid];\n\n // 8.\n observer.records_.push(record);\n\n anyRecordsEnqueued = true;\n }\n\n if (anyRecordsEnqueued)\n scheduleCallback();\n }\n\n var slice = Array.prototype.slice;\n\n /**\n * @param {!Object} options\n * @constructor\n */\n function MutationObserverOptions(options) {\n this.childList = !!options.childList;\n this.subtree = !!options.subtree;\n\n // 1. If either options' attributeOldValue or attributeFilter is present\n // and options' attributes is omitted, set options' attributes to true.\n if (!('attributes' in options) &&\n ('attributeOldValue' in options || 'attributeFilter' in options)) {\n this.attributes = true;\n } else {\n this.attributes = !!options.attributes;\n }\n\n // 2. If options' characterDataOldValue is present and options'\n // characterData is omitted, set options' characterData to true.\n if ('characterDataOldValue' in options && !('characterData' in options))\n this.characterData = true;\n else\n this.characterData = !!options.characterData;\n\n // 3. & 4.\n if (!this.attributes &&\n (options.attributeOldValue || 'attributeFilter' in options) ||\n // 5.\n !this.characterData && options.characterDataOldValue) {\n throw new TypeError();\n }\n\n this.characterData = !!options.characterData;\n this.attributeOldValue = !!options.attributeOldValue;\n this.characterDataOldValue = !!options.characterDataOldValue;\n if ('attributeFilter' in options) {\n if (options.attributeFilter == null ||\n typeof options.attributeFilter !== 'object') {\n throw new TypeError();\n }\n this.attributeFilter = slice.call(options.attributeFilter);\n } else {\n this.attributeFilter = null;\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function MutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n\n // This will leak. There is no way to implement this without WeakRefs :'(\n globalMutationObservers.push(this);\n }\n\n MutationObserver.prototype = {\n // http://dom.spec.whatwg.org/#dom-mutationobserver-observe\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n var newOptions = new MutationObserverOptions(options);\n\n // 6.\n var registration;\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n // 6.1.\n registration.removeTransientObservers();\n // 6.2.\n registration.options = newOptions;\n }\n }\n\n // 7.\n if (!registration) {\n registration = new Registration(this, target, newOptions);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n },\n\n // http://dom.spec.whatwg.org/#dom-mutationobserver-disconnect\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverOptions} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n for (var i = 0; i < transientObservedNodes.length; i++) {\n var node = transientObservedNodes[i];\n var registrations = registrationsTable.get(node);\n for (var j = 0; j < registrations.length; j++) {\n if (registrations[j] === this) {\n registrations.splice(j, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }\n }\n };\n\n scope.enqueueMutation = enqueueMutation;\n scope.registerTransientObservers = registerTransientObservers;\n scope.wrappers.MutationObserver = MutationObserver;\n scope.wrappers.MutationRecord = MutationRecord;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n /**\n * A tree scope represents the root of a tree. All nodes in a tree point to\n * the same TreeScope object. The tree scope of a node get set the first time\n * it is accessed or when a node is added or remove to a tree.\n *\n * The root is a Node that has no parent.\n *\n * The parent is another TreeScope. For ShadowRoots, it is the TreeScope of\n * the host of the ShadowRoot.\n *\n * @param {!Node} root\n * @param {TreeScope} parent\n * @constructor\n */\n function TreeScope(root, parent) {\n /** @type {!Node} */\n this.root = root;\n\n /** @type {TreeScope} */\n this.parent = parent;\n }\n\n TreeScope.prototype = {\n get renderer() {\n if (this.root instanceof scope.wrappers.ShadowRoot) {\n return scope.getRendererForHost(this.root.host);\n }\n return null;\n },\n\n contains: function(treeScope) {\n for (; treeScope; treeScope = treeScope.parent) {\n if (treeScope === this)\n return true;\n }\n return false;\n }\n };\n\n function setTreeScope(node, treeScope) {\n if (node.treeScope_ !== treeScope) {\n node.treeScope_ = treeScope;\n for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {\n sr.treeScope_.parent = treeScope;\n }\n for (var child = node.firstChild; child; child = child.nextSibling) {\n setTreeScope(child, treeScope);\n }\n }\n }\n\n function getTreeScope(node) {\n if (node instanceof scope.wrappers.Window) {\n debugger;\n }\n\n if (node.treeScope_)\n return node.treeScope_;\n var parent = node.parentNode;\n var treeScope;\n if (parent)\n treeScope = getTreeScope(parent);\n else\n treeScope = new TreeScope(node, null);\n return node.treeScope_ = treeScope;\n }\n\n scope.TreeScope = TreeScope;\n scope.getTreeScope = getTreeScope;\n scope.setTreeScope = setTreeScope;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n var wrappedFuns = new WeakMap();\n var listenersTable = new WeakMap();\n var handledEventsTable = new WeakMap();\n var currentlyDispatchingEvents = new WeakMap();\n var targetTable = new WeakMap();\n var currentTargetTable = new WeakMap();\n var relatedTargetTable = new WeakMap();\n var eventPhaseTable = new WeakMap();\n var stopPropagationTable = new WeakMap();\n var stopImmediatePropagationTable = new WeakMap();\n var eventHandlersTable = new WeakMap();\n var eventPathTable = new WeakMap();\n\n function isShadowRoot(node) {\n return node instanceof wrappers.ShadowRoot;\n }\n\n function rootOfNode(node) {\n return getTreeScope(node).root;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-paths\n function getEventPath(node, event) {\n var path = [];\n var current = node;\n path.push(current);\n while (current) {\n // 4.1.\n var destinationInsertionPoints = getDestinationInsertionPoints(current);\n if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {\n // 4.1.1\n for (var i = 0; i < destinationInsertionPoints.length; i++) {\n var insertionPoint = destinationInsertionPoints[i];\n // 4.1.1.1\n if (isShadowInsertionPoint(insertionPoint)) {\n var shadowRoot = rootOfNode(insertionPoint);\n // 4.1.1.1.2\n var olderShadowRoot = shadowRoot.olderShadowRoot;\n if (olderShadowRoot)\n path.push(olderShadowRoot);\n }\n\n // 4.1.1.2\n path.push(insertionPoint);\n }\n\n // 4.1.2\n current = destinationInsertionPoints[\n destinationInsertionPoints.length - 1];\n\n // 4.2\n } else {\n if (isShadowRoot(current)) {\n if (inSameTree(node, current) && eventMustBeStopped(event)) {\n // Stop this algorithm\n break;\n }\n current = current.host;\n path.push(current);\n\n // 4.2.2\n } else {\n current = current.parentNode;\n if (current)\n path.push(current);\n }\n }\n }\n\n return path;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-events-always-stopped\n function eventMustBeStopped(event) {\n if (!event)\n return false;\n\n switch (event.type) {\n case 'abort':\n case 'error':\n case 'select':\n case 'change':\n case 'load':\n case 'reset':\n case 'resize':\n case 'scroll':\n case 'selectstart':\n return true;\n }\n return false;\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-shadow-insertion-point\n function isShadowInsertionPoint(node) {\n return node instanceof HTMLShadowElement;\n // and make sure that there are no shadow precing this?\n // and that there is no content ancestor?\n }\n\n function getDestinationInsertionPoints(node) {\n return scope.getDestinationInsertionPoints(node);\n }\n\n // http://w3c.github.io/webcomponents/spec/shadow/#event-retargeting\n function eventRetargetting(path, currentTarget) {\n if (path.length === 0)\n return currentTarget;\n\n // The currentTarget might be the window object. Use its document for the\n // purpose of finding the retargetted node.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var originalTarget = path[0];\n var originalTargetTree = getTreeScope(originalTarget);\n var relativeTargetTree =\n lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);\n\n for (var i = 0; i < path.length; i++) {\n var node = path[i];\n if (getTreeScope(node) === relativeTargetTree)\n return node;\n }\n\n return path[path.length - 1];\n }\n\n function getTreeScopeAncestors(treeScope) {\n var ancestors = [];\n for (;treeScope; treeScope = treeScope.parent) {\n ancestors.push(treeScope);\n }\n return ancestors;\n }\n\n function lowestCommonInclusiveAncestor(tsA, tsB) {\n var ancestorsA = getTreeScopeAncestors(tsA);\n var ancestorsB = getTreeScopeAncestors(tsB);\n\n var result = null;\n while (ancestorsA.length > 0 && ancestorsB.length > 0) {\n var a = ancestorsA.pop();\n var b = ancestorsB.pop();\n if (a === b)\n result = a;\n else\n break;\n }\n return result;\n }\n\n function getTreeScopeRoot(ts) {\n if (!ts.parent)\n return ts;\n return getTreeScopeRoot(ts.parent);\n }\n\n function relatedTargetResolution(event, currentTarget, relatedTarget) {\n // In case the current target is a window use its document for the purpose\n // of retargetting the related target.\n if (currentTarget instanceof wrappers.Window)\n currentTarget = currentTarget.document;\n\n var currentTargetTree = getTreeScope(currentTarget);\n var relatedTargetTree = getTreeScope(relatedTarget);\n\n var relatedTargetEventPath = getEventPath(relatedTarget, event);\n\n var lowestCommonAncestorTree;\n\n // 4\n var lowestCommonAncestorTree =\n lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);\n\n // 5\n if (!lowestCommonAncestorTree)\n lowestCommonAncestorTree = relatedTargetTree.root;\n\n // 6\n for (var commonAncestorTree = lowestCommonAncestorTree;\n commonAncestorTree;\n commonAncestorTree = commonAncestorTree.parent) {\n // 6.1\n var adjustedRelatedTarget;\n for (var i = 0; i < relatedTargetEventPath.length; i++) {\n var node = relatedTargetEventPath[i];\n if (getTreeScope(node) === commonAncestorTree)\n return node;\n }\n }\n\n return null;\n }\n\n function inSameTree(a, b) {\n return getTreeScope(a) === getTreeScope(b);\n }\n\n var NONE = 0;\n var CAPTURING_PHASE = 1;\n var AT_TARGET = 2;\n var BUBBLING_PHASE = 3;\n\n // pendingError is used to rethrow the first error we got during an event\n // dispatch. The browser actually reports all errors but to do that we would\n // need to rethrow the error asynchronously.\n var pendingError;\n\n function dispatchOriginalEvent(originalEvent) {\n // Make sure this event is only dispatched once.\n if (handledEventsTable.get(originalEvent))\n return;\n handledEventsTable.set(originalEvent, true);\n dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));\n if (pendingError) {\n var err = pendingError;\n pendingError = null;\n throw err;\n }\n }\n\n function dispatchEvent(event, originalWrapperTarget) {\n if (currentlyDispatchingEvents.get(event))\n throw new Error('InvalidStateError');\n\n currentlyDispatchingEvents.set(event, true);\n\n // Render to ensure that the event path is correct.\n scope.renderAllPending();\n var eventPath;\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#events-and-the-window-object\n // All events dispatched on Nodes with a default view, except load events,\n // should propagate to the Window.\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#the-end\n var overrideTarget;\n var win;\n var type = event.type;\n\n // Should really be not cancelable too but since Firefox has a bug there\n // we skip that check.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=999456\n if (type === 'load' && !event.bubbles) {\n var doc = originalWrapperTarget;\n if (doc instanceof wrappers.Document && (win = doc.defaultView)) {\n overrideTarget = doc;\n eventPath = [];\n }\n }\n\n if (!eventPath) {\n if (originalWrapperTarget instanceof wrappers.Window) {\n win = originalWrapperTarget;\n eventPath = [];\n } else {\n eventPath = getEventPath(originalWrapperTarget, event);\n\n if (event.type !== 'load') {\n var doc = eventPath[eventPath.length - 1];\n if (doc instanceof wrappers.Document)\n win = doc.defaultView;\n }\n }\n }\n\n eventPathTable.set(event, eventPath);\n\n if (dispatchCapturing(event, eventPath, win, overrideTarget)) {\n if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {\n dispatchBubbling(event, eventPath, win, overrideTarget);\n }\n }\n\n eventPhaseTable.set(event, NONE);\n currentTargetTable.delete(event, null);\n currentlyDispatchingEvents.delete(event);\n\n return event.defaultPrevented;\n }\n\n function dispatchCapturing(event, eventPath, win, overrideTarget) {\n var phase = CAPTURING_PHASE;\n\n if (win) {\n if (!invoke(win, event, phase, eventPath, overrideTarget))\n return false;\n }\n\n for (var i = eventPath.length - 1; i > 0; i--) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return false;\n }\n\n return true;\n }\n\n function dispatchAtTarget(event, eventPath, win, overrideTarget) {\n var phase = AT_TARGET;\n var currentTarget = eventPath[0] || win;\n return invoke(currentTarget, event, phase, eventPath, overrideTarget);\n }\n\n function dispatchBubbling(event, eventPath, win, overrideTarget) {\n var phase = BUBBLING_PHASE;\n for (var i = 1; i < eventPath.length; i++) {\n if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget))\n return;\n }\n\n if (win && eventPath.length > 0) {\n invoke(win, event, phase, eventPath, overrideTarget);\n }\n }\n\n function invoke(currentTarget, event, phase, eventPath, overrideTarget) {\n var listeners = listenersTable.get(currentTarget);\n if (!listeners)\n return true;\n\n var target = overrideTarget || eventRetargetting(eventPath, currentTarget);\n\n if (target === currentTarget) {\n if (phase === CAPTURING_PHASE)\n return true;\n\n if (phase === BUBBLING_PHASE)\n phase = AT_TARGET;\n\n } else if (phase === BUBBLING_PHASE && !event.bubbles) {\n return true;\n }\n\n if ('relatedTarget' in event) {\n var originalEvent = unwrap(event);\n var unwrappedRelatedTarget = originalEvent.relatedTarget;\n\n // X-Tag sets relatedTarget on a CustomEvent. If they do that there is no\n // way to have relatedTarget return the adjusted target but worse is that\n // the originalEvent might not have a relatedTarget so we hit an assert\n // when we try to wrap it.\n if (unwrappedRelatedTarget) {\n // In IE we can get objects that are not EventTargets at this point.\n // Safari does not have an EventTarget interface so revert to checking\n // for addEventListener as an approximation.\n if (unwrappedRelatedTarget instanceof Object &&\n unwrappedRelatedTarget.addEventListener) {\n var relatedTarget = wrap(unwrappedRelatedTarget);\n\n var adjusted =\n relatedTargetResolution(event, currentTarget, relatedTarget);\n if (adjusted === target)\n return true;\n } else {\n adjusted = null;\n }\n relatedTargetTable.set(event, adjusted);\n }\n }\n\n eventPhaseTable.set(event, phase);\n var type = event.type;\n\n var anyRemoved = false;\n // targetTable.set(event, target);\n targetTable.set(event, target);\n currentTargetTable.set(event, currentTarget);\n\n // Keep track of the invoke depth so that we only clean up the removed\n // listeners if we are in the outermost invoke.\n listeners.depth++;\n\n for (var i = 0, len = listeners.length; i < len; i++) {\n var listener = listeners[i];\n if (listener.removed) {\n anyRemoved = true;\n continue;\n }\n\n if (listener.type !== type ||\n !listener.capture && phase === CAPTURING_PHASE ||\n listener.capture && phase === BUBBLING_PHASE) {\n continue;\n }\n\n try {\n if (typeof listener.handler === 'function')\n listener.handler.call(currentTarget, event);\n else\n listener.handler.handleEvent(event);\n\n if (stopImmediatePropagationTable.get(event))\n return false;\n\n } catch (ex) {\n if (!pendingError)\n pendingError = ex;\n }\n }\n\n listeners.depth--;\n\n if (anyRemoved && listeners.depth === 0) {\n var copy = listeners.slice();\n listeners.length = 0;\n for (var i = 0; i < copy.length; i++) {\n if (!copy[i].removed)\n listeners.push(copy[i]);\n }\n }\n\n return !stopPropagationTable.get(event);\n }\n\n function Listener(type, handler, capture) {\n this.type = type;\n this.handler = handler;\n this.capture = Boolean(capture);\n }\n Listener.prototype = {\n equals: function(that) {\n return this.handler === that.handler && this.type === that.type &&\n this.capture === that.capture;\n },\n get removed() {\n return this.handler === null;\n },\n remove: function() {\n this.handler = null;\n }\n };\n\n var OriginalEvent = window.Event;\n OriginalEvent.prototype.polymerBlackList_ = {\n returnValue: true,\n // TODO(arv): keyLocation is part of KeyboardEvent but Firefox does not\n // support constructable KeyboardEvent so we keep it here for now.\n keyLocation: true\n };\n\n /**\n * Creates a new Event wrapper or wraps an existin native Event object.\n * @param {string|Event} type\n * @param {Object=} options\n * @constructor\n */\n function Event(type, options) {\n if (type instanceof OriginalEvent) {\n var impl = type;\n if (!OriginalBeforeUnloadEvent && impl.type === 'beforeunload')\n return new BeforeUnloadEvent(impl);\n this.impl = impl;\n } else {\n return wrap(constructEvent(OriginalEvent, 'Event', type, options));\n }\n }\n Event.prototype = {\n get target() {\n return targetTable.get(this);\n },\n get currentTarget() {\n return currentTargetTable.get(this);\n },\n get eventPhase() {\n return eventPhaseTable.get(this);\n },\n get path() {\n var eventPath = eventPathTable.get(this);\n if (!eventPath)\n return [];\n // TODO(arv): Event path should contain window.\n return eventPath.slice();\n },\n stopPropagation: function() {\n stopPropagationTable.set(this, true);\n },\n stopImmediatePropagation: function() {\n stopPropagationTable.set(this, true);\n stopImmediatePropagationTable.set(this, true);\n }\n };\n registerWrapper(OriginalEvent, Event, document.createEvent('Event'));\n\n function unwrapOptions(options) {\n if (!options || !options.relatedTarget)\n return options;\n return Object.create(options, {\n relatedTarget: {value: unwrap(options.relatedTarget)}\n });\n }\n\n function registerGenericEvent(name, SuperEvent, prototype) {\n var OriginalEvent = window[name];\n var GenericEvent = function(type, options) {\n if (type instanceof OriginalEvent)\n this.impl = type;\n else\n return wrap(constructEvent(OriginalEvent, name, type, options));\n };\n GenericEvent.prototype = Object.create(SuperEvent.prototype);\n if (prototype)\n mixin(GenericEvent.prototype, prototype);\n if (OriginalEvent) {\n // - Old versions of Safari fails on new FocusEvent (and others?).\n // - IE does not support event constructors.\n // - createEvent('FocusEvent') throws in Firefox.\n // => Try the best practice solution first and fallback to the old way\n // if needed.\n try {\n registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent('temp'));\n } catch (ex) {\n registerWrapper(OriginalEvent, GenericEvent,\n document.createEvent(name));\n }\n }\n return GenericEvent;\n }\n\n var UIEvent = registerGenericEvent('UIEvent', Event);\n var CustomEvent = registerGenericEvent('CustomEvent', Event);\n\n var relatedTargetProto = {\n get relatedTarget() {\n var relatedTarget = relatedTargetTable.get(this);\n // relatedTarget can be null.\n if (relatedTarget !== undefined)\n return relatedTarget;\n return wrap(unwrap(this).relatedTarget);\n }\n };\n\n function getInitFunction(name, relatedTargetIndex) {\n return function() {\n arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);\n var impl = unwrap(this);\n impl[name].apply(impl, arguments);\n };\n }\n\n var mouseEventProto = mixin({\n initMouseEvent: getInitFunction('initMouseEvent', 14)\n }, relatedTargetProto);\n\n var focusEventProto = mixin({\n initFocusEvent: getInitFunction('initFocusEvent', 5)\n }, relatedTargetProto);\n\n var MouseEvent = registerGenericEvent('MouseEvent', UIEvent, mouseEventProto);\n var FocusEvent = registerGenericEvent('FocusEvent', UIEvent, focusEventProto);\n\n // In case the browser does not support event constructors we polyfill that\n // by calling `createEvent('Foo')` and `initFooEvent` where the arguments to\n // `initFooEvent` are derived from the registered default event init dict.\n var defaultInitDicts = Object.create(null);\n\n var supportsEventConstructors = (function() {\n try {\n new window.FocusEvent('focus');\n } catch (ex) {\n return false;\n }\n return true;\n })();\n\n /**\n * Constructs a new native event.\n */\n function constructEvent(OriginalEvent, name, type, options) {\n if (supportsEventConstructors)\n return new OriginalEvent(type, unwrapOptions(options));\n\n // Create the arguments from the default dictionary.\n var event = unwrap(document.createEvent(name));\n var defaultDict = defaultInitDicts[name];\n var args = [type];\n Object.keys(defaultDict).forEach(function(key) {\n var v = options != null && key in options ?\n options[key] : defaultDict[key];\n if (key === 'relatedTarget')\n v = unwrap(v);\n args.push(v);\n });\n event['init' + name].apply(event, args);\n return event;\n }\n\n if (!supportsEventConstructors) {\n var configureEventConstructor = function(name, initDict, superName) {\n if (superName) {\n var superDict = defaultInitDicts[superName];\n initDict = mixin(mixin({}, superDict), initDict);\n }\n\n defaultInitDicts[name] = initDict;\n };\n\n // The order of the default event init dictionary keys is important, the\n // arguments to initFooEvent is derived from that.\n configureEventConstructor('Event', {bubbles: false, cancelable: false});\n configureEventConstructor('CustomEvent', {detail: null}, 'Event');\n configureEventConstructor('UIEvent', {view: null, detail: 0}, 'Event');\n configureEventConstructor('MouseEvent', {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null\n }, 'UIEvent');\n configureEventConstructor('FocusEvent', {relatedTarget: null}, 'UIEvent');\n }\n\n // Safari 7 does not yet have BeforeUnloadEvent.\n // https://bugs.webkit.org/show_bug.cgi?id=120849\n var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;\n\n function BeforeUnloadEvent(impl) {\n Event.call(this, impl);\n }\n BeforeUnloadEvent.prototype = Object.create(Event.prototype);\n mixin(BeforeUnloadEvent.prototype, {\n get returnValue() {\n return this.impl.returnValue;\n },\n set returnValue(v) {\n this.impl.returnValue = v;\n }\n });\n\n if (OriginalBeforeUnloadEvent)\n registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);\n\n function isValidListener(fun) {\n if (typeof fun === 'function')\n return true;\n return fun && fun.handleEvent;\n }\n\n function isMutationEvent(type) {\n switch (type) {\n case 'DOMAttrModified':\n case 'DOMAttributeNameChanged':\n case 'DOMCharacterDataModified':\n case 'DOMElementNameChanged':\n case 'DOMNodeInserted':\n case 'DOMNodeInsertedIntoDocument':\n case 'DOMNodeRemoved':\n case 'DOMNodeRemovedFromDocument':\n case 'DOMSubtreeModified':\n return true;\n }\n return false;\n }\n\n var OriginalEventTarget = window.EventTarget;\n\n /**\n * This represents a wrapper for an EventTarget.\n * @param {!EventTarget} impl The original event target.\n * @constructor\n */\n function EventTarget(impl) {\n this.impl = impl;\n }\n\n // Node and Window have different internal type checks in WebKit so we cannot\n // use the same method as the original function.\n var methodNames = [\n 'addEventListener',\n 'removeEventListener',\n 'dispatchEvent'\n ];\n\n [Node, Window].forEach(function(constructor) {\n var p = constructor.prototype;\n methodNames.forEach(function(name) {\n Object.defineProperty(p, name + '_', {value: p[name]});\n });\n });\n\n function getTargetToListenAt(wrapper) {\n if (wrapper instanceof wrappers.ShadowRoot)\n wrapper = wrapper.host;\n return unwrap(wrapper);\n }\n\n EventTarget.prototype = {\n addEventListener: function(type, fun, capture) {\n if (!isValidListener(fun) || isMutationEvent(type))\n return;\n\n var listener = new Listener(type, fun, capture);\n var listeners = listenersTable.get(this);\n if (!listeners) {\n listeners = [];\n listeners.depth = 0;\n listenersTable.set(this, listeners);\n } else {\n // Might have a duplicate.\n for (var i = 0; i < listeners.length; i++) {\n if (listener.equals(listeners[i]))\n return;\n }\n }\n\n listeners.push(listener);\n\n var target = getTargetToListenAt(this);\n target.addEventListener_(type, dispatchOriginalEvent, true);\n },\n removeEventListener: function(type, fun, capture) {\n capture = Boolean(capture);\n var listeners = listenersTable.get(this);\n if (!listeners)\n return;\n var count = 0, found = false;\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].type === type && listeners[i].capture === capture) {\n count++;\n if (listeners[i].handler === fun) {\n found = true;\n listeners[i].remove();\n }\n }\n }\n\n if (found && count === 1) {\n var target = getTargetToListenAt(this);\n target.removeEventListener_(type, dispatchOriginalEvent, true);\n }\n },\n dispatchEvent: function(event) {\n // We want to use the native dispatchEvent because it triggers the default\n // actions (like checking a checkbox). However, if there are no listeners\n // in the composed tree then there are no events that will trigger and\n // listeners in the non composed tree that are part of the event path are\n // not notified.\n //\n // If we find out that there are no listeners in the composed tree we add\n // a temporary listener to the target which makes us get called back even\n // in that case.\n\n var nativeEvent = unwrap(event);\n var eventType = nativeEvent.type;\n\n // Allow dispatching the same event again. This is safe because if user\n // code calls this during an existing dispatch of the same event the\n // native dispatchEvent throws (that is required by the spec).\n handledEventsTable.set(nativeEvent, false);\n\n // Force rendering since we prefer native dispatch and that works on the\n // composed tree.\n scope.renderAllPending();\n\n var tempListener;\n if (!hasListenerInAncestors(this, eventType)) {\n tempListener = function() {};\n this.addEventListener(eventType, tempListener, true);\n }\n\n try {\n return unwrap(this).dispatchEvent_(nativeEvent);\n } finally {\n if (tempListener)\n this.removeEventListener(eventType, tempListener, true);\n }\n }\n };\n\n function hasListener(node, type) {\n var listeners = listenersTable.get(node);\n if (listeners) {\n for (var i = 0; i < listeners.length; i++) {\n if (!listeners[i].removed && listeners[i].type === type)\n return true;\n }\n }\n return false;\n }\n\n function hasListenerInAncestors(target, type) {\n for (var node = unwrap(target); node; node = node.parentNode) {\n if (hasListener(wrap(node), type))\n return true;\n }\n return false;\n }\n\n if (OriginalEventTarget)\n registerWrapper(OriginalEventTarget, EventTarget);\n\n function wrapEventTargetMethods(constructors) {\n forwardMethodsToWrapper(constructors, methodNames);\n }\n\n var originalElementFromPoint = document.elementFromPoint;\n\n function elementFromPoint(self, document, x, y) {\n scope.renderAllPending();\n\n var element = wrap(originalElementFromPoint.call(document.impl, x, y));\n if (!element)\n return null;\n var path = getEventPath(element, null);\n\n // scope the path to this TreeScope\n var idx = path.lastIndexOf(self);\n if (idx == -1)\n return null;\n else\n path = path.slice(0, idx);\n\n // TODO(dfreedm): pass idx to eventRetargetting to avoid array copy\n return eventRetargetting(path, self);\n }\n\n /**\n * Returns a function that is to be used as a getter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerGetter(name) {\n return function() {\n var inlineEventHandlers = eventHandlersTable.get(this);\n return inlineEventHandlers && inlineEventHandlers[name] &&\n inlineEventHandlers[name].value || null;\n };\n }\n\n /**\n * Returns a function that is to be used as a setter for `onfoo` properties.\n * @param {string} name\n * @return {Function}\n */\n function getEventHandlerSetter(name) {\n var eventType = name.slice(2);\n return function(value) {\n var inlineEventHandlers = eventHandlersTable.get(this);\n if (!inlineEventHandlers) {\n inlineEventHandlers = Object.create(null);\n eventHandlersTable.set(this, inlineEventHandlers);\n }\n\n var old = inlineEventHandlers[name];\n if (old)\n this.removeEventListener(eventType, old.wrapped, false);\n\n if (typeof value === 'function') {\n var wrapped = function(e) {\n var rv = value.call(this, e);\n if (rv === false)\n e.preventDefault();\n else if (name === 'onbeforeunload' && typeof rv === 'string')\n e.returnValue = rv;\n // mouseover uses true for preventDefault but preventDefault for\n // mouseover is ignored by browsers these day.\n };\n\n this.addEventListener(eventType, wrapped, false);\n inlineEventHandlers[name] = {\n value: value,\n wrapped: wrapped\n };\n }\n };\n }\n\n scope.elementFromPoint = elementFromPoint;\n scope.getEventHandlerGetter = getEventHandlerGetter;\n scope.getEventHandlerSetter = getEventHandlerSetter;\n scope.wrapEventTargetMethods = wrapEventTargetMethods;\n scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;\n scope.wrappers.CustomEvent = CustomEvent;\n scope.wrappers.Event = Event;\n scope.wrappers.EventTarget = EventTarget;\n scope.wrappers.FocusEvent = FocusEvent;\n scope.wrappers.MouseEvent = MouseEvent;\n scope.wrappers.UIEvent = UIEvent;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var UIEvent = scope.wrappers.UIEvent;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n // TouchEvent is WebKit/Blink only.\n var OriginalTouchEvent = window.TouchEvent;\n if (!OriginalTouchEvent)\n return;\n\n var nativeEvent;\n try {\n nativeEvent = document.createEvent('TouchEvent');\n } catch (ex) {\n // In Chrome creating a TouchEvent fails if the feature is not turned on\n // which it isn't on desktop Chrome.\n return;\n }\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function Touch(impl) {\n this.impl = impl;\n }\n\n Touch.prototype = {\n get target() {\n return wrap(this.impl.target);\n }\n };\n\n var descr = {\n configurable: true,\n enumerable: true,\n get: null\n };\n\n [\n 'clientX',\n 'clientY',\n 'screenX',\n 'screenY',\n 'pageX',\n 'pageY',\n 'identifier',\n 'webkitRadiusX',\n 'webkitRadiusY',\n 'webkitRotationAngle',\n 'webkitForce'\n ].forEach(function(name) {\n descr.get = function() {\n return this.impl[name];\n };\n Object.defineProperty(Touch.prototype, name, descr);\n });\n\n function TouchList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n\n TouchList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n\n function wrapTouchList(nativeTouchList) {\n var list = new TouchList();\n for (var i = 0; i < nativeTouchList.length; i++) {\n list[i] = new Touch(nativeTouchList[i]);\n }\n list.length = i;\n return list;\n }\n\n function TouchEvent(impl) {\n UIEvent.call(this, impl);\n }\n\n TouchEvent.prototype = Object.create(UIEvent.prototype);\n\n mixin(TouchEvent.prototype, {\n get touches() {\n return wrapTouchList(unwrap(this).touches);\n },\n\n get targetTouches() {\n return wrapTouchList(unwrap(this).targetTouches);\n },\n\n get changedTouches() {\n return wrapTouchList(unwrap(this).changedTouches);\n },\n\n initTouchEvent: function() {\n // The only way to use this is to reuse the TouchList from an existing\n // TouchEvent. Since this is WebKit/Blink proprietary API we will not\n // implement this until someone screams.\n throw new Error('Not implemented');\n }\n });\n\n registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);\n\n scope.wrappers.Touch = Touch;\n scope.wrappers.TouchEvent = TouchEvent;\n scope.wrappers.TouchList = TouchList;\n\n})(window.ShadowDOMPolyfill);\n\n","// Copyright 2012 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var wrap = scope.wrap;\n\n var nonEnumDescriptor = {enumerable: false};\n\n function nonEnum(obj, prop) {\n Object.defineProperty(obj, prop, nonEnumDescriptor);\n }\n\n function NodeList() {\n this.length = 0;\n nonEnum(this, 'length');\n }\n NodeList.prototype = {\n item: function(index) {\n return this[index];\n }\n };\n nonEnum(NodeList.prototype, 'item');\n\n function wrapNodeList(list) {\n if (list == null)\n return list;\n var wrapperList = new NodeList();\n for (var i = 0, length = list.length; i < length; i++) {\n wrapperList[i] = wrap(list[i]);\n }\n wrapperList.length = length;\n return wrapperList;\n }\n\n function addWrapNodeListMethod(wrapperConstructor, name) {\n wrapperConstructor.prototype[name] = function() {\n return wrapNodeList(this.impl[name].apply(this.impl, arguments));\n };\n }\n\n scope.wrappers.NodeList = NodeList;\n scope.addWrapNodeListMethod = addWrapNodeListMethod;\n scope.wrapNodeList = wrapNodeList;\n\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n // TODO(arv): Implement.\n\n scope.wrapHTMLCollection = scope.wrapNodeList;\n scope.wrappers.HTMLCollection = scope.wrappers.NodeList;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var NodeList = scope.wrappers.NodeList;\n var TreeScope = scope.TreeScope;\n var assert = scope.assert;\n var defineWrapGetter = scope.defineWrapGetter;\n var enqueueMutation = scope.enqueueMutation;\n var getTreeScope = scope.getTreeScope;\n var isWrapper = scope.isWrapper;\n var mixin = scope.mixin;\n var registerTransientObservers = scope.registerTransientObservers;\n var registerWrapper = scope.registerWrapper;\n var setTreeScope = scope.setTreeScope;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n var wrapIfNeeded = scope.wrapIfNeeded;\n var wrappers = scope.wrappers;\n\n function assertIsNodeWrapper(node) {\n assert(node instanceof Node);\n }\n\n function createOneElementNodeList(node) {\n var nodes = new NodeList();\n nodes[0] = node;\n nodes.length = 1;\n return nodes;\n }\n\n var surpressMutations = false;\n\n /**\n * Called before node is inserted into a node to enqueue its removal from its\n * old parent.\n * @param {!Node} node The node that is about to be removed.\n * @param {!Node} parent The parent node that the node is being removed from.\n * @param {!NodeList} nodes The collected nodes.\n */\n function enqueueRemovalForInsertedNodes(node, parent, nodes) {\n enqueueMutation(parent, 'childList', {\n removedNodes: nodes,\n previousSibling: node.previousSibling,\n nextSibling: node.nextSibling\n });\n }\n\n function enqueueRemovalForInsertedDocumentFragment(df, nodes) {\n enqueueMutation(df, 'childList', {\n removedNodes: nodes\n });\n }\n\n /**\n * Collects nodes from a DocumentFragment or a Node for removal followed\n * by an insertion.\n *\n * This updates the internal pointers for node, previousNode and nextNode.\n */\n function collectNodes(node, parentNode, previousNode, nextNode) {\n if (node instanceof DocumentFragment) {\n var nodes = collectNodesForDocumentFragment(node);\n\n // The extra loop is to work around bugs with DocumentFragments in IE.\n surpressMutations = true;\n for (var i = nodes.length - 1; i >= 0; i--) {\n node.removeChild(nodes[i]);\n nodes[i].parentNode_ = parentNode;\n }\n surpressMutations = false;\n\n for (var i = 0; i < nodes.length; i++) {\n nodes[i].previousSibling_ = nodes[i - 1] || previousNode;\n nodes[i].nextSibling_ = nodes[i + 1] || nextNode;\n }\n\n if (previousNode)\n previousNode.nextSibling_ = nodes[0];\n if (nextNode)\n nextNode.previousSibling_ = nodes[nodes.length - 1];\n\n return nodes;\n }\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent) {\n // This will enqueue the mutation record for the removal as needed.\n oldParent.removeChild(node);\n }\n\n node.parentNode_ = parentNode;\n node.previousSibling_ = previousNode;\n node.nextSibling_ = nextNode;\n if (previousNode)\n previousNode.nextSibling_ = node;\n if (nextNode)\n nextNode.previousSibling_ = node;\n\n return nodes;\n }\n\n function collectNodesNative(node) {\n if (node instanceof DocumentFragment)\n return collectNodesForDocumentFragment(node);\n\n var nodes = createOneElementNodeList(node);\n var oldParent = node.parentNode;\n if (oldParent)\n enqueueRemovalForInsertedNodes(node, oldParent, nodes);\n return nodes;\n }\n\n function collectNodesForDocumentFragment(node) {\n var nodes = new NodeList();\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n nodes[i++] = child;\n }\n nodes.length = i;\n enqueueRemovalForInsertedDocumentFragment(node, nodes);\n return nodes;\n }\n\n function snapshotNodeList(nodeList) {\n // NodeLists are not live at the moment so just return the same object.\n return nodeList;\n }\n\n // http://dom.spec.whatwg.org/#node-is-inserted\n function nodeWasAdded(node, treeScope) {\n setTreeScope(node, treeScope);\n node.nodeIsInserted_();\n }\n\n function nodesWereAdded(nodes, parent) {\n var treeScope = getTreeScope(parent);\n for (var i = 0; i < nodes.length; i++) {\n nodeWasAdded(nodes[i], treeScope);\n }\n }\n\n // http://dom.spec.whatwg.org/#node-is-removed\n function nodeWasRemoved(node) {\n setTreeScope(node, new TreeScope(node, null));\n }\n\n function nodesWereRemoved(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n nodeWasRemoved(nodes[i]);\n }\n }\n\n function ensureSameOwnerDocument(parent, child) {\n var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ?\n parent : parent.ownerDocument;\n if (ownerDoc !== child.ownerDocument)\n ownerDoc.adoptNode(child);\n }\n\n function adoptNodesIfNeeded(owner, nodes) {\n if (!nodes.length)\n return;\n\n var ownerDoc = owner.ownerDocument;\n\n // All nodes have the same ownerDocument when we get here.\n if (ownerDoc === nodes[0].ownerDocument)\n return;\n\n for (var i = 0; i < nodes.length; i++) {\n scope.adoptNodeNoRemove(nodes[i], ownerDoc);\n }\n }\n\n function unwrapNodesForInsertion(owner, nodes) {\n adoptNodesIfNeeded(owner, nodes);\n var length = nodes.length;\n\n if (length === 1)\n return unwrap(nodes[0]);\n\n var df = unwrap(owner.ownerDocument.createDocumentFragment());\n for (var i = 0; i < length; i++) {\n df.appendChild(unwrap(nodes[i]));\n }\n return df;\n }\n\n function clearChildNodes(wrapper) {\n if (wrapper.firstChild_ !== undefined) {\n var child = wrapper.firstChild_;\n while (child) {\n var tmp = child;\n child = child.nextSibling_;\n tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;\n }\n }\n wrapper.firstChild_ = wrapper.lastChild_ = undefined;\n }\n\n function removeAllChildNodes(wrapper) {\n if (wrapper.invalidateShadowRenderer()) {\n var childWrapper = wrapper.firstChild;\n while (childWrapper) {\n assert(childWrapper.parentNode === wrapper);\n var nextSibling = childWrapper.nextSibling;\n var childNode = unwrap(childWrapper);\n var parentNode = childNode.parentNode;\n if (parentNode)\n originalRemoveChild.call(parentNode, childNode);\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = null;\n childWrapper = nextSibling;\n }\n wrapper.firstChild_ = wrapper.lastChild_ = null;\n } else {\n var node = unwrap(wrapper);\n var child = node.firstChild;\n var nextSibling;\n while (child) {\n nextSibling = child.nextSibling;\n originalRemoveChild.call(node, child);\n child = nextSibling;\n }\n }\n }\n\n function invalidateParent(node) {\n var p = node.parentNode;\n return p && p.invalidateShadowRenderer();\n }\n\n function cleanupNodes(nodes) {\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n n.parentNode.removeChild(n);\n }\n }\n\n var originalImportNode = document.importNode;\n var originalCloneNode = window.Node.prototype.cloneNode;\n\n function cloneNode(node, deep, opt_doc) {\n var clone;\n if (opt_doc)\n clone = wrap(originalImportNode.call(opt_doc, node.impl, false));\n else\n clone = wrap(originalCloneNode.call(node.impl, false));\n\n if (deep) {\n for (var child = node.firstChild; child; child = child.nextSibling) {\n clone.appendChild(cloneNode(child, true, opt_doc));\n }\n\n if (node instanceof wrappers.HTMLTemplateElement) {\n var cloneContent = clone.content;\n for (var child = node.content.firstChild;\n child;\n child = child.nextSibling) {\n cloneContent.appendChild(cloneNode(child, true, opt_doc));\n }\n }\n }\n // TODO(arv): Some HTML elements also clone other data like value.\n return clone;\n }\n\n function contains(self, child) {\n if (!child || getTreeScope(self) !== getTreeScope(child))\n return false;\n\n for (var node = child; node; node = node.parentNode) {\n if (node === self)\n return true;\n }\n return false;\n }\n\n var OriginalNode = window.Node;\n\n /**\n * This represents a wrapper of a native DOM node.\n * @param {!Node} original The original DOM node, aka, the visual DOM node.\n * @constructor\n * @extends {EventTarget}\n */\n function Node(original) {\n assert(original instanceof OriginalNode);\n\n EventTarget.call(this, original);\n\n // These properties are used to override the visual references with the\n // logical ones. If the value is undefined it means that the logical is the\n // same as the visual.\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.parentNode_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.firstChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.lastChild_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.nextSibling_ = undefined;\n\n /**\n * @type {Node|undefined}\n * @private\n */\n this.previousSibling_ = undefined;\n\n this.treeScope_ = undefined;\n }\n\n var OriginalDocumentFragment = window.DocumentFragment;\n var originalAppendChild = OriginalNode.prototype.appendChild;\n var originalCompareDocumentPosition =\n OriginalNode.prototype.compareDocumentPosition;\n var originalInsertBefore = OriginalNode.prototype.insertBefore;\n var originalRemoveChild = OriginalNode.prototype.removeChild;\n var originalReplaceChild = OriginalNode.prototype.replaceChild;\n\n var isIe = /Trident/.test(navigator.userAgent);\n\n var removeChildOriginalHelper = isIe ?\n function(parent, child) {\n try {\n originalRemoveChild.call(parent, child);\n } catch (ex) {\n if (!(parent instanceof OriginalDocumentFragment))\n throw ex;\n }\n } :\n function(parent, child) {\n originalRemoveChild.call(parent, child);\n };\n\n Node.prototype = Object.create(EventTarget.prototype);\n mixin(Node.prototype, {\n appendChild: function(childWrapper) {\n return this.insertBefore(childWrapper, null);\n },\n\n insertBefore: function(childWrapper, refWrapper) {\n assertIsNodeWrapper(childWrapper);\n\n var refNode;\n if (refWrapper) {\n if (isWrapper(refWrapper)) {\n refNode = unwrap(refWrapper);\n } else {\n refNode = refWrapper;\n refWrapper = wrap(refNode);\n }\n } else {\n refWrapper = null;\n refNode = null;\n }\n\n refWrapper && assert(refWrapper.parentNode === this);\n\n var nodes;\n var previousNode =\n refWrapper ? refWrapper.previousSibling : this.lastChild;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(childWrapper);\n\n if (useNative)\n nodes = collectNodesNative(childWrapper);\n else\n nodes = collectNodes(childWrapper, this, previousNode, refWrapper);\n\n if (useNative) {\n ensureSameOwnerDocument(this, childWrapper);\n clearChildNodes(this);\n originalInsertBefore.call(this.impl, unwrap(childWrapper), refNode);\n } else {\n if (!previousNode)\n this.firstChild_ = nodes[0];\n if (!refWrapper) {\n this.lastChild_ = nodes[nodes.length - 1];\n if (this.firstChild_ === undefined)\n this.firstChild_ = this.firstChild;\n }\n\n var parentNode = refNode ? refNode.parentNode : this.impl;\n\n // insertBefore refWrapper no matter what the parent is?\n if (parentNode) {\n originalInsertBefore.call(parentNode,\n unwrapNodesForInsertion(this, nodes), refNode);\n } else {\n adoptNodesIfNeeded(this, nodes);\n }\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n nextSibling: refWrapper,\n previousSibling: previousNode\n });\n\n nodesWereAdded(nodes, this);\n\n return childWrapper;\n },\n\n removeChild: function(childWrapper) {\n assertIsNodeWrapper(childWrapper);\n if (childWrapper.parentNode !== this) {\n // IE has invalid DOM trees at times.\n var found = false;\n var childNodes = this.childNodes;\n for (var ieChild = this.firstChild; ieChild;\n ieChild = ieChild.nextSibling) {\n if (ieChild === childWrapper) {\n found = true;\n break;\n }\n }\n if (!found) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n }\n\n var childNode = unwrap(childWrapper);\n var childWrapperNextSibling = childWrapper.nextSibling;\n var childWrapperPreviousSibling = childWrapper.previousSibling;\n\n if (this.invalidateShadowRenderer()) {\n // We need to remove the real node from the DOM before updating the\n // pointers. This is so that that mutation event is dispatched before\n // the pointers have changed.\n var thisFirstChild = this.firstChild;\n var thisLastChild = this.lastChild;\n\n var parentNode = childNode.parentNode;\n if (parentNode)\n removeChildOriginalHelper(parentNode, childNode);\n\n if (thisFirstChild === childWrapper)\n this.firstChild_ = childWrapperNextSibling;\n if (thisLastChild === childWrapper)\n this.lastChild_ = childWrapperPreviousSibling;\n if (childWrapperPreviousSibling)\n childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;\n if (childWrapperNextSibling) {\n childWrapperNextSibling.previousSibling_ =\n childWrapperPreviousSibling;\n }\n\n childWrapper.previousSibling_ = childWrapper.nextSibling_ =\n childWrapper.parentNode_ = undefined;\n } else {\n clearChildNodes(this);\n removeChildOriginalHelper(this.impl, childNode);\n }\n\n if (!surpressMutations) {\n enqueueMutation(this, 'childList', {\n removedNodes: createOneElementNodeList(childWrapper),\n nextSibling: childWrapperNextSibling,\n previousSibling: childWrapperPreviousSibling\n });\n }\n\n registerTransientObservers(this, childWrapper);\n\n return childWrapper;\n },\n\n replaceChild: function(newChildWrapper, oldChildWrapper) {\n assertIsNodeWrapper(newChildWrapper);\n\n var oldChildNode;\n if (isWrapper(oldChildWrapper)) {\n oldChildNode = unwrap(oldChildWrapper);\n } else {\n oldChildNode = oldChildWrapper;\n oldChildWrapper = wrap(oldChildNode);\n }\n\n if (oldChildWrapper.parentNode !== this) {\n // TODO(arv): DOMException\n throw new Error('NotFoundError');\n }\n\n var nextNode = oldChildWrapper.nextSibling;\n var previousNode = oldChildWrapper.previousSibling;\n var nodes;\n\n var useNative = !this.invalidateShadowRenderer() &&\n !invalidateParent(newChildWrapper);\n\n if (useNative) {\n nodes = collectNodesNative(newChildWrapper);\n } else {\n if (nextNode === newChildWrapper)\n nextNode = newChildWrapper.nextSibling;\n nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);\n }\n\n if (!useNative) {\n if (this.firstChild === oldChildWrapper)\n this.firstChild_ = nodes[0];\n if (this.lastChild === oldChildWrapper)\n this.lastChild_ = nodes[nodes.length - 1];\n\n oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ =\n oldChildWrapper.parentNode_ = undefined;\n\n // replaceChild no matter what the parent is?\n if (oldChildNode.parentNode) {\n originalReplaceChild.call(\n oldChildNode.parentNode,\n unwrapNodesForInsertion(this, nodes),\n oldChildNode);\n }\n } else {\n ensureSameOwnerDocument(this, newChildWrapper);\n clearChildNodes(this);\n originalReplaceChild.call(this.impl, unwrap(newChildWrapper),\n oldChildNode);\n }\n\n enqueueMutation(this, 'childList', {\n addedNodes: nodes,\n removedNodes: createOneElementNodeList(oldChildWrapper),\n nextSibling: nextNode,\n previousSibling: previousNode\n });\n\n nodeWasRemoved(oldChildWrapper);\n nodesWereAdded(nodes, this);\n\n return oldChildWrapper;\n },\n\n /**\n * Called after a node was inserted. Subclasses override this to invalidate\n * the renderer as needed.\n * @private\n */\n nodeIsInserted_: function() {\n for (var child = this.firstChild; child; child = child.nextSibling) {\n child.nodeIsInserted_();\n }\n },\n\n hasChildNodes: function() {\n return this.firstChild !== null;\n },\n\n /** @type {Node} */\n get parentNode() {\n // If the parentNode has not been overridden, use the original parentNode.\n return this.parentNode_ !== undefined ?\n this.parentNode_ : wrap(this.impl.parentNode);\n },\n\n /** @type {Node} */\n get firstChild() {\n return this.firstChild_ !== undefined ?\n this.firstChild_ : wrap(this.impl.firstChild);\n },\n\n /** @type {Node} */\n get lastChild() {\n return this.lastChild_ !== undefined ?\n this.lastChild_ : wrap(this.impl.lastChild);\n },\n\n /** @type {Node} */\n get nextSibling() {\n return this.nextSibling_ !== undefined ?\n this.nextSibling_ : wrap(this.impl.nextSibling);\n },\n\n /** @type {Node} */\n get previousSibling() {\n return this.previousSibling_ !== undefined ?\n this.previousSibling_ : wrap(this.impl.previousSibling);\n },\n\n get parentElement() {\n var p = this.parentNode;\n while (p && p.nodeType !== Node.ELEMENT_NODE) {\n p = p.parentNode;\n }\n return p;\n },\n\n get textContent() {\n // TODO(arv): This should fallback to this.impl.textContent if there\n // are no shadow trees below or above the context node.\n var s = '';\n for (var child = this.firstChild; child; child = child.nextSibling) {\n if (child.nodeType != Node.COMMENT_NODE) {\n s += child.textContent;\n }\n }\n return s;\n },\n set textContent(textContent) {\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n removeAllChildNodes(this);\n if (textContent !== '') {\n var textNode = this.impl.ownerDocument.createTextNode(textContent);\n this.appendChild(textNode);\n }\n } else {\n clearChildNodes(this);\n this.impl.textContent = textContent;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get childNodes() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstChild; child; child = child.nextSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n cloneNode: function(deep) {\n return cloneNode(this, deep);\n },\n\n contains: function(child) {\n return contains(this, wrapIfNeeded(child));\n },\n\n compareDocumentPosition: function(otherNode) {\n // This only wraps, it therefore only operates on the composed DOM and not\n // the logical DOM.\n return originalCompareDocumentPosition.call(this.impl,\n unwrapIfNeeded(otherNode));\n },\n\n normalize: function() {\n var nodes = snapshotNodeList(this.childNodes);\n var remNodes = [];\n var s = '';\n var modNode;\n\n for (var i = 0, n; i < nodes.length; i++) {\n n = nodes[i];\n if (n.nodeType === Node.TEXT_NODE) {\n if (!modNode && !n.data.length)\n this.removeNode(n);\n else if (!modNode)\n modNode = n;\n else {\n s += n.data;\n remNodes.push(n);\n }\n } else {\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n remNodes = [];\n s = '';\n modNode = null;\n if (n.childNodes.length)\n n.normalize();\n }\n }\n\n // handle case where >1 text nodes are the last children\n if (modNode && remNodes.length) {\n modNode.data += s;\n cleanupNodes(remNodes);\n }\n }\n });\n\n defineWrapGetter(Node, 'ownerDocument');\n\n // We use a DocumentFragment as a base and then delete the properties of\n // DocumentFragment.prototype from the wrapper Node. Since delete makes\n // objects slow in some JS engines we recreate the prototype object.\n registerWrapper(OriginalNode, Node, document.createDocumentFragment());\n delete Node.prototype.querySelector;\n delete Node.prototype.querySelectorAll;\n Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);\n\n scope.cloneNode = cloneNode;\n scope.nodeWasAdded = nodeWasAdded;\n scope.nodeWasRemoved = nodeWasRemoved;\n scope.nodesWereAdded = nodesWereAdded;\n scope.nodesWereRemoved = nodesWereRemoved;\n scope.snapshotNodeList = snapshotNodeList;\n scope.wrappers.Node = Node;\n\n})(window.ShadowDOMPolyfill);\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 'use strict';\n\n var HTMLCollection = scope.wrappers.HTMLCollection;\n var NodeList = scope.wrappers.NodeList;\n var getTreeScope = scope.getTreeScope;\n var wrap = scope.wrap;\n\n var originalDocumentQuerySelector = document.querySelector;\n var originalElementQuerySelector = document.documentElement.querySelector;\n\n var originalDocumentQuerySelectorAll = document.querySelectorAll;\n var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;\n\n var originalDocumentGetElementsByTagName = document.getElementsByTagName;\n var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;\n\n var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;\n var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;\n\n var OriginalElement = window.Element;\n var OriginalDocument = window.HTMLDocument;\n\n function filterNodeList(list, index, result) {\n var wrappedItem = null;\n var root = null;\n for (var i = 0, length = list.length; i < length; i++) {\n wrappedItem = wrap(list[i]);\n if (root = getTreeScope(wrappedItem).root) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n continue;\n }\n }\n result[index++] = wrappedItem;\n }\n \n return index;\n }\n\n function findOne(node, selector) {\n var m, el = node.firstElementChild;\n while (el) {\n if (el.matches(selector))\n return el;\n m = findOne(el, selector);\n if (m)\n return m;\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function matchesSelector(el, selector) {\n return el.matches(selector);\n }\n\n var XHTML_NS = 'http://www.w3.org/1999/xhtml';\n\n function matchesTagName(el, localName, localNameLowerCase) {\n var ln = el.localName;\n return ln === localName ||\n ln === localNameLowerCase && el.namespaceURI === XHTML_NS;\n }\n\n function matchesEveryThing() {\n return true;\n }\n\n function matchesLocalNameOnly(el, ns, localName) {\n return el.localName === localName;\n }\n\n function matchesNameSpace(el, ns) {\n return el.namespaceURI === ns;\n }\n\n function matchesLocalNameNS(el, ns, localName) {\n return el.namespaceURI === ns && el.localName === localName;\n }\n\n function findElements(node, index, result, p, arg0, arg1) {\n var el = node.firstElementChild;\n while (el) {\n if (p(el, arg0, arg1))\n result[index++] = el;\n index = findElements(el, index, result, p, arg0, arg1);\n el = el.nextElementSibling;\n }\n return index;\n }\n\n // find and findAll will only match Simple Selectors,\n // Structural Pseudo Classes are not guarenteed to be correct\n // http://www.w3.org/TR/css3-selectors/#simple-selectors\n\n function querySelectorAllFiltered (p, index, result, selector) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n } else if (target instanceof OriginalElement) {\n list = originalElementQuerySelectorAll.call(target, selector);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentQuerySelectorAll.call(target, selector);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, selector, null);\n }\n\n return filterNodeList(list, index, result);\n }\n\n var SelectorsInterface = {\n querySelector: function(selector) {\n var target = this.impl;\n var wrappedItem;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findOne(this, selector);\n } else if (target instanceof OriginalElement) {\n wrappedItem = wrap(originalElementQuerySelector.call(target, selector));\n } else if (target instanceof OriginalDocument) {\n wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findOne(this, selector);\n }\n\n if (!wrappedItem) {\n // When the original query returns nothing\n // we return nothing (to be consistent with the other wrapped calls)\n return wrappedItem;\n } else if (root = getTreeScope(wrappedItem).root) {\n if (root instanceof scope.wrappers.ShadowRoot) {\n // When the original query returns an element in the ShadowDOM\n // we must do a manual tree traversal\n return findOne(this, selector);\n }\n }\n\n return wrappedItem;\n },\n querySelectorAll: function(selector) {\n var result = new NodeList();\n\n result.length = querySelectorAllFiltered.call(this,\n matchesSelector,\n 0,\n result,\n selector);\n\n return result;\n }\n };\n\n function getElementsByTagNameFiltered (p, index, result, localName, lowercase) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagName.call(target, localName, lowercase);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, localName, lowercase);\n }\n\n return filterNodeList(list, index, result);\n }\n\n function getElementsByTagNameNSFiltered (p, index, result, ns, localName) {\n var target = this.impl;\n var list;\n var root = getTreeScope(this).root;\n if (root instanceof scope.wrappers.ShadowRoot) {\n // We are in the shadow tree and the logical tree is\n // going to be disconnected so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n } else if (target instanceof OriginalElement) {\n list = originalElementGetElementsByTagNameNS.call(target, ns, localName);\n } else if (target instanceof OriginalDocument) {\n list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);\n } else {\n // When we get a ShadowRoot the logical tree is going to be disconnected\n // so we do a manual tree traversal\n return findElements(this, index, result, p, ns, localName);\n }\n\n return filterNodeList(list, index, result);\n }\n\n var GetElementsByInterface = {\n getElementsByTagName: function(localName) {\n var result = new HTMLCollection();\n var match = localName === '*' ? matchesEveryThing : matchesTagName;\n\n result.length = getElementsByTagNameFiltered.call(this, \n match,\n 0, \n result,\n localName,\n localName.toLowerCase());\n\n return result;\n },\n\n getElementsByClassName: function(className) {\n // TODO(arv): Check className?\n return this.querySelectorAll('.' + className);\n },\n\n getElementsByTagNameNS: function(ns, localName) {\n var result = new HTMLCollection();\n var match = null;\n\n if (ns === '*') {\n match = localName === '*' ? matchesEveryThing : matchesLocalNameOnly;\n } else {\n match = localName === '*' ? matchesNameSpace : matchesLocalNameNS;\n }\n \n result.length = getElementsByTagNameNSFiltered.call(this, \n match,\n 0,\n result,\n ns || null,\n localName);\n\n return result;\n }\n };\n\n scope.GetElementsByInterface = GetElementsByInterface;\n scope.SelectorsInterface = SelectorsInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var NodeList = scope.wrappers.NodeList;\n\n function forwardElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.nextSibling;\n }\n return node;\n }\n\n function backwardsElement(node) {\n while (node && node.nodeType !== Node.ELEMENT_NODE) {\n node = node.previousSibling;\n }\n return node;\n }\n\n var ParentNodeInterface = {\n get firstElementChild() {\n return forwardElement(this.firstChild);\n },\n\n get lastElementChild() {\n return backwardsElement(this.lastChild);\n },\n\n get childElementCount() {\n var count = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n count++;\n }\n return count;\n },\n\n get children() {\n var wrapperList = new NodeList();\n var i = 0;\n for (var child = this.firstElementChild;\n child;\n child = child.nextElementSibling) {\n wrapperList[i++] = child;\n }\n wrapperList.length = i;\n return wrapperList;\n },\n\n remove: function() {\n var p = this.parentNode;\n if (p)\n p.removeChild(this);\n }\n };\n\n var ChildNodeInterface = {\n get nextElementSibling() {\n return forwardElement(this.nextSibling);\n },\n\n get previousElementSibling() {\n return backwardsElement(this.previousSibling);\n }\n };\n\n scope.ChildNodeInterface = ChildNodeInterface;\n scope.ParentNodeInterface = ParentNodeInterface;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var Node = scope.wrappers.Node;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalCharacterData = window.CharacterData;\n\n function CharacterData(node) {\n Node.call(this, node);\n }\n CharacterData.prototype = Object.create(Node.prototype);\n mixin(CharacterData.prototype, {\n get textContent() {\n return this.data;\n },\n set textContent(value) {\n this.data = value;\n },\n get data() {\n return this.impl.data;\n },\n set data(value) {\n var oldValue = this.impl.data;\n enqueueMutation(this, 'characterData', {\n oldValue: oldValue\n });\n this.impl.data = value;\n }\n });\n\n mixin(CharacterData.prototype, ChildNodeInterface);\n\n registerWrapper(OriginalCharacterData, CharacterData,\n document.createTextNode(''));\n\n scope.wrappers.CharacterData = CharacterData;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var CharacterData = scope.wrappers.CharacterData;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n function toUInt32(x) {\n return x >>> 0;\n }\n\n var OriginalText = window.Text;\n\n function Text(node) {\n CharacterData.call(this, node);\n }\n Text.prototype = Object.create(CharacterData.prototype);\n mixin(Text.prototype, {\n splitText: function(offset) {\n offset = toUInt32(offset);\n var s = this.data;\n if (offset > s.length)\n throw new Error('IndexSizeError');\n var head = s.slice(0, offset);\n var tail = s.slice(offset);\n this.data = head;\n var newTextNode = this.ownerDocument.createTextNode(tail);\n if (this.parentNode)\n this.parentNode.insertBefore(newTextNode, this.nextSibling);\n return newTextNode;\n }\n });\n\n registerWrapper(OriginalText, Text, document.createTextNode(''));\n\n scope.wrappers.Text = Text;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n function invalidateClass(el) {\n scope.invalidateRendererBasedOnAttribute(el, 'class');\n }\n\n function DOMTokenList(impl, ownerElement) {\n this.impl = impl;\n this.ownerElement_ = ownerElement;\n }\n\n DOMTokenList.prototype = {\n get length() {\n return this.impl.length;\n },\n item: function(index) {\n return this.impl.item(index);\n },\n contains: function(token) {\n return this.impl.contains(token);\n },\n add: function() {\n this.impl.add.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n remove: function() {\n this.impl.remove.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n },\n toggle: function(token) {\n var rv = this.impl.toggle.apply(this.impl, arguments);\n invalidateClass(this.ownerElement_);\n return rv;\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n scope.wrappers.DOMTokenList = DOMTokenList;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var ChildNodeInterface = scope.ChildNodeInterface;\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var DOMTokenList = scope.wrappers.DOMTokenList;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var addWrapNodeListMethod = scope.addWrapNodeListMethod;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrappers = scope.wrappers;\n\n var OriginalElement = window.Element;\n\n var matchesNames = [\n 'matches', // needs to come first.\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'webkitMatchesSelector',\n ].filter(function(name) {\n return OriginalElement.prototype[name];\n });\n\n var matchesName = matchesNames[0];\n\n var originalMatches = OriginalElement.prototype[matchesName];\n\n function invalidateRendererBasedOnAttribute(element, name) {\n // Only invalidate if parent node is a shadow host.\n var p = element.parentNode;\n if (!p || !p.shadowRoot)\n return;\n\n var renderer = scope.getRendererForHost(p);\n if (renderer.dependsOnAttribute(name))\n renderer.invalidate();\n }\n\n function enqueAttributeChange(element, name, oldValue) {\n // This is not fully spec compliant. We should use localName (which might\n // have a different case than name) and the namespace (which requires us\n // to get the Attr object).\n enqueueMutation(element, 'attributes', {\n name: name,\n namespace: null,\n oldValue: oldValue\n });\n }\n\n var classListTable = new WeakMap();\n\n function Element(node) {\n Node.call(this, node);\n }\n Element.prototype = Object.create(Node.prototype);\n mixin(Element.prototype, {\n createShadowRoot: function() {\n var newShadowRoot = new wrappers.ShadowRoot(this);\n this.impl.polymerShadowRoot_ = newShadowRoot;\n\n var renderer = scope.getRendererForHost(this);\n renderer.invalidate();\n\n return newShadowRoot;\n },\n\n get shadowRoot() {\n return this.impl.polymerShadowRoot_ || null;\n },\n\n // getDestinationInsertionPoints added in ShadowRenderer.js\n\n setAttribute: function(name, value) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.setAttribute(name, value);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n removeAttribute: function(name) {\n var oldValue = this.impl.getAttribute(name);\n this.impl.removeAttribute(name);\n enqueAttributeChange(this, name, oldValue);\n invalidateRendererBasedOnAttribute(this, name);\n },\n\n matches: function(selector) {\n return originalMatches.call(this.impl, selector);\n },\n\n get classList() {\n var list = classListTable.get(this);\n if (!list) {\n classListTable.set(this,\n list = new DOMTokenList(unwrap(this).classList, this));\n }\n return list;\n },\n\n get className() {\n return unwrap(this).className;\n },\n\n set className(v) {\n this.setAttribute('class', v);\n },\n\n get id() {\n return unwrap(this).id;\n },\n\n set id(v) {\n this.setAttribute('id', v);\n }\n });\n\n matchesNames.forEach(function(name) {\n if (name !== 'matches') {\n Element.prototype[name] = function(selector) {\n return this.matches(selector);\n };\n }\n });\n\n if (OriginalElement.prototype.webkitCreateShadowRoot) {\n Element.prototype.webkitCreateShadowRoot =\n Element.prototype.createShadowRoot;\n }\n\n mixin(Element.prototype, ChildNodeInterface);\n mixin(Element.prototype, GetElementsByInterface);\n mixin(Element.prototype, ParentNodeInterface);\n mixin(Element.prototype, SelectorsInterface);\n\n registerWrapper(OriginalElement, Element,\n document.createElementNS(null, 'x'));\n\n scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;\n scope.matchesNames = matchesNames;\n scope.wrappers.Element = Element;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var defineGetter = scope.defineGetter;\n var enqueueMutation = scope.enqueueMutation;\n var mixin = scope.mixin;\n var nodesWereAdded = scope.nodesWereAdded;\n var nodesWereRemoved = scope.nodesWereRemoved;\n var registerWrapper = scope.registerWrapper;\n var snapshotNodeList = scope.snapshotNodeList;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrappers = scope.wrappers;\n\n /////////////////////////////////////////////////////////////////////////////\n // innerHTML and outerHTML\n\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#escapingString\n var escapeAttrRegExp = /[&\\u00A0\"]/g;\n var escapeDataRegExp = /[&\\u00A0<>]/g;\n\n function escapeReplace(c) {\n switch (c) {\n case '&':\n return '&';\n case '<':\n return '<';\n case '>':\n return '>';\n case '\"':\n return '"'\n case '\\u00A0':\n return ' ';\n }\n }\n\n function escapeAttr(s) {\n return s.replace(escapeAttrRegExp, escapeReplace);\n }\n\n function escapeData(s) {\n return s.replace(escapeDataRegExp, escapeReplace);\n }\n\n function makeSet(arr) {\n var set = {};\n for (var i = 0; i < arr.length; i++) {\n set[arr[i]] = true;\n }\n return set;\n }\n\n // http://www.whatwg.org/specs/web-apps/current-work/#void-elements\n var voidElements = makeSet([\n 'area',\n 'base',\n 'br',\n 'col',\n 'command',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr'\n ]);\n\n var plaintextParents = makeSet([\n 'style',\n 'script',\n 'xmp',\n 'iframe',\n 'noembed',\n 'noframes',\n 'plaintext',\n 'noscript'\n ]);\n\n function getOuterHTML(node, parentNode) {\n switch (node.nodeType) {\n case Node.ELEMENT_NODE:\n var tagName = node.tagName.toLowerCase();\n var s = '<' + tagName;\n var attrs = node.attributes;\n for (var i = 0, attr; attr = attrs[i]; i++) {\n s += ' ' + attr.name + '=\"' + escapeAttr(attr.value) + '\"';\n }\n s += '>';\n if (voidElements[tagName])\n return s;\n\n return s + getInnerHTML(node) + '</' + tagName + '>';\n\n case Node.TEXT_NODE:\n var data = node.data;\n if (parentNode && plaintextParents[parentNode.localName])\n return data;\n return escapeData(data);\n\n case Node.COMMENT_NODE:\n return '<!--' + node.data + '-->';\n\n default:\n console.error(node);\n throw new Error('not implemented');\n }\n }\n\n function getInnerHTML(node) {\n if (node instanceof wrappers.HTMLTemplateElement)\n node = node.content;\n\n var s = '';\n for (var child = node.firstChild; child; child = child.nextSibling) {\n s += getOuterHTML(child, node);\n }\n return s;\n }\n\n function setInnerHTML(node, value, opt_tagName) {\n var tagName = opt_tagName || 'div';\n node.textContent = '';\n var tempElement = unwrap(node.ownerDocument.createElement(tagName));\n tempElement.innerHTML = value;\n var firstChild;\n while (firstChild = tempElement.firstChild) {\n node.appendChild(wrap(firstChild));\n }\n }\n\n // IE11 does not have MSIE in the user agent string.\n var oldIe = /MSIE/.test(navigator.userAgent);\n\n var OriginalHTMLElement = window.HTMLElement;\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLElement(node) {\n Element.call(this, node);\n }\n HTMLElement.prototype = Object.create(Element.prototype);\n mixin(HTMLElement.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n // IE9 does not handle set innerHTML correctly on plaintextParents. It\n // creates element children. For example\n //\n // scriptElement.innerHTML = '<a>test</a>'\n //\n // Creates a single HTMLAnchorElement child.\n if (oldIe && plaintextParents[this.localName]) {\n this.textContent = value;\n return;\n }\n\n var removedNodes = snapshotNodeList(this.childNodes);\n\n if (this.invalidateShadowRenderer()) {\n if (this instanceof wrappers.HTMLTemplateElement)\n setInnerHTML(this.content, value);\n else\n setInnerHTML(this, value, this.tagName);\n\n // If we have a non native template element we need to handle this\n // manually since setting impl.innerHTML would add the html as direct\n // children and not be moved over to the content fragment.\n } else if (!OriginalHTMLTemplateElement &&\n this instanceof wrappers.HTMLTemplateElement) {\n setInnerHTML(this.content, value);\n } else {\n this.impl.innerHTML = value;\n }\n\n var addedNodes = snapshotNodeList(this.childNodes);\n\n enqueueMutation(this, 'childList', {\n addedNodes: addedNodes,\n removedNodes: removedNodes\n });\n\n nodesWereRemoved(removedNodes);\n nodesWereAdded(addedNodes, this);\n },\n\n get outerHTML() {\n return getOuterHTML(this, this.parentNode);\n },\n set outerHTML(value) {\n var p = this.parentNode;\n if (p) {\n p.invalidateShadowRenderer();\n var df = frag(p, value);\n p.replaceChild(df, this);\n }\n },\n\n insertAdjacentHTML: function(position, text) {\n var contextElement, refNode;\n switch (String(position).toLowerCase()) {\n case 'beforebegin':\n contextElement = this.parentNode;\n refNode = this;\n break;\n case 'afterend':\n contextElement = this.parentNode;\n refNode = this.nextSibling;\n break;\n case 'afterbegin':\n contextElement = this;\n refNode = this.firstChild;\n break;\n case 'beforeend':\n contextElement = this;\n refNode = null;\n break;\n default:\n return;\n }\n\n var df = frag(contextElement, text);\n contextElement.insertBefore(df, refNode);\n },\n\n get hidden() {\n return this.hasAttribute('hidden');\n },\n set hidden(v) {\n if (v) {\n this.setAttribute('hidden', '');\n } else {\n this.removeAttribute('hidden');\n }\n }\n });\n\n function frag(contextElement, html) {\n // TODO(arv): This does not work with SVG and other non HTML elements.\n var p = unwrap(contextElement.cloneNode(false));\n p.innerHTML = html;\n var df = unwrap(document.createDocumentFragment());\n var c;\n while (c = p.firstChild) {\n df.appendChild(c);\n }\n return wrap(df);\n }\n\n function getter(name) {\n return function() {\n scope.renderAllPending();\n return this.impl[name];\n };\n }\n\n function getterRequiresRendering(name) {\n defineGetter(HTMLElement, name, getter(name));\n }\n\n [\n 'clientHeight',\n 'clientLeft',\n 'clientTop',\n 'clientWidth',\n 'offsetHeight',\n 'offsetLeft',\n 'offsetTop',\n 'offsetWidth',\n 'scrollHeight',\n 'scrollWidth',\n ].forEach(getterRequiresRendering);\n\n function getterAndSetterRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n get: getter(name),\n set: function(v) {\n scope.renderAllPending();\n this.impl[name] = v;\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'scrollLeft',\n 'scrollTop',\n ].forEach(getterAndSetterRequiresRendering);\n\n function methodRequiresRendering(name) {\n Object.defineProperty(HTMLElement.prototype, name, {\n value: function() {\n scope.renderAllPending();\n return this.impl[name].apply(this.impl, arguments);\n },\n configurable: true,\n enumerable: true\n });\n }\n\n [\n 'getBoundingClientRect',\n 'getClientRects',\n 'scrollIntoView'\n ].forEach(methodRequiresRendering);\n\n // HTMLElement is abstract so we use a subclass that has no members.\n registerWrapper(OriginalHTMLElement, HTMLElement,\n document.createElement('b'));\n\n scope.wrappers.HTMLElement = HTMLElement;\n\n // TODO: Find a better way to share these two with WrapperShadowRoot.\n scope.getInnerHTML = getInnerHTML;\n scope.setInnerHTML = setInnerHTML\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalHTMLCanvasElement = window.HTMLCanvasElement;\n\n function HTMLCanvasElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLCanvasElement.prototype, {\n getContext: function() {\n var context = this.impl.getContext.apply(this.impl, arguments);\n return context && wrap(context);\n }\n });\n\n registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement,\n document.createElement('canvas'));\n\n scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLContentElement = window.HTMLContentElement;\n\n function HTMLContentElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLContentElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLContentElement.prototype, {\n get select() {\n return this.getAttribute('select');\n },\n set select(value) {\n this.setAttribute('select', value);\n },\n\n setAttribute: function(n, v) {\n HTMLElement.prototype.setAttribute.call(this, n, v);\n if (String(n).toLowerCase() === 'select')\n this.invalidateShadowRenderer(true);\n }\n\n // getDistributedNodes is added in ShadowRenderer\n });\n\n if (OriginalHTMLContentElement)\n registerWrapper(OriginalHTMLContentElement, HTMLContentElement);\n\n scope.wrappers.HTMLContentElement = HTMLContentElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 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 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n\n var OriginalHTMLFormElement = window.HTMLFormElement;\n\n function HTMLFormElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLFormElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLFormElement.prototype, {\n get elements() {\n // Note: technically this should be an HTMLFormControlsCollection, but\n // that inherits from HTMLCollection, so should be good enough. Spec:\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlformcontrolscollection\n return wrapHTMLCollection(unwrap(this).elements);\n }\n });\n\n registerWrapper(OriginalHTMLFormElement, HTMLFormElement,\n document.createElement('form'));\n\n scope.wrappers.HTMLFormElement = HTMLFormElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLImageElement = window.HTMLImageElement;\n\n function HTMLImageElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLImageElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLImageElement, HTMLImageElement,\n document.createElement('img'));\n\n function Image(width, height) {\n if (!(this instanceof Image)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('img'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (width !== undefined)\n node.width = width;\n if (height !== undefined)\n node.height = height;\n }\n\n Image.prototype = HTMLImageElement.prototype;\n\n scope.wrappers.HTMLImageElement = HTMLImageElement;\n scope.wrappers.Image = Image;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var NodeList = scope.wrappers.NodeList;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLShadowElement = window.HTMLShadowElement;\n\n function HTMLShadowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);\n\n // getDistributedNodes is added in ShadowRenderer\n\n if (OriginalHTMLShadowElement)\n registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);\n\n scope.wrappers.HTMLShadowElement = HTMLShadowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var contentTable = new WeakMap();\n var templateContentsOwnerTable = new WeakMap();\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getTemplateContentsOwner(doc) {\n if (!doc.defaultView)\n return doc;\n var d = templateContentsOwnerTable.get(doc);\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n templateContentsOwnerTable.set(doc, d);\n }\n return d;\n }\n\n function extractContent(templateElement) {\n // templateElement is not a wrapper here.\n var doc = getTemplateContentsOwner(templateElement.ownerDocument);\n var df = unwrap(doc.createDocumentFragment());\n var child;\n while (child = templateElement.firstChild) {\n df.appendChild(child);\n }\n return df;\n }\n\n var OriginalHTMLTemplateElement = window.HTMLTemplateElement;\n\n function HTMLTemplateElement(node) {\n HTMLElement.call(this, node);\n if (!OriginalHTMLTemplateElement) {\n var content = extractContent(node);\n contentTable.set(this, wrap(content));\n }\n }\n HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);\n\n mixin(HTMLTemplateElement.prototype, {\n get content() {\n if (OriginalHTMLTemplateElement)\n return wrap(this.impl.content);\n return contentTable.get(this);\n },\n\n // TODO(arv): cloneNode needs to clone content.\n\n });\n\n if (OriginalHTMLTemplateElement)\n registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);\n\n scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLMediaElement = window.HTMLMediaElement;\n\n function HTMLMediaElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);\n\n registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement,\n document.createElement('audio'));\n\n scope.wrappers.HTMLMediaElement = HTMLMediaElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLMediaElement = scope.wrappers.HTMLMediaElement;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var rewrap = scope.rewrap;\n\n var OriginalHTMLAudioElement = window.HTMLAudioElement;\n\n function HTMLAudioElement(node) {\n HTMLMediaElement.call(this, node);\n }\n HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);\n\n registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement,\n document.createElement('audio'));\n\n function Audio(src) {\n if (!(this instanceof Audio)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('audio'));\n HTMLMediaElement.call(this, node);\n rewrap(node, this);\n\n node.setAttribute('preload', 'auto');\n if (src !== undefined)\n node.setAttribute('src', src);\n }\n\n Audio.prototype = HTMLAudioElement.prototype;\n\n scope.wrappers.HTMLAudioElement = HTMLAudioElement;\n scope.wrappers.Audio = Audio;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLOptionElement = window.HTMLOptionElement;\n\n function trimText(s) {\n return s.replace(/\\s+/g, ' ').trim();\n }\n\n function HTMLOptionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLOptionElement.prototype, {\n get text() {\n return trimText(this.textContent);\n },\n set text(value) {\n this.textContent = trimText(String(value));\n },\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement,\n document.createElement('option'));\n\n function Option(text, value, defaultSelected, selected) {\n if (!(this instanceof Option)) {\n throw new TypeError(\n 'DOM object constructor cannot be called as a function.');\n }\n\n var node = unwrap(document.createElement('option'));\n HTMLElement.call(this, node);\n rewrap(node, this);\n\n if (text !== undefined)\n node.text = text;\n if (value !== undefined)\n node.setAttribute('value', value);\n if (defaultSelected === true)\n node.setAttribute('selected', '');\n node.selected = selected === true;\n }\n\n Option.prototype = HTMLOptionElement.prototype;\n\n scope.wrappers.HTMLOptionElement = HTMLOptionElement;\n scope.wrappers.Option = Option;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLSelectElement = window.HTMLSelectElement;\n\n function HTMLSelectElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLSelectElement.prototype, {\n add: function(element, before) {\n if (typeof before === 'object') // also includes null\n before = unwrap(before);\n unwrap(this).add(unwrap(element), before);\n },\n\n remove: function(indexOrNode) {\n // Spec only allows index but implementations allow index or node.\n // remove() is also allowed which is same as remove(undefined)\n if (indexOrNode === undefined) {\n HTMLElement.prototype.remove.call(this);\n return;\n }\n\n if (typeof indexOrNode === 'object')\n indexOrNode = unwrap(indexOrNode);\n\n unwrap(this).remove(indexOrNode);\n },\n\n get form() {\n return wrap(unwrap(this).form);\n }\n });\n\n registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement,\n document.createElement('select'));\n\n scope.wrappers.HTMLSelectElement = HTMLSelectElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n\n var OriginalHTMLTableElement = window.HTMLTableElement;\n\n function HTMLTableElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableElement.prototype, {\n get caption() {\n return wrap(unwrap(this).caption);\n },\n createCaption: function() {\n return wrap(unwrap(this).createCaption());\n },\n\n get tHead() {\n return wrap(unwrap(this).tHead);\n },\n createTHead: function() {\n return wrap(unwrap(this).createTHead());\n },\n\n createTFoot: function() {\n return wrap(unwrap(this).createTFoot());\n },\n get tFoot() {\n return wrap(unwrap(this).tFoot);\n },\n\n get tBodies() {\n return wrapHTMLCollection(unwrap(this).tBodies);\n },\n createTBody: function() {\n return wrap(unwrap(this).createTBody());\n },\n\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableElement, HTMLTableElement,\n document.createElement('table'));\n\n scope.wrappers.HTMLTableElement = HTMLTableElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;\n\n function HTMLTableSectionElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableSectionElement.prototype, {\n get rows() {\n return wrapHTMLCollection(unwrap(this).rows);\n },\n insertRow: function(index) {\n return wrap(unwrap(this).insertRow(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement,\n document.createElement('thead'));\n\n scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;\n})(window.ShadowDOMPolyfill);\n","/*\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrapHTMLCollection = scope.wrapHTMLCollection;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalHTMLTableRowElement = window.HTMLTableRowElement;\n\n function HTMLTableRowElement(node) {\n HTMLElement.call(this, node);\n }\n HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);\n mixin(HTMLTableRowElement.prototype, {\n get cells() {\n return wrapHTMLCollection(unwrap(this).cells);\n },\n\n insertCell: function(index) {\n return wrap(unwrap(this).insertCell(index));\n }\n });\n\n registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement,\n document.createElement('tr'));\n\n scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLElement = scope.wrappers.HTMLElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n\n var OriginalHTMLUnknownElement = window.HTMLUnknownElement;\n\n function HTMLUnknownElement(node) {\n switch (node.localName) {\n case 'content':\n return new HTMLContentElement(node);\n case 'shadow':\n return new HTMLShadowElement(node);\n case 'template':\n return new HTMLTemplateElement(node);\n }\n HTMLElement.call(this, node);\n }\n HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);\n registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);\n scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLElement = scope.wrappers.HTMLElement;\n var registerObject = scope.registerObject;\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var svgTitleElement = document.createElementNS(SVG_NS, 'title');\n var SVGTitleElement = registerObject(svgTitleElement);\n var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;\n\n // IE11 does not have classList for SVG elements. The spec says that classList\n // is an accessor on Element, but IE11 puts classList on HTMLElement, leaving\n // SVGElement without a classList property. We therefore move the accessor for\n // IE11.\n if (!('classList' in svgTitleElement)) {\n var descr = Object.getOwnPropertyDescriptor(Element.prototype, 'classList');\n Object.defineProperty(HTMLElement.prototype, 'classList', descr);\n delete Element.prototype.classList;\n }\n\n scope.wrappers.SVGElement = SVGElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var OriginalSVGUseElement = window.SVGUseElement;\n\n // IE uses SVGElement as parent interface, SVG2 (Blink & Gecko) uses\n // SVGGraphicsElement. Use the <g> element to get the right prototype.\n\n var SVG_NS = 'http://www.w3.org/2000/svg';\n var gWrapper = wrap(document.createElementNS(SVG_NS, 'g'));\n var useElement = document.createElementNS(SVG_NS, 'use');\n var SVGGElement = gWrapper.constructor;\n var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);\n var parentInterface = parentInterfacePrototype.constructor;\n\n function SVGUseElement(impl) {\n parentInterface.call(this, impl);\n }\n\n SVGUseElement.prototype = Object.create(parentInterfacePrototype);\n\n // Firefox does not expose instanceRoot.\n if ('instanceRoot' in useElement) {\n mixin(SVGUseElement.prototype, {\n get instanceRoot() {\n return wrap(unwrap(this).instanceRoot);\n },\n get animatedInstanceRoot() {\n return wrap(unwrap(this).animatedInstanceRoot);\n },\n });\n }\n\n registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);\n\n scope.wrappers.SVGUseElement = SVGUseElement;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var wrap = scope.wrap;\n\n var OriginalSVGElementInstance = window.SVGElementInstance;\n if (!OriginalSVGElementInstance)\n return;\n\n function SVGElementInstance(impl) {\n EventTarget.call(this, impl);\n }\n\n SVGElementInstance.prototype = Object.create(EventTarget.prototype);\n mixin(SVGElementInstance.prototype, {\n /** @type {SVGElement} */\n get correspondingElement() {\n return wrap(this.impl.correspondingElement);\n },\n\n /** @type {SVGUseElement} */\n get correspondingUseElement() {\n return wrap(this.impl.correspondingUseElement);\n },\n\n /** @type {SVGElementInstance} */\n get parentNode() {\n return wrap(this.impl.parentNode);\n },\n\n /** @type {SVGElementInstanceList} */\n get childNodes() {\n throw new Error('Not implemented');\n },\n\n /** @type {SVGElementInstance} */\n get firstChild() {\n return wrap(this.impl.firstChild);\n },\n\n /** @type {SVGElementInstance} */\n get lastChild() {\n return wrap(this.impl.lastChild);\n },\n\n /** @type {SVGElementInstance} */\n get previousSibling() {\n return wrap(this.impl.previousSibling);\n },\n\n /** @type {SVGElementInstance} */\n get nextSibling() {\n return wrap(this.impl.nextSibling);\n }\n });\n\n registerWrapper(OriginalSVGElementInstance, SVGElementInstance);\n\n scope.wrappers.SVGElementInstance = SVGElementInstance;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;\n\n function CanvasRenderingContext2D(impl) {\n this.impl = impl;\n }\n\n mixin(CanvasRenderingContext2D.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n drawImage: function() {\n arguments[0] = unwrapIfNeeded(arguments[0]);\n this.impl.drawImage.apply(this.impl, arguments);\n },\n\n createPattern: function() {\n arguments[0] = unwrap(arguments[0]);\n return this.impl.createPattern.apply(this.impl, arguments);\n }\n });\n\n registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D,\n document.createElement('canvas').getContext('2d'));\n\n scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWebGLRenderingContext = window.WebGLRenderingContext;\n\n // IE10 does not have WebGL.\n if (!OriginalWebGLRenderingContext)\n return;\n\n function WebGLRenderingContext(impl) {\n this.impl = impl;\n }\n\n mixin(WebGLRenderingContext.prototype, {\n get canvas() {\n return wrap(this.impl.canvas);\n },\n\n texImage2D: function() {\n arguments[5] = unwrapIfNeeded(arguments[5]);\n this.impl.texImage2D.apply(this.impl, arguments);\n },\n\n texSubImage2D: function() {\n arguments[6] = unwrapIfNeeded(arguments[6]);\n this.impl.texSubImage2D.apply(this.impl, arguments);\n }\n });\n\n // Blink/WebKit has broken DOM bindings. Usually we would create an instance\n // of the object and pass it into registerWrapper as a \"blueprint\" but\n // creating WebGL contexts is expensive and might fail so we use a dummy\n // object with dummy instance properties for these broken browsers.\n var instanceProperties = /WebKit/.test(navigator.userAgent) ?\n {drawingBufferHeight: null, drawingBufferWidth: null} : {};\n\n registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext,\n instanceProperties);\n\n scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalRange = window.Range;\n\n function Range(impl) {\n this.impl = impl;\n }\n Range.prototype = {\n get startContainer() {\n return wrap(this.impl.startContainer);\n },\n get endContainer() {\n return wrap(this.impl.endContainer);\n },\n get commonAncestorContainer() {\n return wrap(this.impl.commonAncestorContainer);\n },\n setStart: function(refNode,offset) {\n this.impl.setStart(unwrapIfNeeded(refNode), offset);\n },\n setEnd: function(refNode,offset) {\n this.impl.setEnd(unwrapIfNeeded(refNode), offset);\n },\n setStartBefore: function(refNode) {\n this.impl.setStartBefore(unwrapIfNeeded(refNode));\n },\n setStartAfter: function(refNode) {\n this.impl.setStartAfter(unwrapIfNeeded(refNode));\n },\n setEndBefore: function(refNode) {\n this.impl.setEndBefore(unwrapIfNeeded(refNode));\n },\n setEndAfter: function(refNode) {\n this.impl.setEndAfter(unwrapIfNeeded(refNode));\n },\n selectNode: function(refNode) {\n this.impl.selectNode(unwrapIfNeeded(refNode));\n },\n selectNodeContents: function(refNode) {\n this.impl.selectNodeContents(unwrapIfNeeded(refNode));\n },\n compareBoundaryPoints: function(how, sourceRange) {\n return this.impl.compareBoundaryPoints(how, unwrap(sourceRange));\n },\n extractContents: function() {\n return wrap(this.impl.extractContents());\n },\n cloneContents: function() {\n return wrap(this.impl.cloneContents());\n },\n insertNode: function(node) {\n this.impl.insertNode(unwrapIfNeeded(node));\n },\n surroundContents: function(newParent) {\n this.impl.surroundContents(unwrapIfNeeded(newParent));\n },\n cloneRange: function() {\n return wrap(this.impl.cloneRange());\n },\n isPointInRange: function(node, offset) {\n return this.impl.isPointInRange(unwrapIfNeeded(node), offset);\n },\n comparePoint: function(node, offset) {\n return this.impl.comparePoint(unwrapIfNeeded(node), offset);\n },\n intersectsNode: function(node) {\n return this.impl.intersectsNode(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // IE9 does not have createContextualFragment.\n if (OriginalRange.prototype.createContextualFragment) {\n Range.prototype.createContextualFragment = function(html) {\n return wrap(this.impl.createContextualFragment(html));\n };\n }\n\n registerWrapper(window.Range, Range, document.createRange());\n\n scope.wrappers.Range = Range;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var SelectorsInterface = scope.SelectorsInterface;\n var mixin = scope.mixin;\n var registerObject = scope.registerObject;\n\n var DocumentFragment = registerObject(document.createDocumentFragment());\n mixin(DocumentFragment.prototype, ParentNodeInterface);\n mixin(DocumentFragment.prototype, SelectorsInterface);\n mixin(DocumentFragment.prototype, GetElementsByInterface);\n\n var Comment = registerObject(document.createComment(''));\n\n scope.wrappers.Comment = Comment;\n scope.wrappers.DocumentFragment = DocumentFragment;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var DocumentFragment = scope.wrappers.DocumentFragment;\n var TreeScope = scope.TreeScope;\n var elementFromPoint = scope.elementFromPoint;\n var getInnerHTML = scope.getInnerHTML;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var rewrap = scope.rewrap;\n var setInnerHTML = scope.setInnerHTML;\n var unwrap = scope.unwrap;\n\n var shadowHostTable = new WeakMap();\n var nextOlderShadowTreeTable = new WeakMap();\n\n var spaceCharRe = /[ \\t\\n\\r\\f]/;\n\n function ShadowRoot(hostWrapper) {\n var node = unwrap(hostWrapper.impl.ownerDocument.createDocumentFragment());\n DocumentFragment.call(this, node);\n\n // createDocumentFragment associates the node with a wrapper\n // DocumentFragment instance. Override that.\n rewrap(node, this);\n\n var oldShadowRoot = hostWrapper.shadowRoot;\n nextOlderShadowTreeTable.set(this, oldShadowRoot);\n\n this.treeScope_ =\n new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));\n\n shadowHostTable.set(this, hostWrapper);\n }\n ShadowRoot.prototype = Object.create(DocumentFragment.prototype);\n mixin(ShadowRoot.prototype, {\n get innerHTML() {\n return getInnerHTML(this);\n },\n set innerHTML(value) {\n setInnerHTML(this, value);\n this.invalidateShadowRenderer();\n },\n\n get olderShadowRoot() {\n return nextOlderShadowTreeTable.get(this) || null;\n },\n\n get host() {\n return shadowHostTable.get(this) || null;\n },\n\n invalidateShadowRenderer: function() {\n return shadowHostTable.get(this).invalidateShadowRenderer();\n },\n\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this.ownerDocument, x, y);\n },\n\n getElementById: function(id) {\n if (spaceCharRe.test(id))\n return null;\n return this.querySelector('[id=\"' + id + '\"]');\n }\n });\n\n scope.wrappers.ShadowRoot = ShadowRoot;\n\n})(window.ShadowDOMPolyfill);\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 'use strict';\n\n var Element = scope.wrappers.Element;\n var HTMLContentElement = scope.wrappers.HTMLContentElement;\n var HTMLShadowElement = scope.wrappers.HTMLShadowElement;\n var Node = scope.wrappers.Node;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var assert = scope.assert;\n var getTreeScope = scope.getTreeScope;\n var mixin = scope.mixin;\n var oneOf = scope.oneOf;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Up means parentNode\n * Sideways means previous and next sibling.\n * @param {!Node} wrapper\n */\n function updateWrapperUpAndSideways(wrapper) {\n wrapper.previousSibling_ = wrapper.previousSibling;\n wrapper.nextSibling_ = wrapper.nextSibling;\n wrapper.parentNode_ = wrapper.parentNode;\n }\n\n /**\n * Updates the fields of a wrapper to a snapshot of the logical DOM as needed.\n * Down means first and last child\n * @param {!Node} wrapper\n */\n function updateWrapperDown(wrapper) {\n wrapper.firstChild_ = wrapper.firstChild;\n wrapper.lastChild_ = wrapper.lastChild;\n }\n\n function updateAllChildNodes(parentNodeWrapper) {\n assert(parentNodeWrapper instanceof Node);\n for (var childWrapper = parentNodeWrapper.firstChild;\n childWrapper;\n childWrapper = childWrapper.nextSibling) {\n updateWrapperUpAndSideways(childWrapper);\n }\n updateWrapperDown(parentNodeWrapper);\n }\n\n function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {\n var parentNode = unwrap(parentNodeWrapper);\n var newChild = unwrap(newChildWrapper);\n var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;\n\n remove(newChildWrapper);\n updateWrapperUpAndSideways(newChildWrapper);\n\n if (!refChildWrapper) {\n parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;\n if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild)\n parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;\n\n var lastChildWrapper = wrap(parentNode.lastChild);\n if (lastChildWrapper)\n lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;\n } else {\n if (parentNodeWrapper.firstChild === refChildWrapper)\n parentNodeWrapper.firstChild_ = refChildWrapper;\n\n refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;\n }\n\n parentNode.insertBefore(newChild, refChild);\n }\n\n function remove(nodeWrapper) {\n var node = unwrap(nodeWrapper)\n var parentNode = node.parentNode;\n if (!parentNode)\n return;\n\n var parentNodeWrapper = wrap(parentNode);\n updateWrapperUpAndSideways(nodeWrapper);\n\n if (nodeWrapper.previousSibling)\n nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;\n if (nodeWrapper.nextSibling)\n nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;\n\n if (parentNodeWrapper.lastChild === nodeWrapper)\n parentNodeWrapper.lastChild_ = nodeWrapper;\n if (parentNodeWrapper.firstChild === nodeWrapper)\n parentNodeWrapper.firstChild_ = nodeWrapper;\n\n parentNode.removeChild(node);\n }\n\n var distributedNodesTable = new WeakMap();\n var destinationInsertionPointsTable = new WeakMap();\n var rendererForHostTable = new WeakMap();\n\n function resetDistributedNodes(insertionPoint) {\n distributedNodesTable.set(insertionPoint, []);\n }\n\n function getDistributedNodes(insertionPoint) {\n var rv = distributedNodesTable.get(insertionPoint);\n if (!rv)\n distributedNodesTable.set(insertionPoint, rv = []);\n return rv;\n }\n\n function getChildNodesSnapshot(node) {\n var result = [], i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n result[i++] = child;\n }\n return result;\n }\n\n var request = oneOf(window, [\n 'requestAnimationFrame',\n 'mozRequestAnimationFrame',\n 'webkitRequestAnimationFrame',\n 'setTimeout'\n ]);\n\n var pendingDirtyRenderers = [];\n var renderTimer;\n\n function renderAllPending() {\n // TODO(arv): Order these in document order. That way we do not have to\n // render something twice.\n for (var i = 0; i < pendingDirtyRenderers.length; i++) {\n var renderer = pendingDirtyRenderers[i];\n var parentRenderer = renderer.parentRenderer;\n if (parentRenderer && parentRenderer.dirty)\n continue;\n renderer.render();\n }\n\n pendingDirtyRenderers = [];\n }\n\n function handleRequestAnimationFrame() {\n renderTimer = null;\n renderAllPending();\n }\n\n /**\n * Returns existing shadow renderer for a host or creates it if it is needed.\n * @params {!Element} host\n * @return {!ShadowRenderer}\n */\n function getRendererForHost(host) {\n var renderer = rendererForHostTable.get(host);\n if (!renderer) {\n renderer = new ShadowRenderer(host);\n rendererForHostTable.set(host, renderer);\n }\n return renderer;\n }\n\n function getShadowRootAncestor(node) {\n var root = getTreeScope(node).root;\n if (root instanceof ShadowRoot)\n return root;\n return null;\n }\n\n function getRendererForShadowRoot(shadowRoot) {\n return getRendererForHost(shadowRoot.host);\n }\n\n var spliceDiff = new ArraySplice();\n spliceDiff.equals = function(renderNode, rawNode) {\n return unwrap(renderNode.node) === rawNode;\n };\n\n /**\n * RenderNode is used as an in memory \"render tree\". When we render the\n * composed tree we create a tree of RenderNodes, then we diff this against\n * the real DOM tree and make minimal changes as needed.\n */\n function RenderNode(node) {\n this.skip = false;\n this.node = node;\n this.childNodes = [];\n }\n\n RenderNode.prototype = {\n append: function(node) {\n var rv = new RenderNode(node);\n this.childNodes.push(rv);\n return rv;\n },\n\n sync: function(opt_added) {\n if (this.skip)\n return;\n\n var nodeWrapper = this.node;\n // plain array of RenderNodes\n var newChildren = this.childNodes;\n // plain array of real nodes.\n var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));\n var added = opt_added || new WeakMap();\n\n var splices = spliceDiff.calculateSplices(newChildren, oldChildren);\n\n var newIndex = 0, oldIndex = 0;\n var lastIndex = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n for (; lastIndex < splice.index; lastIndex++) {\n oldIndex++;\n newChildren[newIndex++].sync(added);\n }\n\n var removedCount = splice.removed.length;\n for (var j = 0; j < removedCount; j++) {\n var wrapper = wrap(oldChildren[oldIndex++]);\n if (!added.get(wrapper))\n remove(wrapper);\n }\n\n var addedCount = splice.addedCount;\n var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);\n for (var j = 0; j < addedCount; j++) {\n var newChildRenderNode = newChildren[newIndex++];\n var newChildWrapper = newChildRenderNode.node;\n insertBefore(nodeWrapper, newChildWrapper, refNode);\n\n // Keep track of added so that we do not remove the node after it\n // has been added.\n added.set(newChildWrapper, true);\n\n newChildRenderNode.sync(added);\n }\n\n lastIndex += addedCount;\n }\n\n for (var i = lastIndex; i < newChildren.length; i++) {\n newChildren[i].sync(added);\n }\n }\n };\n\n function ShadowRenderer(host) {\n this.host = host;\n this.dirty = false;\n this.invalidateAttributes();\n this.associateNode(host);\n }\n\n ShadowRenderer.prototype = {\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#rendering-shadow-trees\n render: function(opt_renderNode) {\n if (!this.dirty)\n return;\n\n this.invalidateAttributes();\n\n var host = this.host;\n\n this.distribution(host);\n var renderNode = opt_renderNode || new RenderNode(host);\n this.buildRenderTree(renderNode, host);\n\n var topMostRenderer = !opt_renderNode;\n if (topMostRenderer)\n renderNode.sync();\n\n this.dirty = false;\n },\n\n get parentRenderer() {\n return getTreeScope(this.host).renderer;\n },\n\n invalidate: function() {\n if (!this.dirty) {\n this.dirty = true;\n var parentRenderer = this.parentRenderer;\n if (parentRenderer)\n parentRenderer.invalidate();\n pendingDirtyRenderers.push(this);\n if (renderTimer)\n return;\n renderTimer = window[request](handleRequestAnimationFrame, 0);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-algorithms\n distribution: function(root) {\n this.resetAll(root);\n this.distributionResolution(root);\n },\n\n resetAll: function(node) {\n if (isInsertionPoint(node))\n resetDistributedNodes(node);\n else\n resetDestinationInsertionPoints(node);\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.resetAll(child);\n }\n\n if (node.shadowRoot)\n this.resetAll(node.shadowRoot);\n\n if (node.olderShadowRoot)\n this.resetAll(node.olderShadowRoot);\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#distribution-results\n distributionResolution: function(node) {\n if (isShadowHost(node)) {\n var shadowHost = node;\n // 1.1\n var pool = poolPopulation(shadowHost);\n\n var shadowTrees = getShadowTrees(shadowHost);\n\n // 1.2\n for (var i = 0; i < shadowTrees.length; i++) {\n // 1.2.1\n this.poolDistribution(shadowTrees[i], pool);\n }\n\n // 1.3\n for (var i = shadowTrees.length - 1; i >= 0; i--) {\n var shadowTree = shadowTrees[i];\n\n // 1.3.1\n // TODO(arv): We should keep the shadow insertion points on the\n // shadow root (or renderer) so we don't have to search the tree\n // every time.\n var shadow = getShadowInsertionPoint(shadowTree);\n\n // 1.3.2\n if (shadow) {\n\n // 1.3.2.1\n var olderShadowRoot = shadowTree.olderShadowRoot;\n if (olderShadowRoot) {\n // 1.3.2.1.1\n pool = poolPopulation(olderShadowRoot);\n }\n\n // 1.3.2.2\n for (var j = 0; j < pool.length; j++) {\n // 1.3.2.2.1\n destributeNodeInto(pool[j], shadow);\n }\n }\n\n // 1.3.3\n this.distributionResolution(shadowTree);\n }\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.distributionResolution(child);\n }\n },\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-distribution-algorithm\n poolDistribution: function (node, pool) {\n if (node instanceof HTMLShadowElement)\n return;\n\n if (node instanceof HTMLContentElement) {\n var content = node;\n this.updateDependentAttributes(content.getAttribute('select'));\n\n var anyDistributed = false;\n\n // 1.1\n for (var i = 0; i < pool.length; i++) {\n var node = pool[i];\n if (!node)\n continue;\n if (matches(node, content)) {\n destributeNodeInto(node, content);\n pool[i] = undefined;\n anyDistributed = true;\n }\n }\n\n // 1.2\n // Fallback content\n if (!anyDistributed) {\n for (var child = content.firstChild;\n child;\n child = child.nextSibling) {\n destributeNodeInto(child, content);\n }\n }\n\n return;\n }\n\n for (var child = node.firstChild; child; child = child.nextSibling) {\n this.poolDistribution(child, pool);\n }\n },\n\n buildRenderTree: function(renderNode, node) {\n var children = this.compose(node);\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n var childRenderNode = renderNode.append(child);\n this.buildRenderTree(childRenderNode, child);\n }\n\n if (isShadowHost(node)) {\n var renderer = getRendererForHost(node);\n renderer.dirty = false;\n }\n\n },\n\n compose: function(node) {\n var children = [];\n var p = node.shadowRoot || node;\n for (var child = p.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n this.associateNode(p);\n var distributedNodes = getDistributedNodes(child);\n for (var j = 0; j < distributedNodes.length; j++) {\n var distributedNode = distributedNodes[j];\n if (isFinalDestination(child, distributedNode))\n children.push(distributedNode);\n }\n } else {\n children.push(child);\n }\n }\n return children;\n },\n\n /**\n * Invalidates the attributes used to keep track of which attributes may\n * cause the renderer to be invalidated.\n */\n invalidateAttributes: function() {\n this.attributes = Object.create(null);\n },\n\n /**\n * Parses the selector and makes this renderer dependent on the attribute\n * being used in the selector.\n * @param {string} selector\n */\n updateDependentAttributes: function(selector) {\n if (!selector)\n return;\n\n var attributes = this.attributes;\n\n // .class\n if (/\\.\\w+/.test(selector))\n attributes['class'] = true;\n\n // #id\n if (/#\\w+/.test(selector))\n attributes['id'] = true;\n\n selector.replace(/\\[\\s*([^\\s=\\|~\\]]+)/g, function(_, name) {\n attributes[name] = true;\n });\n\n // Pseudo selectors have been removed from the spec.\n },\n\n dependsOnAttribute: function(name) {\n return this.attributes[name];\n },\n\n associateNode: function(node) {\n node.impl.polymerShadowRenderer_ = this;\n }\n };\n\n // http://w3c.github.io/webcomponents/spec/shadow/#dfn-pool-population-algorithm\n function poolPopulation(node) {\n var pool = [];\n for (var child = node.firstChild; child; child = child.nextSibling) {\n if (isInsertionPoint(child)) {\n pool.push.apply(pool, getDistributedNodes(child));\n } else {\n pool.push(child);\n }\n }\n return pool;\n }\n\n function getShadowInsertionPoint(node) {\n if (node instanceof HTMLShadowElement)\n return node;\n if (node instanceof HTMLContentElement)\n return null;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n var res = getShadowInsertionPoint(child);\n if (res)\n return res;\n }\n return null;\n }\n\n function destributeNodeInto(child, insertionPoint) {\n getDistributedNodes(insertionPoint).push(child);\n var points = destinationInsertionPointsTable.get(child);\n if (!points)\n destinationInsertionPointsTable.set(child, [insertionPoint]);\n else\n points.push(insertionPoint);\n }\n\n function getDestinationInsertionPoints(node) {\n return destinationInsertionPointsTable.get(node);\n }\n\n function resetDestinationInsertionPoints(node) {\n // IE11 crashes when delete is used.\n destinationInsertionPointsTable.set(node, undefined);\n }\n\n // AllowedSelectors :\n // TypeSelector\n // *\n // ClassSelector\n // IDSelector\n // AttributeSelector\n var selectorStartCharRe = /^[*.#[a-zA-Z_|]/;\n\n function matches(node, contentElement) {\n var select = contentElement.getAttribute('select');\n if (!select)\n return true;\n\n // Here we know the select attribute is a non empty string.\n select = select.trim();\n if (!select)\n return true;\n\n if (!(node instanceof Element))\n return false;\n\n if (!selectorStartCharRe.test(select))\n return false;\n\n try {\n return node.matches(select);\n } catch (ex) {\n // Invalid selector.\n return false;\n }\n }\n\n function isFinalDestination(insertionPoint, node) {\n var points = getDestinationInsertionPoints(node);\n return points && points[points.length - 1] === insertionPoint;\n }\n\n function isInsertionPoint(node) {\n return node instanceof HTMLContentElement ||\n node instanceof HTMLShadowElement;\n }\n\n function isShadowHost(shadowHost) {\n return shadowHost.shadowRoot;\n }\n\n // Returns the shadow trees as an array, with the youngest tree at the\n // beginning of the array.\n function getShadowTrees(host) {\n var trees = [];\n\n for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {\n trees.push(tree);\n }\n return trees;\n }\n\n function render(host) {\n new ShadowRenderer(host).render();\n };\n\n // Need to rerender shadow host when:\n //\n // - a direct child to the ShadowRoot is added or removed\n // - a direct child to the host is added or removed\n // - a new shadow root is created\n // - a direct child to a content/shadow element is added or removed\n // - a sibling to a content/shadow element is added or removed\n // - content[select] is changed\n // - an attribute in a direct child to a host is modified\n\n /**\n * This gets called when a node was added or removed to it.\n */\n Node.prototype.invalidateShadowRenderer = function(force) {\n var renderer = this.impl.polymerShadowRenderer_;\n if (renderer) {\n renderer.invalidate();\n return true;\n }\n\n return false;\n };\n\n HTMLContentElement.prototype.getDistributedNodes =\n HTMLShadowElement.prototype.getDistributedNodes = function() {\n // TODO(arv): We should only rerender the dirty ancestor renderers (from\n // the root and down).\n renderAllPending();\n return getDistributedNodes(this);\n };\n\n Element.prototype.getDestinationInsertionPoints = function() {\n renderAllPending();\n return getDestinationInsertionPoints(this) || [];\n };\n\n HTMLContentElement.prototype.nodeIsInserted_ =\n HTMLShadowElement.prototype.nodeIsInserted_ = function() {\n // Invalidate old renderer if any.\n this.invalidateShadowRenderer();\n\n var shadowRoot = getShadowRootAncestor(this);\n var renderer;\n if (shadowRoot)\n renderer = getRendererForShadowRoot(shadowRoot);\n this.impl.polymerShadowRenderer_ = renderer;\n if (renderer)\n renderer.invalidate();\n };\n\n scope.getRendererForHost = getRendererForHost;\n scope.getShadowTrees = getShadowTrees;\n scope.renderAllPending = renderAllPending;\n\n scope.getDestinationInsertionPoints = getDestinationInsertionPoints;\n\n // Exposed for testing\n scope.visual = {\n insertBefore: insertBefore,\n remove: remove,\n };\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var HTMLElement = scope.wrappers.HTMLElement;\n var assert = scope.assert;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n\n var elementsWithFormProperty = [\n 'HTMLButtonElement',\n 'HTMLFieldSetElement',\n 'HTMLInputElement',\n 'HTMLKeygenElement',\n 'HTMLLabelElement',\n 'HTMLLegendElement',\n 'HTMLObjectElement',\n // HTMLOptionElement is handled in HTMLOptionElement.js\n 'HTMLOutputElement',\n // HTMLSelectElement is handled in HTMLSelectElement.js\n 'HTMLTextAreaElement',\n ];\n\n function createWrapperConstructor(name) {\n if (!window[name])\n return;\n\n // Ensure we are not overriding an already existing constructor.\n assert(!scope.wrappers[name]);\n\n var GeneratedWrapper = function(node) {\n // At this point all of them extend HTMLElement.\n HTMLElement.call(this, node);\n }\n GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);\n mixin(GeneratedWrapper.prototype, {\n get form() {\n return wrap(unwrap(this).form);\n },\n });\n\n registerWrapper(window[name], GeneratedWrapper,\n document.createElement(name.slice(4, -7)));\n scope.wrappers[name] = GeneratedWrapper;\n }\n\n elementsWithFormProperty.forEach(createWrapperConstructor);\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2014 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalSelection = window.Selection;\n\n function Selection(impl) {\n this.impl = impl;\n }\n Selection.prototype = {\n get anchorNode() {\n return wrap(this.impl.anchorNode);\n },\n get focusNode() {\n return wrap(this.impl.focusNode);\n },\n addRange: function(range) {\n this.impl.addRange(unwrap(range));\n },\n collapse: function(node, index) {\n this.impl.collapse(unwrapIfNeeded(node), index);\n },\n containsNode: function(node, allowPartial) {\n return this.impl.containsNode(unwrapIfNeeded(node), allowPartial);\n },\n extend: function(node, offset) {\n this.impl.extend(unwrapIfNeeded(node), offset);\n },\n getRangeAt: function(index) {\n return wrap(this.impl.getRangeAt(index));\n },\n removeRange: function(range) {\n this.impl.removeRange(unwrap(range));\n },\n selectAllChildren: function(node) {\n this.impl.selectAllChildren(unwrapIfNeeded(node));\n },\n toString: function() {\n return this.impl.toString();\n }\n };\n\n // WebKit extensions. Not implemented.\n // readonly attribute Node baseNode;\n // readonly attribute long baseOffset;\n // readonly attribute Node extentNode;\n // readonly attribute long extentOffset;\n // [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node baseNode,\n // [Default=Undefined] optional long baseOffset,\n // [Default=Undefined] optional Node extentNode,\n // [Default=Undefined] optional long extentOffset);\n // [RaisesException, ImplementedAs=collapse] void setPosition([Default=Undefined] optional Node node,\n // [Default=Undefined] optional long offset);\n\n registerWrapper(window.Selection, Selection, window.getSelection());\n\n scope.wrappers.Selection = Selection;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var GetElementsByInterface = scope.GetElementsByInterface;\n var Node = scope.wrappers.Node;\n var ParentNodeInterface = scope.ParentNodeInterface;\n var Selection = scope.wrappers.Selection;\n var SelectorsInterface = scope.SelectorsInterface;\n var ShadowRoot = scope.wrappers.ShadowRoot;\n var TreeScope = scope.TreeScope;\n var cloneNode = scope.cloneNode;\n var defineWrapGetter = scope.defineWrapGetter;\n var elementFromPoint = scope.elementFromPoint;\n var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;\n var matchesNames = scope.matchesNames;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var rewrap = scope.rewrap;\n var unwrap = scope.unwrap;\n var wrap = scope.wrap;\n var wrapEventTargetMethods = scope.wrapEventTargetMethods;\n var wrapNodeList = scope.wrapNodeList;\n\n var implementationTable = new WeakMap();\n\n function Document(node) {\n Node.call(this, node);\n this.treeScope_ = new TreeScope(this, null);\n }\n Document.prototype = Object.create(Node.prototype);\n\n defineWrapGetter(Document, 'documentElement');\n\n // Conceptually both body and head can be in a shadow but suporting that seems\n // overkill at this point.\n defineWrapGetter(Document, 'body');\n defineWrapGetter(Document, 'head');\n\n // document cannot be overridden so we override a bunch of its methods\n // directly on the instance.\n\n function wrapMethod(name) {\n var original = document[name];\n Document.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n [\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'getElementById'\n ].forEach(wrapMethod);\n\n var originalAdoptNode = document.adoptNode;\n\n function adoptNodeNoRemove(node, doc) {\n originalAdoptNode.call(doc.impl, unwrap(node));\n adoptSubtree(node, doc);\n }\n\n function adoptSubtree(node, doc) {\n if (node.shadowRoot)\n doc.adoptNode(node.shadowRoot);\n if (node instanceof ShadowRoot)\n adoptOlderShadowRoots(node, doc);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n adoptSubtree(child, doc);\n }\n }\n\n function adoptOlderShadowRoots(shadowRoot, doc) {\n var oldShadowRoot = shadowRoot.olderShadowRoot;\n if (oldShadowRoot)\n doc.adoptNode(oldShadowRoot);\n }\n\n var originalGetSelection = document.getSelection;\n\n mixin(Document.prototype, {\n adoptNode: function(node) {\n if (node.parentNode)\n node.parentNode.removeChild(node);\n adoptNodeNoRemove(node, this);\n return node;\n },\n elementFromPoint: function(x, y) {\n return elementFromPoint(this, this, x, y);\n },\n importNode: function(node, deep) {\n return cloneNode(node, deep, this.impl);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n getElementsByName: function(name) {\n return SelectorsInterface.querySelectorAll.call(this,\n '[name=' + JSON.stringify(String(name)) + ']');\n }\n });\n\n if (document.registerElement) {\n var originalRegisterElement = document.registerElement;\n Document.prototype.registerElement = function(tagName, object) {\n var prototype, extendsOption;\n if (object !== undefined) {\n prototype = object.prototype;\n extendsOption = object.extends;\n }\n\n if (!prototype)\n prototype = Object.create(HTMLElement.prototype);\n\n\n // If we already used the object as a prototype for another custom\n // element.\n if (scope.nativePrototypeTable.get(prototype)) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // Find first object on the prototype chain that already have a native\n // prototype. Keep track of all the objects before that so we can create\n // a similar structure for the native case.\n var proto = Object.getPrototypeOf(prototype);\n var nativePrototype;\n var prototypes = [];\n while (proto) {\n nativePrototype = scope.nativePrototypeTable.get(proto);\n if (nativePrototype)\n break;\n prototypes.push(proto);\n proto = Object.getPrototypeOf(proto);\n }\n\n if (!nativePrototype) {\n // TODO(arv): DOMException\n throw new Error('NotSupportedError');\n }\n\n // This works by creating a new prototype object that is empty, but has\n // the native prototype as its proto. The original prototype object\n // passed into register is used as the wrapper prototype.\n\n var newPrototype = Object.create(nativePrototype);\n for (var i = prototypes.length - 1; i >= 0; i--) {\n newPrototype = Object.create(newPrototype);\n }\n\n // Add callbacks if present.\n // Names are taken from:\n // https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/CustomElementConstructorBuilder.cpp&sq=package:chromium&type=cs&l=156\n // and not from the spec since the spec is out of date.\n [\n 'createdCallback',\n 'attachedCallback',\n 'detachedCallback',\n 'attributeChangedCallback',\n ].forEach(function(name) {\n var f = prototype[name];\n if (!f)\n return;\n newPrototype[name] = function() {\n // if this element has been wrapped prior to registration,\n // the wrapper is stale; in this case rewrap\n if (!(wrap(this) instanceof CustomElementConstructor)) {\n rewrap(this);\n }\n f.apply(wrap(this), arguments);\n };\n });\n\n var p = {prototype: newPrototype};\n if (extendsOption)\n p.extends = extendsOption;\n\n function CustomElementConstructor(node) {\n if (!node) {\n if (extendsOption) {\n return document.createElement(extendsOption, tagName);\n } else {\n return document.createElement(tagName);\n }\n }\n this.impl = node;\n }\n CustomElementConstructor.prototype = prototype;\n CustomElementConstructor.prototype.constructor = CustomElementConstructor;\n\n scope.constructorTable.set(newPrototype, CustomElementConstructor);\n scope.nativePrototypeTable.set(prototype, newPrototype);\n\n // registration is synchronous so do it last\n var nativeConstructor = originalRegisterElement.call(unwrap(this),\n tagName, p);\n return CustomElementConstructor;\n };\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'registerElement',\n ]);\n }\n\n // We also override some of the methods on document.body and document.head\n // for convenience.\n forwardMethodsToWrapper([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n window.HTMLHtmlElement,\n ], [\n 'appendChild',\n 'compareDocumentPosition',\n 'contains',\n 'getElementsByClassName',\n 'getElementsByTagName',\n 'getElementsByTagNameNS',\n 'insertBefore',\n 'querySelector',\n 'querySelectorAll',\n 'removeChild',\n 'replaceChild',\n ].concat(matchesNames));\n\n forwardMethodsToWrapper([\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n ], [\n 'adoptNode',\n 'importNode',\n 'contains',\n 'createComment',\n 'createDocumentFragment',\n 'createElement',\n 'createElementNS',\n 'createEvent',\n 'createEventNS',\n 'createRange',\n 'createTextNode',\n 'elementFromPoint',\n 'getElementById',\n 'getElementsByName',\n 'getSelection',\n ]);\n\n mixin(Document.prototype, GetElementsByInterface);\n mixin(Document.prototype, ParentNodeInterface);\n mixin(Document.prototype, SelectorsInterface);\n\n mixin(Document.prototype, {\n get implementation() {\n var implementation = implementationTable.get(this);\n if (implementation)\n return implementation;\n implementation =\n new DOMImplementation(unwrap(this).implementation);\n implementationTable.set(this, implementation);\n return implementation;\n },\n\n get defaultView() {\n return wrap(unwrap(this).defaultView);\n }\n });\n\n registerWrapper(window.Document, Document,\n document.implementation.createHTMLDocument(''));\n\n // Both WebKit and Gecko uses HTMLDocument for document. HTML5/DOM only has\n // one Document interface and IE implements the standard correctly.\n if (window.HTMLDocument)\n registerWrapper(window.HTMLDocument, Document);\n\n wrapEventTargetMethods([\n window.HTMLBodyElement,\n window.HTMLDocument || window.Document, // Gecko adds these to HTMLDocument\n window.HTMLHeadElement,\n ]);\n\n function DOMImplementation(impl) {\n this.impl = impl;\n }\n\n function wrapImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return wrap(original.apply(this.impl, arguments));\n };\n }\n\n function forwardImplMethod(constructor, name) {\n var original = document.implementation[name];\n constructor.prototype[name] = function() {\n return original.apply(this.impl, arguments);\n };\n }\n\n wrapImplMethod(DOMImplementation, 'createDocumentType');\n wrapImplMethod(DOMImplementation, 'createDocument');\n wrapImplMethod(DOMImplementation, 'createHTMLDocument');\n forwardImplMethod(DOMImplementation, 'hasFeature');\n\n registerWrapper(window.DOMImplementation, DOMImplementation);\n\n forwardMethodsToWrapper([\n window.DOMImplementation,\n ], [\n 'createDocumentType',\n 'createDocument',\n 'createHTMLDocument',\n 'hasFeature',\n ]);\n\n scope.adoptNodeNoRemove = adoptNodeNoRemove;\n scope.wrappers.DOMImplementation = DOMImplementation;\n scope.wrappers.Document = Document;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var EventTarget = scope.wrappers.EventTarget;\n var Selection = scope.wrappers.Selection;\n var mixin = scope.mixin;\n var registerWrapper = scope.registerWrapper;\n var renderAllPending = scope.renderAllPending;\n var unwrap = scope.unwrap;\n var unwrapIfNeeded = scope.unwrapIfNeeded;\n var wrap = scope.wrap;\n\n var OriginalWindow = window.Window;\n var originalGetComputedStyle = window.getComputedStyle;\n var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;\n var originalGetSelection = window.getSelection;\n\n function Window(impl) {\n EventTarget.call(this, impl);\n }\n Window.prototype = Object.create(EventTarget.prototype);\n\n OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {\n return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);\n };\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {\n return wrap(this || window).getDefaultComputedStyle(\n unwrapIfNeeded(el), pseudo);\n };\n }\n\n OriginalWindow.prototype.getSelection = function() {\n return wrap(this || window).getSelection();\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window.getComputedStyle;\n delete window.getSelection;\n\n ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(\n function(name) {\n OriginalWindow.prototype[name] = function() {\n var w = wrap(this || window);\n return w[name].apply(w, arguments);\n };\n\n // Work around for https://bugzilla.mozilla.org/show_bug.cgi?id=943065\n delete window[name];\n });\n\n mixin(Window.prototype, {\n getComputedStyle: function(el, pseudo) {\n renderAllPending();\n return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el),\n pseudo);\n },\n getSelection: function() {\n renderAllPending();\n return new Selection(originalGetSelection.call(unwrap(this)));\n },\n\n get document() {\n return wrap(unwrap(this).document);\n }\n });\n\n // Mozilla proprietary extension.\n if (originalGetDefaultComputedStyle) {\n Window.prototype.getDefaultComputedStyle = function(el, pseudo) {\n renderAllPending();\n return originalGetDefaultComputedStyle.call(unwrap(this),\n unwrapIfNeeded(el),pseudo);\n };\n }\n\n registerWrapper(OriginalWindow, Window, window);\n\n scope.wrappers.Window = Window;\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var unwrap = scope.unwrap;\n\n // DataTransfer (Clipboard in old Blink/WebKit) has a single method that\n // requires wrapping. Since it is only a method we do not need a real wrapper,\n // we can just override the method.\n\n var OriginalDataTransfer = window.DataTransfer || window.Clipboard;\n var OriginalDataTransferSetDragImage =\n OriginalDataTransfer.prototype.setDragImage;\n\n if (OriginalDataTransferSetDragImage) {\n OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {\n OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);\n };\n }\n\n})(window.ShadowDOMPolyfill);\n","/**\n * Copyright 2014 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n 'use strict';\n\n var registerWrapper = scope.registerWrapper;\n var unwrap = scope.unwrap;\n\n var OriginalFormData = window.FormData;\n\n function FormData(formElement) {\n if (formElement instanceof OriginalFormData)\n this.impl = formElement;\n else\n this.impl = new OriginalFormData(formElement && unwrap(formElement));\n }\n\n registerWrapper(OriginalFormData, FormData, new OriginalFormData());\n\n scope.wrappers.FormData = FormData;\n\n})(window.ShadowDOMPolyfill);\n","// Copyright 2013 The Polymer Authors. All rights reserved.\n// Use of this source code is goverened by a BSD-style\n// license that can be found in the LICENSE file.\n\n(function(scope) {\n 'use strict';\n\n var isWrapperFor = scope.isWrapperFor;\n\n // This is a list of the elements we currently override the global constructor\n // for.\n var elements = {\n 'a': 'HTMLAnchorElement',\n // Do not create an applet element by default since it shows a warning in\n // IE.\n // https://github.com/Polymer/polymer/issues/217\n // 'applet': 'HTMLAppletElement',\n 'area': 'HTMLAreaElement',\n 'audio': 'HTMLAudioElement',\n 'base': 'HTMLBaseElement',\n 'body': 'HTMLBodyElement',\n 'br': 'HTMLBRElement',\n 'button': 'HTMLButtonElement',\n 'canvas': 'HTMLCanvasElement',\n 'caption': 'HTMLTableCaptionElement',\n 'col': 'HTMLTableColElement',\n // 'command': 'HTMLCommandElement', // Not fully implemented in Gecko.\n 'content': 'HTMLContentElement',\n 'data': 'HTMLDataElement',\n 'datalist': 'HTMLDataListElement',\n 'del': 'HTMLModElement',\n 'dir': 'HTMLDirectoryElement',\n 'div': 'HTMLDivElement',\n 'dl': 'HTMLDListElement',\n 'embed': 'HTMLEmbedElement',\n 'fieldset': 'HTMLFieldSetElement',\n 'font': 'HTMLFontElement',\n 'form': 'HTMLFormElement',\n 'frame': 'HTMLFrameElement',\n 'frameset': 'HTMLFrameSetElement',\n 'h1': 'HTMLHeadingElement',\n 'head': 'HTMLHeadElement',\n 'hr': 'HTMLHRElement',\n 'html': 'HTMLHtmlElement',\n 'iframe': 'HTMLIFrameElement',\n 'img': 'HTMLImageElement',\n 'input': 'HTMLInputElement',\n 'keygen': 'HTMLKeygenElement',\n 'label': 'HTMLLabelElement',\n 'legend': 'HTMLLegendElement',\n 'li': 'HTMLLIElement',\n 'link': 'HTMLLinkElement',\n 'map': 'HTMLMapElement',\n 'marquee': 'HTMLMarqueeElement',\n 'menu': 'HTMLMenuElement',\n 'menuitem': 'HTMLMenuItemElement',\n 'meta': 'HTMLMetaElement',\n 'meter': 'HTMLMeterElement',\n 'object': 'HTMLObjectElement',\n 'ol': 'HTMLOListElement',\n 'optgroup': 'HTMLOptGroupElement',\n 'option': 'HTMLOptionElement',\n 'output': 'HTMLOutputElement',\n 'p': 'HTMLParagraphElement',\n 'param': 'HTMLParamElement',\n 'pre': 'HTMLPreElement',\n 'progress': 'HTMLProgressElement',\n 'q': 'HTMLQuoteElement',\n 'script': 'HTMLScriptElement',\n 'select': 'HTMLSelectElement',\n 'shadow': 'HTMLShadowElement',\n 'source': 'HTMLSourceElement',\n 'span': 'HTMLSpanElement',\n 'style': 'HTMLStyleElement',\n 'table': 'HTMLTableElement',\n 'tbody': 'HTMLTableSectionElement',\n // WebKit and Moz are wrong:\n // https://bugs.webkit.org/show_bug.cgi?id=111469\n // https://bugzilla.mozilla.org/show_bug.cgi?id=848096\n // 'td': 'HTMLTableCellElement',\n 'template': 'HTMLTemplateElement',\n 'textarea': 'HTMLTextAreaElement',\n 'thead': 'HTMLTableSectionElement',\n 'time': 'HTMLTimeElement',\n 'title': 'HTMLTitleElement',\n 'tr': 'HTMLTableRowElement',\n 'track': 'HTMLTrackElement',\n 'ul': 'HTMLUListElement',\n 'video': 'HTMLVideoElement',\n };\n\n function overrideConstructor(tagName) {\n var nativeConstructorName = elements[tagName];\n var nativeConstructor = window[nativeConstructorName];\n if (!nativeConstructor)\n return;\n var element = document.createElement(tagName);\n var wrapperConstructor = element.constructor;\n window[nativeConstructorName] = wrapperConstructor;\n }\n\n Object.keys(elements).forEach(overrideConstructor);\n\n Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {\n window[name] = scope.wrappers[name]\n });\n\n})(window.ShadowDOMPolyfill);\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://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(function(scope) {\n\n // convenient global\n window.wrap = ShadowDOMPolyfill.wrapIfNeeded;\n window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;\n\n // users may want to customize other types\n // TODO(sjmiles): 'button' is now supported by ShadowDOMPolyfill, but\n // I've left this code here in case we need to temporarily patch another\n // type\n /*\n (function() {\n var elts = {HTMLButtonElement: 'button'};\n for (var c in elts) {\n window[c] = function() { throw 'Patched Constructor'; };\n window[c].prototype = Object.getPrototypeOf(\n document.createElement(elts[c]));\n }\n })();\n */\n\n // patch in prefixed name\n Object.defineProperty(Element.prototype, 'webkitShadowRoot',\n Object.getOwnPropertyDescriptor(Element.prototype, 'shadowRoot'));\n\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n\n Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;\n\n function queryShadow(node, selector) {\n var m, el = node.firstElementChild;\n var shadows, sr, i;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for(i = shadows.length - 1; i >= 0; i--) {\n m = shadows[i].querySelector(selector);\n if (m) {\n return m;\n }\n }\n while(el) {\n m = queryShadow(el, selector);\n if (m) {\n return m;\n }\n el = el.nextElementSibling;\n }\n return null;\n }\n\n function queryAllShadows(node, selector, results) {\n var el = node.firstElementChild;\n var temp, sr, shadows, i, j;\n shadows = [];\n sr = node.shadowRoot;\n while(sr) {\n shadows.push(sr);\n sr = sr.olderShadowRoot;\n }\n for (i = shadows.length - 1; i >= 0; i--) {\n temp = shadows[i].querySelectorAll(selector);\n for(j = 0; j < temp.length; j++) {\n results.push(temp[j]);\n }\n }\n while (el) {\n queryAllShadows(el, selector, results);\n el = el.nextElementSibling;\n }\n return results;\n }\n\n scope.queryAllShadows = function(node, selector, all) {\n if (all) {\n return queryAllShadows(node, selector, []);\n } else {\n return queryShadow(node, selector);\n }\n };\n})(window.Platform);\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://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/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n \n The intention here is to support only the styling features which can be \n relatively simply implemented. The goal is to allow users to avoid the \n most obvious pitfalls and do so without compromising performance significantly. \n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are \n reformatted and prefixed with a given scope name and promoted to a \n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n \n :host {\n background: red;\n }\n }\n \n becomes:\n \n .foo {\n background: red;\n }\n \n * encapsultion: Styles defined within ShadowDOM, apply only to \n dom inside the ShadowDOM. Polymer uses one of two techniques to imlement\n this feature.\n \n By default, rules are prefixed with the host element tag name \n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n \n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n \n becomes:\n\n\n Alternatively, if Platform.ShadowCSS.strictStyling is set to true then \n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element \n in the element's ShadowDOM template is also given the scope attribute. \n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n \n div {\n font-weight: bold;\n }\n \n becomes:\n \n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that \n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n \n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n \n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an \n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n \n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n \n could become:\n \n <style>\n / *@polyfill .content-container div * / \n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n \n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector \n in comments in lieu of the next selector when running under polyfill.\n*/\n(function(scope) {\n\nvar ShadowCSS = {\n strictStyling: false,\n registry: {},\n // Shim styles for a given root associated with a name and extendsName\n // 1. cache root styles by name\n // 2. optionally tag root nodes with scope name\n // 3. shim polyfill directives /* @polyfill */ and /* @polyfill-rule */\n // 4. shim :host and scoping\n shimStyling: function(root, name, extendsName) {\n var scopeStyles = this.prepareRoot(root, name, extendsName);\n var typeExtension = this.isTypeExtension(extendsName);\n var scopeSelector = this.makeScopeSelector(name, typeExtension);\n // use caching to make working with styles nodes easier and to facilitate\n // lookup of extendee\n var cssText = stylesToCssText(scopeStyles, true);\n cssText = this.scopeCssText(cssText, scopeSelector);\n // cache shimmed css on root for user extensibility\n if (root) {\n root.shimmedStyle = cssText;\n }\n // add style to document\n this.addCssToDocument(cssText, name);\n },\n /*\n * Shim a style element with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimStyle: function(style, selector) {\n return this.shimCssText(style.textContent, selector);\n },\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via Platform.ShadowCSS.addCssToDocument(css).\n */\n shimCssText: function(cssText, selector) {\n cssText = this.insertDirectives(cssText);\n return this.scopeCssText(cssText, selector);\n },\n makeScopeSelector: function(name, typeExtension) {\n if (name) {\n return typeExtension ? '[is=' + name + ']' : name;\n }\n return '';\n },\n isTypeExtension: function(extendsName) {\n return extendsName && extendsName.indexOf('-') < 0;\n },\n prepareRoot: function(root, name, extendsName) {\n var def = this.registerRoot(root, name, extendsName);\n this.replaceTextInStyles(def.rootStyles, this.insertDirectives);\n // remove existing style elements\n this.removeStyles(root, def.rootStyles);\n // apply strict attr\n if (this.strictStyling) {\n this.applyScopeToContent(root, name);\n }\n return def.scopeStyles;\n },\n removeStyles: function(root, styles) {\n for (var i=0, l=styles.length, s; (i<l) && (s=styles[i]); i++) {\n s.parentNode.removeChild(s);\n }\n },\n registerRoot: function(root, name, extendsName) {\n var def = this.registry[name] = {\n root: root,\n name: name,\n extendsName: extendsName\n }\n var styles = this.findStyles(root);\n def.rootStyles = styles;\n def.scopeStyles = def.rootStyles;\n var extendee = this.registry[def.extendsName];\n if (extendee) {\n def.scopeStyles = extendee.scopeStyles.concat(def.scopeStyles);\n }\n return def;\n },\n findStyles: function(root) {\n if (!root) {\n return [];\n }\n var styles = root.querySelectorAll('style');\n return Array.prototype.filter.call(styles, function(s) {\n return !s.hasAttribute(NO_SHIM_ATTRIBUTE);\n });\n },\n applyScopeToContent: function(root, name) {\n if (root) {\n // add the name attribute to each node in root.\n Array.prototype.forEach.call(root.querySelectorAll('*'),\n function(node) {\n node.setAttribute(name, '');\n });\n // and template contents too\n Array.prototype.forEach.call(root.querySelectorAll('template'),\n function(template) {\n this.applyScopeToContent(template.content, name);\n },\n this);\n }\n },\n insertDirectives: function(cssText) {\n cssText = this.insertPolyfillDirectivesInCssText(cssText);\n return this.insertPolyfillRulesInCssText(cssText);\n },\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n * \n * For example, we convert this rule:\n * \n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n * \n * to this:\n * \n * scopeName menu-item {\n *\n **/\n insertPolyfillDirectivesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentNextSelectorRe, function(match, p1) {\n // remove end comment delimiter and add block start\n return p1.slice(0, -2) + '{';\n });\n return cssText.replace(cssContentNextSelectorRe, function(match, p1) {\n return p1 + ' {';\n });\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * \n * For example, we convert this rule:\n * \n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n * \n * to this:\n * \n * scopeName menu-item {...}\n *\n **/\n insertPolyfillRulesInCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n cssText = cssText.replace(cssCommentRuleRe, function(match, p1) {\n // remove end comment delimiter\n return p1.slice(0, -1);\n });\n return cssText.replace(cssContentRuleRe, function(match, p1, p2, p3) {\n var rule = match.replace(p1, '').replace(p2, '');\n return p3 + rule;\n });\n },\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n * \n * .foo {... } \n * \n * and converts this to\n * \n * scopeName .foo { ... }\n */\n scopeCssText: function(cssText, scopeSelector) {\n var unscoped = this.extractUnscopedRulesFromCssText(cssText);\n cssText = this.insertPolyfillHostInCssText(cssText);\n cssText = this.convertColonHost(cssText);\n cssText = this.convertColonHostContext(cssText);\n cssText = this.convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n var self = this, cssText;\n withCssRules(cssText, function(rules) {\n cssText = self.scopeRules(rules, scopeSelector);\n });\n\n }\n cssText = cssText + '\\n' + unscoped;\n return cssText.trim();\n },\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare \n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n * \n * (comment start) @polyfill-unscoped-rule menu-item { \n * ... } (comment end)\n * \n * to this:\n * \n * menu-item {...}\n *\n **/\n extractUnscopedRulesFromCssText: function(cssText) {\n // TODO(sorvell): remove either content or comment\n var r = '', m;\n while (m = cssCommentUnscopedRuleRe.exec(cssText)) {\n r += m[1].slice(0, -1) + '\\n\\n';\n }\n while (m = cssContentUnscopedRuleRe.exec(cssText)) {\n r += m[0].replace(m[2], '').replace(m[1], m[3]) + '\\n\\n';\n }\n return r;\n },\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar\n */\n convertColonHost: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostRe,\n this.colonHostPartReplacer);\n },\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * scopeName.foo > .bar, .foo scopeName > .bar { }\n * \n * and\n *\n * :host-context(.foo:host) .bar { ... }\n * \n * to\n * \n * scopeName.foo .bar { ... }\n */\n convertColonHostContext: function(cssText) {\n return this.convertColonRule(cssText, cssColonHostContextRe,\n this.colonHostContextPartReplacer);\n },\n convertColonRule: function(cssText, regExp, partReplacer) {\n // p1 = :host, p2 = contents of (), p3 rest of rule\n return cssText.replace(regExp, function(m, p1, p2, p3) {\n p1 = polyfillHostNoCombinator;\n if (p2) {\n var parts = p2.split(','), r = [];\n for (var i=0, l=parts.length, p; (i<l) && (p=parts[i]); i++) {\n p = p.trim();\n r.push(partReplacer(p1, p, p3));\n }\n return r.join(',');\n } else {\n return p1 + p3;\n }\n });\n },\n colonHostContextPartReplacer: function(host, part, suffix) {\n if (part.match(polyfillHost)) {\n return this.colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n },\n colonHostPartReplacer: function(host, part, suffix) {\n return host + part.replace(polyfillHost, '') + suffix;\n },\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n convertShadowDOMSelectors: function(cssText) {\n for (var i=0; i < shadowDOMSelectorsRe.length; i++) {\n cssText = cssText.replace(shadowDOMSelectorsRe[i], ' ');\n }\n return cssText;\n },\n // change a selector like 'div' to 'name div'\n scopeRules: function(cssRules, scopeSelector) {\n var cssText = '';\n if (cssRules) {\n Array.prototype.forEach.call(cssRules, function(rule) {\n if (rule.selectorText && (rule.style && rule.style.cssText !== undefined)) {\n cssText += this.scopeSelector(rule.selectorText, scopeSelector, \n this.strictStyling) + ' {\\n\\t';\n cssText += this.propertiesFromRule(rule) + '\\n}\\n\\n';\n } else if (rule.type === CSSRule.MEDIA_RULE) {\n cssText += '@media ' + rule.media.mediaText + ' {\\n';\n cssText += this.scopeRules(rule.cssRules, scopeSelector);\n cssText += '\\n}\\n\\n';\n } else {\n // TODO(sjmiles): KEYFRAMES_RULE in IE11 throws when we query cssText\n // 'cssText' in rule returns true, but rule.cssText throws anyway\n // We can test the rule type, e.g.\n // else if (rule.type !== CSSRule.KEYFRAMES_RULE && rule.cssText) {\n // but this will prevent cssText propagation in other browsers which\n // support it.\n // KEYFRAMES_RULE has a CSSRuleSet, so the text can probably be reconstructed\n // from that collection; this would be a proper fix.\n // For now, I'm trapping the exception so IE11 is unblocked in other areas.\n try {\n if (rule.cssText) {\n cssText += rule.cssText + '\\n\\n';\n }\n } catch(x) {\n // squelch\n }\n }\n }, this);\n }\n return cssText;\n },\n scopeSelector: function(selector, scopeSelector, strict) {\n var r = [], parts = selector.split(',');\n parts.forEach(function(p) {\n p = p.trim();\n if (this.selectorNeedsScoping(p, scopeSelector)) {\n p = (strict && !p.match(polyfillHostNoCombinator)) ? \n this.applyStrictSelectorScope(p, scopeSelector) :\n this.applySelectorScope(p, scopeSelector);\n }\n r.push(p);\n }, this);\n return r.join(', ');\n },\n selectorNeedsScoping: function(selector, scopeSelector) {\n if (Array.isArray(scopeSelector)) {\n return true;\n }\n var re = this.makeScopeMatcher(scopeSelector);\n return !selector.match(re);\n },\n makeScopeMatcher: function(scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[/g, '\\\\[').replace(/\\[/g, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + selectorReSuffix, 'm');\n },\n applySelectorScope: function(selector, selectorScope) {\n return Array.isArray(selectorScope) ?\n this.applySelectorScopeList(selector, selectorScope) :\n this.applySimpleSelectorScope(selector, selectorScope);\n },\n // apply an array of selectors\n applySelectorScopeList: function(selector, scopeSelectorList) {\n var r = [];\n for (var i=0, s; (s=scopeSelectorList[i]); i++) {\n r.push(this.applySimpleSelectorScope(selector, s));\n }\n return r.join(', ');\n },\n // scope via name and [is=name]\n applySimpleSelectorScope: function(selector, scopeSelector) {\n if (selector.match(polyfillHostRe)) {\n selector = selector.replace(polyfillHostNoCombinator, scopeSelector);\n return selector.replace(polyfillHostRe, scopeSelector + ' ');\n } else {\n return scopeSelector + ' ' + selector;\n }\n },\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name]\n applyStrictSelectorScope: function(selector, scopeSelector) {\n scopeSelector = scopeSelector.replace(/\\[is=([^\\]]*)\\]/g, '$1');\n var splits = [' ', '>', '+', '~'],\n scoped = selector,\n attrName = '[' + scopeSelector + ']';\n splits.forEach(function(sep) {\n var parts = scoped.split(sep);\n scoped = parts.map(function(p) {\n // remove :host since it should be unnecessary\n var t = p.trim().replace(polyfillHostRe, '');\n if (t && (splits.indexOf(t) < 0) && (t.indexOf(attrName) < 0)) {\n p = t.replace(/([^:]*)(:*)(.*)/, '$1' + attrName + '$2$3')\n }\n return p;\n }).join(sep);\n });\n return scoped;\n },\n insertPolyfillHostInCssText: function(selector) {\n return selector.replace(colonHostContextRe, polyfillHostContext).replace(\n colonHostRe, polyfillHost);\n },\n propertiesFromRule: function(rule) {\n var cssText = rule.style.cssText;\n // TODO(sorvell): Safari cssom incorrectly removes quotes from the content\n // property. (https://bugs.webkit.org/show_bug.cgi?id=118045)\n // don't replace attr rules\n if (rule.style.content && !rule.style.content.match(/['\"]+|attr/)) {\n cssText = cssText.replace(/content:[^;]*;/g, 'content: \\'' + \n rule.style.content + '\\';');\n }\n // TODO(sorvell): we can workaround this issue here, but we need a list\n // of troublesome properties to fix https://github.com/Polymer/platform/issues/53\n //\n // inherit rules can be omitted from cssText\n // TODO(sorvell): remove when Blink bug is fixed:\n // https://code.google.com/p/chromium/issues/detail?id=358273\n var style = rule.style;\n for (var i in style) {\n if (style[i] === 'initial') {\n cssText += i + ': initial; ';\n }\n }\n return cssText;\n },\n replaceTextInStyles: function(styles, action) {\n if (styles && action) {\n if (!(styles instanceof Array)) {\n styles = [styles];\n }\n Array.prototype.forEach.call(styles, function(s) {\n s.textContent = action.call(this, s.textContent);\n }, this);\n }\n },\n addCssToDocument: function(cssText, name) {\n if (cssText.match('@import')) {\n addOwnSheet(cssText, name);\n } else {\n addCssToDocument(cssText);\n }\n }\n};\n\nvar selectorRe = /([^{]*)({[\\s\\S]*?})/gim,\n cssCommentRe = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//gim,\n // TODO(sorvell): remove either content or comment\n cssCommentNextSelectorRe = /\\/\\*\\s*@polyfill ([^*]*\\*+([^/*][^*]*\\*+)*\\/)([^{]*?){/gim,\n cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\\:[\\s]*?['\"](.*?)['\"][;\\s]*}([^{]*?){/gim, \n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\\:[\\s]*['\"](.*?)['\"])[;\\s]*[^}]*}/gim,\n cssPseudoRe = /::(x-[^\\s{,(]*)/gim,\n cssPartRe = /::part\\(([^)]*)\\)/gim,\n // note: :host pre-processed to -shadowcsshost.\n polyfillHost = '-shadowcsshost',\n // note: :host-context pre-processed to -shadowcsshostcontext.\n polyfillHostContext = '-shadowcsscontext',\n parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\n cssColonHostRe = new RegExp('(' + polyfillHost + parenSuffix, 'gim'),\n cssColonHostContextRe = new RegExp('(' + polyfillHostContext + parenSuffix, 'gim'),\n selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$',\n colonHostRe = /\\:host/gim,\n colonHostContextRe = /\\:host-context/gim,\n /* host name without combinator */\n polyfillHostNoCombinator = polyfillHost + '-no-combinator',\n polyfillHostRe = new RegExp(polyfillHost, 'gim'),\n polyfillHostContextRe = new RegExp(polyfillHostContext, 'gim'),\n shadowDOMSelectorsRe = [\n /\\^\\^/g,\n /\\^/g,\n /\\/shadow\\//g,\n /\\/shadow-deep\\//g,\n /::shadow/g,\n /\\/deep\\//g,\n /::content/g\n ];\n\nfunction stylesToCssText(styles, preserveComments) {\n var cssText = '';\n Array.prototype.forEach.call(styles, function(s) {\n cssText += s.textContent + '\\n\\n';\n });\n // strip comments for easier processing\n if (!preserveComments) {\n cssText = cssText.replace(cssCommentRe, '');\n }\n return cssText;\n}\n\nfunction cssTextToStyle(cssText) {\n var style = document.createElement('style');\n style.textContent = cssText;\n return style;\n}\n\nfunction cssToRules(cssText) {\n var style = cssTextToStyle(cssText);\n document.head.appendChild(style);\n var rules = [];\n if (style.sheet) {\n // TODO(sorvell): Firefox throws when accessing the rules of a stylesheet\n // with an @import\n // https://bugzilla.mozilla.org/show_bug.cgi?id=625013\n try {\n rules = style.sheet.cssRules;\n } catch(e) {\n //\n }\n } else {\n console.warn('sheet not found', style);\n }\n style.parentNode.removeChild(style);\n return rules;\n}\n\nvar frame = document.createElement('iframe');\nframe.style.display = 'none';\n\nfunction initFrame() {\n frame.initialized = true;\n document.body.appendChild(frame);\n var doc = frame.contentDocument;\n var base = doc.createElement('base');\n base.href = document.baseURI;\n doc.head.appendChild(base);\n}\n\nfunction inFrame(fn) {\n if (!frame.initialized) {\n initFrame();\n }\n document.body.appendChild(frame);\n fn(frame.contentDocument);\n document.body.removeChild(frame);\n}\n\n// TODO(sorvell): use an iframe if the cssText contains an @import to workaround\n// https://code.google.com/p/chromium/issues/detail?id=345114\nvar isChrome = navigator.userAgent.match('Chrome');\nfunction withCssRules(cssText, callback) {\n if (!callback) {\n return;\n }\n var rules;\n if (cssText.match('@import') && isChrome) {\n var style = cssTextToStyle(cssText);\n inFrame(function(doc) {\n doc.head.appendChild(style.impl);\n rules = style.sheet.cssRules;\n callback(rules);\n });\n } else {\n rules = cssToRules(cssText);\n callback(rules);\n }\n}\n\nfunction rulesToCss(cssRules) {\n for (var i=0, css=[]; i < cssRules.length; i++) {\n css.push(cssRules[i].cssText);\n }\n return css.join('\\n\\n');\n}\n\nfunction addCssToDocument(cssText) {\n if (cssText) {\n getSheet().appendChild(document.createTextNode(cssText));\n }\n}\n\nfunction addOwnSheet(cssText, name) {\n var style = cssTextToStyle(cssText);\n style.setAttribute(name, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n document.head.appendChild(style);\n}\n\nvar SHIM_ATTRIBUTE = 'shim-shadowdom';\nvar SHIMMED_ATTRIBUTE = 'shim-shadowdom-css';\nvar NO_SHIM_ATTRIBUTE = 'no-shim';\n\nvar sheet;\nfunction getSheet() {\n if (!sheet) {\n sheet = document.createElement(\"style\");\n sheet.setAttribute(SHIMMED_ATTRIBUTE, '');\n sheet[SHIMMED_ATTRIBUTE] = true;\n }\n return sheet;\n}\n\n// add polyfill stylesheet to document\nif (window.ShadowDOMPolyfill) {\n addCssToDocument('style { display: none !important; }\\n');\n var doc = wrap(document);\n var head = doc.querySelector('head');\n head.insertBefore(getSheet(), head.childNodes[0]);\n\n // TODO(sorvell): monkey-patching HTMLImports is abusive;\n // consider a better solution.\n document.addEventListener('DOMContentLoaded', function() {\n var urlResolver = scope.urlResolver;\n \n if (window.HTMLImports && !HTMLImports.useNative) {\n var SHIM_SHEET_SELECTOR = 'link[rel=stylesheet]' +\n '[' + SHIM_ATTRIBUTE + ']';\n var SHIM_STYLE_SELECTOR = 'style[' + SHIM_ATTRIBUTE + ']';\n HTMLImports.importer.documentPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n HTMLImports.importer.importsPreloadSelectors += ',' + SHIM_SHEET_SELECTOR;\n\n HTMLImports.parser.documentSelectors = [\n HTMLImports.parser.documentSelectors,\n SHIM_SHEET_SELECTOR,\n SHIM_STYLE_SELECTOR\n ].join(',');\n \n var originalParseGeneric = HTMLImports.parser.parseGeneric;\n\n HTMLImports.parser.parseGeneric = function(elt) {\n if (elt[SHIMMED_ATTRIBUTE]) {\n return;\n }\n var style = elt.__importElement || elt;\n if (!style.hasAttribute(SHIM_ATTRIBUTE)) {\n originalParseGeneric.call(this, elt);\n return;\n }\n if (elt.__resource) {\n style = elt.ownerDocument.createElement('style');\n style.textContent = urlResolver.resolveCssText(\n elt.__resource, elt.href);\n } else {\n urlResolver.resolveStyle(style); \n }\n style.textContent = ShadowCSS.shimStyle(style);\n style.removeAttribute(SHIM_ATTRIBUTE, '');\n style.setAttribute(SHIMMED_ATTRIBUTE, '');\n style[SHIMMED_ATTRIBUTE] = true;\n // place in document\n if (style.parentNode !== head) {\n // replace links in head\n if (elt.parentNode === head) {\n head.replaceChild(style, elt);\n } else {\n this.addElementToDocument(style);\n }\n }\n style.__importParsed = true;\n this.markParsingComplete(elt);\n this.parseNext();\n }\n\n var hasResource = HTMLImports.parser.hasResource;\n HTMLImports.parser.hasResource = function(node) {\n if (node.localName === 'link' && node.rel === 'stylesheet' &&\n node.hasAttribute(SHIM_ATTRIBUTE)) {\n return (node.__resource);\n } else {\n return hasResource.call(this, node);\n }\n }\n\n }\n });\n}\n\n// exports\nscope.ShadowCSS = ShadowCSS;\n\n})(window.Platform);\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://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(function(scope) {\n\n // so we can call wrap/unwrap without testing for ShadowDOMPolyfill\n window.wrap = window.unwrap = function(n){\n return n;\n }\n\n addEventListener('DOMContentLoaded', function() {\n if (CustomElements.useNative === false) {\n var originalCreateShadowRoot = Element.prototype.createShadowRoot;\n Element.prototype.createShadowRoot = function() {\n var root = originalCreateShadowRoot.call(this);\n CustomElements.watchShadow(this);\n return root;\n };\n }\n });\n\n Platform.templateContent = function(inTemplate) {\n // if MDV exists, it may need to boostrap this template to reveal content\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(inTemplate);\n }\n // fallback when there is no Shadow DOM polyfill, no MDV polyfill, and no\n // native template support\n if (!inTemplate.content && !inTemplate._content) {\n var frag = document.createDocumentFragment();\n while (inTemplate.firstChild) {\n frag.appendChild(inTemplate.firstChild);\n }\n inTemplate._content = frag;\n }\n return inTemplate.content || inTemplate._content;\n };\n\n})(window.Platform);\n","/* Any copyright is dedicated to the Public Domain.\n * http://creativecommons.org/publicdomain/zero/1.0/ */\n\n(function(scope) {\n 'use strict';\n\n // feature detect for URL constructor\n var hasWorkingUrl = false;\n if (!scope.forceJURL) {\n try {\n var u = new URL('b', 'http://a');\n hasWorkingUrl = u.href === 'http://a/b';\n } catch(e) {}\n }\n\n if (hasWorkingUrl)\n return;\n\n var relative = Object.create(null);\n relative['ftp'] = 21;\n relative['file'] = 0;\n relative['gopher'] = 70;\n relative['http'] = 80;\n relative['https'] = 443;\n relative['ws'] = 80;\n relative['wss'] = 443;\n\n var relativePathDotMapping = Object.create(null);\n relativePathDotMapping['%2e'] = '.';\n relativePathDotMapping['.%2e'] = '..';\n relativePathDotMapping['%2e.'] = '..';\n relativePathDotMapping['%2e%2e'] = '..';\n\n function isRelativeScheme(scheme) {\n return relative[scheme] !== undefined;\n }\n\n function invalid() {\n clear.call(this);\n this._isInvalid = true;\n }\n\n function IDNAToASCII(h) {\n if ('' == h) {\n invalid.call(this)\n }\n // XXX\n return h.toLowerCase()\n }\n\n function percentEscape(c) {\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message)\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c)\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme)\n this._scheme = base._scheme;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n state = 'fragment';\n } else {\n var nextC = input[cursor+1]\n var nextNextC = input[cursor+2]\n if (\n 'file' != this._scheme || !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverride) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jURL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n get href() {\n if (this._isInvalid)\n return this._url;\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority = this._username +\n (null != this._password ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1);\n parse.call(this, hash, 'fragment');\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.createObjectURL = function(blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\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 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 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\n// Old versions of iOS do not have bind.\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function(scope) {\n var self = this;\n var args = Array.prototype.slice.call(arguments, 1);\n return function() {\n var args2 = args.slice();\n args2.push.apply(args2, arguments);\n return self.apply(scope, args2);\n };\n };\n}\n\n// mixin\n\n// copy all properties from inProps (et al) to inObj\nfunction mixin(inObj/*, inProps, inMoreProps, ...*/) {\n var obj = inObj || {};\n for (var i = 1; i < arguments.length; i++) {\n var p = arguments[i];\n try {\n for (var n in p) {\n copyProperty(n, p, obj);\n }\n } catch(x) {\n }\n }\n return obj;\n}\n\n// copy property inName from inSource object to inTarget object\nfunction copyProperty(inName, inSource, inTarget) {\n var pd = getPropertyDescriptor(inSource, inName);\n Object.defineProperty(inTarget, inName, pd);\n}\n\n// get property descriptor for inName on inObject, even if\n// inName exists on some link in inObject's prototype chain\nfunction getPropertyDescriptor(inObject, inName) {\n if (inObject) {\n var pd = Object.getOwnPropertyDescriptor(inObject, inName);\n return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);\n }\n}\n\n// export\n\nscope.mixin = mixin;\n\n})(window.Platform);\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://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(function(scope) {\n\n 'use strict';\n\n // polyfill DOMTokenList\n // * add/remove: allow these methods to take multiple classNames\n // * toggle: add a 2nd argument which forces the given state rather\n // than toggling.\n\n var add = DOMTokenList.prototype.add;\n var remove = DOMTokenList.prototype.remove;\n DOMTokenList.prototype.add = function() {\n for (var i = 0; i < arguments.length; i++) {\n add.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.remove = function() {\n for (var i = 0; i < arguments.length; i++) {\n remove.call(this, arguments[i]);\n }\n };\n DOMTokenList.prototype.toggle = function(name, bool) {\n if (arguments.length == 1) {\n bool = !this.contains(name);\n }\n bool ? this.add(name) : this.remove(name);\n };\n DOMTokenList.prototype.switch = function(oldName, newName) {\n oldName && this.remove(oldName);\n newName && this.add(newName);\n };\n\n // add array() to NodeList, NamedNodeMap, HTMLCollection\n\n var ArraySlice = function() {\n return Array.prototype.slice.call(this);\n };\n\n var namedNodeMap = (window.NamedNodeMap || window.MozNamedAttrMap || {});\n\n NodeList.prototype.array = ArraySlice;\n namedNodeMap.prototype.array = ArraySlice;\n HTMLCollection.prototype.array = ArraySlice;\n\n // polyfill performance.now\n\n if (!window.performance) {\n var start = Date.now();\n // only at millisecond precision\n window.performance = {now: function(){ return Date.now() - start }};\n }\n\n // polyfill for requestAnimationFrame\n\n if (!window.requestAnimationFrame) {\n window.requestAnimationFrame = (function() {\n var nativeRaf = window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame;\n\n return nativeRaf ?\n function(callback) {\n return nativeRaf(function() {\n callback(performance.now());\n });\n } :\n function( callback ){\n return window.setTimeout(callback, 1000 / 60);\n };\n })();\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = (function() {\n return window.webkitCancelAnimationFrame ||\n window.mozCancelAnimationFrame ||\n function(id) {\n clearTimeout(id);\n };\n })();\n }\n\n // utility\n\n function createDOM(inTagOrNode, inHTML, inAttrs) {\n var dom = typeof inTagOrNode == 'string' ?\n document.createElement(inTagOrNode) : inTagOrNode.cloneNode(true);\n dom.innerHTML = inHTML;\n if (inAttrs) {\n for (var n in inAttrs) {\n dom.setAttribute(n, inAttrs[n]);\n }\n }\n return dom;\n }\n // Make a stub for Polymer() for polyfill purposes; under the HTMLImports\n // polyfill, scripts in the main document run before imports. That means\n // if (1) polymer is imported and (2) Polymer() is called in the main document\n // in a script after the import, 2 occurs before 1. We correct this here\n // by specfiically patching Polymer(); this is not necessary under native\n // HTMLImports.\n var elementDeclarations = [];\n\n var polymerStub = function(name, dictionary) {\n elementDeclarations.push(arguments);\n }\n window.Polymer = polymerStub;\n\n // deliver queued delcarations\n scope.deliverDeclarations = function() {\n scope.deliverDeclarations = function() {\n throw 'Possible attempt to load Polymer twice';\n };\n return elementDeclarations;\n }\n\n // Once DOMContent has loaded, any main document scripts that depend on\n // Polymer() should have run. Calling Polymer() now is an error until\n // polymer is imported.\n window.addEventListener('DOMContentLoaded', function() {\n if (window.Polymer === polymerStub) {\n window.Polymer = function() {\n console.error('You tried to use polymer without loading it first. To ' +\n 'load polymer, <link rel=\"import\" href=\"' + \n 'components/polymer/polymer.html\">');\n };\n }\n });\n\n // exports\n scope.createDOM = createDOM;\n\n})(window.Platform);\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://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// poor man's adapter for template.content on various platform scenarios\n(function(scope) {\n scope.templateContent = scope.templateContent || function(inTemplate) {\n return inTemplate.content;\n };\n})(window.Platform);\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://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(function(scope) {\n \n scope = scope || (window.Inspector = {});\n \n var inspector;\n\n window.sinspect = function(inNode, inProxy) {\n if (!inspector) {\n inspector = window.open('', 'ShadowDOM Inspector', null, true);\n inspector.document.write(inspectorHTML);\n //inspector.document.close();\n inspector.api = {\n shadowize: shadowize\n };\n }\n inspect(inNode || wrap(document.body), inProxy);\n };\n\n var inspectorHTML = [\n '<!DOCTYPE html>',\n '<html>',\n ' <head>',\n ' <title>ShadowDOM Inspector</title>',\n ' <style>',\n ' body {',\n ' }',\n ' pre {',\n ' font: 9pt \"Courier New\", monospace;',\n ' line-height: 1.5em;',\n ' }',\n ' tag {',\n ' color: purple;',\n ' }',\n ' ul {',\n ' margin: 0;',\n ' padding: 0;',\n ' list-style: none;',\n ' }',\n ' li {',\n ' display: inline-block;',\n ' background-color: #f1f1f1;',\n ' padding: 4px 6px;',\n ' border-radius: 4px;',\n ' margin-right: 4px;',\n ' }',\n ' </style>',\n ' </head>',\n ' <body>',\n ' <ul id=\"crumbs\">',\n ' </ul>',\n ' <div id=\"tree\"></div>',\n ' </body>',\n '</html>'\n ].join('\\n');\n \n var crumbs = [];\n\n var displayCrumbs = function() {\n // alias our document\n var d = inspector.document;\n // get crumbbar\n var cb = d.querySelector('#crumbs');\n // clear crumbs\n cb.textContent = '';\n // build new crumbs\n for (var i=0, c; c=crumbs[i]; i++) {\n var a = d.createElement('a');\n a.href = '#';\n a.textContent = c.localName;\n a.idx = i;\n a.onclick = function(event) {\n var c;\n while (crumbs.length > this.idx) {\n c = crumbs.pop();\n }\n inspect(c.shadow || c, c);\n event.preventDefault();\n };\n cb.appendChild(d.createElement('li')).appendChild(a);\n }\n };\n\n var inspect = function(inNode, inProxy) {\n // alias our document\n var d = inspector.document;\n // reset list of drillable nodes\n drillable = [];\n // memoize our crumb proxy\n var proxy = inProxy || inNode;\n crumbs.push(proxy);\n // update crumbs\n displayCrumbs();\n // reflect local tree\n d.body.querySelector('#tree').innerHTML =\n '<pre>' + output(inNode, inNode.childNodes) + '</pre>';\n };\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n var blacklisted = {STYLE:1, SCRIPT:1, \"#comment\": 1, TEMPLATE: 1};\n var blacklist = function(inNode) {\n return blacklisted[inNode.nodeName];\n };\n\n var output = function(inNode, inChildNodes, inIndent) {\n if (blacklist(inNode)) {\n return '';\n }\n var indent = inIndent || '';\n if (inNode.localName || inNode.nodeType == 11) {\n var name = inNode.localName || 'shadow-root';\n //inChildNodes = ShadowDOM.localNodes(inNode);\n var info = indent + describe(inNode);\n // if only textNodes\n // TODO(sjmiles): make correct for ShadowDOM\n /*if (!inNode.children.length && inNode.localName !== 'content' && inNode.localName !== 'shadow') {\n info += catTextContent(inChildNodes);\n } else*/ {\n // TODO(sjmiles): native <shadow> has no reference to its projection\n if (name == 'content' /*|| name == 'shadow'*/) {\n inChildNodes = inNode.getDistributedNodes();\n }\n info += '<br/>';\n var ind = indent + ' ';\n forEach(inChildNodes, function(n) {\n info += output(n, n.childNodes, ind);\n });\n info += indent;\n }\n if (!({br:1}[name])) {\n info += '<tag></' + name + '></tag>';\n info += '<br/>';\n }\n } else {\n var text = inNode.textContent.trim();\n info = text ? indent + '\"' + text + '\"' + '<br/>' : '';\n }\n return info;\n };\n\n var catTextContent = function(inChildNodes) {\n var info = '';\n forEach(inChildNodes, function(n) {\n info += n.textContent.trim();\n });\n return info;\n };\n\n var drillable = [];\n\n var describe = function(inNode) {\n var tag = '<tag>' + '<';\n var name = inNode.localName || 'shadow-root';\n if (inNode.webkitShadowRoot || inNode.shadowRoot) {\n tag += ' <button idx=\"' + drillable.length +\n '\" onclick=\"api.shadowize.call(this)\">' + name + '</button>';\n drillable.push(inNode);\n } else {\n tag += name || 'shadow-root';\n }\n if (inNode.attributes) {\n forEach(inNode.attributes, function(a) {\n tag += ' ' + a.name + (a.value ? '=\"' + a.value + '\"' : '');\n });\n }\n tag += '>'+ '</tag>';\n return tag;\n };\n\n // remote api\n\n shadowize = function() {\n var idx = Number(this.attributes.idx.value);\n //alert(idx);\n var node = drillable[idx];\n if (node) {\n inspect(node.webkitShadowRoot || node.shadowRoot, node)\n } else {\n console.log(\"bad shadowize node\");\n console.dir(this);\n }\n };\n \n // export\n \n scope.output = output;\n \n})(window.Inspector);\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://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(function(scope) {\n\n // TODO(sorvell): It's desireable to provide a default stylesheet \n // that's convenient for styling unresolved elements, but\n // it's cumbersome to have to include this manually in every page.\n // It would make sense to put inside some HTMLImport but \n // the HTMLImports polyfill does not allow loading of stylesheets \n // that block rendering. Therefore this injection is tolerated here.\n\n var style = document.createElement('style');\n style.textContent = ''\n + 'body {'\n + 'transition: opacity ease-in 0.2s;' \n + ' } \\n'\n + 'body[unresolved] {'\n + 'opacity: 0; display: block; overflow: hidden;' \n + ' } \\n'\n ;\n var head = document.querySelector('head');\n head.insertBefore(style, head.firstChild);\n\n})(Platform);\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://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(function(scope) {\n\n function withDependencies(task, depends) {\n depends = depends || [];\n if (!depends.map) {\n depends = [depends];\n }\n return task.apply(this, depends.map(marshal));\n }\n\n function module(name, dependsOrFactory, moduleFactory) {\n var module;\n switch (arguments.length) {\n case 0:\n return;\n case 1:\n module = null;\n break;\n case 2:\n // dependsOrFactory is `factory` in this case\n module = dependsOrFactory.apply(this);\n break;\n default:\n // dependsOrFactory is `depends` in this case\n module = withDependencies(moduleFactory, dependsOrFactory);\n break;\n }\n modules[name] = module;\n };\n\n function marshal(name) {\n return modules[name];\n }\n\n var modules = {};\n\n function using(depends, task) {\n HTMLImports.whenImportsReady(function() {\n withDependencies(task, depends);\n });\n };\n\n // exports\n\n scope.marshal = marshal;\n // `module` confuses commonjs detectors\n scope.modularize = module;\n scope.using = using;\n\n})(window);\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://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(function(scope) {\n\nvar iterations = 0;\nvar callbacks = [];\nvar twiddle = document.createTextNode('');\n\nfunction endOfMicrotask(callback) {\n twiddle.textContent = iterations++;\n callbacks.push(callback);\n}\n\nfunction atEndOfMicrotask() {\n while (callbacks.length) {\n callbacks.shift()();\n }\n}\n\nnew (window.MutationObserver || JsMutationObserver)(atEndOfMicrotask)\n .observe(twiddle, {characterData: true})\n ;\n\n// exports\n\nscope.endOfMicrotask = endOfMicrotask;\n\n})(Platform);\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.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 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\nvar urlResolver = {\n resolveDom: function(root, url) {\n url = url || root.ownerDocument.baseURI;\n this.resolveAttributes(root, url);\n this.resolveStyles(root, url);\n // handle template.content\n var templates = root.querySelectorAll('template');\n if (templates) {\n for (var i = 0, l = templates.length, t; (i < l) && (t = templates[i]); i++) {\n if (t.content) {\n this.resolveDom(t.content, url);\n }\n }\n }\n },\n resolveTemplate: function(template) {\n this.resolveDom(template.content, template.ownerDocument.baseURI);\n },\n resolveStyles: function(root, url) {\n var styles = root.querySelectorAll('style');\n if (styles) {\n for (var i = 0, l = styles.length, s; (i < l) && (s = styles[i]); i++) {\n this.resolveStyle(s, url);\n }\n }\n },\n resolveStyle: function(style, url) {\n url = url || style.ownerDocument.baseURI;\n style.textContent = this.resolveCssText(style.textContent, url);\n },\n resolveCssText: function(cssText, baseUrl, keepAbsolute) {\n cssText = replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_URL_REGEXP);\n return replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_IMPORT_REGEXP);\n },\n resolveAttributes: function(root, url) {\n if (root.hasAttributes && root.hasAttributes()) {\n this.resolveElementAttributes(root, url);\n }\n // search for attributes that host urls\n var nodes = root && root.querySelectorAll(URL_ATTRS_SELECTOR);\n if (nodes) {\n for (var i = 0, l = nodes.length, n; (i < l) && (n = nodes[i]); i++) {\n this.resolveElementAttributes(n, url);\n }\n }\n },\n resolveElementAttributes: function(node, url) {\n url = url || node.ownerDocument.baseURI;\n URL_ATTRS.forEach(function(v) {\n var attr = node.attributes[v];\n var value = attr && attr.value;\n var replacement;\n if (value && value.search(URL_TEMPLATE_SEARCH) < 0) {\n if (v === 'style') {\n replacement = replaceUrlsInCssText(value, url, false, CSS_URL_REGEXP);\n } else {\n replacement = resolveRelativeUrl(url, value);\n }\n attr.value = replacement;\n }\n });\n }\n};\n\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\nvar URL_ATTRS = ['href', 'src', 'action', 'style', 'url'];\nvar URL_ATTRS_SELECTOR = '[' + URL_ATTRS.join('],[') + ']';\nvar URL_TEMPLATE_SEARCH = '{{.*}}';\n\nfunction replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, regexp) {\n return cssText.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlPath = resolveRelativeUrl(baseUrl, urlPath, keepAbsolute);\n return pre + '\\'' + urlPath + '\\'' + post;\n });\n}\n\nfunction resolveRelativeUrl(baseUrl, url, keepAbsolute) {\n // do not resolve '/' absolute urls\n if (url && url[0] === '/') {\n return url;\n }\n var u = new URL(url, baseUrl);\n return keepAbsolute ? u.href : makeDocumentRelPath(u.href);\n}\n\nfunction makeDocumentRelPath(url) {\n var root = new URL(document.baseURI);\n var u = new URL(url, root);\n if (u.host === root.host && u.port === root.port &&\n u.protocol === root.protocol) {\n return makeRelPath(root, u);\n } else {\n return url;\n }\n}\n\n// make a relative path from source to target\nfunction makeRelPath(sourceUrl, targetUrl) {\n var source = sourceUrl.pathname;\n var target = targetUrl.pathname;\n var s = source.split('/');\n var t = target.split('/');\n while (s.length && s[0] === t[0]){\n s.shift();\n t.shift();\n }\n for (var i = 0, l = s.length - 1; i < l; i++) {\n t.unshift('..');\n }\n return t.join('/') + targetUrl.search + targetUrl.hash;\n}\n\n// exports\nscope.urlResolver = urlResolver;\n\n})(Platform);\n","/*\n * Copyright 2012 The Polymer Authors. All rights reserved.\n * Use of this source code is goverened by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(global) {\n\n var registrationsTable = new WeakMap();\n\n // We use setImmediate or postMessage for our future callback.\n var setImmediate = window.msSetImmediate;\n\n // Use post message to emulate setImmediate.\n if (!setImmediate) {\n var setImmediateQueue = [];\n var sentinel = String(Math.random());\n window.addEventListener('message', function(e) {\n if (e.data === sentinel) {\n var queue = setImmediateQueue;\n setImmediateQueue = [];\n queue.forEach(function(func) {\n func();\n });\n }\n });\n setImmediate = function(func) {\n setImmediateQueue.push(func);\n window.postMessage(sentinel, '*');\n };\n }\n\n // This is used to ensure that we never schedule 2 callas to setImmediate\n var isScheduled = false;\n\n // Keep track of observers that needs to be notified next time.\n var scheduledObservers = [];\n\n /**\n * Schedules |dispatchCallback| to be called in the future.\n * @param {MutationObserver} observer\n */\n function scheduleCallback(observer) {\n scheduledObservers.push(observer);\n if (!isScheduled) {\n isScheduled = true;\n setImmediate(dispatchCallbacks);\n }\n }\n\n function wrapIfNeeded(node) {\n return window.ShadowDOMPolyfill &&\n window.ShadowDOMPolyfill.wrapIfNeeded(node) ||\n node;\n }\n\n function dispatchCallbacks() {\n // http://dom.spec.whatwg.org/#mutation-observers\n\n isScheduled = false; // Used to allow a new setImmediate call above.\n\n var observers = scheduledObservers;\n scheduledObservers = [];\n // Sort observers based on their creation UID (incremental).\n observers.sort(function(o1, o2) {\n return o1.uid_ - o2.uid_;\n });\n\n var anyNonEmpty = false;\n observers.forEach(function(observer) {\n\n // 2.1, 2.2\n var queue = observer.takeRecords();\n // 2.3. Remove all transient registered observers whose observer is mo.\n removeTransientObserversFor(observer);\n\n // 2.4\n if (queue.length) {\n observer.callback_(queue, observer);\n anyNonEmpty = true;\n }\n });\n\n // 3.\n if (anyNonEmpty)\n dispatchCallbacks();\n }\n\n function removeTransientObserversFor(observer) {\n observer.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n if (!registrations)\n return;\n registrations.forEach(function(registration) {\n if (registration.observer === observer)\n registration.removeTransientObservers();\n });\n });\n }\n\n /**\n * This function is used for the \"For each registered observer observer (with\n * observer's options as options) in target's list of registered observers,\n * run these substeps:\" and the \"For each ancestor ancestor of target, and for\n * each registered observer observer (with options options) in ancestor's list\n * of registered observers, run these substeps:\" part of the algorithms. The\n * |options.subtree| is checked to ensure that the callback is called\n * correctly.\n *\n * @param {Node} target\n * @param {function(MutationObserverInit):MutationRecord} callback\n */\n function forEachAncestorAndObserverEnqueueRecord(target, callback) {\n for (var node = target; node; node = node.parentNode) {\n var registrations = registrationsTable.get(node);\n\n if (registrations) {\n for (var j = 0; j < registrations.length; j++) {\n var registration = registrations[j];\n var options = registration.options;\n\n // Only target ignores subtree.\n if (node !== target && !options.subtree)\n continue;\n\n var record = callback(options);\n if (record)\n registration.enqueue(record);\n }\n }\n }\n }\n\n var uidCounter = 0;\n\n /**\n * The class that maps to the DOM MutationObserver interface.\n * @param {Function} callback.\n * @constructor\n */\n function JsMutationObserver(callback) {\n this.callback_ = callback;\n this.nodes_ = [];\n this.records_ = [];\n this.uid_ = ++uidCounter;\n }\n\n JsMutationObserver.prototype = {\n observe: function(target, options) {\n target = wrapIfNeeded(target);\n\n // 1.1\n if (!options.childList && !options.attributes && !options.characterData ||\n\n // 1.2\n options.attributeOldValue && !options.attributes ||\n\n // 1.3\n options.attributeFilter && options.attributeFilter.length &&\n !options.attributes ||\n\n // 1.4\n options.characterDataOldValue && !options.characterData) {\n\n throw new SyntaxError();\n }\n\n var registrations = registrationsTable.get(target);\n if (!registrations)\n registrationsTable.set(target, registrations = []);\n\n // 2\n // If target's list of registered observers already includes a registered\n // observer associated with the context object, replace that registered\n // observer's options with options.\n var registration;\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i].observer === this) {\n registration = registrations[i];\n registration.removeListeners();\n registration.options = options;\n break;\n }\n }\n\n // 3.\n // Otherwise, add a new registered observer to target's list of registered\n // observers with the context object as the observer and options as the\n // options, and add target to context object's list of nodes on which it\n // is registered.\n if (!registration) {\n registration = new Registration(this, target, options);\n registrations.push(registration);\n this.nodes_.push(target);\n }\n\n registration.addListeners();\n },\n\n disconnect: function() {\n this.nodes_.forEach(function(node) {\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n var registration = registrations[i];\n if (registration.observer === this) {\n registration.removeListeners();\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n this.records_ = [];\n },\n\n takeRecords: function() {\n var copyOfRecords = this.records_;\n this.records_ = [];\n return copyOfRecords;\n }\n };\n\n /**\n * @param {string} type\n * @param {Node} target\n * @constructor\n */\n function MutationRecord(type, target) {\n this.type = type;\n this.target = target;\n this.addedNodes = [];\n this.removedNodes = [];\n this.previousSibling = null;\n this.nextSibling = null;\n this.attributeName = null;\n this.attributeNamespace = null;\n this.oldValue = null;\n }\n\n function copyMutationRecord(original) {\n var record = new MutationRecord(original.type, original.target);\n record.addedNodes = original.addedNodes.slice();\n record.removedNodes = original.removedNodes.slice();\n record.previousSibling = original.previousSibling;\n record.nextSibling = original.nextSibling;\n record.attributeName = original.attributeName;\n record.attributeNamespace = original.attributeNamespace;\n record.oldValue = original.oldValue;\n return record;\n };\n\n // We keep track of the two (possibly one) records used in a single mutation.\n var currentRecord, recordWithOldValue;\n\n /**\n * Creates a record without |oldValue| and caches it as |currentRecord| for\n * later use.\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecord(type, target) {\n return currentRecord = new MutationRecord(type, target);\n }\n\n /**\n * Gets or creates a record with |oldValue| based in the |currentRecord|\n * @param {string} oldValue\n * @return {MutationRecord}\n */\n function getRecordWithOldValue(oldValue) {\n if (recordWithOldValue)\n return recordWithOldValue;\n recordWithOldValue = copyMutationRecord(currentRecord);\n recordWithOldValue.oldValue = oldValue;\n return recordWithOldValue;\n }\n\n function clearRecords() {\n currentRecord = recordWithOldValue = undefined;\n }\n\n /**\n * @param {MutationRecord} record\n * @return {boolean} Whether the record represents a record from the current\n * mutation event.\n */\n function recordRepresentsCurrentMutation(record) {\n return record === recordWithOldValue || record === currentRecord;\n }\n\n /**\n * Selects which record, if any, to replace the last record in the queue.\n * This returns |null| if no record should be replaced.\n *\n * @param {MutationRecord} lastRecord\n * @param {MutationRecord} newRecord\n * @param {MutationRecord}\n */\n function selectRecord(lastRecord, newRecord) {\n if (lastRecord === newRecord)\n return lastRecord;\n\n // Check if the the record we are adding represents the same record. If\n // so, we keep the one with the oldValue in it.\n if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord))\n return recordWithOldValue;\n\n return null;\n }\n\n /**\n * Class used to represent a registered observer.\n * @param {MutationObserver} observer\n * @param {Node} target\n * @param {MutationObserverInit} options\n * @constructor\n */\n function Registration(observer, target, options) {\n this.observer = observer;\n this.target = target;\n this.options = options;\n this.transientObservedNodes = [];\n }\n\n Registration.prototype = {\n enqueue: function(record) {\n var records = this.observer.records_;\n var length = records.length;\n\n // There are cases where we replace the last record with the new record.\n // For example if the record represents the same mutation we need to use\n // the one with the oldValue. If we get same record (this can happen as we\n // walk up the tree) we ignore the new record.\n if (records.length > 0) {\n var lastRecord = records[length - 1];\n var recordToReplaceLast = selectRecord(lastRecord, record);\n if (recordToReplaceLast) {\n records[length - 1] = recordToReplaceLast;\n return;\n }\n } else {\n scheduleCallback(this.observer);\n }\n\n records[length] = record;\n },\n\n addListeners: function() {\n this.addListeners_(this.target);\n },\n\n addListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.addEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.addEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.addEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.addEventListener('DOMNodeRemoved', this, true);\n },\n\n removeListeners: function() {\n this.removeListeners_(this.target);\n },\n\n removeListeners_: function(node) {\n var options = this.options;\n if (options.attributes)\n node.removeEventListener('DOMAttrModified', this, true);\n\n if (options.characterData)\n node.removeEventListener('DOMCharacterDataModified', this, true);\n\n if (options.childList)\n node.removeEventListener('DOMNodeInserted', this, true);\n\n if (options.childList || options.subtree)\n node.removeEventListener('DOMNodeRemoved', this, true);\n },\n\n /**\n * Adds a transient observer on node. The transient observer gets removed\n * next time we deliver the change records.\n * @param {Node} node\n */\n addTransientObserver: function(node) {\n // Don't add transient observers on the target itself. We already have all\n // the required listeners set up on the target.\n if (node === this.target)\n return;\n\n this.addListeners_(node);\n this.transientObservedNodes.push(node);\n var registrations = registrationsTable.get(node);\n if (!registrations)\n registrationsTable.set(node, registrations = []);\n\n // We know that registrations does not contain this because we already\n // checked if node === this.target.\n registrations.push(this);\n },\n\n removeTransientObservers: function() {\n var transientObservedNodes = this.transientObservedNodes;\n this.transientObservedNodes = [];\n\n transientObservedNodes.forEach(function(node) {\n // Transient observers are never added to the target.\n this.removeListeners_(node);\n\n var registrations = registrationsTable.get(node);\n for (var i = 0; i < registrations.length; i++) {\n if (registrations[i] === this) {\n registrations.splice(i, 1);\n // Each node can only have one registered observer associated with\n // this observer.\n break;\n }\n }\n }, this);\n },\n\n handleEvent: function(e) {\n // Stop propagation since we are managing the propagation manually.\n // This means that other mutation events on the page will not work\n // correctly but that is by design.\n e.stopImmediatePropagation();\n\n switch (e.type) {\n case 'DOMAttrModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-attributes\n\n var name = e.attrName;\n var namespace = e.relatedNode.namespaceURI;\n var target = e.target;\n\n // 1.\n var record = new getRecord('attributes', target);\n record.attributeName = name;\n record.attributeNamespace = namespace;\n\n // 2.\n var oldValue =\n e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.attributes)\n return;\n\n // 3.2, 4.3\n if (options.attributeFilter && options.attributeFilter.length &&\n options.attributeFilter.indexOf(name) === -1 &&\n options.attributeFilter.indexOf(namespace) === -1) {\n return;\n }\n // 3.3, 4.4\n if (options.attributeOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.4, 4.5\n return record;\n });\n\n break;\n\n case 'DOMCharacterDataModified':\n // http://dom.spec.whatwg.org/#concept-mo-queue-characterdata\n var target = e.target;\n\n // 1.\n var record = getRecord('characterData', target);\n\n // 2.\n var oldValue = e.prevValue;\n\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 3.1, 4.2\n if (!options.characterData)\n return;\n\n // 3.2, 4.3\n if (options.characterDataOldValue)\n return getRecordWithOldValue(oldValue);\n\n // 3.3, 4.4\n return record;\n });\n\n break;\n\n case 'DOMNodeRemoved':\n this.addTransientObserver(e.target);\n // Fall through.\n case 'DOMNodeInserted':\n // http://dom.spec.whatwg.org/#concept-mo-queue-childlist\n var target = e.relatedNode;\n var changedNode = e.target;\n var addedNodes, removedNodes;\n if (e.type === 'DOMNodeInserted') {\n addedNodes = [changedNode];\n removedNodes = [];\n } else {\n\n addedNodes = [];\n removedNodes = [changedNode];\n }\n var previousSibling = changedNode.previousSibling;\n var nextSibling = changedNode.nextSibling;\n\n // 1.\n var record = getRecord('childList', target);\n record.addedNodes = addedNodes;\n record.removedNodes = removedNodes;\n record.previousSibling = previousSibling;\n record.nextSibling = nextSibling;\n\n forEachAncestorAndObserverEnqueueRecord(target, function(options) {\n // 2.1, 3.2\n if (!options.childList)\n return;\n\n // 2.2, 3.3\n return record;\n });\n\n }\n\n clearRecords();\n }\n };\n\n global.JsMutationObserver = JsMutationObserver;\n\n if (!global.MutationObserver)\n global.MutationObserver = JsMutationObserver;\n\n\n})(this);\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 */\nwindow.HTMLImports = window.HTMLImports || {flags:{}};","/*\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\n(function(scope) {\n\n // imports\n var path = scope.path;\n var xhr = scope.xhr;\n var flags = scope.flags;\n\n // TODO(sorvell): this loader supports a dynamic list of urls\n // and an oncomplete callback that is called when the loader is done.\n // The polyfill currently does *not* need this dynamism or the onComplete\n // concept. Because of this, the loader could be simplified quite a bit.\n var Loader = function(onLoad, onComplete) {\n this.cache = {};\n this.onload = onLoad;\n this.oncomplete = onComplete;\n this.inflight = 0;\n this.pending = {};\n };\n\n Loader.prototype = {\n addNodes: function(nodes) {\n // number of transactions to complete\n this.inflight += nodes.length;\n // commence transactions\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n this.require(n);\n }\n // anything to do?\n this.checkDone();\n },\n addNode: function(node) {\n // number of transactions to complete\n this.inflight++;\n // commence transactions\n this.require(node);\n // anything to do?\n this.checkDone();\n },\n require: function(elt) {\n var url = elt.src || elt.href;\n // ensure we have a standard url that can be used\n // reliably for deduping.\n // TODO(sjmiles): ad-hoc\n elt.__nodeUrl = url;\n // deduplication\n if (!this.dedupe(url, elt)) {\n // fetch this resource\n this.fetch(url, elt);\n }\n },\n dedupe: function(url, elt) {\n if (this.pending[url]) {\n // add to list of nodes waiting for inUrl\n this.pending[url].push(elt);\n // don't need fetch\n return true;\n }\n var resource;\n if (this.cache[url]) {\n this.onload(url, elt, this.cache[url]);\n // finished this transaction\n this.tail();\n // don't need fetch\n return true;\n }\n // first node waiting for inUrl\n this.pending[url] = [elt];\n // need fetch (not a dupe)\n return false;\n },\n fetch: function(url, elt) {\n flags.load && console.log('fetch', url, elt);\n if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n var pieces = url.split(',');\n var header = pieces[0];\n var body = pieces[1];\n if(header.indexOf(';base64') > -1) {\n body = atob(body);\n } else {\n body = decodeURIComponent(body);\n }\n setTimeout(function() {\n this.receive(url, elt, null, body);\n }.bind(this), 0);\n } else {\n var receiveXhr = function(err, resource, redirectedUrl) {\n this.receive(url, elt, err, resource, redirectedUrl);\n }.bind(this);\n xhr.load(url, receiveXhr);\n // TODO(sorvell): blocked on)\n // https://code.google.com/p/chromium/issues/detail?id=257221\n // xhr'ing for a document makes scripts in imports runnable; otherwise\n // they are not; however, it requires that we have doctype=html in\n // the import which is unacceptable. This is only needed on Chrome\n // to avoid the bug above.\n /*\n if (isDocumentLink(elt)) {\n xhr.loadDocument(url, receiveXhr);\n } else {\n xhr.load(url, receiveXhr);\n }\n */\n }\n },\n receive: function(url, elt, err, resource, redirectedUrl) {\n this.cache[url] = resource;\n var $p = this.pending[url];\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.cache[redirectedUrl] = resource;\n $p = $p.concat(this.pending[redirectedUrl]);\n }\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\n //if (!err) {\n // If url was redirected, use the redirected location so paths are\n // calculated relative to that.\n this.onload(redirectedUrl || url, p, resource);\n //}\n this.tail();\n }\n this.pending[url] = null;\n if ( redirectedUrl && redirectedUrl !== url ) {\n this.pending[redirectedUrl] = null;\n }\n },\n tail: function() {\n --this.inflight;\n this.checkDone();\n },\n checkDone: function() {\n if (!this.inflight) {\n this.oncomplete();\n }\n }\n };\n\n xhr = xhr || {\n async: true,\n ok: function(request) {\n return (request.status >= 200 && request.status < 300)\n || (request.status === 304)\n || (request.status === 0);\n },\n load: function(url, next, nextContext) {\n var request = new XMLHttpRequest();\n if (scope.flags.debug || scope.flags.bust) {\n url += '?' + Math.random();\n }\n request.open('GET', url, xhr.async);\n request.addEventListener('readystatechange', function(e) {\n if (request.readyState === 4) {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly.\n var locationHeader = request.getResponseHeader(\"Location\");\n var redirectedUrl = null;\n if (locationHeader) {\n var redirectedUrl = (locationHeader.substr( 0, 1 ) === \"/\")\n ? location.origin + locationHeader // Location is a relative path\n : redirectedUrl; // Full path\n }\n next.call(nextContext, !xhr.ok(request) && request,\n request.response || request.responseText, redirectedUrl);\n }\n });\n request.send();\n return request;\n },\n loadDocument: function(url, next, nextContext) {\n this.load(url, next, nextContext).responseType = 'document';\n }\n };\n\n // exports\n scope.xhr = xhr;\n scope.Loader = Loader;\n\n})(window.HTMLImports);\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\n(function(scope) {\n\nvar IMPORT_LINK_TYPE = 'import';\nvar flags = scope.flags;\nvar isIe = /Trident/.test(navigator.userAgent);\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// importParser\n// highlander object to manage parsing of imports\n// parses import related elements\n// and ensures proper parse order\n// parse order is enforced by crawling the tree and monitoring which elements\n// have been parsed; async parsing is also supported.\n\n// highlander object for parsing a document tree\nvar importParser = {\n // parse selectors for main document elements\n documentSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // parse selectors for import document elements\n importsSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']',\n 'link[rel=stylesheet]',\n 'style',\n 'script:not([type])',\n 'script[type=\"text/javascript\"]'\n ].join(','),\n map: {\n link: 'parseLink',\n script: 'parseScript',\n style: 'parseStyle'\n },\n // try to parse the next import in the tree\n parseNext: function() {\n var next = this.nextToParse();\n if (next) {\n this.parse(next);\n }\n },\n parse: function(elt) {\n if (this.isParsed(elt)) {\n flags.parse && console.log('[%s] is already parsed', elt.localName);\n return;\n }\n var fn = this[this.map[elt.localName]];\n if (fn) {\n this.markParsing(elt);\n fn.call(this, elt);\n }\n },\n // only 1 element may be parsed at a time; parsing is async so each\n // parsing implementation must inform the system that parsing is complete\n // via markParsingComplete.\n // To prompt the system to parse the next element, parseNext should then be\n // called.\n // Note, parseNext used to be included at the end of markParsingComplete, but\n // we must not do this so that, for example, we can (1) mark parsing complete \n // then (2) fire an import load event, and then (3) parse the next resource.\n markParsing: function(elt) {\n flags.parse && console.log('parsing', elt);\n this.parsingElement = elt;\n },\n markParsingComplete: function(elt) {\n elt.__importParsed = true;\n if (elt.__importElement) {\n elt.__importElement.__importParsed = true;\n }\n this.parsingElement = null;\n flags.parse && console.log('completed', elt);\n },\n invalidateParse: function(doc) {\n if (doc && doc.__importLink) {\n doc.__importParsed = doc.__importLink.__importParsed = false;\n this.parseSoon();\n }\n },\n parseSoon: function() {\n if (this._parseSoon) {\n cancelAnimationFrame(this._parseDelay);\n }\n var parser = this;\n this._parseSoon = requestAnimationFrame(function() {\n parser.parseNext();\n });\n },\n parseImport: function(elt) {\n // TODO(sorvell): consider if there's a better way to do this;\n // expose an imports parsing hook; this is needed, for example, by the\n // CustomElements polyfill.\n if (HTMLImports.__importsParsingHook) {\n HTMLImports.__importsParsingHook(elt);\n }\n elt.import.__importParsed = true;\n this.markParsingComplete(elt);\n // fire load event\n if (elt.__resource) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false})); \n } else {\n elt.dispatchEvent(new CustomEvent('error', {bubbles: false}));\n }\n // TODO(sorvell): workaround for Safari addEventListener not working\n // for elements not in the main document.\n if (elt.__pending) {\n var fn;\n while (elt.__pending.length) {\n fn = elt.__pending.shift();\n if (fn) {\n fn({target: elt});\n }\n }\n }\n this.parseNext();\n },\n parseLink: function(linkElt) {\n if (nodeIsImport(linkElt)) {\n this.parseImport(linkElt);\n } else {\n // make href absolute\n linkElt.href = linkElt.href;\n this.parseGeneric(linkElt);\n }\n },\n parseStyle: function(elt) {\n // TODO(sorvell): style element load event can just not fire so clone styles\n var src = elt;\n elt = cloneStyle(elt);\n elt.__importElement = src;\n this.parseGeneric(elt);\n },\n parseGeneric: function(elt) {\n this.trackElement(elt);\n this.addElementToDocument(elt);\n },\n rootImportForElement: function(elt) {\n var n = elt;\n while (n.ownerDocument.__importLink) {\n n = n.ownerDocument.__importLink;\n }\n return n;\n },\n addElementToDocument: function(elt) {\n var port = this.rootImportForElement(elt.__importElement || elt);\n var l = port.__insertedElements = port.__insertedElements || 0;\n var refNode = port.nextElementSibling;\n for (var i=0; i < l; i++) {\n refNode = refNode && refNode.nextElementSibling;\n }\n port.parentNode.insertBefore(elt, refNode);\n },\n // tracks when a loadable element has loaded\n trackElement: function(elt, callback) {\n var self = this;\n var done = function(e) {\n if (callback) {\n callback(e);\n }\n self.markParsingComplete(elt);\n self.parseNext();\n };\n elt.addEventListener('load', done);\n elt.addEventListener('error', done);\n\n // NOTE: IE does not fire \"load\" event for styles that have already loaded\n // This is in violation of the spec, so we try our hardest to work around it\n if (isIe && elt.localName === 'style') {\n var fakeLoad = false;\n // If there's not @import in the textContent, assume it has loaded\n if (elt.textContent.indexOf('@import') == -1) {\n fakeLoad = true;\n // if we have a sheet, we have been parsed\n } else if (elt.sheet) {\n fakeLoad = true;\n var csr = elt.sheet.cssRules;\n var len = csr ? csr.length : 0;\n // search the rules for @import's\n for (var i = 0, r; (i < len) && (r = csr[i]); i++) {\n if (r.type === CSSRule.IMPORT_RULE) {\n // if every @import has resolved, fake the load\n fakeLoad = fakeLoad && Boolean(r.styleSheet);\n }\n }\n }\n // dispatch a fake load event and continue parsing\n if (fakeLoad) {\n elt.dispatchEvent(new CustomEvent('load', {bubbles: false}));\n }\n }\n },\n // NOTE: execute scripts by injecting them and watching for the load/error\n // event. Inline scripts are handled via dataURL's because browsers tend to\n // provide correct parsing errors in this case. If this has any compatibility\n // issues, we can switch to injecting the inline script with textContent.\n // Scripts with dataURL's do not appear to generate load events and therefore\n // we assume they execute synchronously.\n parseScript: function(scriptElt) {\n var script = document.createElement('script');\n script.__importElement = scriptElt;\n script.src = scriptElt.src ? scriptElt.src : \n generateScriptDataUrl(scriptElt);\n scope.currentScript = scriptElt;\n this.trackElement(script, function(e) {\n script.parentNode.removeChild(script);\n scope.currentScript = null; \n });\n this.addElementToDocument(script);\n },\n // determine the next element in the tree which should be parsed\n nextToParse: function() {\n return !this.parsingElement && this.nextToParseInDoc(mainDoc);\n },\n nextToParseInDoc: function(doc, link) {\n var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));\n for (var i=0, l=nodes.length, p=0, n; (i<l) && (n=nodes[i]); i++) {\n if (!this.isParsed(n)) {\n if (this.hasResource(n)) {\n return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;\n } else {\n return;\n }\n }\n }\n // all nodes have been parsed, ready to parse import, if any\n return link;\n },\n // return the set of parse selectors relevant for this node.\n parseSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentSelectors : this.importsSelectors;\n },\n isParsed: function(node) {\n return node.__importParsed;\n },\n hasResource: function(node) {\n if (nodeIsImport(node) && !node.import) {\n return false;\n }\n return true;\n }\n};\n\nfunction nodeIsImport(elt) {\n return (elt.localName === 'link') && (elt.rel === IMPORT_LINK_TYPE);\n}\n\nfunction generateScriptDataUrl(script) {\n var scriptContent = generateScriptContent(script);\n var b64 = 'data:text/javascript';\n // base64 may be smaller, but does not handle unicode characters\n // attempt base64 first, fall back to escaped text\n try {\n b64 += (';base64,' + btoa(scriptContent));\n } catch(e) {\n b64 += (';charset=utf-8,' + encodeURIComponent(scriptContent));\n }\n return b64;\n}\n\nfunction generateScriptContent(script) {\n return script.textContent + generateSourceMapHint(script);\n}\n\n// calculate source map hint\nfunction generateSourceMapHint(script) {\n var moniker = script.__nodeUrl;\n if (!moniker) {\n moniker = script.ownerDocument.baseURI;\n // there could be more than one script this url\n var tag = '[' + Math.floor((Math.random()+1)*1000) + ']';\n // TODO(sjmiles): Polymer hack, should be pluggable if we need to allow \n // this sort of thing\n var matches = script.textContent.match(/Polymer\\(['\"]([^'\"]*)/);\n tag = matches && matches[1] || tag;\n // tag the moniker\n moniker += '/' + tag + '.js';\n }\n return '\\n//# sourceURL=' + moniker + '\\n';\n}\n\n// style/stylesheet handling\n\n// clone style with proper path resolution for main document\n// NOTE: styles are the only elements that require direct path fixup.\nfunction cloneStyle(style) {\n var clone = style.ownerDocument.createElement('style');\n clone.textContent = style.textContent;\n path.resolveUrlsInStyle(clone);\n return clone;\n}\n\n// path fixup: style elements in imports must be made relative to the main \n// document. We fixup url's in url() and @import.\nvar CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\nvar CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n\nvar path = {\n resolveUrlsInStyle: function(style) {\n var doc = style.ownerDocument;\n var resolver = doc.createElement('a');\n style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);\n return style; \n },\n resolveUrlsInCssText: function(cssText, urlObj) {\n var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);\n r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);\n return r;\n },\n replaceUrls: function(text, urlObj, regexp) {\n return text.replace(regexp, function(m, pre, url, post) {\n var urlPath = url.replace(/[\"']/g, '');\n urlObj.href = urlPath;\n urlPath = urlObj.href;\n return pre + '\\'' + urlPath + '\\'' + post;\n }); \n }\n}\n\n// exports\nscope.parser = importParser;\nscope.path = path;\nscope.isIE = isIe;\n\n})(HTMLImports);\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\n(function(scope) {\n\nvar hasNative = ('import' in document.createElement('link'));\nvar useNative = hasNative;\nvar flags = scope.flags;\nvar IMPORT_LINK_TYPE = 'import';\n\n// TODO(sorvell): SD polyfill intrusion\nvar mainDoc = window.ShadowDOMPolyfill ? \n ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\nif (!useNative) {\n\n // imports\n var xhr = scope.xhr;\n var Loader = scope.Loader;\n var parser = scope.parser;\n\n // importer\n // highlander object to manage loading of imports\n\n // for any document, importer:\n // - loads any linked import documents (with deduping)\n\n var importer = {\n documents: {},\n // nodes to load in the mian document\n documentPreloadSelectors: 'link[rel=' + IMPORT_LINK_TYPE + ']',\n // nodes to load in imports\n importsPreloadSelectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ].join(','),\n loadNode: function(node) {\n importLoader.addNode(node);\n },\n // load all loadable elements within the parent element\n loadSubtree: function(parent) {\n var nodes = this.marshalNodes(parent);\n // add these nodes to loader's queue\n importLoader.addNodes(nodes);\n },\n marshalNodes: function(parent) {\n // all preloadable nodes in inDocument\n return parent.querySelectorAll(this.loadSelectorsForNode(parent));\n },\n // find the proper set of load selectors for a given node\n loadSelectorsForNode: function(node) {\n var doc = node.ownerDocument || node;\n return doc === mainDoc ? this.documentPreloadSelectors :\n this.importsPreloadSelectors;\n },\n loaded: function(url, elt, resource) {\n flags.load && console.log('loaded', url, elt);\n // store generic resource\n // TODO(sorvell): fails for nodes inside <template>.content\n // see https://code.google.com/p/chromium/issues/detail?id=249381.\n elt.__resource = resource;\n if (isDocumentLink(elt)) {\n var doc = this.documents[url];\n // if we've never seen a document at this url\n if (!doc) {\n // generate an HTMLDocument from data\n doc = makeDocument(resource, url);\n doc.__importLink = elt;\n // TODO(sorvell): we cannot use MO to detect parsed nodes because\n // SD polyfill does not report these as mutations.\n this.bootDocument(doc);\n // cache document\n this.documents[url] = doc;\n }\n // don't store import record until we're actually loaded\n // store document resource\n elt.import = doc;\n }\n parser.parseNext();\n },\n bootDocument: function(doc) {\n this.loadSubtree(doc);\n this.observe(doc);\n parser.parseNext();\n },\n loadedAll: function() {\n parser.parseNext();\n }\n };\n\n // loader singleton\n var importLoader = new Loader(importer.loaded.bind(importer), \n importer.loadedAll.bind(importer));\n\n function isDocumentLink(elt) {\n return isLinkRel(elt, IMPORT_LINK_TYPE);\n }\n\n function isLinkRel(elt, rel) {\n return elt.localName === 'link' && elt.getAttribute('rel') === rel;\n }\n\n function isScript(elt) {\n return elt.localName === 'script';\n }\n\n function makeDocument(resource, url) {\n // create a new HTML document\n var doc = resource;\n if (!(doc instanceof Document)) {\n doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);\n }\n // cache the new document's source url\n doc._URL = url;\n // establish a relative path via <base>\n var base = doc.createElement('base');\n base.setAttribute('href', url);\n // add baseURI support to browsers (IE) that lack it.\n if (!doc.baseURI) {\n doc.baseURI = url;\n }\n // ensure UTF-8 charset\n var meta = doc.createElement('meta');\n meta.setAttribute('charset', 'utf-8');\n\n doc.head.appendChild(meta);\n doc.head.appendChild(base);\n // install HTML last as it may trigger CustomElement upgrades\n // TODO(sjmiles): problem wrt to template boostrapping below,\n // template bootstrapping must (?) come before element upgrade\n // but we cannot bootstrap templates until they are in a document\n // which is too late\n if (!(resource instanceof Document)) {\n // install html\n doc.body.innerHTML = resource;\n }\n // TODO(sorvell): ideally this code is not aware of Template polyfill,\n // but for now the polyfill needs help to bootstrap these templates\n if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {\n HTMLTemplateElement.bootstrap(doc);\n }\n return doc;\n }\n} else {\n // do nothing if using native imports\n var importer = {};\n}\n\n// NOTE: We cannot polyfill document.currentScript because it's not possible\n// both to override and maintain the ability to capture the native value;\n// therefore we choose to expose _currentScript both when native imports\n// and the polyfill are in use.\nvar currentScriptDescriptor = {\n get: function() {\n return HTMLImports.currentScript || document.currentScript;\n },\n configurable: true\n};\n\nObject.defineProperty(document, '_currentScript', currentScriptDescriptor);\nObject.defineProperty(mainDoc, '_currentScript', currentScriptDescriptor);\n\n// Polyfill document.baseURI for browsers without it.\nif (!document.baseURI) {\n var baseURIDescriptor = {\n get: function() {\n return window.location.href;\n },\n configurable: true\n };\n\n Object.defineProperty(document, 'baseURI', baseURIDescriptor);\n Object.defineProperty(mainDoc, 'baseURI', baseURIDescriptor);\n}\n\n// call a callback when all HTMLImports in the document at call (or at least\n// document ready) time have loaded.\n// 1. ensure the document is in a ready state (has dom), then \n// 2. watch for loading of imports and call callback when done\nfunction whenImportsReady(callback, doc) {\n doc = doc || mainDoc;\n // if document is loading, wait and try again\n whenDocumentReady(function() {\n watchImportsLoad(callback, doc);\n }, doc);\n}\n\n// call the callback when the document is in a ready state (has dom)\nvar requiredReadyState = HTMLImports.isIE ? 'complete' : 'interactive';\nvar READY_EVENT = 'readystatechange';\nfunction isDocumentReady(doc) {\n return (doc.readyState === 'complete' ||\n doc.readyState === requiredReadyState);\n}\n\n// call <callback> when we ensure the document is in a ready state\nfunction whenDocumentReady(callback, doc) {\n if (!isDocumentReady(doc)) {\n var checkReady = function() {\n if (doc.readyState === 'complete' || \n doc.readyState === requiredReadyState) {\n doc.removeEventListener(READY_EVENT, checkReady);\n whenDocumentReady(callback, doc);\n }\n }\n doc.addEventListener(READY_EVENT, checkReady);\n } else if (callback) {\n callback();\n }\n}\n\n// call <callback> when we ensure all imports have loaded\nfunction watchImportsLoad(callback, doc) {\n var imports = doc.querySelectorAll('link[rel=import]');\n var loaded = 0, l = imports.length;\n function checkDone(d) { \n if (loaded == l) {\n callback && callback();\n }\n }\n function loadedImport(e) {\n loaded++;\n checkDone();\n }\n if (l) {\n for (var i=0, imp; (i<l) && (imp=imports[i]); i++) {\n if (isImportLoaded(imp)) {\n loadedImport.call(imp);\n } else {\n imp.addEventListener('load', loadedImport);\n imp.addEventListener('error', loadedImport);\n }\n }\n } else {\n checkDone();\n }\n}\n\nfunction isImportLoaded(link) {\n return useNative ? (link.import && (link.import.readyState !== 'loading')) || link.__loaded :\n link.__importParsed;\n}\n\n// TODO(sorvell): install a mutation observer to see if HTMLImports have loaded\n// this is a workaround for https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007\n// and should be removed when this bug is addressed.\nif (useNative) {\n new MutationObserver(function(mxns) {\n for (var i=0, l=mxns.length, m; (i < l) && (m=mxns[i]); i++) {\n if (m.addedNodes) {\n handleImports(m.addedNodes);\n }\n }\n }).observe(document.head, {childList: true});\n\n function handleImports(nodes) {\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n if (isImport(n)) {\n handleImport(n); \n }\n }\n }\n\n function isImport(element) {\n return element.localName === 'link' && element.rel === 'import';\n }\n\n function handleImport(element) {\n var loaded = element.import;\n if (loaded) {\n markTargetLoaded({target: element});\n } else {\n element.addEventListener('load', markTargetLoaded);\n element.addEventListener('error', markTargetLoaded);\n }\n }\n\n function markTargetLoaded(event) {\n event.target.__loaded = true;\n }\n\n}\n\n// exports\nscope.hasNative = hasNative;\nscope.useNative = useNative;\nscope.importer = importer;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\nscope.isImportLoaded = isImportLoaded;\nscope.importLoader = importLoader;\nscope.whenReady = whenImportsReady;\n\n// deprecated\nscope.whenImportsReady = whenImportsReady;\n\n})(window.HTMLImports);\n"," /*\nCopyright 2013 The Polymer Authors. All rights reserved.\nUse of this source code is governed by a BSD-style\nlicense that can be found in the LICENSE file.\n*/\n\n(function(scope){\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\nvar importSelector = 'link[rel=' + IMPORT_LINK_TYPE + ']';\nvar importer = scope.importer;\nvar parser = scope.parser;\n\n// we track mutations for addedNodes, looking for imports\nfunction handler(mutations) {\n for (var i=0, l=mutations.length, m; (i<l) && (m=mutations[i]); i++) {\n if (m.type === 'childList' && m.addedNodes.length) {\n addedNodes(m.addedNodes);\n }\n }\n}\n\n// find loadable elements and add them to the importer\nfunction addedNodes(nodes) {\n var owner;\n for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {\n owner = owner || n.ownerDocument;\n if (shouldLoadNode(n)) {\n importer.loadNode(n);\n }\n if (n.children && n.children.length) {\n addedNodes(n.children);\n }\n }\n // TODO(sorvell): This is not the right approach here. We shouldn't need to\n // invalidate parsing when an element is added. Disabling this code \n // until a better approach is found.\n /*\n if (owner) {\n parser.invalidateParse(owner);\n }\n */\n}\n\nfunction shouldLoadNode(node) {\n return (node.nodeType === 1) && matches.call(node,\n importer.loadSelectorsForNode(node));\n}\n\n// x-plat matches\nvar matches = HTMLElement.prototype.matches || \n HTMLElement.prototype.matchesSelector || \n HTMLElement.prototype.webkitMatchesSelector ||\n HTMLElement.prototype.mozMatchesSelector ||\n HTMLElement.prototype.msMatchesSelector;\n\nvar observer = new MutationObserver(handler);\n\n// observe the given root for loadable elements\nfunction observe(root) {\n observer.observe(root, {childList: true, subtree: true});\n}\n\n// exports\n// TODO(sorvell): factor so can put on scope\nscope.observe = observe;\nimporter.observe = observe;\n\n})(HTMLImports);\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(){\n\n// bootstrap\n\n// IE shim for CustomEvent\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, dictionary) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType,\n dictionary.bubbles === false ? false : true,\n dictionary.cancelable === false ? false : true,\n dictionary.detail);\n return e;\n };\n}\n\n// TODO(sorvell): SD polyfill intrusion\nvar doc = window.ShadowDOMPolyfill ? \n window.ShadowDOMPolyfill.wrapIfNeeded(document) : document;\n\n// Fire the 'HTMLImportsLoaded' event when imports in document at load time \n// have loaded. This event is required to simulate the script blocking \n// behavior of native imports. A main document script that needs to be sure\n// imports have loaded should wait for this event.\nHTMLImports.whenImportsReady(function() {\n HTMLImports.ready = true;\n HTMLImports.readyTime = new Date().getTime();\n doc.dispatchEvent(\n new CustomEvent('HTMLImportsLoaded', {bubbles: true})\n );\n});\n\n\n// no need to bootstrap the polyfill when native imports is available.\nif (!HTMLImports.useNative) {\n function bootstrap() {\n HTMLImports.importer.bootDocument(doc);\n }\n \n // TODO(sorvell): SD polyfill does *not* generate mutations for nodes added\n // by the parser. For this reason, we must wait until the dom exists to \n // bootstrap.\n if (document.readyState === 'complete' ||\n (document.readyState === 'interactive' && !window.attachEvent)) {\n bootstrap();\n } else {\n document.addEventListener('DOMContentLoaded', bootstrap);\n }\n}\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.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 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 */\nwindow.CustomElements = window.CustomElements || {flags:{}};","/*\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 http://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 found at http://polymer.github.io/PATENTS.txt\r\n */\r\n\r\n(function(scope){\r\n\r\nvar logFlags = window.logFlags || {};\r\nvar IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : 'none';\r\n\r\n// walk the subtree rooted at node, applying 'find(element, data)' function\r\n// to each element\r\n// if 'find' returns true for 'element', do not search element's subtree\r\nfunction findAll(node, find, data) {\r\n var e = node.firstElementChild;\r\n if (!e) {\r\n e = node.firstChild;\r\n while (e && e.nodeType !== Node.ELEMENT_NODE) {\r\n e = e.nextSibling;\r\n }\r\n }\r\n while (e) {\r\n if (find(e, data) !== true) {\r\n findAll(e, find, data);\r\n }\r\n e = e.nextElementSibling;\r\n }\r\n return null;\r\n}\r\n\r\n// walk all shadowRoots on a given node.\r\nfunction forRoots(node, cb) {\r\n var root = node.shadowRoot;\r\n while(root) {\r\n forSubtree(root, cb);\r\n root = root.olderShadowRoot;\r\n }\r\n}\r\n\r\n// walk the subtree rooted at node, including descent into shadow-roots,\r\n// applying 'cb' to each element\r\nfunction forSubtree(node, cb) {\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.group('subTree: ', node);\r\n findAll(node, function(e) {\r\n if (cb(e)) {\r\n return true;\r\n }\r\n forRoots(e, cb);\r\n });\r\n forRoots(node, cb);\r\n //logFlags.dom && node.childNodes && node.childNodes.length && console.groupEnd();\r\n}\r\n\r\n// manage lifecycle on added node\r\nfunction added(node) {\r\n if (upgrade(node)) {\r\n insertedNode(node);\r\n return true;\r\n }\r\n inserted(node);\r\n}\r\n\r\n// manage lifecycle on added node's subtree only\r\nfunction addedSubtree(node) {\r\n forSubtree(node, function(e) {\r\n if (added(e)) {\r\n return true;\r\n }\r\n });\r\n}\r\n\r\n// manage lifecycle on added node and it's subtree\r\nfunction addedNode(node) {\r\n return added(node) || addedSubtree(node);\r\n}\r\n\r\n// upgrade custom elements at node, if applicable\r\nfunction upgrade(node) {\r\n if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {\r\n var type = node.getAttribute('is') || node.localName;\r\n var definition = scope.registry[type];\r\n if (definition) {\r\n logFlags.dom && console.group('upgrade:', node.localName);\r\n scope.upgrade(node);\r\n logFlags.dom && console.groupEnd();\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction insertedNode(node) {\r\n inserted(node);\r\n if (inDocument(node)) {\r\n forSubtree(node, function(e) {\r\n inserted(e);\r\n });\r\n }\r\n}\r\n\r\n// TODO(sorvell): on platforms without MutationObserver, mutations may not be\r\n// reliable and therefore attached/detached are not reliable.\r\n// To make these callbacks less likely to fail, we defer all inserts and removes\r\n// to give a chance for elements to be inserted into dom.\r\n// This ensures attachedCallback fires for elements that are created and\r\n// immediately added to dom.\r\nvar hasPolyfillMutations = (!window.MutationObserver ||\r\n (window.MutationObserver === window.JsMutationObserver));\r\nscope.hasPolyfillMutations = hasPolyfillMutations;\r\n\r\nvar isPendingMutations = false;\r\nvar pendingMutations = [];\r\nfunction deferMutation(fn) {\r\n pendingMutations.push(fn);\r\n if (!isPendingMutations) {\r\n isPendingMutations = true;\r\n var async = (window.Platform && window.Platform.endOfMicrotask) ||\r\n setTimeout;\r\n async(takeMutations);\r\n }\r\n}\r\n\r\nfunction takeMutations() {\r\n isPendingMutations = false;\r\n var $p = pendingMutations;\r\n for (var i=0, l=$p.length, p; (i<l) && (p=$p[i]); i++) {\r\n p();\r\n }\r\n pendingMutations = [];\r\n}\r\n\r\nfunction inserted(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _inserted(element);\r\n });\r\n } else {\r\n _inserted(element);\r\n }\r\n}\r\n\r\n// TODO(sjmiles): if there are descents into trees that can never have inDocument(*) true, fix this\r\nfunction _inserted(element) {\r\n // TODO(sjmiles): it's possible we were inserted and removed in the space\r\n // of one microtask, in which case we won't be 'inDocument' here\r\n // But there are other cases where we are testing for inserted without\r\n // specific knowledge of mutations, and must test 'inDocument' to determine\r\n // whether to call inserted\r\n // If we can factor these cases into separate code paths we can have\r\n // better diagnostics.\r\n // TODO(sjmiles): when logging, do work on all custom elements so we can\r\n // track behavior even when callbacks not defined\r\n //console.log('inserted: ', element.localName);\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('inserted:', element.localName);\r\n if (inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) + 1;\r\n // if we are in a 'removed' state, bluntly adjust to an 'inserted' state\r\n if (element.__inserted < 1) {\r\n element.__inserted = 1;\r\n }\r\n // if we are 'over inserted', squelch the callback\r\n if (element.__inserted > 1) {\r\n logFlags.dom && console.warn('inserted:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.attachedCallback) {\r\n logFlags.dom && console.log('inserted:', element.localName);\r\n element.attachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\nfunction removedNode(node) {\r\n removed(node);\r\n forSubtree(node, function(e) {\r\n removed(e);\r\n });\r\n}\r\n\r\nfunction removed(element) {\r\n if (hasPolyfillMutations) {\r\n deferMutation(function() {\r\n _removed(element);\r\n });\r\n } else {\r\n _removed(element);\r\n }\r\n}\r\n\r\nfunction _removed(element) {\r\n // TODO(sjmiles): temporary: do work on all custom elements so we can track\r\n // behavior even when callbacks not defined\r\n if (element.attachedCallback || element.detachedCallback || (element.__upgraded__ && logFlags.dom)) {\r\n logFlags.dom && console.group('removed:', element.localName);\r\n if (!inDocument(element)) {\r\n element.__inserted = (element.__inserted || 0) - 1;\r\n // if we are in a 'inserted' state, bluntly adjust to an 'removed' state\r\n if (element.__inserted > 0) {\r\n element.__inserted = 0;\r\n }\r\n // if we are 'over removed', squelch the callback\r\n if (element.__inserted < 0) {\r\n logFlags.dom && console.warn('removed:', element.localName,\r\n 'insert/remove count:', element.__inserted)\r\n } else if (element.detachedCallback) {\r\n element.detachedCallback();\r\n }\r\n }\r\n logFlags.dom && console.groupEnd();\r\n }\r\n}\r\n\r\n// SD polyfill intrustion due mainly to the fact that 'document'\r\n// is not entirely wrapped\r\nfunction wrapIfNeeded(node) {\r\n return window.ShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node)\r\n : node;\r\n}\r\n\r\nfunction inDocument(element) {\r\n var p = element;\r\n var doc = wrapIfNeeded(document);\r\n while (p) {\r\n if (p == doc) {\r\n return true;\r\n }\r\n p = p.parentNode || p.host;\r\n }\r\n}\r\n\r\nfunction watchShadow(node) {\r\n if (node.shadowRoot && !node.shadowRoot.__watched) {\r\n logFlags.dom && console.log('watching shadow-root for: ', node.localName);\r\n // watch all unwatched roots...\r\n var root = node.shadowRoot;\r\n while (root) {\r\n watchRoot(root);\r\n root = root.olderShadowRoot;\r\n }\r\n }\r\n}\r\n\r\nfunction watchRoot(root) {\r\n if (!root.__watched) {\r\n observe(root);\r\n root.__watched = true;\r\n }\r\n}\r\n\r\nfunction handler(mutations) {\r\n //\r\n if (logFlags.dom) {\r\n var mx = mutations[0];\r\n if (mx && mx.type === 'childList' && mx.addedNodes) {\r\n if (mx.addedNodes) {\r\n var d = mx.addedNodes[0];\r\n while (d && d !== document && !d.host) {\r\n d = d.parentNode;\r\n }\r\n var u = d && (d.URL || d._URL || (d.host && d.host.localName)) || '';\r\n u = u.split('/?').shift().split('/').pop();\r\n }\r\n }\r\n console.group('mutations (%d) [%s]', mutations.length, u || '');\r\n }\r\n //\r\n mutations.forEach(function(mx) {\r\n //logFlags.dom && console.group('mutation');\r\n if (mx.type === 'childList') {\r\n forEach(mx.addedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n // nodes added may need lifecycle management\r\n addedNode(n);\r\n });\r\n // removed nodes may need lifecycle management\r\n forEach(mx.removedNodes, function(n) {\r\n //logFlags.dom && console.log(n.localName);\r\n if (!n.localName) {\r\n return;\r\n }\r\n removedNode(n);\r\n });\r\n }\r\n //logFlags.dom && console.groupEnd();\r\n });\r\n logFlags.dom && console.groupEnd();\r\n};\r\n\r\nvar observer = new MutationObserver(handler);\r\n\r\nfunction takeRecords() {\r\n // TODO(sjmiles): ask Raf why we have to call handler ourselves\r\n handler(observer.takeRecords());\r\n takeMutations();\r\n}\r\n\r\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\r\n\r\nfunction observe(inRoot) {\r\n observer.observe(inRoot, {childList: true, subtree: true});\r\n}\r\n\r\nfunction observeDocument(doc) {\r\n observe(doc);\r\n}\r\n\r\nfunction upgradeDocument(doc) {\r\n logFlags.dom && console.group('upgradeDocument: ', (doc.baseURI).split('/').pop());\r\n addedNode(doc);\r\n logFlags.dom && console.groupEnd();\r\n}\r\n\r\nfunction upgradeDocumentTree(doc) {\r\n doc = wrapIfNeeded(doc);\r\n //console.log('upgradeDocumentTree: ', (doc.baseURI).split('/').pop());\r\n // upgrade contained imported documents\r\n var imports = doc.querySelectorAll('link[rel=' + IMPORT_LINK_TYPE + ']');\r\n for (var i=0, l=imports.length, n; (i<l) && (n=imports[i]); i++) {\r\n if (n.import && n.import.__parsed) {\r\n upgradeDocumentTree(n.import);\r\n }\r\n }\r\n upgradeDocument(doc);\r\n}\r\n\r\n// exports\r\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\r\nscope.watchShadow = watchShadow;\r\nscope.upgradeDocumentTree = upgradeDocumentTree;\r\nscope.upgradeAll = addedNode;\r\nscope.upgradeSubtree = addedSubtree;\r\nscope.insertedNode = insertedNode;\r\n\r\nscope.observeDocument = observeDocument;\r\nscope.upgradeDocument = upgradeDocument;\r\n\r\nscope.takeRecords = takeRecords;\r\n\r\n})(window.CustomElements);\r\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://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/**\n * Implements `document.registerElement`\n * @module CustomElements\n*/\n\n/**\n * Polyfilled extensions to the `document` object.\n * @class Document\n*/\n\n(function(scope) {\n\n// imports\n\nif (!scope) {\n scope = window.CustomElements = {flags:{}};\n}\nvar flags = scope.flags;\n\n// native document.registerElement?\n\nvar hasNative = Boolean(document.registerElement);\n// For consistent timing, use native custom elements only when not polyfilling\n// other key related web components features.\nvar useNative = !flags.register && hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);\n\nif (useNative) {\n\n // stub\n var nop = function() {};\n\n // exports\n scope.registry = {};\n scope.upgradeElement = nop;\n\n scope.watchShadow = nop;\n scope.upgrade = nop;\n scope.upgradeAll = nop;\n scope.upgradeSubtree = nop;\n scope.observeDocument = nop;\n scope.upgradeDocument = nop;\n scope.upgradeDocumentTree = nop;\n scope.takeRecords = nop;\n scope.reservedTagList = [];\n\n} else {\n\n /**\n * Registers a custom tag name with the document.\n *\n * When a registered element is created, a `readyCallback` method is called\n * in the scope of the element. The `readyCallback` method can be specified on\n * either `options.prototype` or `options.lifecycle` with the latter taking\n * precedence.\n *\n * @method register\n * @param {String} name The tag name to register. Must include a dash ('-'),\n * for example 'x-component'.\n * @param {Object} options\n * @param {String} [options.extends]\n * (_off spec_) Tag name of an element to extend (or blank for a new\n * element). This parameter is not part of the specification, but instead\n * is a hint for the polyfill because the extendee is difficult to infer.\n * Remember that the input prototype must chain to the extended element's\n * prototype (or HTMLElement.prototype) regardless of the value of\n * `extends`.\n * @param {Object} options.prototype The prototype to use for the new\n * element. The prototype must inherit from HTMLElement.\n * @param {Object} [options.lifecycle]\n * Callbacks that fire at important phases in the life of the custom\n * element.\n *\n * @example\n * FancyButton = document.registerElement(\"fancy-button\", {\n * extends: 'button',\n * prototype: Object.create(HTMLButtonElement.prototype, {\n * readyCallback: {\n * value: function() {\n * console.log(\"a fancy-button was created\",\n * }\n * }\n * })\n * });\n * @return {Function} Constructor for the newly registered type.\n */\n function register(name, options) {\n //console.warn('document.registerElement(\"' + name + '\", ', options, ')');\n // construct a defintion out of options\n // TODO(sjmiles): probably should clone options instead of mutating it\n var definition = options || {};\n if (!name) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument `name` must not be empty');\n }\n if (name.indexOf('-') < 0) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('document.registerElement: first argument (\\'name\\') must contain a dash (\\'-\\'). Argument provided was \\'' + String(name) + '\\'.');\n }\n // prevent registering reserved names\n if (isReservedTag(name)) {\n throw new Error('Failed to execute \\'registerElement\\' on \\'Document\\': Registration failed for type \\'' + String(name) + '\\'. The type name is invalid.');\n }\n // elements may only be registered once\n if (getRegisteredDefinition(name)) {\n throw new Error('DuplicateDefinitionError: a type with name \\'' + String(name) + '\\' is already registered');\n }\n // must have a prototype, default to an extension of HTMLElement\n // TODO(sjmiles): probably should throw if no prototype, check spec\n if (!definition.prototype) {\n // TODO(sjmiles): replace with more appropriate error (EricB can probably\n // offer guidance)\n throw new Error('Options missing required prototype property');\n }\n // record name\n definition.__name = name.toLowerCase();\n // ensure a lifecycle object so we don't have to null test it\n definition.lifecycle = definition.lifecycle || {};\n // build a list of ancestral custom elements (for native base detection)\n // TODO(sjmiles): we used to need to store this, but current code only\n // uses it in 'resolveTagName': it should probably be inlined\n definition.ancestry = ancestry(definition.extends);\n // extensions of native specializations of HTMLElement require localName\n // to remain native, and use secondary 'is' specifier for extension type\n resolveTagName(definition);\n // some platforms require modifications to the user-supplied prototype\n // chain\n resolvePrototypeChain(definition);\n // overrides to implement attributeChanged callback\n overrideAttributeApi(definition.prototype);\n // 7.1.5: Register the DEFINITION with DOCUMENT\n registerDefinition(definition.__name, definition);\n // 7.1.7. Run custom element constructor generation algorithm with PROTOTYPE\n // 7.1.8. Return the output of the previous step.\n definition.ctor = generateConstructor(definition);\n definition.ctor.prototype = definition.prototype;\n // force our .constructor to be our actual constructor\n definition.prototype.constructor = definition.ctor;\n // if initial parsing is complete\n if (scope.ready) {\n // upgrade any pre-existing nodes of this type\n scope.upgradeDocumentTree(document);\n }\n return definition.ctor;\n }\n\n function isReservedTag(name) {\n for (var i = 0; i < reservedTagList.length; i++) {\n if (name === reservedTagList[i]) {\n return true;\n }\n }\n }\n\n var reservedTagList = [\n 'annotation-xml', 'color-profile', 'font-face', 'font-face-src',\n 'font-face-uri', 'font-face-format', 'font-face-name', 'missing-glyph'\n ];\n\n function ancestry(extnds) {\n var extendee = getRegisteredDefinition(extnds);\n if (extendee) {\n return ancestry(extendee.extends).concat([extendee]);\n }\n return [];\n }\n\n function resolveTagName(definition) {\n // if we are explicitly extending something, that thing is our\n // baseTag, unless it represents a custom component\n var baseTag = definition.extends;\n // if our ancestry includes custom components, we only have a\n // baseTag if one of them does\n for (var i=0, a; (a=definition.ancestry[i]); i++) {\n baseTag = a.is && a.tag;\n }\n // our tag is our baseTag, if it exists, and otherwise just our name\n definition.tag = baseTag || definition.__name;\n if (baseTag) {\n // if there is a base tag, use secondary 'is' specifier\n definition.is = definition.__name;\n }\n }\n\n function resolvePrototypeChain(definition) {\n // if we don't support __proto__ we need to locate the native level\n // prototype for precise mixing in\n if (!Object.__proto__) {\n // default prototype\n var nativePrototype = HTMLElement.prototype;\n // work out prototype when using type-extension\n if (definition.is) {\n var inst = document.createElement(definition.tag);\n var expectedPrototype = Object.getPrototypeOf(inst);\n // only set nativePrototype if it will actually appear in the definition's chain\n if (expectedPrototype === definition.prototype) {\n nativePrototype = expectedPrototype;\n }\n }\n // ensure __proto__ reference is installed at each point on the prototype\n // chain.\n // NOTE: On platforms without __proto__, a mixin strategy is used instead\n // of prototype swizzling. In this case, this generated __proto__ provides\n // limited support for prototype traversal.\n var proto = definition.prototype, ancestor;\n while (proto && (proto !== nativePrototype)) {\n ancestor = Object.getPrototypeOf(proto);\n proto.__proto__ = ancestor;\n proto = ancestor;\n }\n // cache this in case of mixin\n definition.native = nativePrototype;\n }\n }\n\n // SECTION 4\n\n function instantiate(definition) {\n // 4.a.1. Create a new object that implements PROTOTYPE\n // 4.a.2. Let ELEMENT by this new object\n //\n // the custom element instantiation algorithm must also ensure that the\n // output is a valid DOM element with the proper wrapper in place.\n //\n return upgrade(domCreateElement(definition.tag), definition);\n }\n\n function upgrade(element, definition) {\n // some definitions specify an 'is' attribute\n if (definition.is) {\n element.setAttribute('is', definition.is);\n }\n // make 'element' implement definition.prototype\n implement(element, definition);\n // flag as upgraded\n element.__upgraded__ = true;\n // lifecycle management\n created(element);\n // attachedCallback fires in tree order, call before recursing\n scope.insertedNode(element);\n // there should never be a shadow root on element at this point\n scope.upgradeSubtree(element);\n // OUTPUT\n return element;\n }\n\n function implement(element, definition) {\n // prototype swizzling is best\n if (Object.__proto__) {\n element.__proto__ = definition.prototype;\n } else {\n // where above we can re-acquire inPrototype via\n // getPrototypeOf(Element), we cannot do so when\n // we use mixin, so we install a magic reference\n customMixin(element, definition.prototype, definition.native);\n element.__proto__ = definition.prototype;\n }\n }\n\n function customMixin(inTarget, inSrc, inNative) {\n // TODO(sjmiles): 'used' allows us to only copy the 'youngest' version of\n // any property. This set should be precalculated. We also need to\n // consider this for supporting 'super'.\n var used = {};\n // start with inSrc\n var p = inSrc;\n // The default is HTMLElement.prototype, so we add a test to avoid mixing in\n // native prototypes\n while (p !== inNative && p !== HTMLElement.prototype) {\n var keys = Object.getOwnPropertyNames(p);\n for (var i=0, k; k=keys[i]; i++) {\n if (!used[k]) {\n Object.defineProperty(inTarget, k,\n Object.getOwnPropertyDescriptor(p, k));\n used[k] = 1;\n }\n }\n p = Object.getPrototypeOf(p);\n }\n }\n\n function created(element) {\n // invoke createdCallback\n if (element.createdCallback) {\n element.createdCallback();\n }\n }\n\n // attribute watching\n\n function overrideAttributeApi(prototype) {\n // overrides to implement callbacks\n // TODO(sjmiles): should support access via .attributes NamedNodeMap\n // TODO(sjmiles): preserves user defined overrides, if any\n if (prototype.setAttribute._polyfilled) {\n return;\n }\n var setAttribute = prototype.setAttribute;\n prototype.setAttribute = function(name, value) {\n changeAttribute.call(this, name, value, setAttribute);\n }\n var removeAttribute = prototype.removeAttribute;\n prototype.removeAttribute = function(name) {\n changeAttribute.call(this, name, null, removeAttribute);\n }\n prototype.setAttribute._polyfilled = true;\n }\n\n // https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/\n // index.html#dfn-attribute-changed-callback\n function changeAttribute(name, value, operation) {\n name = name.toLowerCase();\n var oldValue = this.getAttribute(name);\n operation.apply(this, arguments);\n var newValue = this.getAttribute(name);\n if (this.attributeChangedCallback\n && (newValue !== oldValue)) {\n this.attributeChangedCallback(name, oldValue, newValue);\n }\n }\n\n // element registry (maps tag names to definitions)\n\n var registry = {};\n\n function getRegisteredDefinition(name) {\n if (name) {\n return registry[name.toLowerCase()];\n }\n }\n\n function registerDefinition(name, definition) {\n registry[name] = definition;\n }\n\n function generateConstructor(definition) {\n return function() {\n return instantiate(definition);\n };\n }\n\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n function createElementNS(namespace, tag, typeExtension) {\n // NOTE: we do not support non-HTML elements,\n // just call createElementNS for non HTML Elements\n if (namespace === HTML_NAMESPACE) {\n return createElement(tag, typeExtension);\n } else {\n return domCreateElementNS(namespace, tag);\n }\n }\n\n function createElement(tag, typeExtension) {\n // TODO(sjmiles): ignore 'tag' when using 'typeExtension', we could\n // error check it, or perhaps there should only ever be one argument\n var definition = getRegisteredDefinition(typeExtension || tag);\n if (definition) {\n if (tag == definition.tag && typeExtension == definition.is) {\n return new definition.ctor();\n }\n // Handle empty string for type extension.\n if (!typeExtension && !definition.is) {\n return new definition.ctor();\n }\n }\n\n if (typeExtension) {\n var element = createElement(tag);\n element.setAttribute('is', typeExtension);\n return element;\n }\n var element = domCreateElement(tag);\n // Custom tags should be HTMLElements even if not upgraded.\n if (tag.indexOf('-') >= 0) {\n implement(element, HTMLElement);\n }\n return element;\n }\n\n function upgradeElement(element) {\n if (!element.__upgraded__ && (element.nodeType === Node.ELEMENT_NODE)) {\n var is = element.getAttribute('is');\n var definition = getRegisteredDefinition(is || element.localName);\n if (definition) {\n if (is && definition.tag == element.localName) {\n return upgrade(element, definition);\n } else if (!is && !definition.extends) {\n return upgrade(element, definition);\n }\n }\n }\n }\n\n function cloneNode(deep) {\n // call original clone\n var n = domCloneNode.call(this, deep);\n // upgrade the element and subtree\n scope.upgradeAll(n);\n // return the clone\n return n;\n }\n // capture native createElement before we override it\n\n var domCreateElement = document.createElement.bind(document);\n var domCreateElementNS = document.createElementNS.bind(document);\n\n // capture native cloneNode before we override it\n\n var domCloneNode = Node.prototype.cloneNode;\n\n // exports\n\n document.registerElement = register;\n document.createElement = createElement; // override\n document.createElementNS = createElementNS; // override\n Node.prototype.cloneNode = cloneNode; // override\n\n scope.registry = registry;\n\n /**\n * Upgrade an element to a custom element. Upgrading an element\n * causes the custom prototype to be applied, an `is` attribute\n * to be attached (as needed), and invocation of the `readyCallback`.\n * `upgrade` does nothing if the element is already upgraded, or\n * if it matches no registered custom tag name.\n *\n * @method ugprade\n * @param {Element} element The element to upgrade.\n * @return {Element} The upgraded element.\n */\n scope.upgrade = upgradeElement;\n}\n\n// Create a custom 'instanceof'. This is necessary when CustomElements\n// are implemented via a mixin strategy, as for example on IE10.\nvar isInstance;\nif (!Object.__proto__ && !useNative) {\n isInstance = function(obj, ctor) {\n var p = obj;\n while (p) {\n // NOTE: this is not technically correct since we're not checking if\n // an object is an instance of a constructor; however, this should\n // be good enough for the mixin strategy.\n if (p === ctor.prototype) {\n return true;\n }\n p = p.__proto__;\n }\n return false;\n }\n} else {\n isInstance = function(obj, base) {\n return obj instanceof base;\n }\n}\n\n// exports\nscope.instanceof = isInstance;\nscope.reservedTagList = reservedTagList;\n\n// bc\ndocument.register = document.registerElement;\n\nscope.hasNative = hasNative;\nscope.useNative = useNative;\n\n})(window.CustomElements);\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://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(function(scope) {\n\n// import\n\nvar IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;\n\n// highlander object for parsing a document tree\n\nvar parser = {\n selectors: [\n 'link[rel=' + IMPORT_LINK_TYPE + ']'\n ],\n map: {\n link: 'parseLink'\n },\n parse: function(inDocument) {\n if (!inDocument.__parsed) {\n // only parse once\n inDocument.__parsed = true;\n // all parsable elements in inDocument (depth-first pre-order traversal)\n var elts = inDocument.querySelectorAll(parser.selectors);\n // for each parsable node type, call the mapped parsing method\n forEach(elts, function(e) {\n parser[parser.map[e.localName]](e);\n });\n // upgrade all upgradeable static elements, anything dynamically\n // created should be caught by observer\n CustomElements.upgradeDocument(inDocument);\n // observe document for dom changes\n CustomElements.observeDocument(inDocument);\n }\n },\n parseLink: function(linkElt) {\n // imports\n if (isDocumentLink(linkElt)) {\n this.parseImport(linkElt);\n }\n },\n parseImport: function(linkElt) {\n if (linkElt.import) {\n parser.parse(linkElt.import);\n }\n }\n};\n\nfunction isDocumentLink(inElt) {\n return (inElt.localName === 'link'\n && inElt.getAttribute('rel') === IMPORT_LINK_TYPE);\n}\n\nvar forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n// exports\n\nscope.parser = parser;\nscope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;\n\n})(window.CustomElements);","/*\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://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(function(scope){\n\n// bootstrap parsing\nfunction bootstrap() {\n // parse document\n CustomElements.parser.parse(document);\n // one more pass before register is 'live'\n CustomElements.upgradeDocument(document);\n // choose async\n var async = window.Platform && Platform.endOfMicrotask ? \n Platform.endOfMicrotask :\n setTimeout;\n async(function() {\n // set internal 'ready' flag, now document.registerElement will trigger \n // synchronous upgrades\n CustomElements.ready = true;\n // capture blunt profiling data\n CustomElements.readyTime = Date.now();\n if (window.HTMLImports) {\n CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;\n }\n // notify the system that we are bootstrapped\n document.dispatchEvent(\n new CustomEvent('WebComponentsReady', {bubbles: true})\n );\n\n // install upgrade hook if HTMLImports are available\n if (window.HTMLImports) {\n HTMLImports.__importsParsingHook = function(elt) {\n CustomElements.parser.parse(elt.import);\n }\n }\n });\n}\n\n// CustomEvent shim for IE\nif (typeof window.CustomEvent !== 'function') {\n window.CustomEvent = function(inType, params) {\n params = params || {};\n var e = document.createEvent('CustomEvent');\n e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);\n return e;\n };\n window.CustomEvent.prototype = window.Event.prototype;\n}\n\n// When loading at readyState complete time (or via flag), boot custom elements\n// immediately.\n// If relevant, HTMLImports must already be loaded.\nif (document.readyState === 'complete' || scope.flags.eager) {\n bootstrap();\n// When loading at readyState interactive time, bootstrap only if HTMLImports\n// are not pending. Also avoid IE as the semantics of this state are unreliable.\n} else if (document.readyState === 'interactive' && !window.attachEvent &&\n (!window.HTMLImports || window.HTMLImports.ready)) {\n bootstrap();\n// When loading at other readyStates, wait for the appropriate DOM event to \n// bootstrap.\n} else {\n var loadEvent = window.HTMLImports && !HTMLImports.ready ?\n 'HTMLImportsLoaded' : 'DOMContentLoaded';\n window.addEventListener(loadEvent, bootstrap);\n}\n\n})(window.CustomElements);\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://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(function() {\n\nif (window.ShadowDOMPolyfill) {\n\n // ensure wrapped inputs for these functions\n var fns = ['upgradeAll', 'upgradeSubtree', 'observeDocument',\n 'upgradeDocument'];\n\n // cache originals\n var original = {};\n fns.forEach(function(fn) {\n original[fn] = CustomElements[fn];\n });\n\n // override\n fns.forEach(function(fn) {\n CustomElements[fn] = function(inNode) {\n return original[fn](wrap(inNode));\n };\n });\n\n}\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.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 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 endOfMicrotask = scope.endOfMicrotask;\n\n // Generic url loader\n function Loader(regex) {\n this.cache = Object.create(null);\n this.map = Object.create(null);\n this.requests = 0;\n this.regex = regex;\n }\n Loader.prototype = {\n\n // TODO(dfreedm): there may be a better factoring here\n // extract absolute urls from the text (full of relative urls)\n extractUrls: function(text, base) {\n var matches = [];\n var matched, u;\n while ((matched = this.regex.exec(text))) {\n u = new URL(matched[1], base);\n matches.push({matched: matched[0], url: u.href});\n }\n return matches;\n },\n // take a text blob, a root url, and a callback and load all the urls found within the text\n // returns a map of absolute url to text\n process: function(text, root, callback) {\n var matches = this.extractUrls(text, root);\n\n // every call to process returns all the text this loader has ever received\n var done = callback.bind(null, this.map);\n this.fetch(matches, done);\n },\n // build a mapping of url -> text from matches\n fetch: function(matches, callback) {\n var inflight = matches.length;\n\n // return early if there is no fetching to be done\n if (!inflight) {\n return callback();\n }\n\n // wait for all subrequests to return\n var done = function() {\n if (--inflight === 0) {\n callback();\n }\n };\n\n // start fetching all subrequests\n var m, req, url;\n for (var i = 0; i < inflight; i++) {\n m = matches[i];\n url = m.url;\n req = this.cache[url];\n // if this url has already been requested, skip requesting it again\n if (!req) {\n req = this.xhr(url);\n req.match = m;\n this.cache[url] = req;\n }\n // wait for the request to process its subrequests\n req.wait(done);\n }\n },\n handleXhr: function(request) {\n var match = request.match;\n var url = match.url;\n\n // handle errors with an empty string\n var response = request.response || request.responseText || '';\n this.map[url] = response;\n this.fetch(this.extractUrls(response, url), request.resolve);\n },\n xhr: function(url) {\n this.requests++;\n var request = new XMLHttpRequest();\n request.open('GET', url, true);\n request.send();\n request.onerror = request.onload = this.handleXhr.bind(this, request);\n\n // queue of tasks to run after XHR returns\n request.pending = [];\n request.resolve = function() {\n var pending = request.pending;\n for(var i = 0; i < pending.length; i++) {\n pending[i]();\n }\n request.pending = null;\n };\n\n // if we have already resolved, pending is null, async call the callback\n request.wait = function(fn) {\n if (request.pending) {\n request.pending.push(fn);\n } else {\n endOfMicrotask(fn);\n }\n };\n\n return request;\n }\n };\n\n scope.Loader = Loader;\n})(window.Platform);\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://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(function(scope) {\n\nvar urlResolver = scope.urlResolver;\nvar Loader = scope.Loader;\n\nfunction StyleResolver() {\n this.loader = new Loader(this.regex);\n}\nStyleResolver.prototype = {\n regex: /@import\\s+(?:url)?[\"'\\(]*([^'\"\\)]*)['\"\\)]*;/g,\n // Recursively replace @imports with the text at that url\n resolve: function(text, url, callback) {\n var done = function(map) {\n callback(this.flatten(text, url, map));\n }.bind(this);\n this.loader.process(text, url, done);\n },\n // resolve the textContent of a style node\n resolveNode: function(style, url, callback) {\n var text = style.textContent;\n var done = function(text) {\n style.textContent = text;\n callback(style);\n };\n this.resolve(text, url, done);\n },\n // flatten all the @imports to text\n flatten: function(text, base, map) {\n var matches = this.loader.extractUrls(text, base);\n var match, url, intermediate;\n for (var i = 0; i < matches.length; i++) {\n match = matches[i];\n url = match.url;\n // resolve any css text to be relative to the importer, keep absolute url\n intermediate = urlResolver.resolveCssText(map[url], url, true);\n // flatten intermediate @imports\n intermediate = this.flatten(intermediate, base, map);\n text = text.replace(match.matched, intermediate);\n }\n return text;\n },\n loadStyles: function(styles, base, callback) {\n var loaded=0, l = styles.length;\n // called in the context of the style\n function loadedStyle(style) {\n loaded++;\n if (loaded === l && callback) {\n callback();\n }\n }\n for (var i=0, s; (i<l) && (s=styles[i]); i++) {\n this.resolveNode(s, base, loadedStyle);\n }\n }\n};\n\nvar styleResolver = new StyleResolver();\n\n// exports\nscope.styleResolver = styleResolver;\n\n})(window.Platform);\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://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(function(global) {\n 'use strict';\n\n var filter = Array.prototype.filter.call.bind(Array.prototype.filter);\n\n function getTreeScope(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n\n return typeof node.getElementById === 'function' ? node : null;\n }\n\n Node.prototype.bind = function(name, observable) {\n console.error('Unhandled binding to Node: ', this, name, observable);\n };\n\n Node.prototype.bindFinished = function() {};\n\n function updateBindings(node, name, binding) {\n var bindings = node.bindings_;\n if (!bindings)\n bindings = node.bindings_ = {};\n\n if (bindings[name])\n binding[name].close();\n\n return bindings[name] = binding;\n }\n\n function returnBinding(node, name, binding) {\n return binding;\n }\n\n function sanitizeValue(value) {\n return value == null ? '' : value;\n }\n\n function updateText(node, value) {\n node.data = sanitizeValue(value);\n }\n\n function textBinding(node) {\n return function(value) {\n return updateText(node, value);\n };\n }\n\n var maybeUpdateBindings = returnBinding;\n\n Object.defineProperty(Platform, 'enableBindingsReflection', {\n get: function() {\n return maybeUpdateBindings === updateBindings;\n },\n set: function(enable) {\n maybeUpdateBindings = enable ? updateBindings : returnBinding;\n return enable;\n },\n configurable: true\n });\n\n Text.prototype.bind = function(name, value, oneTime) {\n if (name !== 'textContent')\n return Node.prototype.bind.call(this, name, value, oneTime);\n\n if (oneTime)\n return updateText(this, value);\n\n var observable = value;\n updateText(this, observable.open(textBinding(this)));\n return maybeUpdateBindings(this, name, observable);\n }\n\n function updateAttribute(el, name, conditional, value) {\n if (conditional) {\n if (value)\n el.setAttribute(name, '');\n else\n el.removeAttribute(name);\n return;\n }\n\n el.setAttribute(name, sanitizeValue(value));\n }\n\n function attributeBinding(el, name, conditional) {\n return function(value) {\n updateAttribute(el, name, conditional, value);\n };\n }\n\n Element.prototype.bind = function(name, value, oneTime) {\n var conditional = name[name.length - 1] == '?';\n if (conditional) {\n this.removeAttribute(name);\n name = name.slice(0, -1);\n }\n\n if (oneTime)\n return updateAttribute(this, name, conditional, value);\n\n\n var observable = value;\n updateAttribute(this, name, conditional,\n observable.open(attributeBinding(this, name, conditional)));\n\n return maybeUpdateBindings(this, name, observable);\n };\n\n var checkboxEventType;\n (function() {\n // Attempt to feature-detect which event (change or click) is fired first\n // for checkboxes.\n var div = document.createElement('div');\n var checkbox = div.appendChild(document.createElement('input'));\n checkbox.setAttribute('type', 'checkbox');\n var first;\n var count = 0;\n checkbox.addEventListener('click', function(e) {\n count++;\n first = first || 'click';\n });\n checkbox.addEventListener('change', function() {\n count++;\n first = first || 'change';\n });\n\n var event = document.createEvent('MouseEvent');\n event.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 0, 0, false,\n false, false, false, 0, null);\n checkbox.dispatchEvent(event);\n // WebKit/Blink don't fire the change event if the element is outside the\n // document, so assume 'change' for that case.\n checkboxEventType = count == 1 ? 'change' : first;\n })();\n\n function getEventForInputType(element) {\n switch (element.type) {\n case 'checkbox':\n return checkboxEventType;\n case 'radio':\n case 'select-multiple':\n case 'select-one':\n return 'change';\n case 'range':\n if (/Trident|MSIE/.test(navigator.userAgent))\n return 'change';\n default:\n return 'input';\n }\n }\n\n function updateInput(input, property, value, santizeFn) {\n input[property] = (santizeFn || sanitizeValue)(value);\n }\n\n function inputBinding(input, property, santizeFn) {\n return function(value) {\n return updateInput(input, property, value, santizeFn);\n }\n }\n\n function noop() {}\n\n function bindInputEvent(input, property, observable, postEventFn) {\n var eventType = getEventForInputType(input);\n\n function eventHandler() {\n observable.setValue(input[property]);\n observable.discardChanges();\n (postEventFn || noop)(input);\n Platform.performMicrotaskCheckpoint();\n }\n input.addEventListener(eventType, eventHandler);\n\n return {\n close: function() {\n input.removeEventListener(eventType, eventHandler);\n observable.close();\n },\n\n observable_: observable\n }\n }\n\n function booleanSanitize(value) {\n return Boolean(value);\n }\n\n // |element| is assumed to be an HTMLInputElement with |type| == 'radio'.\n // Returns an array containing all radio buttons other than |element| that\n // have the same |name|, either in the form that |element| belongs to or,\n // if no form, in the document tree to which |element| belongs.\n //\n // This implementation is based upon the HTML spec definition of a\n // \"radio button group\":\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#radio-button-group\n //\n function getAssociatedRadioButtons(element) {\n if (element.form) {\n return filter(element.form.elements, function(el) {\n return el != element &&\n el.tagName == 'INPUT' &&\n el.type == 'radio' &&\n el.name == element.name;\n });\n } else {\n var treeScope = getTreeScope(element);\n if (!treeScope)\n return [];\n var radios = treeScope.querySelectorAll(\n 'input[type=\"radio\"][name=\"' + element.name + '\"]');\n return filter(radios, function(el) {\n return el != element && !el.form;\n });\n }\n }\n\n function checkedPostEvent(input) {\n // Only the radio button that is getting checked gets an event. We\n // therefore find all the associated radio buttons and update their\n // check binding manually.\n if (input.tagName === 'INPUT' &&\n input.type === 'radio') {\n getAssociatedRadioButtons(input).forEach(function(radio) {\n var checkedBinding = radio.bindings_.checked;\n if (checkedBinding) {\n // Set the value directly to avoid an infinite call stack.\n checkedBinding.observable_.setValue(false);\n }\n });\n }\n }\n\n HTMLInputElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value' && name !== 'checked')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;\n var postEventFn = name == 'checked' ? checkedPostEvent : noop;\n\n if (oneTime)\n return updateInput(this, name, value, sanitizeFn);\n\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable, postEventFn);\n updateInput(this, name,\n observable.open(inputBinding(this, name, sanitizeFn)),\n sanitizeFn);\n\n // Checkboxes may need to update bindings of other checkboxes.\n return updateBindings(this, name, binding);\n }\n\n HTMLTextAreaElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateInput(this, 'value', value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateInput(this, 'value',\n observable.open(inputBinding(this, 'value', sanitizeValue)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n function updateOption(option, value) {\n var parentNode = option.parentNode;;\n var select;\n var selectBinding;\n var oldValue;\n if (parentNode instanceof HTMLSelectElement &&\n parentNode.bindings_ &&\n parentNode.bindings_.value) {\n select = parentNode;\n selectBinding = select.bindings_.value;\n oldValue = select.value;\n }\n\n option.value = sanitizeValue(value);\n\n if (select && select.value != oldValue) {\n selectBinding.observable_.setValue(select.value);\n selectBinding.observable_.discardChanges();\n Platform.performMicrotaskCheckpoint();\n }\n }\n\n function optionBinding(option) {\n return function(value) {\n updateOption(option, value);\n }\n }\n\n HTMLOptionElement.prototype.bind = function(name, value, oneTime) {\n if (name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute('value');\n\n if (oneTime)\n return updateOption(this, value);\n\n var observable = value;\n var binding = bindInputEvent(this, 'value', observable);\n updateOption(this, observable.open(optionBinding(this)));\n return maybeUpdateBindings(this, name, binding);\n }\n\n HTMLSelectElement.prototype.bind = function(name, value, oneTime) {\n if (name === 'selectedindex')\n name = 'selectedIndex';\n\n if (name !== 'selectedIndex' && name !== 'value')\n return HTMLElement.prototype.bind.call(this, name, value, oneTime);\n\n this.removeAttribute(name);\n\n if (oneTime)\n return updateInput(this, name, value);\n\n var observable = value;\n var binding = bindInputEvent(this, name, observable);\n updateInput(this, name,\n observable.open(inputBinding(this, name)));\n\n // Option update events may need to access select bindings.\n return updateBindings(this, name, binding);\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 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 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(function(global) {\n 'use strict';\n\n function assert(v) {\n if (!v)\n throw new Error('Assertion failed');\n }\n\n var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n\n function getFragmentRoot(node) {\n var p;\n while (p = node.parentNode) {\n node = p;\n }\n\n return node;\n }\n\n function searchRefId(node, id) {\n if (!id)\n return;\n\n var ref;\n var selector = '#' + id;\n while (!ref) {\n node = getFragmentRoot(node);\n\n if (node.protoContent_)\n ref = node.protoContent_.querySelector(selector);\n else if (node.getElementById)\n ref = node.getElementById(id);\n\n if (ref || !node.templateCreator_)\n break\n\n node = node.templateCreator_;\n }\n\n return ref;\n }\n\n function getInstanceRoot(node) {\n while (node.parentNode) {\n node = node.parentNode;\n }\n return node.templateCreator_ ? node : null;\n }\n\n var Map;\n if (global.Map && typeof global.Map.prototype.forEach === 'function') {\n Map = global.Map;\n } else {\n Map = function() {\n this.keys = [];\n this.values = [];\n };\n\n Map.prototype = {\n set: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0) {\n this.keys.push(key);\n this.values.push(value);\n } else {\n this.values[index] = value;\n }\n },\n\n get: function(key) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return;\n\n return this.values[index];\n },\n\n delete: function(key, value) {\n var index = this.keys.indexOf(key);\n if (index < 0)\n return false;\n\n this.keys.splice(index, 1);\n this.values.splice(index, 1);\n return true;\n },\n\n forEach: function(f, opt_this) {\n for (var i = 0; i < this.keys.length; i++)\n f.call(opt_this || this, this.values[i], this.keys[i], this);\n }\n };\n }\n\n // JScript does not have __proto__. We wrap all object literals with\n // createObject which uses Object.create, Object.defineProperty and\n // Object.getOwnPropertyDescriptor to create a new object that does the exact\n // same thing. The main downside to this solution is that we have to extract\n // all those property descriptors for IE.\n var createObject = ('__proto__' in {}) ?\n function(obj) { return obj; } :\n function(obj) {\n var proto = obj.__proto__;\n if (!proto)\n return obj;\n var newObject = Object.create(proto);\n Object.getOwnPropertyNames(obj).forEach(function(name) {\n Object.defineProperty(newObject, name,\n Object.getOwnPropertyDescriptor(obj, name));\n });\n return newObject;\n };\n\n // IE does not support have Document.prototype.contains.\n if (typeof document.contains != 'function') {\n Document.prototype.contains = function(node) {\n if (node === this || node.parentNode === this)\n return true;\n return this.documentElement.contains(node);\n }\n }\n\n var BIND = 'bind';\n var REPEAT = 'repeat';\n var IF = 'if';\n\n var templateAttributeDirectives = {\n 'template': true,\n 'repeat': true,\n 'bind': true,\n 'ref': true\n };\n\n var semanticTemplateElements = {\n 'THEAD': true,\n 'TBODY': true,\n 'TFOOT': true,\n 'TH': true,\n 'TR': true,\n 'TD': true,\n 'COLGROUP': true,\n 'COL': true,\n 'CAPTION': true,\n 'OPTION': true,\n 'OPTGROUP': true\n };\n\n var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';\n if (hasTemplateElement) {\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n (function() {\n var t = document.createElement('template');\n var d = t.content.ownerDocument;\n var html = d.appendChild(d.createElement('html'));\n var head = html.appendChild(d.createElement('head'));\n var base = d.createElement('base');\n base.href = document.baseURI;\n head.appendChild(base);\n })();\n }\n\n var allTemplatesSelectors = 'template, ' +\n Object.keys(semanticTemplateElements).map(function(tagName) {\n return tagName.toLowerCase() + '[template]';\n }).join(', ');\n\n function isSVGTemplate(el) {\n return el.tagName == 'template' &&\n el.namespaceURI == 'http://www.w3.org/2000/svg';\n }\n\n function isHTMLTemplate(el) {\n return el.tagName == 'TEMPLATE' &&\n el.namespaceURI == 'http://www.w3.org/1999/xhtml';\n }\n\n function isAttributeTemplate(el) {\n return Boolean(semanticTemplateElements[el.tagName] &&\n el.hasAttribute('template'));\n }\n\n function isTemplate(el) {\n if (el.isTemplate_ === undefined)\n el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate(el);\n\n return el.isTemplate_;\n }\n\n // FIXME: Observe templates being added/removed from documents\n // FIXME: Expose imperative API to decorate and observe templates in\n // \"disconnected tress\" (e.g. ShadowRoot)\n document.addEventListener('DOMContentLoaded', function(e) {\n bootstrapTemplatesRecursivelyFrom(document);\n // FIXME: Is this needed? Seems like it shouldn't be.\n Platform.performMicrotaskCheckpoint();\n }, false);\n\n function forAllTemplatesFrom(node, fn) {\n var subTemplates = node.querySelectorAll(allTemplatesSelectors);\n\n if (isTemplate(node))\n fn(node)\n forEach(subTemplates, fn);\n }\n\n function bootstrapTemplatesRecursivelyFrom(node) {\n function bootstrap(template) {\n if (!HTMLTemplateElement.decorate(template))\n bootstrapTemplatesRecursivelyFrom(template.content);\n }\n\n forAllTemplatesFrom(node, bootstrap);\n }\n\n if (!hasTemplateElement) {\n /**\n * This represents a <template> element.\n * @constructor\n * @extends {HTMLElement}\n */\n global.HTMLTemplateElement = function() {\n throw TypeError('Illegal constructor');\n };\n }\n\n var hasProto = '__proto__' in {};\n\n function mixin(to, from) {\n Object.getOwnPropertyNames(from).forEach(function(name) {\n Object.defineProperty(to, name,\n Object.getOwnPropertyDescriptor(from, name));\n });\n }\n\n // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner\n function getOrCreateTemplateContentsOwner(template) {\n var doc = template.ownerDocument\n if (!doc.defaultView)\n return doc;\n var d = doc.templateContentsOwner_;\n if (!d) {\n // TODO(arv): This should either be a Document or HTMLDocument depending\n // on doc.\n d = doc.implementation.createHTMLDocument('');\n while (d.lastChild) {\n d.removeChild(d.lastChild);\n }\n doc.templateContentsOwner_ = d;\n }\n return d;\n }\n\n function getTemplateStagingDocument(template) {\n if (!template.stagingDocument_) {\n var owner = template.ownerDocument;\n if (!owner.stagingDocument_) {\n owner.stagingDocument_ = owner.implementation.createHTMLDocument('');\n owner.stagingDocument_.isStagingDocument = true;\n // TODO(rafaelw): Remove when fix for\n // https://codereview.chromium.org/164803002/\n // makes it to Chrome release.\n var base = owner.stagingDocument_.createElement('base');\n base.href = document.baseURI;\n owner.stagingDocument_.head.appendChild(base);\n\n owner.stagingDocument_.stagingDocument_ = owner.stagingDocument_;\n }\n\n template.stagingDocument_ = owner.stagingDocument_;\n }\n\n return template.stagingDocument_;\n }\n\n // For non-template browsers, the parser will disallow <template> in certain\n // locations, so we allow \"attribute templates\" which combine the template\n // element with the top-level container node of the content, e.g.\n //\n // <tr template repeat=\"{{ foo }}\"\" class=\"bar\"><td>Bar</td></tr>\n //\n // becomes\n //\n // <template repeat=\"{{ foo }}\">\n // + #document-fragment\n // + <tr class=\"bar\">\n // + <td>Bar</td>\n //\n function extractTemplateFromAttributeTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n if (templateAttributeDirectives[attrib.name]) {\n if (attrib.name !== 'template')\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n }\n\n return template;\n }\n\n function extractTemplateFromSVGTemplate(el) {\n var template = el.ownerDocument.createElement('template');\n el.parentNode.insertBefore(template, el);\n\n var attribs = el.attributes;\n var count = attribs.length;\n while (count-- > 0) {\n var attrib = attribs[count];\n template.setAttribute(attrib.name, attrib.value);\n el.removeAttribute(attrib.name);\n }\n\n el.parentNode.removeChild(el);\n return template;\n }\n\n function liftNonNativeTemplateChildrenIntoContent(template, el, useRoot) {\n var content = template.content;\n if (useRoot) {\n content.appendChild(el);\n return;\n }\n\n var child;\n while (child = el.firstChild) {\n content.appendChild(child);\n }\n }\n\n var templateObserver;\n if (typeof MutationObserver == 'function') {\n templateObserver = new MutationObserver(function(records) {\n for (var i = 0; i < records.length; i++) {\n records[i].target.refChanged_();\n }\n });\n }\n\n /**\n * Ensures proper API and content model for template elements.\n * @param {HTMLTemplateElement} opt_instanceRef The template element which\n * |el| template element will return as the value of its ref(), and whose\n * content will be used as source when createInstance() is invoked.\n */\n HTMLTemplateElement.decorate = function(el, opt_instanceRef) {\n if (el.templateIsDecorated_)\n return false;\n\n var templateElement = el;\n templateElement.templateIsDecorated_ = true;\n\n var isNativeHTMLTemplate = isHTMLTemplate(templateElement) &&\n hasTemplateElement;\n var bootstrapContents = isNativeHTMLTemplate;\n var liftContents = !isNativeHTMLTemplate;\n var liftRoot = false;\n\n if (!isNativeHTMLTemplate) {\n if (isAttributeTemplate(templateElement)) {\n assert(!opt_instanceRef);\n templateElement = extractTemplateFromAttributeTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n liftRoot = true;\n } else if (isSVGTemplate(templateElement)) {\n templateElement = extractTemplateFromSVGTemplate(el);\n templateElement.templateIsDecorated_ = true;\n isNativeHTMLTemplate = hasTemplateElement;\n }\n }\n\n if (!isNativeHTMLTemplate) {\n fixTemplateElementPrototype(templateElement);\n var doc = getOrCreateTemplateContentsOwner(templateElement);\n templateElement.content_ = doc.createDocumentFragment();\n }\n\n if (opt_instanceRef) {\n // template is contained within an instance, its direct content must be\n // empty\n templateElement.instanceRef_ = opt_instanceRef;\n } else if (liftContents) {\n liftNonNativeTemplateChildrenIntoContent(templateElement,\n el,\n liftRoot);\n } else if (bootstrapContents) {\n bootstrapTemplatesRecursivelyFrom(templateElement.content);\n }\n\n return true;\n };\n\n // TODO(rafaelw): This used to decorate recursively all templates from a given\n // node. This happens by default on 'DOMContentLoaded', but may be needed\n // in subtrees not descendent from document (e.g. ShadowRoot).\n // Review whether this is the right public API.\n HTMLTemplateElement.bootstrap = bootstrapTemplatesRecursivelyFrom;\n\n var htmlElement = global.HTMLUnknownElement || HTMLElement;\n\n var contentDescriptor = {\n get: function() {\n return this.content_;\n },\n enumerable: true,\n configurable: true\n };\n\n if (!hasTemplateElement) {\n // Gecko is more picky with the prototype than WebKit. Make sure to use the\n // same prototype as created in the constructor.\n HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);\n\n Object.defineProperty(HTMLTemplateElement.prototype, 'content',\n contentDescriptor);\n }\n\n function fixTemplateElementPrototype(el) {\n if (hasProto)\n el.__proto__ = HTMLTemplateElement.prototype;\n else\n mixin(el, HTMLTemplateElement.prototype);\n }\n\n function ensureSetModelScheduled(template) {\n if (!template.setModelFn_) {\n template.setModelFn_ = function() {\n template.setModelFnScheduled_ = false;\n var map = getBindings(template,\n template.delegate_ && template.delegate_.prepareBinding);\n processBindings(template, map, template.model_);\n };\n }\n\n if (!template.setModelFnScheduled_) {\n template.setModelFnScheduled_ = true;\n Observer.runEOM_(template.setModelFn_);\n }\n }\n\n mixin(HTMLTemplateElement.prototype, {\n bind: function(name, value, oneTime) {\n if (name != 'ref')\n return Element.prototype.bind.call(this, name, value, oneTime);\n\n var self = this;\n var ref = oneTime ? value : value.open(function(ref) {\n self.setAttribute('ref', ref);\n self.refChanged_();\n });\n\n this.setAttribute('ref', ref);\n this.refChanged_();\n if (oneTime)\n return;\n\n if (!this.bindings_) {\n this.bindings_ = { ref: value };\n } else {\n this.bindings_.ref = value;\n }\n\n return value;\n },\n\n processBindingDirectives_: function(directives) {\n if (this.iterator_)\n this.iterator_.closeDeps();\n\n if (!directives.if && !directives.bind && !directives.repeat) {\n if (this.iterator_) {\n this.iterator_.close();\n this.iterator_ = undefined;\n }\n\n return;\n }\n\n if (!this.iterator_) {\n this.iterator_ = new TemplateIterator(this);\n }\n\n this.iterator_.updateDependencies(directives, this.model_);\n\n if (templateObserver) {\n templateObserver.observe(this, { attributes: true,\n attributeFilter: ['ref'] });\n }\n\n return this.iterator_;\n },\n\n createInstance: function(model, bindingDelegate, delegate_) {\n if (bindingDelegate)\n delegate_ = this.newDelegate_(bindingDelegate);\n else if (!delegate_)\n delegate_ = this.delegate_;\n\n if (!this.refContent_)\n this.refContent_ = this.ref_.content;\n var content = this.refContent_;\n if (content.firstChild === null)\n return emptyInstance;\n\n var map = getInstanceBindingMap(content, delegate_);\n var stagingDocument = getTemplateStagingDocument(this);\n var instance = stagingDocument.createDocumentFragment();\n instance.templateCreator_ = this;\n instance.protoContent_ = content;\n instance.bindings_ = [];\n instance.terminator_ = null;\n var instanceRecord = instance.templateInstance_ = {\n firstNode: null,\n lastNode: null,\n model: model\n };\n\n var i = 0;\n var collectTerminator = false;\n for (var child = content.firstChild; child; child = child.nextSibling) {\n // The terminator of the instance is the clone of the last child of the\n // content. If the last child is an active template, it may produce\n // instances as a result of production, so simply collecting the last\n // child of the instance after it has finished producing may be wrong.\n if (child.nextSibling === null)\n collectTerminator = true;\n\n var clone = cloneAndBindInstance(child, instance, stagingDocument,\n map.children[i++],\n model,\n delegate_,\n instance.bindings_);\n clone.templateInstance_ = instanceRecord;\n if (collectTerminator)\n instance.terminator_ = clone;\n }\n\n instanceRecord.firstNode = instance.firstChild;\n instanceRecord.lastNode = instance.lastChild;\n instance.templateCreator_ = undefined;\n instance.protoContent_ = undefined;\n return instance;\n },\n\n get model() {\n return this.model_;\n },\n\n set model(model) {\n this.model_ = model;\n ensureSetModelScheduled(this);\n },\n\n get bindingDelegate() {\n return this.delegate_ && this.delegate_.raw;\n },\n\n refChanged_: function() {\n if (!this.iterator_ || this.refContent_ === this.ref_.content)\n return;\n\n this.refContent_ = undefined;\n this.iterator_.valueChanged();\n this.iterator_.updateIteratedValue(this.iterator_.getUpdatedValue());\n },\n\n clear: function() {\n this.model_ = undefined;\n this.delegate_ = undefined;\n if (this.bindings_ && this.bindings_.ref)\n this.bindings_.ref.close()\n this.refContent_ = undefined;\n if (!this.iterator_)\n return;\n this.iterator_.valueChanged();\n this.iterator_.close()\n this.iterator_ = undefined;\n },\n\n setDelegate_: function(delegate) {\n this.delegate_ = delegate;\n this.bindingMap_ = undefined;\n if (this.iterator_) {\n this.iterator_.instancePositionChangedFn_ = undefined;\n this.iterator_.instanceModelFn_ = undefined;\n }\n },\n\n newDelegate_: function(bindingDelegate) {\n if (!bindingDelegate)\n return;\n\n function delegateFn(name) {\n var fn = bindingDelegate && bindingDelegate[name];\n if (typeof fn != 'function')\n return;\n\n return function() {\n return fn.apply(bindingDelegate, arguments);\n };\n }\n\n return {\n bindingMaps: {},\n raw: bindingDelegate,\n prepareBinding: delegateFn('prepareBinding'),\n prepareInstanceModel: delegateFn('prepareInstanceModel'),\n prepareInstancePositionChanged:\n delegateFn('prepareInstancePositionChanged')\n };\n },\n\n set bindingDelegate(bindingDelegate) {\n if (this.delegate_) {\n throw Error('Template must be cleared before a new bindingDelegate ' +\n 'can be assigned');\n }\n\n this.setDelegate_(this.newDelegate_(bindingDelegate));\n },\n\n get ref_() {\n var ref = searchRefId(this, this.getAttribute('ref'));\n if (!ref)\n ref = this.instanceRef_;\n\n if (!ref)\n return this;\n\n var nextRef = ref.ref_;\n return nextRef ? nextRef : ref;\n }\n });\n\n // Returns\n // a) undefined if there are no mustaches.\n // b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.\n function parseMustaches(s, name, node, prepareBindingFn) {\n if (!s || !s.length)\n return;\n\n var tokens;\n var length = s.length;\n var startIndex = 0, lastIndex = 0, endIndex = 0;\n var onlyOneTime = true;\n while (lastIndex < length) {\n var startIndex = s.indexOf('{{', lastIndex);\n var oneTimeStart = s.indexOf('[[', lastIndex);\n var oneTime = false;\n var terminator = '}}';\n\n if (oneTimeStart >= 0 &&\n (startIndex < 0 || oneTimeStart < startIndex)) {\n startIndex = oneTimeStart;\n oneTime = true;\n terminator = ']]';\n }\n\n endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);\n\n if (endIndex < 0) {\n if (!tokens)\n return;\n\n tokens.push(s.slice(lastIndex)); // TEXT\n break;\n }\n\n tokens = tokens || [];\n tokens.push(s.slice(lastIndex, startIndex)); // TEXT\n var pathString = s.slice(startIndex + 2, endIndex).trim();\n tokens.push(oneTime); // ONE_TIME?\n onlyOneTime = onlyOneTime && oneTime;\n var delegateFn = prepareBindingFn &&\n prepareBindingFn(pathString, name, node);\n // Don't try to parse the expression if there's a prepareBinding function\n if (delegateFn == null) {\n tokens.push(Path.get(pathString)); // PATH\n } else {\n tokens.push(null);\n }\n tokens.push(delegateFn); // DELEGATE_FN\n lastIndex = endIndex + 2;\n }\n\n if (lastIndex === length)\n tokens.push(''); // TEXT\n\n tokens.hasOnePath = tokens.length === 5;\n tokens.isSimplePath = tokens.hasOnePath &&\n tokens[0] == '' &&\n tokens[4] == '';\n tokens.onlyOneTime = onlyOneTime;\n\n tokens.combinator = function(values) {\n var newValue = tokens[0];\n\n for (var i = 1; i < tokens.length; i += 4) {\n var value = tokens.hasOnePath ? values : values[(i - 1) / 4];\n if (value !== undefined)\n newValue += value;\n newValue += tokens[i + 3];\n }\n\n return newValue;\n }\n\n return tokens;\n };\n\n function processOneTimeBinding(name, tokens, node, model) {\n if (tokens.hasOnePath) {\n var delegateFn = tokens[3];\n var value = delegateFn ? delegateFn(model, node, true) :\n tokens[2].getValueFrom(model);\n return tokens.isSimplePath ? value : tokens.combinator(value);\n }\n\n var values = [];\n for (var i = 1; i < tokens.length; i += 4) {\n var delegateFn = tokens[i + 2];\n values[(i - 1) / 4] = delegateFn ? delegateFn(model, node) :\n tokens[i + 1].getValueFrom(model);\n }\n\n return tokens.combinator(values);\n }\n\n function processSinglePathBinding(name, tokens, node, model) {\n var delegateFn = tokens[3];\n var observer = delegateFn ? delegateFn(model, node, false) :\n new PathObserver(model, tokens[2]);\n\n return tokens.isSimplePath ? observer :\n new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBinding(name, tokens, node, model) {\n if (tokens.onlyOneTime)\n return processOneTimeBinding(name, tokens, node, model);\n\n if (tokens.hasOnePath)\n return processSinglePathBinding(name, tokens, node, model);\n\n var observer = new CompoundObserver();\n\n for (var i = 1; i < tokens.length; i += 4) {\n var oneTime = tokens[i];\n var delegateFn = tokens[i + 2];\n\n if (delegateFn) {\n var value = delegateFn(model, node, oneTime);\n if (oneTime)\n observer.addPath(value)\n else\n observer.addObserver(value);\n continue;\n }\n\n var path = tokens[i + 1];\n if (oneTime)\n observer.addPath(path.getValueFrom(model))\n else\n observer.addPath(model, path);\n }\n\n return new ObserverTransform(observer, tokens.combinator);\n }\n\n function processBindings(node, bindings, model, instanceBindings) {\n for (var i = 0; i < bindings.length; i += 2) {\n var name = bindings[i]\n var tokens = bindings[i + 1];\n var value = processBinding(name, tokens, node, model);\n var binding = node.bind(name, value, tokens.onlyOneTime);\n if (binding && instanceBindings)\n instanceBindings.push(binding);\n }\n\n node.bindFinished();\n if (!bindings.isTemplate)\n return;\n\n node.model_ = model;\n var iter = node.processBindingDirectives_(bindings);\n if (instanceBindings && iter)\n instanceBindings.push(iter);\n }\n\n function parseWithDefault(el, name, prepareBindingFn) {\n var v = el.getAttribute(name);\n return parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);\n }\n\n function parseAttributeBindings(element, prepareBindingFn) {\n assert(element);\n\n var bindings = [];\n var ifFound = false;\n var bindFound = false;\n\n for (var i = 0; i < element.attributes.length; i++) {\n var attr = element.attributes[i];\n var name = attr.name;\n var value = attr.value;\n\n // Allow bindings expressed in attributes to be prefixed with underbars.\n // We do this to allow correct semantics for browsers that don't implement\n // <template> where certain attributes might trigger side-effects -- and\n // for IE which sanitizes certain attributes, disallowing mustache\n // replacements in their text.\n while (name[0] === '_') {\n name = name.substring(1);\n }\n\n if (isTemplate(element) &&\n (name === IF || name === BIND || name === REPEAT)) {\n continue;\n }\n\n var tokens = parseMustaches(value, name, element,\n prepareBindingFn);\n if (!tokens)\n continue;\n\n bindings.push(name, tokens);\n }\n\n if (isTemplate(element)) {\n bindings.isTemplate = true;\n bindings.if = parseWithDefault(element, IF, prepareBindingFn);\n bindings.bind = parseWithDefault(element, BIND, prepareBindingFn);\n bindings.repeat = parseWithDefault(element, REPEAT, prepareBindingFn);\n\n if (bindings.if && !bindings.bind && !bindings.repeat)\n bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn);\n }\n\n return bindings;\n }\n\n function getBindings(node, prepareBindingFn) {\n if (node.nodeType === Node.ELEMENT_NODE)\n return parseAttributeBindings(node, prepareBindingFn);\n\n if (node.nodeType === Node.TEXT_NODE) {\n var tokens = parseMustaches(node.data, 'textContent', node,\n prepareBindingFn);\n if (tokens)\n return ['textContent', tokens];\n }\n\n return [];\n }\n\n function cloneAndBindInstance(node, parent, stagingDocument, bindings, model,\n delegate,\n instanceBindings,\n instanceRecord) {\n var clone = parent.appendChild(stagingDocument.importNode(node, false));\n\n var i = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n cloneAndBindInstance(child, clone, stagingDocument,\n bindings.children[i++],\n model,\n delegate,\n instanceBindings);\n }\n\n if (bindings.isTemplate) {\n HTMLTemplateElement.decorate(clone, node);\n if (delegate)\n clone.setDelegate_(delegate);\n }\n\n processBindings(clone, bindings, model, instanceBindings);\n return clone;\n }\n\n function createInstanceBindingMap(node, prepareBindingFn) {\n var map = getBindings(node, prepareBindingFn);\n map.children = {};\n var index = 0;\n for (var child = node.firstChild; child; child = child.nextSibling) {\n map.children[index++] = createInstanceBindingMap(child, prepareBindingFn);\n }\n\n return map;\n }\n\n var contentUidCounter = 1;\n\n // TODO(rafaelw): Setup a MutationObserver on content which clears the id\n // so that bindingMaps regenerate when the template.content changes.\n function getContentUid(content) {\n var id = content.id_;\n if (!id)\n id = content.id_ = contentUidCounter++;\n return id;\n }\n\n // Each delegate is associated with a set of bindingMaps, one for each\n // content which may be used by a template. The intent is that each binding\n // delegate gets the opportunity to prepare the instance (via the prepare*\n // delegate calls) once across all uses.\n // TODO(rafaelw): Separate out the parse map from the binding map. In the\n // current implementation, if two delegates need a binding map for the same\n // content, the second will have to reparse.\n function getInstanceBindingMap(content, delegate_) {\n var contentId = getContentUid(content);\n if (delegate_) {\n var map = delegate_.bindingMaps[contentId];\n if (!map) {\n map = delegate_.bindingMaps[contentId] =\n createInstanceBindingMap(content, delegate_.prepareBinding) || [];\n }\n return map;\n }\n\n var map = content.bindingMap_;\n if (!map) {\n map = content.bindingMap_ =\n createInstanceBindingMap(content, undefined) || [];\n }\n return map;\n }\n\n Object.defineProperty(Node.prototype, 'templateInstance', {\n get: function() {\n var instance = this.templateInstance_;\n return instance ? instance :\n (this.parentNode ? this.parentNode.templateInstance : undefined);\n }\n });\n\n var emptyInstance = document.createDocumentFragment();\n emptyInstance.bindings_ = [];\n emptyInstance.terminator_ = null;\n\n function TemplateIterator(templateElement) {\n this.closed = false;\n this.templateElement_ = templateElement;\n this.instances = [];\n this.deps = undefined;\n this.iteratedValue = [];\n this.presentValue = undefined;\n this.arrayObserver = undefined;\n }\n\n TemplateIterator.prototype = {\n closeDeps: function() {\n var deps = this.deps;\n if (deps) {\n if (deps.ifOneTime === false)\n deps.ifValue.close();\n if (deps.oneTime === false)\n deps.value.close();\n }\n },\n\n updateDependencies: function(directives, model) {\n this.closeDeps();\n\n var deps = this.deps = {};\n var template = this.templateElement_;\n\n var ifValue = true;\n if (directives.if) {\n deps.hasIf = true;\n deps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding(IF, directives.if, template, model);\n\n ifValue = deps.ifValue;\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.ifOneTime && !ifValue) {\n this.valueChanged();\n return;\n }\n\n if (!deps.ifOneTime)\n ifValue = ifValue.open(this.updateIfValue, this);\n }\n\n if (directives.repeat) {\n deps.repeat = true;\n deps.oneTime = directives.repeat.onlyOneTime;\n deps.value = processBinding(REPEAT, directives.repeat, template, model);\n } else {\n deps.repeat = false;\n deps.oneTime = directives.bind.onlyOneTime;\n deps.value = processBinding(BIND, directives.bind, template, model);\n }\n\n var value = deps.value;\n if (!deps.oneTime)\n value = value.open(this.updateIteratedValue, this);\n\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue(value);\n },\n\n /**\n * Gets the updated value of the bind/repeat. This can potentially call\n * user code (if a bindingDelegate is set up) so we try to avoid it if we\n * already have the value in hand (from Observer.open).\n */\n getUpdatedValue: function() {\n var value = this.deps.value;\n if (!this.deps.oneTime)\n value = value.discardChanges();\n return value;\n },\n\n updateIfValue: function(ifValue) {\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n\n this.updateValue(this.getUpdatedValue());\n },\n\n updateIteratedValue: function(value) {\n if (this.deps.hasIf) {\n var ifValue = this.deps.ifValue;\n if (!this.deps.ifOneTime)\n ifValue = ifValue.discardChanges();\n if (!ifValue) {\n this.valueChanged();\n return;\n }\n }\n\n this.updateValue(value);\n },\n\n updateValue: function(value) {\n if (!this.deps.repeat)\n value = [value];\n var observe = this.deps.repeat &&\n !this.deps.oneTime &&\n Array.isArray(value);\n this.valueChanged(value, observe);\n },\n\n valueChanged: function(value, observeValue) {\n if (!Array.isArray(value))\n value = [];\n\n if (value === this.iteratedValue)\n return;\n\n this.unobserve();\n this.presentValue = value;\n if (observeValue) {\n this.arrayObserver = new ArrayObserver(this.presentValue);\n this.arrayObserver.open(this.handleSplices, this);\n }\n\n this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,\n this.iteratedValue));\n },\n\n getLastInstanceNode: function(index) {\n if (index == -1)\n return this.templateElement_;\n var instance = this.instances[index];\n var terminator = instance.terminator_;\n if (!terminator)\n return this.getLastInstanceNode(index - 1);\n\n if (terminator.nodeType !== Node.ELEMENT_NODE ||\n this.templateElement_ === terminator) {\n return terminator;\n }\n\n var subtemplateIterator = terminator.iterator_;\n if (!subtemplateIterator)\n return terminator;\n\n return subtemplateIterator.getLastTemplateNode();\n },\n\n getLastTemplateNode: function() {\n return this.getLastInstanceNode(this.instances.length - 1);\n },\n\n insertInstanceAt: function(index, fragment) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var parent = this.templateElement_.parentNode;\n this.instances.splice(index, 0, fragment);\n\n parent.insertBefore(fragment, previousInstanceLast.nextSibling);\n },\n\n extractInstanceAt: function(index) {\n var previousInstanceLast = this.getLastInstanceNode(index - 1);\n var lastNode = this.getLastInstanceNode(index);\n var parent = this.templateElement_.parentNode;\n var instance = this.instances.splice(index, 1)[0];\n\n while (lastNode !== previousInstanceLast) {\n var node = previousInstanceLast.nextSibling;\n if (node == lastNode)\n lastNode = previousInstanceLast;\n\n instance.appendChild(parent.removeChild(node));\n }\n\n return instance;\n },\n\n getDelegateFn: function(fn) {\n fn = fn && fn(this.templateElement_);\n return typeof fn === 'function' ? fn : null;\n },\n\n handleSplices: function(splices) {\n if (this.closed || !splices.length)\n return;\n\n var template = this.templateElement_;\n\n if (!template.parentNode) {\n this.close();\n return;\n }\n\n ArrayObserver.applySplices(this.iteratedValue, this.presentValue,\n splices);\n\n var delegate = template.delegate_;\n if (this.instanceModelFn_ === undefined) {\n this.instanceModelFn_ =\n this.getDelegateFn(delegate && delegate.prepareInstanceModel);\n }\n\n if (this.instancePositionChangedFn_ === undefined) {\n this.instancePositionChangedFn_ =\n this.getDelegateFn(delegate &&\n delegate.prepareInstancePositionChanged);\n }\n\n // Instance Removals\n var instanceCache = new Map;\n var removeDelta = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var removed = splice.removed;\n for (var j = 0; j < removed.length; j++) {\n var model = removed[j];\n var instance = this.extractInstanceAt(splice.index + removeDelta);\n if (instance !== emptyInstance) {\n instanceCache.set(model, instance);\n }\n }\n\n removeDelta -= splice.addedCount;\n }\n\n // Instance Insertions\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n var addIndex = splice.index;\n for (; addIndex < splice.index + splice.addedCount; addIndex++) {\n var model = this.iteratedValue[addIndex];\n var instance = instanceCache.get(model);\n if (instance) {\n instanceCache.delete(model);\n } else {\n if (this.instanceModelFn_) {\n model = this.instanceModelFn_(model);\n }\n\n if (model === undefined) {\n instance = emptyInstance;\n } else {\n instance = template.createInstance(model, undefined, delegate);\n }\n }\n\n this.insertInstanceAt(addIndex, instance);\n }\n }\n\n instanceCache.forEach(function(instance) {\n this.closeInstanceBindings(instance);\n }, this);\n\n if (this.instancePositionChangedFn_)\n this.reportInstancesMoved(splices);\n },\n\n reportInstanceMoved: function(index) {\n var instance = this.instances[index];\n if (instance === emptyInstance)\n return;\n\n this.instancePositionChangedFn_(instance.templateInstance_, index);\n },\n\n reportInstancesMoved: function(splices) {\n var index = 0;\n var offset = 0;\n for (var i = 0; i < splices.length; i++) {\n var splice = splices[i];\n if (offset != 0) {\n while (index < splice.index) {\n this.reportInstanceMoved(index);\n index++;\n }\n } else {\n index = splice.index;\n }\n\n while (index < splice.index + splice.addedCount) {\n this.reportInstanceMoved(index);\n index++;\n }\n\n offset += splice.addedCount - splice.removed.length;\n }\n\n if (offset == 0)\n return;\n\n var length = this.instances.length;\n while (index < length) {\n this.reportInstanceMoved(index);\n index++;\n }\n },\n\n closeInstanceBindings: function(instance) {\n var bindings = instance.bindings_;\n for (var i = 0; i < bindings.length; i++) {\n bindings[i].close();\n }\n },\n\n unobserve: function() {\n if (!this.arrayObserver)\n return;\n\n this.arrayObserver.close();\n this.arrayObserver = undefined;\n },\n\n close: function() {\n if (this.closed)\n return;\n this.unobserve();\n for (var i = 0; i < this.instances.length; i++) {\n this.closeInstanceBindings(this.instances[i]);\n }\n\n this.instances.length = 0;\n this.closeDeps();\n this.templateElement_.iterator_ = undefined;\n this.closed = true;\n }\n };\n\n // Polyfill-specific API.\n HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;\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 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 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\n// inject style sheet\nvar style = document.createElement('style');\nstyle.textContent = 'template {display: none !important;} /* injected by platform.js */';\nvar head = document.querySelector('head');\nhead.insertBefore(style, head.firstChild);\n\n// flush (with logging)\nvar flushing;\nfunction flush() {\n if (!flushing) {\n flushing = true;\n scope.endOfMicrotask(function() {\n flushing = false;\n logFlags.data && console.group('Platform.flush()');\n scope.performMicrotaskCheckpoint();\n logFlags.data && console.groupEnd();\n });\n }\n};\n\n// polling dirty checker\n// flush periodically if platform does not have object observe.\nif (!Observer.hasObjectObserve) {\n var FLUSH_POLL_INTERVAL = 125;\n window.addEventListener('WebComponentsReady', function() {\n flush();\n scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);\n });\n} else {\n // make flush a no-op when we have Object.observe\n flush = function() {};\n}\n\nif (window.CustomElements && !CustomElements.useNative) {\n var originalImportNode = Document.prototype.importNode;\n Document.prototype.importNode = function(node, deep) {\n var imported = originalImportNode.call(this, node, deep);\n CustomElements.upgradeAll(imported);\n return imported;\n }\n}\n\n// exports\nscope.flush = flush;\n\n})(window.Platform);\n\n"]}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/.bower.json b/third_party/polymer/components-chromium/polymer/.bower.json new file mode 100644 index 0000000..0ccd0d1 --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/.bower.json @@ -0,0 +1,19 @@ +{ + "name": "polymer", + "private": true, + "dependencies": { + "platform": "Polymer/platform#>=0.3.0 <1.0.0", + "core-component-page": "Polymer/core-component-page#>=0.3.0 <1.0.0" + }, + "homepage": "https://github.com/Polymer/polymer", + "version": "0.3.5", + "_release": "0.3.5", + "_resolution": { + "type": "version", + "tag": "0.3.5", + "commit": "a09a0e689fdeab11b53b41eaed033781733bf1eb" + }, + "_source": "git://github.com/Polymer/polymer.git", + "_target": "0.3.5", + "_originalSource": "Polymer/polymer" +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/README.md b/third_party/polymer/components-chromium/polymer/README.md new file mode 100644 index 0000000..236a88c --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/README.md @@ -0,0 +1,17 @@ +# Polymer + +[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon) + +Build Status: [http://build.chromium.org/p/client.polymer/waterfall](http://build.chromium.org/p/client.polymer/waterfall) + +## Brief Overview + +For more detailed info goto [http://polymer-project.org/](http://polymer-project.org/). + +Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries. + +Polymer is based on a set of future technologies, including [Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html), [Custom Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds. + +## Tools & Testing + +For running tests or building minified files, consult the [tooling information](http://www.polymer-project.org/resources/tooling-strategy.html). diff --git a/third_party/polymer/components-chromium/polymer/bower.json b/third_party/polymer/components-chromium/polymer/bower.json new file mode 100644 index 0000000..faff32b --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/bower.json @@ -0,0 +1,8 @@ +{ + "name": "polymer", + "private": true, + "dependencies": { + "platform": "Polymer/platform#>=0.3.0 <1.0.0", + "core-component-page": "Polymer/core-component-page#>=0.3.0 <1.0.0" + } +}
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/build.log b/third_party/polymer/components-chromium/polymer/build.log new file mode 100644 index 0000000..b39ce40 --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/build.log @@ -0,0 +1,33 @@ +BUILD LOG +--------- +Build Time: 2014-08-07T17:12:22 + +NODEJS INFORMATION +================== +nodejs: v0.10.28 +chai: 1.9.1 +grunt: 0.4.4 +grunt-audit: 0.0.3 +grunt-contrib-uglify: 0.4.0 +grunt-contrib-yuidoc: 0.5.2 +grunt-karma: 0.8.3 +grunt-string-replace: 0.2.7 +karma: 0.12.14 +karma-crbot-reporter: 0.0.4 +karma-firefox-launcher: 0.1.3 +karma-ie-launcher: 0.1.5 +karma-mocha: 0.1.3 +karma-safari-launcher: 0.1.1 +karma-script-launcher: 0.1.0 +mocha: 1.18.2 +Polymer: 0.3.5 + +REPO REVISIONS +============== +polymer-expressions: 529532103a215b641d4efd607536ce87ec7723f6 +polymer-gestures: 725191c5457b6e96c37a9db852e943fe3b40635f +polymer-dev: 56417b55d75f0a69d19e313c218c86b23c1daf18 + +BUILD HASHES +============ +build/polymer.js: d1d70d03f791f2808e9dad16dc0e43bcbbd25c2d
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/layout.html b/third_party/polymer/components-chromium/polymer/layout.html new file mode 100644 index 0000000..46dec0a --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/layout.html @@ -0,0 +1,278 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<style shim-shadowdom> +/******************************* + Flex Layout +*******************************/ + +html /deep/ [layout][horizontal], html /deep/ [layout][vertical] { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} + +html /deep/ [layout][horizontal][inline], html /deep/ [layout][vertical][inline] { + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; +} + +html /deep/ [layout][horizontal] { + -ms-flex-direction: row; + -webkit-flex-direction: row; + flex-direction: row; +} + +html /deep/ [layout][horizontal][reverse] { + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; +} + +html /deep/ [layout][vertical] { + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} + +html /deep/ [layout][vertical][reverse] { + -ms-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; +} + +html /deep/ [layout][wrap] { + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} + +html /deep/ [layout][wrap-reverse] { + -ms-flex-wrap: wrap-reverse; + -webkit-flex-wrap: wrap-reverse; + flex-wrap: wrap-reverse; +} + +html /deep/ [flex] { + -ms-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +html /deep/ [flex][auto] { + -ms-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + flex: 1 1 auto; +} + +html /deep/ [flex][none] { + -ms-flex: none; + -webkit-flex: none; + flex: none; +} + +html /deep/ [flex][one] { + -ms-flex: 1; + -webkit-flex: 1; + flex: 1; +} + +html /deep/ [flex][two] { + -ms-flex: 2; + -webkit-flex: 2; + flex: 2; +} + +html /deep/ [flex][three] { + -ms-flex: 3; + -webkit-flex: 3; + flex: 3; +} + +html /deep/ [flex][four] { + -ms-flex: 4; + -webkit-flex: 4; + flex: 4; +} + +html /deep/ [flex][five] { + -ms-flex: 5; + -webkit-flex: 5; + flex: 5; +} + +html /deep/ [flex][six] { + -ms-flex: 6; + -webkit-flex: 6; + flex: 6; +} + +html /deep/ [flex][seven] { + -ms-flex: 7; + -webkit-flex: 7; + flex: 7; +} + +html /deep/ [flex][eight] { + -ms-flex: 8; + -webkit-flex: 8; + flex: 8; +} + +html /deep/ [flex][nine] { + -ms-flex: 9; + -webkit-flex: 9; + flex: 9; +} + +html /deep/ [flex][ten] { + -ms-flex: 10; + -webkit-flex: 10; + flex: 10; +} + +html /deep/ [flex][eleven] { + -ms-flex: 11; + -webkit-flex: 11; + flex: 11; +} + +html /deep/ [flex][twelve] { + -ms-flex: 12; + -webkit-flex: 12; + flex: 12; +} + +/* alignment in cross axis */ + +html /deep/ [layout][start] { + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} + +html /deep/ [layout][center], html /deep/ [layout][center-center] { + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} + +html /deep/ [layout][end] { + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} + +/* alignment in main axis */ + +html /deep/ [layout][start-justified] { + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} + +html /deep/ [layout][center-justified], html /deep/ [layout][center-center] { + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} + +html /deep/ [layout][end-justified] { + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} + +html /deep/ [layout][around-justified] { + -ms-flex-pack: around; + -webkit-justify-content: space-around; + justify-content: space-around; +} + +html /deep/ [layout][justified] { + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +/* self alignment */ + +html /deep/ [self-start] { + -ms-align-self: flex-start; + -webkit-align-self: flex-start; + align-self: flex-start; +} + +html /deep/ [self-center] { + -ms-align-self: center; + -webkit-align-self: center; + align-self: center; +} + +html /deep/ [self-end] { + -ms-align-self: flex-end; + -webkit-align-self: flex-end; + align-self: flex-end; +} + +html /deep/ [self-stretch] { + -ms-align-self: stretch; + -webkit-align-self: stretch; + align-self: stretch; +} + +/******************************* + Other Layout +*******************************/ + +html /deep/ [block] { + display: block; +} + +/* ie support for hidden */ +html /deep/ [hidden] { + display: none !important; +} + +html /deep/ [relative] { + position: relative; +} + +html /deep/ [fit] { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; +} + +body[fullbleed] { + margin: 0; + height: 100vh; +} + +/******************************* + Other +*******************************/ + +html /deep/ [segment], html /deep/ segment { + display: block; + position: relative; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin: 1em 0.5em; + padding: 1em; + background-color: white; + -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1); + box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1); + border-radius: 5px 5px 5px 5px; +} + +</style>
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/polymer.html b/third_party/polymer/components-chromium/polymer/polymer.html new file mode 100644 index 0000000..424006a --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/polymer.html @@ -0,0 +1,13 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="layout.html"> + +<script src="polymer.js"></script> +<!--<link rel="import" href="../polymer-dev/polymer.html">-->
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/polymer.js b/third_party/polymer/components-chromium/polymer/polymer.js new file mode 100644 index 0000000..8d46df3 --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/polymer.js @@ -0,0 +1,14 @@ +/** + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ +// @version: 0.3.5 +window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){var d,e;return a?(d=a.elementFromPoint(b,c),d?e=this.targetingShadow(d):a!==document&&(e=this.olderShadow(a)),this.searchRoot(e,b,c)||d):void 0},owner:function(a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document),b},findTarget:function(a){if(b&&a.path)return a.path[0];var c=a.clientX,d=a.clientY,e=this.owner(a.target);return e.elementFromPoint(c,d)||(e=document),this.searchRoot(e,c,d)},findTouchAction:function(a){var c;if(b&&a.path){for(var d=a.path,e=0;e<d.length;e++)if(c=d[e],c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action")}else for(c=a.target;c;){if(c.hasAttribute("touch-action"))return c.getAttribute("touch-action");c=c.parentNode||c.host}return"auto"},LCA:function(a,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return document;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b;var c=this.depth(a),d=this.depth(b),e=c-d;for(e>=0?a=this.walk(a,e):b=this.walk(b,-e);a&&b&&a!==b;)a=a.parentNode||a.host,b=b.parentNode||b.host;return a},walk:function(a,b){for(var c=0;a&&b>c;c++)a=a.parentNode||a.host;return a},depth:function(a){for(var b=0;a;)b++,a=a.parentNode||a.host;return b},deepContains:function(a,b){var c=this.LCA(a,b);return c===a},insideNode:function(a,b,c){var d=a.getBoundingClientRect();return d.left<=b&&b<=d.right&&d.top<=c&&c<=d.bottom}};a.targetFinding=g,a.findTarget=g.findTarget.bind(g),a.deepContains=g.deepContains.bind(g),a.insideNode=g.insideNode}(window.PolymerGestures),function(){function a(a){return"html /deep/ "+b(a)}function b(a){return'[touch-action="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+";}"}var d=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]},"manipulation"],e="",f="string"==typeof document.head.style.touchAction,g=!window.ShadowDOMPolyfill&&document.head.createShadowRoot;if(f){d.forEach(function(d){String(d)===d?(e+=b(d)+c(d)+"\n",g&&(e+=a(d)+c(d)+"\n")):(e+=d.selectors.map(b)+c(d.rule)+"\n",g&&(e+=d.selectors.map(a)+c(d.rule)+"\n"))});var h=document.createElement("style");h.textContent=e,document.head.appendChild(h)}}(),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],d=function(){return function(){}},e={preventTap:d,makeBaseEvent:function(a,b){var c=document.createEvent("Event");return c.initEvent(a,b.bubbles||!1,b.cancelable||!1),c.preventTap=e.preventTap(c),c},makeGestureEvent:function(a,b){b=b||Object.create(null);for(var c,d=this.makeBaseEvent(a,b),e=0,f=Object.keys(b);e<f.length;e++)c=f[e],d[c]=b[c];return d},makePointerEvent:function(a,d){d=d||Object.create(null);for(var e,f=this.makeBaseEvent(a,d),g=0;g<b.length;g++)e=b[g],f[e]=d[e]||c[g];f.buttons=d.buttons||0;var h=0;return h=d.pressure?d.pressure:f.buttons?.5:0,f.x=f.clientX,f.y=f.clientY,f.pointerId=d.pointerId||0,f.width=d.width||0,f.height=d.height||0,f.pressure=h,f.tiltX=d.tiltX||0,f.tiltY=d.tiltY||0,f.pointerType=d.pointerType||"",f.hwTimestamp=d.hwTimestamp||0,f.isPrimary=d.isPrimary||!1,f._source=d._source||"",f}};a.eventFactory=e}(window.PolymerGestures),function(a){function b(){if(c){var a=new Map;return a.pointers=d,a}this.keys=[],this.values=[]}var c=window.Map&&window.Map.prototype.forEach,d=function(){return this.size};b.prototype={set:function(a,b){var c=this.keys.indexOf(a);c>-1?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function(a){return this.keys.indexOf(a)>-1},"delete":function(a){var b=this.keys.indexOf(a);b>-1&&(this.keys.splice(b,1),this.values.splice(b,1))},get:function(a){var b=this.keys.indexOf(a);return this.values[b]},clear:function(){this.keys.length=0,this.values.length=0},forEach:function(a,b){this.values.forEach(function(c,d){a.call(b,c,this.keys[d],this)},this)},pointers:function(){return this.keys.length}},a.PointerMap=b}(window.PolymerGestures),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp","preventTap","tapPrevented","_source"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0,function(){},!1],d="undefined"!=typeof SVGElementInstance,e=a.eventFactory,f={pointermap:new a.PointerMap,eventMap:Object.create(null),eventSources:Object.create(null),eventSourceList:[],gestures:[],dependencyMap:{down:{listeners:0,index:-1},up:{listeners:0,index:-1}},gestureQueue:[],registerSource:function(a,b){var c=b,d=c.events;d&&(d.forEach(function(a){c[a]&&(this.eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c,this.eventSourceList.push(c))},registerGesture:function(a,b){var c=Object.create(null);c.listeners=0,c.index=this.gestures.length;for(var d,e=0;e<b.exposes.length;e++)d=b.exposes[e].toLowerCase(),this.dependencyMap[d]=c;this.gestures.push(b)},register:function(a,b){for(var c,d=this.eventSourceList.length,e=0;d>e&&(c=this.eventSourceList[e]);e++)c.register.call(c,a,b)},unregister:function(a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceList[d]);d++)b.unregister.call(b,a)},down:function(a){this.fireEvent("down",a)},move:function(a){a.type="move",this.fillGestureQueue(a)},up:function(a){this.fireEvent("up",a)},cancel:function(a){a.tapPrevented=!0,this.fireEvent("up",a)},eventHandler:function(a){if(!a._handledByPG){var b=a.type,c=this.eventMap&&this.eventMap[b];c&&c(a),a._handledByPG=!0}},listen:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.addEvent(a,c)},unlisten:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.removeEvent(a,c)},addEvent:function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){var c=e.makePointerEvent(a,b);return c.preventDefault=b.preventDefault,c.tapPrevented=b.tapPrevented,c._target=c._target||b.target,c},fireEvent:function(a,b){var c=this.makeEvent(a,b);return this.dispatchEvent(c)},cloneEvent:function(a){for(var e,f=Object.create(null),g=0;g<b.length;g++)e=b[g],f[e]=a[e]||c[g],("target"===e||"relatedTarget"===e)&&d&&f[e]instanceof SVGElementInstance&&(f[e]=f[e].correspondingUseElement);return f.preventDefault=function(){a.preventDefault()},f},dispatchEvent:function(a){var b=a._target;if(b){b.dispatchEvent(a);var c=this.cloneEvent(a);c.target=b,this.fillGestureQueue(c)}},gestureTrigger:function(){for(var a,b=0;b<this.gestureQueue.length;b++){a=this.gestureQueue[b];for(var c,d,e=0;e<this.gestures.length;e++)c=this.gestures[e],d=c[a.type],c.enabled&&d&&d.call(c,a)}this.gestureQueue.length=0},fillGestureQueue:function(a){this.gestureQueue.length||requestAnimationFrame(this.boundGestureTrigger),this.gestureQueue.push(a)}};f.boundHandler=f.eventHandler.bind(f),f.boundGestureTrigger=f.gestureTrigger.bind(f),a.dispatcher=f,a.activateGesture=function(a,b){var c=b.toLowerCase(),d=f.dependencyMap[c];if(d){var e=f.gestures[d.index];if(0===d.listeners&&e&&(e.enabled=!0),d.listeners++,a._pgListeners||(f.register(a),a._pgListeners=0),e){var g,h=e.defaultActions&&e.defaultActions[c];switch(a.nodeType){case Node.ELEMENT_NODE:g=a;break;case Node.DOCUMENT_FRAGMENT_NODE:g=a.host;break;default:g=null}h&&g&&!g.hasAttribute("touch-action")&&g.setAttribute("touch-action",h)}a._pgListeners++}return Boolean(d)},a.addEventListener=function(b,c,d,e){d&&(a.activateGesture(b,c),b.addEventListener(c,d,e))},a.deactivateGesture=function(a,b){var c=b.toLowerCase(),d=f.dependencyMap[c];if(d){if(d.listeners>0&&d.listeners--,0===d.listeners){var e=f.gestures[d.index];e&&(e.enabled=!1)}a._pgListeners>0&&a._pgListeners--,0===a._pgListeners&&f.unregister(a)}return Boolean(d)},a.removeEventListener=function(b,c,d,e){d&&(a.deactivateGesture(b,c),b.removeEventListener(c,d,e))}}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d=25,e=[0,1,4,2],f=!1;try{f=1===new MouseEvent("test",{buttons:1}).buttons}catch(g){}var h={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup"],exposes:["down","up","move"],register:function(a){b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){for(var b,c=this.lastTouches,e=a.clientX,f=a.clientY,g=0,h=c.length;h>g&&(b=c[g]);g++){var i=Math.abs(e-b.x),j=Math.abs(f-b.y);if(d>=i&&d>=j)return!0}},prepareEvent:function(a){var c=b.cloneEvent(a);return c.pointerId=this.POINTER_ID,c.isPrimary=!0,c.pointerType=this.POINTER_TYPE,c._source="mouse",f||(c.buttons=e[c.which]||0),c},mousedown:function(d){if(!this.isEventSimulatedFromTouch(d)){var e=c.has(this.POINTER_ID);e&&this.mouseup(d);var f=this.prepareEvent(d);f.target=a.findTarget(d),c.set(this.POINTER_ID,f.target),b.down(f)}},mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var d=c.get(this.POINTER_ID);if(d){var e=this.prepareEvent(a);e.target=d,0===e.buttons?(b.cancel(e),this.cleanupMouse()):b.move(e)}}},mouseup:function(d){if(!this.isEventSimulatedFromTouch(d)){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(this.POINTER_ID),b.up(e),this.cleanupMouse()}},cleanupMouse:function(){c["delete"](this.POINTER_ID)}};a.mouseEvents=h}(window.PolymerGestures),function(a){var b=a.dispatcher,c=(a.targetFinding.allShadows.bind(a.targetFinding),b.pointermap),d=(Array.prototype.map.call.bind(Array.prototype.map),2500),e=200,f=20,g=!1,h={events:["touchstart","touchmove","touchend","touchcancel"],exposes:["down","up","move"],register:function(a,c){c||b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y"},touchActionToScrollType:function(a){var b=a,c=this.scrollTypes;return b===c.EMITTER?"none":b===c.XSCROLLER?"X":b===c.YSCROLLER?"Y":"XY"},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){(0===c.pointers()||1===c.pointers()&&c.has(1))&&(this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.scrolling=null,this.cancelResetClickCount())},removePrimaryPointer:function(a){a.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(a,e)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(a){var b=0;return("touchstart"===a||"touchmove"===a)&&(b=1),b},findTarget:function(b,d){if("touchstart"===this.currentTouchEvent.type){if(this.isPrimaryTouch(b)){var e={clientX:b.clientX,clientY:b.clientY,path:this.currentTouchEvent.path,target:this.currentTouchEvent.target};return a.findTarget(e)}return a.findTarget(b)}return c.get(d)},touchToPointer:function(a){var c=this.currentTouchEvent,d=b.cloneEvent(a),e=d.pointerId=a.identifier+2;d.target=this.findTarget(a,e),d.bubbles=!0,d.cancelable=!0,d.detail=this.clickCount,d.buttons=this.typeToButtons(c.type),d.width=a.webkitRadiusX||a.radiusX||0,d.height=a.webkitRadiusY||a.radiusY||0,d.pressure=a.webkitForce||a.force||.5,d.isPrimary=this.isPrimaryTouch(a),d.pointerType=this.POINTER_TYPE,d._source="touch";var f=this;return d.preventDefault=function(){f.scrolling=!1,f.firstXY=null,c.preventDefault()},d},processTouches:function(a,b){var d=a.changedTouches;this.currentTouchEvent=a;for(var e,f,g=0;g<d.length;g++)e=d[g],f=this.touchToPointer(e),"touchstart"===a.type&&c.set(f.pointerId,f.target),c.has(f.pointerId)&&b.call(this,f),("touchend"===a.type||a._cancel)&&this.cleanUpPointer(f)},shouldScroll:function(b){if(this.firstXY){var c,d=a.targetFinding.findTouchAction(b),e=this.touchActionToScrollType(d);if("none"===e)c=!1;else if("XY"===e)c=!0;else{var f=b.changedTouches[0],g=e,h="Y"===e?"X":"Y",i=Math.abs(f["client"+g]-this.firstXY[g]),j=Math.abs(f["client"+h]-this.firstXY[h]);c=i>=j}return c}},findTouch:function(a,b){for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)if(c.identifier===b)return!0},vacuumTouches:function(a){var b=a.touches;if(c.pointers()>=b.length){var d=[];c.forEach(function(a,c){if(1!==c&&!this.findTouch(b,c-2)){var e=a;d.push(e)}},this),d.forEach(function(a){this.cancel(a),c.delete(a.pointerId)})}},touchstart:function(a){this.vacuumTouches(a),this.setPrimaryTouch(a.changedTouches[0]),this.dedupSynthMouse(a),this.scrolling||(this.clickCount++,this.processTouches(a,this.down))},down:function(a){b.down(a)},touchmove:function(a){if(g)a.cancelable&&this.processTouches(a,this.move);else if(this.scrolling){if(this.firstXY){var b=a.changedTouches[0],c=b.clientX-this.firstXY.X,d=b.clientY-this.firstXY.Y,e=Math.sqrt(c*c+d*d);e>=f&&(this.touchcancel(a),this.scrolling=!0,this.firstXY=null)}}else null===this.scrolling&&this.shouldScroll(a)?this.scrolling=!0:(this.scrolling=!1,a.preventDefault(),this.processTouches(a,this.move))},move:function(a){b.move(a)},touchend:function(a){this.dedupSynthMouse(a),this.processTouches(a,this.up)},up:function(c){c.relatedTarget=a.findTarget(c),b.up(c)},cancel:function(a){b.cancel(a)},touchcancel:function(a){a._cancel=!0,this.processTouches(a,this.cancel)},cleanUpPointer:function(a){c["delete"](a.pointerId),this.removePrimaryPointer(a)},dedupSynthMouse:function(b){var c=a.mouseEvents.lastTouches,e=b.changedTouches[0];if(this.isPrimaryTouch(e)){var f={x:e.clientX,y:e.clientY};c.push(f);var g=function(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}.bind(null,c,f);setTimeout(g,d)}}};a.touchEvents=h}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,e={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel"],register:function(a){a===document&&b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var c=a;return c=b.cloneEvent(a),d&&(c.pointerType=this.POINTER_TYPES[a.pointerType]),c._source="ms",c},cleanup:function(a){c["delete"](a)},MSPointerDown:function(d){var e=this.prepareEvent(d);e.target=a.findTarget(d),c.set(d.pointerId,e.target),b.down(e)},MSPointerMove:function(a){var d=this.prepareEvent(a);d.target=c.get(d.pointerId),b.move(d)},MSPointerUp:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.up(e),this.cleanup(d.pointerId)},MSPointerCancel:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.cancel(e),this.cleanup(d.pointerId)}};a.msEvents=e}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d={events:["pointerdown","pointermove","pointerup","pointercancel"],prepareEvent:function(a){var c=b.cloneEvent(a);return c._source="pointer",c},register:function(a){a===document&&b.listen(a,this.events)},unregister:function(a){b.unlisten(a,this.events)},cleanup:function(a){c["delete"](a)},pointerdown:function(d){var e=this.prepareEvent(d);e.target=a.findTarget(d),c.set(e.pointerId,e.target),b.down(e)},pointermove:function(a){var d=this.prepareEvent(a);d.target=c.get(d.pointerId),b.move(d)},pointerup:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.up(e),this.cleanup(d.pointerId)},pointercancel:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.cancel(e),this.cleanup(d.pointerId)}};a.pointerEvents=d}(window.PolymerGestures),function(a){var b=a.dispatcher,c=window.navigator;if(window.PointerEvent)b.registerSource("pointer",a.pointerEvents);else if(c.msPointerEnabled)b.registerSource("ms",a.msEvents);else if(b.registerSource("mouse",a.mouseEvents),void 0!==window.ontouchstart){b.registerSource("touch",a.touchEvents);var d=c.userAgent.match("Safari")&&!c.userAgent.match("Chrome");d&&document.body.addEventListener("touchstart",function(){})}b.register(document,!0)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e={events:["down","move","up"],exposes:["trackstart","track","trackx","tracky","trackend"],defaultActions:{track:"none",trackx:"pan-y",tracky:"pan-x"},WIGGLE_THRESHOLD:4,clampDir:function(a){return a>0?1:-1},calcPositionDelta:function(a,b){var c=0,d=0;return a&&b&&(c=b.pageX-a.pageX,d=b.pageY-a.pageY),{x:c,y:d}},fireTrack:function(a,b,d){var e=d,f=this.calcPositionDelta(e.downEvent,b),g=this.calcPositionDelta(e.lastMoveEvent,b);if(g.x)e.xDirection=this.clampDir(g.x);else if("trackx"===a)return;if(g.y)e.yDirection=this.clampDir(g.y);else if("tracky"===a)return;var h={bubbles:!0,cancelable:!0,trackInfo:e.trackInfo,relatedTarget:b.relatedTarget,pointerType:b.pointerType,pointerId:b.pointerId,_source:"track"};"tracky"!==a&&(h.x=b.x,h.dx=f.x,h.ddx=g.x,h.clientX=b.clientX,h.pageX=b.pageX,h.screenX=b.screenX,h.xDirection=e.xDirection),"trackx"!==a&&(h.dy=f.y,h.ddy=g.y,h.y=b.y,h.clientY=b.clientY,h.pageY=b.pageY,h.screenY=b.screenY,h.yDirection=e.yDirection);var i=c.makeGestureEvent(a,h);e.downTarget.dispatchEvent(i)},down:function(a){if(a.isPrimary&&("mouse"===a.pointerType?1===a.buttons:!0)){var b={downEvent:a,downTarget:a.target,trackInfo:{},lastMoveEvent:null,xDirection:0,yDirection:0,tracking:!1};d.set(a.pointerId,b)}},move:function(a){var b=d.get(a.pointerId);if(b){if(!b.tracking){var c=this.calcPositionDelta(b.downEvent,a),e=c.x*c.x+c.y*c.y;e>this.WIGGLE_THRESHOLD&&(b.tracking=!0,b.lastMoveEvent=b.downEvent,this.fireTrack("trackstart",a,b))}b.tracking&&(this.fireTrack("track",a,b),this.fireTrack("trackx",a,b),this.fireTrack("tracky",a,b)),b.lastMoveEvent=a}},up:function(a){var b=d.get(a.pointerId);b&&(b.tracking&&this.fireTrack("trackend",a,b),d.delete(a.pointerId))}};b.registerGesture("track",e)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d={HOLD_DELAY:200,WIGGLE_THRESHOLD:16,events:["down","move","up"],exposes:["hold","holdpulse","release"],heldPointer:null,holdJob:null,pulse:function(){var a=Date.now()-this.heldPointer.timeStamp,b=this.held?"holdpulse":"hold";this.fireHold(b,a),this.held=!0},cancel:function(){clearInterval(this.holdJob),this.held&&this.fireHold("release"),this.held=!1,this.heldPointer=null,this.target=null,this.holdJob=null},down:function(a){a.isPrimary&&!this.heldPointer&&(this.heldPointer=a,this.target=a.target,this.holdJob=setInterval(this.pulse.bind(this),this.HOLD_DELAY))},up:function(a){this.heldPointer&&this.heldPointer.pointerId===a.pointerId&&this.cancel()},move:function(a){if(this.heldPointer&&this.heldPointer.pointerId===a.pointerId){var b=a.clientX-this.heldPointer.clientX,c=a.clientY-this.heldPointer.clientY;b*b+c*c>this.WIGGLE_THRESHOLD&&this.cancel()}},fireHold:function(a,b){var d={bubbles:!0,cancelable:!0,pointerType:this.heldPointer.pointerType,pointerId:this.heldPointer.pointerId,x:this.heldPointer.clientX,y:this.heldPointer.clientY,_source:"hold"};b&&(d.holdTime=b);var e=c.makeGestureEvent(a,d);this.target.dispatchEvent(e)}};b.registerGesture("hold",d)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e={events:["down","up"],exposes:["tap"],down:function(a){a.isPrimary&&!a.tapPrevented&&d.set(a.pointerId,{target:a.target,buttons:a.buttons,x:a.clientX,y:a.clientY})},shouldTap:function(a,b){return"mouse"===a.pointerType?1===b.buttons:!a.tapPrevented},up:function(b){var e=d.get(b.pointerId);if(e&&this.shouldTap(b,e)){var f=a.targetFinding.LCA(e.target,b.relatedTarget);if(f){var g=c.makeGestureEvent("tap",{bubbles:!0,cancelable:!0,x:b.clientX,y:b.clientY,detail:b.detail,pointerType:b.pointerType,pointerId:b.pointerId,altKey:b.altKey,ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey,_source:"tap"});f.dispatchEvent(g)}}d.delete(b.pointerId)}};c.preventTap=function(a){return function(){a.tapPrevented=!0,d.delete(a.pointerId)}},b.registerGesture("tap",e)}(window.PolymerGestures),function(a){"use strict";function b(a,b){if(!a)throw new Error("ASSERT: "+b)}function c(a){return a>=48&&57>=a}function d(a){return 32===a||9===a||11===a||12===a||160===a||a>=5760&&"\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff".indexOf(String.fromCharCode(a))>0}function e(a){return 10===a||13===a||8232===a||8233===a}function f(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a}function g(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a}function h(a){return"this"===a}function i(){for(;Y>X&&d(W.charCodeAt(X));)++X}function j(){var a,b;for(a=X++;Y>X&&(b=W.charCodeAt(X),g(b));)++X;return W.slice(a,X)}function k(){var a,b,c;return a=X,b=j(),c=1===b.length?S.Identifier:h(b)?S.Keyword:"null"===b?S.NullLiteral:"true"===b||"false"===b?S.BooleanLiteral:S.Identifier,{type:c,value:b,range:[a,X]}}function l(){var a,b,c=X,d=W.charCodeAt(X),e=W[X];switch(d){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:return++X,{type:S.Punctuator,value:String.fromCharCode(d),range:[c,X]};default:if(a=W.charCodeAt(X+1),61===a)switch(d){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 124:return X+=2,{type:S.Punctuator,value:String.fromCharCode(d)+String.fromCharCode(a),range:[c,X]};case 33:case 61:return X+=2,61===W.charCodeAt(X)&&++X,{type:S.Punctuator,value:W.slice(c,X),range:[c,X]}}}return b=W[X+1],e===b&&"&|".indexOf(e)>=0?(X+=2,{type:S.Punctuator,value:e+b,range:[c,X]}):"<>=!+-*%&|^/".indexOf(e)>=0?(++X,{type:S.Punctuator,value:e,range:[c,X]}):void s({},V.UnexpectedToken,"ILLEGAL")}function m(){var a,d,e;if(e=W[X],b(c(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point"),d=X,a="","."!==e){for(a=W[X++],e=W[X],"0"===a&&e&&c(e.charCodeAt(0))&&s({},V.UnexpectedToken,"ILLEGAL");c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("."===e){for(a+=W[X++];c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("e"===e||"E"===e)if(a+=W[X++],e=W[X],("+"===e||"-"===e)&&(a+=W[X++]),c(W.charCodeAt(X)))for(;c(W.charCodeAt(X));)a+=W[X++];else s({},V.UnexpectedToken,"ILLEGAL");return f(W.charCodeAt(X))&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.NumericLiteral,value:parseFloat(a),range:[d,X]}}function n(){var a,c,d,f="",g=!1;for(a=W[X],b("'"===a||'"'===a,"String literal must starts with a quote"),c=X,++X;Y>X;){if(d=W[X++],d===a){a="";break}if("\\"===d)if(d=W[X++],d&&e(d.charCodeAt(0)))"\r"===d&&"\n"===W[X]&&++X;else switch(d){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+=" ";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.StringLiteral,value:f,octal:g,range:[c,X]}}function o(a){return a.type===S.Identifier||a.type===S.Keyword||a.type===S.BooleanLiteral||a.type===S.NullLiteral}function p(){var a;return i(),X>=Y?{type:S.EOF,range:[X,X]}:(a=W.charCodeAt(X),40===a||41===a||58===a?l():39===a||34===a?n():f(a)?k():46===a?c(W.charCodeAt(X+1))?m():l():c(a)?m():l())}function q(){var a;return a=$,X=a.range[1],$=p(),X=a.range[1],a}function r(){var a;a=X,$=p(),X=a}function s(a,c){var d,e=Array.prototype.slice.call(arguments,2),f=c.replace(/%(\d)/g,function(a,c){return b(c<e.length,"Message reference must be in range"),e[c]});throw d=new Error(f),d.index=X,d.description=f,d}function t(a){s(a,V.UnexpectedToken,a.value)}function u(a){var b=q();(b.type!==S.Punctuator||b.value!==a)&&t(b)}function v(a){return $.type===S.Punctuator&&$.value===a}function w(a){return $.type===S.Keyword&&$.value===a}function x(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(bb()),v("]")||u(","));return u("]"),Z.createArrayExpression(a)}function y(){var a;return i(),a=q(),a.type===S.StringLiteral||a.type===S.NumericLiteral?Z.createLiteral(a):Z.createIdentifier(a.value)}function z(){var a,b;return a=$,i(),(a.type===S.EOF||a.type===S.Punctuator)&&t(a),b=y(),u(":"),Z.createProperty("init",b,bb())}function A(){var a=[];for(u("{");!v("}");)a.push(z()),v("}")||u(",");return u("}"),Z.createObjectExpression(a)}function B(){var a;return u("("),a=bb(),u(")"),a}function C(){var a,b,c;return v("(")?B():(a=$.type,a===S.Identifier?c=Z.createIdentifier(q().value):a===S.StringLiteral||a===S.NumericLiteral?c=Z.createLiteral(q()):a===S.Keyword?w("this")&&(q(),c=Z.createThisExpression()):a===S.BooleanLiteral?(b=q(),b.value="true"===b.value,c=Z.createLiteral(b)):a===S.NullLiteral?(b=q(),b.value=null,c=Z.createLiteral(b)):v("[")?c=x():v("{")&&(c=A()),c?c:void t(q()))}function D(){var a=[];if(u("("),!v(")"))for(;Y>X&&(a.push(bb()),!v(")"));)u(",");return u(")"),a}function E(){var a;return a=q(),o(a)||t(a),Z.createIdentifier(a.value)}function F(){return u("."),E()}function G(){var a;return u("["),a=bb(),u("]"),a}function H(){var a,b,c;for(a=C();;)if(v("["))c=G(),a=Z.createMemberExpression("[",a,c);else if(v("."))c=F(),a=Z.createMemberExpression(".",a,c);else{if(!v("("))break;b=D(),a=Z.createCallExpression(a,b)}return a}function I(){var a,b;return $.type!==S.Punctuator&&$.type!==S.Keyword?b=ab():v("+")||v("-")||v("!")?(a=q(),b=I(),b=Z.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("typeof")?s({},V.UnexpectedToken):b=ab(),b}function J(a){var b=0;if(a.type!==S.Punctuator&&a.type!==S.Keyword)return 0;switch(a.value){case"||":b=1;break;case"&&":b=2;break;case"==":case"!=":case"===":case"!==":b=6;break;case"<":case">":case"<=":case">=":case"instanceof":b=7;break;case"in":b=7;break;case"+":case"-":b=9;break;case"*":case"/":case"%":b=11}return b}function K(){var a,b,c,d,e,f,g,h;if(g=I(),b=$,c=J(b),0===c)return g;for(b.prec=c,q(),e=I(),d=[g,b,e];(c=J($))>0;){for(;d.length>2&&c<=d[d.length-2].prec;)e=d.pop(),f=d.pop().value,g=d.pop(),a=Z.createBinaryExpression(f,g,e),d.push(a);b=q(),b.prec=c,d.push(b),a=I(),d.push(a)}for(h=d.length-1,a=d[h];h>1;)a=Z.createBinaryExpression(d[h-1].value,d[h-2],a),h-=2;return a}function L(){var a,b,c;return a=K(),v("?")&&(q(),b=L(),u(":"),c=L(),a=Z.createConditionalExpression(a,b,c)),a}function M(){var a,b;return a=q(),a.type!==S.Identifier&&t(a),b=v("(")?D():[],Z.createFilter(a.value,b)}function N(){for(;v("|");)q(),M()}function O(){i(),r();var a=bb();a&&(","===$.value||"in"==$.value&&a.type===U.Identifier?Q(a):(N(),"as"===$.value?P(a):Z.createTopLevel(a))),$.type!==S.EOF&&t($)}function P(a){q();var b=q().value;Z.createAsExpression(a,b)}function Q(a){var b;","===$.value&&(q(),$.type!==S.Identifier&&t($),b=q().value),q();var c=bb();N(),Z.createInExpression(a.name,b,c)}function R(a,b){return Z=b,W=a,X=0,Y=W.length,$=null,_={labelSet:{}},O()}var S,T,U,V,W,X,Y,Z,$,_;S={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},T={},T[S.BooleanLiteral]="Boolean",T[S.EOF]="<end>",T[S.Identifier]="Identifier",T[S.Keyword]="Keyword",T[S.NullLiteral]="Null",T[S.NumericLiteral]="Numeric",T[S.Punctuator]="Punctuator",T[S.StringLiteral]="String",U={ArrayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",Identifier:"Identifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ThisExpression:"ThisExpression",UnaryExpression:"UnaryExpression"},V={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"};var ab=H,bb=L;a.esprima={parse:R}}(this),function(a){"use strict";function b(a,b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d.nodeType!==Node.ELEMENT_NODE||"TEMPLATE"!==d.tagName||"bind"!==b&&"repeat"!==b))throw Error("as and in can only be used within <template bind/repeat>")}catch(g){return void console.error("Invalid expression syntax: "+a,g)}return function(a,b,c){var d=f.getBinding(a,e,c);return f.scopeIdent&&d&&(b.polymerExpressionScopeIdent_=f.scopeIdent,f.indexIdent&&(b.polymerExpressionIndexIdent_=f.indexIdent)),d}}function c(a){var b=q[a];if(!b){var c=new j;esprima.parse(a,c),b=new l(c),q[a]=b}return b}function d(a){this.value=a,this.valueFn_=void 0}function e(a){this.name=a,this.path=Path.get(a)}function f(a,b,c){this.computed="["==c,this.dynamicDeps="function"==typeof a||a.dynamicDeps||this.computed&&!(b instanceof d),this.simplePath=!this.dynamicDeps&&(b instanceof e||b instanceof d)&&(a instanceof f||a instanceof e),this.object=this.simplePath?a:i(a),this.property=!this.computed||this.simplePath?b:i(b)}function g(a,b){this.name=a,this.args=[];for(var c=0;c<b.length;c++)this.args[c]=i(b[c])}function h(){throw Error("Not Implemented")}function i(a){return"function"==typeof a?a:a.valueFn()}function j(){this.expression=null,this.filters=[],this.deps={},this.currentPath=void 0,this.scopeIdent=void 0,this.indexIdent=void 0,this.dynamicDeps=!1}function k(a){this.value_=a}function l(a){if(this.scopeIdent=a.scopeIdent,this.indexIdent=a.indexIdent,!a.expression)throw Error("No expression found.");this.expression=a.expression,i(this.expression),this.filters=a.filters,this.dynamicDeps=a.dynamicDeps}function m(a){return String(a).replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}function n(a,b){for(;a[t]&&!Object.prototype.hasOwnProperty.call(a,b);)a=a[t];return a}function o(a){switch(a){case"":return!1;case"false":case"null":case"true":return!0}return isNaN(Number(a))?!1:!0}function p(){}var q=Object.create(null);d.prototype={valueFn:function(){if(!this.valueFn_){var a=this.value;this.valueFn_=function(){return a}}return this.valueFn_}},e.prototype={valueFn:function(){if(!this.valueFn_){var a=(this.name,this.path);this.valueFn_=function(b,c){return c&&c.addPath(b,a),a.getValueFrom(b)}}return this.valueFn_},setValue:function(a,b){return 1==this.path.length,a=n(a,this.path[0]),this.path.setValueFrom(a,b)}},f.prototype={get fullPath(){if(!this.fullPath_){var a=this.object instanceof f?this.object.fullPath.slice():[this.object.name];a.push(this.property instanceof e?this.property.name:this.property.value),this.fullPath_=Path.get(a)}return this.fullPath_},valueFn:function(){if(!this.valueFn_){var a=this.object;if(this.simplePath){var b=this.fullPath;this.valueFn_=function(a,c){return c&&c.addPath(a,b),b.getValueFrom(a)}}else if(this.computed){var c=this.property;this.valueFn_=function(b,d,e){var f=a(b,d,e),g=c(b,d,e);return d&&d.addPath(f,[g]),f?f[g]:void 0}}else{var b=Path.get(this.property.name);this.valueFn_=function(c,d,e){var f=a(c,d,e);return d&&d.addPath(f,b),b.getValueFrom(f)}}}return this.valueFn_},setValue:function(a,b){if(this.simplePath)return this.fullPath.setValueFrom(a,b),b;var c=this.object(a),d=this.property instanceof e?this.property.name:this.property(a);return c[d]=b}},g.prototype={transform:function(a,b,c,d,e){var f=c[this.name],g=a; +if(f)g=void 0;else if(f=g[this.name],!f)return void console.error("Cannot find function or filter: "+this.name);if(d?f=f.toModel:"function"==typeof f.toDOM&&(f=f.toDOM),"function"!=typeof f)return void console.error("Cannot find function or filter: "+this.name);for(var h=e||[],j=0;j<this.args.length;j++)h.push(i(this.args[j])(a,b,c));return f.apply(g,h)}};var r={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},s={"+":function(a,b){return a+b},"-":function(a,b){return a-b},"*":function(a,b){return a*b},"/":function(a,b){return a/b},"%":function(a,b){return a%b},"<":function(a,b){return b>a},">":function(a,b){return a>b},"<=":function(a,b){return b>=a},">=":function(a,b){return a>=b},"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"===":function(a,b){return a===b},"!==":function(a,b){return a!==b},"&&":function(a,b){return a&&b},"||":function(a,b){return a||b}};j.prototype={createUnaryExpression:function(a,b){if(!r[a])throw Error("Disallowed operator: "+a);return b=i(b),function(c,d,e){return r[a](b(c,d,e))}},createBinaryExpression:function(a,b,c){if(!s[a])throw Error("Disallowed operator: "+a);switch(b=i(b),c=i(c),a){case"||":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)||c(a,d,e)};case"&&":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)&&c(a,d,e)}}return function(d,e,f){return s[a](b(d,e,f),c(d,e,f))}},createConditionalExpression:function(a,b,c){return a=i(a),b=i(b),c=i(c),this.dynamicDeps=!0,function(d,e,f){return a(d,e,f)?b(d,e,f):c(d,e,f)}},createIdentifier:function(a){var b=new e(a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){var d=new f(b,c,a);return d.dynamicDeps&&(this.dynamicDeps=!0),d},createCallExpression:function(a,b){if(!(a instanceof e))throw Error("Only identifier function invocations are allowed");var c=new g(a.name,b);return function(a,b,d){return c.transform(a,b,d,!1)}},createLiteral:function(a){return new d(a.value)},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=i(a[b]);return function(b,c,d){for(var e=[],f=0;f<a.length;f++)e.push(a[f](b,c,d));return e}},createProperty:function(a,b,c){return{key:b instanceof e?b.name:b.value,value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].value=i(a[b].value);return function(b,c,d){for(var e={},f=0;f<a.length;f++)e[a[f].key]=a[f].value(b,c,d);return e}},createFilter:function(a,b){this.filters.push(new g(a,b))},createAsExpression:function(a,b){this.expression=a,this.scopeIdent=b},createInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexIdent=b},createTopLevel:function(a){this.expression=a},createThisExpression:h},k.prototype={open:function(){return this.value_},discardChanges:function(){return this.value_},deliver:function(){},close:function(){}},l.prototype={getBinding:function(a,b,c){function d(){if(h)return h=!1,g;i.dynamicDeps&&f.startReset();var c=i.getValue(a,i.dynamicDeps?f:void 0,b);return i.dynamicDeps&&f.finishReset(),c}function e(c){return i.setValue(a,c,b),c}if(c)return this.getValue(a,void 0,b);var f=new CompoundObserver,g=this.getValue(a,f,b),h=!0,i=this;return new ObserverTransform(f,d,e,!0)},getValue:function(a,b,c){for(var d=i(this.expression)(a,b,c),e=0;e<this.filters.length;e++)d=this.filters[e].transform(a,b,c,!1,[d]);return d},setValue:function(a,b,c){for(var d=this.filters?this.filters.length:0;d-->0;)b=this.filters[d].transform(a,void 0,c,!0,[b]);return this.expression.setValue?this.expression.setValue(a,b):void 0}};var t="@"+Math.random().toString(36).slice(2);p.prototype={styleObject:function(a){var b=[];for(var c in a)b.push(m(c)+": "+a[c]);return b.join("; ")},tokenList:function(a){var b=[];for(var c in a)a[c]&&b.push(c);return b.join(" ")},prepareInstancePositionChanged:function(a){var b=a.polymerExpressionIndexIdent_;if(b)return function(a,c){a.model[b]=c}},prepareBinding:function(a,c,d){var e=Path.get(a);{if(o(a)||!e.valid)return b(a,c,d,this);if(1==e.length)return function(a,b,c){if(c)return e.getValueFrom(a);var d=n(a,e[0]);return new PathObserver(d,e)}}},prepareInstanceModel:function(a){var b=a.polymerExpressionScopeIdent_;if(b){var c=a.templateInstance?a.templateInstance.model:a.model,d=a.polymerExpressionIndexIdent_;return function(a){return u(c,a,b,d)}}}};var u="__proto__"in{}?function(a,b,c,d){var e={};return e[c]=b,e[d]=void 0,e[t]=a,e.__proto__=a,e}:function(a,b,c,d){var e=Object.create(a);return Object.defineProperty(e,c,{value:b,configurable:!0,writable:!0}),Object.defineProperty(e,d,{value:void 0,configurable:!0,writable:!0}),Object.defineProperty(e,t,{value:a,configurable:!0,writable:!0}),e};a.PolymerExpressions=p,p.getExpression=c}(this),Polymer={version:"0.3.5"},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(a,b){return a&&b&&Object.getOwnPropertyNames(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b,c);d&&(Object.defineProperty(a,c,d),"function"==typeof d.value&&(d.value.nom=c))}),a}a.extend=b}(Polymer),function(a){function b(a,b,d){return a?a.stop():a=new c(this),a.go(b,d),a}var c=function(a){this.context=a,this.boundComplete=this.complete.bind(this)};c.prototype={go:function(a,b){this.callback=a;var c;b?(c=setTimeout(this.boundComplete,b),this.handle=function(){clearTimeout(c)}):(c=requestAnimationFrame(this.boundComplete),this.handle=function(){cancelAnimationFrame(c)})},stop:function(){this.handle&&(this.handle(),this.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(Polymer),function(){var a={};HTMLElement.register=function(b,c){a[b]=c},HTMLElement.getPrototypeForTag=function(b){var c=b?a[b]:HTMLElement.prototype;return c||Object.getPrototypeOf(document.createElement(b))};var b=Event.prototype.stopPropagation;Event.prototype.stopPropagation=function(){this.cancelBubble=!0,b.apply(this,arguments)}}(Polymer),function(a){function b(a){var e=b.caller,g=e.nom,h=e._super;h||(g||(g=e.nom=c.call(this,e)),g||console.warn("called super() on a method not installed declaratively (has no .nom property)"),h=d(e,g,f(this)));var i=h[g];return i?(i._super||d(i,g,h),i.apply(this,a||[])):void 0}function c(a){for(var b=this.__proto__;b&&b!==HTMLElement.prototype;){for(var c,d=Object.getOwnPropertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){var g=Object.getOwnPropertyDescriptor(b,c);if("function"==typeof g.value&&g.value===a)return c}b=b.__proto__}}function d(a,b,c){var d=e(c,b,a);return d[b]&&(d[b].nom=b),a._super=d}function e(a,b,c){for(;a;){if(a[b]!==c&&a[b])return a;a=f(a)}return Object}function f(a){return a.__proto__}a.super=b}(Polymer),function(a){function b(a){return a}function c(a,b){var c=typeof b;return b instanceof Date&&(c="date"),d[c](a,b)}var d={string:b,undefined:b,date:function(a){return new Date(Date.parse(a)||Date.now())},"boolean":function(a){return""===a?!0:"false"===a?!1:!!a},number:function(a){var b=parseFloat(a);return 0===b&&(b=parseInt(a)),isNaN(b)?a:b},object:function(a,b){if(null===b)return a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c){return a}},"function":function(a,b){return b}};a.deserializeValue=c}(Polymer),function(a){var b=a.extend,c={};c.declaration={},c.instance={},c.publish=function(a,c){for(var d in a)b(c,a[d])},a.api=c}(Polymer),function(a){var b={async:function(a,b,c){Platform.flush(),b=b&&b.length?b:[b];var d=function(){(this[a]||a).apply(this,b)}.bind(this),e=c?setTimeout(d,c):requestAnimationFrame(d);return c?e:~e},cancelAsync:function(a){0>a?cancelAnimationFrame(~a):clearTimeout(a)},fire:function(a,b,c,d,e){var f=c||this,b=null===b||void 0===b?{}:b,g=new CustomEvent(a,{bubbles:void 0!==d?d:!0,cancelable:void 0!==e?e:!0,detail:b});return f.dispatchEvent(g),g},asyncFire:function(){this.async("fire",arguments)},classFollows:function(a,b,c){b&&b.classList.remove(c),a&&a.classList.add(c)},injectBoundHTML:function(a,b){var c=document.createElement("template");c.innerHTML=a;var d=this.instanceTemplate(c);return b&&(b.textContent="",b.appendChild(d)),d}},c=function(){},d={};b.asyncMethod=b.async,a.api.instance.utils=b,a.nop=c,a.nob=d}(Polymer),function(a){var b=window.logFlags||{},c="on-",d={EVENT_PREFIX:c,addHostListeners:function(){var a=this.eventDelegates;b.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localName,a);for(var c in a){var d=a[c];PolymerGestures.addEventListener(this,c,this.element.getEventHandler(this,this,d))}},dispatchMethod:function(a,c,d){if(a){b.events&&console.group("[%s] dispatch [%s]",a.localName,c);var e="function"==typeof c?c:a[c];e&&e[d?"apply":"call"](a,d),b.events&&console.groupEnd(),Platform.flush()}}};a.api.instance.events=d,a.addEventListener=PolymerGestures.addEventListener,a.removeEventListener=PolymerGestures.removeEventListener}(Polymer),function(a){var b={copyInstanceAttributes:function(){var a=this._instanceAttributes;for(var b in a)this.hasAttribute(b)||this.setAttribute(b,a[b])},takeAttributes:function(){if(this._publishLC)for(var a,b=0,c=this.attributes,d=c.length;(a=c[b])&&d>b;b++)this.attributeToProperty(a.name,a.value)},attributeToProperty:function(b,c){var b=this.propertyForAttribute(b);if(b){if(c&&c.search(a.bindPattern)>=0)return;var d=this[b],c=this.deserializeValue(c,d);c!==d&&(this[b]=c)}},propertyForAttribute:function(a){var b=this._publishLC&&this._publishLC[a];return b},deserializeValue:function(b,c){return a.deserializeValue(b,c)},serializeValue:function(a,b){return"boolean"===b?a?"":void 0:"object"!==b&&"function"!==b&&void 0!==a?a:void 0},reflectPropertyToAttribute:function(a){var b=typeof this[a],c=this.serializeValue(this[a],b);void 0!==c?this.setAttribute(a,c):"boolean"===b&&this.removeAttribute(a)}};a.api.instance.attributes=b}(Polymer),function(a){function b(a,b){return a===b?0!==a||1/a===1/b:f(a)&&f(b)?!0:a!==a&&b!==b}function c(a,b){return void 0===b&&null===a?b:null===b||void 0===b?a:b}var d=window.logFlags||{},e={object:void 0,type:"update",name:void 0,oldValue:void 0},f=Number.isNaN||function(a){return"number"==typeof a&&isNaN(a)},g={createPropertyObserver:function(){var a=this._observeNames;if(a&&a.length){var b=this._propertyObserver=new CompoundObserver(!0);this.registerObserver(b);for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)b.addPath(this,c),this.observeArrayValue(c,this[c],null)}},openPropertyObserver:function(){this._propertyObserver&&this._propertyObserver.open(this.notifyPropertyChanges,this)},notifyPropertyChanges:function(a,b,c){var d,e,f={};for(var g in b)if(d=c[2*g+1],e=this.observe[d]){var h=b[g],i=a[g];this.observeArrayValue(d,i,h),f[e]||(void 0!==h&&null!==h||void 0!==i&&null!==i)&&(f[e]=!0,this.invokeMethod(e,[h,i,arguments]))}},deliverChanges:function(){this._propertyObserver&&this._propertyObserver.deliver()},propertyChanged_:function(a){this.reflect[a]&&this.reflectPropertyToAttribute(a)},observeArrayValue:function(a,b,c){var e=this.observe[a];if(e&&(Array.isArray(c)&&(d.observe&&console.log("[%s] observeArrayValue: unregister observer [%s]",this.localName,a),this.closeNamedObserver(a+"__array")),Array.isArray(b))){d.observe&&console.log("[%s] observeArrayValue: register observer [%s]",this.localName,a,b);var f=new ArrayObserver(b);f.open(function(a,b){this.invokeMethod(e,[b])},this),this.registerNamedObserver(a+"__array",f)}},emitPropertyChangeRecord:function(a,c,d){if(!b(c,d)&&(this.propertyChanged_(a,c,d),Observer.hasObjectObserve)){var f=this.notifier_;f||(f=this.notifier_=Object.getNotifier(this)),e.object=this,e.name=a,e.oldValue=d,f.notify(e)}},bindToAccessor:function(a,c,d){var e=a+"_",f=a+"Observable_";this[f]=c;var g=this[e],h=this,i=c.open(function(b,c){h[e]=b,h.emitPropertyChangeRecord(a,b,c)});if(d&&!b(g,i)){var j=d(g,i);b(i,j)||(i=j,c.setValue&&c.setValue(i))}this[e]=i,this.emitPropertyChangeRecord(a,i,g);var k={close:function(){c.close(),h[f]=void 0}};return this.registerObserver(k),k},createComputedProperties:function(){if(this._computedNames)for(var a=0;a<this._computedNames.length;a++){var b=this._computedNames[a],c=this.computed[b];try{var d=PolymerExpressions.getExpression(c),e=d.getBinding(this,this.element.syntax);this.bindToAccessor(b,e)}catch(f){console.error("Failed to create computed property",f)}}},bindProperty:function(a,b,d){return d?void(this[a]=b):this.bindToAccessor(a,b,c)},invokeMethod:function(a,b){var c=this[a]||a;"function"==typeof c&&c.apply(this,b)},registerObserver:function(a){return this._observers?void this._observers.push(a):void(this._observers=[a])},closeObservers:function(){if(this._observers){for(var a=this._observers,b=0;b<a.length;b++){var c=a[b];c&&"function"==typeof c.close&&c.close()}this._observers=[]}},registerNamedObserver:function(a,b){var c=this._namedObservers||(this._namedObservers={});c[a]=b},closeNamedObserver:function(a){var b=this._namedObservers;return b&&b[a]?(b[a].close(),b[a]=null,!0):void 0},closeNamedObservers:function(){if(this._namedObservers){for(var a in this._namedObservers)this.closeNamedObserver(a);this._namedObservers={}}}};a.api.instance.properties=g}(Polymer),function(a){var b=window.logFlags||0,c={instanceTemplate:function(a){for(var b=this.syntax||!a.bindingDelegate&&this.element.syntax,c=a.createInstance(this,b),d=c.bindings_,e=0;e<d.length;e++)this.registerObserver(d[e]);return c},bind:function(a,b,c){var d=this.propertyForAttribute(a);if(d){var e=this.bindProperty(d,b,c);return Platform.enableBindingsReflection&&e&&(e.path=b.path_,this._recordBinding(d,e)),this.reflect[d]&&this.reflectPropertyToAttribute(d),e}return this.mixinSuper(arguments)},bindFinished:function(){this.makeElementReady()},_recordBinding:function(a,b){this.bindings_=this.bindings_||{},this.bindings_[a]=b},asyncUnbindAll:function(){this._unbound||(b.unbind&&console.log("[%s] asyncUnbindAll",this.localName),this._unbindAllJob=this.job(this._unbindAllJob,this.unbindAll,0))},unbindAll:function(){this._unbound||(this.closeObservers(),this.closeNamedObservers(),this._unbound=!0)},cancelUnbindAll:function(){return this._unbound?void(b.unbind&&console.warn("[%s] already unbound, cannot cancel unbindAll",this.localName)):(b.unbind&&console.log("[%s] cancelUnbindAll",this.localName),void(this._unbindAllJob&&(this._unbindAllJob=this._unbindAllJob.stop())))}},d=/\{\{([^{}]*)}}/;a.bindPattern=d,a.api.instance.mdv=c}(Polymer),function(a){function b(a){return a.hasOwnProperty("PolymerBase")}function c(){}var d={PolymerBase:!0,job:function(a,b,c){if("string"!=typeof a)return Polymer.job.call(this,a,b,c);var d="___"+a;this[d]=Polymer.job.call(this,this[d],b,c)},"super":Polymer.super,created:function(){},ready:function(){},createdCallback:function(){this.templateInstance&&this.templateInstance.model&&console.warn("Attributes on "+this.localName+" were data bound prior to Polymer upgrading the element. This may result in incorrect binding types."),this.created(),this.prepareElement(),this.ownerDocument.isStagingDocument||this.makeElementReady()},prepareElement:function(){return this._elementPrepared?void console.warn("Element already prepared",this.localName):(this._elementPrepared=!0,this.shadowRoots={},this.createPropertyObserver(),this.openPropertyObserver(),this.copyInstanceAttributes(),this.takeAttributes(),void this.addHostListeners())},makeElementReady:function(){this._readied||(this._readied=!0,this.createComputedProperties(),this.parseDeclarations(this.__proto__),this.removeAttribute("unresolved"),this.ready())},attachedCallback:function(){this.cancelUnbindAll(),this.attached&&this.attached(),this.enteredView&&this.enteredView(),this.hasBeenAttached||(this.hasBeenAttached=!0,this.domReady&&this.async("domReady"))},detachedCallback:function(){this.preventDispose||this.asyncUnbindAll(),this.detached&&this.detached(),this.leftView&&this.leftView()},enteredViewCallback:function(){this.attachedCallback()},leftViewCallback:function(){this.detachedCallback()},enteredDocumentCallback:function(){this.attachedCallback()},leftDocumentCallback:function(){this.detachedCallback()},parseDeclarations:function(a){a&&a.element&&(this.parseDeclarations(a.__proto__),a.parseDeclaration.call(this,a.element))},parseDeclaration:function(a){var b=this.fetchTemplate(a);if(b){var c=this.shadowFromTemplate(b);this.shadowRoots[a.name]=c}},fetchTemplate:function(a){return a.querySelector("template")},shadowFromTemplate:function(a){if(a){var b=this.createShadowRoot(),c=this.instanceTemplate(a);return b.appendChild(c),this.shadowRootReady(b,a),b}},lightFromTemplate:function(a,b){if(a){this.eventController=this;var c=this.instanceTemplate(a);return b?this.insertBefore(c,b):this.appendChild(c),this.shadowRootReady(this),c}},shadowRootReady:function(a){this.marshalNodeReferences(a)},marshalNodeReferences:function(a){var b=this.$=this.$||{};if(a)for(var c,d=a.querySelectorAll("[id]"),e=0,f=d.length;f>e&&(c=d[e]);e++)b[c.id]=c},attributeChangedCallback:function(a){"class"!==a&&"style"!==a&&this.attributeToProperty(a,this.getAttribute(a)),this.attributeChanged&&this.attributeChanged.apply(this,arguments)},onMutation:function(a,b){var c=new MutationObserver(function(a){b.call(this,c,a),c.disconnect()}.bind(this));c.observe(a,{childList:!0,subtree:!0})}};c.prototype=d,d.constructor=c,a.Base=c,a.isBase=b,a.api.instance.base=d}(Polymer),function(a){function b(a){return a.__proto__}function c(a,b){var c="",d=!1;b&&(c=b.localName,d=b.hasAttribute("is"));var e=Platform.ShadowCSS.makeScopeSelector(c,d);return Platform.ShadowCSS.shimCssText(a,e)}var d=(window.logFlags||{},window.ShadowDOMPolyfill),e="element",f="controller",g={STYLE_SCOPE_ATTRIBUTE:e,installControllerStyles:function(){var a=this.findStyleScope();if(a&&!this.scopeHasNamedStyle(a,this.localName)){for(var c=b(this),d="";c&&c.element;)d+=c.element.cssTextForScope(f),c=b(c);d&&this.installScopeCssText(d,a)}},installScopeStyle:function(a,b,c){var c=c||this.findStyleScope(),b=b||"";if(c&&!this.scopeHasNamedStyle(c,this.localName+b)){var d="";if(a instanceof Array)for(var e,f=0,g=a.length;g>f&&(e=a[f]);f++)d+=e.textContent+"\n\n";else d=a.textContent;this.installScopeCssText(d,c,b)}},installScopeCssText:function(a,b,e){if(b=b||this.findStyleScope(),e=e||"",b){d&&(a=c(a,b.host));var g=this.element.cssTextToScopeStyle(a,f);Polymer.applyStyleToScope(g,b),this.styleCacheForScope(b)[this.localName+e]=!0}},findStyleScope:function(a){for(var b=a||this;b.parentNode;)b=b.parentNode;return b},scopeHasNamedStyle:function(a,b){var c=this.styleCacheForScope(a);return c[b]},styleCacheForScope:function(a){if(d){var b=a.host?a.host.localName:a.localName;return h[b]||(h[b]={})}return a._scopeStyles=a._scopeStyles||{}}},h={};a.api.instance.styles=g}(Polymer),function(a){function b(a,b){if(1===arguments.length&&"string"!=typeof arguments[0]){b=a;var c=document._currentScript;if(a=c&&c.parentNode&&c.parentNode.getAttribute?c.parentNode.getAttribute("name"):"",!a)throw"Element name could not be inferred."}if(f[a])throw"Already registered (Polymer) prototype for element "+a;e(a,b),d(a)}function c(a,b){h[a]=b}function d(a){h[a]&&(h[a].registerWhenReady(),delete h[a])}function e(a,b){return i[a]=b||{}}function f(a){return i[a]}var g=a.extend,h=(a.api,{}),i={};a.getRegisteredPrototype=f,a.waitingForPrototype=c,window.Polymer=b,g(Polymer,a);var j=Platform.deliverDeclarations();if(j)for(var k,l=0,m=j.length;m>l&&(k=j[l]);l++)b.apply(null,k)}(Polymer),function(a){var b={resolveElementPaths:function(a){Platform.urlResolver.resolveDom(a)},addResolvePathApi:function(){var a=this.getAttribute("assetpath")||"",b=new URL(a,this.ownerDocument.baseURI);this.prototype.resolvePath=function(a,c){var d=new URL(a,c||b);return d.href}}};a.api.declaration.path=b}(Polymer),function(a){function b(a,b){var c=new URL(a.getAttribute("href"),b).href;return"@import '"+c+"';"}function c(a,b){if(a){b===document&&(b=document.head),i&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttribute(h,e);var f=b.firstElementChild;if(b===document.head){var g="style["+h+"]",j=document.head.querySelectorAll(g);j.length&&(f=j[j.length-1].nextElementSibling)}b.insertBefore(c,f)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerDocument;var c=b.createElement("style");return c.textContent=a,c}function e(a){return a&&a.__resource||""}function f(a,b){return q?q.call(a,b):void 0}var g=(window.logFlags||{},a.api.instance.styles),h=g.STYLE_SCOPE_ATTRIBUTE,i=window.ShadowDOMPolyfill,j="style",k="@import",l="link[rel=stylesheet]",m="global",n="polymer-scope",o={loadStyles:function(a){var b=this.fetchTemplate(),c=b&&this.templateContent();if(c){this.convertSheetsToStyles(c);var d=this.findLoadableStyles(c);if(d.length){var e=b.ownerDocument.baseURI;return Platform.styleResolver.loadStyles(d,e,a)}}a&&a()},convertSheetsToStyles:function(a){for(var c,e,f=a.querySelectorAll(l),g=0,h=f.length;h>g&&(c=f[g]);g++)e=d(b(c,this.ownerDocument.baseURI),this.ownerDocument),this.copySheetAttributes(e,c),c.parentNode.replaceChild(e,c)},copySheetAttributes:function(a,b){for(var c,d=0,e=b.attributes,f=e.length;(c=e[d])&&f>d;d++)"rel"!==c.name&&"href"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:function(a){var b=[];if(a)for(var c,d=a.querySelectorAll(j),e=0,f=d.length;f>e&&(c=d[e]);e++)c.textContent.match(k)&&b.push(c);return b},installSheets:function(){this.cacheSheets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:function(){this.sheets=this.findNodes(l),this.sheets.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function(){this.styles=this.findNodes(j+"["+n+"]"),this.styles.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},installLocalSheets:function(){var a=this.sheets.filter(function(a){return!a.hasAttribute(n)}),b=this.templateContent();if(b){var c="";if(a.forEach(function(a){c+=e(a)+"\n"}),c){var f=d(c,this.ownerDocument);b.insertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.querySelectorAll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a).array();c=c.concat(e)}return b?c.filter(b):c},installGlobalStyles:function(){var a=this.styleForScope(m);c(a,document.head)},cssTextForScope:function(a){var b="",c="["+n+"="+a+"]",d=function(a){return f(a,c)},g=this.sheets.filter(d);g.forEach(function(a){b+=e(a)+"\n\n"});var h=this.styles.filter(d);return h.forEach(function(a){b+=a.textContent+"\n\n"}),b},styleForScope:function(a){var b=this.cssTextForScope(a);return this.cssTextToScopeStyle(b,a)},cssTextToScopeStyle:function(a,b){if(a){var c=d(a);return c.setAttribute(h,this.getAttribute("name")+"-"+b),c}}},p=HTMLElement.prototype,q=p.matches||p.matchesSelector||p.webkitMatchesSelector||p.mozMatchesSelector;a.api.declaration.styles=o,a.applyStyleToScope=c}(Polymer),function(a){var b=(window.logFlags||{},a.api.instance.events),c=b.EVENT_PREFIX,d={};["webkitAnimationStart","webkitAnimationEnd","webkitTransitionEnd","DOMFocusOut","DOMFocusIn","DOMMouseScroll"].forEach(function(a){d[a.toLowerCase()]=a});var e={parseHostEvents:function(){var a=this.prototype.eventDelegates;this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for(var b,c=0;b=this.attributes[c];c++)this.hasEventPrefix(b.name)&&(a[this.removeEventPrefix(b.name)]=b.value.replace("{{","").replace("}}","").trim())},hasEventPrefix:function(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:function(a){return a.slice(f)},findController:function(a){for(;a.parentNode;){if(a.eventController)return a.eventController;a=a.parentNode}return a.host},getEventHandler:function(a,b,c){var d=this;return function(e){a&&a.PolymerBase||(a=d.findController(b));var f=[e,e.detail,e.currentTarget];a.dispatchMethod(a,c,f)}},prepareEventBinding:function(a,b){if(this.hasEventPrefix(b)){var c=this.removeEventPrefix(b);c=d[c]||c;var e=this;return function(b,d,f){function g(){return"{{ "+a+" }}"}var h=e.getEventHandler(void 0,d,a);return PolymerGestures.addEventListener(d,c,h),f?void 0:{open:g,discardChanges:g,close:function(){PolymerGestures.removeEventListener(d,c,h)}}}}}},f=c.length;a.api.declaration.events=e}(Polymer),function(a){var b={inferObservers:function(a){var b,c=a.observe;for(var d in a)"Changed"===d.slice(-7)&&(c||(c=a.observe={}),b=d.slice(0,-7),c[b]=c[b]||d)},explodeObservers:function(a){var b=a.observe;if(b){var c={};for(var d in b)for(var e,f=d.split(" "),g=0;e=f[g];g++)c[e]=b[d];a.observe=c}},optimizePropertyMaps:function(a){if(a.observe){var b=a._observeNames=[];for(var c in a.observe)for(var d,e=c.split(" "),f=0;d=e[f];f++)b.push(d)}if(a.publish){var b=a._publishNames=[];for(var c in a.publish)b.push(c)}if(a.computed){var b=a._computedNames=[];for(var c in a.computed)b.push(c)}},publishProperties:function(a,b){var c=a.publish;c&&(this.requireProperties(c,a,b),a._publishLC=this.lowerCaseMap(c))},requireProperties:function(a,b){b.reflect=b.reflect||{};for(var c in a){var d=a[c];d&&void 0!==d.reflect&&(b.reflect[c]=Boolean(d.reflect),d=d.value),void 0!==d&&(b[c]=d)}},lowerCaseMap:function(a){var b={};for(var c in a)b[c.toLowerCase()]=c;return b},createPropertyAccessor:function(a){var b=this.prototype,c=a+"_",d=a+"Observable_";b[c]=b[a],Object.defineProperty(b,a,{get:function(){var a=this[d];return a&&a.deliver(),this[c]},set:function(b){var e=this[d];if(e)return void e.setValue(b);var f=this[c];return this[c]=b,this.emitPropertyChangeRecord(a,b,f),b},configurable:!0})},createPropertyAccessors:function(a){var b=a._publishNames;if(b&&b.length)for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.createPropertyAccessor(c);var b=a._computedNames;if(b&&b.length)for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.createPropertyAccessor(c)}};a.api.declaration.properties=b}(Polymer),function(a){var b="attributes",c=/\s|,/,d={inheritAttributesObjects:function(a){this.inheritObject(a,"publishLC"),this.inheritObject(a,"_instanceAttributes")},publishAttributes:function(a){var d=this.getAttribute(b);if(d)for(var e,f=a.publish||(a.publish={}),g=d.split(c),h=0,i=g.length;i>h;h++)e=g[h].trim(),e&&void 0===f[e]&&(f[e]=void 0)},accumulateInstanceAttributes:function(){for(var a,b=this.prototype._instanceAttributes,c=this.attributes,d=0,e=c.length;e>d&&(a=c[d]);d++)this.isInstanceAttribute(a.name)&&(b[a.name]=a.value)},isInstanceAttribute:function(a){return!this.blackList[a]&&"on-"!==a.slice(0,3)},blackList:{name:1,"extends":1,constructor:1,noscript:1,assetpath:1,"cache-csstext":1}};d.blackList[b]=1,a.api.declaration.attributes=d}(Polymer),function(a){var b=a.api.declaration.events,c=new PolymerExpressions,d=c.prepareBinding;c.prepareBinding=function(a,e,f){return b.prepareEventBinding(a,e,f)||d.call(c,a,e,f)};var e={syntax:c,fetchTemplate:function(){return this.querySelector("template")},templateContent:function(){var a=this.fetchTemplate();return a&&Platform.templateContent(a)},installBindingDelegate:function(a){a&&(a.bindingDelegate=this.syntax)}};a.api.declaration.mdv=e}(Polymer),function(a){function b(a){if(!Object.__proto__){var b=Object.getPrototypeOf(a);a.__proto__=b,d(b)&&(b.__proto__=Object.getPrototypeOf(b))}}var c=a.api,d=a.isBase,e=a.extend,f=window.ShadowDOMPolyfill,g={register:function(a,b){this.buildPrototype(a,b),this.registerPrototype(a,b),this.publishConstructor()},buildPrototype:function(b,c){var d=a.getRegisteredPrototype(b),e=this.generateBasePrototype(c);this.desugarBeforeChaining(d,e),this.prototype=this.chainPrototypes(d,e),this.desugarAfterChaining(b,c)},desugarBeforeChaining:function(a,b){a.element=this,this.publishAttributes(a,b),this.publishProperties(a,b),this.inferObservers(a),this.explodeObservers(a)},chainPrototypes:function(a,c){this.inheritMetaData(a,c);var d=this.chainObject(a,c);return b(d),d},inheritMetaData:function(a,b){this.inheritObject("observe",a,b),this.inheritObject("publish",a,b),this.inheritObject("reflect",a,b),this.inheritObject("_publishLC",a,b),this.inheritObject("_instanceAttributes",a,b),this.inheritObject("eventDelegates",a,b)},desugarAfterChaining:function(a,b){this.optimizePropertyMaps(this.prototype),this.createPropertyAccessors(this.prototype),this.installBindingDelegate(this.fetchTemplate()),this.installSheets(),this.resolveElementPaths(this),this.accumulateInstanceAttributes(),this.parseHostEvents(),this.addResolvePathApi(),f&&Platform.ShadowCSS.shimStyling(this.templateContent(),a,b),this.prototype.registerCallback&&this.prototype.registerCallback(this)},publishConstructor:function(){var a=this.getAttribute("constructor");a&&(window[a]=this.ctor)},generateBasePrototype:function(a){var b=this.findBasePrototype(a);if(!b){var b=HTMLElement.getPrototypeForTag(a);b=this.ensureBaseApi(b),h[a]=b}return b},findBasePrototype:function(a){return h[a]},ensureBaseApi:function(a){if(a.PolymerBase)return a;var b=Object.create(a);return c.publish(c.instance,b),this.mixinMethod(b,a,c.instance.mdv,"bind"),b},mixinMethod:function(a,b,c,d){var e=function(a){return b[d].apply(this,a)};a[d]=function(){return this.mixinSuper=e,c[d].apply(this,arguments)}},inheritObject:function(a,b,c){var d=b[a]||{};b[a]=this.chainObject(d,c[a])},registerPrototype:function(a,b){var c={prototype:this.prototype},d=this.findTypeExtension(b);d&&(c.extends=d),HTMLElement.register(a,this.prototype),this.ctor=document.registerElement(a,c)},findTypeExtension:function(a){if(a&&a.indexOf("-")<0)return a;var b=this.findBasePrototype(a);return b.element?this.findTypeExtension(b.element.extends):void 0}},h={};g.chainObject=Object.__proto__?function(a,b){return a&&b&&a!==b&&(a.__proto__=b),a}:function(a,b){if(a&&b&&a!==b){var c=Object.create(b);a=e(c,a)}return a},c.declaration.prototype=g}(Polymer),function(a){function b(a){return document.contains(a)?i:h}function c(){return h.length?h[0]:i[0]}function d(a){e.waitToReady=!0,CustomElements.ready=!1,HTMLImports.whenImportsReady(function(){e.addReadyCallback(a),e.waitToReady=!1,e.check()})}var e={wait:function(a){a.__queue||(a.__queue={},f.push(a))},enqueue:function(a,c,d){var e=a.__queue&&!a.__queue.check;return e&&(b(a).push(a),a.__queue.check=c,a.__queue.go=d),0!==this.indexOf(a)},indexOf:function(a){var c=b(a).indexOf(a);return c>=0&&document.contains(a)&&(c+=HTMLImports.useNative||HTMLImports.ready?h.length:1e9),c},go:function(a){var b=this.remove(a);b&&(a.__queue.flushable=!0,this.addToFlushQueue(b),this.check())},remove:function(a){var c=this.indexOf(a);if(0===c)return b(a).shift()},check:function(){var a=this.nextElement();return a&&a.__queue.check.call(a),this.canReady()?(this.ready(),!0):void 0},nextElement:function(){return c()},canReady:function(){return!this.waitToReady&&this.isEmpty()},isEmpty:function(){for(var a,b=0,c=f.length;c>b&&(a=f[b]);b++)if(a.__queue&&!a.__queue.flushable)return;return!0},addToFlushQueue:function(a){g.push(a)},flush:function(){if(!this.flushing){this.flushing=!0;for(var a;g.length;)a=g.shift(),a.__queue.go.call(a),a.__queue=null;this.flushing=!1}},ready:function(){this.flush(),CustomElements.ready===!1&&(CustomElements.upgradeDocumentTree(document),CustomElements.ready=!0),Platform.flush(),requestAnimationFrame(this.flushReadyCallbacks)},addReadyCallback:function(a){a&&j.push(a)},flushReadyCallbacks:function(){if(j)for(var a;j.length;)(a=j.shift())()},waitToReady:!0},f=[],g=[],h=[],i=[],j=[];document.addEventListener("WebComponentsReady",function(){CustomElements.ready=!1}),a.elements=f,a.queue=e,a.whenReady=a.whenPolymerReady=d}(Polymer),function(a){function b(a,b){a?(document.head.appendChild(a),d(b)):b&&b()}function c(a,c){if(a&&a.length){for(var d,e,f=document.createDocumentFragment(),g=0,h=a.length;h>g&&(d=a[g]);g++)e=document.createElement("link"),e.rel="import",e.href=d,f.appendChild(e);b(f,c)}else c&&c()}var d=a.whenPolymerReady;a.import=c,a.importElements=b}(Polymer),function(a){function b(a){return Boolean(HTMLElement.getPrototypeForTag(a))}function c(a){return a&&a.indexOf("-")>=0}var d=a.extend,e=a.api,f=a.queue,g=a.whenPolymerReady,h=a.getRegisteredPrototype,i=a.waitingForPrototype,j=d(Object.create(HTMLElement.prototype),{createdCallback:function(){this.getAttribute("name")&&this.init()},init:function(){this.name=this.getAttribute("name"),this.extends=this.getAttribute("extends"),f.wait(this),this.loadResources(),this.registerWhenReady() +},registerWhenReady:function(){this.registered||this.waitingForPrototype(this.name)||this.waitingForQueue()||this.waitingForResources()||f.go(this)},_register:function(){c(this.extends)&&!b(this.extends)&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this.extends),this.register(this.name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}(); +//# sourceMappingURL=polymer.js.map
\ No newline at end of file diff --git a/third_party/polymer/components-chromium/polymer/polymer.js.map b/third_party/polymer/components-chromium/polymer/polymer.js.map new file mode 100644 index 0000000..81afef8 --- /dev/null +++ b/third_party/polymer/components-chromium/polymer/polymer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"polymer.js","sources":["../../polymer-gestures/src/scope.js","../../polymer-gestures/src/targetfind.js","../../polymer-gestures/src/touch-action.js","../../polymer-gestures/src/eventFactory.js","../../polymer-gestures/src/pointermap.js","../../polymer-gestures/src/dispatcher.js","../../polymer-gestures/src/mouse.js","../../polymer-gestures/src/touch.js","../../polymer-gestures/src/ms.js","../../polymer-gestures/src/pointer.js","../../polymer-gestures/src/platform-events.js","../../polymer-gestures/src/track.js","../../polymer-gestures/src/hold.js","../../polymer-gestures/src/tap.js","../../polymer-expressions/third_party/esprima/esprima.js","../../polymer-expressions/src/polymer-expressions.js","polymer-versioned.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","../src/instance/events.js","../src/instance/attributes.js","../src/instance/properties.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/properties.js","../src/declaration/attributes.js","../src/declaration/mdv.js","../src/declaration/prototype.js","../src/declaration/queue.js","../src/declaration/import.js","../src/declaration/polymer-element.js","../src/lib/auto-binding.js"],"names":["window","PolymerGestures","scope","HAS_FULL_PATH","pathTest","document","createElement","createShadowRoot","sr","s","appendChild","addEventListener","ev","path","stopPropagation","CustomEvent","bubbles","head","dispatchEvent","parentNode","removeChild","target","shadow","inEl","shadowRoot","webkitShadowRoot","canTarget","Boolean","elementFromPoint","targetingShadow","this","olderShadow","os","olderShadowRoot","se","querySelector","allShadows","element","shadows","push","searchRoot","inRoot","x","y","t","owner","nodeType","Node","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","findTarget","inEvent","clientX","clientY","findTouchAction","n","i","length","ELEMENT_NODE","hasAttribute","getAttribute","host","LCA","a","b","contains","adepth","depth","bdepth","d","walk","u","deepContains","common","insideNode","node","rect","getBoundingClientRect","left","right","top","bottom","targetFinding","bind","shadowSelector","v","selector","rule","attrib2css","selectors","styles","hasTouchAction","style","touchAction","hasShadowRoot","ShadowDOMPolyfill","forEach","r","String","map","el","textContent","MOUSE_PROPS","MOUSE_DEFAULTS","NOP_FACTORY","eventFactory","preventTap","makeBaseEvent","inType","inDict","e","createEvent","initEvent","cancelable","makeGestureEvent","Object","create","k","keys","makePointerEvent","p","buttons","pressure","pointerId","width","height","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","_source","PointerMap","USE_MAP","m","Map","pointers","POINTERS_FN","values","prototype","size","set","inId","indexOf","has","delete","splice","get","clear","callback","thisArg","call","CLONE_PROPS","CLONE_DEFAULTS","HAS_SVG_INSTANCE","SVGElementInstance","dispatcher","pointermap","eventMap","eventSources","eventSourceList","gestures","dependencyMap","down","listeners","index","up","gestureQueue","registerSource","name","source","newEvents","events","registerGesture","obj","g","exposes","toLowerCase","register","initial","es","l","unregister","fireEvent","move","type","fillGestureQueue","cancel","tapPrevented","eventHandler","_handledByPG","fn","listen","addEvent","unlisten","removeEvent","eventName","boundHandler","removeEventListener","makeEvent","preventDefault","_target","cloneEvent","eventCopy","correspondingUseElement","clone","gestureTrigger","j","enabled","requestAnimationFrame","boundGestureTrigger","activateGesture","gesture","dep","recognizer","_pgListeners","actionNode","defaultActions","setAttribute","handler","capture","deactivateGesture","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","cleanupMouse","relatedTarget","DEDUP_TIMEOUT","Array","CLICK_COUNT_TIMEOUT","HYSTERESIS","HAS_TOUCH_ACTION","touchEvents","scrollTypes","EMITTER","XSCROLLER","YSCROLLER","touchActionToScrollType","st","firstTouch","isPrimaryTouch","inTouch","identifier","setPrimaryTouch","firstXY","X","Y","scrolling","cancelResetClickCount","removePrimaryPointer","inPointer","resetClickCount","clickCount","resetId","setTimeout","clearTimeout","typeToButtons","ret","touch","id","currentTouchEvent","fastPath","touchToPointer","cte","detail","webkitRadiusX","radiusX","webkitRadiusY","radiusY","webkitForce","force","self","processTouches","inFunction","tl","changedTouches","_cancel","cleanUpPointer","shouldScroll","scrollAxis","oa","da","doa","findTouch","inTL","vacuumTouches","touches","value","key","touchstart","dedupSynthMouse","touchmove","dd","sqrt","touchcancel","touchend","lt","HAS_BITMAP_TYPE","MSPointerEvent","MSPOINTER_TYPE_MOUSE","msEvents","POINTER_TYPES","cleanup","MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel","pointerEvents","pointerdown","pointermove","pointerup","pointercancel","nav","navigator","PointerEvent","msPointerEnabled","undefined","ontouchstart","isSafari","userAgent","match","body","track","trackx","tracky","WIGGLE_THRESHOLD","clampDir","inDelta","calcPositionDelta","inA","inB","pageX","pageY","fireTrack","inTrackingData","downEvent","lastMoveEvent","xDirection","yDirection","gestureProto","trackInfo","ddx","screenX","ddy","screenY","downTarget","tracking","hold","HOLD_DELAY","heldPointer","holdJob","pulse","Date","now","timeStamp","held","fireHold","clearInterval","setInterval","inHoldTime","holdTime","tap","shouldTap","downState","start","altKey","ctrlKey","metaKey","shiftKey","global","assert","condition","message","Error","isDecimalDigit","ch","isWhiteSpace","fromCharCode","isLineTerminator","isIdentifierStart","isIdentifierPart","isKeyword","skipWhitespace","charCodeAt","getIdentifier","slice","scanIdentifier","Token","Identifier","Keyword","NullLiteral","BooleanLiteral","range","scanPunctuator","code2","ch2","code","ch1","Punctuator","throwError","Messages","UnexpectedToken","scanNumericLiteral","number","NumericLiteral","parseFloat","scanStringLiteral","quote","str","octal","StringLiteral","isIdentifierName","token","advance","EOF","lex","lookahead","peek","pos","messageFormat","error","args","arguments","msg","replace","whole","description","throwUnexpected","expect","matchKeyword","keyword","parseArrayInitialiser","elements","parseExpression","delegate","createArrayExpression","parseObjectPropertyKey","createLiteral","createIdentifier","parseObjectProperty","createProperty","parseObjectInitialiser","properties","createObjectExpression","parseGroupExpression","expr","parsePrimaryExpression","createThisExpression","parseArguments","parseNonComputedProperty","parseNonComputedMember","parseComputedMember","parseLeftHandSideExpression","property","createMemberExpression","createCallExpression","parseUnaryExpression","parsePostfixExpression","createUnaryExpression","binaryPrecedence","prec","parseBinaryExpression","stack","operator","pop","createBinaryExpression","parseConditionalExpression","consequent","alternate","createConditionalExpression","parseFilter","createFilter","parseFilters","parseTopLevel","Syntax","parseInExpression","parseAsExpression","createTopLevel","createAsExpression","indexName","createInExpression","parse","inDelegate","state","labelSet","TokenName","ArrayExpression","BinaryExpression","CallExpression","ConditionalExpression","EmptyStatement","ExpressionStatement","Literal","LabeledStatement","LogicalExpression","MemberExpression","ObjectExpression","Program","Property","ThisExpression","UnaryExpression","UnknownLabel","Redeclaration","esprima","prepareBinding","expressionText","filterRegistry","expression","getExpression","scopeIdent","tagName","ex","console","model","oneTime","binding","getBinding","polymerExpressionScopeIdent_","indexIdent","polymerExpressionIndexIdent_","expressionParseCache","ASTDelegate","Expression","valueFn_","IdentPath","Path","object","accessor","computed","dynamicDeps","simplePath","getFn","Filter","notImplemented","arg","valueFn","filters","deps","currentPath","ConstantObservable","value_","convertStylePropertyName","c","findScope","prop","parentScopeName","hasOwnProperty","isLiteralExpression","pathString","isNaN","Number","PolymerExpressions","observer","addPath","getValueFrom","setValue","newValue","setValueFrom",{"end":{"file":"../../polymer-expressions/src/polymer-expressions.js","comments_before":[],"nlb":false,"endpos":3539,"pos":3531,"col":8,"line":117,"value":"fullPath","type":"name"},"start":{"file":"../../polymer-expressions/src/polymer-expressions.js","comments_before":[],"nlb":false,"endpos":3539,"pos":3531,"col":8,"line":117,"value":"fullPath","type":"name"},"name":"fullPath"},"fullPath","fullPath_","parts","context","propName","transform","toModelDirection","initialArgs","toModel","toDOM","apply","unaryOperators","+","-","!","binaryOperators","*","/","%","<",">","<=",">=","==","!=","===","!==","&&","||","op","argument","test","ident","filter","arr","kind","open","discardChanges","deliver","close","firstTime","firstValue","startReset","getValue","finishReset","setValueFn","CompoundObserver","ObserverTransform","count","random","toString","styleObject","join","tokenList","tokens","prepareInstancePositionChanged","template","templateInstance","valid","PathObserver","prepareInstanceModel","scopeName","parentScope","createScopeObject","__proto__","defineProperty","configurable","writable","Polymer","version","extend","api","getOwnPropertyNames","pd","getOwnPropertyDescriptor","nom","job","wait","stop","Job","go","inContext","boundComplete","complete","h","handle","cancelAnimationFrame","registry","HTMLElement","tag","getPrototypeForTag","getPrototypeOf","originalStopPropagation","Event","cancelBubble","$super","arrayOfArgs","caller","_super","nameInThis","warn","memoizeSuper","n$","method","proto","nextSuper","super","noopHandler","deserializeValue","currentValue","inferredType","typeHandlers","string","date","boolean","parseInt","JSON","function","declaration","instance","publish","apis","utils","async","timeout","Platform","flush","cancelAsync","fire","onNode","event","asyncFire","classFollows","anew","old","className","classList","remove","add","injectBoundHTML","html","innerHTML","fragment","instanceTemplate","nop","nob","asyncMethod","log","logFlags","EVENT_PREFIX","addHostListeners","eventDelegates","localName","methodName","getEventHandler","dispatchMethod","group","groupEnd","attributes","copyInstanceAttributes","a$","_instanceAttributes","takeAttributes","_publishLC","attributeToProperty","propertyForAttribute","search","bindPattern","stringValue","serializeValue","reflectPropertyToAttribute","serializedValue","removeAttribute","areSameValue","numberIsNaN","resolveBindingValue","oldValue","updateRecord","createPropertyObserver","_observeNames","o","_propertyObserver","registerObserver","observeArrayValue","openPropertyObserver","notifyPropertyChanges","newValues","oldValues","paths","called","observe","ov","nv","invokeMethod","deliverChanges","propertyChanged_","reflect","callbackName","isArray","closeNamedObserver","ArrayObserver","registerNamedObserver","emitPropertyChangeRecord","Observer","hasObjectObserve","notifier","notifier_","getNotifier","notify","bindToAccessor","observable","resolveFn","privateName","privateObservable","resolvedValue","createComputedProperties","_computedNames","syntax","bindProperty","_observers","closeObservers","observers","o$","_namedObservers","closeNamedObservers","mdv","bindingDelegate","dom","createInstance","bindings_","enableBindingsReflection","path_","_recordBinding","mixinSuper","bindFinished","makeElementReady","asyncUnbindAll","_unbound","unbind","_unbindAllJob","unbindAll","cancelUnbindAll","mustachePattern","isBase","PolymerBase","base","created","ready","createdCallback","prepareElement","ownerDocument","isStagingDocument","_elementPrepared","shadowRoots","_readied","parseDeclarations","attachedCallback","attached","enteredView","hasBeenAttached","domReady","detachedCallback","preventDispose","detached","leftView","enteredViewCallback","leftViewCallback","enteredDocumentCallback","leftDocumentCallback","parseDeclaration","elementElement","fetchTemplate","root","shadowFromTemplate","shadowRootReady","lightFromTemplate","refNode","eventController","insertBefore","marshalNodeReferences","$","querySelectorAll","attributeChangedCallback","attributeChanged","onMutation","listener","MutationObserver","mutations","disconnect","childList","subtree","constructor","Base","shimCssText","cssText","is","ShadowCSS","makeScopeSelector","hasShadowDOMPolyfill","STYLE_SCOPE_ATTRIBUTE","STYLE_CONTROLLER_SCOPE","installControllerStyles","findStyleScope","scopeHasNamedStyle","cssTextForScope","installScopeCssText","installScopeStyle","cssTextToScopeStyle","applyStyleToScope","styleCacheForScope","cache","polyfillScopeStyleCache","_scopeStyles","script","_currentScript","getRegisteredPrototype","registerPrototype","notifyPrototype","waitingForPrototype","client","waitPrototype","registerWhenReady","prototypesByName","declarations","deliverDeclarations","resolveElementPaths","urlResolver","resolveDom","addResolvePathApi","assetPath","URL","baseURI","resolvePath","urlPath","href","importRuleForSheet","sheet","baseUrl","createStyleElement","attr","firstElementChild","s$","nextElementSibling","cssTextFromSheet","__resource","matchesSelector","inSelector","matches","STYLE_SELECTOR","STYLE_LOADABLE_MATCH","SHEET_SELECTOR","STYLE_GLOBAL_SCOPE","SCOPE_ATTR","loadStyles","content","templateContent","convertSheetsToStyles","findLoadableStyles","templateUrl","styleResolver","copySheetAttributes","replaceChild","link","loadables","installSheets","cacheSheets","cacheStyles","installLocalSheets","installGlobalStyles","sheets","findNodes","firstChild","matcher","nodes","array","templateNodes","concat","styleForScope","scopeDescriptor","webkitMatchesSelector","mozMatchesSelector","mixedCaseEventTypes","parseHostEvents","delegates","addAttributeDelegates","hasEventPrefix","removeEventPrefix","trim","prefixLength","findController","controller","currentTarget","prepareEventBinding","eventType","bindingValue","inferObservers","explodeObservers","exploded","ni","names","split","optimizePropertyMaps","_publishNames","publishProperties","requireProperties","lowerCaseMap","propertyInfos","createPropertyAccessor","createPropertyAccessors","ATTRIBUTES_ATTRIBUTE","ATTRIBUTES_REGEX","inheritAttributesObjects","inheritObject","publishAttributes","accumulateInstanceAttributes","clonable","isInstanceAttribute","blackList","extends","noscript","assetpath","cache-csstext","installBindingDelegate","ensurePrototypeTraversal","ancestor","extendeeName","buildPrototype","publishConstructor","extension","generateBasePrototype","desugarBeforeChaining","chainPrototypes","desugarAfterChaining","inheritMetaData","chained","chainObject","extendee","shimStyling","registerCallback","symbol","ctor","extnds","findBasePrototype","ensureBaseApi","memoizedBases","extended","mixinMethod","info","typeExtension","findTypeExtension","registerElement","inherited","queueForElement","mainQueue","importQueue","nextQueued","whenPolymerReady","queue","waitToReady","CustomElements","HTMLImports","whenImportsReady","addReadyCallback","check","__queue","enqueue","shouldAdd","useNative","readied","flushable","addToFlushQueue","shift","nextElement","canReady","isEmpty","flushQueue","flushing","upgradeDocumentTree","flushReadyCallbacks","readyCallbacks","whenReady","importElements","elementOrFragment","importUrls","urls","url","frag","createDocumentFragment","rel","import","isRegistered","isCustomTag","init","loadResources","registered","waitingForQueue","waitingForResources","_register","handleNoScript","_needsResources","makeSyntax"],"mappings":";;;;;;;;;;AASAA,OAAOC,mBCAP,SAAUC,GACR,GAAIC,IAAgB,EAGhBC,EAAWC,SAASC,cAAc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AAkBnwB,KAAKqhC,aAG1Chb,QAAQoY,iBAAiB,WACvBz+B,KAAKmf,MAAQnf,KACbA,KAAK4L,aAAa,OAAQ,IAG1B5L,KAAK4pB,MAAM,WAIT5pB,KAAKwzB,sBAAsBxzB,KAAKX,YAGhCW,KAAKiqB,KAAK,qBAEZ5mB,KAAKrD,QAGTqhC,WAAY,WACV,GAAIv4B,GAASzD,OAAOC,OAAO+gB,QAAQG,IAAI+C,YAAYzgB,QAC/CmH,EAAOjQ,IACX8I,GAAOwxB,eAAiB,WAAa,MAAOrqB,GAAKkP,MAEjD,IAAIuQ,GAAS,GAAIjO,oBACb/C,EAAiBgR,EAAOhR,cAK5B,OAJAgR,GAAOhR,eAAiB,SAAS4C,EAAY3Y,EAAM9F,GACjD,MAAOiG,GAAO2xB,oBAAoBnZ,EAAY3Y,EAAM9F,IAC7C6b,EAAejX,KAAKioB,EAAQpO,EAAY3Y,EAAM9F,IAEhD6sB","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 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 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 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.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(function(scope) {\n var HAS_FULL_PATH = false;\n\n // test for full event path support\n var pathTest = document.createElement('meta');\n if (pathTest.createShadowRoot) {\n var sr = pathTest.createShadowRoot();\n var s = document.createElement('span');\n sr.appendChild(s);\n pathTest.addEventListener('testpath', function(ev) {\n if (ev.path) {\n // if the span is in the event path, then path[0] is the real source for all events\n HAS_FULL_PATH = ev.path[0] === s;\n }\n ev.stopPropagation();\n });\n var ev = new CustomEvent('testpath', {bubbles: true});\n // must add node to DOM to trigger event listener\n document.head.appendChild(pathTest);\n s.dispatchEvent(ev);\n pathTest.parentNode.removeChild(pathTest);\n sr = s = null;\n }\n pathTest = null;\n\n var target = {\n shadow: function(inEl) {\n if (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.olderShadowRoot;\n if (!os) {\n var se = shadow.querySelector('shadow');\n if (se) {\n os = se.olderShadowRoot;\n }\n }\n return os;\n },\n allShadows: function(element) {\n var shadows = [], s = this.shadow(element);\n while(s) {\n shadows.push(s);\n s = this.olderShadow(s);\n }\n return shadows;\n },\n searchRoot: function(inRoot, x, y) {\n var t, st, sr, os;\n if (inRoot) {\n t = inRoot.elementFromPoint(x, y);\n if (t) {\n // found element, check if it has a ShadowRoot\n sr = this.targetingShadow(t);\n } else if (inRoot !== document) {\n // check for sibling roots\n sr = this.olderShadow(inRoot);\n }\n // search other roots, fall back to light dom element\n return this.searchRoot(sr, x, y) || t;\n }\n },\n owner: function(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 owner 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 if (HAS_FULL_PATH && inEvent.path) {\n return inEvent.path[0];\n }\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.owner(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 findTouchAction: function(inEvent) {\n var n;\n if (HAS_FULL_PATH && inEvent.path) {\n var path = inEvent.path;\n for (var i = 0; i < path.length; i++) {\n n = path[i];\n if (n.nodeType === Node.ELEMENT_NODE && n.hasAttribute('touch-action')) {\n return n.getAttribute('touch-action');\n }\n }\n } else {\n n = inEvent.target;\n while(n) {\n if (n.hasAttribute('touch-action')) {\n return n.getAttribute('touch-action');\n }\n n = n.parentNode || n.host;\n }\n }\n // auto is default\n return \"auto\";\n },\n LCA: function(a, b) {\n if (a === b) {\n return a;\n }\n if (a && !b) {\n return 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 descendant of b or vice versa\n if (a.contains && a.contains(b)) {\n return 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 = a.parentNode || a.host;\n b = b.parentNode || b.host;\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 deepContains: 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.getBoundingClientRect();\n return (rect.left <= x) && (x <= rect.right) && (rect.top <= y) && (y <= rect.bottom);\n }\n };\n scope.targetFinding = target;\n /**\n * Given an event, finds the \"deepest\" node that could have been the original target before ShadowDOM retargetting\n *\n * @param {Event} Event An event object with clientX and clientY properties\n * @return {Element} The probable event origninator\n */\n scope.findTarget = target.findTarget.bind(target);\n /**\n * Determines if the \"container\" node deeply contains the \"containee\" 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.deepContains.bind(target);\n\n /**\n * Determines if the x/y position is inside the given node.\n *\n * Example:\n *\n * function upHandler(event) {\n * var innode = PolymerGestures.insideNode(event.target, event.clientX, 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.insideNode = target.insideNode;\n\n})(window.PolymerGestures);\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.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 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() {\n function shadowSelector(v) {\n return 'html /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 attrib2css = [\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 'manipulation'\n ];\n var styles = '';\n // only install stylesheet if the browser has touch action support\n var hasTouchAction = typeof document.head.style.touchAction === 'string';\n // only add shadow selectors if shadowdom is supported\n var hasShadowRoot = !window.ShadowDOMPolyfill && document.head.createShadowRoot;\n\n if (hasTouchAction) {\n attrib2css.forEach(function(r) {\n if (String(r) === r) {\n styles += selector(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.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 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/**\n * This is the constructor 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 platform requirements, events returned from the constructor\n * identify as MouseEvents.\n *\n * @constructor\n * @param {String} inType The type of the event to create.\n * @param {Object} [inDict] An optional dictionary of initial event properties.\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 'pageX',\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 false,\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(dfreedm): this is overridden by tap recognizer, needs review\n preventTap: NOP_FACTORY,\n makeBaseEvent: function(inType, inDict) {\n var e = document.createEvent('Event');\n e.initEvent(inType, inDict.bubbles || false, inDict.cancelable || false);\n e.preventTap = eventFactory.preventTap(e);\n return e;\n },\n makeGestureEvent: function(inType, inDict) {\n inDict = inDict || Object.create(null);\n\n var e = this.makeBaseEvent(inType, inDict);\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] || MOUSE_DEFAULTS[i];\n }\n e.buttons = inDict.buttons || 0;\n\n // Spec 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.buttons ? 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 of the PointerEvent interface\n e.pointerId = inDict.pointerId || 0;\n e.width = inDict.width || 0;\n e.height = inDict.height || 0;\n e.pressure = pressure;\n e.tiltX = inDict.tiltX || 0;\n e.tiltY = inDict.tiltY || 0;\n e.pointerType = inDict.pointerType || '';\n e.hwTimestamp = inDict.hwTimestamp || 0;\n e.isPrimary = inDict.isPrimary || false;\n e._source = inDict._source || '';\n return e;\n }\n };\n\n scope.eventFactory = eventFactory;\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 * 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 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_MAP = 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.prototype = {\n set: function(inId, inEvent) {\n var i = this.keys.indexOf(inId);\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(inId);\n return this.values[i];\n },\n clear: function() {\n this.keys.length = 0;\n this.values.length = 0;\n },\n // return value, key, map\n forEach: function(callback, thisArg) {\n this.values.forEach(function(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 * 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://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(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 'tiltY',\n 'pointerType',\n 'hwTimestamp',\n 'isPrimary',\n // event instance\n 'type',\n 'target',\n 'currentTarget',\n 'which',\n 'pageX',\n 'pageY',\n 'timeStamp',\n // gesture addons\n 'preventTap',\n 'tapPrevented',\n '_source'\n ];\n\n var CLONE_DEFAULTS = [\n // MouseEvent\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\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_SVG_INSTANCE = (typeof SVGElementInstance !== 'undefined');\n\n var eventFactory = scope.eventFactory;\n\n /**\n * This module is for normalizing events. Mouse and Touch events will be\n * collected here, and fire PointerEvents that have the same semantics, no\n * matter the source.\n * Events fired:\n * - pointerdown: a pointing is added\n * - pointerup: a pointer is removed\n * - pointermove: a pointer is moved\n * - pointerover: a pointer crosses into an element\n * - pointerout: a pointer leaves an element\n * - pointercancel: a pointer will no longer generate events\n */\n var dispatcher = {\n pointermap: new scope.PointerMap(),\n eventMap: Object.create(null),\n // Scope objects for native events.\n // This exists for ease of testing.\n eventSources: Object.create(null),\n eventSourceList: [],\n gestures: [],\n // map gesture event -> {listeners: int, index: gestures[int]}\n dependencyMap: {\n // make sure down and up are in the map to trigger \"register\"\n down: {listeners: 0, index: -1},\n up: {listeners: 0, index: -1}\n },\n gestureQueue: [],\n /**\n * Add a new event source that will generate pointer events.\n *\n * `inSource` must contain 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 event 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(function(e) {\n if (s[e]) {\n this.eventMap[e] = s[e].bind(s);\n }\n }, this);\n this.eventSources[name] = s;\n this.eventSourceList.push(s);\n }\n },\n registerGesture: function(name, source) {\n var obj = Object.create(null);\n obj.listeners = 0;\n obj.index = this.gestures.length;\n for (var i = 0, g; i < source.exposes.length; i++) {\n g = source.exposes[i].toLowerCase();\n this.dependencyMap[g] = obj;\n }\n this.gestures.push(source);\n },\n register: function(element, initial) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n // call eventsource register\n es.register.call(es, element, initial);\n }\n },\n unregister: function(element) {\n var l = this.eventSourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n // call eventsource register\n es.unregister.call(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\n // TODO(dfreedm): make this check more granular, allow for minimal event generation\n // e.g inEvent._handledByPG['tap'] and inEvent._handledByPG['track'], etc\n if (inEvent._handledByPG) {\n return;\n }\n var type = inEvent.type;\n var fn = this.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 for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {\n this.addEvent(target, e);\n }\n },\n // remove event listeners\n unlisten: function(target, events) {\n for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {\n this.removeEvent(target, e);\n }\n },\n addEvent: function(target, eventName) {\n target.addEventListener(eventName, this.boundHandler);\n },\n removeEvent: function(target, eventName) {\n target.removeEventListener(eventName, this.boundHandler);\n },\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of type `inType`, based on the information in\n * `inEvent`.\n *\n * @param {string} inType A string representing the type of event to create\n * @param {Event} inEvent A platform event with a target\n * @return {Event} A PointerEvent of type `inType`\n */\n makeEvent: function(inType, inEvent) {\n var e = eventFactory.makePointerEvent(inType, inEvent);\n e.preventDefault = 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.dispatchEvent(e);\n },\n /**\n * Returns a snapshot of inEvent, with writable properties.\n *\n * @param {Event} inEvent An event that contains properties to copy.\n * @return {Object} An object containing shallow copies of `inEvent`'s\n * properties.\n */\n cloneEvent: function(inEvent) {\n var eventCopy = Object.create(null), p;\n for (var i = 0; i < CLONE_PROPS.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 Safari, Chrome, IE.\n // This is the behavior implemented by Firefox.\n if (p === 'target' || p === 'relatedTarget') {\n if (HAS_SVG_INSTANCE && eventCopy[p] instanceof SVGElementInstance) {\n eventCopy[p] = eventCopy[p].correspondingUseElement;\n }\n }\n }\n // keep the semantics of preventDefault\n eventCopy.preventDefault = function() {\n inEvent.preventDefault();\n };\n return eventCopy;\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 dispatchEvent: function(inEvent) {\n var t = inEvent._target;\n if (t) {\n t.dispatchEvent(inEvent);\n // clone the event for the gesture system to 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.gestureQueue.length; i++) {\n e = this.gestureQueue[i];\n for (var j = 0, g, fn; j < this.gestures.length; j++) {\n g = this.gestures[j];\n fn = g[e.type];\n if (g.enabled && fn) {\n fn.call(g, e);\n }\n }\n }\n this.gestureQueue.length = 0;\n },\n fillGestureQueue: function(ev) {\n // only trigger the gesture queue once\n if (!this.gestureQueue.length) {\n requestAnimationFrame(this.boundGestureTrigger);\n }\n this.gestureQueue.push(ev);\n }\n };\n dispatcher.boundHandler = dispatcher.eventHandler.bind(dispatcher);\n dispatcher.boundGestureTrigger = dispatcher.gestureTrigger.bind(dispatcher);\n scope.dispatcher = dispatcher;\n\n /**\n * Listen for `gesture` on `node` with the `handler` function\n *\n * If `handler` is the first listener for `gesture`, the underlying gesture recognizer is then enabled.\n *\n * @param {Element} node\n * @param {string} gesture\n * @return Boolean `gesture` is a valid gesture\n */\n scope.activateGesture = function(node, gesture) {\n var g = gesture.toLowerCase();\n var dep = dispatcher.dependencyMap[g];\n if (dep) {\n var recognizer = dispatcher.gestures[dep.index];\n if (dep.listeners === 0) {\n if (recognizer) {\n recognizer.enabled = true;\n }\n }\n dep.listeners++;\n if (!node._pgListeners) {\n dispatcher.register(node);\n node._pgListeners = 0;\n }\n // TODO(dfreedm): re-evaluate bookkeeping to avoid using attributes\n if (recognizer) {\n var touchAction = recognizer.defaultActions && recognizer.defaultActions[g];\n var actionNode;\n switch(node.nodeType) {\n case Node.ELEMENT_NODE:\n actionNode = node;\n break;\n case Node.DOCUMENT_FRAGMENT_NODE:\n actionNode = node.host;\n break;\n default:\n actionNode = null;\n break;\n }\n if (touchAction && actionNode && !actionNode.hasAttribute('touch-action')) {\n actionNode.setAttribute('touch-action', touchAction);\n }\n }\n node._pgListeners++;\n }\n return Boolean(dep);\n };\n\n /**\n *\n * Listen for `gesture` from `node` with `handler` function.\n *\n * @param {Element} node\n * @param {string} gesture\n * @param {Function} handler\n * @param {Boolean} capture\n */\n scope.addEventListener = function(node, gesture, handler, capture) {\n if (handler) {\n scope.activateGesture(node, gesture);\n node.addEventListener(gesture, handler, capture);\n }\n };\n\n /**\n * Tears down the gesture configuration for `node`\n *\n * If `handler` is the last listener for `gesture`, the underlying gesture recognizer is disabled.\n *\n * @param {Element} node\n * @param {string} gesture\n * @return Boolean `gesture` is a valid gesture\n */\n scope.deactivateGesture = function(node, gesture) {\n var g = gesture.toLowerCase();\n var dep = dispatcher.dependencyMap[g];\n if (dep) {\n if (dep.listeners > 0) {\n dep.listeners--;\n }\n if (dep.listeners === 0) {\n var recognizer = dispatcher.gestures[dep.index];\n if (recognizer) {\n recognizer.enabled = false;\n }\n }\n if (node._pgListeners > 0) {\n node._pgListeners--;\n }\n if (node._pgListeners === 0) {\n dispatcher.unregister(node);\n }\n }\n return Boolean(dep);\n };\n\n /**\n * Stop listening for `gesture` from `node` with `handler` function.\n *\n * @param {Element} node\n * @param {string} gesture\n * @param {Function} handler\n * @param {Boolean} capture\n */\n scope.removeEventListener = function(node, gesture, handler, capture) {\n if (handler) {\n scope.deactivateGesture(node, gesture);\n node.removeEventListener(gesture, handler, capture);\n }\n };\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 * 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 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 dispatcher = scope.dispatcher;\n var pointermap = dispatcher.pointermap;\n // radius around touchend that swallows mouse events\n var DEDUP_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 mouseEvents = {\n POINTER_ID: 1,\n POINTER_TYPE: 'mouse',\n events: [\n 'mousedown',\n 'mousemove',\n 'mouseup'\n ],\n exposes: [\n 'down',\n 'up',\n 'move'\n ],\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n lastTouches: [],\n // collide with the global mouse listener\n isEventSimulatedFromTouch: 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(inEvent) {\n var e = dispatcher.cloneEvent(inEvent);\n e.pointerId = this.POINTER_ID;\n e.isPrimary = true;\n e.pointerType = this.POINTER_TYPE;\n e._source = 'mouse';\n if (!HAS_BUTTONS) {\n e.buttons = WHICH_TO_BUTTONS[e.which] || 0;\n }\n return e;\n },\n mousedown: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.has(this.POINTER_ID);\n // TODO(dfreedman) workaround for some elements not sending mouseup\n // http://crbug/149091\n if (p) {\n this.mouseup(inEvent);\n }\n var e = this.prepareEvent(inEvent);\n e.target = scope.findTarget(inEvent);\n pointermap.set(this.POINTER_ID, e.target);\n dispatcher.down(e);\n }\n },\n mousemove: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var target = pointermap.get(this.POINTER_ID);\n if (target) {\n var e = this.prepareEvent(inEvent);\n e.target = target;\n // handle case where we missed a mouseup\n if (e.buttons === 0) {\n dispatcher.cancel(e);\n this.cleanupMouse();\n } else {\n dispatcher.move(e);\n }\n }\n }\n },\n mouseup: function(inEvent) {\n if (!this.isEventSimulatedFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = scope.findTarget(inEvent);\n e.target = pointermap.get(this.POINTER_ID);\n dispatcher.up(e);\n this.cleanupMouse();\n }\n },\n cleanupMouse: function() {\n pointermap['delete'](this.POINTER_ID);\n }\n };\n\n scope.mouseEvents = mouseEvents;\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 * 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 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 dispatcher = scope.dispatcher;\n var allShadows = scope.targetFinding.allShadows.bind(scope.targetFinding);\n var pointermap = dispatcher.pointermap;\n var touchMap = Array.prototype.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 CLICK_COUNT_TIMEOUT = 200;\n var HYSTERESIS = 20;\n var ATTRIB = 'touch-action';\n // TODO(dfreedm): disable until http://crbug.com/399765 is resolved\n // var HAS_TOUCH_ACTION = ATTRIB in document.head.style;\n var HAS_TOUCH_ACTION = false;\n\n // handler block for native touch events\n var touchEvents = {\n events: [\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel'\n ],\n exposes: [\n 'down',\n 'up',\n 'move'\n ],\n register: function(target, initial) {\n if (initial) {\n return;\n }\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n scrollTypes: {\n EMITTER: 'none',\n XSCROLLER: 'pan-x',\n YSCROLLER: 'pan-y',\n },\n touchActionToScrollType: function(touchAction) {\n var t = touchAction;\n var st = this.scrollTypes;\n if (t === st.EMITTER) {\n return 'none';\n } else if (t === st.XSCROLLER) {\n return 'X';\n } else if (t === st.YSCROLLER) {\n return 'Y';\n } else {\n return 'XY';\n }\n },\n POINTER_TYPE: 'touch',\n firstTouch: null,\n isPrimaryTouch: function(inTouch) {\n return this.firstTouch === inTouch.identifier;\n },\n setPrimaryTouch: function(inTouch) {\n // set primary touch if there no pointers, or the only pointer is the mouse\n if (pointermap.pointers() === 0 || (pointermap.pointers() === 1 && pointermap.has(1))) {\n this.firstTouch = inTouch.identifier;\n this.firstXY = {X: inTouch.clientX, Y: inTouch.clientY};\n this.scrolling = null;\n this.cancelResetClickCount();\n }\n },\n removePrimaryPointer: function(inPointer) {\n if (inPointer.isPrimary) {\n this.firstTouch = null;\n this.firstXY = null;\n this.resetClickCount();\n }\n },\n clickCount: 0,\n resetId: null,\n resetClickCount: function() {\n var fn = function() {\n this.clickCount = 0;\n this.resetId = null;\n }.bind(this);\n this.resetId = setTimeout(fn, CLICK_COUNT_TIMEOUT);\n },\n cancelResetClickCount: 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 (this.currentTouchEvent.type === 'touchstart') {\n if (this.isPrimaryTouch(touch)) {\n var fastPath = {\n clientX: touch.clientX,\n clientY: touch.clientY,\n path: this.currentTouchEvent.path,\n target: this.currentTouchEvent.target\n };\n return scope.findTarget(fastPath);\n } else {\n return scope.findTarget(touch);\n }\n }\n // reuse target we found in touchstart\n return pointermap.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 identifiers 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.findTarget(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.webkitForce || inTouch.force || 0.5;\n e.isPrimary = this.isPrimaryTouch(inTouch);\n e.pointerType = this.POINTER_TYPE;\n e._source = 'touch';\n // forward touch preventDefaults\n var self = this;\n e.preventDefault = function() {\n self.scrolling = false;\n self.firstXY = null;\n cte.preventDefault();\n };\n return e;\n },\n processTouches: function(inEvent, inFunction) {\n var tl = inEvent.changedTouches;\n this.currentTouchEvent = inEvent;\n for (var i = 0, t, p; i < tl.length; i++) {\n t = tl[i];\n p = this.touchToPointer(t);\n if (inEvent.type === 'touchstart') {\n pointermap.set(p.pointerId, p.target);\n }\n if (pointermap.has(p.pointerId)) {\n inFunction.call(this, p);\n }\n if (inEvent.type === 'touchend' || inEvent._cancel) {\n this.cleanUpPointer(p);\n }\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 touchAction = scope.targetFinding.findTouchAction(inEvent);\n var scrollAxis = this.touchActionToScrollType(touchAction);\n if (scrollAxis === 'none') {\n // this element is a touch-action: none, should never scroll\n ret = false;\n } else if (scrollAxis === 'XY') {\n // this element should always scroll\n ret = true;\n } else {\n var t = inEvent.changedTouches[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 events\n ret = da >= doa;\n }\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.identifier === inId) {\n return true;\n }\n }\n },\n // In some instances, a touchstart can happen without a touchend. This\n // leaves 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 state 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 has not\n // been processed yet.\n if (pointermap.pointers() >= tl.length) {\n var d = [];\n pointermap.forEach(function(value, key) {\n // Never remove pointerId == 1, which is mouse.\n // Touch identifiers 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;\n d.push(p);\n }\n }, this);\n d.forEach(function(p) {\n this.cancel(p);\n pointermap.delete(p.pointerId);\n });\n }\n },\n touchstart: function(inEvent) {\n this.vacuumTouches(inEvent);\n this.setPrimaryTouch(inEvent.changedTouches[0]);\n this.dedupSynthMouse(inEvent);\n if (!this.scrolling) {\n this.clickCount++;\n this.processTouches(inEvent, this.down);\n }\n },\n down: function(inPointer) {\n dispatcher.down(inPointer);\n },\n touchmove: function(inEvent) {\n if (HAS_TOUCH_ACTION) {\n // touchevent.cancelable == false is sent when the page is scrolling under native Touch Action in Chrome 36\n // https://groups.google.com/a/chromium.org/d/msg/input-dev/wHnyukcYBcA/b9kmtwM1jJQJ\n if (inEvent.cancelable) {\n this.processTouches(inEvent, this.move);\n }\n } else {\n if (!this.scrolling) {\n if (this.scrolling === null && this.shouldScroll(inEvent)) {\n this.scrolling = true;\n } else {\n this.scrolling = false;\n inEvent.preventDefault();\n this.processTouches(inEvent, this.move);\n }\n } else if (this.firstXY) {\n var t = inEvent.changedTouches[0];\n var dx = t.clientX - this.firstXY.X;\n var dy = t.clientY - this.firstXY.Y;\n var dd = Math.sqrt(dx * dx + dy * dy);\n if (dd >= HYSTERESIS) {\n this.touchcancel(inEvent);\n this.scrolling = true;\n this.firstXY = null;\n }\n }\n }\n },\n move: function(inPointer) {\n dispatcher.move(inPointer);\n },\n touchend: function(inEvent) {\n this.dedupSynthMouse(inEvent);\n this.processTouches(inEvent, this.up);\n },\n up: function(inPointer) {\n inPointer.relatedTarget = scope.findTarget(inPointer);\n dispatcher.up(inPointer);\n },\n cancel: function(inPointer) {\n dispatcher.cancel(inPointer);\n },\n touchcancel: function(inEvent) {\n inEvent._cancel = true;\n this.processTouches(inEvent, this.cancel);\n },\n cleanUpPointer: function(inPointer) {\n pointermap['delete'](inPointer.pointerId);\n this.removePrimaryPointer(inPointer);\n },\n // prevent synth mouse events from creating pointer events\n dedupSynthMouse: function(inEvent) {\n var lts = scope.mouseEvents.lastTouches;\n var t = inEvent.changedTouches[0];\n // only the primary 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 scope.touchEvents = touchEvents;\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 * 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 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 dispatcher = scope.dispatcher;\n var pointermap = dispatcher.pointermap;\n var HAS_BITMAP_TYPE = window.MSPointerEvent && typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE === 'number';\n var msEvents = {\n events: [\n 'MSPointerDown',\n 'MSPointerMove',\n 'MSPointerUp',\n 'MSPointerCancel',\n ],\n register: function(target) {\n if (target !== document) {\n return;\n }\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n POINTER_TYPES: [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n ],\n prepareEvent: function(inEvent) {\n var e = inEvent;\n e = dispatcher.cloneEvent(inEvent);\n if (HAS_BITMAP_TYPE) {\n e.pointerType = this.POINTER_TYPES[inEvent.pointerType];\n }\n e._source = 'ms';\n return e;\n },\n cleanup: function(id) {\n pointermap['delete'](id);\n },\n MSPointerDown: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.target = scope.findTarget(inEvent);\n pointermap.set(inEvent.pointerId, e.target);\n dispatcher.down(e);\n },\n MSPointerMove: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.target = pointermap.get(e.pointerId);\n dispatcher.move(e);\n },\n MSPointerUp: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = scope.findTarget(inEvent);\n e.target = pointermap.get(e.pointerId);\n dispatcher.up(e);\n this.cleanup(inEvent.pointerId);\n },\n MSPointerCancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = scope.findTarget(inEvent);\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 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.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(function(scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = dispatcher.pointermap;\n var pointerEvents = {\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel'\n ],\n prepareEvent: function(inEvent) {\n var e = dispatcher.cloneEvent(inEvent);\n e._source = 'pointer';\n return e;\n },\n register: function(target) {\n if (target !== document) {\n return;\n }\n dispatcher.listen(target, this.events);\n },\n unregister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n cleanup: function(id) {\n pointermap['delete'](id);\n },\n pointerdown: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.target = scope.findTarget(inEvent);\n pointermap.set(e.pointerId, e.target);\n dispatcher.down(e);\n },\n pointermove: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.target = pointermap.get(e.pointerId);\n dispatcher.move(e);\n },\n pointerup: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = scope.findTarget(inEvent);\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 = scope.findTarget(inEvent);\n e.target = pointermap.get(e.pointerId);\n dispatcher.cancel(e);\n this.cleanup(inEvent.pointerId);\n }\n };\n\n scope.pointerEvents = 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 * 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 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 platform 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 var nav = window.navigator;\n\n if (window.PointerEvent) {\n dispatcher.registerSource('pointer', scope.pointerEvents);\n } else if (nav.msPointerEnabled) {\n dispatcher.registerSource('ms', scope.msEvents);\n } else {\n dispatcher.registerSource('mouse', scope.mouseEvents);\n if (window.ontouchstart !== undefined) {\n dispatcher.registerSource('touch', scope.touchEvents);\n /*\n * NOTE: an empty touch listener on body will reactivate nodes imported from templates with touch listeners\n * Removing it will re-break the nodes\n *\n * Work around for https://bugs.webkit.org/show_bug.cgi?id=135628\n */\n var isSafari = nav.userAgent.match('Safari') && !nav.userAgent.match('Chrome');\n if (isSafari) {\n document.body.addEventListener('touchstart', function(){});\n }\n }\n }\n dispatcher.register(document, true);\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 * 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 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 event denotes the beginning of a series of tracking events.\n *\n * @module PointerGestures\n * @submodule Events\n * @class trackstart\n */\n/**\n * Pixels moved in the x direction since trackstart.\n * @type Number\n * @property dx\n */\n/**\n * Pixes moved in the y direction since trackstart.\n * @type Number\n * @property dy\n */\n/**\n * Pixels moved in the x direction since the last track.\n * @type Number\n * @property ddx\n */\n/**\n * Pixles 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 track 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 screenX 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 * @property screenY\n */\n/**\n * The last x axis direction of the pointer.\n * @type Number\n * @property xDirection\n */\n/**\n * The last y axis direction of the pointer.\n * @type Number\n * @property yDirection\n */\n/**\n * A shared object between all tracking events.\n * @type Object\n * @property trackInfo\n */\n/**\n * The element currently under the pointer.\n * @type Element\n * @property relatedTarget\n */\n/**\n * The type of pointer that make the track gesture.\n * @type String\n * @property pointerType\n */\n/**\n *\n * This event fires for all pointer 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 dispatcher = scope.dispatcher;\n var eventFactory = scope.eventFactory;\n var pointermap = new scope.PointerMap();\n var track = {\n events: [\n 'down',\n 'move',\n 'up',\n ],\n exposes: [\n 'trackstart',\n 'track',\n 'trackx',\n 'tracky',\n 'trackend'\n ],\n defaultActions: {\n 'track': 'none',\n 'trackx': 'pan-y',\n 'tracky': 'pan-x'\n },\n WIGGLE_THRESHOLD: 4,\n clampDir: function(inDelta) {\n return inDelta > 0 ? 1 : -1;\n },\n calcPositionDelta: function(inA, inB) {\n var x = 0, y = 0;\n if (inA && inB) {\n x = inB.pageX - inA.pageX;\n y = inB.pageY - inA.pageY;\n }\n return {x: x, y: y};\n },\n fireTrack: function(inType, inEvent, inTrackingData) {\n var t = inTrackingData;\n var d = this.calcPositionDelta(t.downEvent, inEvent);\n var dd = this.calcPositionDelta(t.lastMoveEvent, inEvent);\n if (dd.x) {\n t.xDirection = this.clampDir(dd.x);\n } else if (inType === 'trackx') {\n return;\n }\n if (dd.y) {\n t.yDirection = this.clampDir(dd.y);\n } else if (inType === 'tracky') {\n return;\n }\n var gestureProto = {\n bubbles: true,\n cancelable: true,\n trackInfo: t.trackInfo,\n relatedTarget: inEvent.relatedTarget,\n pointerType: inEvent.pointerType,\n pointerId: inEvent.pointerId,\n _source: 'track'\n };\n if (inType !== 'tracky') {\n gestureProto.x = inEvent.x;\n gestureProto.dx = d.x;\n gestureProto.ddx = dd.x;\n gestureProto.clientX = inEvent.clientX;\n gestureProto.pageX = inEvent.pageX;\n gestureProto.screenX = inEvent.screenX;\n gestureProto.xDirection = t.xDirection;\n }\n if (inType !== 'trackx') {\n gestureProto.dy = d.y;\n gestureProto.ddy = dd.y;\n gestureProto.y = inEvent.y;\n gestureProto.clientY = inEvent.clientY;\n gestureProto.pageY = inEvent.pageY;\n gestureProto.screenY = inEvent.screenY;\n gestureProto.yDirection = t.yDirection;\n }\n var e = eventFactory.makeGestureEvent(inType, gestureProto);\n t.downTarget.dispatchEvent(e);\n },\n down: function(inEvent) {\n if (inEvent.isPrimary && (inEvent.pointerType === 'mouse' ? inEvent.buttons === 1 : true)) {\n var p = {\n downEvent: inEvent,\n downTarget: inEvent.target,\n trackInfo: {},\n lastMoveEvent: null,\n xDirection: 0,\n yDirection: 0,\n tracking: false\n };\n pointermap.set(inEvent.pointerId, p);\n }\n },\n move: function(inEvent) {\n var p = pointermap.get(inEvent.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 WIGGLE_THRESHOLD\n if (move > this.WIGGLE_THRESHOLD) {\n p.tracking = true;\n p.lastMoveEvent = p.downEvent;\n this.fireTrack('trackstart', inEvent, p);\n }\n }\n if (p.tracking) {\n this.fireTrack('track', inEvent, p);\n this.fireTrack('trackx', inEvent, p);\n this.fireTrack('tracky', inEvent, p);\n }\n p.lastMoveEvent = 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 pointermap.delete(inEvent.pointerId);\n }\n }\n };\n dispatcher.registerGesture('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.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 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 event is fired when a pointer is held down for 200ms.\n *\n * @module PointerGestures\n * @submodule Events\n * @class hold\n */\n/**\n * Type of pointer that made the holding event.\n * @type String\n * @property pointerType\n */\n/**\n * Screen X axis position of the held pointer\n * @type Number\n * @property clientX\n */\n/**\n * Screen Y axis position 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 pointerType\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 has been held down.\n * @type Number\n * @property holdTime\n */\n/**\n * This event is fired when a held pointer is released or moved.\n *\n * @class release\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var eventFactory = scope.eventFactory;\n var hold = {\n // wait at least HOLD_DELAY ms between 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 exposes: [\n 'hold',\n 'holdpulse',\n 'release'\n ],\n heldPointer: null,\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.heldPointer = 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.heldPointer.pointerId === inEvent.pointerId) {\n this.cancel();\n }\n },\n move: function(inEvent) {\n if (this.heldPointer && this.heldPointer.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 pointerType: this.heldPointer.pointerType,\n pointerId: this.heldPointer.pointerId,\n x: this.heldPointer.clientX,\n y: this.heldPointer.clientY,\n _source: 'hold'\n };\n if (inHoldTime) {\n p.holdTime = inHoldTime;\n }\n var e = eventFactory.makeGestureEvent(inType, p);\n this.target.dispatchEvent(e);\n }\n };\n dispatcher.registerGesture('hold', hold);\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 * 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 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 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 being created by calling\n * `event.preventTap`.\n *\n * Any pointer event can prevent the tap by setting the `tapPrevented` property\n * on itself.\n *\n * @module PointerGestures\n * @submodule Events\n * @class tap\n */\n/**\n * X axis position 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(scope) {\n var dispatcher = scope.dispatcher;\n var eventFactory = scope.eventFactory;\n var pointermap = new scope.PointerMap();\n var tap = {\n events: [\n 'down',\n 'up'\n ],\n exposes: [\n 'tap'\n ],\n down: function(inEvent) {\n if (inEvent.isPrimary && !inEvent.tapPrevented) {\n pointermap.set(inEvent.pointerId, {\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 is target currently under finger\n var t = scope.targetFinding.LCA(start.target, 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 _source: 'tap'\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.tapPrevented = true;\n pointermap.delete(e.pointerId);\n };\n };\n dispatcher.registerGesture('tap', tap);\n})(window.PolymerGestures);\n","/*\n Copyright (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 Kris Kowal <kris.kowal@cixar.com>\n Copyright (C) 2012 Yusuke Suzuki <utatane.tea@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 permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\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 TORT\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(function (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.BooleanLiteral] = 'Boolean';\n TokenName[Token.EOF] = '<end>';\n TokenName[Token.Identifier] = 'Identifier';\n TokenName[Token.Keyword] = 'Keyword';\n TokenName[Token.NullLiteral] = 'Null';\n TokenName[Token.NumericLiteral] = 'Numeric';\n TokenName[Token.Punctuator] = 'Punctuator';\n TokenName[Token.StringLiteral] = 'String';\n\n Syntax = {\n ArrayExpression: 'ArrayExpression',\n BinaryExpression: 'BinaryExpression',\n CallExpression: 'CallExpression',\n ConditionalExpression: 'ConditionalExpression',\n EmptyStatement: 'EmptyStatement',\n ExpressionStatement: 'ExpressionStatement',\n Identifier: 'Identifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalExpression',\n MemberExpression: 'MemberExpression',\n ObjectExpression: 'ObjectExpression',\n Program: 'Program',\n Property: 'Property',\n ThisExpression: 'ThisExpression',\n UnaryExpression: 'UnaryExpression'\n };\n\n // Error messages should be identical to V8.\n Messages = {\n UnexpectedToken: 'Unexpected token %0',\n UnknownLabel: 'Undefined label \\'%0\\'',\n Redeclaration: '%0 \\'%1\\' has already been declared'\n };\n\n // Ensure the condition is true, otherwise throw an error.\n // This is only to have a better contract semantic, i.e. another safety net\n // to catch a logic error. The condition shall be fulfilled in normal case.\n // Do NOT use this to enforce a certain condition on any user input.\n\n function assert(condition, message) {\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n }\n\n function 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.fromCharCode(ch)) > 0);\n }\n\n // 7.3 Line Terminators\n\n function isLineTerminator(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 function isKeyword(id) {\n return (id === 'this')\n }\n\n // 7.4 Comments\n\n function skipWhitespace() {\n while (index < length && isWhiteSpace(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 source.slice(start, index);\n }\n\n function scanIdentifier() {\n var start, id, type;\n\n start = index;\n\n id = getIdentifier();\n\n // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n if (id.length === 1) {\n type = Token.Identifier;\n } else if (isKeyword(id)) {\n type = Token.Keyword;\n } else if (id === 'null') {\n type = Token.NullLiteral;\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 Punctuators\n\n function scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2;\n\n switch (code) {\n\n // Check for most common single-character punctuators.\n case 46: // . dot\n case 40: // ( open bracket\n case 41: // ) close bracket\n case 59: // ; semicolon\n case 44: // , comma\n case 123: // { open curly 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.charCodeAt(index + 1);\n\n // '=' (char #61) marks an assignment or comparison operator.\n if (code2 === 61) {\n switch (code) {\n case 37: // %\n case 38: // &\n case 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(code2),\n range: [start, index]\n };\n\n case 33: // !\n case 61: // =\n index += 2;\n\n // !== and ===\n if (source.charCodeAt(index) === 61) {\n ++index;\n }\n return {\n type: Token.Punctuator,\n value: source.slice(start, index),\n range: [start, index]\n };\n default:\n break;\n }\n }\n break;\n }\n\n // Peek more characters.\n\n ch2 = source[index + 1];\n\n // Other 2-character punctuators: && ||\n\n if (ch1 === ch2 && ('&|'.indexOf(ch1) >= 0)) {\n index += 2;\n return {\n type: Token.Punctuator,\n value: ch1 + ch2,\n range: [start, index]\n };\n }\n\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: Token.Punctuator,\n value: ch1,\n range: [start, index]\n };\n }\n\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n // 7.8.3 Numeric Literals\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 decimal 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 starts with '0'.\n if (number === '0') {\n // decimal number starts with '0' such as '09' is illegal.\n if (ch && isDecimalDigit(ch.charCodeAt(0))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n while (isDecimalDigit(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 ch = source[index];\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n if (isDecimalDigit(source.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.charCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\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 = source[index];\n assert((quote === '\\'' || quote === '\"'),\n 'String literal must starts with a quote');\n\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\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 case '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 (isLineTerminator(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 value: 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.NullLiteral;\n }\n\n function advance() {\n var ch;\n\n skipWhitespace();\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 scanPunctuator();\n }\n\n // String literal starts with single quote (#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 #46 can also start a floating-point number, hence the need\n // to check the next character.\n if (ch === 46) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n return scanPunctuator();\n }\n\n if (isDecimalDigit(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 lookahead = 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 = messageFormat.replace(\n /%(\\d)/g,\n function (whole, index) {\n assert(index < args.length, 'Message reference must be in 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 exception because of the token.\n\n function throwUnexpected(token) {\n throwError(token, Messages.UnexpectedToken, token.value);\n }\n\n // Expect the next token to match the specified punctuator.\n // If not, an exception will be thrown.\n\n function expect(value) {\n var token = lex();\n if (token.type !== Token.Punctuator || token.value !== value) {\n throwUnexpected(token);\n }\n }\n\n // Return true if the next token matches the specified punctuator.\n\n function match(value) {\n return 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 && lookahead.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 !== Token.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 elements.push(null);\n } else {\n elements.push(parseExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n expect(']');\n\n return delegate.createArrayExpression(elements);\n }\n\n // 11.1.5 Object Initialiser\n\n function parseObjectPropertyKey() {\n var token;\n\n skipWhitespace();\n token = lex();\n\n // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {\n return delegate.createLiteral(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.type === Token.EOF || token.type === Token.Punctuator) {\n throwUnexpected(token);\n }\n\n key = parseObjectPropertyKey();\n expect(':');\n return delegate.createProperty('init', key, parseExpression());\n }\n\n function parseObjectInitialiser() {\n var properties = [];\n\n expect('{');\n\n while (!match('}')) {\n properties.push(parseObjectProperty());\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n\n return delegate.createObjectExpression(properties);\n }\n\n // 11.1.6 The Grouping 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 function parsePrimaryExpression() {\n var type, token, expr;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n type = lookahead.type;\n\n if (type === Token.Identifier) {\n expr = delegate.createIdentifier(lex().value);\n } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {\n expr = delegate.createLiteral(lex());\n } else if (type === Token.Keyword) {\n if (matchKeyword('this')) {\n lex();\n expr = delegate.createThisExpression();\n }\n } else if (type === Token.BooleanLiteral) {\n token = lex();\n token.value = (token.value === 'true');\n expr = delegate.createLiteral(token);\n } else if (type === Token.NullLiteral) {\n token = lex();\n token.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 throwUnexpected(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.push(parseExpression());\n if (match(')')) {\n break;\n }\n expect(',');\n }\n }\n\n expect(')');\n\n return args;\n }\n\n function parseNonComputedProperty() {\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 parseNonComputedMember() {\n expect('.');\n\n return parseNonComputedProperty();\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, args, property;\n\n expr = parsePrimaryExpression();\n\n while (true) {\n if (match('[')) {\n property = parseComputedMember();\n expr = delegate.createMemberExpression('[', expr, property);\n } else if (match('.')) {\n property = parseNonComputedMember();\n expr = delegate.createMemberExpression('.', expr, property);\n } else if (match('(')) {\n args = parseArguments();\n expr = delegate.createCallExpression(expr, args);\n } else {\n break;\n }\n }\n\n return expr;\n }\n\n // 11.3 Postfix Expressions\n\n var parsePostfixExpression = 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('typeof')) {\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 Equality Operators\n // 11.10 Binary Bitwise Operators\n // 11.11 Binary Logical Operators\n\n function parseBinaryExpression() {\n var expr, token, prec, stack, right, operator, left, i;\n\n left = parseUnaryExpression();\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 stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead)) > 0) {\n\n // Reduce: make a binary expression from the three topmost entries.\n while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n expr = delegate.createBinaryExpression(operator, left, right);\n stack.push(expr);\n }\n\n // Shift.\n token = lex();\n token.prec = prec;\n stack.push(token);\n expr = 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.createBinaryExpression(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, alternate;\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, alternate);\n }\n\n return expr;\n }\n\n // Simplification since we do not support AssignmentExpression.\n var parseExpression = parseConditionalExpression;\n\n // Polymer Syntax extensions\n\n // Filter ::\n // Identifier\n // Identifier \"(\" \")\"\n // Identifier \"(\" FilterArguments \")\"\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 // Filters \"|\" Filter\n\n function parseFilters() {\n while (match('|')) {\n lex();\n parseFilter();\n }\n }\n\n // TopLevel ::\n // LabelledExpressions\n // AsExpression\n // InExpression\n // FilterExpression\n\n // AsExpression ::\n // FilterExpression as Identifier\n\n // InExpression ::\n // Identifier, Identifier in FilterExpression\n // Identifier in FilterExpression\n\n // FilterExpression ::\n // Expression\n // Expression Filters\n\n function parseTopLevel() {\n skipWhitespace();\n peek();\n\n var expr = parseExpression();\n if (expr) {\n if (lookahead.value === ',' || lookahead.value == 'in' &&\n expr.type === Syntax.Identifier) {\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(lookahead);\n }\n }\n\n function parseAsExpression(expr) {\n lex(); // as\n var identifier = lex().value;\n delegate.createAsExpression(expr, identifier);\n }\n\n function parseInExpression(identifier) {\n var indexName;\n if (lookahead.value === ',') {\n lex();\n if (lookahead.type !== Token.Identifier)\n throwUnexpected(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 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 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(function (global) {\n 'use strict';\n\n function prepareBinding(expressionText, name, node, filterRegistry) {\n var expression;\n try {\n expression = getExpression(expressionText);\n if (expression.scopeIdent &&\n (node.nodeType !== Node.ELEMENT_NODE ||\n node.tagName !== 'TEMPLATE' ||\n (name !== 'bind' && name !== 'repeat'))) {\n throw Error('as and 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 binding = expression.getBinding(model, filterRegistry, oneTime);\n if (expression.scopeIdent && binding) {\n node.polymerExpressionScopeIdent_ = expression.scopeIdent;\n if (expression.indexIdent)\n node.polymerExpressionIndexIdent_ = expression.indexIdent;\n }\n\n return binding;\n }\n }\n\n // TODO(rafaelw): Implement simple LRU.\n var expressionParseCache = 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, delegate);\n expression = new Expression(delegate);\n expressionParseCache[expressionText] = expression;\n }\n return expression;\n }\n\n function Literal(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 setValue: function(model, newValue) {\n if (this.path.length == 1);\n model = findScope(model, this.path[0]);\n\n return this.path.setValueFrom(model, newValue);\n }\n };\n\n function MemberExpression(object, property, accessor) {\n this.computed = accessor == '[';\n\n this.dynamicDeps = typeof object == 'function' ||\n object.dynamicDeps ||\n (this.computed && !(property instanceof Literal));\n\n this.simplePath =\n !this.dynamicDeps &&\n (property instanceof IdentPath || property instanceof Literal) &&\n (object instanceof MemberExpression || object instanceof IdentPath);\n\n this.object = this.simplePath ? object : getFn(object);\n this.property = !this.computed || this.simplePath ?\n property : getFn(property);\n }\n\n MemberExpression.prototype = {\n get fullPath() {\n if (!this.fullPath_) {\n\n var parts = this.object instanceof MemberExpression ?\n this.object.fullPath.slice() : [this.object.name];\n parts.push(this.property instanceof IdentPath ?\n this.property.name : this.property.value);\n this.fullPath_ = Path.get(parts);\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 (observer)\n observer.addPath(model, path);\n\n return path.getValueFrom(model);\n };\n } else if (!this.computed) {\n var path = Path.get(this.property.name);\n\n this.valueFn_ = function(model, observer, filterRegistry) {\n var context = object(model, observer, filterRegistry);\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.property;\n\n this.valueFn_ = function(model, observer, filterRegistry) {\n var context = object(model, observer, filterRegistry);\n var propName = property(model, observer, filterRegistry);\n if (observer)\n observer.addPath(context, [propName]);\n\n return context ? context[propName] : undefined;\n };\n }\n }\n return this.valueFn_;\n },\n\n setValue: function(model, newValue) {\n if (this.simplePath) {\n this.fullPath.setValueFrom(model, newValue);\n return newValue;\n }\n\n var object = this.object(model);\n var propName = this.property instanceof IdentPath ? 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(model, observer, filterRegistry, toModelDirection,\n initialArgs) {\n var fn = filterRegistry[this.name];\n var context = model;\n if (fn) {\n context = undefined;\n } else {\n fn = context[this.name];\n if (!fn) {\n console.error('Cannot find function or 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('Cannot find function or filter: ' + this.name);\n return;\n }\n\n var args = initialArgs || [];\n for (var i = 0; i < this.args.length; i++) {\n args.push(getFn(this.args[i])(model, observer, filterRegistry));\n }\n\n return fn.apply(context, args);\n }\n };\n\n function notImplemented() { throw Error('Not Implemented'); }\n\n var unaryOperators = {\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) { 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) { 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 createUnaryExpression: function(op, argument) {\n if (!unaryOperators[op])\n throw Error('Disallowed operator: ' + op);\n\n argument = getFn(argument);\n\n return function(model, observer, filterRegistry) {\n return unaryOperators[op](argument(model, observer, filterRegistry));\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 switch (op) {\n case '||':\n this.dynamicDeps = true;\n return function(model, observer, filterRegistry) {\n return left(model, observer, filterRegistry) ||\n right(model, observer, filterRegistry);\n };\n case '&&':\n this.dynamicDeps = true;\n return function(model, observer, filterRegistry) {\n return left(model, observer, filterRegistry) &&\n right(model, observer, filterRegistry);\n };\n }\n\n return function(model, observer, filterRegistry) {\n return binaryOperators[op](left(model, observer, filterRegistry),\n right(model, observer, filterRegistry));\n };\n },\n\n createConditionalExpression: function(test, consequent, alternate) {\n test = getFn(test);\n consequent = getFn(consequent);\n alternate = getFn(alternate);\n\n this.dynamicDeps = true;\n\n return function(model, observer, filterRegistry) {\n return test(model, observer, filterRegistry) ?\n consequent(model, observer, filterRegistry) :\n alternate(model, observer, filterRegistry);\n }\n },\n\n createIdentifier: function(name) {\n var ident = new IdentPath(name);\n ident.type = 'Identifier';\n return ident;\n },\n\n createMemberExpression: function(accessor, object, property) {\n var ex = new MemberExpression(object, property, accessor);\n if (ex.dynamicDeps)\n this.dynamicDeps = true;\n return ex;\n },\n\n createCallExpression: function(expression, args) {\n if (!(expression instanceof IdentPath))\n throw Error('Only identifier function invocations are allowed');\n\n var filter = new Filter(expression.name, args);\n\n return function(model, observer, filterRegistry) {\n return filter.transform(model, observer, filterRegistry, false);\n };\n },\n\n createLiteral: function(token) {\n return new Literal(token.value);\n },\n\n createArrayExpression: function(elements) {\n for (var i = 0; i < elements.length; i++)\n elements[i] = getFn(elements[i]);\n\n return function(model, observer, filterRegistry) {\n var arr = []\n for (var i = 0; i < elements.length; i++)\n arr.push(elements[i](model, observer, filterRegistry));\n return arr;\n }\n },\n\n createProperty: function(kind, key, value) {\n return {\n key: key instanceof IdentPath ? key.name : key.value,\n value: value\n };\n },\n\n createObjectExpression: function(properties) {\n for (var i = 0; i < properties.length; i++)\n properties[i].value = getFn(properties[i].value);\n\n return function(model, observer, filterRegistry) {\n var obj = {};\n for (var i = 0; i < properties.length; i++)\n obj[properties[i].key] =\n properties[i].value(model, observer, filterRegistry);\n return obj;\n }\n },\n\n createFilter: function(name, args) {\n this.filters.push(new Filter(name, args));\n },\n\n createAsExpression: function(expression, scopeIdent) {\n this.expression = expression;\n this.scopeIdent = scopeIdent;\n },\n\n createInExpression: function(scopeIdent, indexIdent, expression) {\n this.expression = 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.indexIdent;\n\n if (!delegate.expression)\n throw Error('No expression found.');\n\n this.expression = delegate.expression;\n getFn(this.expression); // forces 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 observer = 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 firstTime = false;\n return firstValue;\n }\n\n if (self.dynamicDeps)\n observer.startReset();\n\n var value = self.getValue(model,\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, filterRegistry);\n return newValue;\n }\n\n return new ObserverTransform(observer, valueFn, setValueFn, true);\n },\n\n getValue: function(model, observer, filterRegistry) {\n var value = getFn(this.expression)(model, observer, filterRegistry);\n for (var i = 0; i < this.filters.length; i++) {\n value = this.filters[i].transform(model, observer, filterRegistry,\n false, [value]);\n }\n\n return value;\n },\n\n setValue: function(model, newValue, filterRegistry) {\n var count = this.filters ? this.filters.length : 0;\n while (count-- > 0) {\n newValue = this.filters[count].transform(model, undefined,\n filterRegistry, true, [newValue]);\n }\n\n if (this.expression.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 function convertStylePropertyName(name) {\n return String(name).replace(/[A-Z]/g, function(c) {\n return '-' + c.toLowerCase();\n });\n }\n\n var parentScopeName = '@' + 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 findScope(model, prop) {\n while (model[parentScopeName] &&\n !Object.prototype.hasOwnProperty.call(model, prop)) {\n model = model[parentScopeName];\n }\n\n return model;\n }\n\n function isLiteralExpression(pathString) {\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 false;\n };\n\n function PolymerExpressions() {}\n\n PolymerExpressions.prototype = {\n // \"built-in\" filters\n styleObject: function(value) {\n var parts = [];\n for (var key in value) {\n parts.push(convertStylePropertyName(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 = template.polymerExpressionIndexIdent_;\n if (!indexIdent)\n return;\n\n return function(templateInstance, index) {\n templateInstance.model[indexIdent] = index;\n };\n },\n\n prepareBinding: function(pathString, name, node) {\n var path = Path.get(pathString);\n\n if (!isLiteralExpression(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(model, 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.polymerExpressionScopeIdent_;\n if (!scopeName)\n return;\n\n var parentScope = template.templateInstance ?\n template.templateInstance.model :\n template.model;\n\n var indexName = template.polymerExpressionIndexIdent_;\n\n return function(model) {\n return createScopeObject(parentScope, model, scopeName, indexName);\n };\n }\n };\n\n var createScopeObject = ('__proto__' in {}) ?\n function(parentScope, model, scopeName, indexName) {\n var scope = {};\n scope[scopeName] = model;\n scope[indexName] = undefined;\n scope[parentScopeName] = parentScope;\n scope.__proto__ = parentScope;\n return scope;\n } :\n function(parentScope, model, scopeName, indexName) {\n var scope = Object.create(parentScope);\n Object.defineProperty(scope, scopeName,\n { value: model, configurable: true, writable: true });\n Object.defineProperty(scope, indexName,\n { value: undefined, configurable: true, writable: true });\n Object.defineProperty(scope, parentScopeName,\n { value: parentScope, configurable: true, writable: true });\n return scope;\n };\n\n global.PolymerExpressions = PolymerExpressions;\n PolymerExpressions.getExpression = getExpression;\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 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 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 */\nPolymer = {\n version: '0.3.5'\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.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 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// 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 (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://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(function(scope) {\n\n // copy own properties from 'api' to 'prototype, with name hinting for 'super'\n function extend(prototype, api) {\n if (prototype && api) {\n // use only own properties of 'api'\n Object.getOwnPropertyNames(api).forEach(function(n) {\n // acquire property descriptor\n var pd = Object.getOwnPropertyDescriptor(api, n);\n if (pd) {\n // clone property via descriptor\n Object.defineProperty(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 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 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 \n // usage\n \n // invoke cb.call(this) in 100ms, unless the job 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 = inContext;\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.context);\n }\n }\n };\n \n function job(job, 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 (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://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(function(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 prototype = !tag ? HTMLElement.prototype : registry[tag];\n // TODO(sjmiles): creating <tag> is likely to have wasteful side-effects\n return prototype || Object.getPrototypeOf(document.createElement(tag));\n };\n\n // we have to flag propagation stoppage for the event dispatcher\n var originalStopPropagation = Event.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","/*\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 http://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 found 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 instead\r\n function $super(arrayOfArgs) {\r\n // since we are thunking a method call, performance is important here: \r\n // memoize all lookups, once 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 caller = $super.caller;\r\n // memoized 'name of method' \r\n var nom = caller.nom;\r\n // memoized next implementation prototype\r\n var _super = caller._super;\r\n if (!_super) {\r\n if (!nom) {\r\n nom = caller.nom = nameInThis.call(this, caller);\r\n }\r\n if (!nom) {\r\n console.warn('called super() on a method not installed declaratively (has no .nom property)');\r\n }\r\n // super prototype is either 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 reach \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 super function\r\n var fn = _super[nom];\r\n if (fn) {\r\n // memoize 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 memoizeSuper(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 nameInThis(value) {\r\n var p = this.__proto__;\r\n while (p && p !== HTMLElement.prototype) {\r\n // TODO(sjmiles): getOwnPropertyNames is absurdly expensive\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.getOwnPropertyDescriptor(p, n);\r\n if (typeof d.value === 'function' && d.value === 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, name, 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(proto, 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 = getPrototypeOf(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 prototype 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 invocations\r\n for (var n in prototype) {\r\n var pd = Object.getOwnPropertyDescriptor(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 * 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://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(function(scope) {\n\n function noopHandler(value) {\n return value;\n }\n\n var typeHandlers = {\n string: noopHandler,\n 'undefined': noopHandler,\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 : !!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 format\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 object, we can parse is with the JSON library.\n // include convenience replace 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 return value;\n }\n },\n // avoid deserialization of functions\n 'function': 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 // invent 'date' type value for Date\n if (currentValue instanceof Date) {\n inferredType = '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 * 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://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(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 for (var n in apis) {\n extend(prototype, apis[n]);\n }\n };\n\n // exports\n\n scope.api = api;\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://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(function(scope) {\n\n var utils = {\n /**\n * Invokes a function asynchronously. The context of the 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, timeout) {\n // when polyfilling Object.observe, ensure changes \n // propagate before executing the async method\n Platform.flush();\n // second argument to `apply` must be an array\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(handle) {\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 * @param {Boolean} bubbles Set false to prevent bubbling, defaults to true\n * @param {Boolean} cancelable Set false to prevent cancellation, defaults to true\n */\n fire: function(type, detail, onNode, bubbles, cancelable) {\n var node = onNode || this;\n var detail = detail === null || detail === undefined ? {} : detail;\n var event = new CustomEvent(type, {\n bubbles: bubbles !== undefined ? bubbles : true,\n cancelable: 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 * @param {string} type An event name.\n * @param detail\n * @param {Node} toNode 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 * @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 * Inject HTML which contains markup bound to this element into\n * a target element (replacing target element content).\n * @param String html to inject\n * @param Element target element\n */\n injectBoundHTML: function(html, element) {\n var template = document.createElement('template');\n template.innerHTML = html;\n var fragment = this.instanceTemplate(template);\n if (element) {\n element.textContent = '';\n element.appendChild(fragment);\n }\n return fragment;\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 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 (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://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(function(scope) {\n\n // imports\n\n var log = 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) && 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 listeners ('host' and 'instance') and Node.bind\n // by default supports 1 thing being bound.\n for (var type in events) {\n var methodName = events[type];\n PolymerGestures.addEventListener(this, type, this.element.getEventHandler(this, this, methodName));\n }\n },\n // call 'method' or function method on 'obj' with 'args', if the method exists\n dispatchMethod: function(obj, method, args) {\n if (obj) {\n log.events && console.group('[%s] dispatch [%s]', obj.localName, method);\n var fn = typeof method === 'function' ? method : obj[method];\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 // alias PolymerGestures event listener logic\n scope.addEventListener = PolymerGestures.addEventListener;\n scope.removeEventListener = PolymerGestures.removeEventListener;\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 http://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 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 attributes = {\r\n copyInstanceAttributes: function () {\r\n var a$ = this._instanceAttributes;\r\n for (var k in a$) {\r\n if (!this.hasAttribute(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 lookup 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$.length, 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 mapped to a property, deserialize\r\n // 'value' into that property\r\n attributeToProperty: function(name, value) {\r\n // try to match this attribute to a property (attributes are\r\n // all lower-case, so this is case-insensitive search)\r\n var name = this.propertyForAttribute(name);\r\n if (name) {\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 name, or undefined\r\n propertyForAttribute: function(name) {\r\n var match = this._publishLC && this._publishLC[name];\r\n //console.log('propertyForAttribute:', 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: function(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 intelligently serialize property value\r\n var serializedValue = this.serializeValue(this[name], inferredType);\r\n // boolean properties must reflect as boolean attributes\r\n if (serializedValue !== undefined) {\r\n this.setAttribute(name, serializedValue);\r\n // TODO(sorvell): we should remove attr for all properties\r\n // that have undefined serialization; however, we will need to\r\n // refine the attr reflection system to achieve this; pica, for example,\r\n // relies on having inferredType object properties 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 (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://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(function(scope) {\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 updateRecord = {\n object: undefined,\n type: 'update',\n name: undefined,\n oldValue: undefined\n };\n\n var numberIsNaN = Number.isNaN || function(value) {\n return typeof value === 'number' && isNaN(value);\n }\n\n function areSameValue(left, right) {\n if (left === right)\n return left !== 0 || 1 / left === 1 / right;\n if (numberIsNaN(left) && numberIsNaN(right))\n return true;\n\n return left !== left && right !== right;\n }\n\n // capture A's value if B's value is null or undefined,\n // otherwise use B's value\n function resolveBindingValue(oldValue, value) {\n if (value === undefined && oldValue === null) {\n return value;\n }\n return (value === null || value === undefined) ? oldValue : value;\n }\n\n var properties = {\n createPropertyObserver: function() {\n var n$ = this._observeNames;\n if (n$ && n$.length) {\n var o = this._propertyObserver = new CompoundObserver(true);\n this.registerObserver(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 // this doesn't work for inheritance and not for accessors without\n // a value 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.notifyPropertyChanges, 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 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 method if one of ov or nv is not (undefined | null)\n if ((ov !== undefined && ov !== null) || (nv !== undefined && nv !== null)) {\n called[method] = true;\n // TODO(sorvell): call method with the set of values it's expecting;\n // e.g. 'foo bar': 'invalidate' expects the new and old values for\n // foo and bar. Currently we give only one 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._propertyObserver) {\n this._propertyObserver.deliver();\n }\n },\n propertyChanged_: function(name, value, oldValue) {\n if (this.reflect[name]) {\n this.reflectPropertyToAttribute(name);\n }\n },\n observeArrayValue: 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] observeArrayValue: unregister observer [%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(function(value, old) {\n this.invokeMethod(callbackName, [old]);\n }, this);\n this.registerNamedObserver(name + '__array', observer);\n }\n }\n },\n emitPropertyChangeRecord: function(name, value, oldValue) {\n var object = this;\n if (areSameValue(value, oldValue))\n return;\n\n this.propertyChanged_(name, value, oldValue);\n\n if (!Observer.hasObjectObserve)\n return;\n\n var notifier = this.notifier_;\n if (!notifier)\n notifier = this.notifier_ = Object.getNotifier(this);\n\n updateRecord.object = this;\n updateRecord.name = name;\n updateRecord.oldValue = oldValue;\n\n notifier.notify(updateRecord);\n },\n bindToAccessor: function(name, observable, resolveFn) {\n var privateName = name + '_';\n var privateObservable = name + 'Observable_';\n\n this[privateObservable] = observable;\n var oldValue = this[privateName];\n\n var self = this;\n var value = observable.open(function(value, oldValue) {\n self[privateName] = value;\n self.emitPropertyChangeRecord(name, value, oldValue);\n });\n\n if (resolveFn && !areSameValue(oldValue, value)) {\n var resolvedValue = resolveFn(oldValue, value);\n if (!areSameValue(value, resolvedValue)) {\n value = resolvedValue;\n if (observable.setValue)\n observable.setValue(value);\n }\n }\n\n this[privateName] = value;\n this.emitPropertyChangeRecord(name, value, oldValue);\n\n var observer = {\n close: function() {\n observable.close();\n self[privateObservable] = undefined;\n }\n };\n this.registerObserver(observer);\n return observer;\n },\n createComputedProperties: function() {\n if (!this._computedNames) {\n return;\n }\n\n for (var i = 0; i < this._computedNames.length; i++) {\n var name = this._computedNames[i];\n var expressionText = this.computed[name];\n try {\n var expression = PolymerExpressions.getExpression(expressionText);\n var observable = expression.getBinding(this, this.element.syntax);\n this.bindToAccessor(name, observable);\n } catch (ex) {\n console.error('Failed to create computed property', ex);\n }\n }\n },\n bindProperty: function(property, observable, oneTime) {\n if (oneTime) {\n this[property] = observable;\n return;\n }\n return this.bindToAccessor(property, observable, resolveBindingValue);\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 registerObserver: function(observer) {\n if (!this._observers) {\n this._observers = [observer];\n return;\n }\n\n this._observers.push(observer);\n },\n // observer array items are arrays of observers.\n closeObservers: function() {\n if (!this._observers) {\n return;\n }\n\n var observers = this._observers;\n for (var i = 0; i < observers.length; i++) {\n var observer = observers[i];\n if (observer && typeof observer.close == 'function') {\n observer.close();\n }\n }\n\n this._observers = [];\n },\n // bookkeeping observers for 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$ = 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 for (var i in this._namedObservers) {\n this.closeNamedObserver(i);\n }\n this._namedObservers = {};\n }\n }\n };\n\n // logging\n var LOG_OBSERVE = '[%s] watching [%s]';\n var LOG_OBSERVED = '[%s#%s] watch: [%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 = properties;\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://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(function(scope) {\n\n // imports\n\n var log = window.logFlags || 0;\n\n // element 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 = template.createInstance(this, syntax);\n var observers = dom.bindings_;\n for (var i = 0; i < observers.length; i++) {\n this.registerObserver(observers[i]);\n }\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 return this.mixinSuper(arguments);\n } else {\n // use n-way Polymer binding\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.path = observable.path_;\n this._recordBinding(property, observer);\n }\n if (this.reflect[property]) {\n this.reflectPropertyToAttribute(property);\n }\n return observer;\n }\n },\n bindFinished: function() {\n this.makeElementReady();\n },\n _recordBinding: function(name, observer) {\n this.bindings_ = this.bindings_ || {};\n this.bindings_[name] = observer;\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] asyncUnbindAll', this.localName);\n this._unbindAllJob = this.job(this._unbindAllJob, this.unbindAll, 0);\n }\n },\n unbindAll: function() {\n if (!this._unbound) {\n this.closeObservers();\n this.closeNamedObservers();\n this._unbound = true;\n }\n },\n cancelUnbindAll: function() {\n if (this._unbound) {\n log.unbind && console.warn('[%s] already 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 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 forNodeTree(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 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://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(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], callback, 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 console.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.prepareElement();\n if (!this.ownerDocument.isStagingDocument) {\n this.makeElementReady();\n }\n },\n // system entry point, do not override\n prepareElement: function() {\n if (this._elementPrepared) {\n console.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.createPropertyObserver();\n this.openPropertyObserver();\n // install boilerplate attributes\n this.copyInstanceAttributes();\n // process input attributes\n this.takeAttributes();\n // add event listeners\n this.addHostListeners();\n },\n makeElementReady: function() {\n if (this._readied) {\n return;\n }\n this._readied = true;\n this.createComputedProperties();\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(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.ready();\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 // ancestors, siblings) such that the developer is enured to upgrade\n // ordering. If the element definitions have loaded, domReady\n // can be used to access upgraded elements.\n if (!this.hasBeenAttached) {\n this.hasBeenAttached = true;\n if (this.domReady) {\n this.async('domReady');\n }\n }\n },\n detachedCallback: function() {\n if (!this.preventDispose) {\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 leftViewCallback: function() {\n this.detachedCallback();\n },\n // TODO(sorvell): bc\n enteredDocumentCallback: function() {\n this.attachedCallback();\n },\n // TODO(sorvell): bc\n leftDocumentCallback: function() {\n this.detachedCallback();\n },\n // recursive ancestral <element> initialization, oldest first\n parseDeclarations: function(p) {\n if (p && p.element) {\n this.parseDeclarations(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.fetchTemplate(elementElement);\n if (template) {\n var root = this.shadowFromTemplate(template);\n this.shadowRoots[elementElement.name] = root;\n }\n },\n // return a shadow-root template (if desired), override for custom behavior\n fetchTemplate: function(elementElement) {\n return elementElement.querySelector('template');\n },\n // utility function that creates 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 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.instanceTemplate(template);\n // append to shadow dom\n root.appendChild(dom);\n // perform post-construction initialization tasks on shadow root\n this.shadowRootReady(root, template);\n // return the created shadow root\n return root;\n }\n },\n // utility function that 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 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.instanceTemplate(template);\n // append to shadow dom\n if (refNode) {\n this.insertBefore(dom, refNode);\n } else {\n this.appendChild(dom);\n }\n // perform post-construction initialization tasks on ahem, light root\n this.shadowRootReady(this);\n // return the created shadow root\n return dom;\n }\n },\n shadowRootReady: function(root) {\n // locate nodes with id and store references to them in this.$ hash\n this.marshalNodeReferences(root);\n },\n // locate nodes with id and store 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$.length, n; (i<l) && (n=n$[i]); i++) {\n $[n.id] = n;\n };\n }\n },\n attributeChangedCallback: function(name, oldValue) {\n // TODO(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 observer = new MutationObserver(function(mutations) {\n listener.call(this, observer, mutations);\n observer.disconnect();\n }.bind(this));\n observer.observe(node, {childList: true, subtree: true});\n }\n };\n\n // true if object has own PolymerBase api\n function isBase(object) {\n return object.hasOwnProperty('PolymerBase')\n }\n\n // name a base constructor for dev 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.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 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\n // imports\n\n var log = window.logFlags || {};\n var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;\n\n // magic words\n \n var STYLE_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 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), cssText = '';\n while (proto && proto.element) {\n cssText += proto.element.cssTextForScope(STYLE_CONTROLLER_SCOPE);\n proto = getPrototypeOf(proto);\n }\n if (cssText) {\n this.installScopeCssText(cssText, scope);\n }\n }\n },\n installScopeStyle: function(style, name, scope) {\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 = style.textContent;\n }\n this.installScopeCssText(cssText, scope, name);\n }\n },\n installScopeCssText: function(cssText, scope, name) {\n scope = scope || this.findStyleScope();\n name = name || '';\n if (!scope) {\n return;\n }\n if (hasShadowDOMPolyfill) {\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 has been applied\n this.styleCacheForScope(scope)[this.localName + name] = true;\n },\n findStyleScope: function(node) {\n // find the shadow root that contains 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 var cache = this.styleCacheForScope(scope);\n return cache[name];\n },\n styleCacheForScope: function(scope) {\n if (hasShadowDOMPolyfill) {\n var scopeName = scope.host ? scope.host.localName : scope.localName;\n return polyfillScopeStyleCache[scopeName] || (polyfillScopeStyleCache[scopeName] = {});\n } else {\n return scope._scopeStyles = (scope._scopeStyles || {});\n }\n }\n };\n\n var polyfillScopeStyleCache = {};\n \n // NOTE: use raw prototype traversal so that we ensure correct traversal\n // on platforms 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.instance.styles = styles;\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://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(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 tag `name`\n function element(name, prototype) {\n if (arguments.length === 1 && typeof arguments[0] !== 'string') {\n prototype = name;\n var script = 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 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 // async prototype source\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. Prototypes associated with a tag name\n // using document.registerElement are available from\n // HTMLElement.getPrototypeForTag().\n // If an element was fully registered by Polymer, then\n // Polymer.getRegisteredPrototype(name) === \n // HTMLElement.getPrototypeForTag(name)\n\n var prototypesByName = {};\n\n function registerPrototype(name, prototype) {\n return prototypesByName[name] = prototype || {};\n }\n\n function getRegisteredPrototype(name) {\n return prototypesByName[name];\n }\n\n // exports\n\n scope.getRegisteredPrototype = getRegisteredPrototype;\n scope.waitingForPrototype = waitingForPrototype;\n\n // namespace shenanigans so we can expose our scope on the registration \n // function\n\n // make window.Polymer reference `element()`\n\n window.Polymer = element;\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 * 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://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(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 (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://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(function(scope) {\n\n // imports\n\n var log = window.logFlags || {};\n var api = scope.api.instance.styles;\n var STYLE_SCOPE_ATTRIBUTE = api.STYLE_SCOPE_ATTRIBUTE;\n\n var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;\n\n // magic words\n\n var STYLE_SELECTOR = 'style';\n var STYLE_LOADABLE_MATCH = '@import';\n var SHEET_SELECTOR = 'link[rel=stylesheet]';\n var STYLE_GLOBAL_SCOPE = 'global';\n var SCOPE_ATTR = 'polymer-scope';\n\n var styles = {\n // returns true if resources are loading\n loadStyles: function(callback) {\n var template = this.fetchTemplate();\n var content = template && this.templateContent();\n if (content) {\n this.convertSheetsToStyles(content);\n var styles = this.findLoadableStyles(content);\n if (styles.length) {\n var templateUrl = template.ownerDocument.baseURI;\n return Platform.styleResolver.loadStyles(styles, 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$.length, s, c; (i<l) && (s=s$[i]); i++) {\n c = createStyleElement(importRuleForSheet(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 (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.setAttribute(a.name, a.value);\n }\n }\n },\n findLoadableStyles: function(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 <polymer-element> elements into the \n * element's template.\n * @param elementElement The <element> element to style.\n */\n installSheets: function() {\n this.cacheSheets();\n this.cacheStyles();\n this.installLocalSheets();\n this.installGlobalStyles();\n },\n /**\n * Remove all sheets from element and store for later use.\n */\n cacheSheets: function() {\n this.sheets = this.findNodes(SHEET_SELECTOR);\n this.sheets.forEach(function(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.forEach(function(s) {\n if (s.parentNode) {\n s.parentNode.removeChild(s);\n }\n });\n },\n /**\n * Takes external stylesheets 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 the main document, the sheet does\n * not become active.\n * Note, ignores sheets with the attribute 'polymer-scope'.\n * @param elementElement The <element> element to style.\n */\n installLocalSheets: function () {\n var sheets = this.sheets.filter(function(s) {\n return !s.hasAttribute(SCOPE_ATTR);\n });\n var content = this.templateContent();\n if (content) {\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(selector).array();\n nodes = nodes.concat(templateNodes);\n }\n return matcher ? nodes.filter(matcher) : nodes;\n },\n /**\n * Promotes external stylesheets and <style> elements with the attribute \n * polymer-scope='global' into global scope.\n * This is particularly useful for defining @keyframe rules which \n * currently do not function in scoped or shadow style elements.\n * (See wkb.ug/72462)\n * @param elementElement The <element> element to style.\n */\n // TODO(sorvell): remove when wkb.ug/72462 is addressed.\n installGlobalStyles: function() {\n var style = this.styleForScope(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 matchesSelector(s, selector);\n };\n var sheets = this.sheets.filter(matcher);\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 cssText;\n },\n styleForScope: function(scopeDescriptor) {\n var cssText = this.cssTextForScope(scopeDescriptor);\n return this.cssTextToScopeStyle(cssText, scopeDescriptor);\n },\n cssTextToScopeStyle: function(cssText, scopeDescriptor) {\n if (cssText) {\n var style = createStyleElement(cssText);\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 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 (hasShadowDOMPolyfill) {\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-document-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(sorvell): probably too brittle; try to figure out \n // where to put the element.\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 createStyleElement(cssText, scope) {\n scope = scope || document;\n scope = scope.createElement ? scope : scope.ownerDocument;\n var style = scope.createElement('style');\n style.textContent = cssText;\n return style;\n }\n\n function cssTextFromSheet(sheet) {\n return (sheet && sheet.__resource) || '';\n }\n\n function matchesSelector(node, inSelector) {\n if (matches) {\n return matches.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 = styles;\n scope.applyStyleToScope = applyStyleToScope;\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://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(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: events feature\n\n var mixedCaseEventTypes = {};\n [\n 'webkitAnimationStart',\n 'webkitAnimationEnd',\n 'webkitTransitionEnd',\n 'DOMFocusOut',\n 'DOMFocusIn',\n 'DOMMouseScroll'\n ].forEach(function(e) {\n mixedCaseEventTypes[e.toLowerCase()] = e;\n });\n\n var events = {\n parseHostEvents: function() {\n // our delegates map\n var delegates = this.prototype.eventDelegates;\n // extract data from attributes into delegates\n this.addAttributeDelegates(delegates);\n },\n addAttributeDelegates: function(delegates) {\n // for each attribute\n for (var i=0, a; a=this.attributes[i]; i++) {\n // does it have magic marker identifying it as an event delegate?\n if (this.hasEventPrefix(a.name)) {\n // if so, add the info to delegates\n delegates[this.removeEventPrefix(a.name)] = a.value.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 removeEventPrefix: function(n) {\n return n.slice(prefixLength);\n },\n findController: function(node) {\n while (node.parentNode) {\n if (node.eventController) {\n return node.eventController;\n }\n node = node.parentNode;\n }\n return node.host;\n },\n getEventHandler: 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(controller, method, args);\n };\n },\n prepareEventBinding: function(pathString, name, node) {\n if (!this.hasEventPrefix(name))\n return;\n\n var eventType = this.removeEventPrefix(name);\n eventType = mixedCaseEventTypes[eventType] || eventType;\n\n var events = this;\n\n return function(model, node, oneTime) {\n var handler = events.getEventHandler(undefined, node, pathString);\n PolymerGestures.addEventListener(node, 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, NodeBind is going to setAttribute back to its\n // current value. Fixing this would mean changing the TemplateBinding\n // binding delegate API.\n function bindingValue() {\n return '{{ ' + pathString + ' }}';\n }\n\n return {\n open: bindingValue,\n discardChanges: bindingValue,\n close: function() {\n PolymerGestures.removeEventListener(node, eventType, handler);\n }\n };\n };\n }\n };\n\n var prefixLength = EVENT_PREFIX.length;\n\n // exports\n scope.api.declaration.events = events;\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://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(function(scope) {\n\n // element api\n\n var properties = {\n inferObservers: function(prototype) {\n // called before prototype.observe is 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] = observe[property] || n;\n }\n }\n },\n explodeObservers: function(prototype) {\n // called before prototype.observe is chained to inherited object\n var o = prototype.observe;\n if (o) {\n var exploded = {};\n for (var n in o) {\n var names = n.split(' ');\n for (var i=0, ni; ni=names[i]; i++) {\n exploded[ni] = o[n];\n }\n }\n prototype.observe = exploded;\n }\n },\n optimizePropertyMaps: function(prototype) {\n if (prototype.observe) {\n // construct name list\n var a = prototype._observeNames = [];\n for (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 list\n var a = prototype._publishNames = [];\n for (var n in prototype.publish) {\n a.push(n);\n }\n }\n if (prototype.computed) {\n // construct name list\n var a = prototype._computedNames = [];\n for (var n in prototype.computed) {\n a.push(n);\n }\n }\n },\n publishProperties: function(prototype, base) {\n // if we have any properties to publish\n var publish = prototype.publish;\n if (publish) {\n // transcribe `publish` entries onto own prototype\n this.requireProperties(publish, prototype, base);\n // construct map of lower-cased property names\n prototype._publishLC = this.lowerCaseMap(publish);\n }\n },\n //\n // `name: value` entries in the `publish` object may need to generate \n // matching properties on the prototype.\n //\n // Values that are objects may have a `reflect` property, which\n // signals that the value describes property control metadata.\n // In metadata objects, the prototype default value (if any)\n // is encoded in the `value` property.\n //\n // publish: {\n // foo: 5, \n // bar: {value: true, reflect: true},\n // zot: {}\n // }\n //\n // `reflect` metadata property controls whether changes to the property\n // are reflected back to the attribute (default false). \n //\n // A value is stored on the prototype unless it's === `undefined`,\n // in which case the base chain is checked for a value.\n // If the basal value is also undefined, `null` is stored on the prototype.\n //\n // The reflection data is stored on another prototype object, `reflect`\n // which also can be specified directly.\n //\n // reflect: {\n // foo: true\n // }\n //\n requireProperties: function(propertyInfos, prototype, base) {\n // per-prototype storage for reflected properties\n prototype.reflect = prototype.reflect || {};\n // ensure a prototype value for each property\n // and update the property's reflect to attribute status\n for (var n in propertyInfos) {\n var value = propertyInfos[n];\n // value has metadata if it has a `reflect` property\n if (value && value.reflect !== undefined) {\n prototype.reflect[n] = Boolean(value.reflect);\n value = value.value;\n }\n // only set a value if one is specified\n if (value !== undefined) {\n prototype[n] = value;\n }\n }\n },\n lowerCaseMap: function(properties) {\n var map = {};\n for (var n in properties) {\n map[n.toLowerCase()] = n;\n }\n return map;\n },\n createPropertyAccessor: function(name) {\n var proto = this.prototype;\n\n var privateName = name + '_';\n var privateObservable = name + 'Observable_';\n proto[privateName] = proto[name];\n\n Object.defineProperty(proto, name, {\n get: function() {\n var observable = this[privateObservable];\n if (observable)\n observable.deliver();\n\n return this[privateName];\n },\n set: function(value) {\n var observable = this[privateObservable];\n if (observable) {\n observable.setValue(value);\n return;\n }\n\n var oldValue = this[privateName];\n this[privateName] = value;\n this.emitPropertyChangeRecord(name, value, oldValue);\n\n return value;\n },\n configurable: true\n });\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 this.createPropertyAccessor(n);\n }\n }\n var n$ = prototype._computedNames;\n if (n$ && n$.length) {\n for (var i=0, l=n$.length, n, fn; (i<l) && (n=n$[i]); i++) {\n this.createPropertyAccessor(n);\n }\n }\n }\n };\n\n // exports\n\n scope.api.declaration.properties = properties;\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://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(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: function(prototype) {\n // chain our lower-cased publish map to the inherited version\n this.inheritObject(prototype, 'publishLC');\n // chain our instance attributes map to the inherited version\n this.inheritObject(prototype, '_instanceAttributes');\n },\n\n publishAttributes: function(prototype, base) {\n // merge names from 'attributes' attribute into the 'publish' object\n var attributes = this.getAttribute(ATTRIBUTES_ATTRIBUTE);\n if (attributes) {\n // create a `publish` object if needed.\n // the `publish` object is only relevant to this prototype, the \n // publishing logic in `declaration/properties.js` is responsible for\n // managing property values on the prototype chain.\n // TODO(sjmiles): the `publish` object is later chained to it's \n // ancestor object, presumably this is only for \n // reflection or other non-library uses. \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=names.length, n; i<l; i++) {\n // remove excess ws\n n = names[i].trim();\n // looks weird, but causes n to exist on `publish` if it does not;\n // a more careful test would need expensive `in` operator\n if (n && publish[n] === undefined) {\n publish[n] = undefined;\n }\n }\n }\n },\n\n // record clonable attributes from <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 for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) { \n if (this.isInstanceAttribute(a.name)) {\n clonable[a.name] = a.value;\n }\n }\n },\n\n isInstanceAttribute: function(name) {\n return !this.blackList[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.api.declaration.attributes = attributes;\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://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(function(scope) {\n\n // imports\n var events = scope.api.declaration.events;\n\n var syntax = new PolymerExpressions();\n var 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.prepareBinding = function(pathString, name, node) {\n return events.prepareEventBinding(pathString, name, node) ||\n prepareBinding.call(syntax, pathString, name, node);\n };\n\n // declaration api supporting mdv\n var mdv = {\n syntax: syntax,\n fetchTemplate: function() {\n return this.querySelector('template');\n },\n templateContent: function() {\n var template = this.fetchTemplate();\n return template && Platform.templateContent(template);\n },\n installBindingDelegate: function(template) {\n if (template) {\n template.bindingDelegate = this.syntax;\n }\n }\n };\n\n // exports\n scope.api.declaration.mdv = mdv;\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://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(function(scope) {\n\n // imports\n \n var api = scope.api;\n var isBase = scope.isBase;\n var extend = scope.extend;\n\n var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;\n\n // prototype api\n\n var prototype = {\n\n register: function(name, extendeeName) {\n // build prototype combining extendee, Polymer base, and named api\n this.buildPrototype(name, extendeeName);\n // register our custom element with the platform\n this.registerPrototype(name, extendeeName);\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 declarative features\n this.desugarBeforeChaining(extension, base);\n // join prototypes\n this.prototype = this.chainPrototypes(extension, base);\n // more declarative features\n this.desugarAfterChaining(name, extendeeName);\n },\n\n desugarBeforeChaining: function(prototype, base) {\n // back reference declaration element\n // TODO(sjmiles): replace `element` 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: 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(chained);\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 reflect object to inherited\n this.inheritObject('reflect', prototype, base);\n // chain our lower-cased publish 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('eventDelegates', prototype, base);\n },\n\n // implement various declarative features\n desugarAfterChaining: function(name, extendee) {\n // build side-chained lists to optimize iterations\n this.optimizePropertyMaps(this.prototype);\n this.createPropertyAccessors(this.prototype);\n // install mdv delegate on template\n this.installBindingDelegate(this.fetchTemplate());\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-* delegates declared 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.addResolvePathApi();\n // under ShadowDOMPolyfill, transforms to approximate missing CSS features\n if (hasShadowDOMPolyfill) {\n Platform.ShadowCSS.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: function(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 base api in inheritance chain (if needed)\n prototype = this.ensureBaseApi(prototype);\n // memoize this base\n memoizedBases[extnds] = prototype;\n }\n return prototype;\n },\n\n findBasePrototype: function(name) {\n return memoizedBases[name];\n },\n\n // install Polymer instance api into prototype chain, as needed \n ensureBaseApi: function(prototype) {\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(sjmiles): sharing methods across prototype chains is\n // not supported by 'super' implementation which optimizes\n // by memoizing prototype relationships.\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 // installed is called `mixinSuper` and the mixin method\n // must use 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].apply(this, args);\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 inheritObject: function(name, prototype, base) {\n // require an object\n var source = prototype[name] || {};\n // chain inherited properties onto a new 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 prototype: this.prototype\n }\n // native element must be specified 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: function(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, inherited) {\n if (object && inherited && object !== inherited) {\n object.__proto__ = inherited;\n }\n return object;\n }\n } else {\n prototype.chainObject = function(object, inherited) {\n if (object && inherited && 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 prototype\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(prototype);\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 (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://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(function(scope) {\n\n /*\n\n Elements are added to a registration queue so that they register in \n the proper order at the appropriate time. We do this for a few reasons:\n\n * to enable elements to load resources (like stylesheets) \n asynchronously. We need to do this until the platform provides an efficient\n alternative. One issue is that remote @import stylesheets are \n re-fetched whenever stamped into a shadowRoot.\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 upgrade (aka domReady). This is a performance tradeoff. On the one hand,\n elements 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 incremental 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\n // tell the queue to wait for an element to be ready\n wait: function(element) {\n if (!element.__queue) {\n element.__queue = {};\n elements.push(element);\n }\n },\n\n // enqueue an element to the next spot in the queue.\n enqueue: function(element, check, go) {\n var shouldAdd = element.__queue && !element.__queue.check;\n if (shouldAdd) {\n queueForElement(element).push(element);\n element.__queue.check = check;\n element.__queue.go = go;\n }\n return (this.indexOf(element) !== 0);\n },\n\n indexOf: function(element) {\n var i = queueForElement(element).indexOf(element);\n if (i >= 0 && document.contains(element)) {\n i += (HTMLImports.useNative || HTMLImports.ready) ? \n importQueue.length : 1e9;\n }\n return i; \n },\n\n // tell the queue an element is ready to be registered\n go: function(element) {\n var readied = this.remove(element);\n if (readied) {\n element.__queue.flushable = true;\n this.addToFlushQueue(readied);\n this.check();\n }\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\n check: function() {\n // next\n var element = this.nextElement();\n if (element) {\n element.__queue.check.call(element);\n }\n if (this.canReady()) {\n this.ready();\n return true;\n }\n },\n\n nextElement: function() {\n return nextQueued();\n },\n\n canReady: function() {\n return !this.waitToReady && this.isEmpty();\n },\n\n isEmpty: function() {\n for (var i=0, l=elements.length, e; (i<l) && \n (e=elements[i]); i++) {\n if (e.__queue && !e.__queue.flushable) {\n return;\n }\n }\n return true;\n },\n\n addToFlushQueue: function(element) {\n flushQueue.push(element); \n },\n\n flush: function() {\n // prevent re-entrance\n if (this.flushing) {\n return;\n }\n this.flushing = true;\n var element;\n while (flushQueue.length) {\n element = flushQueue.shift();\n element.__queue.go.call(element);\n element.__queue = null;\n }\n this.flushing = false;\n },\n\n ready: function() {\n this.flush();\n // TODO(sorvell): As an optimization, turn off CE polyfill upgrading\n // while registering. This way we avoid having to upgrade each document\n // piecemeal per registration and can instead register all elements\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 polyfill.\n if (CustomElements.ready === false) {\n CustomElements.upgradeDocumentTree(document);\n CustomElements.ready = true;\n }\n Platform.flush();\n requestAnimationFrame(this.flushReadyCallbacks);\n },\n\n addReadyCallback: function(callback) {\n if (callback) {\n readyCallbacks.push(callback);\n }\n },\n\n flushReadyCallbacks: function() {\n if (readyCallbacks) {\n var fn;\n while (readyCallbacks.length) {\n fn = readyCallbacks.shift();\n fn();\n }\n }\n },\n\n waitToReady: true\n\n };\n\n var elements = [];\n var flushQueue = [];\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 importQueue.length ? importQueue[0] : mainQueue[0];\n }\n\n var polymerReadied = false; \n\n document.addEventListener('WebComponentsReady', function() {\n CustomElements.ready = false;\n });\n \n function whenPolymerReady(callback) {\n queue.waitToReady = true;\n CustomElements.ready = false;\n HTMLImports.whenImportsReady(function() {\n queue.addReadyCallback(callback);\n queue.waitToReady = false;\n queue.check();\n });\n }\n\n // exports\n scope.elements = elements;\n scope.queue = queue;\n scope.whenReady = scope.whenPolymerReady = whenPolymerReady;\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://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(function(scope) {\n\n var whenPolymerReady = scope.whenPolymerReady;\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 = document.createElement('link');\n link.rel = 'import';\n link.href = url;\n frag.appendChild(link);\n }\n importElements(frag, 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 (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://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(function(scope) {\n\n // imports\n\n var extend = scope.extend;\n var api = scope.api;\n var queue = scope.queue;\n var whenPolymerReady = scope.whenPolymerReady;\n var getRegisteredPrototype = scope.getRegisteredPrototype;\n var waitingForPrototype = scope.waitingForPrototype;\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 queue.wait(this);\n // initiate any async resource fetches\n this.loadResources();\n // register when all constraints are met\n this.registerWhenReady();\n },\n\n // TODO(sorvell): we currently queue in the order the prototypes are \n // registered, but we should queue in the order that polymer-elements\n // are registered. We are currently blocked from doing this based on \n // crbug.com/395686.\n registerWhenReady: function() {\n if (this.registered\n || this.waitingForPrototype(this.name)\n || this.waitingForQueue()\n || this.waitingForResources()) {\n return;\n }\n queue.go(this);\n },\n\n _register: function() {\n //console.log('registering', this.name);\n // warn if extending from a custom element not registered via Polymer\n if (isCustomTag(this.extends) && !isRegistered(this.extends)) {\n console.warn('%s is attempting to extend %s, an unregistered element ' +\n 'or one that was not registered with Polymer.', this.name,\n this.extends);\n }\n this.register(this.name, this.extends);\n this.registered = true;\n },\n\n waitingForPrototype: function(name) {\n if (!getRegisteredPrototype(name)) {\n // then wait for a prototype\n waitingForPrototype(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 explicitly marked as 'noscript'\n if (this.hasAttribute('noscript') && !this.noscript) {\n this.noscript = true;\n // imperative element registration\n Polymer(name);\n }\n },\n\n waitingForResources: 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 waitingForQueue: function() {\n return queue.enqueue(this, this.registerWhenReady, this._register);\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 decoupled, currently\n // the various plugins are allowed to depend on each other directly)\n api.publish(api.declaration, prototype);\n\n // utility and bookkeeping\n\n function isRegistered(name) {\n return Boolean(HTMLElement.getPrototypeForTag(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.dispatchEvent(\n new CustomEvent('polymer-ready', {bubbles: true})\n );\n });\n\n // register polymer-element with document\n\n document.registerElement('polymer-element', {prototype: prototype});\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://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/**\n * The `auto-binding` element extends the template 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 model and controller for the \n * elements it contains. Both data and event handlers can be bound. \n *\n * The `auto-binding` element acts just like a template that 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 something: <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.createElement('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-ready so that auto-binding is not\n // required to load last.\n Polymer.whenPolymerReady(function() {\n this.model = this;\n this.setAttribute('bind', '');\n // we don't bother with an explicit signal here, we could 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.parentNode);\n // template stamping is asynchronous so stamping isn't complete\n // by polymer-ready; fire an event so users can use stamped elements\n this.fire('template-bound');\n });\n }.bind(this));\n },\n\n makeSyntax: function() {\n var events = Object.create(Polymer.api.declaration.events);\n var self = this;\n events.findController = function() { return self.model; };\n\n var syntax = new PolymerExpressions();\n var prepareBinding = syntax.prepareBinding; \n syntax.prepareBinding = function(pathString, name, node) {\n return events.prepareEventBinding(pathString, name, node) ||\n prepareBinding.call(syntax, pathString, name, node);\n };\n return syntax;\n }\n\n });\n\n})();\n"]}
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/.bower.json b/third_party/polymer/components/core-iconset-svg/.bower.json index 81af334..ebf9400 100644 --- a/third_party/polymer/components/core-iconset-svg/.bower.json +++ b/third_party/polymer/components/core-iconset-svg/.bower.json @@ -1,20 +1,19 @@ { - "name": "core-iconset", + "name": "core-iconset-svg", "private": true, "dependencies": { "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0" }, - "homepage": "https://github.com/Polymer/core-iconset", + "homepage": "https://github.com/Polymer/core-iconset-svg", "version": "0.3.5", "_release": "0.3.5", "_resolution": { "type": "version", "tag": "0.3.5", - "commit": "76bf6beb0e7ffc1b67485ab2dc13b188915e8233" + "commit": "383b57cc78b2065c113e839713b0b97688f6bade" }, - "_source": "git://github.com/Polymer/core-iconset.git", + "_source": "git://github.com/Polymer/core-iconset-svg.git", "_target": "0.3.5", - "_originalSource": "Polymer/core-iconset" + "_originalSource": "Polymer/core-iconset-svg" }
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/README.md b/third_party/polymer/components/core-iconset-svg/README.md index 7a3a217..5e4b048 100644 --- a/third_party/polymer/components/core-iconset-svg/README.md +++ b/third_party/polymer/components/core-iconset-svg/README.md @@ -1,4 +1,4 @@ -core-iconset -============ +core-iconset-svg +========= -See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset) for more information. +See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-iconset-svg) for more information. diff --git a/third_party/polymer/components/core-iconset-svg/bower.json b/third_party/polymer/components/core-iconset-svg/bower.json index d783d98..50978ac 100644 --- a/third_party/polymer/components/core-iconset-svg/bower.json +++ b/third_party/polymer/components/core-iconset-svg/bower.json @@ -1,9 +1,8 @@ { - "name": "core-iconset", + "name": "core-iconset-svg", "private": true, "dependencies": { "polymer": "Polymer/polymer#>=0.3.0 <1.0.0", - "core-meta": "Polymer/core-meta#>=0.3.0 <1.0.0", - "core-icon": "Polymer/core-icon#>=0.3.0 <1.0.0" + "core-iconset": "Polymer/core-iconset#>=0.3.0 <1.0.0" } }
\ No newline at end of file diff --git a/third_party/polymer/components/core-iconset-svg/core-iconset-svg.html b/third_party/polymer/components/core-iconset-svg/core-iconset-svg.html new file mode 100644 index 0000000..700696d --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/core-iconset-svg.html @@ -0,0 +1,168 @@ +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<!-- +/** + * @group Polymer Core Elements + * + * The `core-iconset-svg` element allows users to define their own icon sets + * that contain svg icons. The svg icon elements should be children of the + * `core-iconset-svg` element. Multiple icons should be given distinct id's. + * + * Using svg elements to create icons has a few advantages over traditional + * bitmap graphics like jpg or png. Icons that use svg are vector based so they + * are resolution independent and should look good on any device. They are + * stylable via css. Icons can be themed, colorized, and even animated. + * + * Example: + * + * <core-iconset-svg id="my-svg-icons" iconSize="24"> + * <svg> + * <defs> + * <g id="shape"> + * <rect x="50" y="50" width="50" height="50" /> + * <circle cx="50" cy="50" r="50" /> + * </g> + * </defs> + * </svg> + * </core-iconset-svg> + * + * This will automatically register the icon set "my-svg-icons" to the iconset + * database. To use these icons from within another element, make a + * `core-iconset` element and call the `byId` method + * to retrieve a given iconset. To apply a particular icon inside an + * element use the `applyIcon` method. For example: + * + * iconset.applyIcon(iconNode, 'car'); + * + * @element core-iconset-svg + * @extends core-meta + * @homepage github.io + */ +--> + +<link rel="import" href="../core-iconset/core-iconset.html"> + +<polymer-element name="core-iconset-svg" extends="core-meta" attributes="iconSize"> + + <script> + + Polymer('core-iconset-svg', { + + + /** + * The size of an individual icon. Note that icons must be square. + * + * @attribute iconSize + * @type number + * @default 24 + */ + iconSize: 24, + type: 'iconset', + + created: function() { + this._icons = {}; + }, + + ready: function() { + this.super(); + this.updateIcons(); + }, + + iconById: function(id) { + return this._icons[id] || (this._icons[id] = this.querySelector('#' + id)); + }, + + cloneIcon: function(id) { + var icon = this.iconById(id); + if (icon) { + var content = icon.cloneNode(true); + content.removeAttribute('id'); + var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); + svg.setAttribute('viewBox', '0 0 ' + this.iconSize + ' ' + + this.iconSize); + // NOTE(dfreedm): work around https://crbug.com/370136 + svg.style.pointerEvents = 'none'; + svg.appendChild(content); + return svg; + } + }, + + get iconNames() { + if (!this._iconNames) { + this._iconNames = this.findIconNames(); + } + return this._iconNames; + }, + + findIconNames: function() { + var icons = this.querySelectorAll('[id]').array(); + if (icons.length) { + return icons.map(function(n){ return n.id }); + } + }, + + /** + * Applies an icon to the given element. The svg icon is added to the + * element's shadowRoot if one exists or directly to itself. + * + * @method applyIcon + * @param {Element} element The element to which the icon is + * applied. + * @param {String|Number} icon The name the icon to apply. + * @return {Element} The icon element + */ + applyIcon: function(element, icon) { + var root = element; + // remove old + var old = root.querySelector('svg'); + if (old) { + old.remove(); + } + // install new + var svg = this.cloneIcon(icon); + if (!svg) { + return; + } + svg.setAttribute('height', '100%'); + svg.setAttribute('width', '100%'); + svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); + svg.style.display = 'block'; + root.insertBefore(svg, root.firstElementChild); + return svg; + }, + + /** + * Tell users of the iconset, that the set has loaded. + * This finds all elements matching the selector argument and calls + * the method argument on them. + * @method updateIcons + * @param selector {string} css selector to identify iconset users, + * defaults to '[icon]' + * @param method {string} method to call on found elements, + * defaults to 'updateIcon' + */ + updateIcons: function(selector, method) { + selector = selector || '[icon]'; + method = method || 'updateIcon'; + var deep = window.ShadowDOMPolyfill ? '' : 'html /deep/ '; + var i$ = document.querySelectorAll(deep + selector); + for (var i=0, e; e=i$[i]; i++) { + if (e[method]) { + e[method].call(e); + } + } + } + + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-iconset-svg/demo.html b/third_party/polymer/components/core-iconset-svg/demo.html index 82ea67a..5995cd6 100644 --- a/third_party/polymer/components/core-iconset-svg/demo.html +++ b/third_party/polymer/components/core-iconset-svg/demo.html @@ -11,52 +11,56 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN <html> <head> - <title>core-iconset</title> - + <title>core-iconset-svg</title> <script src="../platform/platform.js"></script> - <link rel="import" href="core-iconset.html"> - <link rel="import" href="../core-icon/core-icon.html"> - -</head> -<body unresolved> - - <!-- Register an icon set; you can do this anywhere, including an HTMLImport! --> - <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <core-iconset id="my-icons-big" src="my-icons-big.png" width="192" iconSize="48" - icons="location place starta stopb bus car train walk"> - </core-iconset> - - <!-- Now create a bunch of icons using our iconset --> - <core-icon icon="my-icons:location"></core-icon> - <core-icon icon="my-icons:place"></core-icon> - <core-icon icon="my-icons:starta"></core-icon> - <core-icon icon="my-icons:stopb"></core-icon> - <core-icon icon="my-icons:bus"></core-icon> - <core-icon icon="my-icons:car"></core-icon> - <core-icon icon="my-icons:train"></core-icon> - <core-icon icon="my-icons:walk"></core-icon> - <br> - <!-- icons may also be specified by index --> - <style> + <link rel="import" href="svg-sample-icons.html"> + <style shim-shadowdom> .embiggen core-icon { - width: 48px; - height: 48px; + height: 128px; + width: 128px; + } + + core-icon:nth-of-type(1) { + fill: orange; + } + + core-icon:nth-of-type(2) { + fill: green; + stroke: orange; + } + + core-icon:nth-of-type(3) { + fill: navy; + } + + core-icon { + transition: all 0.5s; + -webkit-transition: all 0.5s; + } + + core-icon:hover { + -webkit-filter: drop-shadow( 2px 2px 2px #333 ); + filter: drop-shadow( 2px 2px 2px #333 ); } </style> +</head> +<body unresolved> - <div class="embiggen"> - <core-icon icon="my-icons-big:0"></core-icon> - <core-icon icon="my-icons-big:1"></core-icon> - <core-icon icon="my-icons-big:2"></core-icon> - <core-icon icon="my-icons-big:3"></core-icon> - <core-icon icon="my-icons-big:4"></core-icon> - <core-icon icon="my-icons-big:5"></core-icon> - <core-icon icon="my-icons-big:6"></core-icon> - <core-icon icon="my-icons-big:7"></core-icon> - </div> - - </body> + <template is="auto-binding"> + <div class="embiggen"> + <template repeat="{{icon in icons}}"> + <core-icon icon="{{icon}}"></core-icon> + </template> + </div> + <core-meta id="meta" type="iconset"></core-meta> + </template> + <script> + addEventListener('template-bound', function(e) { + var template = e.target; + var setName = 'svg-sample-icons'; + var icons = template.$.meta.byId(setName).iconNames; + template.icons = icons.map(function(ic){ return setName + ':' +ic }); + }); + </script> +</body> </html> diff --git a/third_party/polymer/components/core-iconset-svg/svg-sample-icons.html b/third_party/polymer/components/core-iconset-svg/svg-sample-icons.html new file mode 100644 index 0000000..9f5ef3d --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/svg-sample-icons.html @@ -0,0 +1,68 @@ + +<!-- +Copyright (c) 2014 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../core-icon/core-icon.html"> +<link rel="import" href="core-iconset-svg.html"> + +<core-iconset-svg id="svg-sample-icons" iconSize="100"> + <svg> + <defs> + <g id="codepen"> + <path class="outer-ring" d="M50,0C22.385,0,0,22.385,0,50c0,27.615,22.385,50,50,50c27.614,0,50-22.385,50-50C100,22.385,77.615,0,50,0z M50,91.789 + C26.958,91.789,8.212,73.042,8.212,50C8.212,26.958,26.958,8.212,50,8.212c23.042,0,41.788,18.747,41.788,41.789 + C91.788,73.042,73.042,91.789,50,91.789z"></path> + <path class="inner-logo" d="M80.893,40.234c-0.006-0.039-0.016-0.076-0.022-0.115c-0.013-0.075-0.027-0.15-0.046-0.223 + c-0.012-0.044-0.028-0.086-0.042-0.128c-0.021-0.065-0.042-0.13-0.068-0.193c-0.018-0.044-0.039-0.088-0.059-0.13 + c-0.028-0.06-0.057-0.119-0.09-0.175c-0.024-0.042-0.051-0.083-0.076-0.124c-0.036-0.055-0.073-0.109-0.112-0.161 + c-0.029-0.039-0.06-0.078-0.091-0.115c-0.042-0.049-0.086-0.098-0.132-0.143c-0.035-0.036-0.069-0.072-0.106-0.104 + c-0.049-0.044-0.099-0.086-0.15-0.127c-0.04-0.031-0.079-0.062-0.12-0.091c-0.016-0.01-0.029-0.023-0.044-0.033L51.474,19.531 + c-0.893-0.595-2.055-0.595-2.947,0L20.267,38.371c-0.015,0.01-0.028,0.023-0.044,0.033c-0.042,0.029-0.081,0.06-0.12,0.091 + c-0.052,0.041-0.102,0.083-0.15,0.127c-0.037,0.032-0.071,0.068-0.106,0.104c-0.046,0.045-0.09,0.094-0.132,0.143 + c-0.031,0.038-0.062,0.077-0.092,0.115c-0.039,0.052-0.076,0.106-0.111,0.161c-0.027,0.041-0.052,0.082-0.076,0.124 + c-0.033,0.057-0.062,0.115-0.09,0.175c-0.021,0.042-0.042,0.086-0.06,0.13c-0.026,0.063-0.047,0.128-0.068,0.193 + c-0.014,0.042-0.029,0.084-0.042,0.128c-0.02,0.073-0.032,0.148-0.046,0.223c-0.006,0.039-0.016,0.076-0.021,0.115 + c-0.016,0.114-0.024,0.229-0.024,0.346V59.42c0,0.117,0.009,0.233,0.024,0.348c0.005,0.038,0.015,0.077,0.021,0.114 + c0.014,0.075,0.027,0.149,0.046,0.223c0.012,0.043,0.028,0.086,0.042,0.128c0.021,0.065,0.042,0.13,0.068,0.195 + c0.018,0.044,0.039,0.086,0.06,0.129c0.028,0.06,0.058,0.118,0.09,0.177c0.024,0.041,0.049,0.082,0.076,0.122 + c0.035,0.056,0.072,0.109,0.111,0.161c0.029,0.041,0.061,0.078,0.092,0.115c0.042,0.049,0.086,0.098,0.132,0.144 + c0.035,0.036,0.069,0.071,0.106,0.104c0.048,0.044,0.099,0.086,0.15,0.127c0.039,0.031,0.078,0.062,0.12,0.091 + c0.016,0.01,0.029,0.023,0.044,0.032l28.259,18.84c0.446,0.297,0.96,0.447,1.474,0.447c0.513,0,1.027-0.149,1.473-0.447 + l28.259-18.84c0.015-0.009,0.028-0.022,0.044-0.032c0.042-0.029,0.081-0.06,0.12-0.091c0.051-0.041,0.102-0.083,0.15-0.127 + c0.037-0.033,0.071-0.068,0.106-0.104c0.046-0.046,0.09-0.095,0.132-0.144c0.031-0.037,0.062-0.075,0.091-0.115 + c0.04-0.052,0.076-0.105,0.112-0.161c0.025-0.041,0.051-0.081,0.076-0.122c0.033-0.059,0.062-0.117,0.09-0.177 + c0.02-0.042,0.041-0.085,0.059-0.129c0.026-0.065,0.047-0.13,0.068-0.195c0.014-0.042,0.03-0.085,0.042-0.128 + c0.02-0.074,0.033-0.148,0.046-0.223c0.006-0.037,0.016-0.076,0.022-0.114c0.014-0.115,0.023-0.231,0.023-0.348V40.581 + C80.916,40.464,80.907,40.348,80.893,40.234z M52.657,26.707l20.817,13.877l-9.298,6.221l-11.519-7.706V26.707z M47.343,26.707 + v12.393l-11.518,7.706l-9.299-6.221L47.343,26.707z M24.398,45.554L31.046,50l-6.648,4.446V45.554z M47.343,73.294L26.525,59.417 + l9.299-6.219l11.518,7.704V73.294z M50,56.286L40.603,50L50,43.715L59.397,50L50,56.286z M52.657,73.294V60.902l11.519-7.704 + l9.298,6.219L52.657,73.294z M75.602,54.447L68.955,50l6.647-4.446V54.447z"></path> + </g> + + <path id="twitter" d="M100.001,17.942c-3.681,1.688-7.633,2.826-11.783,3.339 + c4.236-2.624,7.49-6.779,9.021-11.73c-3.965,2.432-8.354,4.193-13.026,5.146C80.47,10.575,75.138,8,69.234,8 + c-11.33,0-20.518,9.494-20.518,21.205c0,1.662,0.183,3.281,0.533,4.833c-17.052-0.884-32.168-9.326-42.288-22.155 + c-1.767,3.133-2.778,6.773-2.778,10.659c0,7.357,3.622,13.849,9.127,17.65c-3.363-0.109-6.525-1.064-9.293-2.651 + c-0.002,0.089-0.002,0.178-0.002,0.268c0,10.272,7.072,18.845,16.458,20.793c-1.721,0.484-3.534,0.744-5.405,0.744 + c-1.322,0-2.606-0.134-3.859-0.379c2.609,8.424,10.187,14.555,19.166,14.726c-7.021,5.688-15.867,9.077-25.48,9.077 + c-1.656,0-3.289-0.102-4.895-0.297C9.08,88.491,19.865,92,31.449,92c37.737,0,58.374-32.312,58.374-60.336 + c0-0.92-0.02-1.834-0.059-2.743C93.771,25.929,97.251,22.195,100.001,17.942L100.001,17.942z"></path> + + <g id="youtube"> + <path class="youtube" d="M98.77,27.492c-1.225-5.064-5.576-8.799-10.811-9.354C75.561,16.818,63.01,15.993,50.514,16 + c-12.495-0.007-25.045,0.816-37.446,2.139c-5.235,0.557-9.583,4.289-10.806,9.354C0.522,34.704,0.5,42.574,0.5,50.001 + c0,7.426,0,15.296,1.741,22.509c1.224,5.061,5.572,8.799,10.807,9.352c12.399,1.32,24.949,2.145,37.446,2.14 + c12.494,0.005,25.047-0.817,37.443-2.14c5.234-0.555,9.586-4.291,10.81-9.352c1.741-7.213,1.753-15.083,1.753-22.509 + S100.51,34.704,98.77,27.492 M67.549,52.203L43.977,64.391c-2.344,1.213-4.262,0.119-4.262-2.428V38.036 + c0-2.548,1.917-3.644,4.262-2.429l23.572,12.188C69.896,49.008,69.896,50.992,67.549,52.203"></path> + </g> + + </defs> + </svg> +</core-iconset-svg> diff --git a/third_party/polymer/extract_inline_scripts.sh b/third_party/polymer/extract_inline_scripts.sh new file mode 100755 index 0000000..1109c4a --- /dev/null +++ b/third_party/polymer/extract_inline_scripts.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +if [ "$#" -ne 2 ] +then + echo "Usage: $0 <src_dir> <dst_dir>" + echo + echo "Copies <src_dir> to <dst_dir> and extracts all inline scripts from" \ + "Polymer HTML files found in the destination directory to separate JS" \ + "files. A JS file extracted from the file with name 'foo.html' will" \ + "have a name 'foo-extracted.js'. Inclusion of the script file will be" \ + "added to 'foo.html': '<script src=\"foo-extracted.js\"></script>'." + exit 1 +fi + +src="$1" +dst="$2" + +if [ -e "$dst" ] +then + echo "ERROR: '$dst' already exists. Please remove it before running the" \ + "script." 1>&2 + exit 1 +fi + +cp -r "$src" "$dst" +find "$dst" -name "*.html" \ + -not -path "*/demos/*" \ + -not -name "demo*.html" \ + -not -name "index.html" \ + -not -name "metadata.html" | \ +xargs grep -l "<script>" | \ +while read original_html_name +do + dir=$(dirname "$original_html_name") + name=$(basename "$original_html_name" .html) + + html_without_js="$dir/$name-extracted.html" + extracted_js="$dir/$name-extracted.js" + vulcanize -o "$html_without_js" --csp --config vulcanize_config.json \ + "$original_html_name" 1>&2 + mv "$html_without_js" "$original_html_name" +done diff --git a/third_party/polymer/reproduce.sh b/third_party/polymer/reproduce.sh index 5bf0184..9a86b5e 100755 --- a/third_party/polymer/reproduce.sh +++ b/third_party/polymer/reproduce.sh @@ -4,12 +4,20 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# Reproduces the content of 'components' and 'components-chromium' using the +# list of dependencies from 'bower.json'. Downloads needed packages and makes +# Chromium specific modifications. To launch the script you need 'bower' and +# 'vulcanize' to be install in your system. + set -e cd "$(dirname "$0")" -rm -rf components +rm -rf components components-chromium + bower install rm -rf components/web-animations-js find components/core-list -type f -exec chmod -x {} \; +./extract_inline_scripts.sh components components-chromium + diff --git a/third_party/polymer/vulcanize_config.json b/third_party/polymer/vulcanize_config.json new file mode 100644 index 0000000..5bc6d1a --- /dev/null +++ b/third_party/polymer/vulcanize_config.json @@ -0,0 +1,7 @@ +{ + "excludes": { + "imports": [ + "" + ] + } +} |