diff options
author | Pavel Sergeev <dzhioev@chromium.org> | 2014-09-25 19:57:17 +0400 |
---|---|---|
committer | Pavel Sergeev <dzhioev@chromium.org> | 2014-09-25 15:58:41 +0000 |
commit | 344b7eb4fc9f09c744d3619167ec8fa3d89deb2f (patch) | |
tree | db63d23763ad7a26670899466a759e456540418c /third_party | |
parent | 3ddca850a10976e7be7bc2bed5ffa394fa96b1a3 (diff) | |
download | chromium_src-344b7eb4fc9f09c744d3619167ec8fa3d89deb2f.zip chromium_src-344b7eb4fc9f09c744d3619167ec8fa3d89deb2f.tar.gz chromium_src-344b7eb4fc9f09c744d3619167ec8fa3d89deb2f.tar.bz2 |
Polymer elements added to third_party/polymer.
List of changes:
* Added all core-elements and paper-elements provided by Polymer.
* Components moved to 'components' subdirectory.
* Added a presubmit check verifying that the list of dependencies from
bower.json and the list of components installed to 'components' are the same.
(see README.chromium for details).
* Updated README.chromium
* Updated pathes to polymer.js and platform.js in projects that use them.
web-animations-js library will be added to the repository
later. Here is a list of components depending on web-animations-js:
* core-animation/core-animation-group.html
* core-animation/core-animation.html
* core-animation/web-animations.html
* paper-menu-button/paper-menu-button.html
* paper-menu-button/paper-menu-button-transition.html
This CL doesn't change polymer and platform components.
Landed manually, because of the bug in the commit queue (http://crbug.com/416255).
BUG=415696
R=mtomasz@chromium.org, raymes@chromium.org, rsadam@chromium.org, thestig@chromium.org
TBR=cpu
Review URL: https://codereview.chromium.org/582873003
Cr-Commit-Position: refs/heads/master@{#296712}
Diffstat (limited to 'third_party')
527 files changed, 31080 insertions, 103 deletions
diff --git a/third_party/polymer/.bowerrc b/third_party/polymer/.bowerrc index cdcad8a..1d83b67 100644 --- a/third_party/polymer/.bowerrc +++ b/third_party/polymer/.bowerrc @@ -1,3 +1,3 @@ { - "directory:" : "." + "directory:" : "components" } diff --git a/third_party/polymer/LICENSE b/third_party/polymer/LICENSE.polymer index 92d60b0..92d60b0 100644 --- a/third_party/polymer/LICENSE +++ b/third_party/polymer/LICENSE.polymer diff --git a/third_party/polymer/PRESUBMIT.py b/third_party/polymer/PRESUBMIT.py new file mode 100644 index 0000000..cc99f2b --- /dev/null +++ b/third_party/polymer/PRESUBMIT.py @@ -0,0 +1,56 @@ +# 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. + +"""Chromium presubmit script for third_party/polymer. + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts +for more details on the presubmit API built into gcl. +""" + +import os +import json + +def _CheckBowerDependencies(input_api, output_api): + os_path = input_api.os_path + cwd = input_api.PresubmitLocalPath() + components_dir = os_path.join(cwd, 'components') + bower_json_path = os_path.join(cwd, 'bower.json') + + for f in input_api.AffectedFiles(include_dirs=True): + p = f.AbsoluteLocalPath() + if p == bower_json_path or p.startswith(components_dir): + break + else: + return [] + + bower_dependencies = \ + set(json.load(open(bower_json_path))['dependencies'].keys()) + installed_components = set(p for p in os.listdir(components_dir)) + # Add web-animations-js because we keep it in a separate directory + # '../third_party/web-animations-js'. + installed_components.add('web-animations-js') + + if bower_dependencies == installed_components: + return [] + + problems = [] + + if installed_components - bower_dependencies: + problems.append(output_api.PresubmitError( + 'Found components that are not listed in bower.json.', + items = list(installed_components - bower_dependencies))) + + if bower_dependencies - installed_components: + problems.append(output_api.PresubmitError( + 'Some of the Bower dependencies are not installed.', + items = list(bower_dependencies - installed_components))) + + return problems + +def CheckChangeOnUpload(input_api, output_api): + return _CheckBowerDependencies(input_api, output_api) + + +def CheckChangeOnCommit(input_api, output_api): + return _CheckBowerDependencies(input_api, output_api) diff --git a/third_party/polymer/README.chromium b/third_party/polymer/README.chromium index 9a8d6d4..3490cc3 100644 --- a/third_party/polymer/README.chromium +++ b/third_party/polymer/README.chromium @@ -2,9 +2,9 @@ Name: Polymer Short Name: polymer URL: http://www.polymer-project.org Version: 0.3.5 -Revision: (See <component>/.bower.json) +Revision: (See components/<component>/.bower.json) License: BSD -License File: LICENSE +License File: LICENSE.polymer Security Critical: no Description: @@ -12,11 +12,9 @@ This directory contains a copy of the following components which are a part of the Polymer project: -polymer -platform - -The directory can be updated by running "bower update". A now component can be -installed by running "bower install Polymer/<component>". Be sure to add the -.bower.json file to the repository as it includes the revision information of -the polymer component. +-all core elements and their dependencies +-all paper elements and their dependencies +See bower.json for a full list of components. The version can be found in header of polymer/polymer.js. The license can be found in polymer/LICENSE. @@ -31,3 +29,20 @@ browsers begin to implement these new primitives, the polyfill platform layer becomes smaller and better over time. 2. A next-generation web application framework built upon these core technologies called the Polymer. + +Local Modifications: +- Removed executable bit from the files in 'components/core-list'. + +To restore a content of the 'components' and '../third_party/web-animations-js' +directory from scratch, run ./reproduce.sh (requires bower). + +Note on Bower: +The directory can be updated by running "bower update". A new component can be +installed by running "bower install -S Polymer/<component>#version". Be sure to +add the .bower.json file to the repository as it includes the revision +information of the polymer component. +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 e802b88..9b8a138 100644 --- a/third_party/polymer/bower.json +++ b/third_party/polymer/bower.json @@ -2,6 +2,74 @@ "name": "chromium", "private": true, "dependencies": { - "polymer": "Polymer/polymer#0.3.5" + "polymer": "Polymer/polymer#0.3.5", + "platform": "Polymer/platform#0.3.5", + + "core-ajax": "Polymer/core-ajax#0.3.5", + "core-animated-pages": "Polymer/core-animated-pages#0.3.5", + "core-animation": "Polymer/core-animation#0.3.5", + "core-collapse": "Polymer/core-collapse#0.3.5", + "core-component-page": "Polymer/core-component-page#0.3.5", + "core-drag-drop": "Polymer/core-drag-drop#0.3.5", + "core-drawer-panel": "Polymer/core-drawer-panel#0.3.5", + "core-dropdown": "Polymer/core-dropdown#0.3.5", + "core-field": "Polymer/core-field#0.3.5", + "core-header-panel": "Polymer/core-header-panel#0.3.5", + "core-icon-button": "Polymer/core-icon-button#0.3.5", + "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-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", + "core-layout": "Polymer/core-layout#0.3.5", + "core-layout-trbl": "Polymer/core-layout-trbl#0.3.5", + "core-list": "Polymer/core-list#0.3.5", + "core-localstorage": "Polymer/core-localstorage#0.3.5", + "core-media-query": "Polymer/core-media-query#0.3.5", + "core-menu-button": "Polymer/core-menu-button#0.3.5", + "core-menu": "Polymer/core-menu#0.3.5", + "core-meta": "Polymer/core-meta#0.3.5", + "core-overlay": "Polymer/core-overlay#0.3.5", + "core-pages": "Polymer/core-pages#0.3.5", + "core-range": "Polymer/core-range#0.3.5", + "core-scaffold": "Polymer/core-scaffold#0.3.5", + "core-scroll-header-panel": "Polymer/core-scroll-header-panel#0.3.5", + "core-selection": "Polymer/core-selection#0.3.5", + "core-selector": "Polymer/core-selector#0.3.5", + "core-shared-lib": "Polymer/core-shared-lib#0.3.5", + "core-signals": "Polymer/core-signals#0.3.5", + "core-splitter": "Polymer/core-splitter#0.3.5", + "core-style": "Polymer/core-style#0.3.5", + "core-toolbar": "Polymer/core-toolbar#0.3.5", + "core-tooltip": "Polymer/core-tooltip#0.3.5", + "core-transition": "Polymer/core-transition#0.3.5", + + "font-roboto": "Polymer/font-roboto#0.3.5", + + "paper-button": "Polymer/paper-button#0.3.5", + "paper-focusable": "Polymer/paper-focusable#0.3.5", + "paper-checkbox": "Polymer/paper-checkbox#0.3.5", + "paper-dialog": "Polymer/paper-dialog#0.3.5", + "paper-fab": "Polymer/paper-fab#0.3.5", + "paper-icon-button": "Polymer/paper-icon-button#0.3.5", + "paper-input": "Polymer/paper-input#0.3.5", + "paper-item": "Polymer/paper-item#0.3.5", + "paper-menu-button": "Polymer/paper-menu-button#0.3.5", + "paper-progress": "Polymer/paper-progress#0.3.5", + "paper-radio-button": "Polymer/paper-radio-button#0.3.5", + "paper-radio-group": "Polymer/paper-radio-group#0.3.5", + "paper-ripple": "Polymer/paper-ripple#0.3.5", + "paper-shadow": "Polymer/paper-shadow#0.3.5", + "paper-slider": "Polymer/paper-slider#0.3.5", + "paper-tabs": "Polymer/paper-tabs#0.3.5", + "paper-toast": "Polymer/paper-toast#0.3.5", + "paper-toggle-button": "Polymer/paper-toggle-button#0.3.5", + + "web-animations-js": "web-animations/web-animations-js#7605c531e22b9a61b4d708c0bc17793bac1cd7ff" + }, + "resolutions": { + "web-animations-js": "7605c531e22b9a61b4d708c0bc17793bac1cd7ff" } } diff --git a/third_party/polymer/components/core-ajax/.bower.json b/third_party/polymer/components/core-ajax/.bower.json new file mode 100644 index 0000000..149a36e --- /dev/null +++ b/third_party/polymer/components/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/core-ajax/README.md b/third_party/polymer/components/core-ajax/README.md new file mode 100644 index 0000000..a0a4145 --- /dev/null +++ b/third_party/polymer/components/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/core-ajax/bower.json b/third_party/polymer/components/core-ajax/bower.json new file mode 100644 index 0000000..a9cd764 --- /dev/null +++ b/third_party/polymer/components/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/core-ajax/core-ajax.html b/third_party/polymer/components/core-ajax/core-ajax.html new file mode 100644 index 0000000..db841dc --- /dev/null +++ b/third_party/polymer/components/core-ajax/core-ajax.html @@ -0,0 +1,323 @@ +<!-- +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"> +<script> + + 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); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-ajax/core-xhr.html b/third_party/polymer/components/core-ajax/core-xhr.html new file mode 100644 index 0000000..8557aec --- /dev/null +++ b/third_party/polymer/components/core-ajax/core-xhr.html @@ -0,0 +1,115 @@ +<!-- +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> + + <script> + + 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]); + } + } + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-ajax/demo.html b/third_party/polymer/components/core-ajax/demo.html new file mode 100644 index 0000000..b42221d --- /dev/null +++ b/third_party/polymer/components/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/core-component-page/index.html b/third_party/polymer/components/core-ajax/index.html index 58856f3..58856f3 100644 --- a/third_party/polymer/core-component-page/index.html +++ b/third_party/polymer/components/core-ajax/index.html diff --git a/third_party/polymer/components/core-animated-pages/.bower.json b/third_party/polymer/components/core-animated-pages/.bower.json new file mode 100644 index 0000000..9d0932d --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/README.md b/third_party/polymer/components/core-animated-pages/README.md new file mode 100644 index 0000000..3b8f2b19 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/bower.json b/third_party/polymer/components/core-animated-pages/bower.json new file mode 100644 index 0000000..c950d15 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/core-animated-pages.css b/third_party/polymer/components/core-animated-pages/core-animated-pages.css new file mode 100644 index 0000000..9a41b54 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/core-animated-pages.html b/third_party/polymer/components/core-animated-pages/core-animated-pages.html new file mode 100644 index 0000000..bef086d --- /dev/null +++ b/third_party/polymer/components/core-animated-pages/core-animated-pages.html @@ -0,0 +1,427 @@ +<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"> + +<template> + + <link href="core-animated-pages.css" rel="stylesheet"> + + <shadow></shadow> + +</template> + +<script> + + Polymer({ + + 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); + }); + } + } + + }); + +</script> + +</polymer-element> diff --git a/third_party/polymer/components/core-animated-pages/demo.html b/third_party/polymer/components/core-animated-pages/demo.html new file mode 100644 index 0000000..3d949b5 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/grid.html b/third_party/polymer/components/core-animated-pages/demos/grid.html new file mode 100644 index 0000000..f7b0e96 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/list.html b/third_party/polymer/components/core-animated-pages/demos/list.html new file mode 100644 index 0000000..90ed8a3 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/music.html b/third_party/polymer/components/core-animated-pages/demos/music.html new file mode 100644 index 0000000..8cb66e0 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/nested-animated-pages.html b/third_party/polymer/components/core-animated-pages/demos/nested-animated-pages.html new file mode 100644 index 0000000..afe3c3f --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/nested.html b/third_party/polymer/components/core-animated-pages/demos/nested.html new file mode 100644 index 0000000..6d08bd2 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/news.html b/third_party/polymer/components/core-animated-pages/demos/news.html new file mode 100644 index 0000000..1ba5086 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/quiz1-intro.png b/third_party/polymer/components/core-animated-pages/demos/quiz1-intro.png Binary files differnew file mode 100644 index 0000000..8c172a0 --- /dev/null +++ b/third_party/polymer/components/core-animated-pages/demos/quiz1-intro.png diff --git a/third_party/polymer/components/core-animated-pages/demos/quiz1.html b/third_party/polymer/components/core-animated-pages/demos/quiz1.html new file mode 100644 index 0000000..358c7a2 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/shadow.html b/third_party/polymer/components/core-animated-pages/demos/shadow.html new file mode 100644 index 0000000..549c004 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/demos/simple.html b/third_party/polymer/components/core-animated-pages/demos/simple.html new file mode 100644 index 0000000..a28846e --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/index.html b/third_party/polymer/components/core-animated-pages/index.html new file mode 100644 index 0000000..af0fe860 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/metadata.html b/third_party/polymer/components/core-animated-pages/metadata.html new file mode 100644 index 0000000..5756eee --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/cascade-transition.html b/third_party/polymer/components/core-animated-pages/transitions/cascade-transition.html new file mode 100644 index 0000000..ed3e25b --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/core-transition-pages.html b/third_party/polymer/components/core-animated-pages/transitions/core-transition-pages.html new file mode 100644 index 0000000..281d438 --- /dev/null +++ b/third_party/polymer/components/core-animated-pages/transitions/core-transition-pages.html @@ -0,0 +1,175 @@ +<!-- +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"> +<script> + +(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({ + + 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); + } + } + +}); + +})(); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-animated-pages/transitions/cross-fade.html b/third_party/polymer/components/core-animated-pages/transitions/cross-fade.html new file mode 100644 index 0000000..4bfdf02 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/hero-transition.css b/third_party/polymer/components/core-animated-pages/transitions/hero-transition.css new file mode 100644 index 0000000..093b9cb --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/hero-transition.html b/third_party/polymer/components/core-animated-pages/transitions/hero-transition.html new file mode 100644 index 0000000..46aedf2 --- /dev/null +++ b/third_party/polymer/components/core-animated-pages/transitions/hero-transition.html @@ -0,0 +1,267 @@ +<!-- +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"> +<script> +(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({ + + 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); + } + // } + } + + }); + +})(); +</script> +</polymer-element> + +<hero-transition id="hero-transition"></hero-transition> diff --git a/third_party/polymer/components/core-animated-pages/transitions/list-cascade.html b/third_party/polymer/components/core-animated-pages/transitions/list-cascade.html new file mode 100644 index 0000000..986e017 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/scale-up.html b/third_party/polymer/components/core-animated-pages/transitions/scale-up.html new file mode 100644 index 0000000..9724285 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/slide-down.html b/third_party/polymer/components/core-animated-pages/transitions/slide-down.html new file mode 100644 index 0000000..025f71c --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/slide-from-bottom.html b/third_party/polymer/components/core-animated-pages/transitions/slide-from-bottom.html new file mode 100644 index 0000000..50a090b --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/slide-from-right.html b/third_party/polymer/components/core-animated-pages/transitions/slide-from-right.html new file mode 100644 index 0000000..9a847d2 --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/slide-up.html b/third_party/polymer/components/core-animated-pages/transitions/slide-up.html new file mode 100644 index 0000000..33533cf --- /dev/null +++ b/third_party/polymer/components/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/core-animated-pages/transitions/tile-cascade.html b/third_party/polymer/components/core-animated-pages/transitions/tile-cascade.html new file mode 100644 index 0000000..63756f1 --- /dev/null +++ b/third_party/polymer/components/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/core-animation/.bower.json b/third_party/polymer/components/core-animation/.bower.json new file mode 100644 index 0000000..1a84d62 --- /dev/null +++ b/third_party/polymer/components/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/core-animation/README.md b/third_party/polymer/components/core-animation/README.md new file mode 100644 index 0000000..809db5e --- /dev/null +++ b/third_party/polymer/components/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/core-animation/bower.json b/third_party/polymer/components/core-animation/bower.json new file mode 100644 index 0000000..aedb555 --- /dev/null +++ b/third_party/polymer/components/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/core-animation/core-animation-group.html b/third_party/polymer/components/core-animation/core-animation-group.html new file mode 100644 index 0000000..773cffd --- /dev/null +++ b/third_party/polymer/components/core-animation/core-animation-group.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 +--> + +<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"> + <script> + (function() { + + var ANIMATION_GROUPS = { + 'par': AnimationGroup, + 'seq': AnimationSequence + }; + + Polymer({ + + 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; + } + }); + + })(); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-animation/core-animation.html b/third_party/polymer/components/core-animation/core-animation.html new file mode 100644 index 0000000..b480402 --- /dev/null +++ b/third_party/polymer/components/core-animation/core-animation.html @@ -0,0 +1,524 @@ +<!-- +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"> + <script> + (function() { + + function toNumber(value, allowInfinity) { + return (allowInfinity && value === 'Infinity') ? Number.POSITIVE_INFINITY : Number(value); + }; + + Polymer({ + /** + * 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'); + } + + }); + })(); + </script> +</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"> + <script> + Polymer({ + 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; + } + }); + </script> +</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"> + <script> + Polymer({ + 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} + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-animation/demo.html b/third_party/polymer/components/core-animation/demo.html new file mode 100644 index 0000000..b9a1038 --- /dev/null +++ b/third_party/polymer/components/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/core-animation/index.html b/third_party/polymer/components/core-animation/index.html new file mode 100644 index 0000000..6693d17 --- /dev/null +++ b/third_party/polymer/components/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/core-animation/web-animations.html b/third_party/polymer/components/core-animation/web-animations.html new file mode 100644 index 0000000..4cdb1d2 --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/.bower.json b/third_party/polymer/components/core-collapse/.bower.json new file mode 100644 index 0000000..87a0f81 --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/README.md b/third_party/polymer/components/core-collapse/README.md new file mode 100644 index 0000000..bf0a159 --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/bower.json b/third_party/polymer/components/core-collapse/bower.json new file mode 100644 index 0000000..6aee2d1 --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/core-collapse.css b/third_party/polymer/components/core-collapse/core-collapse.css new file mode 100644 index 0000000..5e946ff --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/core-collapse.html b/third_party/polymer/components/core-collapse/core-collapse.html new file mode 100644 index 0000000..494f764 --- /dev/null +++ b/third_party/polymer/components/core-collapse/core-collapse.html @@ -0,0 +1,250 @@ +<!-- +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"> +<template> + + <content></content> + +</template> +<script> + + 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); + }); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-collapse/demo.html b/third_party/polymer/components/core-collapse/demo.html new file mode 100644 index 0000000..8aec94d --- /dev/null +++ b/third_party/polymer/components/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/core-collapse/index.html b/third_party/polymer/components/core-collapse/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-component-page/.bower.json b/third_party/polymer/components/core-component-page/.bower.json index 21e7f87..379aab3 100644 --- a/third_party/polymer/core-component-page/.bower.json +++ b/third_party/polymer/components/core-component-page/.bower.json @@ -14,6 +14,6 @@ "commit": "87617aa1282994eecf5f1f57ef149155ed96f7f1" }, "_source": "git://github.com/Polymer/core-component-page.git", - "_target": ">=0.3.0 <1.0.0", + "_target": "0.3.5", "_originalSource": "Polymer/core-component-page" }
\ No newline at end of file diff --git a/third_party/polymer/core-component-page/README.md b/third_party/polymer/components/core-component-page/README.md index 7cb18ec..7cb18ec 100644 --- a/third_party/polymer/core-component-page/README.md +++ b/third_party/polymer/components/core-component-page/README.md diff --git a/third_party/polymer/components/core-component-page/bowager-logo.png b/third_party/polymer/components/core-component-page/bowager-logo.png Binary files differnew file mode 100644 index 0000000..76be9fb --- /dev/null +++ b/third_party/polymer/components/core-component-page/bowager-logo.png diff --git a/third_party/polymer/core-component-page/bower.json b/third_party/polymer/components/core-component-page/bower.json index 541607b..541607b 100644 --- a/third_party/polymer/core-component-page/bower.json +++ b/third_party/polymer/components/core-component-page/bower.json diff --git a/third_party/polymer/core-component-page/core-component-page.html b/third_party/polymer/components/core-component-page/core-component-page.html index 3c3165c..1a0be8d 100644 --- a/third_party/polymer/core-component-page/core-component-page.html +++ b/third_party/polymer/components/core-component-page/core-component-page.html @@ -3439,7 +3439,7 @@ if (typeof exports === 'object') { }).call(function() { return this || (typeof window !== 'undefined' ? window : global); }()); -</script> +</script>
<!-- @@ -5056,7 +5056,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[ }); } })(); -</script> +</script>
<script>(function(scope) { @@ -5996,10 +5996,10 @@ pre .com,pre .comment,.prettyprint .com,.prettyprint .comment { </script> </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 @@ -6656,7 +6656,7 @@ html /deep/ core-menu::shadow ::content > core-item { Polymer('core-menu',{}); </script> </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 @@ -6760,16 +6760,16 @@ html /deep/ core-item::shadow ::content > a { </script> </polymer-element> - - -<!-- -@class core-doc-toc ---> - -<polymer-element name="core-doc-toc" attributes="data selected" assetpath="../core-doc-viewer/elements/"> - - <template> - +
+
+<!--
+@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; @@ -6781,56 +6781,56 @@ core-header-panel { 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> - - <script> - - 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'; - } - - }); - - </script> - -</polymer-element> + 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>
+
+ <script>
+
+ 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';
+ }
+
+ });
+
+ </script>
+
+</polymer-element>
@@ -7075,7 +7075,7 @@ h2 { } .appbar { - background-color: #E91E63; + background-color: #E91E63;
color: white; } </style> diff --git a/third_party/polymer/core-component-page/demo.html b/third_party/polymer/components/core-component-page/demo.html index 1f5a7b0..fb80e5f 100644 --- a/third_party/polymer/core-component-page/demo.html +++ b/third_party/polymer/components/core-component-page/demo.html @@ -1,23 +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> +<!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/core-component-page/index.html b/third_party/polymer/components/core-component-page/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-drag-drop/.bower.json b/third_party/polymer/components/core-drag-drop/.bower.json new file mode 100644 index 0000000..3769671 --- /dev/null +++ b/third_party/polymer/components/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/core-drag-drop/core-drag-drop.html b/third_party/polymer/components/core-drag-drop/core-drag-drop.html new file mode 100644 index 0000000..ec3a3cd --- /dev/null +++ b/third_party/polymer/components/core-drag-drop/core-drag-drop.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.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"> +<script> + + 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}; + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-drag-drop/demo.html b/third_party/polymer/components/core-drag-drop/demo.html new file mode 100644 index 0000000..387430e --- /dev/null +++ b/third_party/polymer/components/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/core-drag-drop/index.html b/third_party/polymer/components/core-drag-drop/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/.bower.json b/third_party/polymer/components/core-drawer-panel/.bower.json new file mode 100644 index 0000000..0811395 --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/README.md b/third_party/polymer/components/core-drawer-panel/README.md new file mode 100644 index 0000000..16ee436 --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/bower.json b/third_party/polymer/components/core-drawer-panel/bower.json new file mode 100644 index 0000000..a53e2a7 --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/core-drawer-panel.css b/third_party/polymer/components/core-drawer-panel/core-drawer-panel.css new file mode 100644 index 0000000..62cf44b --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/core-drawer-panel.html b/third_party/polymer/components/core-drawer-panel/core-drawer-panel.html new file mode 100644 index 0000000..bd68d94 --- /dev/null +++ b/third_party/polymer/components/core-drawer-panel/core-drawer-panel.html @@ -0,0 +1,273 @@ +<!-- +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"> +<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> +<script> + + 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)'; + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-drawer-panel/demo.html b/third_party/polymer/components/core-drawer-panel/demo.html new file mode 100644 index 0000000..b35febf --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/index.html b/third_party/polymer/components/core-drawer-panel/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-drawer-panel/metadata.html b/third_party/polymer/components/core-drawer-panel/metadata.html new file mode 100644 index 0000000..086d2db --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/.bower.json b/third_party/polymer/components/core-dropdown/.bower.json new file mode 100644 index 0000000..7f671db --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/README.md b/third_party/polymer/components/core-dropdown/README.md new file mode 100644 index 0000000..8344443 --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/bower.json b/third_party/polymer/components/core-dropdown/bower.json new file mode 100644 index 0000000..cd36db2 --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/core-dropdown.css b/third_party/polymer/components/core-dropdown/core-dropdown.css new file mode 100644 index 0000000..ea2a6e3 --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/core-dropdown.html b/third_party/polymer/components/core-dropdown/core-dropdown.html new file mode 100644 index 0000000..1c5ecb7 --- /dev/null +++ b/third_party/polymer/components/core-dropdown/core-dropdown.html @@ -0,0 +1,204 @@ +<!-- +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"> +<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> +<script> + + Polymer({ + + 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; + } + }); + +</script> +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-dropdown/demo.html b/third_party/polymer/components/core-dropdown/demo.html new file mode 100644 index 0000000..2892df4 --- /dev/null +++ b/third_party/polymer/components/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/core-dropdown/index.html b/third_party/polymer/components/core-dropdown/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-field/.bower.json b/third_party/polymer/components/core-field/.bower.json new file mode 100644 index 0000000..d6b1c36 --- /dev/null +++ b/third_party/polymer/components/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/core-field/README.md b/third_party/polymer/components/core-field/README.md new file mode 100644 index 0000000..786008c --- /dev/null +++ b/third_party/polymer/components/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/core-field/bower.json b/third_party/polymer/components/core-field/bower.json new file mode 100644 index 0000000..5c006b0 --- /dev/null +++ b/third_party/polymer/components/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/core-field/core-field.css b/third_party/polymer/components/core-field/core-field.css new file mode 100644 index 0000000..ff597c2 --- /dev/null +++ b/third_party/polymer/components/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/core-field/core-field.html b/third_party/polymer/components/core-field/core-field.html new file mode 100644 index 0000000..d7fc345 --- /dev/null +++ b/third_party/polymer/components/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/core-field/demo.html b/third_party/polymer/components/core-field/demo.html new file mode 100644 index 0000000..886654a --- /dev/null +++ b/third_party/polymer/components/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,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVN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LPY0CFqrEiALNadyYAFd97WxJA6ZpaVAM+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/core-field/index.html b/third_party/polymer/components/core-field/index.html new file mode 100644 index 0000000..4b2f63c --- /dev/null +++ b/third_party/polymer/components/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/core-field/metadata.html b/third_party/polymer/components/core-field/metadata.html new file mode 100644 index 0000000..e8f9649 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/.bower.json b/third_party/polymer/components/core-header-panel/.bower.json new file mode 100644 index 0000000..bc8dfbe --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/README.md b/third_party/polymer/components/core-header-panel/README.md new file mode 100644 index 0000000..8bc73e9 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/bower.json b/third_party/polymer/components/core-header-panel/bower.json new file mode 100644 index 0000000..8a6e840 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/core-header-panel.css b/third_party/polymer/components/core-header-panel/core-header-panel.css new file mode 100644 index 0000000..31dcce5 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/core-header-panel.html b/third_party/polymer/components/core-header-panel/core-header-panel.html new file mode 100644 index 0000000..a48605c --- /dev/null +++ b/third_party/polymer/components/core-header-panel/core-header-panel.html @@ -0,0 +1,225 @@ +<!-- +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"> +<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> +<script> + + 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); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-header-panel/demo.html b/third_party/polymer/components/core-header-panel/demo.html new file mode 100644 index 0000000..69854d6 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/index.html b/third_party/polymer/components/core-header-panel/index.html new file mode 100644 index 0000000..85106b5 --- /dev/null +++ b/third_party/polymer/components/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/core-header-panel/metadata.html b/third_party/polymer/components/core-header-panel/metadata.html new file mode 100644 index 0000000..a218634 --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/.bower.json b/third_party/polymer/components/core-icon-button/.bower.json new file mode 100644 index 0000000..90de207 --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/README.md b/third_party/polymer/components/core-icon-button/README.md new file mode 100644 index 0000000..25e957f --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/bower.json b/third_party/polymer/components/core-icon-button/bower.json new file mode 100644 index 0000000..db94a26 --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/core-icon-button.css b/third_party/polymer/components/core-icon-button/core-icon-button.css new file mode 100644 index 0000000..60202c3 --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/core-icon-button.html b/third_party/polymer/components/core-icon-button/core-icon-button.html new file mode 100644 index 0000000..18e4971 --- /dev/null +++ b/third_party/polymer/components/core-icon-button/core-icon-button.html @@ -0,0 +1,81 @@ +<!-- +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"> + + <template> + <link rel="stylesheet" href="core-icon-button.css"> + <core-icon src="{{src}}" icon="{{icon}}"></core-icon><content></content> + </template> + + <script> + + 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); + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-icon-button/demo.html b/third_party/polymer/components/core-icon-button/demo.html new file mode 100644 index 0000000..becd7fb --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/index.html b/third_party/polymer/components/core-icon-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-icon-button/metadata.html b/third_party/polymer/components/core-icon-button/metadata.html new file mode 100644 index 0000000..85478c7 --- /dev/null +++ b/third_party/polymer/components/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/core-icon/.bower.json b/third_party/polymer/components/core-icon/.bower.json new file mode 100644 index 0000000..bc0f698 --- /dev/null +++ b/third_party/polymer/components/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/core-icon/README.md b/third_party/polymer/components/core-icon/README.md new file mode 100644 index 0000000..65d93fb --- /dev/null +++ b/third_party/polymer/components/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/core-icon/bower.json b/third_party/polymer/components/core-icon/bower.json new file mode 100644 index 0000000..f0ab05e --- /dev/null +++ b/third_party/polymer/components/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/core-icon/core-icon.css b/third_party/polymer/components/core-icon/core-icon.css new file mode 100644 index 0000000..168a5b5 --- /dev/null +++ b/third_party/polymer/components/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/core-icon/core-icon.html b/third_party/polymer/components/core-icon/core-icon.html new file mode 100644 index 0000000..3a0b344 --- /dev/null +++ b/third_party/polymer/components/core-icon/core-icon.html @@ -0,0 +1,189 @@ +<!-- +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"> +<script> +(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'); + } + } + } + + }); + +})(); +</script> + +</polymer-element> diff --git a/third_party/polymer/components/core-icon/demo.html b/third_party/polymer/components/core-icon/demo.html new file mode 100644 index 0000000..2bcefbb --- /dev/null +++ b/third_party/polymer/components/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/core-icon/index.html b/third_party/polymer/components/core-icon/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-icon/metadata.html b/third_party/polymer/components/core-icon/metadata.html new file mode 100644 index 0000000..bb4c828 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/.bower.json b/third_party/polymer/components/core-icons/.bower.json new file mode 100644 index 0000000..4740787 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/README.md b/third_party/polymer/components/core-icons/README.md new file mode 100644 index 0000000..195925f --- /dev/null +++ b/third_party/polymer/components/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/core-icons/av-icons.html b/third_party/polymer/components/core-icons/av-icons.html new file mode 100644 index 0000000..1638abf --- /dev/null +++ b/third_party/polymer/components/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/core-icons/bower.json b/third_party/polymer/components/core-icons/bower.json new file mode 100644 index 0000000..72efca9 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/communication-icons.html b/third_party/polymer/components/core-icons/communication-icons.html new file mode 100644 index 0000000..32191cc --- /dev/null +++ b/third_party/polymer/components/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-0.1,1-0.3l1.9,1.9l1.3-1.3L3.7,3.9z"/></g> +<g id="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="portable-wifi-off"><path d="M17.6,14.2c0.3-0.7,0.4-1.4,0.4-2.2c0-3.3-2.7-6-6-6c-0.8,0-1.5,0.2-2.2,0.4l1.6,1.6C11.6,8,11.8,8,12,8c2.2,0,4,1.8,4,4c0,0.2,0,0.4-0.1,0.6L17.6,14.2z M12,4c4.4,0,8,3.6,8,8c0,1.4-0.4,2.6-0.9,3.7l1.5,1.5c0.9-1.5,1.5-3.3,1.5-5.2c0-5.5-4.5-10-10-10c-1.9,0-3.7,0.5-5.2,1.5l1.5,1.5C9.4,4.3,10.6,4,12,4z M3.3,2.5L2,3.8l2.1,2.1C2.8,7.6,2,9.7,2,12c0,3.7,2,6.9,5,8.6l1-1.7c-2.4-1.4-4-4-4-6.9c0-1.8,0.6-3.4,1.5-4.7L7,8.7C6.4,9.7,6,10.8,6,12c0,2.2,1.2,4.1,3,5.2l1-1.7c-1.2-0.7-2-2-2-3.4c0-0.6,0.2-1.2,0.4-1.8l1.6,1.6c0,0.1,0,0.1,0,0.2c0,1.1,0.9,2,2,2c0.1,0,0.1,0,0.2,0l0,0v0l7.5,7.5l1.3-1.3L4.3,3.5L3.3,2.5z"/></g> +<g id="ring-volume"><path d="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.4c0,0.3,0.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.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/core-icons/core-icons.html b/third_party/polymer/components/core-icons/core-icons.html new file mode 100644 index 0000000..0395946 --- /dev/null +++ b/third_party/polymer/components/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="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c0.3-0.5,0.6-1.1,1-1.8c0.5-1,0.8-2,1.1-2.9l0,0c-0.4-1.2-0.6-1.9-0.2-3.3c0.1-0.4,0.4-0.8,0.8-0.8l0.2,0c0.2,0,0.4,0.1,0.6,0.2c0.7,0.7,0.4,2.3,0,3.6c0,0.1,0,0.1,0,0.1c0.4,1.1,1,2,1.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-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,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.1-0.3,1.9-1.4,3.1-2.8c1.2-1.5,2.8-3.4,4.1-3.4c1.6,0,1.6,1,1.8,1.8c-3.8,0.6-5.4,3.7-5.4,5.4c0,1.7,1.4,3.1,3.2,3.1c1.6,0,4.3-1.3,4.7-6.1H21v-2.5h-2.5c-0.2-1.6-1.1-4.2-4-4.2c-2.2,0-4.2,1.9-4.9,2.8c-0.6,0.7-2.1,2.5-2.3,2.7c-0.3,0.3-0.7,0.8-1.1,0.8c-0.4,0-0.7-0.8-0.4-1.9c0.4-1.1,1.4-2.9,1.9-3.5C8.4,8,8.9,7.2,8.9,5.9C8.9,3.7,7.3,3,6.4,3C5.1,3,4,4,3.7,4.3C3.4,4.6,3.1,4.9,2.8,5.2L4.6,6.9z M13.9,18.6c-0.3,0-0.7-0.3-0.7-0.7c0-0.6,0.7-2.2,2.9-2.8C15.7,17.8,14.6,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.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 "/></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-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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-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/core-icons/demo.html b/third_party/polymer/components/core-icons/demo.html new file mode 100644 index 0000000..ea91b45 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/device-icons.html b/third_party/polymer/components/core-icons/device-icons.html new file mode 100644 index 0000000..ecce1d4 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/editor-icons.html b/third_party/polymer/components/core-icons/editor-icons.html new file mode 100644 index 0000000..d59c108 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/hardware-icons.html b/third_party/polymer/components/core-icons/hardware-icons.html new file mode 100644 index 0000000..510a05c --- /dev/null +++ b/third_party/polymer/components/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/core-icons/image-icons.html b/third_party/polymer/components/core-icons/image-icons.html new file mode 100644 index 0000000..ca645b5 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/index.html b/third_party/polymer/components/core-icons/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-icons/maps-icons.html b/third_party/polymer/components/core-icons/maps-icons.html new file mode 100644 index 0000000..5a5101d --- /dev/null +++ b/third_party/polymer/components/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/core-icons/notification-icons.html b/third_party/polymer/components/core-icons/notification-icons.html new file mode 100644 index 0000000..d2646f8 --- /dev/null +++ b/third_party/polymer/components/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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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/core-icons/png-icons.html b/third_party/polymer/components/core-icons/png-icons.html new file mode 100644 index 0000000..5347c6b --- /dev/null +++ b/third_party/polymer/components/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/core-icons/social-icons.html b/third_party/polymer/components/core-icons/social-icons.html new file mode 100644 index 0000000..102c544 --- /dev/null +++ b/third_party/polymer/components/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,1,1,1c0.6,0,1,0.4,1,1v3c0,1.7-1.3,3-3,3H9c-1.7,0-3-1.3-3-3V8c0-1.7,1.3-3,3-3h4c1.7,0,3,1.3,3,3V9z M10,10h2.6c0.6,0,1-0.4,1-1c0-0.6-0.4-1-1-1H10C9.4,8,9,8.4,9,9C9,9.6,9.4,10,10,10z M14,13h-4c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h4c0.6,0,1-0.4,1-1C15,13.4,14.6,13,14,13z"/></g> +<g id="post-facebook"><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 M19,4v3h-2c-0.6,0-1,0.4-1,1v2h3v3h-3v7h-3v-7h-2v-3h2V7.5C13,5.6,14.6,4,16.5,4H19z"/></g> +<g id="post-github"><path d="M7.2 6.6h-.1c-.5 1.4-.2 2.3-.1 2.6-.6.7-1 1.6-1 2.6 0 3.8 2.4 4.6 4.6 4.9-.2 0-.6.2-.8.8-.4.2-1.8.7-2.6-.7 0 0-.5-.8-1.3-.9 0 0-.8 0-.1.5 0 0 .6.3.9 1.3 0 0 .5 1.7 3 1.1v3.1h5v-3.5c0-1-.4-1.5-.8-1.8 2.2-.2 4.6-1 4.6-4.8 0-1.1-.4-2-1-2.6.1-.3.4-1.2-.1-2.6 0 0-.8-.3-2.7 1-.8-.2-1.6-.3-2.5-.3-.8 0-1.7.1-2.5.3-1.4-1-2.2-1-2.6-1zm12.8 15.4h-16c-1.1 0-2-.9-2-2v-16c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2z"/></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9,2-2V4C22,2.9,21.1,2,20,2z M16,11h-3c0,0,0,3.8,0,3.9c0,0.7,0.1,1.1,1.1,1.1c0.9,0,1.9,0,1.9,0v3c0,0-1,0.1-2.1,0.1c-2.6,0-3.9-1.6-3.9-3.4c0-1.2,0-4.7,0-4.7H8V8.2c2.4-0.2,2.6-2,2.8-3.2H13v3h3V11z"/></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/core-iconset-svg/.bower.json b/third_party/polymer/components/core-iconset-svg/.bower.json new file mode 100644 index 0000000..81af334 --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/.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/core-iconset-svg/README.md b/third_party/polymer/components/core-iconset-svg/README.md new file mode 100644 index 0000000..7a3a217 --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/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/core-iconset-svg/bower.json b/third_party/polymer/components/core-iconset-svg/bower.json new file mode 100644 index 0000000..d783d98 --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/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/core-iconset-svg/core-iconset.html new file mode 100644 index 0000000..7ab2d34 --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/core-iconset.html @@ -0,0 +1,241 @@ +<!-- +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', { + + /** + * 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 {Number} scale (optional, defaults to 1) A scaling factor + * with which the icon can be magnified. + * @return {Element} The icon element. + */ + applyIcon: function(element, icon, scale) { + var offset = this.getOffset(icon); + scale = scale || 1; + if (element && offset) { + var icon = element._icon || document.createElement('div'); + var style = icon.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'; + if (icon.parentNode !== element) { + element.appendChild(icon); + } + return icon; + } + } + + }); + + </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 new file mode 100644 index 0000000..82ea67a --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/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/core-iconset-svg/index.html b/third_party/polymer/components/core-iconset-svg/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-iconset-svg/my-icons-big.png b/third_party/polymer/components/core-iconset-svg/my-icons-big.png Binary files differnew file mode 100644 index 0000000..f019f3f --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/my-icons-big.png diff --git a/third_party/polymer/components/core-iconset-svg/my-icons.png b/third_party/polymer/components/core-iconset-svg/my-icons.png Binary files differnew file mode 100644 index 0000000..a7d223b --- /dev/null +++ b/third_party/polymer/components/core-iconset-svg/my-icons.png diff --git a/third_party/polymer/components/core-iconset/.bower.json b/third_party/polymer/components/core-iconset/.bower.json new file mode 100644 index 0000000..81af334 --- /dev/null +++ b/third_party/polymer/components/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/core-iconset/README.md b/third_party/polymer/components/core-iconset/README.md new file mode 100644 index 0000000..7a3a217 --- /dev/null +++ b/third_party/polymer/components/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/core-iconset/bower.json b/third_party/polymer/components/core-iconset/bower.json new file mode 100644 index 0000000..d783d98 --- /dev/null +++ b/third_party/polymer/components/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/core-iconset.html b/third_party/polymer/components/core-iconset/core-iconset.html new file mode 100644 index 0000000..7ab2d34 --- /dev/null +++ b/third_party/polymer/components/core-iconset/core-iconset.html @@ -0,0 +1,241 @@ +<!-- +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', { + + /** + * 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 {Number} scale (optional, defaults to 1) A scaling factor + * with which the icon can be magnified. + * @return {Element} The icon element. + */ + applyIcon: function(element, icon, scale) { + var offset = this.getOffset(icon); + scale = scale || 1; + if (element && offset) { + var icon = element._icon || document.createElement('div'); + var style = icon.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'; + if (icon.parentNode !== element) { + element.appendChild(icon); + } + return icon; + } + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-iconset/demo.html b/third_party/polymer/components/core-iconset/demo.html new file mode 100644 index 0000000..82ea67a --- /dev/null +++ b/third_party/polymer/components/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/core-iconset/index.html b/third_party/polymer/components/core-iconset/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/my-icons-big.png b/third_party/polymer/components/core-iconset/my-icons-big.png Binary files differnew file mode 100644 index 0000000..f019f3f --- /dev/null +++ b/third_party/polymer/components/core-iconset/my-icons-big.png diff --git a/third_party/polymer/components/core-iconset/my-icons.png b/third_party/polymer/components/core-iconset/my-icons.png Binary files differnew file mode 100644 index 0000000..a7d223b --- /dev/null +++ b/third_party/polymer/components/core-iconset/my-icons.png diff --git a/third_party/polymer/components/core-input/.bower.json b/third_party/polymer/components/core-input/.bower.json new file mode 100644 index 0000000..2f1a23b --- /dev/null +++ b/third_party/polymer/components/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/core-input/README.md b/third_party/polymer/components/core-input/README.md new file mode 100644 index 0000000..ca86fcb --- /dev/null +++ b/third_party/polymer/components/core-input/README.md @@ -0,0 +1,2 @@ +core-input +========== diff --git a/third_party/polymer/components/core-input/bower.json b/third_party/polymer/components/core-input/bower.json new file mode 100644 index 0000000..2513292 --- /dev/null +++ b/third_party/polymer/components/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/core-input/core-input.css b/third_party/polymer/components/core-input/core-input.css new file mode 100644 index 0000000..7303061 --- /dev/null +++ b/third_party/polymer/components/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/core-input/core-input.html b/third_party/polymer/components/core-input/core-input.html new file mode 100644 index 0000000..95edde0 --- /dev/null +++ b/third_party/polymer/components/core-input/core-input.html @@ -0,0 +1,432 @@ +<!-- +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}}"> + + <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> + + <script> + + 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_(); + } + + }); + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-input/demo.html b/third_party/polymer/components/core-input/demo.html new file mode 100644 index 0000000..c519f8e --- /dev/null +++ b/third_party/polymer/components/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/core-input/index.html b/third_party/polymer/components/core-input/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-input/metadata.html b/third_party/polymer/components/core-input/metadata.html new file mode 100644 index 0000000..01f69bb --- /dev/null +++ b/third_party/polymer/components/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/core-item/.bower.json b/third_party/polymer/components/core-item/.bower.json new file mode 100644 index 0000000..a498db0 --- /dev/null +++ b/third_party/polymer/components/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/core-item/README.md b/third_party/polymer/components/core-item/README.md new file mode 100644 index 0000000..ab1d0cd --- /dev/null +++ b/third_party/polymer/components/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/core-item/bower.json b/third_party/polymer/components/core-item/bower.json new file mode 100644 index 0000000..4b46e03 --- /dev/null +++ b/third_party/polymer/components/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/core-item/core-item.css b/third_party/polymer/components/core-item/core-item.css new file mode 100644 index 0000000..fa13705 --- /dev/null +++ b/third_party/polymer/components/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/core-item/core-item.html b/third_party/polymer/components/core-item/core-item.html new file mode 100644 index 0000000..e8868cb --- /dev/null +++ b/third_party/polymer/components/core-item/core-item.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-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> +<template> + + <core-icon src="{{src}}" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon> + <div id="label">{{label}}</div> + <content></content> + +</template> +<script> + + 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 '' + */ + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-item/demo.html b/third_party/polymer/components/core-item/demo.html new file mode 100644 index 0000000..9f1b6f4 --- /dev/null +++ b/third_party/polymer/components/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/core-item/index.html b/third_party/polymer/components/core-item/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-item/metadata.html b/third_party/polymer/components/core-item/metadata.html new file mode 100644 index 0000000..63e7979 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/.bower.json b/third_party/polymer/components/core-layout-grid/.bower.json new file mode 100644 index 0000000..dc5bd26 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/README.md b/third_party/polymer/components/core-layout-grid/README.md new file mode 100644 index 0000000..e612651 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/bower.json b/third_party/polymer/components/core-layout-grid/bower.json new file mode 100644 index 0000000..844907a --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/core-layout-grid.html b/third_party/polymer/components/core-layout-grid/core-layout-grid.html new file mode 100644 index 0000000..25b1c88 --- /dev/null +++ b/third_party/polymer/components/core-layout-grid/core-layout-grid.html @@ -0,0 +1,350 @@ +<!-- +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"> +<script> + (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(); + } + + })(); +</script> +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-layout-grid/demo.html b/third_party/polymer/components/core-layout-grid/demo.html new file mode 100644 index 0000000..c03fb4e --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/index.html b/third_party/polymer/components/core-layout-grid/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-grid/metadata.html b/third_party/polymer/components/core-layout-grid/metadata.html new file mode 100644 index 0000000..cdf11b3 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-trbl/.bower.json b/third_party/polymer/components/core-layout-trbl/.bower.json new file mode 100644 index 0000000..8a2b441 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-trbl/README.md b/third_party/polymer/components/core-layout-trbl/README.md new file mode 100644 index 0000000..438ccc4 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-trbl/bower.json b/third_party/polymer/components/core-layout-trbl/bower.json new file mode 100644 index 0000000..84ca4c5 --- /dev/null +++ b/third_party/polymer/components/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/core-layout-trbl/core-layout-trbl.html b/third_party/polymer/components/core-layout-trbl/core-layout-trbl.html new file mode 100644 index 0000000..c9ea2c6 --- /dev/null +++ b/third_party/polymer/components/core-layout-trbl/core-layout-trbl.html @@ -0,0 +1,269 @@ +<!-- +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"> + + <template> + + <style> + :host { + display: none; + } + </style> + + </template> + + <script> + + 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]; + }); + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-layout-trbl/core-slide.html b/third_party/polymer/components/core-layout-trbl/core-slide.html new file mode 100644 index 0000000..92f158e --- /dev/null +++ b/third_party/polymer/components/core-layout-trbl/core-slide.html @@ -0,0 +1,181 @@ +<!-- +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"> + + <template> + + <style> + :host { + display: none; + } + </style> + + </template> + + <script> + + 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; + }; + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-layout-trbl/demo.html b/third_party/polymer/components/core-layout-trbl/demo.html new file mode 100644 index 0000000..3812ccf --- /dev/null +++ b/third_party/polymer/components/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/core-layout-trbl/index.html b/third_party/polymer/components/core-layout-trbl/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/.bower.json b/third_party/polymer/components/core-layout/.bower.json new file mode 100644 index 0000000..6a615b5 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/README.md b/third_party/polymer/components/core-layout/README.md new file mode 100644 index 0000000..11ec2d0 --- /dev/null +++ b/third_party/polymer/components/core-layout/README.md @@ -0,0 +1,4 @@ +core-layout +=========== + +## DEPRECATED (in favor of layout attributes) diff --git a/third_party/polymer/components/core-layout/bower.json b/third_party/polymer/components/core-layout/bower.json new file mode 100644 index 0000000..56dd1f1 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/core-layout-host.css b/third_party/polymer/components/core-layout/core-layout-host.css new file mode 100644 index 0000000..aa5f845 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/core-layout.css b/third_party/polymer/components/core-layout/core-layout.css new file mode 100644 index 0000000..80f64b0 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/core-layout.html b/third_party/polymer/components/core-layout/core-layout.html new file mode 100644 index 0000000..96082af --- /dev/null +++ b/third_party/polymer/components/core-layout/core-layout.html @@ -0,0 +1,288 @@ +<!-- +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"> + + <template> + + <link no-shim rel="stylesheet" href="core-layout.css"> + <link no-shim rel="stylesheet" href="core-layout-host.css"> + + </template> + + <script> + + (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); + } + + }); + + })(); + </script> + +</polymer-element> diff --git a/third_party/polymer/components/core-layout/demo-body.html b/third_party/polymer/components/core-layout/demo-body.html new file mode 100644 index 0000000..ab92311 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/demo-css.html b/third_party/polymer/components/core-layout/demo-css.html new file mode 100644 index 0000000..f8fed78 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/demo-parent.html b/third_party/polymer/components/core-layout/demo-parent.html new file mode 100644 index 0000000..8700763 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/demo.html b/third_party/polymer/components/core-layout/demo.html new file mode 100644 index 0000000..46c91b5 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/index.html b/third_party/polymer/components/core-layout/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-layout/metadata.html b/third_party/polymer/components/core-layout/metadata.html new file mode 100644 index 0000000..e2bbac1 --- /dev/null +++ b/third_party/polymer/components/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/core-list/.bower.json b/third_party/polymer/components/core-list/.bower.json new file mode 100644 index 0000000..286a011 --- /dev/null +++ b/third_party/polymer/components/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/core-list/README.md b/third_party/polymer/components/core-list/README.md new file mode 100644 index 0000000..0142d51 --- /dev/null +++ b/third_party/polymer/components/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/core-list/bower.json b/third_party/polymer/components/core-list/bower.json new file mode 100644 index 0000000..40a5bee --- /dev/null +++ b/third_party/polymer/components/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/core-list/core-list.css b/third_party/polymer/components/core-list/core-list.css new file mode 100644 index 0000000..1e2c9ea --- /dev/null +++ b/third_party/polymer/components/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/core-list/core-list.html b/third_party/polymer/components/core-list/core-list.html new file mode 100644 index 0000000..d815108 --- /dev/null +++ b/third_party/polymer/components/core-list/core-list.html @@ -0,0 +1,403 @@ +<!--
+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}}">
+<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>
+<script>
+(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;
+ }
+ }
+
+})();
+</script>
+</polymer-element>
diff --git a/third_party/polymer/components/core-list/demo-divider.html b/third_party/polymer/components/core-list/demo-divider.html new file mode 100644 index 0000000..e3c5984 --- /dev/null +++ b/third_party/polymer/components/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/core-list/demo.html b/third_party/polymer/components/core-list/demo.html new file mode 100644 index 0000000..8233733 --- /dev/null +++ b/third_party/polymer/components/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/core-list/images/0.png b/third_party/polymer/components/core-list/images/0.png Binary files differnew file mode 100644 index 0000000..12397a9 --- /dev/null +++ b/third_party/polymer/components/core-list/images/0.png diff --git a/third_party/polymer/components/core-list/images/1.png b/third_party/polymer/components/core-list/images/1.png Binary files differnew file mode 100644 index 0000000..6b7e49f --- /dev/null +++ b/third_party/polymer/components/core-list/images/1.png diff --git a/third_party/polymer/components/core-list/images/2.png b/third_party/polymer/components/core-list/images/2.png Binary files differnew file mode 100644 index 0000000..6fba511 --- /dev/null +++ b/third_party/polymer/components/core-list/images/2.png diff --git a/third_party/polymer/components/core-list/images/3.png b/third_party/polymer/components/core-list/images/3.png Binary files differnew file mode 100644 index 0000000..d629633 --- /dev/null +++ b/third_party/polymer/components/core-list/images/3.png diff --git a/third_party/polymer/components/core-list/index.html b/third_party/polymer/components/core-list/index.html new file mode 100644 index 0000000..e75c2ca --- /dev/null +++ b/third_party/polymer/components/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/core-localstorage/.bower.json b/third_party/polymer/components/core-localstorage/.bower.json new file mode 100644 index 0000000..8331406 --- /dev/null +++ b/third_party/polymer/components/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/core-localstorage/README.md b/third_party/polymer/components/core-localstorage/README.md new file mode 100644 index 0000000..241035b --- /dev/null +++ b/third_party/polymer/components/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/core-localstorage/bower.json b/third_party/polymer/components/core-localstorage/bower.json new file mode 100644 index 0000000..2b2f2f8 --- /dev/null +++ b/third_party/polymer/components/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/core-localstorage/core-localstorage.html b/third_party/polymer/components/core-localstorage/core-localstorage.html new file mode 100644 index 0000000..3ca5a09 --- /dev/null +++ b/third_party/polymer/components/core-localstorage/core-localstorage.html @@ -0,0 +1,128 @@ +<!-- +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> +<script> + + 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); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-localstorage/demo.html b/third_party/polymer/components/core-localstorage/demo.html new file mode 100644 index 0000000..428ea7d --- /dev/null +++ b/third_party/polymer/components/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/core-localstorage/index.html b/third_party/polymer/components/core-localstorage/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-media-query/.bower.json b/third_party/polymer/components/core-media-query/.bower.json new file mode 100644 index 0000000..1d58491 --- /dev/null +++ b/third_party/polymer/components/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/core-media-query/README.md b/third_party/polymer/components/core-media-query/README.md new file mode 100644 index 0000000..2eeb93e --- /dev/null +++ b/third_party/polymer/components/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/core-media-query/bower.json b/third_party/polymer/components/core-media-query/bower.json new file mode 100644 index 0000000..4dff6e2 --- /dev/null +++ b/third_party/polymer/components/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/core-media-query/core-media-query.html b/third_party/polymer/components/core-media-query/core-media-query.html new file mode 100644 index 0000000..20cfd09 --- /dev/null +++ b/third_party/polymer/components/core-media-query/core-media-query.html @@ -0,0 +1,87 @@ +<!-- +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"> + <template> + <style> + :host { + display: none; + } + </style> + </template> + <script> + 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); + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-media-query/demo.html b/third_party/polymer/components/core-media-query/demo.html new file mode 100644 index 0000000..b45494a --- /dev/null +++ b/third_party/polymer/components/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/core-media-query/index.html b/third_party/polymer/components/core-media-query/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/.bower.json b/third_party/polymer/components/core-menu-button/.bower.json new file mode 100644 index 0000000..032e280 --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/README.md b/third_party/polymer/components/core-menu-button/README.md new file mode 100644 index 0000000..033027e --- /dev/null +++ b/third_party/polymer/components/core-menu-button/README.md @@ -0,0 +1,2 @@ +core-menu-button +================ diff --git a/third_party/polymer/components/core-menu-button/bower.json b/third_party/polymer/components/core-menu-button/bower.json new file mode 100644 index 0000000..c63493e --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/core-menu-button.css b/third_party/polymer/components/core-menu-button/core-menu-button.css new file mode 100644 index 0000000..03b5bb5 --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/core-menu-button.html b/third_party/polymer/components/core-menu-button/core-menu-button.html new file mode 100644 index 0000000..2ec5ed4 --- /dev/null +++ b/third_party/polymer/components/core-menu-button/core-menu-button.html @@ -0,0 +1,137 @@ +<!-- +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"> + <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> + <script> + 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; + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-menu-button/demo.html b/third_party/polymer/components/core-menu-button/demo.html new file mode 100644 index 0000000..6235b31 --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/index.html b/third_party/polymer/components/core-menu-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-menu-button/metadata.html b/third_party/polymer/components/core-menu-button/metadata.html new file mode 100644 index 0000000..7f9f545 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/.bower.json b/third_party/polymer/components/core-menu/.bower.json new file mode 100644 index 0000000..ebd2e88 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/README.md b/third_party/polymer/components/core-menu/README.md new file mode 100644 index 0000000..a6b2cfd --- /dev/null +++ b/third_party/polymer/components/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/core-menu/bower.json b/third_party/polymer/components/core-menu/bower.json new file mode 100644 index 0000000..3f49f80 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/core-menu.css b/third_party/polymer/components/core-menu/core-menu.css new file mode 100644 index 0000000..7cf6ab5 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/core-menu.html b/third_party/polymer/components/core-menu/core-menu.html new file mode 100644 index 0000000..e9aba77 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/core-submenu.css b/third_party/polymer/components/core-menu/core-submenu.css new file mode 100644 index 0000000..54c7f5b --- /dev/null +++ b/third_party/polymer/components/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/core-menu/core-submenu.html b/third_party/polymer/components/core-menu/core-submenu.html new file mode 100644 index 0000000..42e422a --- /dev/null +++ b/third_party/polymer/components/core-menu/core-submenu.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 +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/core-menu.html"> +<link rel="import" href="../core-collapse/core-collapse.html"> + +<polymer-element name="core-submenu" attributes="selected selectedItem label icon src valueattr"> +<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> +<script> + + 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(); + } + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-menu/demo.html b/third_party/polymer/components/core-menu/demo.html new file mode 100644 index 0000000..edb9581 --- /dev/null +++ b/third_party/polymer/components/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/core-menu/index.html b/third_party/polymer/components/core-menu/index.html new file mode 100644 index 0000000..524991f --- /dev/null +++ b/third_party/polymer/components/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/core-menu/metadata.html b/third_party/polymer/components/core-menu/metadata.html new file mode 100644 index 0000000..4fa1f39 --- /dev/null +++ b/third_party/polymer/components/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/core-meta/.bower.json b/third_party/polymer/components/core-meta/.bower.json new file mode 100644 index 0000000..561477b --- /dev/null +++ b/third_party/polymer/components/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/core-meta/README.md b/third_party/polymer/components/core-meta/README.md new file mode 100644 index 0000000..d8da644 --- /dev/null +++ b/third_party/polymer/components/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/core-meta/bower.json b/third_party/polymer/components/core-meta/bower.json new file mode 100644 index 0000000..1ae7894 --- /dev/null +++ b/third_party/polymer/components/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/core-meta/core-meta.html b/third_party/polymer/components/core-meta/core-meta.html new file mode 100644 index 0000000..c008dd5 --- /dev/null +++ b/third_party/polymer/components/core-meta/core-meta.html @@ -0,0 +1,145 @@ +<!-- +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> +<script> + + (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]; + } + + }); + + })(); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-meta/demo.html b/third_party/polymer/components/core-meta/demo.html new file mode 100644 index 0000000..dbcf01e --- /dev/null +++ b/third_party/polymer/components/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/core-meta/index.html b/third_party/polymer/components/core-meta/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-overlay/.bower.json b/third_party/polymer/components/core-overlay/.bower.json new file mode 100644 index 0000000..b3df2b6 --- /dev/null +++ b/third_party/polymer/components/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/core-overlay/README.md b/third_party/polymer/components/core-overlay/README.md new file mode 100644 index 0000000..54713e0 --- /dev/null +++ b/third_party/polymer/components/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/core-overlay/bower.json b/third_party/polymer/components/core-overlay/bower.json new file mode 100644 index 0000000..6f91dbe --- /dev/null +++ b/third_party/polymer/components/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/core-overlay/core-key-helper.html b/third_party/polymer/components/core-overlay/core-key-helper.html new file mode 100644 index 0000000..b9fe474 --- /dev/null +++ b/third_party/polymer/components/core-overlay/core-key-helper.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="../polymer/polymer.html"> + +<polymer-element name="core-key-helper"> + <script> + Polymer('core-key-helper', { + ENTER_KEY: 13, + ESCAPE_KEY: 27 + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-overlay/core-overlay-layer.html b/third_party/polymer/components/core-overlay/core-overlay-layer.html new file mode 100644 index 0000000..c75ce3a --- /dev/null +++ b/third_party/polymer/components/core-overlay/core-overlay-layer.html @@ -0,0 +1,112 @@ +<!--
+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">
+<template>
+ <style>
+ :host {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ }
+
+ :host(.core-opened) {
+ display: block;
+ }
+ </style>
+ <content></content>
+</template>
+<script>
+(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;
+ }
+ });
+
+})();
+</script>
+</polymer-element>
diff --git a/third_party/polymer/components/core-overlay/core-overlay.html b/third_party/polymer/components/core-overlay/core-overlay.html new file mode 100644 index 0000000..af0136b --- /dev/null +++ b/third_party/polymer/components/core-overlay/core-overlay.html @@ -0,0 +1,676 @@ +<!-- +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"> +<script> +(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; + } +})(); +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-overlay/demo.html b/third_party/polymer/components/core-overlay/demo.html new file mode 100644 index 0000000..fda6207 --- /dev/null +++ b/third_party/polymer/components/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/core-overlay/index.html b/third_party/polymer/components/core-overlay/index.html new file mode 100644 index 0000000..4b2f63c --- /dev/null +++ b/third_party/polymer/components/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/core-pages/.bower.json b/third_party/polymer/components/core-pages/.bower.json new file mode 100644 index 0000000..a7c8606 --- /dev/null +++ b/third_party/polymer/components/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/core-pages/README.md b/third_party/polymer/components/core-pages/README.md new file mode 100644 index 0000000..cf2d283 --- /dev/null +++ b/third_party/polymer/components/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/core-pages/bower.json b/third_party/polymer/components/core-pages/bower.json new file mode 100644 index 0000000..dd5b382 --- /dev/null +++ b/third_party/polymer/components/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/core-pages/core-pages.css b/third_party/polymer/components/core-pages/core-pages.css new file mode 100644 index 0000000..8cca77d --- /dev/null +++ b/third_party/polymer/components/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/core-pages/core-pages.html b/third_party/polymer/components/core-pages/core-pages.html new file mode 100644 index 0000000..170e559 --- /dev/null +++ b/third_party/polymer/components/core-pages/core-pages.html @@ -0,0 +1,44 @@ +<!-- +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 noscript> +<template> + + <link rel="stylesheet" href="core-pages.css"> + + <shadow></shadow> + +</template> +</polymer-element> diff --git a/third_party/polymer/components/core-pages/demo.html b/third_party/polymer/components/core-pages/demo.html new file mode 100644 index 0000000..a980653 --- /dev/null +++ b/third_party/polymer/components/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/core-pages/index.html b/third_party/polymer/components/core-pages/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-pages/metadata.html b/third_party/polymer/components/core-pages/metadata.html new file mode 100644 index 0000000..bc8501e --- /dev/null +++ b/third_party/polymer/components/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/core-range/.bower.json b/third_party/polymer/components/core-range/.bower.json new file mode 100644 index 0000000..3e97fcc --- /dev/null +++ b/third_party/polymer/components/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/core-range/README.md b/third_party/polymer/components/core-range/README.md new file mode 100644 index 0000000..b14d06e --- /dev/null +++ b/third_party/polymer/components/core-range/README.md @@ -0,0 +1,2 @@ +core-range +========== diff --git a/third_party/polymer/components/core-range/bower.json b/third_party/polymer/components/core-range/bower.json new file mode 100644 index 0000000..7d38994 --- /dev/null +++ b/third_party/polymer/components/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/core-range/core-range.html b/third_party/polymer/components/core-range/core-range.html new file mode 100644 index 0000000..e16993c --- /dev/null +++ b/third_party/polymer/components/core-range/core-range.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.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"> +<script> + + 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; + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-range/demo.html b/third_party/polymer/components/core-range/demo.html new file mode 100644 index 0000000..338ca2a --- /dev/null +++ b/third_party/polymer/components/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/core-range/index.html b/third_party/polymer/components/core-range/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/.bower.json b/third_party/polymer/components/core-scaffold/.bower.json new file mode 100644 index 0000000..2445fae --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/README.md b/third_party/polymer/components/core-scaffold/README.md new file mode 100644 index 0000000..7f89389 --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/bower.json b/third_party/polymer/components/core-scaffold/bower.json new file mode 100644 index 0000000..3c04ded --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/core-scaffold.html b/third_party/polymer/components/core-scaffold/core-scaffold.html new file mode 100644 index 0000000..5edd64b --- /dev/null +++ b/third_party/polymer/components/core-scaffold/core-scaffold.html @@ -0,0 +1,157 @@ +<!-- +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"> +<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> +<script> + + 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(); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-scaffold/demo.html b/third_party/polymer/components/core-scaffold/demo.html new file mode 100644 index 0000000..647ba11 --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/index.html b/third_party/polymer/components/core-scaffold/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-scaffold/metadata.html b/third_party/polymer/components/core-scaffold/metadata.html new file mode 100644 index 0000000..9225d48 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/.bower.json b/third_party/polymer/components/core-scroll-header-panel/.bower.json new file mode 100644 index 0000000..40a0128 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/README.md b/third_party/polymer/components/core-scroll-header-panel/README.md new file mode 100644 index 0000000..dcdd864 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/bower.json b/third_party/polymer/components/core-scroll-header-panel/bower.json new file mode 100644 index 0000000..008279a --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/core-scroll-header-panel.css b/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.css new file mode 100644 index 0000000..07a0956 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/core-scroll-header-panel.html b/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.html new file mode 100644 index 0000000..ae0f9e1 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/core-scroll-header-panel.html @@ -0,0 +1,302 @@ +<!-- +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"> +<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> +<script> + + 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); + } + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-scroll-header-panel/demo.html b/third_party/polymer/components/core-scroll-header-panel/demo.html new file mode 100644 index 0000000..1e833db --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo1.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo1.html new file mode 100644 index 0000000..39eba41 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo2.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo2.html new file mode 100644 index 0000000..974016a --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo3.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo3.html new file mode 100644 index 0000000..162df33 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo4.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo4.html new file mode 100644 index 0000000..77d9fec --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo5.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo5.html new file mode 100644 index 0000000..f66482e --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo6.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo6.html new file mode 100644 index 0000000..6b252e5 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo7.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo7.html new file mode 100644 index 0000000..5e94276 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo8.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo8.html new file mode 100644 index 0000000..fded942 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/demo9.html b/third_party/polymer/components/core-scroll-header-panel/demos/demo9.html new file mode 100644 index 0000000..820bcae --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/demos/images/bg2.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg2.jpg Binary files differnew file mode 100644 index 0000000..9aad0a9 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg2.jpg diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg Binary files differnew file mode 100644 index 0000000..5079b4e8 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg3.jpg diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg Binary files differnew file mode 100644 index 0000000..979ef17 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg5.jpg diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg Binary files differnew file mode 100644 index 0000000..1dec3f3 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg6.jpg diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg Binary files differnew file mode 100644 index 0000000..c9a2e658 --- /dev/null +++ b/third_party/polymer/components/core-scroll-header-panel/demos/images/bg9.jpg diff --git a/third_party/polymer/components/core-scroll-header-panel/demos/lorem-ipsum.html b/third_party/polymer/components/core-scroll-header-panel/demos/lorem-ipsum.html new file mode 100644 index 0000000..0c32aa9 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/index.html b/third_party/polymer/components/core-scroll-header-panel/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-scroll-header-panel/metadata.html b/third_party/polymer/components/core-scroll-header-panel/metadata.html new file mode 100644 index 0000000..09f6170 --- /dev/null +++ b/third_party/polymer/components/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/core-selection/.bower.json b/third_party/polymer/components/core-selection/.bower.json new file mode 100644 index 0000000..63c30f3 --- /dev/null +++ b/third_party/polymer/components/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/core-selection/README.md b/third_party/polymer/components/core-selection/README.md new file mode 100644 index 0000000..6287468 --- /dev/null +++ b/third_party/polymer/components/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/core-selection/bower.json b/third_party/polymer/components/core-selection/bower.json new file mode 100644 index 0000000..b601e44 --- /dev/null +++ b/third_party/polymer/components/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/core-selection/core-selection.html b/third_party/polymer/components/core-selection/core-selection.html new file mode 100644 index 0000000..414b782 --- /dev/null +++ b/third_party/polymer/components/core-selection/core-selection.html @@ -0,0 +1,149 @@ +<!-- +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> + <script> + 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)); + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-selection/demo.html b/third_party/polymer/components/core-selection/demo.html new file mode 100644 index 0000000..560f480 --- /dev/null +++ b/third_party/polymer/components/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/core-selection/index.html b/third_party/polymer/components/core-selection/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-selector/.bower.json b/third_party/polymer/components/core-selector/.bower.json new file mode 100644 index 0000000..b3ffb9c --- /dev/null +++ b/third_party/polymer/components/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/core-selector/README.md b/third_party/polymer/components/core-selector/README.md new file mode 100644 index 0000000..e4beeea --- /dev/null +++ b/third_party/polymer/components/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/core-selector/bower.json b/third_party/polymer/components/core-selector/bower.json new file mode 100644 index 0000000..e744103 --- /dev/null +++ b/third_party/polymer/components/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/core-selector/core-selector.html b/third_party/polymer/components/core-selector/core-selector.html new file mode 100644 index 0000000..af328d6 --- /dev/null +++ b/third_party/polymer/components/core-selector/core-selector.html @@ -0,0 +1,424 @@ +<!-- +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"> + + <template> + <core-selection id="selection" multi="{{multi}}" on-core-select="{{selectionSelect}}"></core-selection> + <content id="items" select="*"></content> + </template> + + <script> + + 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; + } + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/core-selector/demo.html b/third_party/polymer/components/core-selector/demo.html new file mode 100644 index 0000000..de58696 --- /dev/null +++ b/third_party/polymer/components/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/core-selector/index.html b/third_party/polymer/components/core-selector/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-selector/metadata.html b/third_party/polymer/components/core-selector/metadata.html new file mode 100644 index 0000000..fe0bf18 --- /dev/null +++ b/third_party/polymer/components/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/core-shared-lib/.bower.json b/third_party/polymer/components/core-shared-lib/.bower.json new file mode 100644 index 0000000..15b08d5 --- /dev/null +++ b/third_party/polymer/components/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/core-shared-lib/README.md b/third_party/polymer/components/core-shared-lib/README.md new file mode 100644 index 0000000..32c53ce --- /dev/null +++ b/third_party/polymer/components/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/core-shared-lib/bower.json b/third_party/polymer/components/core-shared-lib/bower.json new file mode 100644 index 0000000..4989fd0 --- /dev/null +++ b/third_party/polymer/components/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/core-shared-lib/core-shared-lib.html b/third_party/polymer/components/core-shared-lib/core-shared-lib.html new file mode 100644 index 0000000..45ae603 --- /dev/null +++ b/third_party/polymer/components/core-shared-lib/core-shared-lib.html @@ -0,0 +1,151 @@ +<!-- +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"> +<script> +(function() { + + Polymer({ + + 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); + } + } + + }; + +})(); +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-shared-lib/demo.html b/third_party/polymer/components/core-shared-lib/demo.html new file mode 100644 index 0000000..a18ef95 --- /dev/null +++ b/third_party/polymer/components/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/core-shared-lib/index.html b/third_party/polymer/components/core-shared-lib/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-signals/.bower.json b/third_party/polymer/components/core-signals/.bower.json new file mode 100644 index 0000000..57eec41 --- /dev/null +++ b/third_party/polymer/components/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/core-signals/README.md b/third_party/polymer/components/core-signals/README.md new file mode 100644 index 0000000..05d4a61 --- /dev/null +++ b/third_party/polymer/components/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/core-signals/bower.json b/third_party/polymer/components/core-signals/bower.json new file mode 100644 index 0000000..85449b8 --- /dev/null +++ b/third_party/polymer/components/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/core-signals/core-signals.html b/third_party/polymer/components/core-signals/core-signals.html new file mode 100644 index 0000000..d742b09 --- /dev/null +++ b/third_party/polymer/components/core-signals/core-signals.html @@ -0,0 +1,84 @@ +<!-- +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"> +<script> +(function(){ + + Polymer({ + 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); + }); + +})(); +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-signals/demo.html b/third_party/polymer/components/core-signals/demo.html new file mode 100644 index 0000000..b3c4cc1 --- /dev/null +++ b/third_party/polymer/components/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/core-signals/index.html b/third_party/polymer/components/core-signals/index.html new file mode 100644 index 0000000..a003379 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/.bower.json b/third_party/polymer/components/core-splitter/.bower.json new file mode 100644 index 0000000..50ef0c8 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/README.md b/third_party/polymer/components/core-splitter/README.md new file mode 100644 index 0000000..d788648 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/bower.json b/third_party/polymer/components/core-splitter/bower.json new file mode 100644 index 0000000..62e3bf9 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/core-splitter.css b/third_party/polymer/components/core-splitter/core-splitter.css new file mode 100644 index 0000000..75d62d0 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/core-splitter.html b/third_party/polymer/components/core-splitter/core-splitter.html new file mode 100644 index 0000000..391349c --- /dev/null +++ b/third_party/polymer/components/core-splitter/core-splitter.html @@ -0,0 +1,147 @@ +<!-- +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}}"> + +<template> + + <link rel="stylesheet" href="core-splitter.css"> + +</template> +<script> + + 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(); + } + }); + +</script> +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-splitter/demo.html b/third_party/polymer/components/core-splitter/demo.html new file mode 100644 index 0000000..2cdb9d6 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/handle-h.svg b/third_party/polymer/components/core-splitter/handle-h.svg new file mode 100644 index 0000000..13dc623 --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/handle.svg b/third_party/polymer/components/core-splitter/handle.svg new file mode 100644 index 0000000..124412e --- /dev/null +++ b/third_party/polymer/components/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/core-splitter/index.html b/third_party/polymer/components/core-splitter/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-style/.bower.json b/third_party/polymer/components/core-style/.bower.json new file mode 100644 index 0000000..2b80b6a --- /dev/null +++ b/third_party/polymer/components/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/core-style/README.md b/third_party/polymer/components/core-style/README.md new file mode 100644 index 0000000..89f4546 --- /dev/null +++ b/third_party/polymer/components/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/core-style/bower.json b/third_party/polymer/components/core-style/bower.json new file mode 100644 index 0000000..6240018 --- /dev/null +++ b/third_party/polymer/components/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/core-style/core-style.html b/third_party/polymer/components/core-style/core-style.html new file mode 100644 index 0000000..d0aaf52 --- /dev/null +++ b/third_party/polymer/components/core-style/core-style.html @@ -0,0 +1,387 @@ +<!--
+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>
+<script>
+(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;
+ }
+
+});
+
+
+})();
+</script>
+</polymer-element>
diff --git a/third_party/polymer/components/core-style/demo.html b/third_party/polymer/components/core-style/demo.html new file mode 100644 index 0000000..0681c6c --- /dev/null +++ b/third_party/polymer/components/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/core-style/elements.html b/third_party/polymer/components/core-style/elements.html new file mode 100644 index 0000000..f09f2e5 --- /dev/null +++ b/third_party/polymer/components/core-style/elements.html @@ -0,0 +1,46 @@ +<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 noscript> + <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> + +<script> + CoreStyle.g.columns = 3; +</script> + +<polymer-element name="my-panel" vertical center center-justified layout noscript> + <template> + <core-style ref="my-panel"></core-style> + <content></content> + </template> +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-style/index.html b/third_party/polymer/components/core-style/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-style/my-theme.html b/third_party/polymer/components/core-style/my-theme.html new file mode 100644 index 0000000..5c6b43f --- /dev/null +++ b/third_party/polymer/components/core-style/my-theme.html @@ -0,0 +1,64 @@ +<link rel="import" href="core-style.html"> + +<script> + + CoreStyle.g.theme = { + colorOne: '#abcdef', + colorTwo: '#123456', + colorThree: '#224433' + } +</script> + +<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>
\ No newline at end of file diff --git a/third_party/polymer/components/core-toolbar/.bower.json b/third_party/polymer/components/core-toolbar/.bower.json new file mode 100644 index 0000000..f757185 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/README.md b/third_party/polymer/components/core-toolbar/README.md new file mode 100644 index 0000000..f1600d8 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/bower.json b/third_party/polymer/components/core-toolbar/bower.json new file mode 100644 index 0000000..d391679 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/core-toolbar.css b/third_party/polymer/components/core-toolbar/core-toolbar.css new file mode 100644 index 0000000..d9a050a --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/core-toolbar.html b/third_party/polymer/components/core-toolbar/core-toolbar.html new file mode 100644 index 0000000..5cb7369 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/demo.html b/third_party/polymer/components/core-toolbar/demo.html new file mode 100644 index 0000000..03a7ac0 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/index.html b/third_party/polymer/components/core-toolbar/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/core-toolbar/metadata.html b/third_party/polymer/components/core-toolbar/metadata.html new file mode 100644 index 0000000..e9a48b6 --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/.bower.json b/third_party/polymer/components/core-tooltip/.bower.json new file mode 100644 index 0000000..3abc499 --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/README.md b/third_party/polymer/components/core-tooltip/README.md new file mode 100644 index 0000000..22d55c1 --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/bower.json b/third_party/polymer/components/core-tooltip/bower.json new file mode 100644 index 0000000..4bd73aef --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/core-tooltip.css b/third_party/polymer/components/core-tooltip/core-tooltip.css new file mode 100644 index 0000000..09c0b3b --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/core-tooltip.html b/third_party/polymer/components/core-tooltip/core-tooltip.html new file mode 100644 index 0000000..76d7abc --- /dev/null +++ b/third_party/polymer/components/core-tooltip/core-tooltip.html @@ -0,0 +1,144 @@ +<!-- +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"> +<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> +<script> + + 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; + } + } + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/core-tooltip/demo.html b/third_party/polymer/components/core-tooltip/demo.html new file mode 100644 index 0000000..bdb7b8c --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/index.html b/third_party/polymer/components/core-tooltip/index.html new file mode 100644 index 0000000..484a759 --- /dev/null +++ b/third_party/polymer/components/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/core-tooltip/metadata.html b/third_party/polymer/components/core-tooltip/metadata.html new file mode 100644 index 0000000..157c995 --- /dev/null +++ b/third_party/polymer/components/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/core-transition/.bower.json b/third_party/polymer/components/core-transition/.bower.json new file mode 100644 index 0000000..dca4be3 --- /dev/null +++ b/third_party/polymer/components/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/core-transition/README.md b/third_party/polymer/components/core-transition/README.md new file mode 100644 index 0000000..c280251 --- /dev/null +++ b/third_party/polymer/components/core-transition/README.md @@ -0,0 +1,2 @@ +core-transition +=============== diff --git a/third_party/polymer/components/core-transition/bower.json b/third_party/polymer/components/core-transition/bower.json new file mode 100644 index 0000000..b994821 --- /dev/null +++ b/third_party/polymer/components/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/core-transition/core-transition-css.html b/third_party/polymer/components/core-transition/core-transition-css.html new file mode 100644 index 0000000..fd8d2fc --- /dev/null +++ b/third_party/polymer/components/core-transition/core-transition-css.html @@ -0,0 +1,221 @@ +<!-- +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"> +<template> + <link no-shim rel="stylesheet" href="core-transition-overlay.css"> +</template> +<script> + + 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); + } + + }); +</script> +</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> diff --git a/third_party/polymer/components/core-transition/core-transition-overlay.css b/third_party/polymer/components/core-transition/core-transition-overlay.css new file mode 100644 index 0000000..07b2d69 --- /dev/null +++ b/third_party/polymer/components/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/core-transition/core-transition.html b/third_party/polymer/components/core-transition/core-transition.html new file mode 100644 index 0000000..6b09672 --- /dev/null +++ b/third_party/polymer/components/core-transition/core-transition.html @@ -0,0 +1,140 @@ +<!-- +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"> + + <script> + 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); + } + + }); + </script> +</polymer-element>
\ No newline at end of file diff --git a/third_party/polymer/components/core-transition/demo.html b/third_party/polymer/components/core-transition/demo.html new file mode 100644 index 0000000..9efd403 --- /dev/null +++ b/third_party/polymer/components/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/core-transition/index.html b/third_party/polymer/components/core-transition/index.html new file mode 100644 index 0000000..8a75554 --- /dev/null +++ b/third_party/polymer/components/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/font-roboto/.bower.json b/third_party/polymer/components/font-roboto/.bower.json new file mode 100644 index 0000000..d6919f3 --- /dev/null +++ b/third_party/polymer/components/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/font-roboto/roboto.html b/third_party/polymer/components/font-roboto/roboto.html new file mode 100644 index 0000000..c379ebf --- /dev/null +++ b/third_party/polymer/components/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/paper-button/.bower.json b/third_party/polymer/components/paper-button/.bower.json new file mode 100644 index 0000000..bf90392 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/README.md b/third_party/polymer/components/paper-button/README.md new file mode 100644 index 0000000..75919a5 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/bower.json b/third_party/polymer/components/paper-button/bower.json new file mode 100644 index 0000000..951e47d --- /dev/null +++ b/third_party/polymer/components/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/paper-button/demo.html b/third_party/polymer/components/paper-button/demo.html new file mode 100644 index 0000000..fb71815 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/demo2.html b/third_party/polymer/components/paper-button/demo2.html new file mode 100644 index 0000000..29cbb32 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/index.html b/third_party/polymer/components/paper-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/metadata.html b/third_party/polymer/components/paper-button/metadata.html new file mode 100644 index 0000000..a532812 --- /dev/null +++ b/third_party/polymer/components/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/paper-button/paper-button.css b/third_party/polymer/components/paper-button/paper-button.css new file mode 100644 index 0000000..e8954ac --- /dev/null +++ b/third_party/polymer/components/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/paper-button/paper-button.html b/third_party/polymer/components/paper-button/paper-button.html new file mode 100644 index 0000000..87dbef7 --- /dev/null +++ b/third_party/polymer/components/paper-button/paper-button.html @@ -0,0 +1,211 @@ +<!-- +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"> + + <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> + + <script> + 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); + } + + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-checkbox/.bower.json b/third_party/polymer/components/paper-checkbox/.bower.json new file mode 100644 index 0000000..964e097 --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/README.md b/third_party/polymer/components/paper-checkbox/README.md new file mode 100644 index 0000000..374e62d --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/bower.json b/third_party/polymer/components/paper-checkbox/bower.json new file mode 100644 index 0000000..281773b --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/demo.html b/third_party/polymer/components/paper-checkbox/demo.html new file mode 100644 index 0000000..0b8b115 --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/index.html b/third_party/polymer/components/paper-checkbox/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/metadata.html b/third_party/polymer/components/paper-checkbox/metadata.html new file mode 100644 index 0000000..8aa1cef --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/paper-checkbox.css b/third_party/polymer/components/paper-checkbox/paper-checkbox.css new file mode 100644 index 0000000..4d636fd --- /dev/null +++ b/third_party/polymer/components/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/paper-checkbox/paper-checkbox.html b/third_party/polymer/components/paper-checkbox/paper-checkbox.html new file mode 100644 index 0000000..2c2421b --- /dev/null +++ b/third_party/polymer/components/paper-checkbox/paper-checkbox.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
+-->
+
+<!--
+`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">
+<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>
+<script>
+
+ 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'));
+ }
+
+ });
+
+</script>
+</polymer-element>
diff --git a/third_party/polymer/components/paper-dialog/.bower.json b/third_party/polymer/components/paper-dialog/.bower.json new file mode 100644 index 0000000..ae83584 --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/.gitignore b/third_party/polymer/components/paper-dialog/.gitignore new file mode 100644 index 0000000..9f7d5aa --- /dev/null +++ b/third_party/polymer/components/paper-dialog/.gitignore @@ -0,0 +1 @@ +vulcanized.html diff --git a/third_party/polymer/components/paper-dialog/README.md b/third_party/polymer/components/paper-dialog/README.md new file mode 100644 index 0000000..70c3e03 --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/bower.json b/third_party/polymer/components/paper-dialog/bower.json new file mode 100644 index 0000000..1cca8bc --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/demo.html b/third_party/polymer/components/paper-dialog/demo.html new file mode 100644 index 0000000..cba90ac --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/index.html b/third_party/polymer/components/paper-dialog/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/paper-dialog-transition.css b/third_party/polymer/components/paper-dialog/paper-dialog-transition.css new file mode 100644 index 0000000..6a55d2b --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/paper-dialog-transition.html b/third_party/polymer/components/paper-dialog/paper-dialog-transition.html new file mode 100644 index 0000000..f262a73 --- /dev/null +++ b/third_party/polymer/components/paper-dialog/paper-dialog-transition.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 href="../core-transition/core-transition-css.html" rel="import"> + +<polymer-element name="paper-dialog-transition" extends="core-transition-css"> + +<template> + <link no-shim href="paper-dialog-transition.css" rel="stylesheet"> +</template> + +<script> + Polymer({ + baseClass: 'paper-dialog-transition' + }); +</script> + +</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>
\ No newline at end of file diff --git a/third_party/polymer/components/paper-dialog/paper-dialog.css b/third_party/polymer/components/paper-dialog/paper-dialog.css new file mode 100644 index 0000000..73096be --- /dev/null +++ b/third_party/polymer/components/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/paper-dialog/paper-dialog.html b/third_party/polymer/components/paper-dialog/paper-dialog.html new file mode 100644 index 0000000..03df09e --- /dev/null +++ b/third_party/polymer/components/paper-dialog/paper-dialog.html @@ -0,0 +1,176 @@ +<!-- +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"> + + <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> + + <script> + + 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); + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/paper-fab/.bower.json b/third_party/polymer/components/paper-fab/.bower.json new file mode 100644 index 0000000..e3667a9 --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/README.md b/third_party/polymer/components/paper-fab/README.md new file mode 100644 index 0000000..a210f0f --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/bower.json b/third_party/polymer/components/paper-fab/bower.json new file mode 100644 index 0000000..4601add --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/demo.html b/third_party/polymer/components/paper-fab/demo.html new file mode 100644 index 0000000..6e2ac6c --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/demo2.html b/third_party/polymer/components/paper-fab/demo2.html new file mode 100644 index 0000000..d1b69c7 --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/index.html b/third_party/polymer/components/paper-fab/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/metadata.html b/third_party/polymer/components/paper-fab/metadata.html new file mode 100644 index 0000000..ef95232 --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/paper-fab.css b/third_party/polymer/components/paper-fab/paper-fab.css new file mode 100644 index 0000000..4f333e6 --- /dev/null +++ b/third_party/polymer/components/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/paper-fab/paper-fab.html b/third_party/polymer/components/paper-fab/paper-fab.html new file mode 100644 index 0000000..fb110d9 --- /dev/null +++ b/third_party/polymer/components/paper-fab/paper-fab.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 +--> + +<!-- +`<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"> + + <template> + + <link href="paper-fab.css" rel="stylesheet"> + + <shadow></shadow> + + </template> + + <script> + Polymer('paper-fab', { + + publish: { + + /** + * See [`<paper-button>`](../paper-button). + * + * @attribute raisedButton + * @type boolean + * @default true + */ + raisedButton: {value: true, reflect: true} + + } + + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-focusable/.bower.json b/third_party/polymer/components/paper-focusable/.bower.json new file mode 100644 index 0000000..8dcb240 --- /dev/null +++ b/third_party/polymer/components/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/paper-focusable/README.md b/third_party/polymer/components/paper-focusable/README.md new file mode 100644 index 0000000..ab2965a --- /dev/null +++ b/third_party/polymer/components/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/paper-focusable/bower.json b/third_party/polymer/components/paper-focusable/bower.json new file mode 100644 index 0000000..324f9d2 --- /dev/null +++ b/third_party/polymer/components/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/paper-focusable/demo.html b/third_party/polymer/components/paper-focusable/demo.html new file mode 100644 index 0000000..9fd58a2 --- /dev/null +++ b/third_party/polymer/components/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/paper-focusable/paper-focusable.html b/third_party/polymer/components/paper-focusable/paper-focusable.html new file mode 100644 index 0000000..e478168 --- /dev/null +++ b/third_party/polymer/components/paper-focusable/paper-focusable.html @@ -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 +--> + +<!-- +/** + * @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}}"> + + <template> + <style> + :host([disabled]) { + pointer-events: none; + } + </style> + <content></content> + </template> + + <script> + 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; + } + + }); + + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-icon-button/.bower.json b/third_party/polymer/components/paper-icon-button/.bower.json new file mode 100644 index 0000000..8de328e --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/README.md b/third_party/polymer/components/paper-icon-button/README.md new file mode 100644 index 0000000..633a113 --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/bower.json b/third_party/polymer/components/paper-icon-button/bower.json new file mode 100644 index 0000000..828d0ab --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/demo.html b/third_party/polymer/components/paper-icon-button/demo.html new file mode 100644 index 0000000..bd42d52 --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/index.html b/third_party/polymer/components/paper-icon-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/metadata.html b/third_party/polymer/components/paper-icon-button/metadata.html new file mode 100644 index 0000000..c2e399c --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/paper-icon-button.css b/third_party/polymer/components/paper-icon-button/paper-icon-button.css new file mode 100644 index 0000000..313e627 --- /dev/null +++ b/third_party/polymer/components/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/paper-icon-button/paper-icon-button.html b/third_party/polymer/components/paper-icon-button/paper-icon-button.html new file mode 100644 index 0000000..9e53016 --- /dev/null +++ b/third_party/polymer/components/paper-icon-button/paper-icon-button.html @@ -0,0 +1,87 @@ +<!-- +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"> + + <template> + + <link href="paper-icon-button.css" rel="stylesheet"> + + <shadow></shadow> + + </template> + + <script> + + 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); + } + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/paper-icon-button/pulse-ink.css b/third_party/polymer/components/paper-icon-button/pulse-ink.css new file mode 100644 index 0000000..8d11bc1 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/.bower.json b/third_party/polymer/components/paper-input/.bower.json new file mode 100644 index 0000000..690374f --- /dev/null +++ b/third_party/polymer/components/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/paper-input/.gitignore b/third_party/polymer/components/paper-input/.gitignore new file mode 100644 index 0000000..9f7d5aa --- /dev/null +++ b/third_party/polymer/components/paper-input/.gitignore @@ -0,0 +1 @@ +vulcanized.html diff --git a/third_party/polymer/components/paper-input/README.md b/third_party/polymer/components/paper-input/README.md new file mode 100644 index 0000000..f7617c5 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/bower.json b/third_party/polymer/components/paper-input/bower.json new file mode 100644 index 0000000..0ad8185 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/demo.html b/third_party/polymer/components/paper-input/demo.html new file mode 100644 index 0000000..457d587 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/demo2.html b/third_party/polymer/components/paper-input/demo2.html new file mode 100644 index 0000000..2fbdd7f --- /dev/null +++ b/third_party/polymer/components/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/paper-input/error-100.png b/third_party/polymer/components/paper-input/error-100.png Binary files differnew file mode 100644 index 0000000..ab5a6b1 --- /dev/null +++ b/third_party/polymer/components/paper-input/error-100.png diff --git a/third_party/polymer/components/paper-input/error-200.png b/third_party/polymer/components/paper-input/error-200.png Binary files differnew file mode 100644 index 0000000..ede8dd5 --- /dev/null +++ b/third_party/polymer/components/paper-input/error-200.png diff --git a/third_party/polymer/components/paper-input/index.html b/third_party/polymer/components/paper-input/index.html new file mode 100644 index 0000000..b90ad27 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/metadata.html b/third_party/polymer/components/paper-input/metadata.html new file mode 100644 index 0000000..703692d --- /dev/null +++ b/third_party/polymer/components/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/paper-input/paper-input.css b/third_party/polymer/components/paper-input/paper-input.css new file mode 100644 index 0000000..31120f6 --- /dev/null +++ b/third_party/polymer/components/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/paper-input/paper-input.html b/third_party/polymer/components/paper-input/paper-input.html new file mode 100644 index 0000000..613cca6 --- /dev/null +++ b/third_party/polymer/components/paper-input/paper-input.html @@ -0,0 +1,433 @@ +<!-- +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}}"> + + <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> + + <script> + + (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'); + + } + } + + }); + + }()); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/paper-item/.bower.json b/third_party/polymer/components/paper-item/.bower.json new file mode 100644 index 0000000..4e9282f --- /dev/null +++ b/third_party/polymer/components/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/paper-item/README.md b/third_party/polymer/components/paper-item/README.md new file mode 100644 index 0000000..b7ec0ce --- /dev/null +++ b/third_party/polymer/components/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/paper-item/bower.json b/third_party/polymer/components/paper-item/bower.json new file mode 100644 index 0000000..cf71cef --- /dev/null +++ b/third_party/polymer/components/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/paper-item/demo.html b/third_party/polymer/components/paper-item/demo.html new file mode 100644 index 0000000..2bf6108 --- /dev/null +++ b/third_party/polymer/components/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/paper-item/index.html b/third_party/polymer/components/paper-item/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-item/metadata.html b/third_party/polymer/components/paper-item/metadata.html new file mode 100644 index 0000000..eb16cdc --- /dev/null +++ b/third_party/polymer/components/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/paper-item/paper-item.css b/third_party/polymer/components/paper-item/paper-item.css new file mode 100644 index 0000000..d6a191e --- /dev/null +++ b/third_party/polymer/components/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/paper-item/paper-item.html b/third_party/polymer/components/paper-item/paper-item.html new file mode 100644 index 0000000..ceb1b8a --- /dev/null +++ b/third_party/polymer/components/paper-item/paper-item.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 +--> + +<!-- +@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> + + <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> + + <script> + 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); + } + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-menu-button/.bower.json b/third_party/polymer/components/paper-menu-button/.bower.json new file mode 100644 index 0000000..4f19c57 --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/README.md b/third_party/polymer/components/paper-menu-button/README.md new file mode 100644 index 0000000..aa0f3bf --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/bower.json b/third_party/polymer/components/paper-menu-button/bower.json new file mode 100644 index 0000000..8dfe0ac --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/demo.html b/third_party/polymer/components/paper-menu-button/demo.html new file mode 100644 index 0000000..ca65df4 --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/index.html b/third_party/polymer/components/paper-menu-button/index.html new file mode 100644 index 0000000..f83dd36 --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/metadata.html b/third_party/polymer/components/paper-menu-button/metadata.html new file mode 100644 index 0000000..f9db2d6 --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/paper-menu-button-overlay.html b/third_party/polymer/components/paper-menu-button/paper-menu-button-overlay.html new file mode 100644 index 0000000..b959136 --- /dev/null +++ b/third_party/polymer/components/paper-menu-button/paper-menu-button-overlay.html @@ -0,0 +1,87 @@ +<!-- +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"> + <script> + 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(); + } + } + + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.css b/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.css new file mode 100644 index 0000000..6d1ba6e --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/paper-menu-button-transition.html b/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.html new file mode 100644 index 0000000..7c6307f --- /dev/null +++ b/third_party/polymer/components/paper-menu-button/paper-menu-button-transition.html @@ -0,0 +1,118 @@ +<!-- +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"> + <template> + <link no-shim href="paper-menu-button-transition.css" rel="stylesheet"> + </template> + <script> + 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); + } + }, + + }); + </script> +</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> diff --git a/third_party/polymer/components/paper-menu-button/paper-menu-button.css b/third_party/polymer/components/paper-menu-button/paper-menu-button.css new file mode 100644 index 0000000..62971c7 --- /dev/null +++ b/third_party/polymer/components/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/paper-menu-button/paper-menu-button.html b/third_party/polymer/components/paper-menu-button/paper-menu-button.html new file mode 100644 index 0000000..73c5101 --- /dev/null +++ b/third_party/polymer/components/paper-menu-button/paper-menu-button.html @@ -0,0 +1,128 @@ +<!-- +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" noscript> +<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}}"> + <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> + <script> + 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; + } + + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-progress/.bower.json b/third_party/polymer/components/paper-progress/.bower.json new file mode 100644 index 0000000..b87b3e8 --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/README.md b/third_party/polymer/components/paper-progress/README.md new file mode 100644 index 0000000..549e768 --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/bower.json b/third_party/polymer/components/paper-progress/bower.json new file mode 100644 index 0000000..3d1ab87 --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/demo.html b/third_party/polymer/components/paper-progress/demo.html new file mode 100644 index 0000000..7a17bea --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/index.html b/third_party/polymer/components/paper-progress/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/metadata.html b/third_party/polymer/components/paper-progress/metadata.html new file mode 100644 index 0000000..95148c7 --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/paper-progress.css b/third_party/polymer/components/paper-progress/paper-progress.css new file mode 100644 index 0000000..7c03daa --- /dev/null +++ b/third_party/polymer/components/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/paper-progress/paper-progress.html b/third_party/polymer/components/paper-progress/paper-progress.html new file mode 100644 index 0000000..74c171a --- /dev/null +++ b/third_party/polymer/components/paper-progress/paper-progress.html @@ -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 +--> + +<!-- +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"> + + <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> + + <script> + + 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; + } + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/paper-radio-button/.bower.json b/third_party/polymer/components/paper-radio-button/.bower.json new file mode 100644 index 0000000..c4afd55 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/README.md b/third_party/polymer/components/paper-radio-button/README.md new file mode 100644 index 0000000..79b1009c --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/bower.json b/third_party/polymer/components/paper-radio-button/bower.json new file mode 100644 index 0000000..0aaca42 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/demo.html b/third_party/polymer/components/paper-radio-button/demo.html new file mode 100644 index 0000000..837a88e --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/index.html b/third_party/polymer/components/paper-radio-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/metadata.html b/third_party/polymer/components/paper-radio-button/metadata.html new file mode 100644 index 0000000..4c92b3e --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/paper-radio-button.css b/third_party/polymer/components/paper-radio-button/paper-radio-button.css new file mode 100644 index 0000000..9f91f08 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-button/paper-radio-button.html b/third_party/polymer/components/paper-radio-button/paper-radio-button.html new file mode 100644 index 0000000..9ececf9 --- /dev/null +++ b/third_party/polymer/components/paper-radio-button/paper-radio-button.html @@ -0,0 +1,148 @@ +<!-- +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"> +<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> +<script> + + 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); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-radio-group/.bower.json b/third_party/polymer/components/paper-radio-group/.bower.json new file mode 100644 index 0000000..e04aecd --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/README.md b/third_party/polymer/components/paper-radio-group/README.md new file mode 100644 index 0000000..1024a7b --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/bower.json b/third_party/polymer/components/paper-radio-group/bower.json new file mode 100644 index 0000000..d0fd455 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/demo.html b/third_party/polymer/components/paper-radio-group/demo.html new file mode 100644 index 0000000..07625e5 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/index.html b/third_party/polymer/components/paper-radio-group/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/metadata.html b/third_party/polymer/components/paper-radio-group/metadata.html new file mode 100644 index 0000000..590071c --- /dev/null +++ b/third_party/polymer/components/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/paper-radio-group/paper-radio-group.html b/third_party/polymer/components/paper-radio-group/paper-radio-group.html new file mode 100644 index 0000000..1a7d007 --- /dev/null +++ b/third_party/polymer/components/paper-radio-group/paper-radio-group.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 +--> + +<!-- +`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"> + + <template> + + <style> + + :host { + display: inline-block; + } + + polyfill-next-selector { content: ':host > *'; } + ::content > * { + padding: 12px; + } + + </style> + + <shadow></shadow> + + </template> + + <script> + + Polymer('paper-radio-group', { + + selectedAttribute: 'checked', + activateEvent: 'paper-radio-button-activate' + + }); + + </script> + +</polymer-element> diff --git a/third_party/polymer/components/paper-ripple/.bower.json b/third_party/polymer/components/paper-ripple/.bower.json new file mode 100644 index 0000000..6e3121b --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/README.md b/third_party/polymer/components/paper-ripple/README.md new file mode 100644 index 0000000..a4ca437 --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/bower.json b/third_party/polymer/components/paper-ripple/bower.json new file mode 100644 index 0000000..590723f --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/demo.html b/third_party/polymer/components/paper-ripple/demo.html new file mode 100644 index 0000000..baef84f --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/index.html b/third_party/polymer/components/paper-ripple/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/metadata.html b/third_party/polymer/components/paper-ripple/metadata.html new file mode 100644 index 0000000..565ad23 --- /dev/null +++ b/third_party/polymer/components/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/paper-ripple/paper-ripple.html b/third_party/polymer/components/paper-ripple/paper-ripple.html new file mode 100644 index 0000000..96026d4 --- /dev/null +++ b/third_party/polymer/components/paper-ripple/paper-ripple.html @@ -0,0 +1,427 @@ +<!-- +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"> +<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> +<script> + + (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; + } + } + + }); + + })(); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-ripple/raw.html b/third_party/polymer/components/paper-ripple/raw.html new file mode 100644 index 0000000..85b465d --- /dev/null +++ b/third_party/polymer/components/paper-ripple/raw.html @@ -0,0 +1,790 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<script> + +// +// 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); +</script> + +<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+pQuXhlIGHNfYJgDoyGaAoCtRJwNbApE2McwS4P/0GQJKtgYuA7YHGGCMfAO4GjgfurQJMArYFthtj5KU0yEohBxhJqANsWg7uTXEBUKh5HWzJ+NTBgyXIn6YVJZmoZJio5BryGKjkce9NNwKMp+Tj/KN/RJsAmADYdMm7CtRnA0cCK4BVwMp05OdrgCFgGNhQ/qrDAwMDo5j05Mr1QuAtJV4eQfY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L2asx66hjTdIPsODolqRAfhtsBh450jhtGQcYB3iCAfKTXWQEIdnSC4k0ZUKT/URsWl9NAS9agv357FzqSVZ+H1psE7CkjlPwxXgKMBGLgMwfU11kEi+QPMAI5iLoxiyU2mx5qhI50xqa8KIeLFmmi3ob3Mw258Hi5xFsJq7lAWI8JtZ/rNdKsk8dhXl/Xfwe34c3lK+iecDnMX9RM0VpDyu6iC7MnjwHf5lhCjABC3EVvmGyA+lL9aYAVayRp5HVcVq36efYHtFfFx2GNcxfVNjI3ViYa2JSeKTgc9pjVLCvYjyqoZEDxkXjoMo3blxoRCfhxIKt2xVfixOItIqmAx/DnunoyhWKn9MeVnQRXdgIfjEW6moYycuwYOmOyBBNnILxkYs+rM5jvdZyn+MKJ93iqmgY8+uNvvs6bYN4B9O9QF5JqqgZeGzkAfIR8Z0p47xoHGAcoF5SXtSFhUjyEY28BIoTbKKMYNasgRftjr2wuZ1FSwlZXipYDOck/P1qeZO5iOxltWOVEZrwoirmNa/Q+i2s0WwWSYXc/7nnZ9PoCGkFEHlRq99H84vSO6hhhCmlJnmJ/LMoJToejzZh9GCUBdjjRruScZwiada1Y5kHsEhKQyMHrIp2lBcN08RfFBs5Jb9F0qx9Ypn1adm0kWM3nUhGrPISyW0ReErKNlLQyDG1OdZ9UUPHVUz+WNQTXz4fs/vrAOZijbwQq4bo6EulCDS/1FqH/TPi2jxAxZUvYcek5UjegHm1UqKbStGx6FuKF/kQLRo5PsgZGys/YouO5UGr2EAbqQPYmTLOi8YBxgHqJc+L5tHckpWVOOU0zKbzsLf67E6H73ZPJPKiF1FgMrswe7yjvChO9eQBqo7ajhe1kpa8KHLTndEGo7zoCc1SG29kGG/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> +<canvas class="paper button" id="button_borderless_square"></canvas> + + +</div> +<div class="container"><canvas onClick="toggleDialog()" class="paper button_floating floating recenteringTouch" id="button_floating" value="★"></canvas></div> +</body> +</html> diff --git a/third_party/polymer/components/paper-shadow/.bower.json b/third_party/polymer/components/paper-shadow/.bower.json new file mode 100644 index 0000000..6e07f7a --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/README.md b/third_party/polymer/components/paper-shadow/README.md new file mode 100644 index 0000000..87ed91b --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/bower.json b/third_party/polymer/components/paper-shadow/bower.json new file mode 100644 index 0000000..939c7c5 --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/demo.html b/third_party/polymer/components/paper-shadow/demo.html new file mode 100644 index 0000000..1718ba3 --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/index.html b/third_party/polymer/components/paper-shadow/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/metadata.html b/third_party/polymer/components/paper-shadow/metadata.html new file mode 100644 index 0000000..07e6edd --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/paper-shadow.css b/third_party/polymer/components/paper-shadow/paper-shadow.css new file mode 100644 index 0000000..e5cfec7 --- /dev/null +++ b/third_party/polymer/components/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/paper-shadow/paper-shadow.html b/third_party/polymer/components/paper-shadow/paper-shadow.html new file mode 100644 index 0000000..6aa4d3b --- /dev/null +++ b/third_party/polymer/components/paper-shadow/paper-shadow.html @@ -0,0 +1,213 @@ +<!-- +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"> + + <template> + + <link no-shim href="paper-shadow.css" rel="stylesheet"> + + </template> + + <script> + 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; + } + + }); + </script> +</polymer-element> diff --git a/third_party/polymer/components/paper-slider/.bower.json b/third_party/polymer/components/paper-slider/.bower.json new file mode 100644 index 0000000..47d1176 --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/README.md b/third_party/polymer/components/paper-slider/README.md new file mode 100644 index 0000000..84ae564 --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/bower.json b/third_party/polymer/components/paper-slider/bower.json new file mode 100644 index 0000000..66cf9df --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/demo.html b/third_party/polymer/components/paper-slider/demo.html new file mode 100644 index 0000000..d5358b4 --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/index.html b/third_party/polymer/components/paper-slider/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/metadata.html b/third_party/polymer/components/paper-slider/metadata.html new file mode 100644 index 0000000..bf83104 --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/paper-slider.css b/third_party/polymer/components/paper-slider/paper-slider.css new file mode 100644 index 0000000..d201acf --- /dev/null +++ b/third_party/polymer/components/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/paper-slider/paper-slider.html b/third_party/polymer/components/paper-slider/paper-slider.html new file mode 100644 index 0000000..f2587bf --- /dev/null +++ b/third_party/polymer/components/paper-slider/paper-slider.html @@ -0,0 +1,310 @@ +<!-- +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"> +<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> +<script> + + 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'); + } + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-tabs/.bower.json b/third_party/polymer/components/paper-tabs/.bower.json new file mode 100644 index 0000000..cb017f2 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/README.md b/third_party/polymer/components/paper-tabs/README.md new file mode 100644 index 0000000..09c73c6 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/bower.json b/third_party/polymer/components/paper-tabs/bower.json new file mode 100644 index 0000000..c11003a --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/demo.html b/third_party/polymer/components/paper-tabs/demo.html new file mode 100644 index 0000000..3067fe7 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/index.html b/third_party/polymer/components/paper-tabs/index.html new file mode 100644 index 0000000..93257d3 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/metadata.html b/third_party/polymer/components/paper-tabs/metadata.html new file mode 100644 index 0000000..2bf4c83 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/paper-tab.css b/third_party/polymer/components/paper-tabs/paper-tab.css new file mode 100644 index 0000000..74ad3d1 --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/paper-tab.html b/third_party/polymer/components/paper-tabs/paper-tab.html new file mode 100644 index 0000000..8104a84 --- /dev/null +++ b/third_party/polymer/components/paper-tabs/paper-tab.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 +--> + +<!-- +`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"> +<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> +<script> + + Polymer('paper-tab', { + + /** + * If true, ink ripple effect is disabled. + * + * @attribute noink + * @type boolean + * @default false + */ + noink: false + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-tabs/paper-tabs.css b/third_party/polymer/components/paper-tabs/paper-tabs.css new file mode 100644 index 0000000..b247c1c --- /dev/null +++ b/third_party/polymer/components/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/paper-tabs/paper-tabs.html b/third_party/polymer/components/paper-tabs/paper-tabs.html new file mode 100644 index 0000000..28c4f29 --- /dev/null +++ b/third_party/polymer/components/paper-tabs/paper-tabs.html @@ -0,0 +1,128 @@ +<!-- +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"> +<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> +<script> + + 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'); + } + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-toast/.bower.json b/third_party/polymer/components/paper-toast/.bower.json new file mode 100644 index 0000000..363fdff --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/README.md b/third_party/polymer/components/paper-toast/README.md new file mode 100644 index 0000000..9db6676 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/bower.json b/third_party/polymer/components/paper-toast/bower.json new file mode 100644 index 0000000..3c34334 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/demo.html b/third_party/polymer/components/paper-toast/demo.html new file mode 100644 index 0000000..a614973 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/index.html b/third_party/polymer/components/paper-toast/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/metadata.html b/third_party/polymer/components/paper-toast/metadata.html new file mode 100644 index 0000000..7b65bd7 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/paper-toast.css b/third_party/polymer/components/paper-toast/paper-toast.css new file mode 100644 index 0000000..a677104 --- /dev/null +++ b/third_party/polymer/components/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/paper-toast/paper-toast.html b/third_party/polymer/components/paper-toast/paper-toast.html new file mode 100644 index 0000000..df62e50 --- /dev/null +++ b/third_party/polymer/components/paper-toast/paper-toast.html @@ -0,0 +1,258 @@ +<!-- +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"> + +<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> +<script> + + (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; + } + + }); + + })(); + +</script> +</polymer-element> diff --git a/third_party/polymer/components/paper-toggle-button/.bower.json b/third_party/polymer/components/paper-toggle-button/.bower.json new file mode 100644 index 0000000..cdb3e3b --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/README.md b/third_party/polymer/components/paper-toggle-button/README.md new file mode 100644 index 0000000..314fd66 --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/bower.json b/third_party/polymer/components/paper-toggle-button/bower.json new file mode 100644 index 0000000..67a2f4c --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/demo.html b/third_party/polymer/components/paper-toggle-button/demo.html new file mode 100644 index 0000000..72fc07a --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/index.html b/third_party/polymer/components/paper-toggle-button/index.html new file mode 100644 index 0000000..58856f3 --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/metadata.html b/third_party/polymer/components/paper-toggle-button/metadata.html new file mode 100644 index 0000000..bdddd00 --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/paper-toggle-button.css b/third_party/polymer/components/paper-toggle-button/paper-toggle-button.css new file mode 100644 index 0000000..3ff5e23 --- /dev/null +++ b/third_party/polymer/components/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/paper-toggle-button/paper-toggle-button.html b/third_party/polymer/components/paper-toggle-button/paper-toggle-button.html new file mode 100644 index 0000000..7a4b107 --- /dev/null +++ b/third_party/polymer/components/paper-toggle-button/paper-toggle-button.html @@ -0,0 +1,125 @@ +<!-- +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"> +<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> +<script> + + 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'); + } + + }); + +</script> +</polymer-element> diff --git a/third_party/polymer/platform/.bower.json b/third_party/polymer/components/platform/.bower.json index cec6b4b..8d1af04 100644 --- a/third_party/polymer/platform/.bower.json +++ b/third_party/polymer/components/platform/.bower.json @@ -21,6 +21,6 @@ "commit": "413707498b62d2c66f923dcac6809d56e7d6dab6" }, "_source": "git://github.com/Polymer/platform.git", - "_target": ">=0.3.0 <1.0.0", + "_target": "0.3.5", "_originalSource": "Polymer/platform" }
\ No newline at end of file diff --git a/third_party/polymer/platform/README.md b/third_party/polymer/components/platform/README.md index 65b661e..65b661e 100644 --- a/third_party/polymer/platform/README.md +++ b/third_party/polymer/components/platform/README.md diff --git a/third_party/polymer/platform/bower.json b/third_party/polymer/components/platform/bower.json index 8d2c51d..8d2c51d 100644 --- a/third_party/polymer/platform/bower.json +++ b/third_party/polymer/components/platform/bower.json diff --git a/third_party/polymer/platform/build.log b/third_party/polymer/components/platform/build.log index 90d5a17..90d5a17 100644 --- a/third_party/polymer/platform/build.log +++ b/third_party/polymer/components/platform/build.log diff --git a/third_party/polymer/platform/platform.js b/third_party/polymer/components/platform/platform.js index 3cd0e51..3cd0e51 100644 --- a/third_party/polymer/platform/platform.js +++ b/third_party/polymer/components/platform/platform.js diff --git a/third_party/polymer/components/platform/platform.js.map b/third_party/polymer/components/platform/platform.js.map new file mode 100644 index 0000000..bf670fb --- /dev/null +++ b/third_party/polymer/components/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,aAE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EAAA,KAOA,GAAA,OAAA,iBAAA,eAAA,UAAA,CACA,GAAA,GAAA,SAAA,UAAA,UACA,UAAA,UAAA,WAAA,SAAA,EAAA,GACA,GAAA,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/polymer/.bower.json b/third_party/polymer/components/polymer/.bower.json index 0ccd0d1..0ccd0d1 100644 --- a/third_party/polymer/polymer/.bower.json +++ b/third_party/polymer/components/polymer/.bower.json diff --git a/third_party/polymer/polymer/README.md b/third_party/polymer/components/polymer/README.md index 236a88c..236a88c 100644 --- a/third_party/polymer/polymer/README.md +++ b/third_party/polymer/components/polymer/README.md diff --git a/third_party/polymer/polymer/bower.json b/third_party/polymer/components/polymer/bower.json index faff32b..faff32b 100644 --- a/third_party/polymer/polymer/bower.json +++ b/third_party/polymer/components/polymer/bower.json diff --git a/third_party/polymer/polymer/build.log b/third_party/polymer/components/polymer/build.log index b39ce40..b39ce40 100644 --- a/third_party/polymer/polymer/build.log +++ b/third_party/polymer/components/polymer/build.log diff --git a/third_party/polymer/polymer/layout.html b/third_party/polymer/components/polymer/layout.html index 46dec0a..46dec0a 100644 --- a/third_party/polymer/polymer/layout.html +++ b/third_party/polymer/components/polymer/layout.html diff --git a/third_party/polymer/polymer/polymer.html b/third_party/polymer/components/polymer/polymer.html index 424006a..424006a 100644 --- a/third_party/polymer/polymer/polymer.html +++ b/third_party/polymer/components/polymer/polymer.html diff --git a/third_party/polymer/polymer/polymer.js b/third_party/polymer/components/polymer/polymer.js index 8d46df3..8d46df3 100644 --- a/third_party/polymer/polymer/polymer.js +++ b/third_party/polymer/components/polymer/polymer.js diff --git a/third_party/polymer/polymer/polymer.js.map b/third_party/polymer/components/polymer/polymer.js.map index 81afef8..81afef8 100644 --- a/third_party/polymer/polymer/polymer.js.map +++ b/third_party/polymer/components/polymer/polymer.js.map diff --git a/third_party/polymer/platform/platform.js.map b/third_party/polymer/platform/platform.js.map deleted file mode 100644 index b4dd299..0000000 --- a/third_party/polymer/platform/platform.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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,EAAA,EAAA,MAAA,KACA,EAAA,KAAA,EAAA,EAAA,IAAA,EAAA,KAAA,IAEA,IAAA,GAAA,SAAA,eACA,SAAA,cAAA,6BACA,IAAA,EAEA,IAAA,GAAA,GADA,EAAA,EAAA,WACA,EAAA,EAAA,EAAA,EAAA,OAAA,IACA,EAAA,EAAA,GACA,QAAA,EAAA,OACA,EAAA,EAAA,MAAA,EAAA,QAAA,EAIA,GAAA,KACA,EAAA,IAAA,MAAA,KAAA,QAAA,SAAA,GACA,OAAA,SAAA,IAAA,IAMA,EAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,SAEA,EAAA,OADA,WAAA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AAA,EAAA,KAOA,GAAA,OAAA,iBAAA,eAAA,UAAA,CACA,GAAA,GAAA,SAAA,UAAA,UACA,UAAA,UAAA,WAAA,SAAA,EAAA,GACA,GAAA,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 this.set(key, undefined);\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 // 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 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 (global.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 (global.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 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\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 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 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\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 matchesLocalName(el, 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, result, p, arg0, arg1) {\n var el = node.firstElementChild;\n while (el) {\n if (p(el, arg0, arg1))\n result[result.length++] = el;\n findElements(el, result, p, arg0, arg1);\n el = el.nextElementSibling;\n }\n return result;\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 var SelectorsInterface = {\n querySelector: function(selector) {\n return findOne(this, selector);\n },\n querySelectorAll: function(selector) {\n return findElements(this, new NodeList(), matchesSelector, selector);\n }\n };\n\n var GetElementsByInterface = {\n getElementsByTagName: function(localName) {\n var result = new HTMLCollection();\n if (localName === '*')\n return findElements(this, result, matchesEveryThing);\n\n return findElements(this, result,\n matchesTagName,\n localName,\n localName.toLowerCase());\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\n if (ns === '') {\n ns = null;\n } else if (ns === '*') {\n if (localName === '*')\n return findElements(this, result, matchesEveryThing);\n return findElements(this, result, matchesLocalName, localName);\n }\n\n if (localName === '*')\n return findElements(this, result, matchesNameSpace, ns);\n\n return findElements(this, result, matchesLocalNameNS, ns, localName);\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\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 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 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 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 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]*['|\"]([^'\"]*)['|\"][^}]*}([^{]*?){/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentRuleRe = /\\/\\*\\s@polyfill-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentRuleRe = /(polyfill-rule)[^}]*(content\\:[\\s]*['|\"]([^'\"]*)['|\"][^;]*;)[^}]*}/gim,\n // TODO(sorvell): remove either content or comment\n cssCommentUnscopedRuleRe = /\\/\\*\\s@polyfill-unscoped-rule([^*]*\\*+([^/*][^*]*\\*+)*)\\//gim,\n cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\\:[\\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 head.appendChild(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 scope.URL = jURL;\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\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 document.head.appendChild(elt);\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 document.head.appendChild(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 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.CustomElements = window.CustomElements || {flags:{}};"," /*\r\nCopyright 2013 The Polymer Authors. All rights reserved.\r\nUse of this source code is governed by a BSD-style\r\nlicense that can be found in the LICENSE file.\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 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/**\n * Implements `document.register`\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 // remove 'unresolved' attr, which is a standin for :unresolved.\n element.removeAttribute('unresolved');\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 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// 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 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope){\n\n// 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) {\n var e = document.createEvent('HTMLEvents');\n e.initEvent(inType, true, true);\n return e;\n };\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();\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 if (directives.if) {\n deps.hasIf = true;\n deps.ifOneTime = directives.if.onlyOneTime;\n deps.ifValue = processBinding(IF, directives.if, template, model);\n\n // oneTime if & predicate is false. nothing else to do.\n if (deps.ifOneTime && !deps.ifValue) {\n this.updateIteratedValue();\n return;\n }\n\n if (!deps.ifOneTime)\n deps.ifValue.open(this.updateIteratedValue, 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 if (!deps.oneTime)\n deps.value.open(this.updateIteratedValue, this);\n\n this.updateIteratedValue();\n },\n\n updateIteratedValue: function() {\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 var value = this.deps.value;\n if (!this.deps.oneTime)\n value = value.discardChanges();\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/reproduce.sh b/third_party/polymer/reproduce.sh new file mode 100755 index 0000000..5bf0184 --- /dev/null +++ b/third_party/polymer/reproduce.sh @@ -0,0 +1,15 @@ +#!/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 + +cd "$(dirname "$0")" + +rm -rf components +bower install +rm -rf components/web-animations-js +find components/core-list -type f -exec chmod -x {} \; + |