Removed polymer, js & js_util from Observatory deps

web_components updated to 0.12.3

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//2312183003 .
diff --git a/packages/js/AUTHORS b/packages/js/AUTHORS
deleted file mode 100644
index d773d3a..0000000
--- a/packages/js/AUTHORS
+++ /dev/null
@@ -1,8 +0,0 @@
-# Below is a list of people and organizations that have contributed
-# to the Dart project. Names should be added to the list like so:
-#
-#   Name/Organization <email address>
-
-Google Inc.
-
-Alexandre Ardhuin <alexandre.ardhuin@gmail.com>
diff --git a/packages/js/CHANGELOG.md b/packages/js/CHANGELOG.md
deleted file mode 100644
index 4ef2ebc..0000000
--- a/packages/js/CHANGELOG.md
+++ /dev/null
@@ -1,3 +0,0 @@
-## 0.6.0
-
- * Version 0.6.0 is a complete rewrite of `package:js`.
diff --git a/packages/js/LICENSE b/packages/js/LICENSE
deleted file mode 100644
index abbb072..0000000
--- a/packages/js/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright 2012, the Dart project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of Google Inc. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/js/PATENTS b/packages/js/PATENTS
deleted file mode 100644
index 6954196..0000000
--- a/packages/js/PATENTS
+++ /dev/null
@@ -1,23 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Dart Project.
-
-Google hereby grants to you a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this
-section) patent license to make, have made, use, offer to sell, sell,
-import, transfer, and otherwise run, modify and propagate the contents
-of this implementation of Dart, where such license applies only to
-those patent claims, both currently owned by Google and acquired in
-the future, licensable by Google that are necessarily infringed by
-this implementation of Dart. This grant does not include claims that
-would be infringed only as a consequence of further modification of
-this implementation. If you or your agent or exclusive licensee
-institute or order or agree to the institution of patent litigation
-against any entity (including a cross-claim or counterclaim in a
-lawsuit) alleging that this implementation of Dart or any code
-incorporated within this implementation of Dart constitutes direct or
-contributory patent infringement, or inducement of patent
-infringement, then any patent rights granted to you under this License
-for this implementation of Dart shall terminate as of the date such
-litigation is filed.
diff --git a/packages/js/README.md b/packages/js/README.md
deleted file mode 100644
index 3ba66d1..0000000
--- a/packages/js/README.md
+++ /dev/null
@@ -1,107 +0,0 @@
-Methods and annotations to specify interoperability with JavaScript APIs.
-
-*This packages requires Dart SDK 1.13.0.*
-
-*This is beta software. Please files [issues].*
-
-### Adding the dependency
-
-Add the following to your `pubspec.yaml`:
-
-```yaml
-dependencies:
-  js: ^0.6.0
-```
-
-### Example
-
-See the [Chart.js Dart API](https://github.com/google/chartjs.dart/) for an
-end-to-end example.
-
-### Usage
-
-#### Calling methods
-
-```dart
-// Calls invoke JavaScript `JSON.stringify(obj)`.
-@JS("JSON.stringify")
-external String stringify(obj);
-```
-
-#### Classes and Namespaces
-
-```dart
-@JS('google.maps')
-library maps;
-
-// Invokes the JavaScript getter `google.maps.map`.
-external Map get map;
-
-// `new Map` invokes JavaScript `new google.maps.Map(location)`
-@JS()
-class Map {
-  external Map(Location location);
-  external Location getLocation();
-}
-
-// `new Location(...)` invokes JavaScript `new google.maps.LatLng(...)`
-//
-// We recommend against using custom JavaScript names whenever
-// possible. It is easier for users if the JavaScript names and Dart names
-// are consistent.
-@JS("LatLng")
-class Location {
-  external Location(num lat, num lng);
-}
-```
-
-#### JavaScript object literals
-
-Many JavaScript APIs take an object literal as an argument. For example:
-```js
-// JavaScript
-printOptions({responsive: true});
-```
-
-If you want to use `printOptions` from Dart, you cannot simply pass a Dart `Map`
-object – they are are "opaque" in JavaScript.
-
-
-Instead, create a Dart class with both the `@JS()` and
-`@anonymous` annotations.
-
-```dart
-// Dart
-void main() {
-  printOptions(new Options(responsive: true));
-}
-
-@JS()
-external printOptions(Options options);
-
-@JS()
-@anonymous
-class Options {
-  external bool get responsive;
-
-  external factory Options({bool responsive});
-}
-```
-
-#### Passing functions to JavaScript.
-
-If you are passing a Dart function to a JavaScript API, you must wrap it using
-`allowInterop` or `allowInteropCaptureThis`.
-
-## Contributing and Filing Bugs
-
-Please file bugs and features requests on the [Github issue tracker][issues].
-
-We also love and accept community contributions, from API suggestions to pull requests.
-Please file an issue before beginning work so we can discuss the design and implementation.
-We are trying to create issues for all current and future work, so if something there intrigues you (or you need it!) join in on the discussion.
-
-Code contributors must sign the
-[Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1).
-
-[issues]: https://goo.gl/j3rzs0
diff --git a/packages/js/example/README.md b/packages/js/example/README.md
deleted file mode 100644
index 6e5403e..0000000
--- a/packages/js/example/README.md
+++ /dev/null
@@ -1 +0,0 @@
-See the [Chart.js Dart API](https://github.com/google/chartjs.dart/) for a usage example.
diff --git a/packages/js/lib/js.dart b/packages/js/lib/js.dart
deleted file mode 100644
index 17b1ded..0000000
--- a/packages/js/lib/js.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Allows interoperability with Javascript APIs.
-library js;
-
-export 'dart:js' show allowInterop, allowInteropCaptureThis;
-
-/// A metadata annotation that indicates that a Library, Class, or member is
-/// implemented directly in JavaScript. All external members of a class or
-/// library with this annotation implicitly have it as well.
-///
-/// Specifying [name] customizes the JavaScript name to use. By default the
-/// dart name is used. It is not valid to specify a custom [name] for class
-/// instance members.
-class JS {
-  final String name;
-  const JS([this.name]);
-}
-
-class _Anonymous {
-  const _Anonymous();
-}
-
-/// A metadata annotation that indicates that a @JS annotated class is
-/// structural and does not have a known JavaScript prototype.
-///
-/// Factory constructors for anonymous JavaScript classes desugar to creating
-/// JavaScript object literals with name-value pairs corresponding to the
-/// parameter names and values.
-const _Anonymous anonymous = const _Anonymous();
diff --git a/packages/js/lib/src/varargs.dart b/packages/js/lib/src/varargs.dart
deleted file mode 100644
index 6d316b3..0000000
--- a/packages/js/lib/src/varargs.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Declarations for variable arguments support
-/// (rest params and spread operator).
-///
-/// These are currently *not* supported by dart2js or Dartium.
-library js.varargs;
-
-class _Rest {
-  const _Rest();
-}
-
-/// Annotation to tag ES6 rest parameters (https://goo.gl/r0bJ1K).
-///
-/// This is *not* supported by dart2js or Dartium (yet).
-///
-/// This is meant to be used by the Dart Dev Compiler
-/// when compiling helper functions of its runtime to ES6.
-///
-/// The following function:
-///
-///     foo(a, b, @rest others) { ... }
-///
-/// Will be compiled to ES6 code like the following:
-///
-///     function foo(a, b, ...others) { ... }
-///
-/// Which is roughly equivalent to the following ES5 code:
-///
-///     function foo(a, b/*, ...others*/) {
-///       var others = [].splice.call(arguments, 2);
-///       ...
-///     }
-///
-const _Rest rest = const _Rest();
-
-/// Intrinsic function that maps to the ES6 spread operator
-/// (https://goo.gl/NedHKr).
-///
-/// This is *not* supported by dart2js or Dartium (yet),
-/// and *cannot* be called at runtime.
-///
-/// This is meant to be used by the Dart Dev Compiler when
-/// compiling its runtime to ES6.
-///
-/// The following expression:
-///
-///     foo(a, b, spread(others))
-///
-/// Will be compiled to ES6 code like the following:
-///
-///     foo(a, b, ...others)
-///
-/// Which is roughly equivalent to the following ES5 code:
-///
-///     foo.apply(null, [a, b].concat(others))
-///
-dynamic spread(args) {
-  throw new StateError(
-      'The spread function cannot be called, '
-      'it should be compiled away.');
-}
diff --git a/packages/js/pubspec.yaml b/packages/js/pubspec.yaml
deleted file mode 100644
index 7555876..0000000
--- a/packages/js/pubspec.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-name: js
-version: 0.6.0
-authors:
-- Dart Team <misc@dartlang.org>
-description: Access JavaScript from Dart.
-homepage: https://github.com/dart-lang/sdk/tree/master/pkg/js
-environment:
-  sdk: '>=1.13.0 <2.0.0'
-dev_dependencies:
-  browser: '^0.10.0+2'
diff --git a/packages/js_util/.gitignore b/packages/js_util/.gitignore
deleted file mode 100644
index 4e73421..0000000
--- a/packages/js_util/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-# Files and directories created by pub
-.packages
-.pub/
-build/
-packages
-pubspec.lock
-
-# Files created by dart2js
-*.dart.js
-*.part.js
-*.js.deps
-*.js.map
-*.info.json
-
-# Directory created by dartdoc
-doc/
-
-# JetBrains IDEs
-.idea/
-*.iml
-*.ipr
-*.iws
diff --git a/packages/js_util/.travis.yml b/packages/js_util/.travis.yml
deleted file mode 100644
index f3fa6c3..0000000
--- a/packages/js_util/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: dart
-sudo: false
-dart:
-  - stable
-  - dev
-with_content_shell: true
-before_install:
-  - export DISPLAY=:99.0
-  - sh -e /etc/init.d/xvfb start
-script: ./tool/travis.sh
-env:
-  - DARTANALYZER_FLAGS=--fatal-warnings
diff --git a/packages/js_util/CHANGELOG.md b/packages/js_util/CHANGELOG.md
deleted file mode 100644
index 995eb98..0000000
--- a/packages/js_util/CHANGELOG.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Changelog
-
-## 0.2.0
-
-- Add @JS annotations on library directives to support 1.16.0
-- Add the minified version of js_util.js
-
-## 0.1.0
-
-- Initial version
diff --git a/packages/js_util/LICENSE b/packages/js_util/LICENSE
deleted file mode 100644
index 906df54..0000000
--- a/packages/js_util/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2016, Fluidic Inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-    * Neither the name of the <organization> nor the
-      names of its contributors may be used to endorse or promote products
-      derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/js_util/README.md b/packages/js_util/README.md
deleted file mode 100644
index 412af74..0000000
--- a/packages/js_util/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# js_util
-
-[![Build Status](https://travis-ci.org/fluidic/js_util.svg?branch=master)](https://travis-ci.org/fluidic/js_util)
-
-Utilities to access JavaScript from Dart.
-
-* toJS(o): Converts a Dart object to a JavaScript object.
-* newObject(): Creates a new JavaScript object.
-* defineProperty(o, String prop, PropertyDescription desc): A wrapper for [Object.defineProperty][defineProperty]
-* getValue(o, String prop): Returns `o[prop]`.
-* setValue(o, String prop, value): Performs `o[prop] = value`.
-
-These utilities are of great help if a JavaScript API takes a JavaScript object
-with keys that are not fixed because [js][js] package does not let you create a
-JavaScript object without declaring a Dart class with `@JS()` and `@anonymous`.
-
-[defineProperty]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
-[js]: https://pub.dartlang.org/packages/js
-
-## Getting Started
-
-Include `js_util.js` in index.html to use js_util functions.
-
-```html
-<html>
-  <head>
-    <script async src="packages/js_util/dist/js_util.js"></script>
-    <script async src="packages/browser/dart.js"></script>
-  </head>
-</html>
-```
-
-## Usage
-
-A simple usage example:
-
-```dart
-final obj = newObject();
-defineProperty(obj, 'foo', new PropertyDescription(enumerable: true, value: 1));
-defineProperty(obj, 'bar', new PropertyDescription(enumerable: false, value: 2));
-```
-
-```dart
-final obj = newObject();
-setValue(obj, 'foo', 1);
-setValue(obj, 'bar', 2);
-
-print(getValue(obj, 'foo')); // 1
-print(getValue(obj, 'bar')); // 2
-```
-
-```dart
-final jsObj = toJS({
-  'people': [
-    {'firstName': 'Kwang Yul', 'lastName': 'Seo'},
-    {'firstName': 'DoHyung', 'lastName': 'Kim'},
-    {'firstName': 'Kyusun', 'lastName': 'Kim'}
-  ]
-});
-
-final people = getValue(jsObj, 'people');
-print(getValue(people[0], 'firstName')); // 'Kwang Yul'
-```
-
-## Features and bugs
-
-Please file feature requests and bugs at the [issue tracker][tracker].
-
-[tracker]: https://github.com/ProtoCatTeam/js_util/issues
diff --git a/packages/js_util/example/js_util.dart b/packages/js_util/example/js_util.dart
deleted file mode 100644
index ce87db1..0000000
--- a/packages/js_util/example/js_util.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-import 'dart:html';
-
-import 'package:js_util/js_util.dart';
-
-void main() {
-  final jsObj = toJS({
-    'people': [
-      {'firstName': 'Kwang Yul', 'lastName': 'Seo'},
-      {'firstName': 'DoHyung', 'lastName': 'Kim'},
-      {'firstName': 'Kyusun', 'lastName': 'Kim'}
-    ]
-  });
-
-  final people = getValue(jsObj, 'people');
-  final firstPerson = people[0];
-  final text =
-      '${getValue(firstPerson, "firstName")} ${getValue(firstPerson, "lastName")}';
-  document.querySelector('#container').innerHtml = text;
-}
-
diff --git a/packages/js_util/example/js_util.html b/packages/js_util/example/js_util.html
deleted file mode 100644
index 1a26173..0000000
--- a/packages/js_util/example/js_util.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-  <head>
-    <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>js_util Demo</title>
-    <script src="packages/js_util/dist/js_util.js"></script>
-    <script async src="packages/browser/dart.js"></script>
-  </head>
-  <body>
-    <h1>js_util Demo</h1>
-
-    <div id="container"></div>
-
-    <script async type="application/dart" src="js_util.dart"></script>
-  </body>
-</html>
diff --git a/packages/js_util/lib/dist/js_util.js b/packages/js_util/lib/dist/js_util.js
deleted file mode 100644
index b839dd1..0000000
--- a/packages/js_util/lib/dist/js_util.js
+++ /dev/null
@@ -1,23 +0,0 @@
-(function (mod) {
-  if (typeof exports == "object" && typeof module == "object") // CommonJS
-      module.exports = mod();
-  else if (typeof define == "function" && define.amd) // AMD
-      return define([], mod);
-  else // Plain browser env
-      this.JsUtil = mod();
-})(function () {
-  "use strict";
-
-  function JsUtil() {
-  }
-
-  JsUtil.newObject = function () {
-    return {};
-  };
-
-  JsUtil.getValue = function (obj, prop) {
-    return obj[prop];
-  };
-
-  return JsUtil;
-});
\ No newline at end of file
diff --git a/packages/js_util/lib/dist/js_util.min.js b/packages/js_util/lib/dist/js_util.min.js
deleted file mode 100644
index c53607e..0000000
--- a/packages/js_util/lib/dist/js_util.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(mod){if(typeof exports=="object"&&typeof module=="object")module.exports=mod();else if(typeof define=="function"&&define.amd)return define([],mod);else this.JsUtil=mod()})(function(){"use strict";function JsUtil(){}JsUtil.newObject=function(){return{}};JsUtil.getValue=function(obj,prop){return obj[prop]};return JsUtil});
diff --git a/packages/js_util/lib/js_util.dart b/packages/js_util/lib/js_util.dart
deleted file mode 100644
index b0899dc..0000000
--- a/packages/js_util/lib/js_util.dart
+++ /dev/null
@@ -1,3 +0,0 @@
-library js_util;
-
-export 'src/js_util_base.dart';
diff --git a/packages/js_util/lib/src/js_util_base.dart b/packages/js_util/lib/src/js_util_base.dart
deleted file mode 100644
index 7f35991..0000000
--- a/packages/js_util/lib/src/js_util_base.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-@JS()
-library js_util.base;
-
-import 'package:js/js.dart';
-import 'package:quiver_iterables/iterables.dart';
-
-// js_util library uses the technique described in
-// https://github.com/dart-lang/sdk/issues/25053
-// because dart2js compiler does not support [] operator.
-
-@JS()
-@anonymous
-class PropertyDescription {
-  external factory PropertyDescription(
-      {bool configurable, bool enumerable, value, bool writable});
-}
-
-/// A wrapper for https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty
-@JS('Object.defineProperty')
-external void defineProperty(o, String prop, PropertyDescription description);
-
-/// Returns `o[prop]`.
-@JS('JsUtil.getValue')
-external getValue(o, String prop);
-
-/// Creates a new JavaScript object.
-@JS('JsUtil.newObject')
-external newObject();
-
-/// Performs `o[key] = value`.
-void setValue(o, String key, value) {
-  defineProperty(o, key, new PropertyDescription(value: value));
-}
-
-/// Converts a Dart object to a JavaScript object.
-///
-/// For example, you can convert a Dart [Map] to a JavaScript object.
-///
-///     final jsObj = toJS({
-///       'people': [
-///         {'firstName': 'Kwang Yul', 'lastName': 'Seo'},
-///         {'firstName': 'DoHyung', 'lastName': 'Kim'},
-///         {'firstName': 'Kyusun', 'lastName': 'Kim'}
-///       ]
-///     });
-///
-toJS(o) {
-  if (o is Map) {
-    final newObj = newObject();
-    for (final keyValuePair in zip([o.keys, o.values])) {
-      setValue(newObj, keyValuePair[0], toJS(keyValuePair[1]));
-    }
-    return newObj;
-  } else if (o is List) {
-    return o.map((e) => toJS(e)).toList();
-  } else {
-    return o;
-  }
-}
diff --git a/packages/js_util/pubspec.yaml b/packages/js_util/pubspec.yaml
deleted file mode 100644
index fc54d80..0000000
--- a/packages/js_util/pubspec.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: js_util
-description: Utilities to access JavaScript from Dart.
-version: 0.2.0
-author: Fluidic Team <dev@fluidic.io>
-homepage: https://github.com/fluidic/js_util
-
-environment:
-  sdk: '>=1.8.0 <2.0.0'
-
-dependencies:
-  js: '>=0.6.0 <0.7.0'
-  quiver_iterables: '>=1.0.0 <2.0.0'
-
-dev_dependencies:
-  browser: '>=0.10.0 <0.11.0'
-  test: '>=0.12.0 <0.13.0'
diff --git a/packages/js_util/test/js_util_test.dart b/packages/js_util/test/js_util_test.dart
deleted file mode 100644
index 8252c23..0000000
--- a/packages/js_util/test/js_util_test.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-@JS()
-library js_util.test;
-
-import 'package:js/js.dart';
-import 'package:js_util/js_util.dart';
-import 'package:test/test.dart';
-
-@JS('JSON.stringify')
-external String stringify(Object json);
-
-void main() {
-  group('js_util tests', () {
-    test('defineProperty test', () {
-      final obj = newObject();
-      defineProperty(
-          obj, 'foo', new PropertyDescription(enumerable: true, value: 1));
-      defineProperty(
-          obj, 'bar', new PropertyDescription(enumerable: false, value: 2));
-
-      expect(stringify(obj), '{"foo":1}');
-    });
-
-    test('newObject/setValue/getValue test', () {
-      final obj = newObject();
-      setValue(obj, 'foo', 1);
-      setValue(obj, 'bar', 2);
-
-      expect(getValue(obj, 'foo'), equals(1));
-      expect(getValue(obj, 'bar'), equals(2));
-    });
-
-    test('toJS test', () {
-      final jsObj = toJS({
-        'people': [
-          {'firstName': 'Kwang Yul', 'lastName': 'Seo'},
-          {'firstName': 'DoHyung', 'lastName': 'Kim'},
-          {'firstName': 'Kyusun', 'lastName': 'Kim'}
-        ]
-      });
-
-      final people = getValue(jsObj, 'people');
-      expect(getValue(people[0], 'firstName'), equals('Kwang Yul'));
-      expect(getValue(people[0], 'lastName'), equals('Seo'));
-      expect(getValue(people[1], 'firstName'), equals('DoHyung'));
-      expect(getValue(people[1], 'lastName'), equals('Kim'));
-      expect(getValue(people[2], 'firstName'), equals('Kyusun'));
-      expect(getValue(people[2], 'lastName'), equals('Kim'));
-    });
-  });
-}
diff --git a/packages/js_util/test/js_util_test.html b/packages/js_util/test/js_util_test.html
deleted file mode 100644
index 42b369d..0000000
--- a/packages/js_util/test/js_util_test.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-    <link rel="x-dart-test" href="js_util_test.dart">
-    <script src="packages/js_util/dist/js_util.js"></script>
-    <script src="packages/test/dart.js"></script>
-</head>
-<body>
-</body>
-</html>
\ No newline at end of file
diff --git a/packages/js_util/tool/travis.sh b/packages/js_util/tool/travis.sh
deleted file mode 100755
index 466fa45..0000000
--- a/packages/js_util/tool/travis.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2015, Google Inc. Please see the AUTHORS file for details.
-# All rights reserved. Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Fast fail the script on failures.
-set -e
-
-# Verify that the libraries are error and warning-free.
-echo "Running dartanalyzer..."
-libs=$(find lib -maxdepth 1 -type f -name '*.dart')
-dartanalyzer $DARTANALYZER_FLAGS $libs test/js_util_test.dart
-
-# Run the tests.
-echo "Running tests..."
-pub run test:test -p content-shell
diff --git a/packages/polymer/.gitignore b/packages/polymer/.gitignore
deleted file mode 100644
index 92b608d..0000000
--- a/packages/polymer/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-# Don’t commit the following directories created by pub.
-.pub
-/build/
-packages
-
-# Or the files created by dart2js.
-*.dart.js
-*.dart.precompiled.js
-*.js_
-*.js.deps
-*.js.map
-*.sw?
-.idea/
-*.iml
-
-# Include when developing application packages.
-pubspec.lock
diff --git a/packages/polymer/.status b/packages/polymer/.status
deleted file mode 100644
index c14c9f6..0000000
--- a/packages/polymer/.status
+++ /dev/null
@@ -1,188 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Don't run any test-like files that show up in packages directories. It
-# shouldn't be necessary to run "pub install" in these packages, but if you do
-# it shouldn't break the tests.
-*/packages/*/*: Skip
-*/*/packages/*/*: Skip
-*/*/*/packages/*/*: Skip
-*/*/*/*/packages/*/*: Skip
-*/*/*/*/*/packages/*/*: Skip
-
-example/scoped_style/*: Skip # non-test files ending with '_test'
-build/test/build/*: Skip     # tests that don't need to be ran after pub-build
-test/import_test: Skip # Issue 17873
-build/test/import_test: Skip # Issue 17873
-
-# We need a hook in package-bots to invoke pub-build in nested folders before we
-# can run these tests:
-e2e_test/*: Skip
-build/e2e_test/*: Skip
-
-build/test/bind_mdv_test: Pass, Timeout # need to investigate
-test/build/polymer_smoke_generator_test: Pass, Slow
-
-[ $compiler == dart2js ]
-test/*: Skip  # raw tests only meant to be run in dartium. Other browsers run
-              # the output of pub-build
-
-[ $compiler == none && ($runtime == dartium || $runtime == ContentShellOnAndroid) ]
-test/attr_deserialize_test: Pass, RuntimeError # Issue 18931
-test/attr_mustache_test: Pass, RuntimeError # Issue 18931
-test/bind_test: Pass, RuntimeError # Issue 18931
-test/computed_properties_test: Pass, RuntimeError # Issue 18931
-test/custom_event_test: Pass, RuntimeError # Issue 18931
-test/entered_view_test: Pass, RuntimeError # Issue 18931
-test/event_binding_release_handler_test: Pass, RuntimeError # Issue 18931
-test/event_controller_test: Pass, RuntimeError # Issue 21012
-test/event_handlers_test: Pass, RuntimeError # Issue 18931
-test/event_path_test: Pass, RuntimeError # Issue 18931
-test/event_path_declarative_test: Pass, RuntimeError, Timeout # Issue 18931
-test/events_test: Pass, RuntimeError # Issue 18931
-test/force_ready_test: Pass, RuntimeError # Issue 18931
-test/inject_bound_html_test: Pass, RuntimeError # Issue 18931
-test/instance_attrs_test: Pass, RuntimeError # Issue 18931
-test/js_custom_event_test: Pass, RuntimeError # Issue 18931
-test/js_interop_test: Pass, RuntimeError # Issue 18931
-test/nested_binding_test: Pass, RuntimeError # Issue 18931
-test/noscript_test: Pass, RuntimeError # Issue 18931
-test/web_components_less_test: Pass, RuntimeError # Issue 18931
-test/prop_attr_bind_reflection_test: Pass, RuntimeError # Issue 18931
-test/prop_attr_reflection_test: Pass, RuntimeError # Issue 18931
-test/property_change_test: Pass, Timeout # Issue 18931
-test/publish_attributes_test: Pass, RuntimeError # Issue 18931
-test/publish_inherited_properties_test: Pass, RuntimeError # Issue 18931
-test/register_test: Pass, RuntimeError # Issue 18931
-test/take_attributes_test: Pass, RuntimeError # Issue 18931
-test/template_attr_template_test: Pass, RuntimeError # Issue 18931
-test/template_distribute_dynamic_test: Pass, RuntimeError # Issue 18931
-test/two_way_bind_test: Pass, RuntimeError # Issue 18931
-
-[ $compiler == dart2js && $runtime == ff && $system == windows ]
-build/test/layout_test: RuntimeError # Issue 8
-
-[ $compiler == none && ($runtime == dartium) && $mode == debug ]
-test/instance_attrs_test: Skip # Issue 19496
-
-[ $compiler == none && $runtime == dartium && $system == windows ]
-test/property_observe_test: Skip # Sometimes times out. Issue 19326
-test/bind_properties_test: Skip # Sometimes times out. Issue 19326
-
-[ $runtime == vm && $mode == debug]
-test/build/all_phases_test: Skip # Slow
-
-[ $runtime == vm && ( $arch == simarm || $arch == simmips ) ]
-test/build/all_phases_test: Skip # Slow
-test/build/polymer_smoke_generator_test: Skip # Slow
-
-[ $compiler == dart2js ]
-test/build/unique_message_test: Skip # Intended only as a vm test.
-
-[ $checked && $runtime == drt ]
-test/event_handlers_test: Pass, RuntimeError # Issue 19190
-
-[ $runtime == vm || $runtime == d8 || $runtime == jsshell ]
-example: Skip # Uses dart:html
-e2e_test: Skip # Uses dart:html
-test/auto_binding_test: Skip # uses dart:html
-test/attr_deserialize_test: Skip # uses dart:html
-test/attr_mustache_test: Skip #uses dart:html
-test/bind_test: Skip # uses dart:html
-test/bind_mdv_test: Skip # uses dart:html
-test/bind_properties_test: Skip # uses dart:html
-test/build/log_injector_test: Skip # uses dart:html
-test/computed_properties_test: Skip # uses dart:html
-test/custom_event_test: Skip # uses dart:html
-test/entered_view_test: Skip # uses dart:html
-test/event_binding_release_handler_test: Skip #uses dart:html
-test/event_controller_test: Skip #uses dart:html
-test/event_handlers_test: Skip #uses dart:html
-test/event_path_declarative_test: Skip #uses dart:html
-test/event_path_test: Skip #uses dart:html
-test/events_test: Skip #uses dart:html
-test/force_ready_test: Skip # uses dart:html
-test/import_test: Skip # uses dart:html
-test/inject_bound_html_test: Skip # uses dart:html
-test/instance_attrs_test: Skip #uses dart:html
-test/js_custom_event_test: Skip #uses dart:html
-test/js_interop_test: Skip #uses dart:html
-test/layout_test: Skip #uses dart:html
-test/nested_binding_test: Skip # uses dart:html
-test/noscript_test: Skip #uses dart:html
-test/web_components_less_test: Skip #uses dart:html
-test/prop_attr_bind_reflection_test: Skip #uses dart:html
-test/prop_attr_reflection_test: Skip #uses dart:html
-test/property_change_test: Skip # uses dart:html
-test/property_observe_test: Skip #uses dart:html
-test/publish_attributes_test: Skip #uses dart:html
-test/publish_inherited_properties_test: Skip #uses dart:html
-test/register_test: Skip #uses dart:html
-test/sort_registration_test: Skip #uses dart:html
-test/take_attributes_test: Skip #uses dart:html
-test/template_attr_template_test: Skip #uses dart:html
-test/template_distribute_dynamic_test: Skip #uses dart:html
-test/two_way_bind_test: Skip #uses dart:html
-test/unbind_test: Skip # uses dart:html
-test/when_polymer_ready_test: Skip # uses dart:html
-build/test/*: Skip     # tests that don't need to be ran after pub-build
-
-[ $ie ]
-build/test/noscript_test: RuntimeError, Pass # Issue 13260
-build/test/template_attr_template_test: RuntimeError # Issue 20897
-build/test/sort_registration_test: RuntimeError # Issue 18
-
-[ $runtime == ie10 ]
-e2e_test/*: Pass, RuntimeError # Issue 19265
-build/test/event_handlers_test: Pass, Timeout # Issue 19327
-
-[ $runtime == safari ]
-build/test/js_interop_test: Pass, RuntimeError # Issue 20075
-
-[ $runtime == safari || $ie ]
-build/test/two_way_bind_test: Pass, RuntimeError # Issue 20075
-
-
-[ $compiler == dartanalyzer || $compiler == dart2analyzer ]
-# These tests are runtime negative but statically positive, so we skip
-# them in the analyzer.
-e2e_test/canonicalization: Skip
-e2e_test/experimental_boot: Skip
-
-[ $compiler == dart2js && $runtime == none]
-e2e_test/canonicalization: Skip
-e2e_test/experimental_boot: Skip
-
-[ $compiler == dart2js && $browser ]
-example/component: Skip # Issue 13198
-e2e_test/canonicalization/test/dev1_test: Fail, OK # tests development only behavior
-e2e_test/canonicalization/test/dev2_test: Fail, OK # tests development only behavior
-e2e_test/canonicalization/test/dev3_test: Fail, OK # tests development only behavior
-e2e_test/canonicalization/test/dir/dev1_test: Fail, OK # tests development only behavior
-e2e_test/canonicalization/test/dir/dev2_test: Fail, OK # tests development only behavior
-e2e_test/bad_import1: RuntimeError # Issue 17596
-e2e_test/bad_import2: RuntimeError # Issue 17596
-e2e_test/bad_import3: Fail, OK # tests broken import
-
-[ $browser ]
-test/build/all_phases_test: Skip               # vm only test
-test/build/build_log_combiner_test: Skip       # vm only test
-test/build/html_finalizer_test: Skip           # vm only test
-test/build/index_page_builder_test: Skip       # vm only test
-test/build/linter_test: Skip                   # vm only test
-test/build/polyfill_injector_test: Skip        # vm only test
-test/build/polymer_smoke_generator_test: Skip  # vm only test
-test/build/static_clean_test: Skip             # vm only test
-test/build/unique_message_test: Skip           # vm only test
-test/build/utils_test: Skip                    # vm only test
-
-test/unbind_test: Pass, Fail # Issue 15259
-
-[ $compiler == none && ( $runtime == dartium || $runtime == drt || $runtime == ContentShellOnAndroid) ]
-e2e_test/canonicalization/test/deploy1_test: Fail, OK # tests deploy only behavior
-e2e_test/canonicalization/test/deploy2_test: Fail, OK # tests deploy only behavior
-e2e_test/canonicalization/test/deploy3_test: Fail, OK # tests deploy only behavior
-e2e_test/canonicalization/test/dir/dev2_test: RuntimeError # Issue 17596
-e2e_test/canonicalization/test/dir/deploy1_test: Fail, OK # tests deploy only behavior
-e2e_test/canonicalization/test/dir/deploy2_test: Fail, OK # tests deploy only behavior
diff --git a/packages/polymer/AUTHORS b/packages/polymer/AUTHORS
deleted file mode 100644
index 0617765..0000000
--- a/packages/polymer/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-# Names should be added to this file with this pattern:
-#
-# For individuals:
-#   Name <email address>
-#
-# For organizations:
-#   Organization <fnmatch pattern>
-#
-Google Inc. <*@google.com>
diff --git a/packages/polymer/CHANGELOG.md b/packages/polymer/CHANGELOG.md
deleted file mode 100644
index 7b7dcfe..0000000
--- a/packages/polymer/CHANGELOG.md
+++ /dev/null
@@ -1,465 +0,0 @@
-#### 0.16.3+3
-  * Inject the polyfills after any `<base>` tags in the head.
-
-#### 0.16.3+2
-  * Fix invalid warning about missing polymer.html import from the linter.
-  * Update logging package to `<0.12.0`.
-
-#### 0.16.3+1
-  * Update observe to 0.13.1.
-
-#### 0.16.3
-  * Update analyzer to <0.26.0.
-
-#### 0.16.2
-  * Add support for the new `link[rel="x-dart-test"]` tags from the `test`
-    package to the transformer.
-  * The `Future` returned from the default `main` method in
-    `package:polymer/init.dart` now guarantees that it will not complete until
-    all `@initMethod` and `@whenPolymerReady` functions have been executed. This
-    is to support writing tests inside these methods using the new `test`
-    package.
-  * Fix the bootstrap file to return the original result of main.
-
-#### 0.16.1+4
-  * Use `polymer_interop` for everything polymer js related. Projects which only
-  provide/use wrappers around js elements should be able to switch to using that
-  package instead of this one.
-
-#### 0.16.1+3
-  * Update polymer js version to 0.5.5.
-
-#### 0.16.1+2
-  * Update pubspec from `html5lib` to `html`.
-
-#### 0.16.1+1
-  * Switch `html5lib` package dependency to `html`.
-
-#### 0.16.1
-  * Added `@whenPolymerReady` annotation for functions. This will call the
-    function once `Polymer.onReady` completes, reducing the boilerplate in entry
-    points to the following:
-    
-        import 'package:polymer/polymer.dart';
-        export 'package:polymer/init.dart';
-        
-        @whenPolymerReady
-        void onReady() {
-          /// Custom setup code here.
-        }
-
-#### 0.16.0+7
-  * Switch to using `initWebComponents` internally which gives better guarantees
-    around development time ordering of initializers. This should fix most
-    issues related to element registration order.
-
-#### 0.16.0+6
-  * Update `args` constraint.
-  * Pass `bindingStartDelimiters` to the `ImportInlinerTransformer` so it can
-    handle bindings in urls appropriately,
-    [#35](https://github.com/dart-lang/polymer-dart/issues/35).
-
-#### 0.16.0+5
-  * Update `web_components` constraint.
-
-#### 0.16.0+4
-  * Fix static configuration for exported libraries.
-
-#### 0.16.0+3
-  * Increase upper bound of `smoke` package to `<0.4.0`.
-
-#### 0.16.0+2
-  * Update the polyfill injector to work properly for entry points that live in
-    sub-folders.
-
-#### 0.16.0+1
-  * Update analyzer and code_transformers versions and use new mock sdk from
-    code_transformers.
-
-#### 0.16.0
-  * `initPolymer` now returns a `Future<Zone>` instead of a `Zone`. This will
-    likely affect most polymer applications.
-
-    Given a current program:
-
-        main() => initPolymer().run(realMain);
-        realMain() => ...
-
-    This should be translated to:
-    
-        main() => initPolymer().then((zone) => zone.run(realMain));
-        realMain() => ...
-
-    Or alternatively, you can use an @initMethod:
-
-        main() => initPolymer();    
-
-        @initMethod
-        realMain() => ...
-
-  * Dropped support for the experimental bootstrap.
-  * The `polymer` transformer is now integrated with the `initialize`
-    transformer. This means you can now use `@HtmlImport` on library directives.
-    This allows producers of elements to declare their own html dependencies so
-    consumers don't have to know about your html imports at all. See
-    [web_components 0.10.2](https://github.com/dart-lang/web-components/blob/master/CHANGELOG.md#0102)
-    for more information on @HtmlImport.
-  * The `startPolymer` method no longer takes a `deployMode` argument. This is
-    meant as an internal-only method and should not affect apps. It also now
-    returns a `Future`.
-  * The transformer has been heavily refactored and may behave slightly
-    differently. Please file any bugs related to this at
-    https://github.com/dart-lang/polymer-dart/issues/new.
-
-#### 0.15.5+4
-  * Fix for [#23](https://github.com/dart-lang/polymer-dart/issues/23) (0.15.5+3
-    missed an invocation of the observe transformer).
-
-#### 0.15.5+3
-  * Pass more state to the observe transformer so it won't output log files in
-    release mode.
-
-#### 0.15.5+2
-  * Update duplicate css file message.
-
-#### 0.15.5+1
-  * Changes order in which CustomTags are registered to guarantee that the order
-    is deterministic and that within a library superclasses are registered
-    before subclasses. This fixes
-    [17](https://github.com/dart-lang/polymer-dart/issues/17).
-
-#### 0.15.5
-  * Update to polymer js version
-    [0.5.2](https://github.com/Polymer/polymer/releases/tag/0.5.2). This fixes
-    [11](https://github.com/dart-lang/polymer-dart/issues/11).
-
-#### 0.15.4
-  * Fix template if when using template attribute
-    [209](https://github.com/Polymer/TemplateBinding/issues/209).
-  * Renamed `injectBoundHTML` to `injectBoundHtml` and changed its signature to
-    use named instead of positional optional arguments. Also added support for
-    custom `NodeValidator` and/or `TreeSanitizer`. The old version still exists
-    for now with an `@deprecated` annotation.
-
-#### 0.15.3+1
-  * Fix logic for detecting when the compiler is linting within an
-    `auto-binding-dart` template element. This removes some false positive
-    warnings.
-    
-#### 0.15.3
-  * Narrow the constraint on observe to ensure that new features are reflected
-    in polymer's version.
-
-#### 0.15.2
-  * Upgraded to polymer js version
-    [0.5.1](https://github.com/Polymer/polymer/releases/tag/0.5.1).
-    **Dart Note**: Since dirty checking is only a development feature for
-    Polymer Dart, we did not include the functionality to stop dirty checks in
-    inactive windows.
-  * `polymer.js` is now the unminified version, and `polymer.min.js` is the
-    minified version.
-  * Fixed bug where polymer js was creating instances of extended elements in
-    order to check if they had been registered. All dart custom elements now get
-    registered with polymer js using the HTMLElement prototype.
-
-#### 0.15.1+5
-  * Increase code_transformers lower bound and use shared transformers from it.
-
-#### 0.15.1+4
-  * Fix double-registration bug when using exports
-    [21439](http://dartbug.com/21439).
-
-#### 0.15.1+3
-  * Make sure that `dart_support.js` is always appended after `platform.js`,
-    [21435](http://dartbug.com/21435).
-
-#### 0.15.1+2
-  * Handle and warn about cases where a script file is included twice from the
-    same entrypoint [21332](http://dartbug.com/21332).
-
-#### 0.15.1+1
-  * Fix typo in error message polymer#42
-
-#### 0.15.1
-  * Upgraded to polymer [0.4.2][]
-  * No need to include dart_support.js in your entrypoints anymore.
-
-#### 0.15.0+1
-  * Widen web_components version constraint.
-
-#### 0.15.0
-  * Upgraded to polymer 0.4.1
-  * Added Polymer.forceReady method. This forces a ready state regardless of
-    whether or not there are still polymer-element declarations waiting for
-    their class definitions to be loaded.
-  * Added Polymer.waitingFor method. This returns a list of all polymer-element
-    declarations that are still waiting for their class definitions to be
-    loaded.
-  * Add runtime checking of the waitingFor queue and print to the console if a
-    deadlock situation is suspected to help diagnose the white screen of death.
-  * Added injectBoundHTML instance method. This can be used to dynamically
-    inject html that is bound to your current element into a target element.
-
-#### 0.14.3
-  * Warn if the same css file is inlined more than once,
-    [19996](http://dartbug.com/19996).
-  * Don't start moving elements from head to body until we find the first
-    import, [20826](http://dartbug.com/20826).
-  * Add option to not inject platform.js in the build output
-    [20865](http://dartbug.com/20865). To use, set `inject_platform_js` to
-    false in the polymer transformer config section of your pubspec.yaml:
-
-        transformers:
-        - polymer:
-            inject_platform_js: false
-            ...
-
-#### 0.14.2+1
-  * Fix findController function for js or dart wrapped elements. This fixes
-    event bindings when using paper-dialog and probably some other cases,
-    [20931](http://dartbug.com/20931).
-
-#### 0.14.2
-  * Polymer will now create helpful index pages in all folders containing entry
-    points and in their parent folders, in debug mode only
-    [20963](http://dartbug.com/20963).
-
-#### 0.14.1
-  * The build.dart file no longer requires a list of entry points, and you can
-    replace the entire file with `export 'package:polymer/default_build.dart';`
-    [20396](http://dartbug.com/20396).
-  * Inlined imports from the head of the document now get inserted inside a
-    hidden div, similar to the js vulcanizer [20943](http://dartbug.com/20943).
-
-#### 0.14.0+1
-  * Small style improvements on error/warnings page.
-
-#### 0.14.0
-  * Upgraded to polymer 0.4.0 ([polymer-dev#d66a86e][d66a86e]).
-  * The platform.js script is no longer required in Chrome or Dartium
-    (version 36). You can now remove this from your projects for development,
-    and it will be injected when running pub build or pub serve. If you would
-    like the option to not inject platform.js at all in the built output (if you
-    are deploying to chrome exclusively), please star this bug
-    http://dartbug.com/20865.
-  * Fixed invalid linter warning when using event handlers inside an
-    `auto-binding-dart` template, [20913](http://dartbug.com/20913).
-
-#### 0.13.1
-  * Upgraded error messages to have a unique and stable identifier. This
-    requires a version of `code_transformers` newer than `0.2.3`.
-  * Upgraded minimum version constraint on `args` to `0.11.0`.
-
-#### 0.13.0+3
-  * Added a warning about flashes of unstyled content if we can detect a
-    situation that would cause it [20751](http://dartbug.com/20751).
-
-#### 0.13.0+2
-  * Update internal transformers to delete .concat.js and .map files when in
-    release mode, saving about 1MB of space in the built output.
-
-#### 0.13.0+1
-  * Bug fix for http://dartbug.com/18171. Elements that extend other elements
-    but don't have a template will still inherit styles from those elements.
-  * Bug fix for http://dartbug.com/20544. Better runtime logging when attributes
-    are defined on an element but have no corresponding property on the class.
-
-#### 0.13.0
-  * Update to match polymer 0.3.5 ([polymer-dev#5d00e4b][5d00e4b]). There was a
-    breaking change in the web_components package where selecting non-rendered 
-    elements doesn't work, but it shouldn't affect most people. See 
-    https://github.com/Polymer/ShadowDOM/issues/495.
-
-#### 0.12.2+1
-  * Small bug fix for `polymer:new_element`
-
-#### 0.12.2
-  * Fix for [20539](http://dartbug.com/20539). Log widget will now html escape
-    messages.
-  * Fix for [20538](http://dartbug.com/20538). Log widget will now surface lint
-    logs from imported files.
-  * Backward compatible change to prepare for upcoming change of the user agent
-    in Dartium.
-  * `pub run polymer:new_element` now supports specifying a base class.
-    **Note**: only native DOM types and custom elements written in Dart can be
-    extended. Elements adapted from Javascript (like core- and paper- elements)
-    cannot be extended.
-  * other bug fixes in `polymer:new_entry`.
-
-#### 0.12.1
-  * **New**: When running in pub-serve, any warnings and errors detected by the
-    polymer transformers will be displayed in the lower-right corner of your
-    entrypoint page. You can opt-out by adding this option to your pubspec:
-
-        transformers:
-        - polymer:
-            ...
-            inject_build_logs_in_output: false
-
-  * **New**: there are now two template generators in the polymer package! On
-    any project that depends on polymer, you can create template files for a new
-    custom element by invoking:
-
-        pub run polymer:new_element element-name [-o output_dir]
-
-    And, if you invoke:
-
-        pub run polymer:new_entry web/index.html
-
-    we will create a new entry-point file and add it to your pubspec for you.
-
-  * Added the ability to override the stylesheet inlining behavior. There is now
-    an option exposed in the pubspec.yaml called `inline_stylesheets`. There are
-    two possible values, a boolean or a map. If only a boolean is supplied then
-    that will set the global default behavior. If a map is supplied, then the
-    keys should be file paths, and the value is a boolean. You can use the
-    special key 'default' to set the default value.
-
-    For example, the following would change the default to not inline any
-    styles, except for the foo.css file in your web folder and the bar.css file
-    under the foo packages lib directory:
-
-        transformers:
-        - polymer:
-            ...
-            inline_stylesheets:
-                default: false
-                web/foo.css: true
-                packages/foo/bar.css: true
-
-    
-  * Bug fix for http://dartbug.com/20286. Bindings in url attributes will no
-    longer throw an error.
-
-
-#### 0.12.0+7
-  * Widen the constraint on `unittest`.
-
-#### 0.12.0+6
-  * Widen the constraint on analyzer.
-  * Support for `_src` and similar attributes in polymer transformers.
-
-#### 0.12.0+5
-  * Raise the lower bound on the source_maps constraint to exclude incompatible
-    versions.
-
-#### 0.12.0+4
-  * Widen the constraint on source_maps.
-
-#### 0.12.0+3
-  * Fix a final use of `getLocationMessage`.
-
-#### 0.12.0+2
-  * Widen the constraint on barback.
-
-#### 0.12.0+1
-  * Switch from `source_maps`' `Span` class to `source_span`'s `SourceSpan`
-    class.
-
-#### 0.12.0
- * Updated to match polymer 0.3.4 ([polymer-dev#6ad2d61][6ad2d61]), this
-   includes the following changes:
-     * added @ComputedProperty
-     * @published can now be written using the readValue/writeValue helper
-       methods to match the same timing semantics as Javscript properties.
-     * underlying packages are also updated. Some noticeable changes are:
-       * observe: path-observers syntax is slightly different
-       * polymer_expressions: updating the value of an expression will issue a
-         notification.
-       * template_binding: better NodeBind interop support (for
-         two-way bindings with JS polymer elements).
- * Several fixes for CSP, including a cherry-pick from polymer.js
-   [commit#3b690ad][3b690ad].
- * Fix for [17596](https://code.google.com/p/dart/issues/detail?id=17596)
- * Fix for [19770](https://code.google.com/p/dart/issues/detail?id=19770)
-
-#### 0.11.0+5
-  * fixes web_components version in dependencies
-
-#### 0.11.0+4
-  * workaround for bug
-    [19653](https://code.google.com/p/dart/issues/detail?id=19653)
-
-#### 0.11.0+3
-  * update readme
-
-#### 0.11.0+2
-  * bug fix: event listeners were not in the dirty-checking zone
-  * bug fix: dispatch event in auto-binding
-
-#### 0.11.0+1
-  * Added a workaround for bug in HTML imports (issue
-    [19650](https://code.google.com/p/dart/issues/detail?id=19650)).
-
-#### 0.11.0
-  * **breaking change**: platform.js and dart_support.js must be specified in
-    your entry points at the beginning of `<head>`.
-  * **breaking change**: polymer.html is not required in entrypoints, but it is
-    required from files that use `<polymer-element>`.
-  * **breaking change**: enteredView/leftView were renamed to attached/detached.
-    The old lifecycle methods will not be invoked.
-  * **breaking change**: Event bindings with `@` are no longer supported.
-  * **breaking change**: `@published` by default is no longer reflected as an
-    attribute by default. This might break if you try to use the attribute in
-    places like CSS selectors. To make it reflected back to an attribute use
-    `@PublishedProperty(reflect: true)`.
-
-#### 0.10.1
-  * Reduce the analyzer work by mocking a small subset of the core libraries.
-
-#### 0.10.0+1
-  * Better error message on failures in pub-serve/pub-build when pubspec.yaml
-    is missing or has a wrong configuration for the polymer transformers.
-
-#### 0.10.0
-  * Interop with polymer-js elements now works.
-  * Polymer polyfills are now consolidated in package:web_components, which is
-    identical to platform.js from http://polymer-project.org.
-  * The output of pub-build no longer uses mirrors. We replace all uses of
-    mirrors with code generation.
-  * **breaking change**: Declaring a polymer app requires an extra import to
-    `<link rel="import" href="packages/polymer/polymer.html">`
-  * **breaking change**: "noscript" polymer-elements are created by polymer.js,
-    and therefore cannot be extended (subtyped) in Dart. They can still be used
-    by Dart elements or applications, however.
-  * New feature: `@ObserveProperty('foo bar.baz') myMethod() {...}` will cause
-    myMethod to be called when "foo" or "bar.baz" changes.
-  * Updated for 0.10.0-dev package:observe and package:template_binding changes.
-  * **breaking change**: @initMethod and @CustomTag are only supported on
-    public classes/methods.
-
-#### 0.9.5
-  * Improvements on how to handle cross-package HTML imports.
-
-#### 0.9.4
-  * Removes unused dependency on csslib.
-
-#### 0.9.3+3
-  * Removes workaround now that mirrors implement a missing feature. Requires
-    SDK >= 1.1.0-dev.5.0.
-
-#### 0.9.3+2
-  * Fix rare canonicalization bug
-    [15694](https://code.google.com/p/dart/issues/detail?id=15694)
-
-#### 0.9.3+1
-  * Fix type error in runner.dart
-    [15649](https://code.google.com/p/dart/issues/detail?id=15649).
-
-#### 0.9.3
-  * pub-build now runs the linter automatically
-
-#### 0.9.2+4
-  * fix linter on SVG and MathML tags with XML namespaces
-
-#### 0.9.2+3
-  * fix [15574](https://code.google.com/p/dart/issues/detail?id=15574),
-    event bindings in dart2js, by working around issue
-    [15573](https://code.google.com/p/dart/issues/detail?id=15573)
-
-#### 0.9.2+2
-  * fix enteredView in dart2js, by using custom_element >= 0.9.1+1
-
-[0.4.2]: https://github.com/Polymer/polymer-dev/commit/8c339cf8614eb65145ec1ccbdba7ecbadf65b343
-[6ad2d61]:https://github.com/Polymer/polymer-dev/commit/6a3e1b0e2a0bbe546f6896b3f4f064950d7aee8f
-[3b690ad]:https://github.com/Polymer/polymer-dev/commit/3b690ad0d995a7ea339ed601075de2f84d92bafd
diff --git a/packages/polymer/LICENSE b/packages/polymer/LICENSE
deleted file mode 100644
index 92d60b0..0000000
--- a/packages/polymer/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2012 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//    * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//    * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/polymer/PATENTS b/packages/polymer/PATENTS
deleted file mode 100644
index e120963..0000000
--- a/packages/polymer/PATENTS
+++ /dev/null
@@ -1,23 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Polymer project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Polymer, where such license applies only to those
-patent claims, both currently owned or controlled by Google and acquired
-in the future, licensable by Google that are necessarily infringed by
-this implementation of Polymer.  This grant does not include claims
-that would be infringed only as a consequence of further modification of
-this implementation.  If you or your agent or exclusive licensee
-institute or order or agree to the institution of patent litigation
-against any entity (including a cross-claim or counterclaim in a
-lawsuit) alleging that this implementation of Polymer or any code
-incorporated within this implementation of Polymer constitutes
-direct or contributory patent infringement, or inducement of patent
-infringement, then any patent rights granted to you under this License
-for this implementation of Polymer shall terminate as of the date
-such litigation is filed.
diff --git a/packages/polymer/README.md b/packages/polymer/README.md
deleted file mode 100644
index 51da3b8..0000000
--- a/packages/polymer/README.md
+++ /dev/null
@@ -1,153 +0,0 @@
-Polymer.dart
-============
-
-Polymer.dart is a set of comprehensive UI and utility components
-for building web applications.
-With Polymer.dart's custom elements, templating, data binding,
-and other features,
-you can quickly build structured, encapsulated, client-side web apps.
-
-Polymer.dart is a Dart port of
-[Polymer][polymer] created and maintained by the Dart team.
-The Dart team is collaborating with the Polymer team to ensure that polymer.dart
-elements and polyfills are fully compatible with Polymer.
-
-Polymer.dart replaces Web UI, which has been deprecated.
-
-
-Learn More
-----------
-
-* The [Polymer.dart][home_page] homepage
-contains a list of features, project status,
-installation instructions, tips for upgrading from Web UI,
-and links to other documentation.
-
-* See our [TodoMVC][] example by opening up the Dart Editor's Welcome Page and
-selecting "TodoMVC".
-
-* For more information about Dart, see <http://www.dartlang.org/>.
-
-* When you use this package,
-you automatically get the
-[polymer_expressions][] package,
-which provides an expressive syntax for use with templates.
-
-
-Try It Now
------------
-Add the polymer.dart package to your pubspec.yaml file:
-
-```yaml
-dependencies:
-  polymer: ">=0.16.0 <0.17.0"
-```
-
-Instead of using `any`, we recommend using version ranges to avoid getting your
-project broken on each release. Using a version range lets you upgrade your
-package at your own pace. You can find the latest version number at
-<https://pub.dartlang.org/packages/polymer>.
-
-
-Building and Deploying
-----------------------
-
-To build a deployable version of your app, add the polymer transformers to your
-pubspec.yaml file:
-
-```yaml
-transformers:
-- polymer
-```
-
-Then, run `pub build`.  The polymer transformers assume all files under `web`
-are possible entry points, this can be adjusted with arguments in your
-pubspec.yaml file. For example, you can say only `web/index.html` is an entry
-point as follows:
-
-```yaml
-transformers:
-- polymer:
-    entry_points: web/index.html
-```
-
-Here is a list of arguments used by the polymer transformers:
-* js: whether to load JS code directly. By default polymer converts your app's
-  html file to load the compiled JS code directly. Setting this parameter to
-  false will keep a dart script tag and the `dart.js` script tag on the page.
-
-* csp: whether to load a Content Security Policy (CSP) compliant JS file.
-  Dart2js generates two JS files, one that is not CSP compilant and one that is.
-  By default, polymer uses the former becuase it's likely more efficient, but
-  you can choose the latter by setting this flag.
-
-* entry_points: can be a list of entry points or, for convenience, a single
-  entry point as shown above.
-
-For example, this specification includes 2 entrypoints and chooses the CSP
-compliant JS file:
-
-```yaml
-transformers:
-- polymer:
-    entry_points:
-    - web/index.html
-    - web/index2.html
-    csp: true
-```
-
-Testing
--------
-
-Polymer elements can be tested using either the original `unittest` or new `test` packages. In both cases the easiest way to create a test is by using the default main from `polymer/init.dart` and then defining all your tests inside of a method marked with an `@whenPolymerReady` annotation.
-
-```dart
-import 'package:polymer/polymer.dart';
-export 'package:polymer/init.dart';
-
-@whenPolymerReady
-void runTests() {
-  // Define your tests here.
-}
-```
-
-You will also need to define a custom html file for your test (see the README for the testing package you are using for more information on this).
-
-**Note**: If you are using the new `test` package, it is important that you add the `test` transformer after the polymer transformer, so it should look roughly like this:
-
-```yaml
-transformer:
-- polymer:
-    entry_points:
-      - test/my_test.html
-- test/pub_serve:
-    $include: test/**_test{.*,}.dart
-```
-
-Contacting Us
--------------
-
-Please file issues in our [Issue Tracker][issues] or contact us on the
-[Dart Web UI mailing list][mailinglist].
-
-We also have the [Web UI development list][devlist] for discussions about
-internals of the code, code reviews, etc.
-
-[wc]: http://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html
-[pub]: http://www.dartlang.org/docs/pub-package-manager/
-[cs]: http://www.chromium.org/developers/testing/webkit-layout-tests
-[cs_lucid]: http://gsdview.appspot.com/dartium-archive/continuous/drt-lucid64.zip
-[cs_mac]: http://gsdview.appspot.com/dartium-archive/continuous/drt-mac.zip
-[cs_win]: http://gsdview.appspot.com/dartium-archive/continuous/drt-win.zip
-[dartium_src]: http://code.google.com/p/dart/wiki/BuildingDartium
-[TodoMVC]: http://todomvc.com/
-[issues]: https://github.com/dart-lang/polymer-dart/issues/new
-[mailinglist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/web-ui
-[devlist]: https://groups.google.com/a/dartlang.org/forum/?fromgroups#!forum/web-ui-dev
-[overview]: http://www.dartlang.org/articles/dart-web-components/
-[tools]: https://www.dartlang.org/articles/dart-web-components/tools.html
-[spec]: https://www.dartlang.org/articles/dart-web-components/spec.html
-[features]: https://www.dartlang.org/articles/dart-web-components/summary.html
-[home_page]: https://www.dartlang.org/polymer-dart/
-[polymer_expressions]: http://pub.dartlang.org/packages/polymer_expressions
-[polymer]: http://www.polymer-project.org/
diff --git a/packages/polymer/bin/new_element.dart b/packages/polymer/bin/new_element.dart
deleted file mode 100644
index fe6c0f8..0000000
--- a/packages/polymer/bin/new_element.dart
+++ /dev/null
@@ -1,249 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Script to create boilerplate for a Polymer element.
-/// Produces .dart and .html files for the element.
-///
-/// Run this script with pub run:
-///
-///     pub run polymer:new_element element-name [-o output_dir]
-///
-library polymer.bin.new_element;
-
-import 'dart:io';
-import 'package:args/args.dart';
-import 'package:path/path.dart' as path show absolute, dirname, join, split;
-import 'package:polymer/html_element_names.dart';
-
-void printUsage(ArgParser parser) {
-  print('pub run polymer:new_element [-o output_dir] [-e super-element] '
-      'element-name');
-  print(parser.getUsage());
-}
-
-void main(List<String> args) {
-  var parser = new ArgParser(allowTrailingOptions: true);
-
-  parser.addOption('output-dir', abbr: 'o', help: 'Output directory');
-  parser.addOption('extends',
-      abbr: 'e',
-      help: 'Extends polymer-element or DOM element (e.g., div, span)');
-  parser.addFlag('help', abbr: 'h');
-
-  var options, element;
-  try {
-    options = parser.parse(args);
-    if (options['help']) {
-      printUsage(parser);
-      return;
-    }
-    if (options.rest == null || options.rest.isEmpty) {
-      throw new FormatException('No element specified');
-    }
-    element = options.rest[0];
-    if (!_isPolymerElement(element)) {
-      throw new FormatException('Must specify polymer-element to create.\n'
-          'polymer-element must be all lowercase with at least 1 hyphen.');
-    }
-  } catch (e) {
-    print('$e\n');
-    printUsage(parser);
-    exitCode = 1;
-    return;
-  }
-
-  var outputDir, startDir;
-
-  var outputPath = options['output-dir'];
-
-  if (outputPath == null) {
-    if ((new File('pubspec.yaml')).existsSync()) {
-      print('When creating elements in root directory of package, '
-          '-o <dir> must be specified');
-      exitCode = 1;
-      return;
-    }
-    outputDir = (new Directory('.')).resolveSymbolicLinksSync();
-  } else {
-    var outputDirLocation = new Directory(outputPath);
-    if (!outputDirLocation.existsSync()) {
-      outputDirLocation.createSync(recursive: true);
-    }
-    outputDir = (new Directory(outputPath)).resolveSymbolicLinksSync();
-  }
-
-  var pubspecDir = _findDirWithFile(outputDir, 'pubspec.yaml');
-
-  if (pubspecDir == null) {
-    print('Could not find pubspec.yaml when walking up from $outputDir');
-    exitCode = 1;
-    return;
-  }
-
-  var length = path.split(pubspecDir).length;
-  var distanceToPackageRoot = path.split(outputDir).length - length;
-
-  // See dartbug.com/20076 for the algorithm used here.
-  if (distanceToPackageRoot > 0) {
-    if (path.split(outputDir)[length] == 'lib') {
-      distanceToPackageRoot++;
-    } else {
-      distanceToPackageRoot--;
-    }
-  }
-
-  var superElement = options['extends'];
-
-  if ((superElement == null) ||
-      _isDOMElement(superElement) ||
-      _isPolymerElement(superElement)) {
-    try {
-      _createBoilerPlate(
-          element, options['extends'], outputDir, distanceToPackageRoot);
-    } on Exception catch (e, t) {
-      print('Error creating files in $outputDir');
-      print('$e $t');
-      exitCode = 1;
-      return;
-    }
-  } else {
-    if (superElement.contains('-')) {
-      print('Extending invalid element "$superElement". Polymer elements '
-          'may contain only lowercase letters at least one hyphen.');
-    } else {
-      print('Extending invalid element "$superElement". $superElement is not '
-          ' a builtin DOM type.');
-    }
-    exitCode = 1;
-    return;
-  }
-
-  return;
-}
-
-String _findDirWithFile(String dir, String filename) {
-  while (!new File(path.join(dir, filename)).existsSync()) {
-    var parentDir = path.dirname(dir);
-    // If we reached root and failed to find it, bail.
-    if (parentDir == dir) return null;
-    dir = parentDir;
-  }
-  return dir;
-}
-
-bool _isDOMElement(String element) => (HTML_ELEMENT_NAMES[element] != null);
-
-bool _isPolymerElement(String element) {
-  return element.contains('-') && (element.toLowerCase() == element);
-}
-
-String _toCamelCase(String s) {
-  return s[0].toUpperCase() + s.substring(1);
-}
-
-void _createBoilerPlate(String element, String superClass, String directory,
-    int distanceToPackageRoot) {
-  var segments = element.split('-');
-  var capitalizedName = segments.map((e) => _toCamelCase(e)).join('');
-  var underscoreName = element.replaceAll('-', '_');
-  var pathToPackages = '../' * distanceToPackageRoot;
-
-  bool superClassIsPolymer =
-      (superClass == null ? false : _isPolymerElement(superClass));
-
-  var classDeclaration = '';
-  var importDartHtml = '';
-  var polymerCreatedString = '';
-  var extendsElementString = '';
-  var shadowString = '';
-
-  if (superClass == null) {
-    classDeclaration = '\nclass $capitalizedName extends PolymerElement {';
-  } else if (superClassIsPolymer) {
-    // The element being extended is a PolymerElement.
-    var camelSuperClass =
-        superClass.split('-').map((e) => _toCamelCase(e)).join('');
-    classDeclaration = 'class $capitalizedName extends $camelSuperClass {';
-    extendsElementString = ' extends="$superClass"';
-    shadowString = '\n    <!-- Render extended element\'s Shadow DOM here -->\n'
-        '    <shadow>\n    </shadow>';
-  } else {
-    // The element being extended is a DOM Class.
-    importDartHtml = "import 'dart:html';\n";
-    classDeclaration =
-        'class $capitalizedName extends ${HTML_ELEMENT_NAMES[superClass]} '
-        'with Polymer, Observable {';
-    polymerCreatedString = '\n    polymerCreated();';
-    extendsElementString = ' extends="$superClass"';
-  }
-
-  String html = '''  
-<!-- import polymer-element's definition -->
-<link rel="import" href="${pathToPackages}packages/polymer/polymer.html">
-
-<polymer-element name="$element"$extendsElementString>
-  <template>
-    <style>
-      :host {
-        display: block;
-      }
-    </style>$shadowString
-    <!-- Template content here -->
-  </template>
-  <script type="application/dart" src="${underscoreName}.dart"></script>
-</polymer-element>
-''';
-
-  String htmlFile = path.join(directory, underscoreName + '.html');
-  new File(htmlFile).writeAsStringSync(html);
-
-  String dart = '''
-${importDartHtml}import 'package:polymer/polymer.dart';
-
-/**
- * A Polymer $element element.
- */
-@CustomTag('$element')
-$classDeclaration
-
-  /// Constructor used to create instance of ${capitalizedName}.
-  ${capitalizedName}.created() : super.created() {$polymerCreatedString
-  }
-
-  /*
-   * Optional lifecycle methods - uncomment if needed.
-   *
-
-  /// Called when an instance of $element is inserted into the DOM.
-  attached() {
-    super.attached();
-  }
-
-  /// Called when an instance of $element is removed from the DOM.
-  detached() {
-    super.detached();
-  }
-
-  /// Called when an attribute (such as  a class) of an instance of
-  /// $element is added, changed, or removed.
-  attributeChanged(String name, String oldValue, String newValue) {
-  }
-
-  /// Called when $element has been fully prepared (Shadow DOM created,
-  /// property observers set up, event listeners attached).
-  ready() {
-  }
-   
-  */
-  
-}
-''';
-
-  String dartFile = path.join(directory, underscoreName + '.dart');
-  new File(dartFile).writeAsStringSync(dart);
-
-  print('Successfully created:');
-  print('  ' + path.absolute(path.join(directory, underscoreName + '.dart')));
-  print('  ' + path.absolute(path.join(directory, underscoreName + '.html')));
-}
diff --git a/packages/polymer/bin/new_entry.dart b/packages/polymer/bin/new_entry.dart
deleted file mode 100644
index a1abf22..0000000
--- a/packages/polymer/bin/new_entry.dart
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Script to create boilerplate for a Polymer element.
-/// Produces new .html entry point for a polymer app and updates the
-/// pubspec.yaml to reflect it.
-///
-/// Run this script with pub run:
-///
-///     pub run polymer:new_entry <html_file>
-///
-library polymer.bin.new_entry;
-
-import 'dart:io';
-import 'package:args/args.dart';
-import 'package:path/path.dart' as path;
-import 'package:yaml/yaml.dart';
-import 'package:source_span/source_span.dart';
-
-void printUsage() {
-  print('pub run polymer:new_entry entry_point_file.html');
-}
-
-void main(List<String> args) {
-  var parser = new ArgParser(allowTrailingOptions: true);
-  parser.addFlag('help', abbr: 'h');
-  var entryPoint;
-
-  try {
-    var options = parser.parse(args);
-    if (options['help']) {
-      printUsage();
-      return;
-    }
-    entryPoint = options.rest[0];
-  } catch (e) {
-    print('$e\n');
-    printUsage();
-    exitCode = 1;
-    return;
-  }
-
-  // If the entrypoint file has no extension, add .html to it.
-  if (path.extension(entryPoint) == '') {
-    entryPoint = '${entryPoint}.html';
-  }
-
-  var outputDir = path.dirname(entryPoint);
-  var outputDirLocation = new Directory(outputDir);
-
-  if (!outputDirLocation.existsSync()) {
-    outputDirLocation.createSync(recursive: true);
-  }
-
-  outputDir = outputDirLocation.resolveSymbolicLinksSync();
-  var pubspecDir = _findDirWithFile(outputDir, 'pubspec.yaml');
-
-  if (pubspecDir == null) {
-    print('Could not find pubspec.yaml when walking up from $outputDir');
-    exitCode = 1;
-    return;
-  }
-
-  var relativeEntryPoint = path.relative(
-      path.join(outputDir, path.basename(entryPoint)), from: pubspecDir);
-
-  try {
-    if (_createBoilerPlate(relativeEntryPoint, pubspecDir)) {
-      print('Added $entryPoint to ${path.join(pubspecDir, "pubspec.yaml")}');
-    }
-    print('Successfully created:');
-    print('  ' + path.join(pubspecDir, entryPoint));
-  } catch (e, t) {
-    print('Exception: $e\n$t');
-    print('Error creating files in $outputDir');
-    exitCode = 1;
-  }
-
-  return;
-}
-
-String _findDirWithFile(String dir, String filename) {
-  while (!new File(path.join(dir, filename)).existsSync()) {
-    var parentDir = path.dirname(dir);
-    // If we reached root and failed to find it, bail.
-    if (parentDir == dir) return null;
-    dir = parentDir;
-  }
-  return dir;
-}
-
-// Returns true if the pubspec file was modified. It might not be modified if
-// there was a monolithic polymer transformer in the pubspec, or if the entry
-// point for some reason already existed in the pubspec.
-bool _createBoilerPlate(String entryPoint, String pubspecDir) {
-  String html = '''
-<!doctype html>
-<html>
-  <head>
-    <!-- link rel="import" href="path_to_html_import.html" -->
-  </head>
-  <body>
-    <!-- HTML for body here -->
-    <script type="application/dart">export 'package:polymer/init.dart';</script>
-  </body>
-</html>
-''';
-
-  new File(path.join(pubspecDir, entryPoint)).writeAsStringSync(html);
-
-  var pubspecPath = path.join(pubspecDir, 'pubspec.yaml');
-  var pubspecText = new File(pubspecPath).readAsStringSync();
-  var transformers = loadYaml(pubspecText)['transformers'];
-  var entryPoints;
-
-  var insertionPoint;
-  var textToInsert = '';
-
-  if (transformers != null) {
-    // If there are transformers in the pubspec, look for the polymer
-    // transformers, get the entry points, and delete the old entry points.
-    SourceSpan transformersSourceSpan = transformers.span;
-
-    SourceSpan polymerTransformerSourceSpan;
-    SourceSpan entryPointsSourceSpan;
-    for (var e in transformers) {
-      if (e == 'polymer') {
-        // If they had an empty polymer transformer, just get rid of it (we will
-        // replace it with our own map style one).
-        var polymerRegex = new RegExp(r'\n\s*-\spolymer\s*');
-        // Insert right after the newline.
-        insertionPoint = pubspecText.indexOf(polymerRegex) + 1;
-        pubspecText = pubspecText.replaceFirst(polymerRegex, '\n');
-      } else if (e is YamlMap && e['polymer'] != null) {
-        polymerTransformerSourceSpan = e['polymer'].span;
-
-        var existing = e['polymer']['entry_points'];
-        if (existing == null && e['polymer'].containsKey('entry_points')) {
-          if (path.split(entryPoint)[0] != 'web') {
-            print('WARNING: Did not add entry_point $entryPoint to pubspec.yaml'
-                ' because of existing empty `entry_points` field in polymer'
-                ' transformer. This defaults to treating all files under `web/`'
-                ' as entry points, but you tried to add an entry point outside'
-                ' of the `web/` folder. You will need to explicitly list all'
-                ' entrypoints that you care about into your pubspec in order to'
-                ' include any outside of `web/`.');
-          }
-          return false;
-        }
-        entryPoints = (existing == null
-            ? []
-            : (existing is String ? [existing] : existing.toList()));
-
-        if (entryPoints.contains(entryPoint)) return false;
-        entryPoints.add(entryPoint);
-
-        if (existing != null) {
-          entryPointsSourceSpan = existing.span;
-        }
-      }
-    }
-
-    if (polymerTransformerSourceSpan == null) {
-      if (insertionPoint == null) {
-        insertionPoint = transformersSourceSpan.start.offset;
-      }
-      textToInsert = '- polymer:\n    entry_points:\n';
-    } else if (entryPointsSourceSpan == null) {
-      insertionPoint = polymerTransformerSourceSpan.start.offset;
-      textToInsert = '    entry_points:\n';
-    } else {
-      insertionPoint = entryPointsSourceSpan.start.offset;
-      pubspecText = '${pubspecText.substring(0, insertionPoint)}'
-          '${pubspecText.substring(entryPointsSourceSpan.end.offset)}';
-    }
-  } else {
-    // There were no transformers at all.
-    insertionPoint = pubspecText.length;
-    var optionalNewline = pubspecText.endsWith('\n') ? '' : '\n';
-    textToInsert = '''
-${optionalNewline}transformers:
-- polymer:
-    entry_points:
-''';
-    entryPoints = [entryPoint];
-  }
-
-  if (entryPoints == null) entryPoints = [entryPoint];
-  // TODO(dgrove): Once dartbug.com/20409 is addressed, use that here.
-  var entryPointsText = entryPoints.map((e) => '    - $e').join('\n');
-
-  textToInsert += entryPointsText;
-  if (insertionPoint == pubspecText.length) {
-    pubspecText = '${pubspecText}${textToInsert}';
-  } else {
-    pubspecText = '${pubspecText.substring(0, insertionPoint)}'
-        '${textToInsert}\n${pubspecText.substring(insertionPoint)}';
-  }
-
-  _writePubspec(pubspecPath, pubspecText);
-  return true;
-}
-
-_writePubspec(String pubspecPath, String text) {
-  new File(pubspecPath).writeAsStringSync(text);
-}
diff --git a/packages/polymer/codereview.settings b/packages/polymer/codereview.settings
deleted file mode 100644
index d9d2b11..0000000
--- a/packages/polymer/codereview.settings
+++ /dev/null
@@ -1,3 +0,0 @@
-CODE_REVIEW_SERVER: http://codereview.chromium.org/
-VIEW_VC: https://github.com/dart-lang/polymer-dart/commit/
-CC_LIST: reviews@dartlang.org
diff --git a/packages/polymer/e2e_test/README.txt b/packages/polymer/e2e_test/README.txt
deleted file mode 100644
index 222ef1b..0000000
--- a/packages/polymer/e2e_test/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This folder contains end-to-end tests that involve calling pub-build on an
-entire package. We have these tests here and not in 'polymer/test/' because we
-wanted to create an entire package struture and test using HTML imports to load
-code from a package's lib/ folder.
diff --git a/packages/polymer/e2e_test/bad_import1/lib/a.dart b/packages/polymer/e2e_test/bad_import1/lib/a.dart
deleted file mode 100644
index 842c5de..0000000
--- a/packages/polymer/e2e_test/bad_import1/lib/a.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bad_import1.a;
-
-import 'package:polymer/polymer.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-}
diff --git a/packages/polymer/e2e_test/bad_import1/lib/a.html b/packages/polymer/e2e_test/bad_import1/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/bad_import1/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/bad_import1/lib/b.html b/packages/polymer/e2e_test/bad_import1/lib/b.html
deleted file mode 100644
index 8ca5140..0000000
--- a/packages/polymer/e2e_test/bad_import1/lib/b.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-Because this file is under lib/, this URL is broken. It should be either
-'a.html' or '../../packages/bad_import1/a.html'.
- -->
-<link rel="import" href="../packages/bad_import1/a.html">
-
diff --git a/packages/polymer/e2e_test/bad_import1/pubspec.yaml b/packages/polymer/e2e_test/bad_import1/pubspec.yaml
deleted file mode 100644
index 5d18ba5..0000000
--- a/packages/polymer/e2e_test/bad_import1/pubspec.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: bad_import1
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
-transformers:
-  - polymer:
-      entry_points: test/import_test.html
diff --git a/packages/polymer/e2e_test/bad_import1/test/import_test.dart b/packages/polymer/e2e_test/bad_import1/test/import_test.dart
deleted file mode 100644
index 8fb2dd1..0000000
--- a/packages/polymer/e2e_test/bad_import1/test/import_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app.
-library bad_import1.import_test;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:bad_import1/a.dart';
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('html import', () {
-    expect(a, 0, reason: 'html import was not resolved correctly.');
-  });
-}
diff --git a/packages/polymer/e2e_test/bad_import1/test/import_test.html b/packages/polymer/e2e_test/bad_import1/test/import_test.html
deleted file mode 100644
index bdb8935..0000000
--- a/packages/polymer/e2e_test/bad_import1/test/import_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/bad_import1/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
-        src="import_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/bad_import2/lib/a.dart b/packages/polymer/e2e_test/bad_import2/lib/a.dart
deleted file mode 100644
index 8167c9b..0000000
--- a/packages/polymer/e2e_test/bad_import2/lib/a.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bad_import2.a;
-
-import 'package:polymer/polymer.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-}
diff --git a/packages/polymer/e2e_test/bad_import2/lib/a.html b/packages/polymer/e2e_test/bad_import2/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/bad_import2/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/bad_import2/lib/b.html b/packages/polymer/e2e_test/bad_import2/lib/b.html
deleted file mode 100644
index 10d8ebe..0000000
--- a/packages/polymer/e2e_test/bad_import2/lib/b.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-Because this file is under lib/, this URL is broken. It should be either
-'a.html' or '../../packages/bad_import2/a.html'.
- -->
-<link rel="import" href="packages/bad_import2/a.html">
-
diff --git a/packages/polymer/e2e_test/bad_import2/pubspec.yaml b/packages/polymer/e2e_test/bad_import2/pubspec.yaml
deleted file mode 100644
index 5619b8d..0000000
--- a/packages/polymer/e2e_test/bad_import2/pubspec.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: bad_import2
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
-transformers:
-  - polymer:
-      entry_points: test/import_test.html
diff --git a/packages/polymer/e2e_test/bad_import2/test/import_test.dart b/packages/polymer/e2e_test/bad_import2/test/import_test.dart
deleted file mode 100644
index 1abf16a..0000000
--- a/packages/polymer/e2e_test/bad_import2/test/import_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app.
-library bad_import2.import_test;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:bad_import2/a.dart';
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('html import', () {
-    expect(a, 0, reason: 'html import was not resolved correctly.');
-  });
-}
diff --git a/packages/polymer/e2e_test/bad_import2/test/import_test.html b/packages/polymer/e2e_test/bad_import2/test/import_test.html
deleted file mode 100644
index 6ad4382..0000000
--- a/packages/polymer/e2e_test/bad_import2/test/import_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/bad_import2/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
-        src="import_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/bad_import3/lib/a.dart b/packages/polymer/e2e_test/bad_import3/lib/a.dart
deleted file mode 100644
index a0a05cb..0000000
--- a/packages/polymer/e2e_test/bad_import3/lib/a.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bad_import3.a;
-
-import 'package:polymer/polymer.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-}
diff --git a/packages/polymer/e2e_test/bad_import3/lib/a.html b/packages/polymer/e2e_test/bad_import3/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/bad_import3/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/bad_import3/lib/b.html b/packages/polymer/e2e_test/bad_import3/lib/b.html
deleted file mode 100644
index 6d94044..0000000
--- a/packages/polymer/e2e_test/bad_import3/lib/b.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!--
-Because this file is under lib/, this URL is broken. It should be either
-'a.html' or '../../packages/bad_import3/a.html'.
- -->
-<link rel="import" href="broken_packages/bad_import3/a.html">
-
diff --git a/packages/polymer/e2e_test/bad_import3/pubspec.yaml b/packages/polymer/e2e_test/bad_import3/pubspec.yaml
deleted file mode 100644
index 32c5e7c..0000000
--- a/packages/polymer/e2e_test/bad_import3/pubspec.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: bad_import3
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
-transformers:
-  - polymer:
-      entry_points: test/import_test.html
diff --git a/packages/polymer/e2e_test/bad_import3/test/import_test.dart b/packages/polymer/e2e_test/bad_import3/test/import_test.dart
deleted file mode 100644
index 65a2277..0000000
--- a/packages/polymer/e2e_test/bad_import3/test/import_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app.
-library bad_import3.import_test;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:bad_import3/a.dart';
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('html import', () {
-    expect(a, 0, reason: 'html import was not resolved correctly.');
-  });
-}
diff --git a/packages/polymer/e2e_test/bad_import3/test/import_test.html b/packages/polymer/e2e_test/bad_import3/test/import_test.html
deleted file mode 100644
index e19725c..0000000
--- a/packages/polymer/e2e_test/bad_import3/test/import_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/bad_import3/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
-        src="import_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/lib/a.dart b/packages/polymer/e2e_test/canonicalization/lib/a.dart
deleted file mode 100644
index dfbe3ca..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/a.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.a;
-
-import 'package:polymer/polymer.dart';
-import 'package:canonicalization/c.dart';
-import 'd.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-  c++;
-  d++;
-}
diff --git a/packages/polymer/e2e_test/canonicalization/lib/a.html b/packages/polymer/e2e_test/canonicalization/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/canonicalization/lib/b.dart b/packages/polymer/e2e_test/canonicalization/lib/b.dart
deleted file mode 100644
index fbdccf6..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/b.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.b;
-
-import 'package:polymer/polymer.dart';
-import 'package:canonicalization/c.dart';
-import 'd.dart';
-
-int b = 0;
-@initMethod initB() {
-  b++;
-  c++;
-  d++;
-}
diff --git a/packages/polymer/e2e_test/canonicalization/lib/b.html b/packages/polymer/e2e_test/canonicalization/lib/b.html
deleted file mode 100644
index 2a42437..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='b.dart'></script>
diff --git a/packages/polymer/e2e_test/canonicalization/lib/c.dart b/packages/polymer/e2e_test/canonicalization/lib/c.dart
deleted file mode 100644
index 362f3e3..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/c.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.c;
-
-int c = 0;
diff --git a/packages/polymer/e2e_test/canonicalization/lib/d.dart b/packages/polymer/e2e_test/canonicalization/lib/d.dart
deleted file mode 100644
index 7d2a58e..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/d.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.d;
-
-int d = 0;
diff --git a/packages/polymer/e2e_test/canonicalization/lib/e.html b/packages/polymer/e2e_test/canonicalization/lib/e.html
deleted file mode 100644
index 4a5f8d7..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/e.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="b.html">
diff --git a/packages/polymer/e2e_test/canonicalization/lib/f.html b/packages/polymer/e2e_test/canonicalization/lib/f.html
deleted file mode 100644
index 2d8a727..0000000
--- a/packages/polymer/e2e_test/canonicalization/lib/f.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="../../packages/canonicalization/b.html">
diff --git a/packages/polymer/e2e_test/canonicalization/pubspec.yaml b/packages/polymer/e2e_test/canonicalization/pubspec.yaml
deleted file mode 100644
index 3860a91..0000000
--- a/packages/polymer/e2e_test/canonicalization/pubspec.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-name: canonicalization
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy1_test.dart b/packages/polymer/e2e_test/canonicalization/test/deploy1_test.dart
deleted file mode 100644
index ef147b6..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy1_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.deploy1_test;
-
-export 'deploy_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy1_test.html b/packages/polymer/e2e_test/canonicalization/test/deploy1_test.html
deleted file mode 100644
index 685f10b..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy1_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization during the development cycle</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="deploy1_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy2_test.dart b/packages/polymer/e2e_test/canonicalization/test/deploy2_test.dart
deleted file mode 100644
index e0c3bb8..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy2_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.deploy2_test;
-
-export 'deploy_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy2_test.html b/packages/polymer/e2e_test/canonicalization/test/deploy2_test.html
deleted file mode 100644
index 511d592..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy2_test.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization during the development cycle</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <!-- similar to test #1, but 'e' imports 'b' -->
-    <link rel="import" href="packages/canonicalization/e.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="deploy2_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy3_test.dart b/packages/polymer/e2e_test/canonicalization/test/deploy3_test.dart
deleted file mode 100644
index 2bec5cc..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy3_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.deploy3_test;
-
-export 'deploy_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy3_test.html b/packages/polymer/e2e_test/canonicalization/test/deploy3_test.html
deleted file mode 100644
index 74864d9..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy3_test.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <!-- similar to test #1, but 'f' imports 'b' -->
-    <link rel="import" href="packages/canonicalization/f.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="deploy3_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/deploy_common.dart b/packages/polymer/e2e_test/canonicalization/test/deploy_common.dart
deleted file mode 100644
index 2445e90..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/deploy_common.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app.
-library canonicalization.test.deploy_common;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:canonicalization/a.dart' show a;
-import 'packages/canonicalization/b.dart' show b;
-import 'package:canonicalization/c.dart' show c;
-import 'package:canonicalization/d.dart' as d1 show d;
-import 'packages/canonicalization/d.dart' as d2 show d;
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('canonicalization', () {
-    expect(a, 1,
-        reason: 'deploy picks the "package:" url as the canonical url for '
-        'script tags.');
-
-    // We shouldn't be using 'packages/' above, so that's ok.
-    expect(b, 0,
-        reason: 'we pick the "package:" url as the canonical url for script '
-        'tags.');
-    expect(c, 2, reason: 'c was always imported with "package:" urls.');
-    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
-    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
-  });
-}
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev1_test.dart b/packages/polymer/e2e_test/canonicalization/test/dev1_test.dart
deleted file mode 100644
index e34c3c7..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev1_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.dev1_test;
-
-export 'dev_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev1_test.html b/packages/polymer/e2e_test/canonicalization/test/dev1_test.html
deleted file mode 100644
index 948d1f8..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev1_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization during the development cycle</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="dev1_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev2_test.dart b/packages/polymer/e2e_test/canonicalization/test/dev2_test.dart
deleted file mode 100644
index 7d39958..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev2_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.dev2_test;
-
-export 'dev_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev2_test.html b/packages/polymer/e2e_test/canonicalization/test/dev2_test.html
deleted file mode 100644
index 19d4263..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev2_test.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization during the development cycle</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <!-- similar to test #1, but 'e' imports 'b' -->
-    <link rel="import" href="packages/canonicalization/e.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="dev2_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev3_test.dart b/packages/polymer/e2e_test/canonicalization/test/dev3_test.dart
deleted file mode 100644
index e1be216..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev3_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library canonicalization.test.dev3_test;
-
-export 'dev_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev3_test.html b/packages/polymer/e2e_test/canonicalization/test/dev3_test.html
deleted file mode 100644
index 6aaee9f..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev3_test.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <!-- similar to test #1, but 'f' imports 'b' -->
-    <link rel="import" href="packages/canonicalization/f.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="dev3_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dev_common.dart b/packages/polymer/e2e_test/canonicalization/test/dev_common.dart
deleted file mode 100644
index c25172e..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dev_common.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when developing in Dartium.
-library canonicalization.test.dev_common;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:canonicalization/a.dart' show a;
-import 'packages/canonicalization/b.dart' show b;
-import 'package:canonicalization/c.dart' show c;
-import 'package:canonicalization/d.dart' as d1 show d;
-import 'packages/canonicalization/d.dart' as d2 show d;
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('canonicalization', () {
-    expect(a, 1, reason: 'Dartium loads "a" via a "package:" url.');
-
-    // We shouldn't be using 'packages/', but we do just to check that Dartium
-    // can't infer a "package:" url for it.
-    expect(b, 1, reason: 'Dartium picks the relative url for "b".');
-    expect(c, 2, reason: '"c" was always imported with "package:" urls.');
-    expect(d1.d, 1, reason: '"a" loads via "package:", but "b" does not.');
-    expect(d2.d, 1, reason: '"b" loads via a relative url, but "a" does not.');
-  });
-}
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.dart b/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.dart
deleted file mode 100644
index a7f9cab..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests canonicalization at deployment time from a subdir.
-library canonicalization.test.dir.deploy1_test;
-
-export 'deploy_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.html b/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.html
deleted file mode 100644
index a65b92e..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/deploy1_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="deploy1_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.dart b/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.dart
deleted file mode 100644
index 3c7c0cc..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests canonicalization at deployment time from a subdir.
-library canonicalization.test.dir.deploy2_test;
-
-export 'deploy_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.html b/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.html
deleted file mode 100644
index f2646b4..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/deploy2_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="../packages/canonicalization/a.html">
-    <link rel="import" href="../packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="deploy2_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/deploy_common.dart b/packages/polymer/e2e_test/canonicalization/test/dir/deploy_common.dart
deleted file mode 100644
index 4c1c7dd..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/deploy_common.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app. This is
-/// identical to the code in ../dir/deploy_common.dart but we need to copy it
-/// here because the 'packages/...' URLs below should be relative from the
-/// entrypoint directory.
-library canonicalization.test.dir.deploy_common;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:canonicalization/a.dart' show a;
-import 'packages/canonicalization/b.dart' show b;
-import 'package:canonicalization/c.dart' show c;
-import 'package:canonicalization/d.dart' as d1 show d;
-import 'packages/canonicalization/d.dart' as d2 show d;
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('canonicalization', () {
-    expect(a, 1,
-        reason: 'deploy picks the "package:" url as the canonical url for script tags.');
-
-    // We shouldn't be using 'packages/' above, so that's ok.
-    expect(b, 0,
-        reason: 'we pick the "package:" url as the canonical url for script tags.');
-    expect(c, 2, reason: 'c was always imported with "package:" urls.');
-    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
-    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
-  });
-}
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.dart b/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.dart
deleted file mode 100644
index 1016c9d..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests canonicalization at deployment time from a subdir.
-library canonicalization.test.dir.dev1_test;
-
-export 'dev_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.html b/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.html
deleted file mode 100644
index 85f4b1f..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/dev1_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/canonicalization/a.html">
-    <link rel="import" href="packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="dev1_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.dart b/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.dart
deleted file mode 100644
index ea3cdb2..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.dart
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests canonicalization at deployment time from a subdir.
-library canonicalization.test.dir.dev2_test;
-
-export 'dev_common.dart';
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.html b/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.html
deleted file mode 100644
index dbff6a4..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/dev2_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="../packages/canonicalization/a.html">
-    <link rel="import" href="../packages/canonicalization/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" src="dev2_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/e2e_test/canonicalization/test/dir/dev_common.dart b/packages/polymer/e2e_test/canonicalization/test/dir/dev_common.dart
deleted file mode 100644
index 11427fd..0000000
--- a/packages/polymer/e2e_test/canonicalization/test/dir/dev_common.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when developing in Dartium. This is
-/// identical to the code in ../dir/deploy_common.dart but we need to copy it
-/// here because the 'packages/...' URLs below should be relative from the
-/// entrypoint directory.
-library canonicalization.test.dir.dev_common;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:canonicalization/a.dart' show a;
-import 'packages/canonicalization/b.dart' show b;
-import 'package:canonicalization/c.dart' show c;
-import 'package:canonicalization/d.dart' as d1 show d;
-import 'packages/canonicalization/d.dart' as d2 show d;
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('canonicalization', () {
-    expect(a, 1, reason: 'Dartium loads "a" via a "package:" url.');
-
-    // We shouldn't be using 'packages/', but we do just to check that Dartium
-    // can't infer a "package:" url for it.
-    expect(b, 1, reason: 'Dartium picks the relative url for "b".');
-    expect(c, 2, reason: '"c" was always imported with "package:" urls.');
-    expect(d1.d, 1, reason: '"a" loads via "package:", but "b" does not.');
-    expect(d2.d, 1, reason: '"b" loads via a relative url, but "a" does not.');
-  });
-}
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/a.dart b/packages/polymer/e2e_test/experimental_boot/lib/a.dart
deleted file mode 100644
index adc2b48..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/a.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library experimental_boot.a;
-
-import 'package:polymer/polymer.dart';
-import 'package:experimental_boot/c.dart';
-import 'd.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-  c++;
-  d++;
-}
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/a.html b/packages/polymer/e2e_test/experimental_boot/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/b.dart b/packages/polymer/e2e_test/experimental_boot/lib/b.dart
deleted file mode 100644
index cbcfa0f..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/b.dart
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library experimental_boot.b;
-
-import 'package:polymer/polymer.dart';
-import 'package:experimental_boot/c.dart';
-import 'd.dart';
-
-int b = 0;
-@initMethod initB() {
-  b++;
-  c++;
-  d++;
-}
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/b.html b/packages/polymer/e2e_test/experimental_boot/lib/b.html
deleted file mode 100644
index 2a42437..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='b.dart'></script>
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/c.dart b/packages/polymer/e2e_test/experimental_boot/lib/c.dart
deleted file mode 100644
index d103877..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/c.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library experimental_boot.c;
-
-int c = 0;
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/d.dart b/packages/polymer/e2e_test/experimental_boot/lib/d.dart
deleted file mode 100644
index cbc4282..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/d.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library experimental_boot.d;
-
-int d = 0;
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/e.html b/packages/polymer/e2e_test/experimental_boot/lib/e.html
deleted file mode 100644
index 4a5f8d7..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/e.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="b.html">
diff --git a/packages/polymer/e2e_test/experimental_boot/lib/f.html b/packages/polymer/e2e_test/experimental_boot/lib/f.html
deleted file mode 100644
index f391682..0000000
--- a/packages/polymer/e2e_test/experimental_boot/lib/f.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="../../packages/experimental_boot/b.html">
diff --git a/packages/polymer/e2e_test/experimental_boot/pubspec.yaml b/packages/polymer/e2e_test/experimental_boot/pubspec.yaml
deleted file mode 100644
index 2b68609..0000000
--- a/packages/polymer/e2e_test/experimental_boot/pubspec.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
-name: experimental_boot
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
diff --git a/packages/polymer/e2e_test/experimental_boot/test/double_init_code.html b/packages/polymer/e2e_test/experimental_boot/test/double_init_code.html
deleted file mode 100644
index 6a6cfdb..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/double_init_code.html
+++ /dev/null
@@ -1 +0,0 @@
-<script type="application/dart" src="double_init_test.dart"></script>
diff --git a/packages/polymer/e2e_test/experimental_boot/test/double_init_test.dart b/packages/polymer/e2e_test/experimental_boot/test/double_init_test.dart
deleted file mode 100644
index fe6a2f2..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/double_init_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library experimental_boot.test.double_init_test;
-
-import 'dart:async';
-import 'dart:js' as js;
-
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-@initMethod
-init() {
-  useHtmlConfiguration();
-  test('can\'t call initPolymer when using polymer_experimental', () {
-    expect(() => initPolymer(), throwsA("Initialization was already done."));
-  });
-}
diff --git a/packages/polymer/e2e_test/experimental_boot/test/double_init_test.html b/packages/polymer/e2e_test/experimental_boot/test/double_init_test.html
deleted file mode 100644
index e3b3e22..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/double_init_test.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-<link rel="import" href="packages/polymer/polymer_experimental.html">
-<link rel="import" href="double_init_code.html">
-<script src="/root_dart/tools/testing/dart/test_controller.js"></script>
diff --git a/packages/polymer/e2e_test/experimental_boot/test/import_test.dart b/packages/polymer/e2e_test/experimental_boot/test/import_test.dart
deleted file mode 100644
index 2cb8f30..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/import_test.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library experimental_boot.test.import_test;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:experimental_boot/a.dart' show a;
-import 'packages/experimental_boot/b.dart' show b;
-import 'package:experimental_boot/c.dart' show c;
-import 'package:experimental_boot/d.dart' as d1 show d;
-import 'packages/experimental_boot/d.dart' as d2 show d;
-
-@initMethod
-main() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('canonicalization with experimental bootstrap', () {
-    expect(a, 1,
-        reason: 'deploy picks the "package:" url as the canonical url for '
-        'script tags.');
-
-    // We shouldn't be using 'packages/' above, so that's ok.
-    expect(b, 0,
-        reason: 'we pick the "package:" url as the canonical url for script '
-        'tags.');
-    expect(c, 2, reason: 'c was always imported with "package:" urls.');
-    expect(d1.d, 2, reason: 'both a and b are loaded using package: urls');
-    expect(d2.d, 0, reason: 'both a and b are loaded using package: urls');
-  });
-}
diff --git a/packages/polymer/e2e_test/experimental_boot/test/import_test.html b/packages/polymer/e2e_test/experimental_boot/test/import_test.html
deleted file mode 100644
index fac8aee..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/import_test.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization using the experimental bootstrap</title>
-    <link rel="import" href="packages/polymer/polymer_experimental.html">
-    <link rel="import" href="packages/experimental_boot/a.html">
-    <link rel="import" href="packages/experimental_boot/f.html">
-    <link rel="import" href="load_dart_code.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-</html>
diff --git a/packages/polymer/e2e_test/experimental_boot/test/load_dart_code.html b/packages/polymer/e2e_test/experimental_boot/test/load_dart_code.html
deleted file mode 100644
index a5c7a4c..0000000
--- a/packages/polymer/e2e_test/experimental_boot/test/load_dart_code.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<!-- We don't load the script directly in import_test.html because
-polymer_experimental doesn't allow script tags in the main document. -->
-<script type="application/dart" src="import_test.dart"></script>
-
diff --git a/packages/polymer/e2e_test/good_import/lib/a.dart b/packages/polymer/e2e_test/good_import/lib/a.dart
deleted file mode 100644
index 842c5de..0000000
--- a/packages/polymer/e2e_test/good_import/lib/a.dart
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bad_import1.a;
-
-import 'package:polymer/polymer.dart';
-
-int a = 0;
-@initMethod initA() {
-  a++;
-}
diff --git a/packages/polymer/e2e_test/good_import/lib/a.html b/packages/polymer/e2e_test/good_import/lib/a.html
deleted file mode 100644
index c359e83..0000000
--- a/packages/polymer/e2e_test/good_import/lib/a.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<script type='application/dart' src='a.dart'></script>
diff --git a/packages/polymer/e2e_test/good_import/lib/b.html b/packages/polymer/e2e_test/good_import/lib/b.html
deleted file mode 100644
index f4ae9c4..0000000
--- a/packages/polymer/e2e_test/good_import/lib/b.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="../../packages/good_import/a.html">
diff --git a/packages/polymer/e2e_test/good_import/pubspec.yaml b/packages/polymer/e2e_test/good_import/pubspec.yaml
deleted file mode 100644
index 6e0ca1f..0000000
--- a/packages/polymer/e2e_test/good_import/pubspec.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-name: good_import
-dependencies:
-  polymer: any
-dev_dependencies:
-  unittest: any
-transformers:
-  - polymer:
-      entry_points: test/import_test.html
diff --git a/packages/polymer/e2e_test/good_import/test/import_test.dart b/packages/polymer/e2e_test/good_import/test/import_test.dart
deleted file mode 100644
index ac0b2aa..0000000
--- a/packages/polymer/e2e_test/good_import/test/import_test.dart
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests how canonicalization works when using the deployed app.
-library canonicalization.bad_lib_import_negative;
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-import 'package:good_import/a.dart';
-
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('html import', () {
-    expect(a, 1, reason: 'html import is resolved correctly.');
-  });
-}
diff --git a/packages/polymer/e2e_test/good_import/test/import_test.html b/packages/polymer/e2e_test/good_import/test/import_test.html
deleted file mode 100644
index b888eb9..0000000
--- a/packages/polymer/e2e_test/good_import/test/import_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-<html>
-<!--polymer-test: this comment is needed for test_suite.dart-->
-  <head>
-    <title>Tests canonicalization at deployment time</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <link rel="import" href="packages/good_import/b.html">
-    <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  </head>
-  <body>
-    <script type="application/dart" onerror="scriptTagOnErrorCallback(null)"
-        src="import_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/example/component/news/test/news_index_test.dart b/packages/polymer/example/component/news/test/news_index_test.dart
deleted file mode 100644
index 75164d0..0000000
--- a/packages/polymer/example/component/news/test/news_index_test.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-/// This test runs the news example and checks the state of the initial page.
-main() {
-  initPolymer();
-  useHtmlConfiguration();
-
-  extractLinks(nodes) => nodes
-      .where((n) => n is Element)
-      .map((n) => n.query('a').href.split('/').last)
-      .toList();
-
-  setUp(() => Polymer.onReady);
-
-  test('initial state', () {
-    final listComp = querySelector('ul');
-    final items = listComp.querySelectorAll('li');
-    expect(items.length, 6);
-    expect(extractLinks(items), ['1', '2', '3', '4', '4', '5']);
-    expect(listComp is Polymer, true, reason: 'x-news should be created');
-
-    final contents = listComp.shadowRoot.querySelectorAll('content');
-    expect(contents.length, 2, reason: 'news has 2 content tags');
-    expect(extractLinks(contents[0].getDistributedNodes()), ['3', '5'],
-        reason: 'breaking stories first');
-    expect(
-        extractLinks(contents[1].getDistributedNodes()), ['1', '2', '4', '4'],
-        reason: 'other stories after breaking stories');
-  });
-}
diff --git a/packages/polymer/example/component/news/test/news_index_test.html b/packages/polymer/example/component/news/test/news_index_test.html
deleted file mode 100644
index 1f5ded0..0000000
--- a/packages/polymer/example/component/news/test/news_index_test.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<!--
-This example is from
-https://github.com/dglazkov/Web-Components-Polyfill/blob/master/samples/news
--->
-<html>
-<head>
-  <!--polymer-test: this comment is needed for test_suite.dart-->
-  <title>Simple Web Components Example</title>
-  <link rel="import" href="packages/polymer/polymer.html">
-  <link rel="import" href="../web/news-component.html">
-  <script src="/root_dart/tools/testing/dart/test_controller.js"></script>
-</head>
-<body>
-<h1>Simple Web Components Example</h1>
-<ul is="x-news">
-    <li><a href="//example.com/stories/1">A story</a></li>
-    <li><a href="//example.com/stories/2">Another story</a></li>
-    <li class="breaking"><a href="//example.com/stories/3">Also a story</a></li>
-    <li><a href="//example.com/stories/4">Yet another story</a></li>
-    <li><a href="//example.com/stories/4">Awesome story</a></li>
-    <li class="breaking"><a href="//example.com/stories/5">Horrible story</a></li>
-</ul>
-<script type="application/dart" src="news_index_test.dart"></script>
-</body>
-</html>
diff --git a/packages/polymer/example/component/news/web/index.html b/packages/polymer/example/component/news/web/index.html
deleted file mode 100644
index b9e56c9..0000000
--- a/packages/polymer/example/component/news/web/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<!--
-This example is from
-https://github.com/dglazkov/Web-Components-Polyfill/blob/master/samples/news
--->
-<html>
-<head>
-    <title>Simple Web Components Example</title>
-    <link rel="import" href="news-component.html">
-</head>
-<body>
-<h1>Simple Web Components Example</h1>
-<ul is="x-news">
-    <li><a href="//example.com/stories/1">A story</a></li>
-    <li><a href="//example.com/stories/2">Another story</a></li>
-    <li class="breaking"><a href="//example.com/stories/3">Also a story</a></li>
-    <li><a href="//example.com/stories/4">Yet another story</a></li>
-    <li><a href="//example.com/stories/4">Awesome story</a></li>
-    <li class="breaking"><a href="//example.com/stories/5">Horrible story</a></li>
-</ul>
-  <script type="application/dart">export 'package:polymer/init.dart';</script>
-  <script src='packages/browser/dart.js'></script>
-</body>
-</html>
diff --git a/packages/polymer/example/component/news/web/news-component.html b/packages/polymer/example/component/news/web/news-component.html
deleted file mode 100644
index 4d86f22..0000000
--- a/packages/polymer/example/component/news/web/news-component.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<polymer-element name="x-news" extends="ul">
-  <template>
-    <style scoped>
-      div.breaking {
-          color: Red;
-          font-size: 20px;
-          border: 1px dashed Purple;
-      }
-      div.other {
-          padding: 2px 0 0 0;
-          border: 1px solid Cyan;
-      }
-    </style>
-    <div class="breaking">
-      <h2>Breaking Stories</h2>
-      <ul>
-          <content select=".breaking"></content>
-      </ul>
-    </div>
-    <div class="other">
-      <h2>Other News</h2>
-      <ul>
-          <content></content>
-      </ul>
-    </div>
-  </template>
-  <script type="application/dart">
-    import 'dart:html';
-    import 'package:polymer/polymer.dart';
-
-    class XNews extends UListElement with Polymer {
-      XNews.created() : super.created() {
-        polymerCreated();
-      }
-    }
-
-    @initMethod
-    _init() {
-      Polymer.register('x-news', XNews);
-    }
-  </script>
-</polymer-element>
diff --git a/packages/polymer/example/scoped_style/index.html b/packages/polymer/example/scoped_style/index.html
deleted file mode 100644
index bc81e7a..0000000
--- a/packages/polymer/example/scoped_style/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>Simple CSS Test</title>
-    <link rel="import" href="my_test.html">
-    <script src='packages/polymer/boot.js'></script>
-</head>
-<body>
-<style>
-  p { color: black;}
-</style>
-<p>outside of element, should be black</p>
-
-<my-test></my-test>
-</body>
-</html>
diff --git a/packages/polymer/example/scoped_style/my_test.html b/packages/polymer/example/scoped_style/my_test.html
deleted file mode 100644
index c759c66..0000000
--- a/packages/polymer/example/scoped_style/my_test.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<polymer-element name="my-test">
-  <template>
-    <style>
-      p { color: red;}
-    </style>
-    <p>Inside element, should be red</p>
-  </template>
-  <script type="application/dart">
-    import 'package:polymer/polymer.dart';
-
-    @CustomTag('my-test')
-    class MyTest extends PolymerElement {}
-  </script>
-</polymer-element>
diff --git a/packages/polymer/lib/auto_binding.dart b/packages/polymer/lib/auto_binding.dart
deleted file mode 100644
index 97965e6..0000000
--- a/packages/polymer/lib/auto_binding.dart
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.auto_binding;
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:template_binding/template_binding.dart';
-
-/**
- * The `auto-binding-dart` element extends the template element. It provides a
- * quick and easy way to do data binding without the need to setup a binding
- * delegate or use the [templateBind] call. Both data and event handlers can be
- * bound using the [model].
- *
- * The `auto-binding-dart` element acts just like a template that is bound to
- * a model. It stamps its content in the dom adjacent to itself. When the
- * content is stamped, the `template-bound` event is fired.
- *
- * **NOTE**: It is a good idea to use an id to select these elements. During
- * code transformation it is likely that other template elements will be
- * inserted at the top of the body above yours, so something like
- * querySelector('template') is likely to break when built.
- * See http://dartbug.com/20911.
- *
- * Example:
- *
- *     <template id="my-template" is="auto-binding-dart">
- *       <div>Say something: <input value="{{value}}"></div>
- *       <div>You said: {{value}}</div>
- *       <button on-tap="{{buttonTap}}">Tap me!</button>
- *     </template>
- *     <script type="application/dart">
- *       import 'dart:html';
- *       import 'package:polymer/polymer.dart';
- *
- *       main() {
- *         var template = document.querySelector('#my-template');
- *         template.model = new MyModel();
- *       }
- *
- *       class MyModel {
- *         String value = 'something';
- *         buttonTap() => console.log('tap!');
- *       }
- *     </script>
- *
- */
-// Dart note: renamed to avoid conflict with JS auto-binding.
-class AutoBindingElement extends TemplateElement with Polymer, Observable
-    implements TemplateBindExtension {
-
-  /// Make template_binding "extension methods" friendly.
-  /// Note that [NodeBindExtension] is already implemented by [Polymer].
-  TemplateBindExtension _self;
-
-  get model => _self.model;
-  set model(value) {
-    _self.model = value;
-  }
-
-  BindingDelegate get bindingDelegate => _self.bindingDelegate;
-  set bindingDelegate(BindingDelegate value) {
-    _self.bindingDelegate = value;
-  }
-
-  void clear() => _self.clear();
-
-  @override
-  PolymerExpressions get syntax => bindingDelegate;
-
-  AutoBindingElement.created() : super.created() {
-    polymerCreated();
-
-    _self = templateBindFallback(this);
-
-    bindingDelegate = makeSyntax();
-
-    // delay stamping until polymer-ready so that auto-binding is not
-    // required to load last.
-    Polymer.onReady.then((_) {
-      attributes['bind'] = '';
-      // we don't bother with an explicit signal here, we could ust a MO
-      // if necessary
-      async((_) {
-        // note: this will marshall *all* the elements in the parentNode
-        // rather than just stamped ones. We'd need to use createInstance
-        // to fix this or something else fancier.
-        marshalNodeReferences(parentNode);
-        // template stamping is asynchronous so stamping isn't complete
-        // by polymer-ready; fire an event so users can use stamped elements
-        fire('template-bound');
-      });
-    });
-  }
-
-  PolymerExpressions makeSyntax() => new _AutoBindingSyntax(this);
-
-  DocumentFragment createInstance([model, BindingDelegate delegate]) =>
-      _self.createInstance(model, delegate);
-
-  @override
-  dispatchMethod(obj, method, args) {
-    // Dart note: make sure we dispatch to the model, not ourselves.
-    if (identical(obj, this)) obj = model;
-    return super.dispatchMethod(obj, method, args);
-  }
-}
-
-// Dart note: this is implemented a little differently to keep it in classic
-// OOP style. Instead of monkeypatching findController, override it.
-class _AutoBindingSyntax extends PolymerExpressions {
-  final AutoBindingElement _node;
-  _AutoBindingSyntax(this._node) : super();
-  @override findController(_) => _node;
-}
diff --git a/packages/polymer/lib/builder.dart b/packages/polymer/lib/builder.dart
deleted file mode 100644
index 9434485..0000000
--- a/packages/polymer/lib/builder.dart
+++ /dev/null
@@ -1,358 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Common logic to make it easy to run the polymer linter and deploy tool.
-///
-/// The functions in this library are designed to make it easier to create
-/// `build.dart` files. A `build.dart` file is a Dart script that can be invoked
-/// from the command line, but that can also invoked automatically by the Dart
-/// Editor whenever a file in your project changes or when selecting some menu
-/// options, such as 'Reanalyze Sources'.
-///
-/// To work correctly, place the `build.dart` in the root of your project (where
-/// pubspec.yaml lives). The file must be named exactly `build.dart`.
-///
-/// It's quite likely that in the near future `build.dart` will be replaced with
-/// something else.  For example, `pub deploy` will deal with deploying
-/// applications automatically, and the Dart Editor might provide other
-/// mechanisms to hook linters.
-///
-/// There are three important functions exposed by this library [build], [lint],
-/// and [deploy]. The following examples show common uses of these functions
-/// when writing a `build.dart` file.
-///
-/// **Example 1**: Uses build.dart to run the linter tool.
-///
-///     import 'dart:io';
-///     import 'package:polymer/builder.dart';
-///
-///     main() {
-///        lint();
-///     }
-///
-/// **Example 2**: Runs the linter and creates a deployable version of the app
-/// every time.
-///
-///     import 'dart:io';
-///     import 'package:polymer/builder.dart';
-///
-///     main() {
-///        deploy(); // deploy also calls the linter internally.
-///     }
-///
-/// **Example 3**: Always run the linter, but conditionally build a deployable
-/// version. See [parseOptions] for a description of options parsed
-/// automatically by this helper library.
-///
-///     import 'dart:io';
-///     import 'package:polymer/builder.dart';
-///
-///     main(args) {
-///        var options = parseOptions(args);
-///        if (options.forceDeploy) {
-///          deploy();
-///        } else {
-///          lint();
-///        }
-///     }
-///
-/// **Example 4**: Same as above, but uses [build] (which internally calls
-/// either [lint] or [deploy]).
-///
-///     import 'dart:io';
-///     import 'package:polymer/builder.dart';
-///
-///     main(args) {
-///        build(options: parseOptions(args));
-///     }
-///
-/// **Example 5**: Like the previous example, but indicates to the linter and
-/// deploy tool which files are actually used as entry point files. See the
-/// documentation of [build] below for more details.
-///
-///     import 'dart:io';
-///     import 'package:polymer/builder.dart';
-///
-///     main(args) {
-///        build(entryPoints: ['web/index.html'], options: parseOptions(args));
-///     }
-library polymer.builder;
-
-import 'dart:async';
-import 'dart:io';
-
-import 'package:args/args.dart';
-import 'package:path/path.dart' as path;
-import 'package:yaml/yaml.dart';
-
-import 'src/build/linter.dart';
-import 'src/build/runner.dart';
-import 'src/build/common.dart';
-
-import 'transformer.dart';
-
-/// Runs the polymer linter on any relevant file in your package, such as any
-/// .html file under 'lib/', 'asset/', and 'web/'. And, if requested, creates a
-/// directory suitable for deploying a Polymer application to a server.
-///
-/// The [entryPoints] list contains files under web/ that should be treated as
-/// entry points. Each entry on this list is a relative path from the package
-/// root (for example 'web/index.html'). If null, all files under 'web/' are
-/// treated as possible entry points.
-///
-/// Options must be passed by
-/// passing the [options] argument. The deploy operation is run only when the
-/// command-line argument `--deploy` is present, or equivalently when
-/// `options.forceDeploy` is true.
-///
-/// The linter and deploy steps needs to know the name of the [currentPackage]
-/// and the location where to find the code for any package it depends on
-/// ([packageDirs]). This is inferred automatically, but can be overriden if
-/// those arguments are provided.
-Future build({List<String> entryPoints, CommandLineOptions options,
-    String currentPackage, Map<String, String> packageDirs}) {
-  if (options == null) {
-    print('warning: now that main takes arguments, you need to explicitly pass'
-        ' options to build(). Running as if no options were passed.');
-    options = parseOptions([]);
-  }
-  if (entryPoints == null) entryPoints = _parseEntryPointsFromPubspec();
-
-  return options.forceDeploy
-      ? deploy(
-          entryPoints: entryPoints,
-          options: options,
-          currentPackage: currentPackage,
-          packageDirs: packageDirs)
-      : lint(
-          entryPoints: entryPoints,
-          options: options,
-          currentPackage: currentPackage,
-          packageDirs: packageDirs);
-}
-
-/// Runs the polymer linter on any relevant file in your package,
-/// such as any .html file under 'lib/', 'asset/', and 'web/'.
-///
-/// The [entryPoints] list contains files under web/ that should be treated as
-/// entry points. Each entry on this list is a relative path from the package
-/// root (for example 'web/index.html'). If null, all files under 'web/' are
-/// treated as possible entry points.
-///
-/// Options must be passed by passing the [options] argument.
-///
-/// The linter needs to know the name of the [currentPackage] and the location
-/// where to find the code for any package it depends on ([packageDirs]). This
-/// is inferred automatically, but can be overriden by passing the arguments.
-Future lint({List<String> entryPoints, CommandLineOptions options,
-    String currentPackage, Map<String, String> packageDirs}) {
-  if (options == null) {
-    print('warning: now that main takes arguments, you need to explicitly pass'
-        ' options to lint(). Running as if no options were passed.');
-    options = parseOptions([]);
-  }
-  if (currentPackage == null) currentPackage = readCurrentPackageFromPubspec();
-  if (entryPoints == null) entryPoints = _parseEntryPointsFromPubspec();
-  var linterOptions = new TransformOptions(entryPoints: entryPoints);
-  var linter = new Linter(linterOptions, skipMissingElementWarning: true);
-
-  return runBarback(new BarbackOptions([[linter]], null,
-      currentPackage: currentPackage,
-      packageDirs: packageDirs,
-      machineFormat: options.machineFormat));
-}
-
-/// Creates a directory suitable for deploying a Polymer application to a
-/// server.
-///
-/// **Note**: this function will be replaced in the future by the `pub deploy`
-/// command.
-///
-/// The [entryPoints] list contains files under web/ that should be treated as
-/// entry points. Each entry on this list is a relative path from the package
-/// root (for example 'web/index.html'). If null, all files under 'web/' are
-/// treated as possible entry points.
-///
-/// Options must be passed by passing the [options] list.
-///
-/// The deploy step needs to know the name of the [currentPackage] and the
-/// location where to find the code for any package it depends on
-/// ([packageDirs]). This is inferred automatically, but can be overriden if
-/// those arguments are provided.
-Future deploy({List<String> entryPoints, CommandLineOptions options,
-    String currentPackage, Map<String, String> packageDirs}) {
-  if (options == null) {
-    print('warning: now that main takes arguments, you need to explicitly pass'
-        ' options to deploy(). Running as if no options were passed.');
-    options = parseOptions([]);
-  }
-  if (currentPackage == null) currentPackage = readCurrentPackageFromPubspec();
-  if (entryPoints == null) entryPoints = _parseEntryPointsFromPubspec();
-
-  var transformOptions = new TransformOptions(
-      entryPoints: entryPoints,
-      directlyIncludeJS: options.directlyIncludeJS,
-      contentSecurityPolicy: options.contentSecurityPolicy,
-      releaseMode: options.releaseMode);
-
-  var phases = new PolymerTransformerGroup(transformOptions).phases;
-  var barbackOptions = new BarbackOptions(phases, options.outDir,
-      currentPackage: currentPackage,
-      packageDirs: packageDirs,
-      machineFormat: options.machineFormat,
-      // TODO(sigmund): include here also smoke transformer when it's on by
-      // default.
-      packagePhases: {'polymer': phasesForPolymer});
-  return runBarback(barbackOptions)
-      .then((_) => print('Done! All files written to "${options.outDir}"'));
-}
-
-/// Options that may be used either in build.dart or by the linter and deploy
-/// tools.
-class CommandLineOptions {
-  /// Files marked as changed.
-  final List<String> changedFiles;
-
-  /// Files marked as removed.
-  final List<String> removedFiles;
-
-  /// Whether to clean intermediate artifacts, if any.
-  final bool clean;
-
-  /// Whether to do a full build (as if all files have changed).
-  final bool full;
-
-  /// Whether to print results using a machine parseable format.
-  final bool machineFormat;
-
-  /// Whether the force deploy option was passed in the command line.
-  final bool forceDeploy;
-
-  /// Location where to generate output files.
-  final String outDir;
-
-  /// True to use the CSP-compliant JS file.
-  final bool contentSecurityPolicy;
-
-  /// True to include the JS script tag directly, without the
-  /// "packages/browser/dart.js" trampoline.
-  final bool directlyIncludeJS;
-
-  /// Run transformers in release mode. For instance, uses the minified versions
-  /// of the web_components polyfill.
-  final bool releaseMode;
-
-  CommandLineOptions(this.changedFiles, this.removedFiles, this.clean,
-      this.full, this.machineFormat, this.forceDeploy, this.outDir,
-      this.directlyIncludeJS, this.contentSecurityPolicy, this.releaseMode);
-}
-
-/// Parse command-line arguments and return a [CommandLineOptions] object. The
-/// following flags are parsed by this method.
-///
-///   * `--changed file-path`: notify of a file change.
-///   * `--removed file-path`: notify that a file was removed.
-///   * `--clean`: remove temporary artifacts (if any)
-///   * `--full`: build everything, similar to marking every file as changed
-///   * `--machine`: produce output that can be parsed by tools, such as the
-///     Dart Editor.
-///   * `--deploy`: force deploy.
-///   * `--no-js`: deploy replaces *.dart scripts with *.dart.js. You can turn
-///     this feature off with --no-js, which leaves "packages/browser/dart.js".
-///   * `--csp`: extracts inlined JavaScript code to comply with Content
-///     Security Policy restrictions.
-///   * `--help`: print documentation for each option and exit.
-///
-/// Currently not all the flags are used by [lint] or [deploy] above, but they
-/// are available so they can be used from your `build.dart`. For instance, see
-/// the top-level library documentation for an example that uses the
-/// force-deploy option to conditionally call [deploy].
-///
-/// If this documentation becomes out of date, the best way to discover which
-/// flags are supported is to invoke this function from your build.dart, and run
-/// it with the `--help` command-line flag.
-CommandLineOptions parseOptions([List<String> args]) {
-  if (args == null) {
-    print('warning: the list of arguments from main(List<String> args) now '
-        'needs to be passed explicitly to parseOptions.');
-    args = [];
-  }
-  var parser = new ArgParser()
-    ..addOption('changed',
-        help: 'The file has changed since the last build.', allowMultiple: true)
-    ..addOption('removed',
-        help: 'The file was removed since the last build.', allowMultiple: true)
-    ..addFlag('clean',
-        negatable: false, help: 'Remove any build artifacts (if any).')
-    ..addFlag('full', negatable: false, help: 'perform a full build')
-    ..addFlag('machine',
-        negatable: false,
-        help: 'Produce warnings in a machine parseable format.')
-    ..addFlag('deploy', negatable: false, help: 'Whether to force deploying.')
-    ..addOption('out',
-        abbr: 'o', help: 'Directory to generate files into.', defaultsTo: 'out')
-    ..addFlag('js',
-        help: 'deploy replaces *.dart scripts with *.dart.js. This flag \n'
-        'leaves "packages/browser/dart.js" to do the replacement at runtime.',
-        defaultsTo: true)
-    ..addFlag('csp', help: 'extracts inlined JavaScript code to comply with \n'
-        'Content Security Policy restrictions.')
-    ..addFlag('debug',
-        help: 'run in debug mode. For example, use the debug polyfill \n'
-        'web_components/webcomponents.js instead of the minified one.\n',
-        defaultsTo: false)
-    ..addFlag('help',
-        abbr: 'h', negatable: false, help: 'Displays this help and exit.');
-
-  showUsage() {
-    print('Usage: dart build.dart [options]');
-    print('\nThese are valid options expected by build.dart:');
-    print(parser.getUsage());
-  }
-
-  var res;
-  try {
-    res = parser.parse(args);
-  } on FormatException catch (e) {
-    print(e.message);
-    showUsage();
-    exit(1);
-  }
-  if (res['help']) {
-    print('A build script that invokes the polymer linter and deploy tools.');
-    showUsage();
-    exit(0);
-  }
-  return new CommandLineOptions(res['changed'], res['removed'], res['clean'],
-      res['full'], res['machine'], res['deploy'], res['out'], res['js'],
-      res['csp'], !res['debug']);
-}
-
-List<String> _parseEntryPointsFromPubspec() {
-  var entryPoints = [];
-  var pubspec =
-      new File(path.join(path.dirname(Platform.script.path), 'pubspec.yaml'));
-  if (!pubspec.existsSync()) {
-    print('error: pubspec.yaml file not found.');
-    return null;
-  }
-  var transformers = loadYaml(pubspec.readAsStringSync())['transformers'];
-  if (transformers == null) return null;
-  if (transformers is! List) {
-    print('Unexpected value for transformers, expected a List.');
-    return null;
-  }
-
-  transformers.forEach((t) {
-    if (t is! Map) return;
-    var polymer = t['polymer'];
-    if (polymer == null || polymer is! Map) return;
-
-    var parsedEntryPoints = readFileList(polymer['entry_points']);
-    if (parsedEntryPoints == null) return;
-
-    entryPoints.addAll(parsedEntryPoints);
-  });
-  return entryPoints.isEmpty ? null : entryPoints;
-}
diff --git a/packages/polymer/lib/default_build.dart b/packages/polymer/lib/default_build.dart
deleted file mode 100644
index 8e1c246..0000000
--- a/packages/polymer/lib/default_build.dart
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Library that defines a main which calls build() from builder.dart. For
-/// polymer projects the build.dart file can simply export this to make the
-/// linter run on all of the entry points defined in your pubspec.yaml.
-library polymer.default_build;
-
-import 'builder.dart';
-
-main(args) {
-  lint(options: parseOptions(args));
-}
diff --git a/packages/polymer/lib/deploy.dart b/packages/polymer/lib/deploy.dart
deleted file mode 100644
index 96fa5ad..0000000
--- a/packages/polymer/lib/deploy.dart
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// **Note**: If you already have a `build.dart` in your application, we
-/// recommend to use the `package:polymer/builder.dart` library instead.
-
-/// Temporary deploy command used to create a version of the app that can be
-/// compiled with dart2js and deployed. Following pub layout conventions, this
-/// script will treat any HTML file under a package 'web/' and 'test/'
-/// directories as entry points.
-///
-/// From an application package you can run deploy by creating a small program
-/// as follows:
-///
-///    import "package:polymer/deploy.dart" as deploy;
-///    main() => deploy.main();
-///
-/// This library should go away once `pub deploy` can be configured to run
-/// barback transformers.
-library polymer.deploy;
-
-import 'dart:io';
-
-import 'package:args/args.dart';
-import 'package:code_transformers/tests.dart' show testingDartSdkDirectory;
-import 'package:path/path.dart' as path;
-
-import 'src/build/common.dart'
-    show TransformOptions, LintOptions, phasesForPolymer;
-import 'src/build/runner.dart';
-import 'transformer.dart';
-
-main(List<String> arguments) {
-  var args = _parseArgs(arguments);
-  if (args == null) exit(1);
-
-  var test = args['test'];
-  var outDir = args['out'];
-  var filters = [];
-  if (args['file-filter'] != null) {
-    filters = args['file-filter'].split(',');
-  }
-
-  var options;
-  if (test == null) {
-    var transformOps = new TransformOptions(
-        directlyIncludeJS: args['js'],
-        contentSecurityPolicy: args['csp'],
-        releaseMode: !args['debug']);
-    var phases = createDeployPhases(transformOps);
-    options = new BarbackOptions(phases, outDir,
-        // TODO(sigmund): include here also smoke transformer when it's on by
-        // default.
-        packagePhases: {'polymer': phasesForPolymer});
-  } else {
-    options = _createTestOptions(
-        test, outDir, args['js'], args['csp'], !args['debug'], filters);
-  }
-  if (options == null) exit(1);
-
-  print('polymer/deploy.dart: creating a deploy target for '
-      '"${options.currentPackage}"');
-
-  runBarback(options)
-      .then((_) => print('Done! All files written to "$outDir"'))
-      .catchError(_reportErrorAndExit);
-}
-
-BarbackOptions _createTestOptions(String testFile, String outDir,
-    bool directlyIncludeJS, bool contentSecurityPolicy, bool releaseMode,
-    List<String> filters) {
-  var testDir = path.normalize(path.dirname(testFile));
-
-  // A test must be allowed to import things in the package.
-  // So we must find its package root, given the entry point. We can do this
-  // by walking up to find pubspec.yaml.
-  var pubspecDir = _findDirWithFile(path.absolute(testDir), 'pubspec.yaml');
-  if (pubspecDir == null) {
-    print('error: pubspec.yaml file not found, please run this script from '
-        'your package root directory or a subdirectory.');
-    return null;
-  }
-  var packageName = readCurrentPackageFromPubspec(pubspecDir);
-
-  // Find the dart-root so we can include all package dependencies and
-  // transformers from other packages.
-  var pkgDir = path.join(_findDirWithDir(path.absolute(testDir), 'pkg'), 'pkg');
-
-  var phases = createDeployPhases(new TransformOptions(
-      entryPoints: [path.relative(testFile, from: pubspecDir)],
-      directlyIncludeJS: directlyIncludeJS,
-      contentSecurityPolicy: contentSecurityPolicy,
-      releaseMode: releaseMode,
-      lint: new LintOptions.disabled()), sdkDir: testingDartSdkDirectory);
-  var dirs = {};
-  // Note: we include all packages in pkg/ to keep things simple. Ideally this
-  // should be restricted to the transitive dependencies of this package.
-  _subDirs(pkgDir).forEach((p) {
-    dirs[path.basename(p)] = p;
-  });
-  // Note: packageName may be a duplicate of 'polymer', but that's ok (they
-  // should be the same value).
-  dirs[packageName] = pubspecDir;
-  return new BarbackOptions(phases, outDir,
-      currentPackage: packageName, packageDirs: dirs,
-      // TODO(sigmund): include here also smoke transformer when it's on by
-      // default.
-      packagePhases: {'polymer': phasesForPolymer},
-      transformTests: true,
-      fileFilter: filters);
-}
-
-String _findDirWithFile(String dir, String filename) {
-  while (!new File(path.join(dir, filename)).existsSync()) {
-    var parentDir = path.dirname(dir);
-    // If we reached root and failed to find it, bail.
-    if (parentDir == dir) return null;
-    dir = parentDir;
-  }
-  return dir;
-}
-
-String _findDirWithDir(String dir, String subdir) {
-  while (!new Directory(path.join(dir, subdir)).existsSync()) {
-    var parentDir = path.dirname(dir);
-    // If we reached root and failed to find it, bail.
-    if (parentDir == dir) return null;
-    dir = parentDir;
-  }
-  return dir;
-}
-
-List<String> _subDirs(String dir) => new Directory(dir)
-    .listSync(followLinks: false)
-    .where((d) => d is Directory)
-    .map((d) => d.path)
-    .toList();
-
-void _reportErrorAndExit(e, trace) {
-  print('Uncaught error: $e');
-  if (trace != null) print(trace);
-  exit(1);
-}
-
-ArgResults _parseArgs(arguments) {
-  var parser = new ArgParser()
-    ..addFlag('help',
-        abbr: 'h',
-        help: 'Displays this help message.',
-        defaultsTo: false,
-        negatable: false)
-    ..addOption('out',
-        abbr: 'o', help: 'Directory to generate files into.', defaultsTo: 'out')
-    ..addOption('file-filter', help: 'Do not copy in files that match \n'
-        'these filters to the deployed folder, e.g., ".svn"', defaultsTo: null)
-    ..addOption('test', help: 'Deploy the test at the given path.\n'
-        'Note: currently this will deploy all tests in its directory,\n'
-        'but it will eventually deploy only the specified test.')
-    ..addFlag('js',
-        help: 'deploy replaces *.dart scripts with *.dart.js. This flag \n'
-        'leaves "packages/browser/dart.js" to do the replacement at runtime.',
-        defaultsTo: true)
-    ..addFlag('debug',
-        help: 'run in debug mode. For example, use the debug polyfill \n'
-        'web_components/webcomponents.js instead of the minified one.\n',
-        defaultsTo: false)
-    ..addFlag('csp', help: 'extracts inlined JavaScript code to comply with \n'
-        'Content Security Policy restrictions.');
-  try {
-    var results = parser.parse(arguments);
-    if (results['help']) {
-      _showUsage(parser);
-      return null;
-    }
-    return results;
-  } on FormatException catch (e) {
-    print(e.message);
-    _showUsage(parser);
-    return null;
-  }
-}
-
-_showUsage(parser) {
-  print('Usage: dart --package-root=packages/ '
-      'package:polymer/deploy.dart [options]');
-  print(parser.getUsage());
-}
diff --git a/packages/polymer/lib/deserialize.dart b/packages/polymer/lib/deserialize.dart
deleted file mode 100644
index 6d07aca..0000000
--- a/packages/polymer/lib/deserialize.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.deserialize;
-
-import 'dart:convert' show JSON;
-
-final _typeHandlers = {
-  String: (x, _) => x,
-  Null: (x, _) => x,
-  DateTime: (x, def) {
-    // TODO(jmesserly): shouldn't need to try-catch here
-    // See: https://code.google.com/p/dart/issues/detail?id=1878
-    try {
-      return DateTime.parse(x);
-    } catch (e) {
-      return def;
-    }
-  },
-  bool: (x, _) => x != 'false',
-  int: (x, def) => int.parse(x, onError: (_) => def),
-  double: (x, def) => double.parse(x, (_) => def),
-};
-
-/// Convert representation of [value] based on [type] and [currentValue].
-Object deserializeValue(String value, Object currentValue, Type type) {
-  var handler = _typeHandlers[type];
-  if (handler != null) return handler(value, currentValue);
-
-  try {
-    // If the string is an object, we can parse is with the JSON library.
-    // include convenience replace for single-quotes. If the author omits
-    // quotes altogether, parse will fail.
-    return JSON.decode(value.replaceAll("'", '"'));
-
-    // TODO(jmesserly): deserialized JSON is not assignable to most objects in
-    // Dart. We should attempt to convert it appropriately.
-  } catch (e) {
-    // The object isn't valid JSON, return the raw value
-    return value;
-  }
-}
diff --git a/packages/polymer/lib/html_element_names.dart b/packages/polymer/lib/html_element_names.dart
deleted file mode 100644
index c61ca36..0000000
--- a/packages/polymer/lib/html_element_names.dart
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library polymer.html_element_names;
-
-/**
- * HTML element to DOM type mapping. Source:
- * <http://dev.w3.org/html5/spec/section-index.html#element-interfaces>
- *
- * The 'HTML' prefix has been removed to match `dart:html`, as per:
- * <http://code.google.com/p/dart/source/browse/branches/bleeding_edge/dart/lib/html/scripts/htmlrenamer.py>
- * It does not appear any element types are being renamed other than the prefix.
- * However there does not appear to be the last subtypes for the following tags:
- * command, data, td, th, and time.
- */
-const HTML_ELEMENT_NAMES = const {
-  'a': 'AnchorElement',
-  'abbr': 'Element',
-  'address': 'Element',
-  'area': 'AreaElement',
-  'article': 'Element',
-  'aside': 'Element',
-  'audio': 'AudioElement',
-  'b': 'Element',
-  'base': 'BaseElement',
-  'bdi': 'Element',
-  'bdo': 'Element',
-  'blockquote': 'QuoteElement',
-  'body': 'BodyElement',
-  'br': 'BRElement',
-  'button': 'ButtonElement',
-  'canvas': 'CanvasElement',
-  'caption': 'TableCaptionElement',
-  'cite': 'Element',
-  'code': 'Element',
-  'col': 'TableColElement',
-  'colgroup': 'TableColElement',
-  'command': 'Element', // see doc comment, was: 'CommandElement'
-  'data': 'Element', // see doc comment, was: 'DataElement'
-  'datalist': 'DataListElement',
-  'dd': 'Element',
-  'del': 'ModElement',
-  'details': 'DetailsElement',
-  'dfn': 'Element',
-  'dialog': 'DialogElement',
-  'div': 'DivElement',
-  'dl': 'DListElement',
-  'dt': 'Element',
-  'em': 'Element',
-  'embed': 'EmbedElement',
-  'fieldset': 'FieldSetElement',
-  'figcaption': 'Element',
-  'figure': 'Element',
-  'footer': 'Element',
-  'form': 'FormElement',
-  'h1': 'HeadingElement',
-  'h2': 'HeadingElement',
-  'h3': 'HeadingElement',
-  'h4': 'HeadingElement',
-  'h5': 'HeadingElement',
-  'h6': 'HeadingElement',
-  'head': 'HeadElement',
-  'header': 'Element',
-  'hgroup': 'Element',
-  'hr': 'HRElement',
-  'html': 'HtmlElement',
-  'i': 'Element',
-  'iframe': 'IFrameElement',
-  'img': 'ImageElement',
-  'input': 'InputElement',
-  'ins': 'ModElement',
-  'kbd': 'Element',
-  'keygen': 'KeygenElement',
-  'label': 'LabelElement',
-  'legend': 'LegendElement',
-  'li': 'LIElement',
-  'link': 'LinkElement',
-  'map': 'MapElement',
-  'mark': 'Element',
-  'menu': 'MenuElement',
-  'meta': 'MetaElement',
-  'meter': 'MeterElement',
-  'nav': 'Element',
-  'noscript': 'Element',
-  'object': 'ObjectElement',
-  'ol': 'OListElement',
-  'optgroup': 'OptGroupElement',
-  'option': 'OptionElement',
-  'output': 'OutputElement',
-  'p': 'ParagraphElement',
-  'param': 'ParamElement',
-  'pre': 'PreElement',
-  'progress': 'ProgressElement',
-  'q': 'QuoteElement',
-  'rp': 'Element',
-  'rt': 'Element',
-  'ruby': 'Element',
-  's': 'Element',
-  'samp': 'Element',
-  'script': 'ScriptElement',
-  'section': 'Element',
-  'select': 'SelectElement',
-  'small': 'Element',
-  'source': 'SourceElement',
-  'span': 'SpanElement',
-  'strong': 'Element',
-  'style': 'StyleElement',
-  'sub': 'Element',
-  'summary': 'Element',
-  'sup': 'Element',
-  'table': 'TableElement',
-  'tbody': 'TableSectionElement',
-  'td': 'TableCellElement', // see doc comment, was: 'TableDataCellElement'
-  'template': 'TemplateElement',
-  'textarea': 'TextAreaElement',
-  'tfoot': 'TableSectionElement',
-  'th': 'TableCellElement', // see doc comment, was: 'TableHeaderCellElement'
-  'thead': 'TableSectionElement',
-  'time': 'Element', // see doc comment, was: 'TimeElement'
-  'title': 'TitleElement',
-  'tr': 'TableRowElement',
-  'track': 'TrackElement',
-  'u': 'Element',
-  'ul': 'UListElement',
-  'var': 'Element',
-  'video': 'VideoElement',
-  'wbr': 'Element',
-};
diff --git a/packages/polymer/lib/init.dart b/packages/polymer/lib/init.dart
deleted file mode 100644
index 108a0ec..0000000
--- a/packages/polymer/lib/init.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Library that automatically initializes polymer elements without having to
-/// write a main for your application.
-///
-/// If a polymer application is written entirely with `<polymer-element>` tags
-/// and there is no initialization code that needs to happen before these
-/// elements are created, then, instead of creating your own `main`, you can
-/// simply include a script tag loading this library:
-///
-///    <script type="application/dart">export "package:polymer/init.dart";
-///    </script>
-///
-/// This script tag should be placed after all HTML imports on your page.
-library polymer.init;
-
-import 'dart:async';
-import 'package:polymer/polymer.dart';
-
-/// Returns a [Future<Zone>] that code should be executed in for dirty checking.
-/// The returned future will complete once polymer is ready and all @initMethod
-/// and @whenPolymerReady functions have been executed.
-Future<Zone> main() =>
-    initPolymer().then((zone) => Polymer.onReady.then((_) => zone));
diff --git a/packages/polymer/lib/polymer.dart b/packages/polymer/lib/polymer.dart
deleted file mode 100644
index 95f1af7..0000000
--- a/packages/polymer/lib/polymer.dart
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Custom HTML tags, data binding, and templates for building
-/// structured, encapsulated, client-side web apps.
-///
-/// Polymer.dart, the next evolution of Web UI,
-/// is an in-progress Dart port of the
-/// [Polymer project](http://www.polymer-project.org/).
-/// Polymer.dart compiles to JavaScript and runs across the modern web.
-///
-/// To use polymer.dart in your application,
-/// first add a
-/// [dependency](http://pub.dartlang.org/doc/dependencies.html)
-/// to the app's pubspec.yaml file.
-/// Instead of using the open-ended `any` version specifier,
-/// we recommend using a range of version numbers, as in this example:
-///
-///     dependencies:
-///       polymer: '>=0.7.1 <0.8'
-///
-/// Then import the library into your application:
-///
-///     import 'package:polymer/polymer.dart';
-///
-/// ## Other resources
-///
-/// * [Polymer.dart homepage](http://www.dartlang.org/polymer-dart/):
-/// Example code, project status, and
-/// information about how to get started using Polymer.dart in your apps.
-///
-/// * [polymer.dart package](http://pub.dartlang.org/packages/polymer):
-/// More details, such as the current major release number.
-///
-/// * [Upgrading to Polymer.dart](http://www.dartlang.org/polymer-dart/upgrading-to-polymer-from-web-ui.html):
-/// Tips for converting your apps from Web UI to Polymer.dart.
-@HtmlImport('polymer.html')
-library polymer;
-
-import 'dart:async';
-import 'dart:collection';
-import 'dart:html';
-import 'dart:js' as js show context;
-import 'dart:js' hide context;
-
-import 'package:initialize/initialize.dart' hide run;
-import 'package:logging/logging.dart';
-import 'package:observe/observe.dart';
-import 'package:observe/src/dirty_check.dart' show dirtyCheckZone;
-import 'package:polymer_expressions/polymer_expressions.dart'
-    as polymer_expressions;
-import 'package:polymer_interop/polymer_interop.dart';
-import 'package:smoke/smoke.dart' as smoke;
-import 'package:template_binding/template_binding.dart';
-import 'package:web_components/web_components.dart';
-
-import 'auto_binding.dart';
-import 'deserialize.dart' as deserialize;
-
-export 'package:initialize/initialize.dart' show initMethod;
-export 'package:observe/observe.dart';
-export 'package:observe/html.dart';
-export 'package:web_components/web_components.dart' show HtmlImport;
-export 'auto_binding.dart';
-
-part 'src/declaration.dart';
-part 'src/events.dart';
-part 'src/initializers.dart';
-part 'src/instance.dart';
-part 'src/job.dart';
-part 'src/loader.dart';
-part 'src/property_accessor.dart';
-
-/// Call [configureForDeployment] to change this to true.
-bool _deployMode = false;
diff --git a/packages/polymer/lib/polymer.html b/packages/polymer/lib/polymer.html
deleted file mode 100644
index 621aa63..0000000
--- a/packages/polymer/lib/polymer.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!--
- 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.
--->
-
-<!--
-This file is from the Polymer project (https://github.com/Polymer/polymer/).
-You can replace polymer.html with a different version if desired.
--->
-<!-- minified for deployment: -->
-<link rel="import" href="../../packages/polymer_interop/polymer.html">
-<script>
-// This empty script tag is necessary to work around dartbug.com/19650
-</script>
diff --git a/packages/polymer/lib/polymer_experimental.html b/packages/polymer/lib/polymer_experimental.html
deleted file mode 100644
index f2909de..0000000
--- a/packages/polymer/lib/polymer_experimental.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!--
- 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.
--->
-<link rel="import" href="polymer.html">
-
-<!-- Experimental: bootstrap the user application in a new isolate. -->
-<script src="boot.js"></script>
diff --git a/packages/polymer/lib/src/build/build_filter.dart b/packages/polymer/lib/src/build/build_filter.dart
deleted file mode 100644
index d1c4a60..0000000
--- a/packages/polymer/lib/src/build/build_filter.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Final phase of the polymer transformation: removes any files that are not
-/// needed for deployment.
-library polymer.src.build.build_filter;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'common.dart';
-
-/// Removes any files not needed for deployment, such as internal build
-/// artifacts and non-entry HTML files.
-class BuildFilter extends Transformer with PolymerTransformer {
-  final TransformOptions options;
-  BuildFilter(this.options);
-
-  isPrimary(AssetId id) {
-    // nothing is filtered in debug mode
-    return options.releaseMode &&
-        // TODO(sigmund): remove this exclusion once we have dev_transformers
-        // (dartbug.com/14187)
-        !id.path.startsWith('lib/') &&
-        // may filter non-entry HTML files and internal artifacts
-        (id.extension == '.html' || id.extension == _DATA_EXTENSION) &&
-        // keep any entry points
-        !options.isHtmlEntryPoint(id);
-  }
-
-  apply(Transform transform) {
-    transform.consumePrimary();
-    if (transform.primaryInput.id.extension == _DATA_EXTENSION) {
-      return null;
-    }
-    var logger = new BuildLogger(transform,
-        convertErrorsToWarnings: !options.releaseMode,
-        detailsUri: 'http://goo.gl/5HPeuP');
-    return readPrimaryAsHtml(transform, logger).then((document) {
-      // Keep .html files that don't use polymer, since the app developer might
-      // have non-polymer entrypoints.
-      if (document.querySelectorAll('polymer-element').isEmpty) {
-        transform.addOutput(transform.primaryInput);
-      }
-    });
-  }
-}
-
-const String _DATA_EXTENSION = '._data';
diff --git a/packages/polymer/lib/src/build/build_log_combiner.dart b/packages/polymer/lib/src/build/build_log_combiner.dart
deleted file mode 100644
index 33fc0f4..0000000
--- a/packages/polymer/lib/src/build/build_log_combiner.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Logic to combine all the ._buildLog.* logs into one ._buildLog file.
-library polymer.src.build.log_combiner;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-
-import 'common.dart';
-
-/// Logic to combine all the ._buildLog.* logs into one ._buildLog file.
-class BuildLogCombiner extends Transformer with PolymerTransformer {
-  final TransformOptions options;
-
-  BuildLogCombiner(this.options);
-
-  /// Run only on entry point html files and only if
-  /// options.injectBuildLogsInOutput is true.
-  bool isPrimary(idOrAsset) {
-    if (!options.injectBuildLogsInOutput) return false;
-    var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id;
-    return options.isHtmlEntryPoint(id);
-  }
-
-  Future apply(Transform transform) {
-    // Combine all ._buildLogs* files into one ._buildLogs file.
-    return BuildLogger.combineLogFiles(transform);
-  }
-}
diff --git a/packages/polymer/lib/src/build/common.dart b/packages/polymer/lib/src/build/common.dart
deleted file mode 100644
index 31c63e0..0000000
--- a/packages/polymer/lib/src/build/common.dart
+++ /dev/null
@@ -1,280 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Common methods used by transfomers.
-library polymer.src.build.common;
-
-import 'dart:async';
-
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/scanner.dart';
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:html/dom.dart' show Document;
-import 'package:html/parser.dart' show HtmlParser;
-import 'package:observe/transformer.dart' show ObservableTransformer;
-import 'package:path/path.dart' as path;
-
-import 'constants.dart';
-import 'messages.dart';
-
-export 'constants.dart';
-
-const _ignoredErrors = const [
-  'unexpected-dash-after-double-dash-in-comment',
-  'unexpected-char-in-comment',
-];
-
-/// Parses an HTML file [contents] and returns a DOM-like tree. Adds emitted
-/// error/warning to [logger].
-Document _parseHtml(String contents, String sourcePath, BuildLogger logger,
-    {bool checkDocType: true, bool showWarnings: true}) {
-  // TODO(jmesserly): make HTTP encoding configurable
-  var parser = new HtmlParser(contents,
-      encoding: 'utf8', generateSpans: true, sourceUrl: sourcePath);
-  var document = parser.parse();
-
-  // Note: errors aren't fatal in HTML (unless strict mode is on).
-  // So just print them as warnings.
-  if (showWarnings) {
-    for (var e in parser.errors) {
-      if (_ignoredErrors.contains(e.errorCode)) continue;
-      if (checkDocType || e.errorCode != 'expected-doctype-but-got-start-tag') {
-        logger.warning(HTML5_WARNING.create({'message': e.message}),
-            span: e.span);
-      }
-    }
-  }
-  return document;
-}
-
-/// Additional options used by polymer transformers
-class TransformOptions {
-  /// List of entrypoints paths. The paths are relative to the package root and
-  /// are represented using posix style, which matches the representation used
-  /// in asset ids in barback. If null, anything under 'web/' or 'test/' is
-  /// considered an entry point.
-  final List<String> entryPoints;
-
-  /// Map of stylesheet paths that should or should not be inlined. The paths
-  /// are relative to the package root and are represented using posix style,
-  /// which matches the representation used in asset ids in barback.
-  ///
-  /// There is an additional special key 'default' for the global default.
-  final Map<String, bool> inlineStylesheets;
-
-  /// True to enable Content Security Policy.
-  /// This means the HTML page will not have inlined .js code.
-  final bool contentSecurityPolicy;
-
-  /// True to include the compiled JavaScript directly from the HTML page.
-  /// If enabled this will remove "packages/browser/dart.js" and replace
-  /// `type="application/dart"` scripts with equivalent *.dart.js files.
-  final bool directlyIncludeJS;
-
-  /// Run transformers to create a releasable app. For example, include the
-  /// minified versions of the polyfills rather than the debug versions.
-  final bool releaseMode;
-
-  /// This will make a physical element appear on the page showing build logs.
-  /// It will only appear when ![releaseMode] even if this is true.
-  final bool injectBuildLogsInOutput;
-
-  /// Rules to determine whether to run liner on an html file.
-  // TODO(jmesserly): instead of this flag, we should only run linter on
-  // reachable (entry point+imported) html if deploying. See dartbug.com/17199.
-  final LintOptions lint;
-
-  /// This will automatically inject the polyfills from the `web_components`
-  /// package in all entry points, if it is not already included.
-  final bool injectWebComponentsJs;
-
-  TransformOptions({entryPoints, this.inlineStylesheets,
-      this.contentSecurityPolicy: false, this.directlyIncludeJS: true,
-      this.releaseMode: true, this.lint: const LintOptions(),
-      this.injectBuildLogsInOutput: false, this.injectWebComponentsJs: true})
-      : entryPoints = entryPoints == null
-          ? null
-          : entryPoints.map(systemToAssetPath).toList();
-
-  /// Whether an asset with [id] is an entry point HTML file.
-  bool isHtmlEntryPoint(AssetId id) {
-    if (id.extension != '.html') return false;
-
-    // Note: [id.path] is a relative path from the root of a package.
-    if (entryPoints == null) {
-      return id.path.startsWith('web/') || id.path.startsWith('test/');
-    }
-
-    return entryPoints.contains(id.path);
-  }
-
-  // Whether a stylesheet with [id] should be inlined, the default is true.
-  bool shouldInlineStylesheet(AssetId id) {
-    // Note: [id.path] is a relative path from the root of a package.
-    // Default is to inline everything
-    if (inlineStylesheets == null) return true;
-    // First check for the full asset path overrides.
-    var override = inlineStylesheets[id.toString()];
-    if (override != null) return override;
-    // Then check just the path overrides (if the package was not specified).
-    override = inlineStylesheets[id.path];
-    if (override != null) return override;
-    // Then check the global default setting.
-    var globalDefault = inlineStylesheets['default'];
-    return (globalDefault != null) ? globalDefault : true;
-  }
-
-  // Whether a stylesheet with [id] has an overriden inlining setting.
-  bool stylesheetInliningIsOverridden(AssetId id) {
-    return inlineStylesheets != null &&
-        (inlineStylesheets.containsKey(id.toString()) ||
-            inlineStylesheets.containsKey(id.path));
-  }
-}
-
-class LintOptions {
-  /// Whether lint is enabled.
-  final bool enabled;
-
-  /// Patterns explicitly included/excluded from linting (if any).
-  final List<RegExp> patterns;
-
-  /// When [patterns] is not null, whether they denote inclusion or exclusion.
-  final bool isInclude;
-
-  const LintOptions()
-      : enabled = true,
-        patterns = null,
-        isInclude = true;
-
-  const LintOptions.disabled()
-      : enabled = false,
-        patterns = null,
-        isInclude = true;
-
-  LintOptions.include(List<String> patterns)
-      : enabled = true,
-        isInclude = true,
-        patterns = patterns.map((s) => new RegExp(s)).toList();
-
-  LintOptions.exclude(List<String> patterns)
-      : enabled = true,
-        isInclude = false,
-        patterns = patterns.map((s) => new RegExp(s)).toList();
-
-  bool shouldLint(String fileName) {
-    if (!enabled) return false;
-    if (patterns == null) return isInclude;
-    for (var pattern in patterns) {
-      if (pattern.hasMatch(fileName)) return isInclude;
-    }
-    return !isInclude;
-  }
-}
-
-/// Mixin for polymer transformers.
-abstract class PolymerTransformer {
-  TransformOptions get options;
-
-  Future<Document> readPrimaryAsHtml(Transform transform, BuildLogger logger) {
-    var asset = transform.primaryInput;
-    var id = asset.id;
-    return asset.readAsString().then((content) {
-      return _parseHtml(content, id.path, logger,
-          checkDocType: options.isHtmlEntryPoint(id));
-    });
-  }
-
-  Future<Document> readAsHtml(
-      AssetId id, Transform transform, BuildLogger logger,
-      {bool showWarnings: true}) {
-    var primaryId = transform.primaryInput.id;
-    bool samePackage = id.package == primaryId.package;
-    var url = spanUrlFor(id, transform, logger);
-    return transform.readInputAsString(id).then((content) {
-      return _parseHtml(content, url, logger,
-          checkDocType: samePackage && options.isHtmlEntryPoint(id),
-          showWarnings: showWarnings);
-    });
-  }
-
-  Future<bool> assetExists(AssetId id, Transform transform) =>
-      transform.getInput(id).then((_) => true).catchError((_) => false);
-
-  String toString() => 'polymer ($runtimeType)';
-}
-
-/// Gets the appropriate URL to use in a span to produce messages (e.g.
-/// warnings) for users. This will attempt to format the URL in the most useful
-/// way:
-///
-/// - If the asset is within the primary package, then use the [id.path],
-///   the user will know it is a file from their own code.
-/// - If the asset is from another package, then use [assetUrlFor], this will
-///   likely be a "package:" url to the file in the other package, which is
-///   enough for users to identify where the error is.
-String spanUrlFor(AssetId id, Transform transform, logger) {
-  var primaryId = transform.primaryInput.id;
-  bool samePackage = id.package == primaryId.package;
-  return samePackage
-      ? id.path
-      : assetUrlFor(id, primaryId, logger, allowAssetUrl: true);
-}
-
-/// Transformer phases which should be applied to the Polymer package.
-List<List<Transformer>> get phasesForPolymer =>
-    [[new ObservableTransformer(files: ['lib/src/instance.dart'])]];
-
-/// Generate the import url for a file described by [id], referenced by a file
-/// with [sourceId].
-// TODO(sigmund): this should also be in barback (dartbug.com/12610)
-String assetUrlFor(AssetId id, AssetId sourceId, BuildLogger logger,
-    {bool allowAssetUrl: false}) {
-  // use package: and asset: urls if possible
-  if (id.path.startsWith('lib/')) {
-    return 'package:${id.package}/${id.path.substring(4)}';
-  }
-
-  if (id.path.startsWith('asset/')) {
-    if (!allowAssetUrl) {
-      logger.error(INTERNAL_ERROR_DONT_KNOW_HOW_TO_IMPORT.create({
-        'target': id,
-        'source': sourceId,
-        'extra': ' (asset urls not allowed.)'
-      }));
-      return null;
-    }
-    return 'asset:${id.package}/${id.path.substring(6)}';
-  }
-
-  // Use relative urls only if it's possible.
-  if (id.package != sourceId.package) {
-    logger.error("don't know how to refer to $id from $sourceId");
-    return null;
-  }
-
-  var builder = path.url;
-  return builder.relative(builder.join('/', id.path),
-      from: builder.join('/', builder.dirname(sourceId.path)));
-}
-
-/// Convert system paths to asset paths (asset paths are posix style).
-String systemToAssetPath(String assetPath) {
-  if (path.Style.platform != path.Style.windows) return assetPath;
-  return path.posix.joinAll(path.split(assetPath));
-}
-
-/// Returns true if this is a valid custom element name. See:
-/// <http://w3c.github.io/webcomponents/spec/custom/#dfn-custom-element-type>
-bool isCustomTagName(String name) {
-  if (name == null || !name.contains('-')) return false;
-  return !invalidTagNames.containsKey(name);
-}
-
-/// Regex to split names in the 'attributes' attribute, which supports 'a b c',
-/// 'a,b,c', or even 'a b,c'. This is the same as in `lib/src/declaration.dart`.
-final ATTRIBUTES_REGEX = new RegExp(r'\s|,');
diff --git a/packages/polymer/lib/src/build/constants.dart b/packages/polymer/lib/src/build/constants.dart
deleted file mode 100644
index bc37532..0000000
--- a/packages/polymer/lib/src/build/constants.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.src.build.constants;
-
-/// These names have meaning in SVG or MathML, so they aren't allowed as custom
-/// tags. See [isCustomTagName].
-const invalidTagNames = const {
-  'annotation-xml': '',
-  'color-profile': '',
-  'font-face': '',
-  'font-face-src': '',
-  'font-face-uri': '',
-  'font-face-format': '',
-  'font-face-name': '',
-  'missing-glyph': '',
-};
-
-const POLYMER_EXPERIMENTAL_HTML = 'packages/polymer/polymer_experimental.html';
diff --git a/packages/polymer/lib/src/build/generated/messages.html b/packages/polymer/lib/src/build/generated/messages.html
deleted file mode 100644
index d4aa6e9..0000000
--- a/packages/polymer/lib/src/build/generated/messages.html
+++ /dev/null
@@ -1,642 +0,0 @@
-<!doctype html>
-<!--
-  This file is autogenerated with polymer/tool/create_message_details_page.dart
--->
-<html>
-<style>
-@font-face {
-  font-family: 'Montserrat';
-  font-style: normal;
-  font-weight: 400;
-  src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff) format('woff');
-}
-@font-face {
-  font-family: 'Montserrat';
-  font-style: normal;
-  font-weight: 700;
-  src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/IQHow_FEYlDC4Gzy_m8fcnbFhgvWbfSbdVg11QabG8w.woff) format('woff');
-}
-@font-face {
-  font-family: 'Roboto';
-  font-style: normal;
-  font-weight: 300;
-  src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/Hgo13k-tfSpn0qi1SFdUfbO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
-}
-@font-face {
-  font-family: 'Roboto';
-  font-style: normal;
-  font-weight: 400;
-  src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/CrYjSnGjrRCn0pd9VQsnFOvvDin1pK8aKteLpeZ5c0A.woff) format('woff');
-}
-
-body {
-  width: 80vw;
-  margin: 20px;
-  font-family: Roboto, sans-serif;
-  background-color: #f0f0f0;
-}
-
-h2 {
-  font-family: Montserrat, sans-serif;
-  box-sizing: border-box;
-  color: rgb(72, 72, 72);
-  display: block;
-  font-style: normal;
-  font-variant: normal;
-  font-weight: normal;
-}
-
-div:target {
-  background-color: #fff;
-  border: 1px solid #888;
-  border-radius: 5px;
-  padding: 0px 10px 2px 10px;
-  box-shadow: 7px 7px 5px #888888;
-  margin-bottom: 15px;
-}
-
-
-h3 {
-  font-family: Montserrat, sans-serif;
-  box-sizing: border-box;
-  color: rgb(72, 72, 72);
-  display: block;
-  font-style: normal;
-  font-variant: normal;
-  font-weight: normal;
-}
-
-div:target > h3 {
-  font-weight: bold;
-}
-
-pre {
-  display: block;
-  padding: 9.5px;
-  margin: 0 0 10px;
-  color: #333;
-  word-break: break-all;
-  word-wrap: break-word;
-  background-color: #f5f5f5;
-  border: 1px solid #ccc;
-  border-radius: 4px;
-}
-
-code {
-   font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
-   box-sizing: border-box;
-   padding: 0;
-   font-size: 90%;
-   color: #0084c5;
-   white-space: nowrap;
-   border-radius: 4px;
-   background-color: #f9f2f4;
-}
-
-pre code {
-   white-space: inherit;
-   color: inherit;
-   background-color: inherit;
-}
-
-a {
-  color: rgb(42, 100, 150);
-}
-
-h3 > a {
-  display: none;
-  font-size: 0.8em;
-}
-
-h3:hover > a {
-  display: inline;
-}
-</style>
-<body>
-<h2>Messages from package <code>code_transformers</code></h2>
-<hr />
-
-<div id="code_transformers_1"><h3>Absolute paths not allowed <a href="#code_transformers_1">#1</a></h3>
-<p>The transformers processing your code were trying to resolve a URL and identify
-a file that they correspond to. Currently only relative paths can be resolved.</p>
-</div><hr />
-
-<div id="code_transformers_2"><h3>Invalid URL to reach another package <a href="#code_transformers_2">#2</a></h3>
-<p>To reach an asset that belongs to another package, use <code>package:</code> URLs in
-Dart code, but in any other language (like HTML or CSS) use relative URLs that
-first go all the way to the <code>packages/</code> directory.</p>
-<p>The rules for correctly writing these imports are subtle and have a lot of
-special cases. Please review
-<a href="https://www.dartlang.org/polymer/app-directories.html">https://www.dartlang.org/polymer/app-directories.html</a> to learn
-more.</p>
-</div><hr />
-
-<div id="code_transformers_3"><h3>Incomplete URL to asset in another package <a href="#code_transformers_3">#3</a></h3>
-<p>URLs that refer to assets in other packages need to explicitly mention the
-<code>packages/</code> directory. In the future this requirement might be removed, but for
-now you must use a canonical URL form for it.</p>
-<p>For example, if <code>packages/a/a.html</code> needs to import <code>packages/b/b.html</code>,
-you might expect a.html to import <code>../b/b.html</code>. Instead, it must import
-<code>../../packages/b/b.html</code>.</p>
-<p>See <a href="http://dartbug.com/15797">issue 15797</a> and
-<a href="https://www.dartlang.org/polymer/app-directories.html">https://www.dartlang.org/polymer/app-directories.html</a> to learn more.</p>
-</div><hr /><h2>Messages from package <code>observe</code></h2>
-<hr />
-
-<div id="observe_1"><h3><code>@observable</code> not supported on libraries <a href="#observe_1">#1</a></h3>
-<p>Only instance fields on <code>Observable</code> classes can be observable,
-and you must explicitly annotate each observable field as <code>@observable</code>.</p>
-<p>Support for using the <code>@observable</code> annotation in libraries, classes, and
-elsewhere is deprecated.</p>
-</div><hr />
-
-<div id="observe_2"><h3><code>@observable</code> not supported on top-level fields <a href="#observe_2">#2</a></h3>
-<p>Only instance fields on <code>Observable</code> classes can be observable,
-and you must explicitly annotate each observable field as <code>@observable</code>.</p>
-<p>Support for using the <code>@observable</code> annotation in libraries, classes, and
-elsewhere is deprecated.</p>
-</div><hr />
-
-<div id="observe_3"><h3><code>@observable</code> not supported on classes <a href="#observe_3">#3</a></h3>
-<p>Only instance fields on <code>Observable</code> classes can be observable,
-and you must explicitly annotate each observable field as <code>@observable</code>.</p>
-<p>Support for using the <code>@observable</code> annotation in libraries, classes, and
-elsewhere is deprecated.</p>
-</div><hr />
-
-<div id="observe_4"><h3><code>@observable</code> not supported on static fields <a href="#observe_4">#4</a></h3>
-<p>Only instance fields on <code>Observable</code> classes can be observable,
-and you must explicitly annotate each observable field as <code>@observable</code>.</p>
-<p>Support for using the <code>@observable</code> annotation in libraries, classes, and
-elsewhere is deprecated.</p>
-</div><hr />
-
-<div id="observe_5"><h3><code>@observable</code> field not in an <code>Observable</code> class <a href="#observe_5">#5</a></h3>
-<p>Only instance fields on <code>Observable</code> classes can be observable,
-and you must explicitly annotate each observable field as <code>@observable</code>.</p>
-<p>Support for using the <code>@observable</code> annotation in libraries, classes, and
-elsewhere is deprecated.</p>
-</div><hr /><h2>Messages from package <code>polymer</code></h2>
-<hr />
-
-<div id="polymer_1"><h3>Import not found <a href="#polymer_1">#1</a></h3>
-<p>An HTML import seems to be broken. This could be because the file doesn't exist
-or because the link URL is incorrect.</p>
-</div><hr />
-
-<div id="polymer_2"><h3>Duplicate definition <a href="#polymer_2">#2</a></h3>
-<p>Custom element names are global and can only be defined once. Some common
-reasons why you might get two definitions:</p><ul><li>Two different elements are declared with the same name.</li><li>
-<p>A single HTML file defining an element, has been imported using two different
-URLs.</p></li></ul>
-</div><hr />
-
-<div id="polymer_3"><h3>Missing import to polymer.html <a href="#polymer_3">#3</a></h3>
-<p>Starting with polymer 0.11.0, each file that uses the definition
-of polymer-element must import it either directly or transitively.</p>
-</div><hr />
-
-<div id="polymer_4"><h3>Invalid import inside &lt;polymer-element> <a href="#polymer_4">#4</a></h3>
-<p>HTML imports are expected at the top of each document, outside of any
-polymer-element definitions. The polymer build process combines all your HTML
-files together so you can deploy a single HTML file with your application. This
-build process ignores imports that appear to be in the wrong location.</p>
-</div><hr />
-
-<div id="polymer_5"><h3>Missing call to <code>initPolymer()</code> <a href="#polymer_5">#5</a></h3>
-<p>Your application entry point didn't have any Dart script tags, so it's missing
-some initialization needed for polymer.dart.</p>
-</div><hr />
-
-<div id="polymer_6"><h3>Script tags with experimental bootstrap <a href="#polymer_6">#6</a></h3>
-<p>This experimental feature is no longer supported.</p>
-</div><hr />
-
-<div id="polymer_7"><h3>Multiple Dart script tags per document <a href="#polymer_7">#7</a></h3>
-<p>Dartium currently allows only one script tag per document. Any
-additional script tags might be ignored or result in an error. This will
-likely change in the future, but for now, combine the script tags together into
-a single Dart library.</p>
-</div><hr />
-
-<div id="polymer_8"><h3>Imports before script tags <a href="#polymer_8">#8</a></h3>
-<p>It is good practice to put all your HTML imports at the beginning of the
-document, above any Dart script tags. Today, the execution of Dart script tags
-is not synchronous in Dartium, so the difference is not noticeable. However,
-Dartium that will eventually change and make the timing of script tags execution
-match how they are in JavaScript. At that point the order of your imports with
-respect to script tags will be important. Following the practice of putting
-imports first protects your app from a future breaking change in this respect.</p>
-</div><hr />
-
-<div id="polymer_9"><h3>Missing href on a <code>&lt;link&gt;</code> tag <a href="#polymer_9">#9</a></h3>
-<p>All <code>&lt;link&gt;</code> tags should have a valid URL to a resource.</p>
-</div><hr />
-
-<div id="polymer_10"><h3><code>&lt;element&gt;</code> is deprecated <a href="#polymer_10">#10</a></h3>
-<p>Long ago <code>&lt;polymer-element&gt;</code> used to be called <code>&lt;element&gt;</code>. You probably ran
-into this error if you were migrating code that was written on a very early
-version of polymer.</p>
-</div><hr />
-
-<div id="polymer_11"><h3>Definition of a custom element not found <a href="#polymer_11">#11</a></h3>
-<p>The polymer build was not able to find the definition of a custom element. This
-can happen if an element is defined with a <code>&lt;polymer-element&gt;</code> tag, but you are
-missing an HTML import or the import link is incorrect.</p>
-<p>This warning can also be a false alarm. For instance, when an element is defined
-programatically using <code>document.registerElement</code>. In that case the polymer build
-will not be able to see the definition and will produce this warning.</p>
-</div><hr />
-
-<div id="polymer_12"><h3>Empty script tag <a href="#polymer_12">#12</a></h3>
-<p>Script tags should either have a <code>src</code> attribute or a non-empty body.</p>
-</div><hr />
-
-<div id="polymer_13"><h3>Expected Dart mime-type <a href="#polymer_13">#13</a></h3>
-<p>You seem to have a <code>.dart</code> extension on a script tag, but the mime-type
-doesn't match <code>application/dart</code>.</p>
-</div><hr />
-
-<div id="polymer_14"><h3>Expected Dart file extension <a href="#polymer_14">#14</a></h3>
-<p>You are using the <code>application/dart</code> mime-type on a script tag, so
-the URL to the script source URL should have a <code>.dart</code> extension.</p>
-</div><hr />
-
-<div id="polymer_15"><h3>Script with both src and inline text <a href="#polymer_15">#15</a></h3>
-<p>You have a script tag that includes both a <code>src</code> attribute and inline script
-text. You must choose one or the other.</p>
-</div><hr />
-
-<div id="polymer_16"><h3>Incorrect instantiation: missing base tag in instantiation <a href="#polymer_16">#16</a></h3>
-<p>When you declare that a custom element extends from a base tag, for example:</p>
-<pre><code>&lt;polymer-element name="my-example" extends="ul"&gt;
-</code></pre>
-<p>or:</p>
-<pre><code>&lt;polymer-element name="my-example2" extends="ul"&gt;
-&lt;polymer-element name="my-example" extends="my-example2"&gt;
-</code></pre>
-<p>You should instantiate <code>my-example</code> by using this syntax:</p>
-<pre><code>&lt;ul is="my-example"&gt;
-</code></pre>
-<p>And not:</p>
-<pre><code>&lt;my-example&gt;
-</code></pre>
-<p>Only elements that don't extend from existing HTML elements are created using
-the latter form.</p>
-<p>This is because browsers first create the base element, and then upgrade it to
-have the extra functionality of your custom element. In the example above, using
-<code>&lt;ul&gt;</code> tells the browser which base type it must create before
-doing the upgrade.</p>
-</div><hr />
-
-<div id="polymer_17"><h3>Incorrect instantiation: extra <code>is</code> attribute or missing <code>extends</code> in declaration <a href="#polymer_17">#17</a></h3>
-<p>Creating a custom element using the syntax:</p>
-<pre><code>&lt;ul is="my-example"&gt;
-</code></pre>
-<p>means that the declaration of <code>my-example</code> extends transitively from <code>ul</code>. This
-error message is shown if the definition of <code>my-example</code> doesn't declare this
-extension. It might be that you no longer extend from the base element, in which
-case the fix is to change the instantiation to:</p>
-<pre><code>&lt;my-example&gt;
-</code></pre>
-<p>Another possibility is that the declaration needs to be fixed to include the
-<code>extends</code> attribute, for example:</p>
-<pre><code>&lt;polymer-element name="my-example" extends="ul"&gt;
-</code></pre>
-</div><hr />
-
-<div id="polymer_18"><h3>Incorrect instantiation: base tag seems wrong <a href="#polymer_18">#18</a></h3>
-<p>It seems you have a declaration like:</p>
-<pre><code>&lt;polymer-element name="my-example" extends="div"&gt;
-</code></pre>
-<p>but an instantiation like:</p>
-<pre><code>&lt;span is="my-example"&gt;
-</code></pre>
-<p>Both the declaration and the instantiation need to match on the base type. So
-either the instantiation needs to be fixed to be more like:</p>
-<pre><code>&lt;span is="my-example"&gt;
-</code></pre>
-<p>or the declaration should be fixed to be like:</p>
-<pre><code>&lt;polymer-element name="my-example" extends="span"&gt;
-</code></pre>
-</div><hr />
-
-<div id="polymer_19"><h3>No dashes allowed in custom attributes <a href="#polymer_19">#19</a></h3>
-<p>Polymer used to recognize attributes with dashes like <code>my-name</code> and convert them
-to match properties where dashes were removed, and words follow the camelCase
-style (for example <code>myName</code>). This feature is no longer available. Now simply
-use the same name as the property.</p>
-<p>Because HTML attributes are case-insensitive, you can also write the name of
-your property entirely in lowercase. Just be sure that your custom-elements
-don't declare two properties with the same name but different capitalization.</p>
-</div><hr />
-
-<div id="polymer_20"><h3>Event handlers not supported here <a href="#polymer_20">#20</a></h3>
-<p>Bindings of the form <code>{{ }}</code> are supported inside <code>&lt;template&gt;</code> nodes, even outside
-of <code>&lt;polymer-element&gt;</code> declarations. However, those bindings only support binding
-values into the content of a node or an attribute.</p>
-<p>Inline event handlers of the form <code>on-click="{{method}}"</code> are a special feature
-of polymer elements, so they are only supported inside <code>&lt;polymer-element&gt;</code>
-definitions.</p>
-</div><hr />
-
-<div id="polymer_21"><h3>No expressions allowed in event handler bindings <a href="#polymer_21">#21</a></h3>
-<p>Unlike data bindings, event handler bindings of the form <code>on-click="{{method}}"</code>
-are not evaluated as expressions. They are meant to just contain a simple name
-that resolves to a method in your polymer element's class definition.</p>
-</div><hr />
-
-<div id="polymer_22"><h3>Nested polymer element definitions not allowed <a href="#polymer_22">#22</a></h3>
-<p>Because custom element names are global, there is no need to have a
-<code>&lt;polymer-element&gt;</code> definition nested within a <code>&lt;polymer-element&gt;</code>. If you have
-a definition inside another, move the second definition out.</p>
-<p>You might see this error if you have an HTML import within a polymer element.
-You should be able to move the import out of the element definition.</p>
-</div><hr />
-
-<div id="polymer_23"><h3>Polymer element definitions without a name <a href="#polymer_23">#23</a></h3>
-<p>Polymer element definitions must have a name. You can include a name by using
-the <code>name</code> attribute in <code>&lt;polymer-element&gt;</code> for example:</p>
-<pre><code>&lt;polymer-element name="my-example"&gt;
-</code></pre>
-</div><hr />
-
-<div id="polymer_24"><h3>Custom element name missing a dash <a href="#polymer_24">#24</a></h3>
-<p>Custom element names must have a dash (<code>-</code>) and can't be any of the following
-reserved names:</p><ul><li><code>annotation-xml</code></li><li><code>color-profile</code></li><li><code>font-face</code></li><li><code>font-face-src</code></li><li><code>font-face-uri</code></li><li><code>font-face-format</code></li><li><code>font-face-name</code></li><li><code>missing-glyph</code></li></ul>
-</div><hr />
-
-<div id="polymer_25"><h3>Error while inlining an import <a href="#polymer_25">#25</a></h3>
-<p>An error occurred while inlining an import in the polymer build. This is often
-the result of a broken HTML import.</p>
-</div><hr />
-
-<div id="polymer_26"><h3>Error while inlining a stylesheet <a href="#polymer_26">#26</a></h3>
-<p>An error occurred while inlining a stylesheet in the polymer build. This is
-often the result of a broken URL in a <code>&lt;link rel="stylesheet" href="..."&gt;</code>.</p>
-</div><hr />
-
-<div id="polymer_27"><h3>URL to a script file might be incorrect <a href="#polymer_27">#27</a></h3>
-<p>An error occurred trying to read a script tag on a given URL. This is often the
-result of a broken URL in a <code>&lt;script src="..."&gt;</code>.</p>
-</div><hr />
-
-<div id="polymer_28"><h3>Attribute missing "_" prefix <a href="#polymer_28">#28</a></h3>
-<p>Not all browsers support bindings to certain attributes, especially URL
-attributes. Some browsers might sanitize attributes and result in an
-incorrect value. For this reason polymer provides a special set of attributes
-that let you bypass any browser internal attribute validation. The name of the
-attribute is the same as the original attribute, but with a leading underscore.
-For example, instead of writing:</p>
-<pre><code>&lt;img src="{{binding}}"&gt;
-</code></pre>
-<p>you can write:</p>
-<pre><code>&lt;img _src="{{binding}}"&gt;
-</code></pre>
-<p>For more information, see <a href="http://goo.gl/5av8cU">http://goo.gl/5av8cU</a>.</p>
-</div><hr />
-
-<div id="polymer_29"><h3>Attribute with extra "_" prefix <a href="#polymer_29">#29</a></h3>
-<p>A special attribute exists to support bindings on URL attributes. For example,
-this correctly binds the <code>src</code> attribute in an image:</p>
-<pre><code>&lt;img _src="{{binding}}"&gt;
-</code></pre>
-<p>However, this special <code>_src</code> attribute is only available for bindings. If you
-just have a URL, use the normal <code>src</code> attribute instead.</p>
-</div><hr />
-
-<div id="polymer_30"><h3>Internal error: don't know how to include a URL <a href="#polymer_30">#30</a></h3>
-<p>Sorry, you just ran into a bug in the polymer transformer code. Please file a
-bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that
-can help the team reproduce the issue.</p>
-</div><hr />
-
-<div id="polymer_31"><h3>Internal error: phases run out of order <a href="#polymer_31">#31</a></h3>
-<p>Sorry, you just ran into a bug in the polymer transformer code. Please file a
-bug at <a href="http://dartbug.com/new">http://dartbug.com/new</a> including, if possible, some example code that
-can help the team reproduce the issue.</p>
-</div><hr />
-
-<div id="polymer_32"><h3><code>@CustomTag</code> used on a private class <a href="#polymer_32">#32</a></h3>
-<p>The <code>@CustomTag</code> annotation is currently only supported on public classes. If
-you need to register a custom element whose implementation is a private class
-(that is, a class whose name starts with <code>_</code>), you can still do so by invoking
-<code>Polymer.register</code> within a public method marked with <code>@initMethod</code>.</p>
-</div><hr />
-
-<div id="polymer_33"><h3><code>@initMethod</code> is on a private function <a href="#polymer_33">#33</a></h3>
-<p>The <code>@initMethod</code> annotation is currently only supported on public top-level
-functions.</p>
-</div><hr />
-
-<div id="polymer_34"><h3>Missing argument in annotation <a href="#polymer_34">#34</a></h3>
-<p>The annotation expects one argument, but the argument was not provided.</p>
-</div><hr />
-
-<div id="polymer_35"><h3>Invalid argument in annotation <a href="#polymer_35">#35</a></h3>
-<p>The polymer transformer was not able to extract a constant value for the
-annotation argument. This can happen if your code is currently in a state that
-can't be analyzed (for example, it has parse errors) or if the expression passed
-as an argument is invalid (for example, it is not a compile-time constant).</p>
-</div><hr />
-
-<div id="polymer_36"><h3>No polymer initializers found <a href="#polymer_36">#36</a></h3>
-<p>No polymer initializers were found. Make sure to either 
-annotate your polymer elements with @CustomTag or include a 
-top level method annotated with @initMethod that registers your 
-elements. Both annotations are defined in the polymer library (
-package:polymer/polymer.dart).</p>
-</div><hr />
-
-<div id="polymer_37"><h3>Event bindings with @ are no longer supported <a href="#polymer_37">#37</a></h3>
-<p>For a while there was an undocumented feature that allowed users to include
-expressions in event bindings using the <code>@</code> prefix, for example:</p>
-<pre><code>&lt;div on-click="{{@a.b.c}}"&gt;
-
-</code></pre>
-<p>This feature is no longer supported.</p>
-</div><hr />
-
-<div id="polymer_38"><h3>Private symbol in event handler <a href="#polymer_38">#38</a></h3>
-<p>Currently private members can't be used in event handler bindings. So you can't
-write:</p>
-<pre><code>&lt;div on-click="{{_method}}"&gt;
-</code></pre>
-<p>This restriction might be removed in the future, but for now, you need to make
-your event handlers public.</p>
-</div><hr />
-
-<div id="polymer_39"><h3>Private symbol in binding expression <a href="#polymer_39">#39</a></h3>
-<p>Private members can't be used in binding expressions. For example, you can't
-write:</p>
-<pre><code>&lt;div&gt;{{a.b._c}}&lt;/div&gt;
-</code></pre>
-</div><hr />
-
-<div id="polymer_40"><h3>A warning was found while parsing the HTML document <a href="#polymer_40">#40</a></h3>
-<p>The polymer transformer uses a parser that implements the HTML5 spec
-(<code>html</code>). This message reports a
-warning that the parser detected.</p>
-</div><hr />
-
-<div id="polymer_41"><h3>Possible flash of unstyled content <a href="#polymer_41">#41</a></h3>
-<p>Custom element found in document body without an "unresolved" attribute on it or
-one of its parents. This means your app probably has a flash of unstyled content
-before it finishes loading. See <a href="http://goo.gl/iN03Pj">http://goo.gl/iN03Pj</a> for more info.</p>
-</div><hr />
-
-<div id="polymer_42"><h3>A css file was inlined multiple times. <a href="#polymer_42">#42</a></h3>
-<p>Css files are inlined by default, but if you import the same one in multiple
-places you probably want to change this behavior to prevent duplicate code.</p>
-<p>There are three typical options for dealing with this:</p><ol><li>
-<p><strong>Recommended</strong>: Use the <code>core-style</code> element from the <code>core_elements</code>
-package.</p>
-<p>The easiest way to do this is change your <code>*.css</code> file into a <code>*.html</code> file,
-and wrap the entire thing in a <code>core-style</code> with an id, something like the
-following:</p>
-<pre><code>&lt;core-style id="my-theme"&gt;
-  p {
-    color: red;
-  }
-&lt;/core-style&gt;
-</code></pre>
-<p>Now, in the files where you were previously including the
-<code>&lt;link rel="stylesheet"&gt;</code> tag, add an html import to the top of your
-document pointing to the new html file. Once that is done, replace the
-<code>&lt;link&gt;</code> tag with a <code>&lt;core-style&gt;</code> tag which has a <code>ref</code> attribute that is
-the same as the <code>id</code> attribute on the <code>&lt;core-style&gt;</code> you created. So your
-original html:</p>
-<pre><code>&lt;polymer-element name="my-element"&gt;
-  &lt;template&gt;
-    &lt;link rel="stylesheet" href="my_theme.css"&gt;
-  &lt;/template&gt;
-&lt;/polymer-element&gt;
-</code></pre>
-<p>Becomes:</p>
-<pre><code>&lt;link rel="import" href="my_theme.html"&gt;
-&lt;polymer-element name="my-element"&gt;
-  &lt;template&gt;
-    &lt;core-style ref="my-theme"&gt;&lt;/core-style&gt;
-  &lt;/template&gt;
-&lt;/polymer-element&gt;
-</code></pre></li><li>
-<p>Opt out of the inlining for this file in your pubspec.yaml:</p>
-<pre><code>transformers:
-- polymer:
-    inline_stylesheets:
-      web/my_file.css: false
-</code></pre>
-<p><strong>Warning</strong>: <code>&lt;link rel="stylesheet"&gt;</code> tags are not natively supported in
-shadow-dom. Polymer will do an xhr request for the stylesheet and inject an
-inline style with its contents in each place this stylesheet occurs.</p></li><li>
-<p>Opt into multiple inlining in your pubspec.yaml:</p>
-<pre><code>transformers:
-- polymer:
-    inline_stylesheets:
-      web/my_file.css: true
-</code></pre>
-<p><strong>Warning</strong>: You should only ever do this if your stylesheet is very small.
-Even then stylesheets tend to grow quickly and almost never decrease in size
-so this method is highly discouraged.</p></li></ol>
-</div><hr />
-
-<div id="polymer_43"><h3>"dart_support.js" injected automatically <a href="#polymer_43">#43</a></h3>
-<p>The script <code>packages/web_components/dart_support.js</code> is still used, but you no
-longer need to put it in your application's entrypoint.</p>
-<p>In the past this file served two purposes:</p><ul><li>to make dart2js work well with the web_components polyfills, and</li><li>to support registering Dart APIs for JavaScript custom elements.</li></ul>
-<p>Now, the code from <code>dart_support.js</code> is split in two halves. The half for
-dart2js is now injected by the polymer transformers automatically during <code>pub
-build</code>. The <code>web_components</code> package provides an HTML file containing the other
-half.  Developers of packages that wrap JavaScript custom elements (like
-<code>core_elements</code> and <code>paper_elements</code>) will import that file directly, so
-application developers don't have to worry about it anymore.</p>
-</div><hr />
-
-<div id="polymer_44"><h3>Dart script file included more than once. <a href="#polymer_44">#44</a></h3>
-<p>Duplicate dart scripts often happen if you have multiple html imports that
-include the same script. The simplest workaround for this is to move your dart
-script to its own html file, and import that instead of the script (html imports
-are automatically deduped).</p>
-<p>For example:</p>
-<pre><code>&lt;script type="application/dart" src="foo.dart"&gt;&lt;/script&gt;
-</code></pre>
-<p>Should turn into:</p>
-<pre><code>&lt;link rel="import" href="foo.html"&gt;
-</code></pre>
-<p>And <code>foo.html</code> should look like:</p>
-<pre><code>&lt;script type="application/dart" src="foo.dart"&gt;&lt;/script&gt;
-</code></pre>
-</div><hr />
-
-<div id="polymer_45"><h3>"webcomponents.js" injected automatically <a href="#polymer_45">#45</a></h3>
-<p>The script <code>packages/web_components/webcomponents.js</code> is still used, but you no
-longer need to put it in your application's entrypoint.</p>
-<p>The polyfills provided by this file are no longer required in chrome and will
-automatically be added during <code>pub build</code> and <code>pub serve</code>.</p>
-</div><hr />
-
-<div id="polymer_46"><h3>"platform.js" renamed to "webcomponents.js". <a href="#polymer_46">#46</a></h3>
-<p>The script <code>packages/web_components/platform.js</code> has been renamed to
-<code>packages/web_components/webcomponents.js</code>. This is automatically fixed in
-<code>pub serve</code> and <code>pub build</code> but we may remove this functionality in the next
-breaking version of Polymer.</p>
-<p>In addition, it is no longer required that you include this file directly, as
-<code>pub build</code> and <code>pub serve</code> will inject it for you, and its not required when
-running in dartium with a local server.</p>
-</div><hr />
-
-<div id="polymer_47"><h3>Missing Dart script tag in entry point. <a href="#polymer_47">#47</a></h3>
-<p>All entry points should have a dart script file. This can sometimes happen if
-you are using the default entry_points value in your polymer transformer
-configuration but have files which are not entry points in your <code>web</code> or <code>test</code>
-directory. Moving these files to your <code>lib</code> folder or specifying all your entry
-points in your configuration will fix this.</p>
-</div><hr />
-
-<div id="polymer_48"><h3>polymer.dart not imported. <a href="#polymer_48">#48</a></h3>
-<p>It is required that your application contains an import to
-<code>package:polymer/polymer.dart</code>.</p>
-</div><hr /><h2>Messages from package <code>web_components</code></h2>
-<hr />
-
-<div id="web_components_0"><h3>URL to a script file might be incorrect <a href="#web_components_0">#0</a></h3>
-<p>An error occurred trying to read a script tag on a given URL. This is often the
-result of a broken URL in a <code>&lt;script src="..."&gt;</code>.</p>
-</div><hr />
-
-<div id="web_components_1"><h3>Dart script file included more than once. <a href="#web_components_1">#1</a></h3>
-<p>Duplicate dart scripts often happen if you have multiple html imports that
-include the same script. The simplest workaround for this is to move your dart
-script to its own html file, and import that instead of the script (html imports
-are automatically deduped).</p>
-<p>For example:</p>
-<pre><code>&lt;script type="application/dart" src="foo.dart"&gt;&lt;/script&gt;
-</code></pre>
-<p>Should turn into:</p>
-<pre><code>&lt;link rel="import" href="foo.html"&gt;
-</code></pre>
-<p>And <code>foo.html</code> should look like:</p>
-<pre><code>&lt;script type="application/dart" src="foo.dart"&gt;&lt;/script&gt;
-</code></pre>
-</div><hr />
-
-<div id="web_components_2"><h3>Each entry point html file should contain exactly one dart script tag. <a href="#web_components_2">#2</a></h3>
-<p>Each entry point html file should contain exactly one dart script tag.</p>
-</div><hr />
-
-<div id="web_components_3"><h3>Internal error: don't know how to include a URL <a href="#web_components_3">#3</a></h3>
-<p>Sorry, you just ran into a bug in the web_components transformer code. Please
-file a bug at <a href="https://github.com/dart-lang/web-components/issues/new">https://github.com/dart-lang/web-components/issues/new</a>
-including, if possible, some example code that can help the team reproduce the
-issue.</p>
-</div><hr />
-
-<div id="web_components_4"><h3>Error while inlining an import <a href="#web_components_4">#4</a></h3>
-<p>An error occurred while inlining an import in the web_components build. This is
-often the result of a broken HTML import.</p>
-<p>One possible cause is using an @HtmlImport containing a relative path from
-within an inline script tag, see http://goo.gl/ZgrhaV. The workaround currently
-is to use a <code>package:</code> url instead, move the code to a dart file, or simply
-adding a real html import (since you are already in an html file).</p>
-</div><hr /></body>
-</html>
diff --git a/packages/polymer/lib/src/build/html_finalizer.dart b/packages/polymer/lib/src/build/html_finalizer.dart
deleted file mode 100644
index d476894..0000000
--- a/packages/polymer/lib/src/build/html_finalizer.dart
+++ /dev/null
@@ -1,333 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Transfomer that finalizes an html file for deployment:
-///   - Extracts inline js scripts in csp mode.
-///   - Inlines css files into the document.
-///   - Validates polymer-element templates.
-library polymer.src.build.html_finalizer;
-
-import 'dart:async';
-import 'dart:collection' show LinkedHashSet;
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/assets.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:path/path.dart' as path;
-import 'package:html/dom.dart'
-    show Document, DocumentFragment, Element, Node;
-import 'package:html/dom_parsing.dart' show TreeVisitor;
-import 'package:source_span/source_span.dart';
-
-import 'common.dart';
-import 'messages.dart';
-
-/// Inlines css files and extracts inline js scripts into files if in csp mode.
-// TODO(jakemac): Move to a different package. Will need to break out the
-// binding-specific logic when this happens (add it to the linter?).
-class _HtmlFinalizer extends PolymerTransformer {
-  final TransformOptions options;
-  final Transform transform;
-  final BuildLogger logger;
-  final AssetId docId;
-  final seen = new Set<AssetId>();
-  final scriptIds = new LinkedHashSet<AssetId>();
-  final inlinedStylesheetIds = new Set<AssetId>();
-  final extractedFiles = new Set<AssetId>();
-
-  /// The number of extracted inline Dart scripts. Used as a counter to give
-  /// unique-ish filenames.
-  int inlineScriptCounter = 0;
-
-  _HtmlFinalizer(TransformOptions options, Transform transform)
-      : options = options,
-        transform = transform,
-        logger = new BuildLogger(transform,
-            convertErrorsToWarnings: !options.releaseMode,
-            detailsUri: 'http://goo.gl/5HPeuP'),
-        docId = transform.primaryInput.id;
-
-  Future apply() {
-    seen.add(docId);
-
-    Document document;
-    bool changed = false;
-
-    return readPrimaryAsHtml(transform, logger).then((doc) {
-      document = doc;
-      new _UrlAttributeValidator(docId, logger).visit(document);
-
-      changed = _extractScripts(document) || changed;
-
-      return _inlineCss(document);
-    }).then((cssInlined) {
-      changed = changed || cssInlined;
-
-      var output = transform.primaryInput;
-      if (changed) output = new Asset.fromString(docId, document.outerHtml);
-      transform.addOutput(output);
-
-      // Write out the logs collected by our [BuildLogger].
-      if (options.injectBuildLogsInOutput) {
-        return logger.writeOutput();
-      }
-    });
-  }
-
-  /// Inlines any css files found into document. Returns a [bool] indicating
-  /// whether or not the document was modified.
-  Future<bool> _inlineCss(Document document) {
-    bool changed = false;
-
-    // Note: we need to preserve the import order in the generated output.
-    var tags = document.querySelectorAll('link[rel="stylesheet"]');
-    return Future.forEach(tags, (Element tag) {
-      var href = tag.attributes['href'];
-      var id = uriToAssetId(docId, href, logger, tag.sourceSpan,
-          errorOnAbsolute: false);
-      if (id == null) return null;
-      if (!options.shouldInlineStylesheet(id)) return null;
-
-      changed = true;
-      if (inlinedStylesheetIds.contains(id) &&
-          !options.stylesheetInliningIsOverridden(id)) {
-        logger.warning(CSS_FILE_INLINED_MULTIPLE_TIMES.create({'url': id.path}),
-            span: tag.sourceSpan);
-      }
-      inlinedStylesheetIds.add(id);
-      return _inlineStylesheet(id, tag);
-    }).then((_) => changed);
-  }
-
-  /// Inlines a single css file by replacing [link] with an inline style tag.
-  Future _inlineStylesheet(AssetId id, Element link) {
-    return transform.readInputAsString(id).catchError((error) {
-      // TODO(jakemac): Move this warning to the linter once we can make it run
-      // always (see http://dartbug.com/17199). Then hide this error and replace
-      // with a comment pointing to the linter error (so we don't double warn).
-      logger.warning(INLINE_STYLE_FAIL.create({'error': error}),
-          span: link.sourceSpan);
-    }).then((css) {
-      if (css == null) return null;
-      css = new _UrlNormalizer(transform, id, logger).visitCss(css);
-      var styleElement = new Element.tag('style')..text = css;
-      // Copy over the extra attributes from the link tag to the style tag.
-      // This adds support for no-shim, shim-shadowdom, etc.
-      link.attributes.forEach((key, value) {
-        if (!IGNORED_LINKED_STYLE_ATTRS.contains(key)) {
-          styleElement.attributes[key] = value;
-        }
-      });
-      link.replaceWith(styleElement);
-    });
-  }
-
-  /// Splits inline js scripts into their own files in csp mode.
-  bool _extractScripts(Document doc) {
-    if (!options.contentSecurityPolicy) return false;
-
-    bool changed = false;
-    for (var script in doc.querySelectorAll('script')) {
-      var src = script.attributes['src'];
-      if (src != null) continue;
-
-      var type = script.attributes['type'];
-      if (type == TYPE_DART) continue;
-
-      var extension = 'js';
-      final filename = path.url.basename(docId.path);
-      final count = inlineScriptCounter++;
-      var code = script.text;
-      // TODO(sigmund): ensure this path is unique (dartbug.com/12618).
-      script.attributes['src'] = src = '$filename.$count.$extension';
-      script.text = '';
-      changed = true;
-
-      var newId = docId.addExtension('.$count.$extension');
-      extractedFiles.add(newId);
-      transform.addOutput(new Asset.fromString(newId, code));
-    }
-    return changed;
-  }
-}
-
-/// Finalizes a single html document for deployment.
-class HtmlFinalizer extends Transformer {
-  final TransformOptions options;
-
-  HtmlFinalizer(this.options);
-
-  /// Only run on entry point .html files.
-  bool isPrimary(AssetId id) => options.isHtmlEntryPoint(id);
-
-  Future apply(Transform transform) =>
-      new _HtmlFinalizer(options, transform).apply();
-}
-
-const TYPE_DART = 'application/dart';
-const TYPE_JS = 'text/javascript';
-
-/// Internally adjusts urls in the html that we are about to inline.
-class _UrlNormalizer {
-  final Transform transform;
-
-  /// Asset where the original content (and original url) was found.
-  final AssetId sourceId;
-
-  /// Path to the top level folder relative to the transform primaryInput.
-  /// This should just be some arbitrary # of ../'s.
-  final String topLevelPath;
-
-  /// Whether or not the normalizer has changed something in the tree.
-  bool changed = false;
-
-  final BuildLogger logger;
-
-  _UrlNormalizer(transform, this.sourceId, this.logger)
-      : transform = transform,
-        topLevelPath = '../' *
-            (path.url.split(transform.primaryInput.id.path).length - 2);
-
-  static final _URL = new RegExp(r'url\(([^)]*)\)', multiLine: true);
-  static final _QUOTE = new RegExp('["\']', multiLine: true);
-
-  /// Visit the CSS text and replace any relative URLs so we can inline it.
-  // Ported from:
-  // https://github.com/Polymer/vulcanize/blob/c14f63696797cda18dc3d372b78aa3378acc691f/lib/vulcan.js#L149
-  // TODO(jmesserly): use csslib here instead? Parsing with RegEx is sadness.
-  // Maybe it's reliable enough for finding URLs in CSS? I'm not sure.
-  String visitCss(String cssText) {
-    var url = spanUrlFor(sourceId, transform, logger);
-    var src = new SourceFile(cssText, url: url);
-    return cssText.replaceAllMapped(_URL, (match) {
-      // Extract the URL, without any surrounding quotes.
-      var span = src.span(match.start, match.end);
-      var href = match[1].replaceAll(_QUOTE, '');
-      href = _newUrl(href, span);
-      return 'url($href)';
-    });
-  }
-
-  String _newUrl(String href, SourceSpan span) {
-    var uri = Uri.parse(href);
-    if (uri.isAbsolute) return href;
-    if (!uri.scheme.isEmpty) return href;
-    if (!uri.host.isEmpty) return href;
-    if (uri.path.isEmpty) return href; // Implies standalone ? or # in URI.
-    if (path.isAbsolute(href)) return href;
-
-    var id = uriToAssetId(sourceId, href, logger, span);
-    if (id == null) return href;
-    var primaryId = transform.primaryInput.id;
-
-    if (id.path.startsWith('lib/')) {
-      return '${topLevelPath}packages/${id.package}/${id.path.substring(4)}';
-    }
-
-    if (id.path.startsWith('asset/')) {
-      return '${topLevelPath}assets/${id.package}/${id.path.substring(6)}';
-    }
-
-    if (primaryId.package != id.package) {
-      // Technically we shouldn't get there
-      logger.error(INTERNAL_ERROR_DONT_KNOW_HOW_TO_IMPORT
-              .create({'target': id, 'source': primaryId, 'extra': ''}),
-          span: span);
-      return href;
-    }
-
-    var builder = path.url;
-    return builder.relative(builder.join('/', id.path),
-        from: builder.join('/', builder.dirname(primaryId.path)));
-  }
-}
-
-/// Validates url-like attributes and throws warnings as appropriate.
-/// TODO(jakemac): Move to the linter.
-class _UrlAttributeValidator extends TreeVisitor {
-  /// Asset where the original content (and original url) was found.
-  final AssetId sourceId;
-
-  final BuildLogger logger;
-
-  _UrlAttributeValidator(this.sourceId, this.logger);
-
-  visit(Node node) {
-    return super.visit(node);
-  }
-
-  visitElement(Element node) {
-    // TODO(jakemac): Support custom elements that extend html elements which
-    // have url-like attributes. This probably means keeping a list of which
-    // html elements support each url-like attribute.
-    if (!isCustomTagName(node.localName)) {
-      node.attributes.forEach((name, value) {
-        if (_urlAttributes.contains(name)) {
-          if (!name.startsWith('_') && value.contains(_BINDING_REGEX)) {
-            logger.warning(USE_UNDERSCORE_PREFIX.create({'name': name}),
-                span: node.sourceSpan, asset: sourceId);
-          } else if (name.startsWith('_') && !value.contains(_BINDING_REGEX)) {
-            logger.warning(
-                DONT_USE_UNDERSCORE_PREFIX.create({'name': name.substring(1)}),
-                span: node.sourceSpan, asset: sourceId);
-          }
-        }
-      });
-    }
-    return super.visitElement(node);
-  }
-}
-
-/// HTML attributes that expect a URL value.
-/// <http://dev.w3.org/html5/spec/section-index.html#attributes-1>
-///
-/// Every one of these attributes is a URL in every context where it is used in
-/// the DOM. The comments show every DOM element where an attribute can be used.
-///
-/// The _* version of each attribute is also supported, see http://goo.gl/5av8cU
-const _urlAttributes = const [
-  // in form
-  'action',
-  '_action',
-  // in body
-  'background',
-  '_background',
-  // in blockquote, del, ins, q
-  'cite',
-  '_cite',
-  // in object
-  'data',
-  '_data',
-  // in button, input
-  'formaction',
-  '_formaction',
-  // in a, area, link, base, command
-  'href',
-  '_href',
-  // in command
-  'icon',
-  '_icon',
-  // in html
-  'manifest',
-  '_manifest',
-  // in video
-  'poster',
-  '_poster',
-  // in audio, embed, iframe, img, input, script, source, track, video
-  'src',
-  '_src',
-];
-
-/// When inlining <link rel="stylesheet"> tags copy over all attributes to the
-/// style tag except these ones.
-const IGNORED_LINKED_STYLE_ATTRS = const [
-  'charset',
-  'href',
-  'href-lang',
-  'rel',
-  'rev'
-];
-
-/// Global RegExp objects.
-final _BINDING_REGEX = new RegExp(r'(({{.*}})|(\[\[.*\]\]))');
diff --git a/packages/polymer/lib/src/build/index_page_builder.dart b/packages/polymer/lib/src/build/index_page_builder.dart
deleted file mode 100644
index 39baf2d..0000000
--- a/packages/polymer/lib/src/build/index_page_builder.dart
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Builds an index.html file in each folder containing entry points, if none
-/// already exists. This file simply lists all the entry point files.
-library polymer.src.build.index_page_builder;
-
-import 'dart:async';
-import 'dart:math';
-
-import 'package:barback/barback.dart';
-import 'package:path/path.dart' as path;
-
-import 'common.dart';
-
-/// Builds an index.html file in each folder containing entry points, if none
-/// already exists. This file simply lists all the entry point files.
-class IndexPageBuilder extends AggregateTransformer {
-  final TransformOptions options;
-
-  IndexPageBuilder(this.options);
-
-  classifyPrimary(AssetId id) {
-    if (!options.isHtmlEntryPoint(id)) return null;
-    // Group all entry points together.
-    return 'all_entry_points';
-  }
-
-  Future apply(AggregateTransform transform) {
-    Map<String, List<String>> dirFilesMap = {};
-
-    return transform.primaryInputs.toList().then((assets) {
-      // Add the asset to its directory, and make sure its directory is included
-      // in all its parents.
-      for (var asset in assets) {
-        var dir = path.url.dirname(asset.id.path);
-        while (dir != '.') {
-          dirFilesMap.putIfAbsent(dir, () => []);
-
-          var relativePath = path.url.relative(asset.id.path, from: dir);
-          var relativeDir = path.url.dirname(relativePath);
-          dirFilesMap[dir].add(relativePath);
-          dir = path.url.dirname(dir);
-        }
-      }
-
-      // Create an output index.html file for each directory, if one doesn't
-      // exist already
-      var futures = [];
-      dirFilesMap.forEach((directory, files) {
-        futures.add(_createOutput(directory, files, transform));
-      });
-      return Future.wait(futures);
-    });
-  }
-
-  Future _createOutput(
-      String directory, List<String> files, AggregateTransform transform) {
-    var indexAsset =
-        new AssetId(transform.package, path.url.join(directory, 'index.html'));
-
-    return transform.hasInput(indexAsset).then((exists) {
-      // Don't overwrite existing outputs!
-      if (exists) return;
-
-      // Sort alphabetically by recursive path parts.
-      files.sort((String a, String b) {
-        var aParts = path.url.split(a);
-        var bParts = path.url.split(b);
-        int diff = 0;
-        int minLength = min(aParts.length, bParts.length);
-        for (int i = 0; i < minLength; i++) {
-          // Directories are sorted below files.
-          var aIsDir = i < aParts.length - 1;
-          var bIsDir = i < bParts.length - 1;
-          if (aIsDir && !bIsDir) return 1;
-          if (!aIsDir && bIsDir) return -1;
-
-          // Raw string comparison, if not identical we return.
-          diff = aParts[i].compareTo(bParts[i]);
-          if (diff != 0) return diff;
-        }
-        // Identical files, shouldn't happen in practice.
-        return 0;
-      });
-
-      // Create the document with a list.
-      var doc = new StringBuffer(
-          '<!DOCTYPE html><html><body><h1>Entry points</h1><ul>');
-
-      // Add all the assets to the list.
-      for (var file in files) {
-        doc.write('<li><a href="$file">$file</a></li>');
-      }
-
-      doc.write('</ul></body></html>');
-
-      // Output the index.html file
-      transform.addOutput(new Asset.fromString(indexAsset, doc.toString()));
-    });
-  }
-}
diff --git a/packages/polymer/lib/src/build/linter.dart b/packages/polymer/lib/src/build/linter.dart
deleted file mode 100644
index b3d1e63..0000000
--- a/packages/polymer/lib/src/build/linter.dart
+++ /dev/null
@@ -1,491 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Logic to validate that developers are correctly using Polymer constructs.
-/// This is mainly used to produce warnings for feedback in the editor.
-library polymer.src.build.linter;
-
-import 'dart:async';
-import 'dart:convert';
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/assets.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:code_transformers/messages/messages.dart' show Message;
-import 'package:html/dom.dart';
-import 'package:html/dom_parsing.dart';
-import 'package:path/path.dart' as path;
-import 'package:source_span/source_span.dart';
-
-import 'common.dart';
-import 'utils.dart';
-import 'messages.dart';
-
-/// A linter that checks for common Polymer errors and produces warnings to
-/// show on the editor or the command line. Leaves sources unchanged, but
-/// creates a new asset containing all the warnings.
-class Linter extends Transformer with PolymerTransformer {
-  final TransformOptions options;
-  final bool skipMissingElementWarning;
-
-  Linter(this.options, {this.skipMissingElementWarning: false});
-
-  isPrimary(AssetId id) =>
-      id.extension == '.html' && options.lint.shouldLint(id.path);
-
-  Future apply(Transform transform) {
-    var seen = new Set<AssetId>();
-    var primary = transform.primaryInput;
-    var id = primary.id;
-    transform.addOutput(primary); // this phase is analysis only
-    seen.add(id);
-    bool isEntryPoint = options.isHtmlEntryPoint(id);
-
-    var logger = new BuildLogger(transform,
-        convertErrorsToWarnings: !options.releaseMode,
-        detailsUri: 'http://goo.gl/5HPeuP');
-
-    return readPrimaryAsHtml(transform, logger).then((document) {
-      return _collectElements(document, id, transform, logger, seen)
-          .then((elements) {
-        new _LinterVisitor(id, logger, elements, isEntryPoint,
-            skipMissingElementWarning || !isEntryPoint).run(document);
-
-        // Write out the logs collected by our [BuildLogger].
-        if (options.injectBuildLogsInOutput && logger is BuildLogger) {
-          return (logger as BuildLogger).writeOutput();
-        }
-      });
-    });
-  }
-
-  /// Collect into [elements] any data about each polymer-element defined in
-  /// [document] or any of it's imports, unless they have already been [seen].
-  /// Elements are added in the order they appear, transitive imports are added
-  /// first.
-  Future<Map<String, _ElementSummary>> _collectElements(Document document,
-      AssetId sourceId, Transform transform, BuildLogger logger,
-      Set<AssetId> seen, [Map<String, _ElementSummary> elements]) {
-    if (elements == null) elements = <String, _ElementSummary>{};
-    return _getImportedIds(document, sourceId, transform, logger)
-        // Note: the import order is relevant, so we visit in that order.
-        .then((ids) => Future.forEach(ids, (id) =>
-            _readAndCollectElements(id, transform, logger, seen, elements)))
-        .then((_) {
-      if (sourceId.package == 'polymer_interop' &&
-          sourceId.path == 'lib/src/js/polymer.html' &&
-          elements['polymer-element'] == null) {
-        elements['polymer-element'] =
-            new _ElementSummary('polymer-element', null, null);
-      }
-      return _addElements(document, logger, elements);
-    }).then((_) => elements);
-  }
-
-  Future _readAndCollectElements(AssetId id, Transform transform,
-      BuildLogger logger, Set<AssetId> seen,
-      Map<String, _ElementSummary> elements) {
-    if (id == null || seen.contains(id)) return new Future.value(null);
-    seen.add(id);
-    return readAsHtml(id, transform, logger, showWarnings: false).then(
-        (doc) => _collectElements(doc, id, transform, logger, seen, elements));
-  }
-
-  Future<List<AssetId>> _getImportedIds(Document document, AssetId sourceId,
-      Transform transform, BuildLogger logger) {
-    var importIds = [];
-    for (var tag in document.querySelectorAll('link')) {
-      if (tag.attributes['rel'] != 'import') continue;
-      var href = tag.attributes['href'];
-      var span = tag.sourceSpan;
-      var id = uriToAssetId(sourceId, href, logger, span);
-      if (id == null) continue;
-      importIds.add(assetExists(id, transform).then((exists) {
-        if (exists) return id;
-        if (sourceId == transform.primaryInput.id) {
-          logger.warning(
-              IMPORT_NOT_FOUND.create({'path': id.path, 'package': id.package}),
-              span: span);
-        }
-      }));
-    }
-    return Future.wait(importIds);
-  }
-
-  void _addElements(Document document, BuildLogger logger,
-      Map<String, _ElementSummary> elements) {
-    for (var tag in document.querySelectorAll('polymer-element')) {
-      var name = tag.attributes['name'];
-      if (name == null) continue;
-      var extendsTag = tag.attributes['extends'];
-      var span = tag.sourceSpan;
-      var existing = elements[name];
-      if (existing != null) {
-
-        // Report warning only once.
-        if (existing.hasConflict) continue;
-        existing.hasConflict = true;
-        logger.warning(
-            DUPLICATE_DEFINITION.create({'name': name, 'second': ''}),
-            span: existing.span);
-        logger.warning(DUPLICATE_DEFINITION
-                .create({'name': name, 'second': ' (second definition).'}),
-            span: span);
-        continue;
-      }
-
-      elements[name] = new _ElementSummary(name, extendsTag, tag.sourceSpan);
-    }
-  }
-}
-
-/// Information needed about other polymer-element tags in order to validate
-/// how they are used and extended.
-///
-/// Note: these are only created for polymer-element, because pure custom
-/// elements don't have a declarative form.
-class _ElementSummary {
-  final String tagName;
-  final String extendsTag;
-  final SourceSpan span;
-
-  _ElementSummary extendsType;
-  bool hasConflict = false;
-
-  String get baseExtendsTag {
-    if (extendsType != null) return extendsType.baseExtendsTag;
-    if (extendsTag != null && !extendsTag.contains('-')) return extendsTag;
-    return null;
-  }
-
-  _ElementSummary(this.tagName, this.extendsTag, this.span);
-
-  String toString() => "($tagName <: $extendsTag)";
-}
-
-class _LinterVisitor extends TreeVisitor {
-  BuildLogger _logger;
-  AssetId _sourceId;
-  bool _inPolymerElement = false;
-  bool _inAutoBindingElement = false;
-  bool _dartTagSeen = false;
-  bool _polymerHtmlSeen = false;
-  bool _polymerExperimentalHtmlSeen = false;
-  bool _isEntryPoint;
-  Map<String, _ElementSummary> _elements;
-  bool _skipMissingElementWarning;
-
-  _LinterVisitor(this._sourceId, this._logger, this._elements,
-      this._isEntryPoint, this._skipMissingElementWarning) {
-    // We normalize the map, so each element has a direct reference to any
-    // element it extends from.
-    for (var tag in _elements.values) {
-      var extendsTag = tag.extendsTag;
-      if (extendsTag == null) continue;
-      tag.extendsType = _elements[extendsTag];
-    }
-  }
-
-  void visitElement(Element node) {
-    switch (node.localName) {
-      case 'link':
-        _validateLinkElement(node);
-        break;
-      case 'element':
-        _validateElementElement(node);
-        break;
-      case 'polymer-element':
-        _validatePolymerElement(node);
-        break;
-      case 'script':
-        _validateScriptElement(node);
-        break;
-      case 'template':
-        var isTag = node.attributes['is'];
-        var oldInAutoBindingElement = _inAutoBindingElement;
-        if (isTag != null && AUTO_BINDING_ELEMENTS.contains(isTag)) {
-          _inAutoBindingElement = true;
-        }
-        _validateNormalElement(node);
-        super.visitElement(node);
-        _inAutoBindingElement = oldInAutoBindingElement;
-        break;
-      default:
-        _validateNormalElement(node);
-        super.visitElement(node);
-        break;
-    }
-  }
-
-  void run(Document doc) {
-    visit(doc);
-
-    if (_isEntryPoint && !_dartTagSeen && !_polymerExperimentalHtmlSeen) {
-      _logger.warning(MISSING_INIT_POLYMER, span: doc.body.sourceSpan);
-    }
-  }
-
-  /// Produce warnings for invalid link-rel tags.
-  void _validateLinkElement(Element node) {
-    var rel = node.attributes['rel'];
-    if (rel != 'import' && rel != 'stylesheet') return;
-
-    if (rel == 'import' && _dartTagSeen) {
-      _logger.warning(MOVE_IMPORTS_UP, span: node.sourceSpan);
-    }
-
-    var href = node.attributes['href'];
-    if (href == null || href == '') {
-      _logger.warning(MISSING_HREF.create({'rel': rel}), span: node.sourceSpan);
-      return;
-    }
-
-    if (rel != 'import') return;
-
-    if (_inPolymerElement) {
-      _logger.error(NO_IMPORT_WITHIN_ELEMENT, span: node.sourceSpan);
-      return;
-    }
-
-    if (href == POLYMER_EXPERIMENTAL_HTML) {
-      _polymerExperimentalHtmlSeen = true;
-    }
-    // TODO(sigmund): warn also if href can't be resolved.
-  }
-
-  /// Produce warnings if using `<element>` instead of `<polymer-element>`.
-  void _validateElementElement(Element node) {
-    _logger.warning(ELEMENT_DEPRECATED_EONS_AGO, span: node.sourceSpan);
-  }
-
-  /// Produce warnings if using `<polymer-element>` in the wrong place or if the
-  /// definition is not complete.
-  void _validatePolymerElement(Element node) {
-    if (!_skipMissingElementWarning &&
-        !_elements.containsKey('polymer-element')) {
-      _logger.warning(usePolymerHtmlMessageFrom(_sourceId),
-          span: node.sourceSpan);
-    }
-
-    if (_inPolymerElement) {
-      _logger.error(NESTED_POLYMER_ELEMENT, span: node.sourceSpan);
-      return;
-    }
-
-    var tagName = node.attributes['name'];
-    var extendsTag = node.attributes['extends'];
-
-    if (tagName == null) {
-      _logger.error(MISSING_TAG_NAME, span: node.sourceSpan);
-    } else if (!isCustomTagName(tagName)) {
-      _logger.error(INVALID_TAG_NAME.create({'name': tagName}),
-          span: node.sourceSpan);
-    }
-
-    if (!_skipMissingElementWarning &&
-        _elements[extendsTag] == null &&
-        isCustomTagName(extendsTag)) {
-      _logger.warning(CUSTOM_ELEMENT_NOT_FOUND.create({'tag': extendsTag}),
-          span: node.sourceSpan);
-    }
-
-    var attrs = node.attributes['attributes'];
-    if (attrs != null) {
-      var attrsSpan = node.attributeSpans['attributes'];
-
-      // names='a b c' or names='a,b,c'
-      // record each name for publishing
-      for (var attr in attrs.split(ATTRIBUTES_REGEX)) {
-        if (!_validateCustomAttributeName(attr.trim(), attrsSpan)) break;
-      }
-    }
-
-    var oldValue = _inPolymerElement;
-    _inPolymerElement = true;
-    super.visitElement(node);
-    _inPolymerElement = oldValue;
-  }
-
-  /// Checks for multiple Dart script tags in the same page, which is invalid.
-  void _validateScriptElement(Element node) {
-    var scriptType = node.attributes['type'];
-    var isDart = scriptType == 'application/dart';
-    var src = node.attributes['src'];
-
-    if (isDart) {
-      if (_dartTagSeen) _logger.warning(ONLY_ONE_TAG, span: node.sourceSpan);
-      if (_isEntryPoint && _polymerExperimentalHtmlSeen) {
-        _logger.warning(NO_DART_SCRIPT_AND_EXPERIMENTAL, span: node.sourceSpan);
-      }
-      _dartTagSeen = true;
-    }
-
-    if (src != null && src.endsWith('web_components/dart_support.js')) {
-      _logger.warning(DART_SUPPORT_NO_LONGER_REQUIRED, span: node.sourceSpan);
-    }
-
-    if (src != null && src.contains('web_components/webcomponents.')) {
-      _logger.warning(WEB_COMPONENTS_NO_LONGER_REQUIRED, span: node.sourceSpan);
-    }
-
-    if (src != null && src.contains('web_components/platform.')) {
-      _logger.warning(PLATFORM_JS_RENAMED, span: node.sourceSpan);
-    }
-
-    var isEmpty = node.innerHtml.trim() == '';
-
-    if (src == null) {
-      if (isDart && isEmpty) {
-        _logger.warning(SCRIPT_TAG_SEEMS_EMPTY, span: node.sourceSpan);
-      }
-      return;
-    }
-
-    if (src.endsWith('.dart') && !isDart) {
-      _logger.warning(EXPECTED_DART_MIME_TYPE, span: node.sourceSpan);
-      return;
-    }
-
-    if (!src.endsWith('.dart') && isDart) {
-      _logger.warning(EXPECTED_DART_EXTENSION, span: node.sourceSpan);
-      return;
-    }
-
-    if (!isEmpty) {
-      _logger.warning(FOUND_BOTH_SCRIPT_SRC_AND_TEXT, span: node.sourceSpan);
-    }
-  }
-
-  /// Produces warnings for misuses of on-foo event handlers, and for instanting
-  /// custom tags incorrectly.
-  void _validateNormalElement(Element node) {
-    // Event handlers only allowed inside polymer-elements
-    node.attributes.forEach((name, value) {
-      if (name is String && name.startsWith('on')) {
-        _validateEventHandler(node, name, value);
-      }
-    });
-
-    // Validate uses of custom-tags
-    var nodeTag = node.localName;
-    var hasIsAttribute;
-    var customTagName;
-    if (isCustomTagName(nodeTag)) {
-      // <fancy-button>
-      customTagName = nodeTag;
-      hasIsAttribute = false;
-    } else {
-      // <button is="fancy-button">
-      customTagName = node.attributes['is'];
-      hasIsAttribute = true;
-    }
-
-    if (customTagName == null ||
-        INTERNALLY_DEFINED_ELEMENTS.contains(customTagName)) {
-      return;
-    }
-
-    var info = _elements[customTagName];
-    if (info == null) {
-      if (!_skipMissingElementWarning && _isEntryPoint) {
-        _logger.warning(CUSTOM_ELEMENT_NOT_FOUND.create({'tag': customTagName}),
-            span: node.sourceSpan);
-      }
-      return;
-    }
-
-    var baseTag = info.baseExtendsTag;
-    if (baseTag != null && !hasIsAttribute) {
-      _logger.warning(BAD_INSTANTIATION_MISSING_BASE_TAG
-              .create({'tag': customTagName, 'base': baseTag}),
-          span: node.sourceSpan);
-      return;
-    }
-
-    if (hasIsAttribute && baseTag == null) {
-      _logger.warning(BAD_INSTANTIATION_BOGUS_BASE_TAG
-              .create({'tag': customTagName, 'base': nodeTag}),
-          span: node.sourceSpan);
-      return;
-    }
-
-    if (hasIsAttribute && baseTag != nodeTag) {
-      _logger.warning(BAD_INSTANTIATION_WRONG_BASE_TAG
-              .create({'tag': customTagName, 'base': baseTag}),
-          span: node.sourceSpan);
-    }
-
-    // FOUC check, if content is supplied
-    if (_isEntryPoint && !node.innerHtml.isEmpty) {
-      var parent = node;
-      var hasFoucFix = false;
-      while (parent != null && !hasFoucFix) {
-        if (parent.localName == 'polymer-element' ||
-            parent.attributes['unresolved'] != null) {
-          hasFoucFix = true;
-        }
-        if (parent.localName == 'body') break;
-        parent = parent.parent;
-      }
-      if (!hasFoucFix) _logger.warning(POSSIBLE_FUOC, span: node.sourceSpan);
-    }
-  }
-
-  /// Validate an attribute on a custom-element. Returns true if valid.
-  bool _validateCustomAttributeName(String name, FileSpan span) {
-    if (name.contains('-')) {
-      var newName = toCamelCase(name);
-      var alternative = '"$newName" or "${newName.toLowerCase()}"';
-      _logger.warning(NO_DASHES_IN_CUSTOM_ATTRIBUTES
-          .create({'name': name, 'alternative': alternative}), span: span);
-      return false;
-    }
-    return true;
-  }
-
-  /// Validate event handlers are used correctly.
-  void _validateEventHandler(Element node, String name, String value) {
-    if (!name.startsWith('on-')) return;
-
-    if (!_inPolymerElement && !_inAutoBindingElement) {
-      _logger.warning(EVENT_HANDLERS_ONLY_WITHIN_POLYMER,
-          span: node.attributeSpans[name]);
-      return;
-    }
-
-    // Valid bindings have {{ }}, don't look like method calls foo(bar), and are
-    // non empty.
-    if (!value.startsWith("{{") ||
-        !value.endsWith("}}") ||
-        value.contains('(') ||
-        value.substring(2, value.length - 2).trim() == '') {
-      _logger.warning(
-          INVALID_EVENT_HANDLER_BODY.create({'value': value, 'name': name}),
-          span: node.attributeSpans[name]);
-    }
-  }
-}
-
-Message usePolymerHtmlMessageFrom(AssetId id) {
-  var segments = path.url.split(id.path);
-  var upDirCount = 0;
-  if (segments[0] == 'lib') {
-    // lib/foo.html => ../../packages/
-    upDirCount = segments.length;
-  } else if (segments.length > 2) {
-    // web/a/foo.html => ../packages/
-    upDirCount = segments.length - 2;
-  }
-  var reachOutPrefix = '../' * upDirCount;
-  return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix});
-}
-
-const List<String> INTERNALLY_DEFINED_ELEMENTS = const [
-  'auto-binding-dart',
-  'polymer-element'
-];
-const List<String> AUTO_BINDING_ELEMENTS = const [
-  'auto-binding-dart',
-  'auto-binding'
-];
diff --git a/packages/polymer/lib/src/build/log_injector.css b/packages/polymer/lib/src/build/log_injector.css
deleted file mode 100644
index e81eee4..0000000
--- a/packages/polymer/lib/src/build/log_injector.css
+++ /dev/null
@@ -1,78 +0,0 @@
-/** Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-    for details. All rights reserved. Use of this source code is governed by a
-    BSD-style license that can be found in the LICENSE file. **/
-.build-logs {
-  position: fixed;
-  bottom: 0;
-  right: 0;
-  max-width: 80vw;
-  z-index: 10000;
-  font-family: sans-serif !important;
-}
-.build-logs .log {
-  padding: 0.6em;
-  background: black;
-  color: white;
-  border: solid 1px #666;
-  border-bottom: 0px;
-  text-overflow: ellipsis;
-  overflow-x: hidden;
-}
-.build-logs .fine {
-  color: green;
-}
-.build-logs .info {
-  color: yellow;
-}
-.build-logs .warning {
-  color: orange;
-}
-.build-logs .error {
-  color: red;
-}
-.build-logs .message {
-  white-space: nowrap;
-  cursor: pointer;
-}
-.build-logs .message.expanded {
-  white-space: normal;
-}
-.build-logs .message a {
-  color: #CCF;
-  text-decoration: bold;
-}
-.build-logs .menu {
-  text-align: right;
-}
-.build-logs .menu div {
-  display: inline-block;
-  background: #666;
-  font-weight: bold;
-  cursor: pointer;
-  border: solid 1px black;
-  padding: 0.6em 1em;
-}
-.build-logs .menu div.active {
-  background: black;
-}
-.build-logs .menu div .num {
-  color: white;
-}
-.build-logs .content {
-  max-height: 75vh;
-  font-size: 1em;
-  overflow-y: auto;
-}
-.build-logs .content > div {
-  display: none;
-}
-.build-logs .content > div.active {
-  display: block;
-}
-
-.build-logs .content span.text {
-  padding: 0.4em 0.2em 0.2em 2em;
-  white-space: pre;
-  display: block;
-  font-family: monospace !important;
-}
diff --git a/packages/polymer/lib/src/build/log_injector.dart b/packages/polymer/lib/src/build/log_injector.dart
deleted file mode 100644
index 81af914..0000000
--- a/packages/polymer/lib/src/build/log_injector.dart
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// This library provides a single function called injectLogs which when called
-/// will request a logs json file and build a small widget out of them which
-/// groups the logs by level.
-library polymer.build.log_injector;
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:html';
-
-import 'package:path/path.dart' as path;
-import 'package:source_span/source_span.dart';
-import 'package:code_transformers/messages/messages.dart';
-
-class LogInjector {
-  Element selectedMenu;
-  Element selectedContent;
-
-  // Gets the logs from a url and inject them into the dom.
-  Future injectLogsFromUrl(String url) =>
-      HttpRequest.getString(url).then((data) => injectLogs(data));
-
-  // Builds the html for the logs element given some logs, and injects that
-  // into the dom. Currently, we do not  use Polymer just to ensure that the
-  // page works regardless of the state of the app. Ideally, we could have
-  // multiple scripts running independently so we could ensure that this would
-  // always be running.
-  injectLogs(String data) {
-    var logs = new LogEntryTable.fromJson(JSON.decode(data));
-    if (logs.entries.isEmpty) return;
-
-    // Group all logs by level.
-    var logsByLevel = {};
-    logs.entries.values.forEach((list) => list.forEach((log) {
-      logsByLevel.putIfAbsent(log.level, () => []);
-      logsByLevel[log.level].add(log);
-    }));
-    if (logsByLevel.isEmpty) return;
-
-    // Build the wrapper, menu, and content divs.
-
-    var menuWrapper = new DivElement()..classes.add('menu');
-    var contentWrapper = new DivElement()..classes.add('content');
-    var wrapperDiv = new DivElement()
-      ..classes.add('build-logs')
-      ..append(menuWrapper)
-      ..append(contentWrapper);
-
-    // For each log level, add a menu item, content section, and all the logs.
-    logsByLevel.forEach((level, logs) {
-      var levelClassName = level.toLowerCase();
-
-      // Add the menu item and content item.
-      var menuItem = new Element.html('<div class="$levelClassName">'
-          '$level <span class="num">(${logs.length})</span>'
-          '</div>');
-      menuWrapper.append(menuItem);
-      var contentItem = new DivElement()..classes.add(levelClassName);
-      contentWrapper.append(contentItem);
-
-      // Set up the click handlers.
-      menuItem.onClick.listen((_) {
-        if (selectedMenu == menuItem) {
-          selectedMenu = null;
-          selectedContent = null;
-        } else {
-          if (selectedMenu != null) {
-            selectedMenu.classes.remove('active');
-            selectedContent.classes.remove('active');
-          }
-
-          selectedMenu = menuItem;
-          selectedContent = contentItem;
-        }
-
-        menuItem.classes.toggle('active');
-        contentItem.classes.toggle('active');
-      });
-
-      // Add the logs to the content item.
-      for (var log in logs) {
-        var logHtml = new StringBuffer();
-        logHtml.write('<div class="log">');
-
-        var id = log.message.id;
-        var hashTag = '${id.package}_${id.id}';
-        var message = new HtmlEscape().convert(log.message.snippet);
-        message.replaceAllMapped(_urlRegex,
-            (m) => '<a href="${m.group(0)}" target="blank">${m.group(0)}</a>');
-        logHtml.write('<div class="message $levelClassName">$message '
-            '<a target="blank" href='
-            '"/packages/polymer/src/build/generated/messages.html#$hashTag">'
-            '(more details)</a></div>');
-        var span = log.span;
-        if (span != null) {
-          logHtml.write('<div class="location">');
-          var text = new HtmlEscape().convert(span.text);
-          logHtml.write(
-              '  <span class="location">${span.start.toolString}</span></div>'
-              '  <span class="text">$text</span>' '</div>');
-          logHtml.write('</div>');
-        }
-        logHtml.write('</div>');
-
-        var logElement = new Element.html(logHtml.toString(),
-            validator: new NodeValidatorBuilder.common()
-          ..allowNavigation(new _OpenUriPolicy()));
-        contentItem.append(logElement);
-        var messageElement = logElement.querySelector('.message');
-        messageElement.onClick.listen((e) {
-          if (e.target == messageElement) {
-            messageElement.classes.toggle('expanded');
-          }
-        });
-      }
-    });
-
-    document.body.append(wrapperDiv);
-  }
-}
-
-final _urlRegex = new RegExp('http://[^ ]*');
-class _OpenUriPolicy implements UriPolicy {
-  bool allowsUri(String uri) => true;
-}
diff --git a/packages/polymer/lib/src/build/messages.dart b/packages/polymer/lib/src/build/messages.dart
deleted file mode 100644
index 56d4cf6..0000000
--- a/packages/polymer/lib/src/build/messages.dart
+++ /dev/null
@@ -1,628 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Contains all error and warning messages produced by polymer.
-library polymer.src.build.messages;
-
-import 'package:code_transformers/messages/messages.dart';
-import 'constants.dart';
-
-const IMPORT_NOT_FOUND = const MessageTemplate(const MessageId('polymer', 1),
-    'couldn\'t find imported asset "%-path-%" in package "%-package-%".',
-    'Import not found', '''
-An HTML import seems to be broken. This could be because the file doesn't exist
-or because the link URL is incorrect.
-''');
-
-const DUPLICATE_DEFINITION = const MessageTemplate(
-    const MessageId('polymer', 2),
-    'duplicate definition for custom tag "%-name-%".%-second-%',
-    'Duplicate definition', '''
-Custom element names are global and can only be defined once. Some common
-reasons why you might get two definitions:
-
-  * Two different elements are declared with the same name.
-  * A single HTML file defining an element, has been imported using two different
-    URLs.
-''');
-
-const USE_POLYMER_HTML = const MessageTemplate(const MessageId('polymer', 3),
-    'Missing definition for <polymer-element>, please add the following '
-    'HTML import at the top of this file: <link rel="import" '
-    'href="%-reachOutPrefix-%packages/polymer/polymer.html">.',
-    'Missing import to polymer.html', '''
-Starting with polymer 0.11.0, each file that uses the definition
-of polymer-element must import it either directly or transitively.
-''');
-
-const NO_IMPORT_WITHIN_ELEMENT = const MessageTemplate(
-    const MessageId('polymer', 4), 'Polymer.dart\'s implementation of '
-    'HTML imports are not supported within polymer element definitions, yet. '
-    'Please move the import out of this <polymer-element>.',
-    'Invalid import inside <polymer-element>', '''
-HTML imports are expected at the top of each document, outside of any
-polymer-element definitions. The polymer build process combines all your HTML
-files together so you can deploy a single HTML file with your application. This
-build process ignores imports that appear to be in the wrong location.
-''');
-
-const MISSING_INIT_POLYMER = const MessageTemplate(
-    const MessageId('polymer', 5),
-    'To run a polymer application, you need to call `initPolymer()`. You can '
-    'either include a generic script tag that does this for you:'
-    '\'<script type="application/dart">export "package:polymer/init.dart";'
-    '</script>\' or add your own script tag and call that function. '
-    'Make sure the script tag is placed after all HTML imports.',
-    'Missing call to `initPolymer()`', '''
-Your application entry point didn't have any Dart script tags, so it's missing
-some initialization needed for polymer.dart.
-''');
-
-const NO_DART_SCRIPT_AND_EXPERIMENTAL = const MessageTemplate(
-    const MessageId('polymer', 6),
-    'The experimental bootstrap feature doesn\'t support script tags on '
-    'the main document (for now).', 'Script tags with experimental bootstrap',
-    'This experimental feature is no longer supported.');
-
-const ONLY_ONE_TAG = const MessageTemplate(const MessageId('polymer', 7),
-    'Only one "application/dart" script tag per document is allowed.',
-    'Multiple Dart script tags per document', '''
-Dartium currently allows only one script tag per document. Any
-additional script tags might be ignored or result in an error. This will
-likely change in the future, but for now, combine the script tags together into
-a single Dart library.
-''');
-
-const MOVE_IMPORTS_UP = const MessageTemplate(const MessageId('polymer', 8),
-    'Move HTML imports above your Dart script tag.',
-    'Imports before script tags', '''
-It is good practice to put all your HTML imports at the beginning of the
-document, above any Dart script tags. Today, the execution of Dart script tags
-is not synchronous in Dartium, so the difference is not noticeable. However,
-Dartium that will eventually change and make the timing of script tags execution
-match how they are in JavaScript. At that point the order of your imports with
-respect to script tags will be important. Following the practice of putting
-imports first protects your app from a future breaking change in this respect.
-''');
-
-const MISSING_HREF = const MessageTemplate(const MessageId('polymer', 9),
-    'link rel="%-rel-%" missing href.', 'Missing href on a `<link>` tag',
-    'All `<link>` tags should have a valid URL to a resource.');
-
-const ELEMENT_DEPRECATED_EONS_AGO = const MessageTemplate(
-    const MessageId('polymer', 10),
-    '<element> elements are not supported, use <polymer-element> instead.',
-    '`<element>` is deprecated', '''
-Long ago `<polymer-element>` used to be called `<element>`. You probably ran
-into this error if you were migrating code that was written on a very early
-version of polymer.
-''');
-
-// TODO(jmesserly): this warning is wrong if someone is using raw custom
-// elements. Is there another way we can handle this warning that won't
-// generate false positives?
-const CUSTOM_ELEMENT_NOT_FOUND = const MessageTemplate(
-    const MessageId('polymer', 11),
-    'custom element with name "%-tag-%" not found.',
-    'Definition of a custom element not found', '''
-The polymer build was not able to find the definition of a custom element. This
-can happen if an element is defined with a `<polymer-element>` tag, but you are
-missing an HTML import or the import link is incorrect.
-
-This warning can also be a false alarm. For instance, when an element is defined
-programatically using `document.registerElement`. In that case the polymer build
-will not be able to see the definition and will produce this warning.
-''');
-
-const SCRIPT_TAG_SEEMS_EMPTY = const MessageTemplate(
-    const MessageId('polymer', 12), 'script tag seems empty.',
-    'Empty script tag',
-    'Script tags should either have a `src` attribute or a non-empty body.');
-
-const EXPECTED_DART_MIME_TYPE = const MessageTemplate(
-    const MessageId('polymer', 13),
-    'Wrong script type, expected type="application/dart".',
-    'Expected Dart mime-type', '''
-You seem to have a `.dart` extension on a script tag, but the mime-type
-doesn't match `application/dart`.
-''');
-
-const EXPECTED_DART_EXTENSION = const MessageTemplate(
-    const MessageId('polymer', 14),
-    '"application/dart" scripts should use the .dart file extension.',
-    'Expected Dart file extension', '''
-You are using the `application/dart` mime-type on a script tag, so
-the URL to the script source URL should have a `.dart` extension.
-''');
-
-const FOUND_BOTH_SCRIPT_SRC_AND_TEXT = const MessageTemplate(
-    const MessageId('polymer', 15),
-    'script tag has "src" attribute and also has script text.',
-    'Script with both src and inline text', '''
-You have a script tag that includes both a `src` attribute and inline script
-text. You must choose one or the other.
-''');
-
-const BAD_INSTANTIATION_MISSING_BASE_TAG = const MessageTemplate(
-    const MessageId('polymer', 16),
-    'custom element "%-tag-%" extends from "%-base-%", but '
-    'this tag will not include the default properties of "%-base-%". '
-    'To fix this, either write this tag as <%-base-% '
-    'is="%-tag-%"> or remove the "extends" attribute from '
-    'the custom element declaration.',
-    'Incorrect instantiation: missing base tag in instantiation', '''
-When you declare that a custom element extends from a base tag, for example:
-
-    <polymer-element name="my-example" extends="ul">
-
-or:
-
-    <polymer-element name="my-example2" extends="ul">
-    <polymer-element name="my-example" extends="my-example2">
-
-You should instantiate `my-example` by using this syntax:
-
-    <ul is="my-example">
-
-And not:
-
-    <my-example>
-
-Only elements that don't extend from existing HTML elements are created using
-the latter form.
-
-This is because browsers first create the base element, and then upgrade it to
-have the extra functionality of your custom element. In the example above, using
-`<ul>` tells the browser which base type it must create before
-doing the upgrade.
-''');
-
-const BAD_INSTANTIATION_BOGUS_BASE_TAG = const MessageTemplate(
-    const MessageId('polymer', 17),
-    'custom element "%-tag-%" doesn\'t declare any type '
-    'extensions. To fix this, either rewrite this tag as '
-    '<%-tag-%> or add \'extends="%-base-%"\' to '
-    'the custom element declaration.',
-    'Incorrect instantiation: extra `is` attribute or missing `extends` '
-    'in declaration', '''
-Creating a custom element using the syntax:
-
-    <ul is="my-example">
-
-means that the declaration of `my-example` extends transitively from `ul`. This
-error message is shown if the definition of `my-example` doesn't declare this
-extension. It might be that you no longer extend from the base element, in which
-case the fix is to change the instantiation to:
-
-    <my-example>
-
-Another possibility is that the declaration needs to be fixed to include the
-`extends` attribute, for example:
-
-    <polymer-element name="my-example" extends="ul">
-''');
-
-const BAD_INSTANTIATION_WRONG_BASE_TAG = const MessageTemplate(
-    const MessageId('polymer', 18),
-    'custom element "%-tag-%" extends from "%-base-%". '
-    'Did you mean to write <%-base-% is="%-tag-%">?',
-    'Incorrect instantiation: base tag seems wrong', '''
-It seems you have a declaration like:
-
-    <polymer-element name="my-example" extends="div">
-
-but an instantiation like:
-
-    <span is="my-example">
-
-Both the declaration and the instantiation need to match on the base type. So
-either the instantiation needs to be fixed to be more like:
-
-    <span is="my-example">
-
-or the declaration should be fixed to be like:
-
-    <polymer-element name="my-example" extends="span">
-''');
-
-const NO_DASHES_IN_CUSTOM_ATTRIBUTES = const MessageTemplate(
-    const MessageId('polymer', 19),
-    'PolymerElement no longer recognizes attribute names with '
-    'dashes such as "%-name-%". Use %-alternative-% '
-    'instead (both forms are equivalent in HTML).',
-    'No dashes allowed in custom attributes', '''
-Polymer used to recognize attributes with dashes like `my-name` and convert them
-to match properties where dashes were removed, and words follow the camelCase
-style (for example `myName`). This feature is no longer available. Now simply
-use the same name as the property.
-
-Because HTML attributes are case-insensitive, you can also write the name of
-your property entirely in lowercase. Just be sure that your custom-elements
-don't declare two properties with the same name but different capitalization.
-''');
-
-const EVENT_HANDLERS_ONLY_WITHIN_POLYMER = const MessageTemplate(
-    const MessageId('polymer', 20),
-    'Inline event handlers are only supported inside '
-    'declarations of <polymer-element>.', 'Event handlers not supported here',
-    '''
-Bindings of the form `{{ }}` are supported inside `<template>` nodes, even outside
-of `<polymer-element>` declarations. However, those bindings only support binding
-values into the content of a node or an attribute.
-
-Inline event handlers of the form `on-click="{{method}}"` are a special feature
-of polymer elements, so they are only supported inside `<polymer-element>`
-definitions.
-''');
-
-const INVALID_EVENT_HANDLER_BODY = const MessageTemplate(
-    const MessageId('polymer', 21),
-    'Invalid event handler body "%-value-%". Declare a method '
-    'in your custom element "void handlerName(event, detail, target)" '
-    'and use the form %-name-%="{{handlerName}}".',
-    'No expressions allowed in event handler bindings', '''
-Unlike data bindings, event handler bindings of the form `on-click="{{method}}"`
-are not evaluated as expressions. They are meant to just contain a simple name
-that resolves to a method in your polymer element's class definition.
-''');
-
-const NESTED_POLYMER_ELEMENT = const MessageTemplate(
-    const MessageId('polymer', 22),
-    'Nested polymer element definitions are not allowed.',
-    'Nested polymer element definitions not allowed', '''
-Because custom element names are global, there is no need to have a
-`<polymer-element>` definition nested within a `<polymer-element>`. If you have
-a definition inside another, move the second definition out.
-
-You might see this error if you have an HTML import within a polymer element.
-You should be able to move the import out of the element definition.
-''');
-
-const MISSING_TAG_NAME = const MessageTemplate(const MessageId('polymer', 23),
-    'Missing tag name of the custom element. Please include an '
-    'attribute like \'name="your-tag-name"\'.',
-    'Polymer element definitions without a name', '''
-Polymer element definitions must have a name. You can include a name by using
-the `name` attribute in `<polymer-element>` for example:
-
-    <polymer-element name="my-example">
-''');
-
-final INVALID_TAG_NAME = new MessageTemplate(const MessageId('polymer', 24),
-    'Invalid name "%-name-%". Custom element names must have '
-    'at least one dash (-) and can\'t be any of the following names: '
-    '${invalidTagNames.keys.join(", ")}.', 'Custom element name missing a dash',
-    '''
-Custom element names must have a dash (`-`) and can\'t be any of the following
-reserved names:
-
-${invalidTagNames.keys.map((e) => '  * `$e`\n').join('')}
-
-''');
-
-const INLINE_IMPORT_FAIL = const MessageTemplate(const MessageId('polymer', 25),
-    'Failed to inline HTML import: %-error-%', 'Error while inlining an import',
-    '''
-An error occurred while inlining an import in the polymer build. This is often
-the result of a broken HTML import.
-''');
-
-const INLINE_STYLE_FAIL = const MessageTemplate(const MessageId('polymer', 26),
-    'Failed to inline stylesheet: %-error-%',
-    'Error while inlining a stylesheet', '''
-An error occurred while inlining a stylesheet in the polymer build. This is
-often the result of a broken URL in a `<link rel="stylesheet" href="...">`.
-''');
-
-const SCRIPT_FILE_NOT_FOUND = const MessageTemplate(
-    const MessageId('polymer', 27), 'Script file at "%-url-%" not found.',
-    'URL to a script file might be incorrect', '''
-An error occurred trying to read a script tag on a given URL. This is often the
-result of a broken URL in a `<script src="...">`.
-''');
-
-const USE_UNDERSCORE_PREFIX = const MessageTemplate(
-    const MessageId('polymer', 28),
-    'When using bindings with the "%-name-%" attribute you may '
-    'experience errors in certain browsers. Please use the '
-    '"_%-name-%" attribute instead.', 'Attribute missing "_" prefix', '''
-Not all browsers support bindings to certain attributes, especially URL
-attributes. Some browsers might sanitize attributes and result in an
-incorrect value. For this reason polymer provides a special set of attributes
-that let you bypass any browser internal attribute validation. The name of the
-attribute is the same as the original attribute, but with a leading underscore.
-For example, instead of writing:
-
-    <img src="{{binding}}">
-
-you can write:
-
-    <img _src="{{binding}}">
-
-For more information, see <http://goo.gl/5av8cU>.
-''');
-
-const DONT_USE_UNDERSCORE_PREFIX = const MessageTemplate(
-    const MessageId('polymer', 29),
-    'The "_%-name-%" attribute is only supported when using bindings. '
-    'Please change to the "%-name-%" attribute.',
-    'Attribute with extra "_" prefix', '''
-A special attribute exists to support bindings on URL attributes. For example,
-this correctly binds the `src` attribute in an image:
-
-    <img _src="{{binding}}">
-
-However, this special `_src` attribute is only available for bindings. If you
-just have a URL, use the normal `src` attribute instead.
-''');
-
-const INTERNAL_ERROR_DONT_KNOW_HOW_TO_IMPORT = const MessageTemplate(
-    const MessageId('polymer', 30),
-    "internal error: don't know how to include %-target-% from"
-    " %-source-%.%-extra-%", "Internal error: don't know how to include a URL",
-    '''
-Sorry, you just ran into a bug in the polymer transformer code. Please file a
-bug at <http://dartbug.com/new> including, if possible, some example code that
-can help the team reproduce the issue.
-''');
-
-const INTERNAL_ERROR_UNEXPECTED_SCRIPT = const MessageTemplate(
-    const MessageId('polymer', 31),
-    'unexpected script. The ScriptCompactor transformer should run after '
-    'running the ImportInliner', 'Internal error: phases run out of order', '''
-Sorry, you just ran into a bug in the polymer transformer code. Please file a
-bug at <http://dartbug.com/new> including, if possible, some example code that
-can help the team reproduce the issue.
-''');
-
-const PRIVATE_CUSTOM_TAG = const MessageTemplate(const MessageId('polymer', 32),
-    '@CustomTag is not currently supported on private classes:'
-    ' %-name-%. Consider making this class public, or create a '
-    'public initialization method marked with `@initMethod` that calls '
-    '`Polymer.register(%-name-%, %-className-%)`.',
-    '`@CustomTag` used on a private class', '''
-The `@CustomTag` annotation is currently only supported on public classes. If
-you need to register a custom element whose implementation is a private class
-(that is, a class whose name starts with `_`), you can still do so by invoking
-`Polymer.register` within a public method marked with `@initMethod`.
-''');
-
-const PRIVATE_INIT_METHOD = const MessageTemplate(
-    const MessageId('polymer', 33),
-    '@initMethod is no longer supported on private functions: %-name-%',
-    '`@initMethod` is on a private function', '''
-The `@initMethod` annotation is currently only supported on public top-level
-functions.
-''');
-
-const MISSING_ANNOTATION_ARGUMENT = const MessageTemplate(
-    const MessageId('polymer', 34), 'Missing argument in @%-name-% annotation',
-    'Missing argument in annotation',
-    'The annotation expects one argument, but the argument was not provided.');
-
-const INVALID_ANNOTATION_ARGUMENT = const MessageTemplate(
-    const MessageId('polymer', 35),
-    'The parameter to @%-name-% seems to be invalid.',
-    'Invalid argument in annotation', '''
-The polymer transformer was not able to extract a constant value for the
-annotation argument. This can happen if your code is currently in a state that
-can't be analyzed (for example, it has parse errors) or if the expression passed
-as an argument is invalid (for example, it is not a compile-time constant).
-''');
-
-const NO_INITIALIZATION = const MessageTemplate(const MessageId('polymer', 36),
-    'No polymer initializers were found. Make sure to either '
-    'annotate your polymer elements with @CustomTag or include a '
-    'top level method annotated with @initMethod that registers your '
-    'elements. Both annotations are defined in the polymer library ('
-    'package:polymer/polymer.dart).', 'No polymer initializers found', '''
-No polymer initializers were found. Make sure to either 
-annotate your polymer elements with @CustomTag or include a 
-top level method annotated with @initMethod that registers your 
-elements. Both annotations are defined in the polymer library (
-package:polymer/polymer.dart).
-''');
-
-const AT_EXPRESSION_REMOVED = const MessageTemplate(
-    const MessageId('polymer', 37),
-    'event bindings with @ are no longer supported',
-    'Event bindings with @ are no longer supported', '''
-For a while there was an undocumented feature that allowed users to include
-expressions in event bindings using the `@` prefix, for example:
-
-    <div on-click="{{@a.b.c}}">
-    
-This feature is no longer supported.
-''');
-
-const NO_PRIVATE_EVENT_HANDLERS = const MessageTemplate(
-    const MessageId('polymer', 38),
-    'private symbols cannot be used in event handlers',
-    'Private symbol in event handler', '''
-Currently private members can't be used in event handler bindings. So you can't
-write:
-
-    <div on-click="{{_method}}">
-
-This restriction might be removed in the future, but for now, you need to make
-your event handlers public.
-''');
-
-const NO_PRIVATE_SYMBOLS_IN_BINDINGS = const MessageTemplate(
-    const MessageId('polymer', 39), 'private symbols are not supported',
-    'Private symbol in binding expression', '''
-Private members can't be used in binding expressions. For example, you can't
-write:
-
-    <div>{{a.b._c}}</div>
-''');
-
-const HTML5_WARNING = const MessageTemplate(const MessageId('polymer', 40),
-    '(from html) %-message-%',
-    'A warning was found while parsing the HTML document', '''
-The polymer transformer uses a parser that implements the HTML5 spec
-(`html`). This message reports a
-warning that the parser detected.
-''');
-
-const POSSIBLE_FUOC = const MessageTemplate(const MessageId('polymer', 41),
-    'Custom element found in document body without an '
-    '"unresolved" attribute on it or one of its parents. This means '
-    'your app probably has a flash of unstyled content before it '
-    'finishes loading.', 'Possible flash of unstyled content', '''
-Custom element found in document body without an "unresolved" attribute on it or
-one of its parents. This means your app probably has a flash of unstyled content
-before it finishes loading. See <http://goo.gl/iN03Pj> for more info.
-''');
-
-const CSS_FILE_INLINED_MULTIPLE_TIMES = const MessageTemplate(
-    const MessageId('polymer', 42),
-    'The css file %-url-% was inlined multiple times.',
-    'A css file was inlined multiple times.', '''
-Css files are inlined by default, but if you import the same one in multiple
-places you probably want to change this behavior to prevent duplicate code.
-
-There are three typical options for dealing with this:
-
-1. **Recommended**: Use the `core-style` element from the `core_elements`
-    package.
-
-    The easiest way to do this is change your `*.css` file into a `*.html` file,
-    and wrap the entire thing in a `core-style` with an id, something like the
-    following:
-
-        <core-style id="my-theme">
-          p {
-            color: red;
-          }
-        </core-style>
-
-    Now, in the files where you were previously including the
-    `<link rel="stylesheet">` tag, add an html import to the top of your
-    document pointing to the new html file. Once that is done, replace the
-    `<link>` tag with a `<core-style>` tag which has a `ref` attribute that is
-    the same as the `id` attribute on the `<core-style>` you created. So your
-    original html:
-
-        <polymer-element name="my-element">
-          <template>
-            <link rel="stylesheet" href="my_theme.css">
-          </template>
-        </polymer-element>
-
-    Becomes:
-
-        <link rel="import" href="my_theme.html">
-        <polymer-element name="my-element">
-          <template>
-            <core-style ref="my-theme"></core-style>
-          </template>
-        </polymer-element>
-
-2. Opt out of the inlining for this file in your pubspec.yaml:
-
-        transformers:
-        - polymer:
-            inline_stylesheets:
-              web/my_file.css: false
-
-    **Warning**: `<link rel="stylesheet">` tags are not natively supported in
-    shadow-dom. Polymer will do an xhr request for the stylesheet and inject an
-    inline style with its contents in each place this stylesheet occurs.
-
-3. Opt into multiple inlining in your pubspec.yaml:
-
-        transformers:
-        - polymer:
-            inline_stylesheets:
-              web/my_file.css: true
-
-    **Warning**: You should only ever do this if your stylesheet is very small.
-    Even then stylesheets tend to grow quickly and almost never decrease in size
-    so this method is highly discouraged.
-''');
-
-const DART_SUPPORT_NO_LONGER_REQUIRED = const MessageTemplate(
-    const MessageId('polymer', 43),
-    'No need to include "dart_support.js" by hand anymore.',
-    '"dart_support.js" injected automatically', '''
-The script `packages/web_components/dart_support.js` is still used, but you no
-longer need to put it in your application's entrypoint.
-
-In the past this file served two purposes:
-
-  * to make dart2js work well with the web_components polyfills, and
-  * to support registering Dart APIs for JavaScript custom elements.
-
-Now, the code from `dart_support.js` is split in two halves. The half for
-dart2js is now injected by the polymer transformers automatically during `pub
-build`. The `web_components` package provides an HTML file containing the other
-half.  Developers of packages that wrap JavaScript custom elements (like
-`core_elements` and `paper_elements`) will import that file directly, so
-application developers don't have to worry about it anymore.
-''');
-
-const SCRIPT_INCLUDED_MORE_THAN_ONCE = const MessageTemplate(
-    const MessageId('polymer', 44),
-    'The `%-url-%` script was included more than once.',
-    'Dart script file included more than once.', '''
-Duplicate dart scripts often happen if you have multiple html imports that
-include the same script. The simplest workaround for this is to move your dart
-script to its own html file, and import that instead of the script (html imports
-are automatically deduped).
-
-For example:
-
-    <script type="application/dart" src="foo.dart"></script>
-
-Should turn into:
-
-    <link rel="import" href="foo.html">
-
-And `foo.html` should look like:
-
-    <script type="application/dart" src="foo.dart"></script>
-''');
-
-const WEB_COMPONENTS_NO_LONGER_REQUIRED = const MessageTemplate(
-    const MessageId('polymer', 45),
-    'No need to include "webcomponents.js" by hand anymore.',
-    '"webcomponents.js" injected automatically', '''
-The script `packages/web_components/webcomponents.js` is still used, but you no
-longer need to put it in your application's entrypoint.
-
-The polyfills provided by this file are no longer required in chrome and will
-automatically be added during `pub build` and `pub serve`.
-''');
-
-const PLATFORM_JS_RENAMED = const MessageTemplate(
-    const MessageId('polymer', 46),
-    '"platform.js" has been renamed to "webcomponents.js".',
-    '"platform.js" renamed to "webcomponents.js".', '''
-The script `packages/web_components/platform.js` has been renamed to
-`packages/web_components/webcomponents.js`. This is automatically fixed in
-`pub serve` and `pub build` but we may remove this functionality in the next
-breaking version of Polymer.
-
-In addition, it is no longer required that you include this file directly, as
-`pub build` and `pub serve` will inject it for you, and its not required when
-running in dartium with a local server.
-''');
-
-const NO_DART_SCRIPT = const MessageTemplate(const MessageId('polymer', 47),
-    'No dart script was found in the entry point: %-url-%.',
-    'Missing Dart script tag in entry point.', '''
-All entry points should have a dart script file. This can sometimes happen if
-you are using the default entry_points value in your polymer transformer
-configuration but have files which are not entry points in your `web` or `test`
-directory. Moving these files to your `lib` folder or specifying all your entry
-points in your configuration will fix this.
-''');
-
-const MISSING_POLYMER_DART = const MessageTemplate(
-    const MessageId('polymer', 48), 'polymer.dart not imported.',
-    'polymer.dart not imported.', '''
-It is required that your application contains an import to
-`package:polymer/polymer.dart`.
-''');
diff --git a/packages/polymer/lib/src/build/polyfill_injector.dart b/packages/polymer/lib/src/build/polyfill_injector.dart
deleted file mode 100644
index b5b9e04..0000000
--- a/packages/polymer/lib/src/build/polyfill_injector.dart
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Includes any additional polyfills that may needed by the deployed app.
-library polymer.src.build.polyfill_injector;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-import 'package:html/dom.dart'
-    show Document, DocumentFragment, Element, Node;
-import 'package:html/parser.dart' show parseFragment;
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:path/path.dart' as path;
-import 'package:web_components/transformer.dart' show testAttribute;
-import 'common.dart';
-
-/// Ensures that any scripts and polyfills needed to run a polymer application
-/// are included.
-///
-/// This step also replaces "packages/browser/dart.js" and the Dart script tag
-/// with a script tag that loads the dart2js compiled code directly.
-class PolyfillInjector extends Transformer with PolymerTransformer {
-  final TransformOptions options;
-
-  PolyfillInjector(this.options);
-
-  /// Only run on entry point .html files.
-  bool isPrimary(AssetId id) => options.isHtmlEntryPoint(id);
-
-  Future apply(Transform transform) {
-    var logger = new BuildLogger(transform,
-        convertErrorsToWarnings: !options.releaseMode,
-        detailsUri: 'http://goo.gl/5HPeuP');
-    return readPrimaryAsHtml(transform, logger).then((document) {
-      bool dartSupportFound = false;
-      Element webComponentsJs;
-      Element dartJs;
-      final dartScripts = <Element>[];
-
-      for (var tag in document.querySelectorAll('script')) {
-        var src = tag.attributes['src'];
-        if (src != null) {
-          var last = src.split('/').last;
-          if (_webComponentsJS.hasMatch(last)) {
-            webComponentsJs = tag;
-          } else if (_platformJS.hasMatch(last)) {
-            tag.attributes['src'] =
-                src.replaceFirst(_platformJS, 'webcomponents.min.js');
-            webComponentsJs = tag;
-          } else if (_dartSupportJS.hasMatch(last)) {
-            dartSupportFound = true;
-          } else if (_browserDartJS.hasMatch(src)) {
-            dartJs = tag;
-          }
-        }
-
-        if (tag.attributes['type'] == 'application/dart') {
-          dartScripts.add(tag);
-        }
-      }
-
-      if (dartScripts.isEmpty) {
-        // This HTML has no Dart code, there is nothing to do here.
-        transform.addOutput(transform.primaryInput);
-        return;
-      }
-
-      // Remove "packages/browser/dart.js". It is not needed in release mode,
-      // and in debug mode we want to ensure it is the last script on the page.
-      if (dartJs != null) dartJs.remove();
-
-      // TODO(jmesserly): ideally we would generate an HTML that loads
-      // dart2dart too. But for now dart2dart is not a supported deployment
-      // target, so just inline the JS script. This has the nice side effect of
-      // fixing our tests: even if content_shell supports Dart VM, we'll still
-      // test the compiled JS code.
-      if (options.directlyIncludeJS) {
-        // Replace all other Dart script tags with JavaScript versions.
-        for (var script in dartScripts) {
-          /// Don't modify scripts that were originally <link rel="x-test-dart">
-          /// tags.
-          if (script.attributes.containsKey(testAttribute)) continue;
-
-          final src = script.attributes['src'];
-          if (src.endsWith('.dart')) {
-            script.attributes.remove('type');
-            script.attributes['src'] = '$src.js';
-            // TODO(sigmund): we shouldn't need 'async' here. Remove this
-            // workaround for dartbug.com/19653.
-            script.attributes['async'] = '';
-          }
-        }
-      } else {
-        document.body.nodes.add(
-            parseFragment('<script src="packages/browser/dart.js"></script>'));
-      }
-
-      _addScript(urlSegment, [Element parent, int position]) {
-        if (parent == null) parent = document.head;
-        // Default to either the top of `parent` or right after the <base> tag.
-        if (position == null) {
-          var base = parent.querySelector('base');
-          if (base != null) {
-            position = parent.nodes.indexOf(base) + 1;
-          } else {
-            position = 0;
-          }
-        }
-        var pathToPackages =
-            '../' * (path.url.split(transform.primaryInput.id.path).length - 2);
-        parent.nodes.insert(position, parseFragment(
-            '<script src="${pathToPackages}packages/$urlSegment"></script>'));
-      }
-
-      // Inserts dart_support.js either at the top of the document or directly
-      // after webcomponents.js if it exists.
-      if (!dartSupportFound) {
-        if (webComponentsJs == null) {
-          _addScript('web_components/dart_support.js');
-        } else {
-          var parentNode = webComponentsJs.parentNode;
-          _addScript('web_components/dart_support.js', parentNode,
-              parentNode.nodes.indexOf(webComponentsJs) + 1);
-        }
-      }
-
-      // By default webcomponents.js should come before all other scripts.
-      if (webComponentsJs == null && options.injectWebComponentsJs) {
-        var suffix = options.releaseMode ? '.min.js' : '.js';
-        _addScript('web_components/webcomponents$suffix');
-      }
-
-      transform.addOutput(
-          new Asset.fromString(transform.primaryInput.id, document.outerHtml));
-    });
-  }
-}
-
-final _platformJS = new RegExp(r'platform.*\.js', caseSensitive: false);
-final _webComponentsJS =
-    new RegExp(r'webcomponents.*\.js', caseSensitive: false);
-final _dartSupportJS = new RegExp(r'dart_support.js', caseSensitive: false);
-final _browserDartJS =
-    new RegExp(r'packages/browser/dart.js', caseSensitive: false);
diff --git a/packages/polymer/lib/src/build/polymer_bootstrap.dart b/packages/polymer/lib/src/build/polymer_bootstrap.dart
deleted file mode 100644
index f622521..0000000
--- a/packages/polymer/lib/src/build/polymer_bootstrap.dart
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library polymer.src.build.polymer_bootstrap;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:code_transformers/assets.dart';
-import 'package:code_transformers/resolver.dart';
-import 'package:code_transformers/src/dart_sdk.dart' as dart_sdk;
-import 'package:path/path.dart' as path;
-import 'package:web_components/build/web_components.dart';
-
-import 'common.dart';
-import 'messages.dart';
-import 'polymer_smoke_generator.dart';
-
-/// The primary polymer transformer that handles everything which requires a
-/// [Resolver] so they can share it.
-// Note: This is effectively tested in `all_phases_test.dart` as it doesn't
-// really deserve its own unit test.
-class PolymerBootstrapTransformer extends Transformer with PolymerTransformer {
-  final Resolvers resolvers;
-  final TransformOptions options;
-
-  PolymerBootstrapTransformer(this.options, {String sdkDir})
-      // TODO(sigmund): consider restoring here a resolver that uses the real
-      // SDK once the analyzer is lazy and only an resolves what it needs:
-      //: resolvers = new Resolvers(sdkDir != null ? sdkDir : dartSdkDirectory);
-      : resolvers = new Resolvers.fromMock(dart_sdk.mockSdkSources);
-
-  /// Only run on entry point .html files.
-  bool isPrimary(AssetId id) => options.isHtmlEntryPoint(id);
-
-  Future apply(Transform transform) {
-    var logger = new BuildLogger(transform,
-        convertErrorsToWarnings: !options.releaseMode,
-        detailsUri: 'http://goo.gl/5HPeuP');
-    var primaryId = transform.primaryInput.id;
-    return readPrimaryAsHtml(transform, logger).then((document) {
-      var script = document.querySelector('script[type="application/dart"]');
-      if (script == null) {
-        logger.warning(NO_DART_SCRIPT.create({'url': primaryId.path}));
-        return null;
-      }
-
-      var entryScriptId = uriToAssetId(
-          primaryId, script.attributes['src'], logger, script.sourceSpan);
-
-      return resolvers.get(transform, [entryScriptId]).then((resolver) {
-        var webComponentsBootstrapId =
-            primaryId.changeExtension('.web_components.bootstrap.dart');
-        var webComponentsBootstrap = generateWebComponentsBootstrap(resolver,
-            transform, document, entryScriptId, webComponentsBootstrapId);
-        transform.addOutput(webComponentsBootstrap);
-
-        var polymerBootstrapId =
-            primaryId.addExtension('.polymer.bootstrap.dart');
-        script.attributes['src'] = path.basename(polymerBootstrapId.path);
-
-        return generatePolymerBootstrap(transform, resolver,
-            webComponentsBootstrapId, polymerBootstrapId, document, options,
-            resolveFromId: entryScriptId).then((polymerBootstrap) {
-          transform.addOutput(polymerBootstrap);
-          transform
-              .addOutput(new Asset.fromString(primaryId, document.outerHtml));
-          resolver.release();
-        });
-      });
-    });
-  }
-}
diff --git a/packages/polymer/lib/src/build/polymer_smoke_generator.dart b/packages/polymer/lib/src/build/polymer_smoke_generator.dart
deleted file mode 100644
index 11664f6..0000000
--- a/packages/polymer/lib/src/build/polymer_smoke_generator.dart
+++ /dev/null
@@ -1,736 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Transfomer that combines multiple Dart script tags into a single one.
-library polymer.src.build.polymer_smoke_generator;
-
-import 'dart:async';
-
-import 'package:html/dom.dart' show Document, Element, Text;
-import 'package:html/dom_parsing.dart';
-import 'package:html/parser.dart' show parseFragment;
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart' hide Element;
-import 'package:analyzer/src/generated/element.dart' as analyzer show Element;
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart';
-import 'package:code_transformers/assets.dart';
-import 'package:code_transformers/src/dart_sdk.dart' as dart_sdk;
-import 'package:path/path.dart' as path;
-import 'package:source_span/source_span.dart';
-import 'package:smoke/codegen/generator.dart';
-import 'package:smoke/codegen/recorder.dart';
-import 'package:code_transformers/resolver.dart';
-import 'package:template_binding/src/mustache_tokens.dart' show MustacheTokens;
-
-import 'package:polymer_expressions/expression.dart' as pe;
-import 'package:polymer_expressions/parser.dart' as pe;
-import 'package:polymer_expressions/visitor.dart' as pe;
-
-import 'package:web_components/build/import_crawler.dart';
-
-import 'common.dart';
-import 'messages.dart';
-
-/// Method to generate a bootstrap file for Polymer given a [Transform] and a
-/// [Resolver]. This can be used inside any transformer to share the [Resolver]
-/// with other steps.
-Future<Asset> generatePolymerBootstrap(Transform transform, Resolver resolver,
-    AssetId entryPointId, AssetId bootstrapId, Document document,
-    TransformOptions options, {AssetId resolveFromId}) {
-  return new PolymerSmokeGenerator(
-      transform, resolver, entryPointId, bootstrapId, document, options,
-      resolveFromId: resolveFromId).apply();
-}
-
-class PolymerSmokeGeneratorTransformer extends Transformer
-    with PolymerTransformer {
-  final Resolvers resolvers;
-  final TransformOptions options;
-
-  PolymerSmokeGeneratorTransformer(this.options, {String sdkDir})
-      // TODO(sigmund): consider restoring here a resolver that uses the real
-      // SDK once the analyzer is lazy and only an resolves what it needs:
-      //: resolvers = new Resolvers(sdkDir != null ? sdkDir : dartSdkDirectory);
-      : resolvers = new Resolvers.fromMock(dart_sdk.mockSdkSources);
-
-  /// Only run on entry point .html files.
-  bool isPrimary(AssetId id) => options.isHtmlEntryPoint(id);
-
-  Future apply(Transform transform) {
-    var logger = new BuildLogger(transform,
-        convertErrorsToWarnings: !options.releaseMode,
-        detailsUri: 'http://goo.gl/5HPeuP');
-    var primaryId = transform.primaryInput.id;
-    return readPrimaryAsHtml(transform, logger).then((document) {
-      var script = document.querySelector('script[type="application/dart"]');
-      if (script == null) return null;
-      var entryScriptId = uriToAssetId(
-          primaryId, script.attributes['src'], logger, script.sourceSpan);
-      var bootstrapId = primaryId.addExtension('_bootstrap.dart');
-      script.attributes['src'] = path.basename(bootstrapId.path);
-
-      return resolvers.get(transform, [entryScriptId]).then((resolver) {
-        return generatePolymerBootstrap(transform, resolver, entryScriptId,
-            bootstrapId, document, options).then((bootstrapAsset) {
-          transform.addOutput(bootstrapAsset);
-          transform
-              .addOutput(new Asset.fromString(primaryId, document.outerHtml));
-          resolver.release();
-        });
-      });
-    });
-  }
-}
-
-/// Class which generates the static smoke configuration for polymer.
-// TODO(jakemac): Investigate further turning this into an [InitializerPlugin].
-// The main difficulty is this actually recognizes any class which extends the
-// [PolymerElement] class, not just things annotated with [CustomTag].
-class PolymerSmokeGenerator {
-  final TransformOptions options;
-  final Transform transform;
-  final BuildLogger logger;
-  final AssetId docId;
-  final AssetId bootstrapId;
-
-  /// Id of the Dart script found in the document (can only be one).
-  AssetId entryScriptId;
-
-  /// Id of the Dart script to start resolution from.
-  AssetId resolveFromId;
-
-  /// HTML document parsed from [docId].
-  Document document;
-
-  /// Attributes published on a custom-tag. We make these available via
-  /// reflection even if @published was not used.
-  final Map<String, List<String>> publishedAttributes = {};
-
-  /// Resolved types used for analyzing the user's sources and generating code.
-  _ResolvedTypes types;
-
-  /// The resolver instance associated with a single run of this transformer.
-  Resolver resolver;
-
-  /// Code generator used to create the static initialization for smoke.
-  final generator = new SmokeCodeGenerator();
-
-  _SubExpressionVisitor expressionVisitor;
-
-  PolymerSmokeGenerator(Transform transform, Resolver resolver,
-      this.entryScriptId, this.bootstrapId, this.document, options,
-      {this.resolveFromId})
-      : transform = transform,
-        options = options,
-        logger = new BuildLogger(transform,
-            convertErrorsToWarnings: !options.releaseMode,
-            detailsUri: 'http://goo.gl/5HPeuP'),
-        docId = transform.primaryInput.id,
-        resolver = resolver {
-    _ResolvedTypes.logger = logger;
-    types = new _ResolvedTypes(resolver);
-    if (resolveFromId == null) resolveFromId = entryScriptId;
-  }
-
-  Future<Asset> apply() {
-    return _extractUsesOfMirrors().then((_) {
-      var bootstrapAsset = _buildBootstrap();
-      _modifyDocument();
-
-      // Write out the logs collected by our [BuildLogger].
-      if (options.injectBuildLogsInOutput) {
-        return logger.writeOutput().then((_) => bootstrapAsset);
-      }
-      return bootstrapAsset;
-    });
-  }
-
-  /// Inspects the entire program to find out anything that polymer accesses
-  /// using mirrors and produces static information that can be used to replace
-  /// the mirror-based loader and the uses of mirrors through the `smoke`
-  /// package. This includes:
-  ///
-  ///   * visiting polymer-expressions to extract getters and setters,
-  ///   * looking for published fields of custom elements, and
-  ///   * looking for event handlers and callbacks of change notifications.
-  ///
-  Future _extractUsesOfMirrors() {
-    // Generate getters and setters needed to evaluate polymer expressions, and
-    // extract information about published attributes.
-    expressionVisitor = new _SubExpressionVisitor(generator, logger);
-
-    return new ImportCrawler(transform, transform.primaryInput.id, logger,
-        primaryDocument: document).crawlImports().then((documentData) {
-      for (var data in documentData.values) {
-        new _HtmlExtractor(
-                logger, generator, publishedAttributes, expressionVisitor)
-            .visit(data.document);
-      }
-
-      // Create a recorder that uses analyzer data to feed data to [generator].
-      var recorder = new Recorder(generator,
-          (lib) => resolver.getImportUri(lib, from: bootstrapId).toString());
-
-      // Process all classes to include special fields and methods in custom
-      // element classes.
-      _visitLibraries(resolver.getLibrary(resolveFromId), recorder);
-    });
-  }
-
-  _visitLibraries(LibraryElement library, Recorder recorder,
-      [Set<LibraryElement> librariesSeen, Set<ClassElement> classesSeen]) {
-    if (librariesSeen == null) librariesSeen = new Set<LibraryElement>();
-    librariesSeen.add(library);
-
-    // Visit all our dependencies.
-    for (var importedLibrary in _libraryDependencies(library)) {
-      // Don't include anything from the sdk.
-      if (importedLibrary.isInSdk) continue;
-      if (librariesSeen.contains(importedLibrary)) continue;
-      _visitLibraries(importedLibrary, recorder, librariesSeen, classesSeen);
-    }
-
-    // After visiting dependencies, then visit classes in this library.
-    if (classesSeen == null) classesSeen = new Set<ClassElement>();
-    var classes = _visibleClassesOf(library);
-    for (var clazz in classes) {
-      _processClass(clazz, recorder);
-    }
-  }
-
-  Iterable<LibraryElement> _libraryDependencies(LibraryElement library) {
-    getLibrary(UriReferencedElement element) {
-      if (element is ImportElement) return element.importedLibrary;
-      if (element is ExportElement) return element.exportedLibrary;
-    }
-
-    return (new List.from(library.imports)..addAll(library.exports))
-        .map(getLibrary);
-  }
-
-  /// Process a class ([cls]). If it contains an appropriate [CustomTag]
-  /// annotation, we make sure to include everything that might be accessed or
-  /// queried from them using the smoke package. In particular, polymer uses
-  /// smoke for the following:
-  ///    * invoke #registerCallback on custom elements classes, if present.
-  ///    * query for methods ending in `*Changed`.
-  ///    * query for methods with the `@ObserveProperty` annotation.
-  ///    * query for non-final properties labeled with `@published`.
-  ///    * read declarations of properties named in the `attributes` attribute.
-  ///    * read/write the value of published properties .
-  ///    * invoke methods in event handlers.
-  _processClass(ClassElement cls, Recorder recorder) {
-    if (!_hasPolymerMixin(cls)) return;
-    if (cls.node is! ClassDeclaration) return;
-    var node = cls.node as ClassDeclaration;
-
-    // Check whether the class has a @CustomTag annotation. Typically we expect
-    // a single @CustomTag, but it's possible to have several.
-    var tagNames = [];
-    for (var meta in node.metadata) {
-      var tagName = _extractTagName(meta, cls);
-      if (tagName != null) tagNames.add(tagName);
-    }
-
-    if (cls.isPrivate && tagNames.isNotEmpty) {
-      var name = tagNames.first;
-      logger.error(PRIVATE_CUSTOM_TAG.create({'name': name, 'class': cls.name}),
-          span: _spanForNode(cls, node.name));
-      return;
-    }
-
-    // Include #registerCallback if it exists. Note that by default lookupMember
-    // and query will also add the corresponding getters and setters.
-    recorder.lookupMember(cls, 'registerCallback');
-
-    // Include methods that end with *Changed.
-    recorder.runQuery(cls, new QueryOptions(
-        includeFields: false,
-        includeProperties: false,
-        includeInherited: true,
-        includeMethods: true,
-        includeUpTo: types.htmlElementElement,
-        matches: (n) => n.endsWith('Changed') && n != 'attributeChanged'));
-
-    // Include methods marked with @ObserveProperty.
-    recorder.runQuery(cls, new QueryOptions(
-        includeFields: false,
-        includeProperties: false,
-        includeInherited: true,
-        includeMethods: true,
-        includeUpTo: types.htmlElementElement,
-        withAnnotations: [types.observePropertyElement]));
-
-    // Include @published and @observable properties.
-    // Symbols in @published are used when resolving bindings on published
-    // attributes, symbols for @observable are used via path observers when
-    // implementing *Changed an @ObserveProperty.
-    // TODO(sigmund): consider including only those symbols mentioned in
-    // *Changed and @ObserveProperty instead.
-    recorder.runQuery(cls, new QueryOptions(
-        includeUpTo: types.htmlElementElement,
-        withAnnotations: [
-      types.publishedElement,
-      types.observableElement,
-      types.computedPropertyElement
-    ]));
-
-    // Include @ComputedProperty and process their expressions
-    var computed = [];
-    recorder.runQuery(cls, new QueryOptions(
-        includeUpTo: types.htmlElementElement,
-        withAnnotations: [types.computedPropertyElement]), results: computed);
-    _processComputedExpressions(computed);
-
-    for (var tagName in tagNames) {
-      // Include also properties published via the `attributes` attribute.
-      var attrs = publishedAttributes[tagName];
-      if (attrs == null) continue;
-      for (var attr in attrs) {
-        recorder.lookupMember(cls, attr,
-            recursive: true, includeUpTo: types.htmlElementElement);
-      }
-    }
-  }
-
-  /// Determines if [cls] or a supertype has a mixin of the Polymer class.
-  bool _hasPolymerMixin(ClassElement cls) {
-    while (cls != types.htmlElementElement) {
-      for (var m in cls.mixins) {
-        if (m.element == types.polymerClassElement) return true;
-      }
-      if (cls.supertype == null) return false;
-      cls = cls.supertype.element;
-    }
-    return false;
-  }
-
-  /// If [meta] is [CustomTag], extract the name associated with the tag.
-  String _extractTagName(Annotation meta, ClassElement cls) {
-    if (meta.element != types.customTagConstructor) return null;
-    return _extractFirstAnnotationArgument(meta, 'CustomTag', cls);
-  }
-
-  /// Extract the first argument of an annotation and validate that it's type is
-  /// String. For instance, return "bar" from `@Foo("bar")`.
-  String _extractFirstAnnotationArgument(
-      Annotation meta, String name, analyzer.Element context) {
-
-    // Read argument from the AST
-    var args = meta.arguments.arguments;
-    if (args == null || args.length == 0) {
-      logger.warning(MISSING_ANNOTATION_ARGUMENT.create({'name': name}),
-          span: _spanForNode(context, meta));
-      return null;
-    }
-
-    var lib = context;
-    while (lib is! LibraryElement) lib = lib.enclosingElement;
-    var res = resolver.evaluateConstant(lib, args[0]);
-    if (!res.isValid || res.value.type != types.stringType) {
-      logger.warning(INVALID_ANNOTATION_ARGUMENT.create({'name': name}),
-          span: _spanForNode(context, args[0]));
-      return null;
-    }
-    return res.value.stringValue;
-  }
-
-  /// Process members that are annotated with `@ComputedProperty` and records
-  /// the accessors of their expressions.
-  _processComputedExpressions(List<analyzer.Element> computed) {
-    var constructor = types.computedPropertyElement.constructors.first;
-    for (var member in computed) {
-      for (var meta in member.node.metadata) {
-        if (meta.element != constructor) continue;
-        var expr =
-            _extractFirstAnnotationArgument(meta, 'ComputedProperty', member);
-        if (expr == null) continue;
-        expressionVisitor.run(pe.parse(expr), true,
-            _spanForNode(member.enclosingElement, meta.arguments.arguments[0]));
-      }
-    }
-  }
-
-  // Builds the bootstrap Dart file asset.
-  Asset _buildBootstrap() {
-    StringBuffer code = new StringBuffer()..writeln(MAIN_HEADER);
-
-    // TODO(jakemac): Inject this at some other stage.
-    // https://github.com/dart-lang/polymer-dart/issues/22
-    if (options.injectBuildLogsInOutput) {
-      code.writeln("import 'package:polymer/src/build/log_injector.dart';");
-    }
-
-    var entryScriptUrl = assetUrlFor(entryScriptId, bootstrapId, logger);
-    code.writeln("import '$entryScriptUrl' as i0;");
-
-    // Include smoke initialization.
-    generator.writeImports(code);
-    generator.writeTopLevelDeclarations(code);
-    code.writeln('\nmain() {');
-    code.write('  useGeneratedCode(');
-    generator.writeStaticConfiguration(code);
-    code.writeln(');');
-
-    // TODO(jakemac): Inject this at some other stage.
-    // https://github.com/dart-lang/polymer-dart/issues/22
-    if (options.injectBuildLogsInOutput) {
-      var buildUrl = "${path.basename(docId.path)}$LOG_EXTENSION";
-      code.writeln("  new LogInjector().injectLogsFromUrl('$buildUrl');");
-    }
-
-    code.writeln('  configureForDeployment();');
-    code.writeln('  return i0.main();');
-
-    // End of main().
-    code.writeln('}');
-    return new Asset.fromString(bootstrapId, code.toString());
-  }
-
-  // Add the styles for the logger widget.
-  // TODO(jakemac): Inject this at some other stage.
-  // https://github.com/dart-lang/polymer-dart/issues/22
-  void _modifyDocument() {
-    if (options.injectBuildLogsInOutput) {
-      document.head.append(parseFragment(
-          '<link rel="stylesheet" type="text/css"'
-          ' href="packages/polymer/src/build/log_injector.css">'));
-    }
-  }
-
-  _spanForNode(analyzer.Element context, AstNode node) {
-    var file = resolver.getSourceFile(context);
-    return file.span(node.offset, node.end);
-  }
-}
-
-const MAIN_HEADER = """
-library app_bootstrap;
-
-import 'package:polymer/polymer.dart';
-""";
-
-/// An html visitor that:
-///   * finds all polymer expressions and records the getters and setters that
-///     will be needed to evaluate them at runtime.
-///   * extracts all attributes declared in the `attribute` attributes of
-///     polymer elements.
-class _HtmlExtractor extends TreeVisitor {
-  final Map<String, List<String>> publishedAttributes;
-  final SmokeCodeGenerator generator;
-  final _SubExpressionVisitor expressionVisitor;
-  final BuildLogger logger;
-  bool _inTemplate = false;
-  bool _inPolymerJs = false;
-
-  _HtmlExtractor(this.logger, this.generator, this.publishedAttributes,
-      this.expressionVisitor);
-
-  void visitElement(Element node) {
-    if (_inTemplate) _processNormalElement(node);
-    var lastInPolymerJs = _inPolymerJs;
-    if (node.localName == 'polymer-element') {
-      // Detect Polymer JS elements, the current logic is any element with only
-      // non-Dart script tags.
-      var scripts = node.querySelectorAll('script');
-      _inPolymerJs = scripts.isNotEmpty &&
-          scripts.every((s) => s.attributes['type'] != 'application/dart');
-      _processPolymerElement(node);
-      _processNormalElement(node);
-    }
-
-    if (node.localName == 'template') {
-      var last = _inTemplate;
-      _inTemplate = true;
-      super.visitElement(node);
-      _inTemplate = last;
-    } else {
-      super.visitElement(node);
-    }
-    _inPolymerJs = lastInPolymerJs;
-  }
-
-  void visitText(Text node) {
-    // Nothing here applies if inside a polymer js element
-    if (!_inTemplate || _inPolymerJs) return;
-    var bindings = _Mustaches.parse(node.data);
-    if (bindings == null) return;
-    for (var e in bindings.expressions) {
-      _addExpression(e, false, false, node.sourceSpan);
-    }
-  }
-
-  /// Registers getters and setters for all published attributes.
-  void _processPolymerElement(Element node) {
-    // Nothing here applies if inside a polymer js element
-    if (_inPolymerJs) return;
-
-    var tagName = node.attributes['name'];
-    var value = node.attributes['attributes'];
-    if (value != null) {
-      publishedAttributes[tagName] =
-          value.split(ATTRIBUTES_REGEX).map((a) => a.trim()).toList();
-    }
-  }
-
-  /// Produces warnings for misuses of on-foo event handlers, and for instanting
-  /// custom tags incorrectly.
-  void _processNormalElement(Element node) {
-    // Nothing here applies if inside a polymer js element
-    if (_inPolymerJs) return;
-
-    var tag = node.localName;
-    var isCustomTag = isCustomTagName(tag) || node.attributes['is'] != null;
-
-    // Event handlers only allowed inside polymer-elements
-    node.attributes.forEach((name, value) {
-      var bindings = _Mustaches.parse(value);
-      if (bindings == null) return;
-      var isEvent = false;
-      var isTwoWay = false;
-      if (name is String) {
-        name = name.toLowerCase();
-        isEvent = name.startsWith('on-');
-        isTwoWay = !isEvent &&
-            bindings.isWhole &&
-            (isCustomTag ||
-                tag == 'input' && (name == 'value' || name == 'checked') ||
-                tag == 'select' &&
-                    (name == 'selectedindex' || name == 'value') ||
-                tag == 'textarea' && name == 'value');
-      }
-      for (var exp in bindings.expressions) {
-        _addExpression(exp, isEvent, isTwoWay, node.sourceSpan);
-      }
-    });
-  }
-
-  void _addExpression(
-      String stringExpression, bool inEvent, bool isTwoWay, SourceSpan span) {
-    if (inEvent) {
-      if (stringExpression.startsWith('@')) {
-        logger.warning(AT_EXPRESSION_REMOVED, span: span);
-        return;
-      }
-
-      if (stringExpression == '') return;
-      if (stringExpression.startsWith('_')) {
-        logger.warning(NO_PRIVATE_EVENT_HANDLERS, span: span);
-        return;
-      }
-      generator.addGetter(stringExpression);
-      generator.addSymbol(stringExpression);
-    }
-    expressionVisitor.run(pe.parse(stringExpression), isTwoWay, span);
-  }
-}
-
-/// A polymer-expression visitor that records every getter and setter that will
-/// be needed to evaluate a single expression at runtime.
-class _SubExpressionVisitor extends pe.RecursiveVisitor {
-  final SmokeCodeGenerator generator;
-  final BuildLogger logger;
-  bool _includeSetter;
-  SourceSpan _currentSpan;
-
-  _SubExpressionVisitor(this.generator, this.logger);
-
-  /// Visit [exp], and record getters and setters that are needed in order to
-  /// evaluate it at runtime. [includeSetter] is only true if this expression
-  /// occured in a context where it could be updated, for example in two-way
-  /// bindings such as `<input value={{exp}}>`.
-  void run(pe.Expression exp, bool includeSetter, span) {
-    _currentSpan = span;
-    _includeSetter = includeSetter;
-    visit(exp);
-  }
-
-  /// Adds a getter and symbol for [name], and optionally a setter.
-  _add(String name) {
-    if (name.startsWith('_')) {
-      logger.warning(NO_PRIVATE_SYMBOLS_IN_BINDINGS, span: _currentSpan);
-      return;
-    }
-    generator.addGetter(name);
-    generator.addSymbol(name);
-    if (_includeSetter) generator.addSetter(name);
-  }
-
-  void preVisitExpression(e) {
-    // For two-way bindings the outermost expression may be updated, so we need
-    // both the getter and the setter, but we only need the getter for
-    // subexpressions. We exclude setters as soon as we go deeper in the tree,
-    // except when we see a filter (that can potentially be a two-way
-    // transformer).
-    if (e is pe.BinaryOperator && e.operator == '|') return;
-    _includeSetter = false;
-  }
-
-  visitIdentifier(pe.Identifier e) {
-    if (e.value != 'this') _add(e.value);
-    super.visitIdentifier(e);
-  }
-
-  visitGetter(pe.Getter e) {
-    _add(e.name);
-    super.visitGetter(e);
-  }
-
-  visitInvoke(pe.Invoke e) {
-    _includeSetter = false; // Invoke is only valid as an r-value.
-    if (e.method != null) _add(e.method);
-    super.visitInvoke(e);
-  }
-}
-
-/// Parses and collects information about bindings found in polymer templates.
-class _Mustaches {
-  /// Each expression that appears within `{{...}}` and `[[...]]`.
-  final List<String> expressions;
-
-  /// Whether the whole text returned by [parse] was a single expression.
-  final bool isWhole;
-
-  _Mustaches(this.isWhole, this.expressions);
-
-  static _Mustaches parse(String text) {
-    if (text == null || text.isEmpty) return null;
-    // Use template-binding's parser, but provide a delegate function factory to
-    // save the expressions without parsing them as [PropertyPath]s.
-    var tokens = MustacheTokens.parse(text, (s) => () => s);
-    if (tokens == null) return null;
-    var length = tokens.length;
-    bool isWhole =
-        length == 1 && tokens.getText(length) == '' && tokens.getText(0) == '';
-    var expressions = new List(length);
-    for (int i = 0; i < length; i++) {
-      expressions[i] = tokens.getPrepareBinding(i)();
-    }
-    return new _Mustaches(isWhole, expressions);
-  }
-}
-
-/// Holds types that are used in queries
-class _ResolvedTypes {
-  /// Element representing `HtmlElement`.
-  final ClassElement htmlElementElement;
-
-  /// Element representing `String`.
-  final InterfaceType stringType;
-
-  /// Element representing `Polymer`.
-  final ClassElement polymerClassElement;
-
-  /// Element representing the constructor of `@CustomTag`.
-  final ConstructorElement customTagConstructor;
-
-  /// Element representing the type of `@published`.
-  final ClassElement publishedElement;
-
-  /// Element representing the type of `@observable`.
-  final ClassElement observableElement;
-
-  /// Element representing the type of `@ObserveProperty`.
-  final ClassElement observePropertyElement;
-
-  /// Element representing the type of `@ComputedProperty`.
-  final ClassElement computedPropertyElement;
-
-  /// Logger for reporting errors.
-  static BuildLogger logger;
-
-  factory _ResolvedTypes(Resolver resolver) {
-    var coreLib = resolver.getLibraryByUri(Uri.parse('dart:core'));
-    // coreLib should never be null, its ok to throw if this fails.
-    var stringType = _lookupType(coreLib, 'String').type;
-
-    // Load class elements that are used in queries for codegen.
-    var polymerLib =
-        resolver.getLibrary(new AssetId('polymer', 'lib/polymer.dart'));
-    if (polymerLib == null) {
-      _definitionError('polymer');
-      return new _ResolvedTypes.internal(
-          null, stringType, null, null, null, null, null, null);
-    }
-
-    var htmlLib = resolver.getLibraryByUri(Uri.parse('dart:html'));
-    var observeLib =
-        resolver.getLibrary(new AssetId('observe', 'lib/src/metadata.dart'));
-
-    var customTagConstructor =
-        _lookupType(polymerLib, 'CustomTag').constructors.first;
-    var publishedElement = _lookupType(polymerLib, 'PublishedProperty');
-    var observePropertyElement = _lookupType(polymerLib, 'ObserveProperty');
-    var computedPropertyElement = _lookupType(polymerLib, 'ComputedProperty');
-    var polymerClassElement = _lookupType(polymerLib, 'Polymer');
-    var observableElement = _lookupType(observeLib, 'ObservableProperty');
-    var htmlElementElement = _lookupType(htmlLib, 'HtmlElement');
-
-    return new _ResolvedTypes.internal(htmlElementElement, stringType,
-        polymerClassElement, customTagConstructor, publishedElement,
-        observableElement, observePropertyElement, computedPropertyElement);
-  }
-
-  _ResolvedTypes.internal(this.htmlElementElement, this.stringType,
-      this.polymerClassElement, this.customTagConstructor,
-      this.publishedElement, this.observableElement,
-      this.observePropertyElement, this.computedPropertyElement);
-
-  static _lookupType(LibraryElement lib, String typeName) {
-    var result = lib.getType(typeName);
-    if (result == null) _definitionError(typeName);
-    return result;
-  }
-
-  static _definitionError(name) {
-    var message = MISSING_POLYMER_DART;
-    if (logger != null) {
-      logger.warning(message);
-    } else {
-      throw new StateError(message.snippet);
-    }
-  }
-}
-
-/// Retrieves all classes that are visible if you were to import [lib]. This
-/// includes exported classes from other libraries.
-List<ClassElement> _visibleClassesOf(LibraryElement lib) {
-  var result = [];
-  result.addAll(lib.units.expand((u) => u.types));
-  for (var e in lib.exports) {
-    var exported = e.exportedLibrary.units.expand((u) => u.types).toList();
-    _filter(exported, e.combinators);
-    result.addAll(exported);
-  }
-  return result;
-}
-
-/// Retrieves all top-level methods that are visible if you were to import
-/// [lib]. This includes exported methods from other libraries too.
-List<FunctionElement> _visibleTopLevelMethodsOf(LibraryElement lib) {
-  var result = [];
-  result.addAll(lib.units.expand((u) => u.functions));
-  for (var e in lib.exports) {
-    var exported = e.exportedLibrary.units.expand((u) => u.functions).toList();
-    _filter(exported, e.combinators);
-    result.addAll(exported);
-  }
-  return result;
-}
-
-/// Filters [elements] that come from an export, according to its show/hide
-/// combinators. This modifies [elements] in place.
-void _filter(
-    List<analyzer.Element> elements, List<NamespaceCombinator> combinators) {
-  for (var c in combinators) {
-    if (c is ShowElementCombinator) {
-      var show = c.shownNames.toSet();
-      elements.retainWhere((e) => show.contains(e.displayName));
-    } else if (c is HideElementCombinator) {
-      var hide = c.hiddenNames.toSet();
-      elements.removeWhere((e) => hide.contains(e.displayName));
-    }
-  }
-}
diff --git a/packages/polymer/lib/src/build/runner.dart b/packages/polymer/lib/src/build/runner.dart
deleted file mode 100644
index 5488c07..0000000
--- a/packages/polymer/lib/src/build/runner.dart
+++ /dev/null
@@ -1,386 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Definitions used to run the polymer linter and deploy tools without using
-/// pub serve or pub deploy.
-library polymer.src.build.runner;
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-
-import 'package:barback/barback.dart';
-import 'package:path/path.dart' as path;
-import 'package:stack_trace/stack_trace.dart';
-import 'package:yaml/yaml.dart';
-
-/// Collects different parameters needed to configure and run barback.
-class BarbackOptions {
-  /// Phases of transformers to run for the current package.
-  /// Use packagePhases to specify phases for other packages.
-  final List<List<Transformer>> phases;
-
-  /// Package to treat as the current package in barback.
-  final String currentPackage;
-
-  /// Directory root for the current package.
-  final String packageHome;
-
-  /// Mapping between package names and the path in the file system where
-  /// to find the sources of such package.
-  final Map<String, String> packageDirs;
-
-  /// Whether to run transformers on the test folder.
-  final bool transformTests;
-
-  /// Directory where to generate code, if any.
-  final String outDir;
-
-  /// Disregard files that match these filters when copying in non
-  /// transformed files
-  List<String> fileFilter;
-
-  /// Whether to print error messages using a json-format that tools, such as
-  /// the Dart Editor, can process.
-  final bool machineFormat;
-
-  /// Whether to follow symlinks when listing directories. By default this is
-  /// false because directories have symlinks for the packages directory created
-  /// by pub, but it can be turned on for custom uses of this library.
-  final bool followLinks;
-
-  /// Phases of transformers to apply to packages other than the current
-  /// package, keyed by the package name.
-  final Map<String, List<List<Transformer>>> packagePhases;
-
-  BarbackOptions(this.phases, this.outDir, {currentPackage, String packageHome,
-      packageDirs, this.transformTests: false, this.machineFormat: false,
-      this.followLinks: false, this.packagePhases: const {},
-      this.fileFilter: const []})
-      : currentPackage = (currentPackage != null
-          ? currentPackage
-          : readCurrentPackageFromPubspec()),
-        packageHome = packageHome,
-        packageDirs = (packageDirs != null
-            ? packageDirs
-            : readPackageDirsFromPub(packageHome, currentPackage));
-}
-
-/// Creates a barback system as specified by [options] and runs it.  Returns a
-/// future that contains the list of assets generated after barback runs to
-/// completion.
-Future<AssetSet> runBarback(BarbackOptions options) {
-  var barback = new Barback(new _PackageProvider(options.packageDirs));
-  _initBarback(barback, options);
-  _attachListeners(barback, options);
-  if (options.outDir == null) return barback.getAllAssets();
-  return _emitAllFiles(barback, options);
-}
-
-/// Extract the current package from the pubspec.yaml file.
-String readCurrentPackageFromPubspec([String dir]) {
-  var pubspec =
-      new File(dir == null ? 'pubspec.yaml' : path.join(dir, 'pubspec.yaml'));
-  if (!pubspec.existsSync()) {
-    print('error: pubspec.yaml file not found, please run this script from '
-        'your package root directory.');
-    return null;
-  }
-  return loadYaml(pubspec.readAsStringSync())['name'];
-}
-
-/// Extract a mapping between package names and the path in the file system
-/// which has the source of the package. This map will contain an entry for the
-/// current package and everything it depends on (extracted via `pub
-/// list-package-dirs`).
-Map<String, String> readPackageDirsFromPub(
-    [String packageHome, String currentPackage]) {
-  var cachedDir = Directory.current;
-  if (packageHome != null) {
-    Directory.current = new Directory(packageHome);
-  } else {
-    packageHome = cachedDir.path;
-  }
-
-  var dartExec = Platform.executable;
-  // If dartExec == dart, then dart and pub are in standard PATH.
-  var sdkDir = dartExec == 'dart' ? '' : path.dirname(dartExec);
-  var pub = path.join(sdkDir, Platform.isWindows ? 'pub.bat' : 'pub');
-  var result = Process.runSync(pub, ['list-package-dirs']);
-  if (result.exitCode != 0) {
-    print("unexpected error invoking 'pub':");
-    print(result.stdout);
-    print(result.stderr);
-    exit(result.exitCode);
-  }
-  var map = JSON.decode(result.stdout)["packages"];
-  map.forEach((k, v) {
-    map[k] = path.absolute(packageHome, path.dirname(v));
-  });
-
-  if (currentPackage == null) {
-    currentPackage = readCurrentPackageFromPubspec(packageHome);
-  }
-  map[currentPackage] = packageHome;
-
-  Directory.current = cachedDir;
-  return map;
-}
-
-bool shouldSkip(List<String> filters, String path) {
-  return filters.any((filter) => path.contains(filter));
-}
-
-/// Return the relative path of each file under [subDir] in [package].
-Iterable<String> _listPackageDir(
-    String package, String subDir, BarbackOptions options) {
-  var packageDir = options.packageDirs[package];
-  if (packageDir == null) return const [];
-  var dir = new Directory(path.join(packageDir, subDir));
-  if (!dir.existsSync()) return const [];
-  return dir
-      .listSync(recursive: true, followLinks: options.followLinks)
-      .where((f) => f is File)
-      .where((f) => !shouldSkip(options.fileFilter, f.path))
-      .map((f) => path.relative(f.path, from: packageDir));
-}
-
-/// A simple provider that reads files directly from the pub cache.
-class _PackageProvider implements PackageProvider {
-  Map<String, String> packageDirs;
-  Iterable<String> get packages => packageDirs.keys;
-
-  _PackageProvider(this.packageDirs);
-
-  Future<Asset> getAsset(AssetId id) => new Future.value(new Asset.fromPath(
-      id, path.join(packageDirs[id.package], _toSystemPath(id.path))));
-}
-
-/// Convert asset paths to system paths (Assets always use the posix style).
-String _toSystemPath(String assetPath) {
-  if (path.Style.platform != path.Style.windows) return assetPath;
-  return path.joinAll(path.posix.split(assetPath));
-}
-
-/// Tell barback which transformers to use and which assets to process.
-void _initBarback(Barback barback, BarbackOptions options) {
-  var assets = [];
-  void addAssets(String package, String subDir) {
-    for (var filepath in _listPackageDir(package, subDir, options)) {
-      assets.add(new AssetId(package, filepath));
-    }
-  }
-
-  for (var package in options.packageDirs.keys) {
-    // Notify barback to process anything under 'lib' and 'asset'.
-    addAssets(package, 'lib');
-    addAssets(package, 'asset');
-
-    if (options.packagePhases.containsKey(package)) {
-      barback.updateTransformers(package, options.packagePhases[package]);
-    }
-  }
-  barback.updateTransformers(options.currentPackage, options.phases);
-
-  // In case of the current package, include also 'web'.
-  addAssets(options.currentPackage, 'web');
-  if (options.transformTests) addAssets(options.currentPackage, 'test');
-
-  // Add the sources after the transformers so all transformers are present
-  // when barback starts processing the assets.
-  barback.updateSources(assets);
-}
-
-/// Attach error listeners on [barback] so we can report errors.
-void _attachListeners(Barback barback, BarbackOptions options) {
-  // Listen for errors and results
-  barback.errors.listen((e) {
-    var trace = null;
-    if (e is Error) trace = e.stackTrace;
-    if (trace != null) {
-      print(Trace.format(trace));
-    }
-    print('error running barback: $e');
-    exit(1);
-  });
-
-  barback.results.listen((result) {
-    if (!result.succeeded) {
-      print("build failed with errors: ${result.errors}");
-      exit(1);
-    }
-  });
-
-  barback.log.listen((entry) {
-    if (options.machineFormat) {
-      print(_jsonFormatter(entry));
-    } else {
-      print(_consoleFormatter(entry));
-    }
-  });
-}
-
-/// Emits all outputs of [barback] and copies files that we didn't process (like
-/// dependent package's libraries).
-Future _emitAllFiles(Barback barback, BarbackOptions options) {
-  return barback.getAllAssets().then((assets) {
-    // Delete existing output folder before we generate anything
-    var dir = new Directory(options.outDir);
-    if (dir.existsSync()) dir.deleteSync(recursive: true);
-    return _emitPackagesDir(options)
-        .then((_) => _emitTransformedFiles(assets, options))
-        .then((_) => _addPackagesSymlinks(assets, options))
-        .then((_) => assets);
-  });
-}
-
-Future _emitTransformedFiles(AssetSet assets, BarbackOptions options) {
-  // Copy all the assets we transformed
-  var futures = [];
-  var currentPackage = options.currentPackage;
-  var transformTests = options.transformTests;
-  var outPackages = path.join(options.outDir, 'packages');
-
-  return Future.forEach(assets, (asset) {
-    var id = asset.id;
-    var dir = _firstDir(id.path);
-    if (dir == null) return null;
-
-    var filepath;
-    if (dir == 'lib') {
-      // Put lib files directly under the packages folder (e.g. 'lib/foo.dart'
-      // will be emitted at out/packages/package_name/foo.dart).
-      filepath = path.join(
-          outPackages, id.package, _toSystemPath(id.path.substring(4)));
-    } else if (id.package == currentPackage &&
-        (dir == 'web' || (transformTests && dir == 'test'))) {
-      filepath = path.join(options.outDir, _toSystemPath(id.path));
-    } else {
-      // TODO(sigmund): do something about other assets?
-      return null;
-    }
-
-    return _writeAsset(filepath, asset);
-  });
-}
-
-/// Adds a package symlink from each directory under `out/web/foo/` to
-/// `out/packages`.
-void _addPackagesSymlinks(AssetSet assets, BarbackOptions options) {
-  var outPackages = path.join(options.outDir, 'packages');
-  var currentPackage = options.currentPackage;
-  for (var asset in assets) {
-    var id = asset.id;
-    if (id.package != currentPackage) continue;
-    var firstDir = _firstDir(id.path);
-    if (firstDir == null) continue;
-
-    if (firstDir == 'web' || (options.transformTests && firstDir == 'test')) {
-      var dir = path.join(options.outDir, path.dirname(_toSystemPath(id.path)));
-      var linkPath = path.join(dir, 'packages');
-      var link = new Link(linkPath);
-      if (!link.existsSync()) {
-        var targetPath = Platform.operatingSystem == 'windows'
-            ? path.normalize(path.absolute(outPackages))
-            : path.normalize(path.relative(outPackages, from: dir));
-        link.createSync(targetPath);
-      }
-    }
-  }
-}
-
-/// Emits a 'packages' directory directly under `out/packages` with the contents
-/// of every file that was not transformed by barback.
-Future _emitPackagesDir(BarbackOptions options) {
-  var outPackages = path.join(options.outDir, 'packages');
-  _ensureDir(outPackages);
-
-  // Copy all the files we didn't process
-  var dirs = options.packageDirs;
-  return Future.forEach(dirs.keys, (package) {
-    return Future.forEach(_listPackageDir(package, 'lib', options), (relpath) {
-      var inpath = path.join(dirs[package], relpath);
-      var outpath = path.join(outPackages, package, relpath.substring(4));
-      return _copyFile(inpath, outpath);
-    });
-  });
-}
-
-/// Ensure [dirpath] exists.
-void _ensureDir(String dirpath) {
-  new Directory(dirpath).createSync(recursive: true);
-}
-
-/// Returns the first directory name on a url-style path, or null if there are
-/// no slashes.
-String _firstDir(String url) {
-  var firstSlash = url.indexOf('/');
-  if (firstSlash == -1) return null;
-  return url.substring(0, firstSlash);
-}
-
-/// Copy a file from [inpath] to [outpath].
-Future _copyFile(String inpath, String outpath) {
-  _ensureDir(path.dirname(outpath));
-  return new File(inpath).openRead().pipe(new File(outpath).openWrite());
-}
-
-/// Write contents of an [asset] into a file at [filepath].
-Future _writeAsset(String filepath, Asset asset) {
-  _ensureDir(path.dirname(filepath));
-  return asset.read().pipe(new File(filepath).openWrite());
-}
-
-String _kindFromEntry(LogEntry entry) {
-  var level = entry.level;
-  return level == LogLevel.ERROR
-      ? 'error'
-      : (level == LogLevel.WARNING ? 'warning' : 'info');
-}
-
-/// Formatter that generates messages using a format that can be parsed
-/// by tools, such as the Dart Editor, for reporting error messages.
-String _jsonFormatter(LogEntry entry) {
-  var kind = _kindFromEntry(entry);
-  var span = entry.span;
-  return JSON.encode((span == null)
-      ? [{'method': kind, 'params': {'message': entry.message}}]
-      : [
-    {
-      'method': kind,
-      'params': {
-        'file': span.sourceUrl.toString(),
-        'message': entry.message,
-        'line': span.start.line + 1,
-        'charStart': span.start.offset,
-        'charEnd': span.end.offset,
-      }
-    }
-  ]);
-}
-
-/// Formatter that generates messages that are easy to read on the console (used
-/// by default).
-String _consoleFormatter(LogEntry entry) {
-  var kind = _kindFromEntry(entry);
-  var useColors = stdioType(stdout) == StdioType.TERMINAL;
-  var levelColor = (kind == 'error') ? _RED_COLOR : _MAGENTA_COLOR;
-  var output = new StringBuffer();
-  if (useColors) output.write(levelColor);
-  output
-    ..write(kind)
-    ..write(' ');
-  if (useColors) output.write(_NO_COLOR);
-  if (entry.span == null) {
-    output.write(entry.message);
-  } else {
-    output.write(entry.span.message(entry.message,
-        color: useColors ? levelColor : null));
-  }
-  return output.toString();
-}
-
-const String _RED_COLOR = '\u001b[31m';
-const String _MAGENTA_COLOR = '\u001b[35m';
-const String _NO_COLOR = '\u001b[0m';
diff --git a/packages/polymer/lib/src/build/utils.dart b/packages/polymer/lib/src/build/utils.dart
deleted file mode 100644
index b031373..0000000
--- a/packages/polymer/lib/src/build/utils.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.src.utils;
-
-/// Converts a string name with hyphens into an identifier, by removing hyphens
-/// and capitalizing the following letter. Optionally [startUppercase] to
-/// captialize the first letter.
-String toCamelCase(String hyphenedName, {bool startUppercase: false}) {
-  var segments = hyphenedName.split('-');
-  int start = startUppercase ? 0 : 1;
-  for (int i = start; i < segments.length; i++) {
-    var segment = segments[i];
-    if (segment.length > 0) {
-      // Character between 'a'..'z' mapped to 'A'..'Z'
-      segments[i] = '${segment[0].toUpperCase()}${segment.substring(1)}';
-    }
-  }
-  return segments.join('');
-}
-
-/// Reverse of [toCamelCase].
-String toHyphenedName(String word) {
-  var sb = new StringBuffer();
-  for (int i = 0; i < word.length; i++) {
-    var lower = word[i].toLowerCase();
-    if (word[i] != lower && i > 0) sb.write('-');
-    sb.write(lower);
-  }
-  return sb.toString();
-}
diff --git a/packages/polymer/lib/src/declaration.dart b/packages/polymer/lib/src/declaration.dart
deleted file mode 100644
index b9cbffc..0000000
--- a/packages/polymer/lib/src/declaration.dart
+++ /dev/null
@@ -1,614 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer;
-
-/// *Warning* this class is experimental and subject to change.
-///
-/// The data associated with a polymer-element declaration, if it is backed
-/// by a Dart class instead of a JavaScript prototype.
-class PolymerDeclaration {
-  /// The one syntax to rule them all.
-  static final BindingDelegate _polymerSyntax = new PolymerExpressions();
-
-  /// The polymer-element for this declaration.
-  final HtmlElement element;
-
-  /// The Dart type corresponding to this custom element declaration.
-  final Type type;
-
-  /// If we extend another custom element, this points to the super declaration.
-  final PolymerDeclaration superDeclaration;
-
-  /// The name of the custom element.
-  final String name;
-
-  /// Map of publish properties. Can be a field or a property getter, but if
-  /// this map contains a getter, is because it also has a corresponding setter.
-  ///
-  /// Note: technically these are always single properties, so we could use a
-  /// Symbol instead of a PropertyPath. However there are lookups between this
-  /// map and [_observe] so it is easier to just track paths.
-  Map<PropertyPath, smoke.Declaration> _publish;
-
-  /// The names of published properties for this polymer-element.
-  Iterable<String> get publishedProperties =>
-      _publish != null ? _publish.keys.map((p) => '$p') : const [];
-
-  /// Same as [_publish] but with lower case names.
-  Map<String, smoke.Declaration> _publishLC;
-
-  Map<PropertyPath, List<Symbol>> _observe;
-
-  /// Name and expression for each computed property.
-  Map<Symbol, String> _computed = {};
-
-  Map<String, Object> _instanceAttributes;
-
-  /// A set of properties that should be automatically reflected to attributes.
-  /// Typically this is used for CSS styling. If none, this variable will be
-  /// left as null.
-  Set<String> _reflect;
-
-  List<Element> _sheets;
-  List<Element> get sheets => _sheets;
-
-  List<Element> _styles;
-  List<Element> get styles => _styles;
-
-  // The default syntax for polymer-elements.
-  PolymerExpressions syntax = _polymerSyntax;
-
-  DocumentFragment get templateContent {
-    final template = fetchTemplate();
-    return template != null ? templateBind(template).content : null;
-  }
-
-  /// Maps event names and their associated method in the element class.
-  final Map<String, String> _eventDelegates = {};
-
-  /// Expected events per element node.
-  // TODO(sigmund): investigate whether we need more than 1 set of local events
-  // per element (why does the js implementation stores 1 per template node?)
-  Expando<Set<String>> _templateDelegates;
-
-  String get extendee =>
-      superDeclaration != null ? superDeclaration.name : null;
-
-  /// The root URI for assets.
-  Uri _rootUri;
-
-  /// List of properties to ignore for observation.
-  static Set<Symbol> _OBSERVATION_BLACKLIST =
-      new HashSet.from(const [#attribute]);
-
-  static bool _canObserveProperty(Symbol property) =>
-      !_OBSERVATION_BLACKLIST.contains(property);
-
-  /// This list contains some property names that people commonly want to use,
-  /// but won't work because of Chrome/Safari bugs. It isn't an exhaustive
-  /// list. In particular it doesn't contain any property names found on
-  /// subtypes of HTMLElement (e.g. name, value). Rather it attempts to catch
-  /// some common cases.
-  ///
-  /// Dart Note: `class` is left out since its an invalid symbol in dart. This
-  /// means that nobody could make a property by this name anyways though.
-  /// Dart Note: We have added `classes` to this list, which is the dart:html
-  /// equivalent of `classList` but more likely to have conflicts.
-  static Set<Symbol> _PROPERTY_NAME_BLACKLIST = new HashSet.from([
-    const Symbol('children'),
-    const Symbol('id'),
-    const Symbol('hidden'),
-    const Symbol('style'),
-    const Symbol('title'),
-    const Symbol('classes')
-  ]);
-
-  bool _checkPropertyBlacklist(Symbol name) {
-    if (_PROPERTY_NAME_BLACKLIST.contains(name)) {
-      print('Cannot define property "$name" for element "${this.name}" '
-          'because it has the same name as an HTMLElement property, and not '
-          'all browsers support overriding that. Consider giving it a '
-          'different name. ');
-      return true;
-    }
-    return false;
-  }
-
-  // Dart note: since polymer-element is handled in JS now, we have a simplified
-  // flow for registering. We don't need to wait for the supertype or the code
-  // to be noticed.
-  PolymerDeclaration(this.element, this.name, this.type, this.superDeclaration);
-
-  void register() {
-    // more declarative features
-    desugar();
-    // register our custom element
-    registerType(name);
-
-    // NOTE: skip in Dart because we don't have mutable global scope.
-    // reference constructor in a global named by 'constructor' attribute
-    // publishConstructor();
-  }
-
-  /// Implement various declarative features.
-  // Dart note: this merges "buildPrototype" "desugarBeforeChaining" and
-  // "desugarAfterChaining", because we don't have prototypes.
-  void desugar() {
-
-    // back reference declaration element
-    _declarations[name] = this;
-
-    // transcribe `attributes` declarations onto own prototype's `publish`
-    publishAttributes(superDeclaration);
-
-    publishProperties();
-
-    inferObservers();
-
-    // desugar compound observer syntax, e.g. @ObserveProperty('a b c')
-    explodeObservers();
-
-    createPropertyAccessors();
-    // install mdv delegate on template
-    installBindingDelegate(fetchTemplate());
-    // install external stylesheets as if they are inline
-    installSheets();
-    // adjust any paths in dom from imports
-    resolveElementPaths(element);
-    // compile list of attributes to copy to instances
-    accumulateInstanceAttributes();
-    // parse on-* delegates declared on `this` element
-    parseHostEvents();
-    // install a helper method this.resolvePath to aid in
-    // setting resource urls. e.g.
-    // this.$.image.src = this.resolvePath('images/foo.png')
-    initResolvePath();
-    // under ShadowDOMPolyfill, transforms to approximate missing CSS features
-    _shimShadowDomStyling(templateContent, name, extendee);
-
-    // TODO(jmesserly): this feels unnatrual in Dart. Since we have convenient
-    // lazy static initialization, can we get by without it?
-    if (smoke.hasStaticMethod(type, #registerCallback)) {
-      smoke.invoke(type, #registerCallback, [this]);
-    }
-  }
-
-  void registerType(String name) {
-    var baseTag;
-    var decl = this;
-    while (decl != null) {
-      baseTag = decl.element.attributes['extends'];
-      decl = decl.superDeclaration;
-    }
-    document.registerElement(name, type, extendsTag: baseTag);
-  }
-
-  // from declaration/mdv.js
-  Element fetchTemplate() => element.querySelector('template');
-
-  void installBindingDelegate(Element template) {
-    if (template != null) {
-      templateBind(template).bindingDelegate = this.syntax;
-    }
-  }
-
-  // from declaration/path.js
-  void resolveElementPaths(Node node) => PolymerJs.resolveElementPaths(node);
-
-  // Dart note: renamed from "addResolvePathApi".
-  void initResolvePath() {
-    // let assetpath attribute modify the resolve path
-    var assetPath = element.attributes['assetpath'];
-    if (assetPath == null) assetPath = '';
-    var base = Uri.parse(element.ownerDocument.baseUri);
-    _rootUri = base.resolve(assetPath);
-  }
-
-  String resolvePath(String urlPath, [baseUrlOrString]) {
-    Uri base;
-    if (baseUrlOrString == null) {
-      // Dart note: this enforces the same invariant as JS, where you need to
-      // call addResolvePathApi first.
-      if (_rootUri == null) {
-        throw new StateError('call initResolvePath before calling resolvePath');
-      }
-      base = _rootUri;
-    } else if (baseUrlOrString is Uri) {
-      base = baseUrlOrString;
-    } else {
-      base = Uri.parse(baseUrlOrString);
-    }
-    return base.resolve(urlPath).toString();
-  }
-
-  void publishAttributes(PolymerDeclaration superDecl) {
-    // get properties to publish
-    if (superDecl != null) {
-      // Dart note: even though we walk the type hierarchy in
-      // _getPublishedProperties, this will additionally include any names
-      // published via the `attributes` attribute.
-      if (superDecl._publish != null) {
-        _publish = new Map.from(superDecl._publish);
-      }
-      if (superDecl._reflect != null) {
-        _reflect = new Set.from(superDecl._reflect);
-      }
-    }
-
-    _getPublishedProperties(type);
-
-    // merge names from 'attributes' attribute into the '_publish' object
-    var attrs = element.attributes['attributes'];
-    if (attrs != null) {
-      // names='a b c' or names='a,b,c'
-      // record each name for publishing
-      for (var attr in attrs.split(_ATTRIBUTES_REGEX)) {
-        // remove excess ws
-        attr = attr.trim();
-
-        // if the user hasn't specified a value, we want to use the
-        // default, unless a superclass has already chosen one
-        if (attr == '') continue;
-
-        var decl, path;
-        var property = smoke.nameToSymbol(attr);
-        if (property != null) {
-          path = new PropertyPath([property]);
-          if (_publish != null && _publish.containsKey(path)) {
-            continue;
-          }
-          decl = smoke.getDeclaration(type, property);
-        }
-
-        if (property == null || decl == null || decl.isMethod || decl.isFinal) {
-          window.console.warn('property for attribute $attr of polymer-element '
-              'name=$name not found.');
-          continue;
-        }
-        if (_publish == null) _publish = {};
-        _publish[path] = decl;
-      }
-    }
-
-    // NOTE: the following is not possible in Dart; fields must be declared.
-    // install 'attributes' as properties on the prototype,
-    // but don't override
-  }
-
-  void _getPublishedProperties(Type type) {
-    var options = const smoke.QueryOptions(
-        includeInherited: true,
-        includeUpTo: HtmlElement,
-        withAnnotations: const [PublishedProperty]);
-    for (var decl in smoke.query(type, options)) {
-      if (decl.isFinal) continue;
-      if (_checkPropertyBlacklist(decl.name)) continue;
-      if (_publish == null) _publish = {};
-      _publish[new PropertyPath([decl.name])] = decl;
-
-      // Should we reflect the property value to the attribute automatically?
-      if (decl.annotations
-          .where((a) => a is PublishedProperty)
-          .any((a) => a.reflect)) {
-        if (_reflect == null) _reflect = new Set();
-        _reflect.add(smoke.symbolToName(decl.name));
-      }
-    }
-  }
-
-  void accumulateInstanceAttributes() {
-    // inherit instance attributes
-    _instanceAttributes = new Map<String, Object>();
-    if (superDeclaration != null) {
-      _instanceAttributes.addAll(superDeclaration._instanceAttributes);
-    }
-
-    // merge attributes from element
-    element.attributes.forEach((name, value) {
-      if (isInstanceAttribute(name)) {
-        _instanceAttributes[name] = value;
-      }
-    });
-  }
-
-  static bool isInstanceAttribute(name) {
-    // do not clone these attributes onto instances
-    final blackList = const {
-      'name': 1,
-      'extends': 1,
-      'constructor': 1,
-      'noscript': 1,
-      'assetpath': 1,
-      'cache-csstext': 1,
-      // add ATTRIBUTES_ATTRIBUTE to the blacklist
-      'attributes': 1,
-    };
-
-    return !blackList.containsKey(name) && !name.startsWith('on-');
-  }
-
-  /// Extracts events from the element tag attributes.
-  void parseHostEvents() {
-    addAttributeDelegates(_eventDelegates);
-  }
-
-  void addAttributeDelegates(Map<String, String> delegates) {
-    element.attributes.forEach((name, value) {
-      if (_hasEventPrefix(name)) {
-        var start = value.indexOf('{{');
-        var end = value.lastIndexOf('}}');
-        if (start >= 0 && end >= 0) {
-          delegates[_removeEventPrefix(name)] =
-              value.substring(start + 2, end).trim();
-        }
-      }
-    });
-  }
-
-  String urlToPath(String url) {
-    if (url == null) return '';
-    return (url.split('/')
-      ..removeLast()
-      ..add('')).join('/');
-  }
-
-  // Dart note: loadStyles, convertSheetsToStyles, copySheetAttribute and
-  // findLoadableStyles are not ported because they're handled by Polymer JS
-  // before we get into [register].
-
-  /// Install external stylesheets loaded in <element> elements into the
-  /// element's template.
-  void installSheets() {
-    cacheSheets();
-    cacheStyles();
-    installLocalSheets();
-    installGlobalStyles();
-  }
-
-  void cacheSheets() {
-    _sheets = findNodes(_SHEET_SELECTOR);
-    for (var s in sheets) s.remove();
-  }
-
-  void cacheStyles() {
-    _styles = findNodes('$_STYLE_SELECTOR[$_SCOPE_ATTR]');
-    for (var s in styles) s.remove();
-  }
-
-  /// Takes external stylesheets loaded in an `<element>` element and moves
-  /// their content into a style element inside the `<element>`'s template.
-  /// The sheet is then removed from the `<element>`. This is done only so
-  /// that if the element is loaded in the main document, the sheet does
-  /// not become active.
-  /// Note, ignores sheets with the attribute 'polymer-scope'.
-  void installLocalSheets() {
-    var sheets =
-        this.sheets.where((s) => !s.attributes.containsKey(_SCOPE_ATTR));
-    var content = templateContent;
-    if (content != null) {
-      var cssText = new StringBuffer();
-      for (var sheet in sheets) {
-        cssText
-          ..write(_cssTextFromSheet(sheet))
-          ..write('\n');
-      }
-      if (cssText.length > 0) {
-        var style = element.ownerDocument.createElement('style')
-          ..text = '$cssText';
-
-        content.insertBefore(style, content.firstChild);
-      }
-    }
-  }
-
-  List<Element> findNodes(String selector, [bool matcher(Element e)]) {
-    var nodes = element.querySelectorAll(selector).toList();
-    var content = templateContent;
-    if (content != null) {
-      nodes = nodes..addAll(content.querySelectorAll(selector));
-    }
-    if (matcher != null) return nodes.where(matcher).toList();
-    return nodes;
-  }
-
-  /// Promotes external stylesheets and style elements with the attribute
-  /// polymer-scope='global' into global scope.
-  /// This is particularly useful for defining @keyframe rules which
-  /// currently do not function in scoped or shadow style elements.
-  /// (See wkb.ug/72462)
-  // TODO(sorvell): remove when wkb.ug/72462 is addressed.
-  void installGlobalStyles() {
-    var style = styleForScope(_STYLE_GLOBAL_SCOPE);
-    Polymer.applyStyleToScope(style, document.head);
-  }
-
-  String cssTextForScope(String scopeDescriptor) {
-    var cssText = new StringBuffer();
-    // handle stylesheets
-    var selector = '[$_SCOPE_ATTR=$scopeDescriptor]';
-    matcher(s) => s.matches(selector);
-
-    for (var sheet in sheets.where(matcher)) {
-      cssText
-        ..write(_cssTextFromSheet(sheet))
-        ..write('\n\n');
-    }
-    // handle cached style elements
-    for (var style in styles.where(matcher)) {
-      cssText
-        ..write(style.text)
-        ..write('\n\n');
-    }
-    return cssText.toString();
-  }
-
-  StyleElement styleForScope(String scopeDescriptor) {
-    var cssText = cssTextForScope(scopeDescriptor);
-    return cssTextToScopeStyle(cssText, scopeDescriptor);
-  }
-
-  StyleElement cssTextToScopeStyle(String cssText, String scopeDescriptor) {
-    if (cssText == '') return null;
-
-    return new StyleElement()
-      ..text = cssText
-      ..attributes[_STYLE_SCOPE_ATTRIBUTE] = '$name-$scopeDescriptor';
-  }
-
-  /// Fetch a list of all *Changed methods so we can observe the associated
-  /// properties.
-  void inferObservers() {
-    for (var decl in smoke.query(type, _changedMethodQueryOptions)) {
-      // TODO(jmesserly): now that we have a better system, should we
-      // deprecate *Changed methods?
-      if (_observe == null) _observe = new HashMap();
-      var name = smoke.symbolToName(decl.name);
-      name = name.substring(0, name.length - 7);
-      if (!_canObserveProperty(decl.name)) continue;
-      _observe[new PropertyPath(name)] = [decl.name];
-    }
-  }
-
-  /// Fetch a list of all methods annotated with [ObserveProperty] so we can
-  /// observe the associated properties.
-  void explodeObservers() {
-    var options = const smoke.QueryOptions(
-        includeFields: false,
-        includeProperties: false,
-        includeMethods: true,
-        includeInherited: true,
-        includeUpTo: HtmlElement,
-        withAnnotations: const [ObserveProperty]);
-    for (var decl in smoke.query(type, options)) {
-      for (var meta in decl.annotations) {
-        if (meta is! ObserveProperty) continue;
-        if (_observe == null) _observe = new HashMap();
-        for (String name in meta.names) {
-          _observe.putIfAbsent(new PropertyPath(name), () => []).add(decl.name);
-        }
-      }
-    }
-  }
-
-  void publishProperties() {
-    // Dart note: _publish was already populated by publishAttributes
-    if (_publish != null) _publishLC = _lowerCaseMap(_publish);
-  }
-
-  Map<String, dynamic> _lowerCaseMap(Map<PropertyPath, dynamic> properties) {
-    final map = new Map<String, dynamic>();
-    properties.forEach((PropertyPath path, value) {
-      map['$path'.toLowerCase()] = value;
-    });
-    return map;
-  }
-
-  void createPropertyAccessors() {
-    // Dart note: since we don't have a prototype in Dart, most of the work of
-    // createPolymerAccessors is done lazily on the first access of properties.
-    // Here we just extract the information from annotations and store it as
-    // properties on the declaration.
-
-    // Dart Note: The js side makes computed properties read only, and does
-    // special logic right here for them. For us they are automatically read
-    // only unless you define a setter for them, so we left that out.
-    var options = const smoke.QueryOptions(
-        includeInherited: true,
-        includeUpTo: HtmlElement,
-        withAnnotations: const [ComputedProperty]);
-    var existing = {};
-    for (var decl in smoke.query(type, options)) {
-      var name = decl.name;
-      if (_checkPropertyBlacklist(name)) continue;
-      var meta = decl.annotations.firstWhere((e) => e is ComputedProperty);
-      var prev = existing[name];
-      // The definition of a child class takes priority.
-      if (prev == null || smoke.isSubclassOf(decl.type, prev.type)) {
-        _computed[name] = meta.expression;
-        existing[name] = decl;
-      }
-    }
-  }
-}
-
-/// maps tag names to prototypes
-final Map _typesByName = new Map<String, Type>();
-
-Type _getRegisteredType(String name) => _typesByName[name];
-
-/// Dart Note: instanceOfType not implemented for dart, its not needed.
-
-/// track document.register'ed tag names and their declarations
-final Map _declarations = new Map<String, PolymerDeclaration>();
-
-bool _isRegistered(String name) => _declarations.containsKey(name);
-PolymerDeclaration _getDeclaration(String name) => _declarations[name];
-
-/// Using Polymer's web_components/src/ShadowCSS.js passing the style tag's
-/// content.
-void _shimShadowDomStyling(
-    DocumentFragment template, String name, String extendee) {
-  if (_ShadowCss == null || !_hasShadowDomPolyfill) return;
-
-  _ShadowCss.callMethod('shimStyling', [template, name, extendee]);
-}
-
-final bool _hasShadowDomPolyfill = js.context.hasProperty('ShadowDOMPolyfill');
-final JsObject _ShadowCss =
-    _WebComponents != null ? _WebComponents['ShadowCSS'] : null;
-
-const _STYLE_SELECTOR = 'style';
-const _SHEET_SELECTOR = 'link[rel=stylesheet]';
-const _STYLE_GLOBAL_SCOPE = 'global';
-const _SCOPE_ATTR = 'polymer-scope';
-const _STYLE_SCOPE_ATTRIBUTE = 'element';
-const _STYLE_CONTROLLER_SCOPE = 'controller';
-
-String _cssTextFromSheet(LinkElement sheet) {
-  if (sheet == null) return '';
-
-  // In deploy mode we should never do a sync XHR; link rel=stylesheet will
-  // be inlined into a <style> tag by ImportInliner.
-  if (_deployMode) return '';
-
-  // TODO(jmesserly): sometimes the href property is wrong after deployment.
-  var href = sheet.href;
-  if (href == '') href = sheet.attributes["href"];
-
-  // TODO(jmesserly): it seems like polymer-js is always polyfilling
-  // HTMLImports, because their code depends on "__resource" to work, so I
-  // don't see how it can work with native HTML Imports. We use a sync-XHR
-  // under the assumption that the file is likely to have been already
-  // downloaded and cached by HTML Imports.
-  try {
-    return (new HttpRequest()
-      ..open('GET', href, async: false)
-      ..send()).responseText;
-  } on DomException catch (e, t) {
-    _sheetLog.fine('failed to XHR stylesheet text href="$href" error: '
-        '$e, trace: $t');
-    return '';
-  }
-}
-
-final Logger _sheetLog = new Logger('polymer.stylesheet');
-
-final smoke.QueryOptions _changedMethodQueryOptions = new smoke.QueryOptions(
-    includeFields: false,
-    includeProperties: false,
-    includeMethods: true,
-    includeInherited: true,
-    includeUpTo: HtmlElement,
-    matches: _isObserverMethod);
-
-bool _isObserverMethod(Symbol symbol) {
-  String name = smoke.symbolToName(symbol);
-  if (name == null) return false;
-  return name.endsWith('Changed') && name != 'attributeChanged';
-}
-
-final _ATTRIBUTES_REGEX = new RegExp(r'\s|,');
-
-final JsObject _WebComponents = js.context['WebComponents'];
diff --git a/packages/polymer/lib/src/events.dart b/packages/polymer/lib/src/events.dart
deleted file mode 100644
index 33798ea..0000000
--- a/packages/polymer/lib/src/events.dart
+++ /dev/null
@@ -1,173 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Code from declaration/events.js
-part of polymer;
-
-/// An extension of [polymer_expressions.PolymerExpressions] that adds support
-/// for binding events using `on-eventName` using [PolymerEventBindings].
-// TODO(jmesserly): the JS layering is a bit odd, with polymer-dev implementing
-// events and polymer-expressions implementing everything else. I don't think
-// this separation is right in the long term, so we're using the same class name
-// until we can sort it out.
-class PolymerExpressions extends BindingDelegate with PolymerEventBindings {
-
-  /// A wrapper around polymer_expressions used to implement forwarding.
-  /// Ideally we would inherit from it, but mixins can't be applied to a type
-  /// that forwards to a superclass with a constructor that has optional or
-  /// named arguments.
-  final polymer_expressions.PolymerExpressions _delegate;
-
-  Map<String, Object> get globals => _delegate.globals;
-
-  PolymerExpressions({Map<String, Object> globals})
-      : _delegate = new polymer_expressions.PolymerExpressions(
-          globals: globals);
-
-  prepareBinding(String path, name, node) {
-    if (_hasEventPrefix(name)) {
-      return prepareEventBinding(path, name, node);
-    }
-    return _delegate.prepareBinding(path, name, node);
-  }
-
-  prepareInstanceModel(Element template) =>
-      _delegate.prepareInstanceModel(template);
-
-  prepareInstancePositionChanged(Element template) =>
-      _delegate.prepareInstancePositionChanged(template);
-
-  static final getExpression =
-      polymer_expressions.PolymerExpressions.getExpression;
-  static final getBinding = polymer_expressions.PolymerExpressions.getBinding;
-}
-
-/// A mixin for a [BindingDelegate] to add Polymer event support.
-/// This is included in [PolymerExpressions].
-abstract class PolymerEventBindings {
-  /// Finds the event controller for this node.
-  Element findController(Node node) {
-    while (node.parentNode != null) {
-      if (node is Polymer && node.eventController != null) {
-        return node.eventController;
-      } else if (node is Element) {
-        // If it is a normal element, js polymer element, or dart wrapper to a
-        // js polymer element, then we try js interop.
-        var eventController =
-            new JsObject.fromBrowserObject(node)['eventController'];
-        if (eventController != null) return eventController;
-      }
-      node = node.parentNode;
-    }
-    return node is ShadowRoot ? node.host : null;
-  }
-
-  EventListener getEventHandler(controller, target, String method) => (e) {
-    if (controller == null || controller is! Polymer) {
-      controller = findController(target);
-    }
-
-    if (controller is Polymer) {
-      var detail = null;
-      if (e is CustomEvent) {
-        detail = e.detail;
-        // TODO(sigmund): this shouldn't be necessary. See issue 19315.
-        if (detail == null) {
-          detail = new JsObject.fromBrowserObject(e)['detail'];
-        }
-      }
-      var args = [e, detail, e.currentTarget];
-      controller.dispatchMethod(controller, method, args);
-    } else {
-      throw new StateError('controller $controller is not a '
-          'Dart polymer-element.');
-    }
-  };
-
-  prepareEventBinding(String path, String name, Node node) {
-    if (!_hasEventPrefix(name)) return null;
-
-    var eventType = _removeEventPrefix(name);
-    var translated = _eventTranslations[eventType];
-    eventType = translated != null ? translated : eventType;
-
-    return (model, node, oneTime) {
-      var eventHandler =
-          Zone.current.bindUnaryCallback(getEventHandler(null, node, path));
-      // TODO(jakemac): Remove this indirection if/when JsFunction gets a
-      // simpler constructor that doesn't pass this, http://dartbug.com/20545.
-      var handler = new JsFunction.withThis((_, e) => eventHandler(e));
-      PolymerGesturesJs.addEventListener(node, eventType, handler);
-
-      if (oneTime) return null;
-      return new _EventBindable(path, node, eventType, handler);
-    };
-  }
-}
-
-class _EventBindable extends Bindable {
-  final String _path;
-  final Node _node;
-  final String _eventType;
-  final JsFunction _handler;
-
-  _EventBindable(this._path, this._node, this._eventType, this._handler);
-
-  // TODO(rafaelw): This is really pointless work. Aside from the cost
-  // of these allocations, NodeBind is going to setAttribute back to its
-  // current value. Fixing this would mean changing the TemplateBinding
-  // binding delegate API.
-  get value => '{{ $_path }}';
-
-  open(callback) => value;
-
-  void close() {
-    PolymerGesturesJs.removeEventListener(_node, _eventType, _handler);
-  }
-}
-
-/// Attribute prefix used for declarative event handlers.
-const _EVENT_PREFIX = 'on-';
-
-/// Whether an attribute declares an event.
-bool _hasEventPrefix(String attr) => attr.startsWith(_EVENT_PREFIX);
-
-String _removeEventPrefix(String name) => name.substring(_EVENT_PREFIX.length);
-
-// Dart note: polymer.js calls this mixedCaseEventTypes. But we have additional
-// things that need translation due to renames.
-final _eventTranslations = const {
-  'domfocusout': 'DOMFocusOut',
-  'domfocusin': 'DOMFocusIn',
-  'dommousescroll': 'DOMMouseScroll',
-
-  // Dart note: handle Dart-specific event names.
-  'animationend': 'webkitAnimationEnd',
-  'animationiteration': 'webkitAnimationIteration',
-  'animationstart': 'webkitAnimationStart',
-  'doubleclick': 'dblclick',
-  'fullscreenchange': 'webkitfullscreenchange',
-  'fullscreenerror': 'webkitfullscreenerror',
-  'keyadded': 'webkitkeyadded',
-  'keyerror': 'webkitkeyerror',
-  'keymessage': 'webkitkeymessage',
-  'needkey': 'webkitneedkey',
-  'speechchange': 'webkitSpeechChange',
-};
-
-final _reverseEventTranslations = () {
-  final map = new Map<String, String>();
-  _eventTranslations.forEach((onName, eventType) {
-    map[eventType] = onName;
-  });
-  return map;
-}();
-
-// Dart note: we need this function because we have additional renames JS does
-// not have. The JS renames are simply case differences, whereas we have ones
-// like doubleclick -> dblclick and stripping the webkit prefix.
-String _eventNameFromType(String eventType) {
-  final result = _reverseEventTranslations[eventType];
-  return result != null ? result : eventType;
-}
diff --git a/packages/polymer/lib/src/initializers.dart b/packages/polymer/lib/src/initializers.dart
deleted file mode 100644
index cec4f8e..0000000
--- a/packages/polymer/lib/src/initializers.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-part of polymer;
-
-/// Automatically registers a polymer element.
-class CustomTag implements Initializer<Type> {
-  final String tagName;
-  const CustomTag(this.tagName);
-
-  @override
-  initialize(Type t) => Polymer.register(tagName, t);
-}
-
-/// Calls a zero argument [Function] after [Polymer.onReady] completes.
-typedef dynamic _ZeroArg();
-class _WhenPolymerReady implements Initializer<_ZeroArg> {
-  const _WhenPolymerReady();
-
-  @override
-  void initialize(_ZeroArg f) {
-    Polymer.onReady.then((_) => f());
-  }
-}
-
-const whenPolymerReady = const _WhenPolymerReady();
-
diff --git a/packages/polymer/lib/src/instance.dart b/packages/polymer/lib/src/instance.dart
deleted file mode 100644
index ca46d8d..0000000
--- a/packages/polymer/lib/src/instance.dart
+++ /dev/null
@@ -1,1466 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer;
-
-/// Use this annotation to publish a property as an attribute.
-///
-/// You can also use [PublishedProperty] to provide additional information,
-/// such as automatically syncing the property back to the attribute.
-///
-/// For example:
-///
-///     class MyPlaybackElement extends PolymerElement {
-///       // This will be available as an HTML attribute, for example:
-///       //
-///       //     <my-playback volume="11">
-///       //
-///       // It will support initialization and data-binding via <template>:
-///       //
-///       //     <template>
-///       //       <my-playback volume="{{x}}">
-///       //     </template>
-///       //
-///       // If the template is instantiated or given a model, `x` will be
-///       // used for this field and updated whenever `volume` changes.
-///       @published
-///       double get volume => readValue(#volume);
-///       set volume(double newValue) => writeValue(#volume, newValue);
-///
-///       // This will be available as an HTML attribute, like above, but it
-///       // will also serialize values set to the property to the attribute.
-///       // In other words, attributes['volume2'] will contain a serialized
-///       // version of this field.
-///       @PublishedProperty(reflect: true)
-///       double get volume2 => readValue(#volume2);
-///       set volume2(double newValue) => writeValue(#volume2, newValue);
-///     }
-///
-/// **Important note**: the pattern using `readValue` and `writeValue`
-/// guarantees that reading the property will give you the latest value at any
-/// given time, even if change notifications have not been propagated.
-///
-/// We still support using @published on a field, but this will not
-/// provide the same guarantees, so this is discouraged. For example:
-///
-///       // Avoid this if possible. This will be available as an HTML
-///       // attribute too, but you might need to delay reading volume3
-///       // asynchronously to guarantee that you read the latest value
-///       // set through bindings.
-///       @published double volume3;
-const published = const PublishedProperty();
-
-/// An annotation used to publish a field as an attribute. See [published].
-class PublishedProperty extends ObservableProperty {
-  /// Whether the property value should be reflected back to the HTML attribute.
-  final bool reflect;
-
-  const PublishedProperty({this.reflect: false});
-}
-
-/// Use this type to observe a property and have the method be called when it
-/// changes. For example:
-///
-///     @ObserveProperty('foo.bar baz qux')
-///     validate() {
-///       // use this.foo.bar, this.baz, and this.qux in validation
-///       ...
-///     }
-///
-/// Note that you can observe a property path, and more than a single property
-/// can be specified in a space-delimited list or as a constant List.
-class ObserveProperty {
-  final _names;
-
-  List<String> get names {
-    var n = _names;
-    // TODO(jmesserly): the bogus '$n' is to workaround a dart2js bug, otherwise
-    // it generates an incorrect call site.
-    if (n is String) return '$n'.split(' ');
-    if (n is! Iterable) {
-      throw new UnsupportedError('ObserveProperty takes either an Iterable of '
-          'names, or a space separated String, instead of `$n`.');
-    }
-    return n;
-  }
-
-  const ObserveProperty(this._names);
-}
-
-/// Use this to create computed properties that are updated automatically. The
-/// annotation includes a polymer expression that describes how this property
-/// value can be expressed in terms of the values of other properties. For
-/// example:
-///
-///     class MyPlaybackElement extends PolymerElement {
-///       @observable int x;
-///
-///       // Reading xTimes2 will return x * 2.
-///       @ComputedProperty('x * 2')
-///       int get xTimes2 => readValue(#xTimes2);
-///
-/// If the polymer expression is assignable, you can also define a setter for
-/// it. For example:
-///
-///       // Reading c will return a.b, writing c will update a.b.
-///       @ComputedProperty('a.b')
-///       get c => readValue(#c);
-///       set c(newValue) => writeValue(#c, newValue);
-///
-/// The expression can do anything that is allowed in a polymer expresssion,
-/// even making calls to methods in your element. However, dependencies that are
-/// only used within those methods and that are not visible in the polymer
-/// expression, will not be observed. For example:
-///
-///       // Because `x` only appears inside method `m`, we will not notice
-///       // that `d` has changed if `x` is modified. However, `d` will be
-///       // updated whenever `c` changes.
-///       @ComputedProperty('m(c)')
-///       get d => readValue(#d);
-///
-///       m(c) => c + x;
-class ComputedProperty {
-  /// A polymer expression, evaluated in the context of the custom element where
-  /// this annotation is used.
-  final String expression;
-
-  const ComputedProperty(this.expression);
-}
-
-/// Base class for PolymerElements deriving from HtmlElement.
-///
-/// See [Polymer].
-class PolymerElement extends HtmlElement with Polymer, Observable {
-  PolymerElement.created() : super.created() {
-    polymerCreated();
-  }
-}
-
-/// The mixin class for Polymer elements. It provides convenience features on
-/// top of the custom elements web standard.
-///
-/// If this class is used as a mixin,
-/// you must call `polymerCreated()` from the body of your constructor.
-abstract class Polymer implements Element, Observable, NodeBindExtension {
-
-  // TODO(jmesserly): should this really be public?
-  /// Regular expression that matches data-bindings.
-  static final bindPattern = new RegExp(r'\{\{([^{}]*)}}');
-
-  /// Like [document.register] but for Polymer elements.
-  ///
-  /// Use the [name] to specify custom elment's tag name, for example:
-  /// "fancy-button" if the tag is used as `<fancy-button>`.
-  ///
-  /// The [type] is the type to construct. If not supplied, it defaults to
-  /// [PolymerElement].
-  // NOTE: this is called "element" in src/declaration/polymer-element.js, and
-  // exported as "Polymer".
-  static void register(String name, [Type type]) {
-    //console.log('registering [' + name + ']');
-    if (type == null) type = PolymerElement;
-
-    _typesByName[name] = type;
-
-    // Dart note: here we notify JS of the element registration. We don't pass
-    // the Dart type because we will handle that in PolymerDeclaration.
-    // See _hookJsPolymerDeclaration for how this is done.
-    PolymerJs.constructor.apply([name]);
-    (js.context['HTMLElement']['register'] as JsFunction)
-        .apply([name, js.context['HTMLElement']['prototype']]);
-  }
-
-  /// Register a custom element that has no associated `<polymer-element>`.
-  /// Unlike [register] this will always perform synchronous registration and
-  /// by the time this method returns the element will be available using
-  /// [document.createElement] or by modifying the HTML to include the element.
-  static void registerSync(String name, Type type,
-      {String extendsTag, Document doc, Node template}) {
-
-    // Our normal registration, this will queue up the name->type association.
-    register(name, type);
-
-    // Build a polymer-element and initialize it to register
-    if (doc == null) doc = document;
-    var poly = doc.createElement('polymer-element');
-    poly.attributes['name'] = name;
-    if (extendsTag != null) poly.attributes['extends'] = extendsTag;
-    if (template != null) poly.append(template);
-
-    // TODO(jmesserly): conceptually this is just:
-    //     new JsObject.fromBrowserObject(poly).callMethod('init')
-    //
-    // However doing it that way hits an issue with JS-interop in IE10: we get a
-    // JsObject that wraps something other than `poly`, due to improper caching.
-    // By reusing _polymerElementProto that we used for 'register', we can
-    // then call apply on it to invoke init() with the correct `this` pointer.
-    JsFunction init = _polymerElementProto['init'];
-    init.apply([], thisArg: poly);
-  }
-
-  // Warning for when people try to use `importElements` or `import`.
-  static const String _DYNAMIC_IMPORT_WARNING = 'Dynamically loading html '
-      'imports has very limited support right now in dart, see '
-      'http://dartbug.com/17873.';
-
-  /// Loads the set of HTMLImports contained in `node`. Returns a future that
-  /// resolves when all the imports have been loaded. This method can be used to
-  /// lazily load imports. For example, given a template:
-  ///
-  ///     <template>
-  ///       <link rel="import" href="my-import1.html">
-  ///       <link rel="import" href="my-import2.html">
-  ///     </template>
-  ///
-  ///     Polymer.importElements(template.content)
-  ///         .then((_) => print('imports lazily loaded'));
-  ///
-  /// Dart Note: This has very limited support in dart, http://dartbug.com/17873
-  // Dart Note: From src/lib/import.js For now proxy to the JS methods,
-  // because we want to share the loader with polymer.js for interop purposes.
-  static Future importElements(Node elementOrFragment) {
-    print(_DYNAMIC_IMPORT_WARNING);
-    return PolymerJs.importElements(elementOrFragment);
-  }
-
-  /// Loads an HTMLImport for each url specified in the `urls` array. Notifies
-  /// when all the imports have loaded by calling the `callback` function
-  /// argument. This method can be used to lazily load imports. For example,
-  /// For example,
-  ///
-  ///     Polymer.import(['my-import1.html', 'my-import2.html'])
-  ///         .then((_) => print('imports lazily loaded'));
-  ///
-  /// Dart Note: This has very limited support in dart, http://dartbug.com/17873
-  // Dart Note: From src/lib/import.js. For now proxy to the JS methods,
-  // because we want to share the loader with polymer.js for interop purposes.
-  static Future import(List urls) {
-    print(_DYNAMIC_IMPORT_WARNING);
-    return PolymerJs.import(urls);
-  }
-
-  /// Deprecated: Use `import` instead.
-  @deprecated
-  static Future importUrls(List urls) {
-    return import(urls);
-  }
-
-  /// Completes when polymer js is ready.
-  static final Completer _onReady = new Completer();
-
-  /// Completes when all initialization is done.
-  static final Completer _onInitDone = new Completer();
-
-  /// Future indicating that the Polymer library has been loaded and is ready
-  /// for use.
-  static Future get onReady =>
-      Future.wait([_onReady.future, _onInitDone.future]);
-
-  /// Returns a list of elements that have had polymer-elements created but
-  /// are not yet ready to register. The list is an array of element
-  /// definitions.
-  static List<Element> get waitingFor => PolymerJs.waitingFor;
-
-  /// Forces polymer to register any pending elements. Can be used to abort
-  /// waiting for elements that are partially defined.
-  static forceReady([int timeout]) => PolymerJs.forceReady(timeout);
-
-  /// The most derived `<polymer-element>` declaration for this element.
-  PolymerDeclaration get element => _element;
-  PolymerDeclaration _element;
-
-  /// Deprecated: use [element] instead.
-  @deprecated PolymerDeclaration get declaration => _element;
-
-  Map<String, StreamSubscription> _namedObservers;
-  List<Bindable> _observers = [];
-
-  bool _unbound; // lazy-initialized
-  PolymerJob _unbindAllJob;
-
-  CompoundObserver _propertyObserver;
-  bool _readied = false;
-
-  JsObject _jsElem;
-
-  /// Returns the object that should be used as the event controller for
-  /// event bindings in this element's template. If set, this will override the
-  /// normal controller lookup.
-  // TODO(jmesserly): we need to use a JS-writable property as our backing
-  // store, because of elements such as:
-  // https://github.com/Polymer/core-overlay/blob/eeb14853/core-overlay-layer.html#L78
-  get eventController => _jsElem['eventController'];
-  set eventController(value) {
-    _jsElem['eventController'] = value;
-  }
-
-  bool get hasBeenAttached => _hasBeenAttached;
-  bool _hasBeenAttached = false;
-
-  /// Gets the shadow root associated with the corresponding custom element.
-  ///
-  /// This is identical to [shadowRoot], unless there are multiple levels of
-  /// inheritance and they each have their own shadow root. For example,
-  /// this can happen if the base class and subclass both have `<template>` tags
-  /// in their `<polymer-element>` tags.
-  // TODO(jmesserly): should expose this as an immutable map.
-  // Similar issue as $.
-  final Map<String, ShadowRoot> shadowRoots =
-      new LinkedHashMap<String, ShadowRoot>();
-
-  /// Map of items in the shadow root(s) by their [Element.id].
-  // TODO(jmesserly): various issues:
-  // * wrap in UnmodifiableMapView?
-  // * should we have an object that implements noSuchMethod?
-  // * should the map have a key order (e.g. LinkedHash or SplayTree)?
-  // * should this be a live list? Polymer doesn't, maybe due to JS limitations?
-  // Note: this is observable to support $['someId'] being used in templates.
-  // The template is stamped before $ is populated, so we need observation if
-  // we want it to be usable in bindings.
-  final Map<String, dynamic> $ = new ObservableMap<String, dynamic>();
-
-  /// Use to override the default syntax for polymer-elements.
-  /// By default this will be null, which causes [instanceTemplate] to use
-  /// the template's bindingDelegate or the [element.syntax], in that order.
-  PolymerExpressions get syntax => null;
-
-  bool get _elementPrepared => _element != null;
-
-  /// Retrieves the custom element name. It should be used instead
-  /// of localName, see: https://github.com/Polymer/polymer-dev/issues/26
-  String get _name {
-    if (_element != null) return _element.name;
-    var isAttr = attributes['is'];
-    return (isAttr == null || isAttr == '') ? localName : isAttr;
-  }
-
-  /// By default the data bindings will be cleaned up when this custom element
-  /// is detached from the document. Overriding this to return `true` will
-  /// prevent that from happening.
-  bool get preventDispose => false;
-
-  /// Properties exposed by this element.
-  // Dart note: unlike Javascript we can't override the original property on
-  // the object, so we use this mechanism instead to define properties. See more
-  // details in [_PropertyAccessor].
-  Map<Symbol, _PropertyAccessor> _properties = {};
-
-  /// Helper to implement a property with the given [name]. This is used for
-  /// normal and computed properties. Normal properties can provide the initial
-  /// value using the [initialValue] function. Computed properties ignore
-  /// [initialValue], their value is derived from the expression in the
-  /// [ComputedProperty] annotation that appears above the getter that uses this
-  /// helper.
-  readValue(Symbol name, [initialValue()]) {
-    var property = _properties[name];
-    if (property == null) {
-      var value;
-      // Dart note: most computed properties are created in advance in
-      // createComputedProperties, but if one computed property depends on
-      // another, the declaration order might matter. Rather than trying to
-      // register them in order, we include here also the option of lazily
-      // creating the property accessor on the first read.
-      var binding = _getBindingForComputedProperty(name);
-      if (binding == null) {
-        // normal property
-        value = initialValue != null ? initialValue() : null;
-      } else {
-        value = binding.value;
-      }
-      property = _properties[name] = new _PropertyAccessor(name, this, value);
-    }
-    return property.value;
-  }
-
-  /// Helper to implement a setter of a property with the given [name] on a
-  /// polymer element. This can be used on normal properties and also on
-  /// computed properties, as long as the expression used for the computed
-  /// property is assignable (see [ComputedProperty]).
-  writeValue(Symbol name, newValue) {
-    var property = _properties[name];
-    if (property == null) {
-      // Note: computed properties are created in advance in
-      // createComputedProperties, so we should only need to create here
-      // non-computed properties.
-      property = _properties[name] = new _PropertyAccessor(name, this, null);
-    }
-    property.value = newValue;
-  }
-
-  /// If this class is used as a mixin, this method must be called from inside
-  /// of the `created()` constructor.
-  ///
-  /// If this class is a superclass, calling `super.created()` is sufficient.
-  void polymerCreated() {
-    var t = nodeBind(this).templateInstance;
-    if (t != null && t.model != null) {
-      window.console.warn('Attributes on $_name were data bound '
-          'prior to Polymer upgrading the element. This may result in '
-          'incorrect binding types.');
-    }
-    prepareElement();
-    if (!isTemplateStagingDocument(ownerDocument)) {
-      _makeElementReady();
-    }
-  }
-
-  /// *Deprecated* use [shadowRoots] instead.
-  @deprecated
-  ShadowRoot getShadowRoot(String customTagName) => shadowRoots[customTagName];
-
-  void prepareElement() {
-    if (_elementPrepared) {
-      window.console.warn('Element already prepared: $_name');
-      return;
-    }
-    _initJsObject();
-    // Dart note: get the corresponding <polymer-element> declaration.
-    _element = _getDeclaration(_name);
-    // install property storage
-    createPropertyObserver();
-    openPropertyObserver();
-    // install boilerplate attributes
-    copyInstanceAttributes();
-    // process input attributes
-    takeAttributes();
-    // add event listeners
-    addHostListeners();
-  }
-
-  /// Initialize JS interop for this element. For now we just initialize the
-  /// JsObject, but in the future we could also initialize JS APIs here.
-  _initJsObject() {
-    _jsElem = new JsObject.fromBrowserObject(this);
-  }
-
-  /// Deprecated: This is no longer a public method.
-  @deprecated
-  makeElementReady() => _makeElementReady();
-
-  _makeElementReady() {
-    if (_readied) return;
-    _readied = true;
-    createComputedProperties();
-
-    parseDeclarations(_element);
-    // NOTE: Support use of the `unresolved` attribute to help polyfill
-    // custom elements' `:unresolved` feature.
-    attributes.remove('unresolved');
-    // user entry point
-    _readyLog.info(() => '[$this]: ready');
-    ready();
-  }
-
-  /// Lifecycle method called when the element has populated it's `shadowRoot`,
-  /// prepared data-observation, and made itself ready for API interaction.
-  /// To wait until the element has been attached to the default view, use
-  /// [attached] or [domReady].
-  void ready() {}
-
-  /// Implement to access custom elements in dom descendants, ancestors,
-  /// or siblings. Because custom elements upgrade in document order,
-  /// elements accessed in `ready` or `attached` may not be upgraded. When
-  /// `domReady` is called, all registered custom elements are guaranteed
-  /// to have been upgraded.
-  void domReady() {}
-
-  void attached() {
-    if (!_elementPrepared) {
-      // Dart specific message for a common issue.
-      throw new StateError('polymerCreated was not called for custom element '
-          '$_name, this should normally be done in the .created() if Polymer '
-          'is used as a mixin.');
-    }
-
-    cancelUnbindAll();
-    if (!hasBeenAttached) {
-      _hasBeenAttached = true;
-      async((_) => domReady());
-    }
-  }
-
-  void detached() {
-    if (!preventDispose) asyncUnbindAll();
-  }
-
-  /// Walks the prototype-chain of this element and allows specific
-  /// classes a chance to process static declarations.
-  ///
-  /// In particular, each polymer-element has it's own `template`.
-  /// `parseDeclarations` is used to accumulate all element `template`s
-  /// from an inheritance chain.
-  ///
-  /// `parseDeclaration` static methods implemented in the chain are called
-  /// recursively, oldest first, with the `<polymer-element>` associated
-  /// with the current prototype passed as an argument.
-  ///
-  /// An element may override this method to customize shadow-root generation.
-  void parseDeclarations(PolymerDeclaration declaration) {
-    if (declaration != null) {
-      parseDeclarations(declaration.superDeclaration);
-      parseDeclaration(declaration.element);
-    }
-  }
-
-  /// Perform init-time actions based on static information in the
-  /// `<polymer-element>` instance argument.
-  ///
-  /// For example, the standard implementation locates the template associated
-  /// with the given `<polymer-element>` and stamps it into a shadow-root to
-  /// implement shadow inheritance.
-  ///
-  /// An element may override this method for custom behavior.
-  void parseDeclaration(Element elementElement) {
-    var template = fetchTemplate(elementElement);
-
-    if (template != null) {
-      var root = shadowFromTemplate(template);
-
-      var name = elementElement.attributes['name'];
-      if (name == null) return;
-      shadowRoots[name] = root;
-    }
-  }
-
-  /// Given a `<polymer-element>`, find an associated template (if any) to be
-  /// used for shadow-root generation.
-  ///
-  /// An element may override this method for custom behavior.
-  Element fetchTemplate(Element elementElement) =>
-      elementElement.querySelector('template');
-
-  /// Utility function that stamps a `<template>` into light-dom.
-  Node lightFromTemplate(Element template, [Node refNode]) {
-    if (template == null) return null;
-
-    // TODO(sorvell): mark this element as an event controller so that
-    // event listeners on bound nodes inside it will be called on it.
-    // Note, the expectation here is that events on all descendants
-    // should be handled by this element.
-    eventController = this;
-
-    // stamp template
-    // which includes parsing and applying MDV bindings before being
-    // inserted (to avoid {{}} in attribute values)
-    // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
-    var dom = instanceTemplate(template);
-    // append to shadow dom
-    if (refNode != null) {
-      append(dom);
-    } else {
-      insertBefore(dom, refNode);
-    }
-    // perform post-construction initialization tasks on ahem, light root
-    shadowRootReady(this);
-    // return the created shadow root
-    return dom;
-  }
-
-  /// Utility function that creates a shadow root from a `<template>`.
-  ///
-  /// The base implementation will return a [ShadowRoot], but you can replace it
-  /// with your own code and skip ShadowRoot creation. In that case, you should
-  /// return `null`.
-  ///
-  /// In your overridden method, you can use [instanceTemplate] to stamp the
-  /// template and initialize data binding, and [shadowRootReady] to intialize
-  /// other Polymer features like event handlers. It is fine to call
-  /// shadowRootReady with a node other than a ShadowRoot such as with `this`.
-  ShadowRoot shadowFromTemplate(Element template) {
-    if (template == null) return null;
-    // make a shadow root
-    var root = createShadowRoot();
-    // stamp template
-    // which includes parsing and applying MDV bindings before being
-    // inserted (to avoid {{}} in attribute values)
-    // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
-    var dom = instanceTemplate(template);
-    // append to shadow dom
-    root.append(dom);
-    // perform post-construction initialization tasks on shadow root
-    shadowRootReady(root);
-    // return the created shadow root
-    return root;
-  }
-
-  void shadowRootReady(Node root) {
-    // locate nodes with id and store references to them in this.$ hash
-    marshalNodeReferences(root);
-  }
-
-  /// Locate nodes with id and store references to them in [$] hash.
-  void marshalNodeReferences(Node root) {
-    if (root == null) return;
-    for (var n in (root as dynamic).querySelectorAll('[id]')) {
-      $[n.id] = n;
-    }
-  }
-
-  void attributeChanged(String name, String oldValue, String newValue) {
-    if (name != 'class' && name != 'style') {
-      attributeToProperty(name, newValue);
-    }
-  }
-
-  // TODO(jmesserly): this could be a top level method.
-  /// Returns a future when `node` changes, or when its children or subtree
-  /// changes.
-  ///
-  /// Use [MutationObserver] if you want to listen to a stream of changes.
-  Future<List<MutationRecord>> onMutation(Node node) {
-    var completer = new Completer();
-    new MutationObserver((mutations, observer) {
-      observer.disconnect();
-      completer.complete(mutations);
-    })..observe(node, childList: true, subtree: true);
-    return completer.future;
-  }
-
-  // copy attributes defined in the element declaration to the instance
-  // e.g. <polymer-element name="x-foo" tabIndex="0"> tabIndex is copied
-  // to the element instance here.
-  void copyInstanceAttributes() {
-    _element._instanceAttributes.forEach((name, value) {
-      attributes.putIfAbsent(name, () => value);
-    });
-  }
-
-  void takeAttributes() {
-    if (_element._publishLC == null) return;
-    attributes.forEach(attributeToProperty);
-  }
-
-  /// If attribute [name] is mapped to a property, deserialize
-  /// [value] into that property.
-  void attributeToProperty(String name, String value) {
-    // try to match this attribute to a property (attributes are
-    // all lower-case, so this is case-insensitive search)
-    var decl = propertyForAttribute(name);
-    if (decl == null) return;
-
-    // filter out 'mustached' values, these are to be
-    // replaced with bound-data and are not yet values
-    // themselves.
-    if (value == null || value.contains(Polymer.bindPattern)) return;
-
-    final currentValue = smoke.read(this, decl.name);
-
-    // deserialize Boolean or Number values from attribute
-    var type = decl.type;
-    if ((type == Object || type == dynamic) && currentValue != null) {
-      // Attempt to infer field type from the current value.
-      type = currentValue.runtimeType;
-    }
-    final newValue = deserializeValue(value, currentValue, type);
-
-    // only act if the value has changed
-    if (!identical(newValue, currentValue)) {
-      // install new value (has side-effects)
-      smoke.write(this, decl.name, newValue);
-    }
-  }
-
-  /// Return the published property matching name, or null.
-  // TODO(jmesserly): should we just return Symbol here?
-  smoke.Declaration propertyForAttribute(String name) {
-    final publishLC = _element._publishLC;
-    if (publishLC == null) return null;
-    return publishLC[name];
-  }
-
-  /// Convert representation of [value] based on [type] and [currentValue].
-  Object deserializeValue(String value, Object currentValue, Type type) =>
-      deserialize.deserializeValue(value, currentValue, type);
-
-  String serializeValue(Object value) {
-    if (value == null) return null;
-
-    if (value is bool) {
-      return _toBoolean(value) ? '' : null;
-    } else if (value is String || value is num) {
-      return '$value';
-    }
-    return null;
-  }
-
-  void reflectPropertyToAttribute(String path) {
-    // TODO(sjmiles): consider memoizing this
-    // try to intelligently serialize property value
-    final propValue = new PropertyPath(path).getValueFrom(this);
-    final serializedValue = serializeValue(propValue);
-    // boolean properties must reflect as boolean attributes
-    if (serializedValue != null) {
-      attributes[path] = serializedValue;
-      // TODO(sorvell): we should remove attr for all properties
-      // that have undefined serialization; however, we will need to
-      // refine the attr reflection system to achieve this; pica, for example,
-      // relies on having inferredType object properties not removed as
-      // attrs.
-    } else if (propValue is bool) {
-      attributes.remove(path);
-    }
-  }
-
-  /// Creates the document fragment to use for each instance of the custom
-  /// element, given the `<template>` node. By default this is equivalent to:
-  ///
-  ///     templateBind(template).createInstance(this, polymerSyntax);
-  ///
-  /// Where polymerSyntax is a singleton [PolymerExpressions] instance.
-  ///
-  /// You can override this method to change the instantiation behavior of the
-  /// template, for example to use a different data-binding syntax.
-  DocumentFragment instanceTemplate(Element template) {
-    // ensure template is decorated (lets things like <tr template ...> work)
-    TemplateBindExtension.decorate(template);
-    var syntax = this.syntax;
-    var t = templateBind(template);
-    if (syntax == null && t.bindingDelegate == null) {
-      syntax = element.syntax;
-    }
-    var dom = t.createInstance(this, syntax);
-    _observers.addAll(getTemplateInstanceBindings(dom));
-    return dom;
-  }
-
-  /// Called by TemplateBinding/NodeBind to setup a binding to the given
-  /// property. It's overridden here to support property bindings in addition to
-  /// attribute bindings that are supported by default.
-  Bindable bind(String name, bindable, {bool oneTime: false}) {
-    var decl = propertyForAttribute(name);
-    if (decl == null) {
-      // Cannot call super.bind because template_binding is its own package
-      return nodeBindFallback(this).bind(name, bindable, oneTime: oneTime);
-    } else {
-      // use n-way Polymer binding
-      var observer = bindProperty(decl.name, bindable, oneTime: oneTime);
-      // NOTE: reflecting binding information is typically required only for
-      // tooling. It has a performance cost so it's opt-in in Node.bind.
-      if (enableBindingsReflection && observer != null) {
-        // Dart note: this is not needed because of how _PolymerBinding works.
-        //observer.path = bindable.path_;
-        _recordBinding(name, observer);
-      }
-      var reflect = _element._reflect;
-
-      // Get back to the (possibly camel-case) name for the property.
-      var propName = smoke.symbolToName(decl.name);
-      if (reflect != null && reflect.contains(propName)) {
-        reflectPropertyToAttribute(propName);
-      }
-      return observer;
-    }
-  }
-
-  _recordBinding(String name, observer) {
-    if (bindings == null) bindings = {};
-    this.bindings[name] = observer;
-  }
-
-  /// Called by TemplateBinding when all bindings on an element have been
-  /// executed. This signals that all element inputs have been gathered and it's
-  /// safe to ready the element, create shadow-root and start data-observation.
-  bindFinished() => _makeElementReady();
-
-  Map<String, Bindable> get bindings => nodeBindFallback(this).bindings;
-  set bindings(Map value) {
-    nodeBindFallback(this).bindings = value;
-  }
-
-  TemplateInstance get templateInstance =>
-      nodeBindFallback(this).templateInstance;
-
-  /// Called at detached time to signal that an element's bindings should be
-  /// cleaned up. This is done asynchronously so that users have the chance to
-  /// call `cancelUnbindAll` to prevent unbinding.
-  void asyncUnbindAll() {
-    if (_unbound == true) return;
-    _unbindLog.fine(() => '[$_name] asyncUnbindAll');
-    _unbindAllJob = scheduleJob(_unbindAllJob, unbindAll);
-  }
-
-  /// This method should rarely be used and only if `cancelUnbindAll` has been
-  /// called to prevent element unbinding. In this case, the element's bindings
-  /// will not be automatically cleaned up and it cannot be garbage collected by
-  /// by the system. If memory pressure is a concern or a large amount of
-  /// elements need to be managed in this way, `unbindAll` can be called to
-  /// deactivate the element's bindings and allow its memory to be reclaimed.
-  void unbindAll() {
-    if (_unbound == true) return;
-    closeObservers();
-    closeNamedObservers();
-    _unbound = true;
-  }
-
-  //// Call in `detached` to prevent the element from unbinding when it is
-  //// detached from the dom. The element is unbound as a cleanup step that
-  //// allows its memory to be reclaimed. If `cancelUnbindAll` is used, consider
-  /// calling `unbindAll` when the element is no longer needed. This will allow
-  /// its memory to be reclaimed.
-  void cancelUnbindAll() {
-    if (_unbound == true) {
-      _unbindLog
-          .warning(() => '[$_name] already unbound, cannot cancel unbindAll');
-      return;
-    }
-    _unbindLog.fine(() => '[$_name] cancelUnbindAll');
-    if (_unbindAllJob != null) {
-      _unbindAllJob.stop();
-      _unbindAllJob = null;
-    }
-  }
-
-  static void _forNodeTree(Node node, void callback(Node node)) {
-    if (node == null) return;
-
-    callback(node);
-    for (var child = node.firstChild; child != null; child = child.nextNode) {
-      _forNodeTree(child, callback);
-    }
-  }
-
-  /// Creates a CompoundObserver to observe property changes.
-  /// NOTE, this is only done if there are any properties in the `_observe`
-  /// object.
-  void createPropertyObserver() {
-    final observe = _element._observe;
-    if (observe != null) {
-      var o = _propertyObserver = new CompoundObserver();
-      // keep track of property observer so we can shut it down
-      _observers.add(o);
-
-      for (var path in observe.keys) {
-        o.addPath(this, path);
-
-        // TODO(jmesserly): on the Polymer side it doesn't look like they
-        // will observe arrays unless it is a length == 1 path.
-        observeArrayValue(path, path.getValueFrom(this), null);
-      }
-    }
-  }
-
-  /// Start observing property changes.
-  void openPropertyObserver() {
-    if (_propertyObserver != null) {
-      _propertyObserver.open(notifyPropertyChanges);
-    }
-
-    // Dart note: we need an extra listener only to continue supporting
-    // @published properties that follow the old syntax until we get rid of it.
-    // This workaround has timing issues so we prefer the new, not so nice,
-    // syntax.
-    if (_element._publish != null) {
-      changes.listen(_propertyChangeWorkaround);
-    }
-  }
-
-  /// Handler for property changes; routes changes to observing methods.
-  /// Note: array valued properties are observed for array splices.
-  void notifyPropertyChanges(List newValues, Map oldValues, List paths) {
-    final observe = _element._observe;
-    final called = new HashSet();
-
-    oldValues.forEach((i, oldValue) {
-      final newValue = newValues[i];
-
-      // Date note: we don't need any special checking for null and undefined.
-
-      // note: paths is of form [object, path, object, path]
-      final path = paths[2 * i + 1];
-      if (observe == null) return;
-
-      var methods = observe[path];
-      if (methods == null) return;
-
-      for (var method in methods) {
-        if (!called.add(method)) continue; // don't invoke more than once.
-
-        observeArrayValue(path, newValue, oldValue);
-        // Dart note: JS passes "arguments", so we pass along our args.
-        // TODO(sorvell): call method with the set of values it's expecting;
-        // e.g. 'foo bar': 'invalidate' expects the new and old values for
-        // foo and bar. Currently we give only one of these and then
-        // deliver all the arguments.
-        smoke.invoke(
-            this, method, [oldValue, newValue, newValues, oldValues, paths],
-            adjust: true);
-      }
-    });
-  }
-
-  /// Force any pending property changes to synchronously deliver to handlers
-  /// specified in the `observe` object.
-  /// Note: normally changes are processed at microtask time.
-  ///
-  // Dart note: had to rename this to avoid colliding with
-  // Observable.deliverChanges. Even worse, super calls aren't possible or
-  // it prevents Polymer from being a mixin, so we can't override it even if
-  // we wanted to.
-  void deliverPropertyChanges() {
-    if (_propertyObserver != null) {
-      _propertyObserver.deliver();
-    }
-  }
-
-  // Dart note: this workaround is only for old-style @published properties,
-  // which have timing issues. See _bindOldStylePublishedProperty below.
-  // TODO(sigmund): deprecate this.
-  void _propertyChangeWorkaround(List<ChangeRecord> records) {
-    for (var record in records) {
-      if (record is! PropertyChangeRecord) continue;
-
-      var name = record.name;
-      // The setter of a new-style property will create an accessor in
-      // _properties[name]. We can skip the workaround for those properties.
-      if (_properties[name] != null) continue;
-      _propertyChange(name, record.newValue, record.oldValue);
-    }
-  }
-
-  void _propertyChange(Symbol nameSymbol, newValue, oldValue) {
-    _watchLog.info(
-        () => '[$this]: $nameSymbol changed from: $oldValue to: $newValue');
-    var name = smoke.symbolToName(nameSymbol);
-    var reflect = _element._reflect;
-    if (reflect != null && reflect.contains(name)) {
-      reflectPropertyToAttribute(name);
-    }
-  }
-
-  void observeArrayValue(PropertyPath name, Object value, Object old) {
-    final observe = _element._observe;
-    if (observe == null) return;
-
-    // we only care if there are registered side-effects
-    var callbacks = observe[name];
-    if (callbacks == null) return;
-
-    // if we are observing the previous value, stop
-    if (old is ObservableList) {
-      _observeLog.fine(() => '[$_name] observeArrayValue: unregister $name');
-
-      closeNamedObserver('${name}__array');
-    }
-    // if the new value is an array, begin observing it
-    if (value is ObservableList) {
-      _observeLog.fine(() => '[$_name] observeArrayValue: register $name');
-      var sub = value.listChanges.listen((changes) {
-        for (var callback in callbacks) {
-          smoke.invoke(this, callback, [changes], adjust: true);
-        }
-      });
-      registerNamedObserver('${name}__array', sub);
-    }
-  }
-
-  emitPropertyChangeRecord(Symbol name, newValue, oldValue) {
-    if (identical(oldValue, newValue)) return;
-    _propertyChange(name, newValue, oldValue);
-  }
-
-  bindToAccessor(Symbol name, Bindable bindable, {resolveBindingValue: false}) {
-    // Dart note: our pattern is to declare the initial value in the getter.  We
-    // read it via smoke to ensure that the value is initialized correctly.
-    var oldValue = smoke.read(this, name);
-    var property = _properties[name];
-    if (property == null) {
-      // We know that _properties[name] is null only for old-style @published
-      // properties. This fallback is here to make it easier to deprecate the
-      // old-style of published properties, which have bad timing guarantees
-      // (see comment in _PolymerBinding).
-      return _bindOldStylePublishedProperty(name, bindable, oldValue);
-    }
-
-    property.bindable = bindable;
-    var value = bindable.open(property.updateValue);
-
-    if (resolveBindingValue) {
-      // capture A's value if B's value is null or undefined,
-      // otherwise use B's value
-      var v = (value == null ? oldValue : value);
-      if (!identical(value, oldValue)) {
-        bindable.value = value = v;
-      }
-    }
-
-    property.updateValue(value);
-    var o = new _CloseOnlyBinding(property);
-    _observers.add(o);
-    return o;
-  }
-
-  // Dart note: this fallback uses our old-style binding mechanism to be able to
-  // link @published properties with bindings. This mechanism is backwards from
-  // what Javascript does because we can't override the original property. This
-  // workaround also brings some timing issues which are described in detail in
-  // dartbug.com/18343.
-  // TODO(sigmund): deprecate old-style @published properties.
-  _bindOldStylePublishedProperty(Symbol name, Bindable bindable, oldValue) {
-    // capture A's value if B's value is null or undefined,
-    // otherwise use B's value
-    if (bindable.value == null) bindable.value = oldValue;
-
-    var o = new _PolymerBinding(this, name, bindable);
-    _observers.add(o);
-    return o;
-  }
-
-  _getBindingForComputedProperty(Symbol name) {
-    var exprString = element._computed[name];
-    if (exprString == null) return null;
-    var expr = PolymerExpressions.getExpression(exprString);
-    return PolymerExpressions.getBinding(expr, this,
-        globals: element.syntax.globals);
-  }
-
-  createComputedProperties() {
-    var computed = this.element._computed;
-    for (var name in computed.keys) {
-      try {
-        // Dart note: this is done in Javascript by modifying the prototype in
-        // declaration/properties.js, we can't do that, so we do it here.
-        var binding = _getBindingForComputedProperty(name);
-
-        // Follow up note: ideally we would only create the accessor object
-        // here, but some computed properties might depend on others and
-        // evaluating `binding.value` could try to read the value of another
-        // computed property that we haven't created yet. For this reason we
-        // also allow to also create the accessor in [readValue].
-        if (_properties[name] == null) {
-          _properties[name] = new _PropertyAccessor(name, this, binding.value);
-        }
-        bindToAccessor(name, binding);
-      } catch (e) {
-        window.console.error('Failed to create computed property $name'
-            ' (${computed[name]}): $e');
-      }
-    }
-  }
-
-  // Dart note: to simplify the code above we made registerObserver calls
-  // directly invoke _observers.add/addAll.
-  void closeObservers() {
-    for (var o in _observers) {
-      if (o != null) o.close();
-    }
-    _observers = [];
-  }
-
-  /// Bookkeeping observers for memory management.
-  void registerNamedObserver(String name, StreamSubscription sub) {
-    if (_namedObservers == null) {
-      _namedObservers = new Map<String, StreamSubscription>();
-    }
-    _namedObservers[name] = sub;
-  }
-
-  bool closeNamedObserver(String name) {
-    var sub = _namedObservers.remove(name);
-    if (sub == null) return false;
-    sub.cancel();
-    return true;
-  }
-
-  void closeNamedObservers() {
-    if (_namedObservers == null) return;
-    for (var sub in _namedObservers.values) {
-      if (sub != null) sub.cancel();
-    }
-    _namedObservers.clear();
-    _namedObservers = null;
-  }
-
-  /// Bind the [name] property in this element to [bindable]. *Note* in Dart it
-  /// is necessary to also define the field:
-  ///
-  ///     var myProperty;
-  ///
-  ///     ready() {
-  ///       super.ready();
-  ///       bindProperty(#myProperty,
-  ///           new PathObserver(this, 'myModel.path.to.otherProp'));
-  ///     }
-  Bindable bindProperty(Symbol name, bindableOrValue, {oneTime: false}) {
-    // Dart note: normally we only reach this code when we know it's a
-    // property, but if someone uses bindProperty directly they might get a
-    // NoSuchMethodError either from the getField below, or from the setField
-    // inside PolymerBinding. That doesn't seem unreasonable, but it's a slight
-    // difference from Polymer.js behavior.
-
-    _bindLog.fine(() => 'bindProperty: [$bindableOrValue] to [$_name].[$name]');
-
-    if (oneTime) {
-      if (bindableOrValue is Bindable) {
-        _bindLog.warning(() =>
-            'bindProperty: expected non-bindable value n a one-time binding to '
-            '[$_name].[$name], but found $bindableOrValue.');
-      }
-      smoke.write(this, name, bindableOrValue);
-      return null;
-    }
-
-    return bindToAccessor(name, bindableOrValue, resolveBindingValue: true);
-  }
-
-  /// Attach event listeners on the host (this) element.
-  void addHostListeners() {
-    var events = _element._eventDelegates;
-    if (events.isEmpty) return;
-
-    _eventsLog.fine(() => '[$_name] addHostListeners: $events');
-
-    // NOTE: host events look like bindings but really are not;
-    // (1) we don't want the attribute to be set and (2) we want to support
-    // multiple event listeners ('host' and 'instance') and Node.bind
-    // by default supports 1 thing being bound.
-    events.forEach((type, methodName) {
-      // Dart note: the getEventHandler method is on our PolymerExpressions.
-      PolymerGesturesJs.addEventListener(
-          this, type,
-          Zone.current.bindUnaryCallback(
-              element.syntax.getEventHandler(this, this, methodName)));
-    });
-  }
-
-  /// Calls [methodOrCallback] with [args] if it is a closure, otherwise, treat
-  /// it as a method name in [object], and invoke it.
-  void dispatchMethod(object, callbackOrMethod, List args) {
-    _eventsLog.info(() => '>>> [$_name]: dispatch $callbackOrMethod');
-
-    if (callbackOrMethod is Function) {
-      int maxArgs = smoke.maxArgs(callbackOrMethod);
-      if (maxArgs == -1) {
-        _eventsLog.warning(
-            'invalid callback: expected callback of 0, 1, 2, or 3 arguments');
-      }
-      args.length = maxArgs;
-      Function.apply(callbackOrMethod, args);
-    } else if (callbackOrMethod is String) {
-      smoke.invoke(object, smoke.nameToSymbol(callbackOrMethod), args,
-          adjust: true);
-    } else {
-      _eventsLog.warning('invalid callback');
-    }
-
-    _eventsLog.fine(() => '<<< [$_name]: dispatch $callbackOrMethod');
-  }
-
-  /// Call [methodName] method on this object with [args].
-  invokeMethod(Symbol methodName, List args) =>
-      smoke.invoke(this, methodName, args, adjust: true);
-
-  /// Invokes a function asynchronously.
-  /// This will call `Polymer.flush()` and then return a `new Timer`
-  /// with the provided [method] and [timeout].
-  ///
-  /// If you would prefer to run the callback using
-  /// [window.requestAnimationFrame], see the [async] method.
-  ///
-  /// To cancel, call [Timer.cancel] on the result of this method.
-  Timer asyncTimer(void method(), Duration timeout) {
-    // Dart note: "async" is split into 2 methods so it can have a sensible type
-    // signatures. Also removed the various features that don't make sense in a
-    // Dart world, like binding to "this" and taking arguments list.
-
-    // when polyfilling Object.observe, ensure changes
-    // propagate before executing the async method
-    scheduleMicrotask(Observable.dirtyCheck);
-    PolymerJs.flush(); // for polymer-js interop
-    return new Timer(timeout, method);
-  }
-
-  /// Invokes a function asynchronously. The context of the callback function is
-  /// function is bound to 'this' automatically. Returns a handle which may be
-  /// passed to cancelAsync to cancel the asynchronous call.
-  ///
-  /// If you would prefer to run the callback after a given duration, see
-  /// the [asyncTimer] method.
-  ///
-  /// If you would like to cancel this, use [cancelAsync].
-  int async(RequestAnimationFrameCallback method) {
-    // when polyfilling Object.observe, ensure changes
-    // propagate before executing the async method
-    scheduleMicrotask(Observable.dirtyCheck);
-    PolymerJs.flush(); // for polymer-js interop
-    return window.requestAnimationFrame(method);
-  }
-
-  /// Cancel an operation scheduled by [async].
-  void cancelAsync(int id) => window.cancelAnimationFrame(id);
-
-  /// Fire a [CustomEvent] targeting [onNode], or `this` if onNode is not
-  /// supplied. Returns the new event.
-  CustomEvent fire(String type,
-      {Object detail, Node onNode, bool canBubble, bool cancelable}) {
-    var node = onNode != null ? onNode : this;
-    var event = new CustomEvent(type,
-        canBubble: canBubble != null ? canBubble : true,
-        cancelable: cancelable != null ? cancelable : true,
-        detail: detail);
-    node.dispatchEvent(event);
-    return event;
-  }
-
-  /// Fire an event asynchronously. See [async] and [fire].
-  asyncFire(String type, {Object detail, Node toNode, bool canBubble}) {
-    // TODO(jmesserly): I'm not sure this method adds much in Dart, it's easy to
-    // add "() =>"
-    async((x) =>
-        fire(type, detail: detail, onNode: toNode, canBubble: canBubble));
-  }
-
-  /// Remove [className] from [old], add class to [anew], if they exist.
-  void classFollows(Element anew, Element old, String className) {
-    if (old != null) {
-      old.classes.remove(className);
-    }
-    if (anew != null) {
-      anew.classes.add(className);
-    }
-  }
-
-  /// Installs external stylesheets and <style> elements with the attribute
-  /// polymer-scope='controller' into the scope of element. This is intended
-  /// to be called during custom element construction.
-  void installControllerStyles() {
-    var scope = findStyleScope();
-    if (scope != null && !scopeHasNamedStyle(scope, localName)) {
-      // allow inherited controller styles
-      var decl = _element;
-      var cssText = new StringBuffer();
-      while (decl != null) {
-        cssText.write(decl.cssTextForScope(_STYLE_CONTROLLER_SCOPE));
-        decl = decl.superDeclaration;
-      }
-      if (cssText.isNotEmpty) {
-        installScopeCssText('$cssText', scope);
-      }
-    }
-  }
-
-  void installScopeStyle(style, [String name, Node scope]) {
-    if (scope == null) scope = findStyleScope();
-    if (name == null) name = '';
-
-    if (scope != null && !scopeHasNamedStyle(scope, '$_name$name')) {
-      var cssText = new StringBuffer();
-      if (style is Iterable) {
-        for (var s in style) {
-          cssText
-            ..writeln(s.text)
-            ..writeln();
-        }
-      } else {
-        cssText = (style as Node).text;
-      }
-      installScopeCssText('$cssText', scope, name);
-    }
-  }
-
-  void installScopeCssText(String cssText, [Node scope, String name]) {
-    if (scope == null) scope = findStyleScope();
-    if (name == null) name = '';
-
-    if (scope == null) return;
-
-    if (_hasShadowDomPolyfill) {
-      cssText = _shimCssText(cssText, scope is ShadowRoot ? scope.host : null);
-    }
-    var style = element.cssTextToScopeStyle(cssText, _STYLE_CONTROLLER_SCOPE);
-    applyStyleToScope(style, scope);
-    // cache that this style has been applied
-    styleCacheForScope(scope).add('$_name$name');
-  }
-
-  Node findStyleScope([node]) {
-    // find the shadow root that contains this element
-    var n = node;
-    if (n == null) n = this;
-    while (n.parentNode != null) {
-      n = n.parentNode;
-    }
-    return n;
-  }
-
-  bool scopeHasNamedStyle(Node scope, String name) =>
-      styleCacheForScope(scope).contains(name);
-
-  Map _polyfillScopeStyleCache = {};
-
-  Set styleCacheForScope(Node scope) {
-    var styles;
-    if (_hasShadowDomPolyfill) {
-      var name = scope is ShadowRoot
-          ? scope.host.localName
-          : (scope as Element).localName;
-      var styles = _polyfillScopeStyleCache[name];
-      if (styles == null) _polyfillScopeStyleCache[name] = styles = new Set();
-    } else {
-      styles = _scopeStyles[scope];
-      if (styles == null) _scopeStyles[scope] = styles = new Set();
-    }
-    return styles;
-  }
-
-  static final _scopeStyles = new Expando();
-
-  static String _shimCssText(String cssText, [Element host]) {
-    var name = '';
-    var is_ = false;
-    if (host != null) {
-      name = host.localName;
-      is_ = host.attributes.containsKey('is');
-    }
-    var selector = _ShadowCss.callMethod('makeScopeSelector', [name, is_]);
-    return _ShadowCss.callMethod('shimCssText', [cssText, selector]);
-  }
-
-  static void applyStyleToScope(StyleElement style, Node scope) {
-    if (style == null) return;
-
-    if (scope == document) scope = document.head;
-
-    if (_hasShadowDomPolyfill) scope = document.head;
-
-    // TODO(sorvell): necessary for IE
-    // see https://connect.microsoft.com/IE/feedback/details/790212/
-    // cloning-a-style-element-and-adding-to-document-produces
-    // -unexpected-result#details
-    // var clone = style.cloneNode(true);
-    var clone = new StyleElement()..text = style.text;
-
-    var attr = style.attributes[_STYLE_SCOPE_ATTRIBUTE];
-    if (attr != null) {
-      clone.attributes[_STYLE_SCOPE_ATTRIBUTE] = attr;
-    }
-
-    // TODO(sorvell): probably too brittle; try to figure out
-    // where to put the element.
-    var refNode = scope.firstChild;
-    if (scope == document.head) {
-      var selector = 'style[$_STYLE_SCOPE_ATTRIBUTE]';
-      var styleElement = document.head.querySelectorAll(selector);
-      if (styleElement.isNotEmpty) {
-        refNode = styleElement.last.nextElementSibling;
-      }
-    }
-    scope.insertBefore(clone, refNode);
-  }
-
-  /// Invoke [callback] in [wait], unless the job is re-registered,
-  /// which resets the timer. If [wait] is not supplied, this will use
-  /// [window.requestAnimationFrame] instead of a [Timer].
-  ///
-  /// For example:
-  ///
-  ///     _myJob = Polymer.scheduleJob(_myJob, callback);
-  ///
-  /// Returns the newly created job.
-  // Dart note: renamed to scheduleJob to be a bit more consistent with Dart.
-  PolymerJob scheduleJob(PolymerJob job, void callback(), [Duration wait]) {
-    if (job == null) job = new PolymerJob._();
-    // Dart note: made start smarter, so we don't need to call stop.
-    return job..start(callback, wait);
-  }
-
-  // Deprecated: Please use injectBoundHtml.
-  @deprecated
-  DocumentFragment injectBoundHTML(String html, [Element element]) =>
-      injectBoundHtml(html, element: element);
-
-  /// Inject HTML which contains markup bound to this element into
-  /// a target element (replacing target element content).
-  DocumentFragment injectBoundHtml(String html, {Element element,
-      NodeValidator validator, NodeTreeSanitizer treeSanitizer}) {
-    var template = new TemplateElement()
-      ..setInnerHtml(html, validator: validator, treeSanitizer: treeSanitizer);
-    var fragment = this.instanceTemplate(template);
-    if (element != null) {
-      element.text = '';
-      element.append(fragment);
-    }
-    return fragment;
-  }
-}
-
-// Dart note: this is related to _bindOldStylePublishedProperty. Polymer
-// addresses n-way bindings by metaprogramming: redefine the property on the
-// PolymerElement instance to always get its value from the model@path. This is
-// supported in Dart using a new style of @published property declaration using
-// the `readValue` and `writeValue` methods above. In the past we used to work
-// around this by listening to changes on both sides and updating the values.
-// This object provides the hooks to do this.
-// TODO(sigmund,jmesserly): delete after a deprecation period.
-class _PolymerBinding extends Bindable {
-  final Polymer _target;
-  final Symbol _property;
-  final Bindable _bindable;
-  StreamSubscription _sub;
-  Object _lastValue;
-
-  _PolymerBinding(this._target, this._property, this._bindable) {
-    _sub = _target.changes.listen(_propertyValueChanged);
-    _updateNode(open(_updateNode));
-  }
-
-  void _updateNode(newValue) {
-    _lastValue = newValue;
-    smoke.write(_target, _property, newValue);
-    // Note: we don't invoke emitPropertyChangeRecord here because that's
-    // done by listening on changes on the PolymerElement.
-  }
-
-  void _propertyValueChanged(List<ChangeRecord> records) {
-    for (var record in records) {
-      if (record is PropertyChangeRecord && record.name == _property) {
-        final newValue = smoke.read(_target, _property);
-        if (!identical(_lastValue, newValue)) {
-          this.value = newValue;
-        }
-        return;
-      }
-    }
-  }
-
-  open(callback(value)) => _bindable.open(callback);
-  get value => _bindable.value;
-  set value(newValue) => _bindable.value = newValue;
-
-  void close() {
-    if (_sub != null) {
-      _sub.cancel();
-      _sub = null;
-    }
-    _bindable.close();
-  }
-}
-
-// Ported from an inline object in instance/properties.js#bindToAccessor.
-class _CloseOnlyBinding extends Bindable {
-  final _PropertyAccessor accessor;
-
-  _CloseOnlyBinding(this.accessor);
-
-  open(callback) {}
-  get value => null;
-  set value(newValue) {}
-  deliver() {}
-
-  void close() {
-    if (accessor.bindable == null) return;
-    accessor.bindable.close();
-    accessor.bindable = null;
-  }
-}
-
-bool _toBoolean(value) => null != value && false != value;
-
-final Logger _observeLog = new Logger('polymer.observe');
-final Logger _eventsLog = new Logger('polymer.events');
-final Logger _unbindLog = new Logger('polymer.unbind');
-final Logger _bindLog = new Logger('polymer.bind');
-final Logger _watchLog = new Logger('polymer.watch');
-final Logger _readyLog = new Logger('polymer.ready');
-
-final Expando _eventHandledTable = new Expando<Set<Node>>();
diff --git a/packages/polymer/lib/src/job.dart b/packages/polymer/lib/src/job.dart
deleted file mode 100644
index aa22f47..0000000
--- a/packages/polymer/lib/src/job.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer;
-
-/// Like [Timer] but can be restarted, and if no duration is supplied uses
-/// [window.requestAnimationFrame] instead of a 0-duration timer.
-// TODO(jmesserly): need to find a better name here. Also this feels more like a
-// system level API, but doesn't map exactly to any of our other primitives.
-class PolymerJob {
-  Function _callback;
-  Timer _timer;
-  int _id; // for requestAnimationFrame
-
-  PolymerJob._();
-
-  bool get isScheduled => _timer != null || _id != null;
-
-  /// Starts the job. If the job is already running, it will [stop] first.
-  void start(void callback(), [Duration wait]) {
-    stop();
-    _callback = callback;
-    if (wait == null) {
-      _id = window.requestAnimationFrame((_) => complete());
-    } else {
-      _timer = new Timer(wait, complete);
-    }
-  }
-
-  /// Stops the job. It can be restarted by calling [start] with a new callback.
-  void stop() {
-    if (_id != null) {
-      window.cancelAnimationFrame(_id);
-      _id = null;
-    }
-    if (_timer != null) {
-      _timer.cancel();
-      _timer = null;
-    }
-  }
-
-  /// Synchronously completes the job.
-  void complete() {
-    if (isScheduled) {
-      stop();
-      _callback();
-    }
-  }
-}
diff --git a/packages/polymer/lib/src/loader.dart b/packages/polymer/lib/src/loader.dart
deleted file mode 100644
index fb5e87f..0000000
--- a/packages/polymer/lib/src/loader.dart
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer;
-
-/// Initializes a polymer application as follows:
-///   * if running in development mode, set up a dirty-checking zone that polls
-///     for observable changes
-///   * initialize template binding and polymer-element
-///   * for each library included transitively from HTML and HTML imports,
-///   register custom elements declared there (labeled with [CustomTag]) and
-///   invoke the initialization method on it (top-level functions annotated with
-///   [initMethod]).
-Future<Zone> initPolymer() {
-  _initializeLogging();
-  if (_deployMode) {
-    return startPolymer().then((_) => Zone.current);
-  }
-  return dirtyCheckZone()
-      .run(() => startPolymer().then((_) => dirtyCheckZone()));
-}
-
-bool _startPolymerCalled = false;
-
-/// Starts polymer by hooking the polymer.js code. **Note**: this function is
-/// not meant to be invoked directly by application developers. It is invoked
-/// by [initPolymer].
-Future startPolymer() {
-  // First wait for all html imports to finish, then run the rest of the
-  // initializers.
-  return initWebComponents(initAll: false).then((_) {
-    // Polymer js is now loaded, hook it before running @CustomTag annotations.
-    if (_startPolymerCalled) throw 'Initialization was already done.';
-    _startPolymerCalled = true;
-    _hookJsPolymer();
-  }).then((_) => initWebComponents()).then((_) {
-    Polymer.registerSync('auto-binding-dart', AutoBindingElement,
-        extendsTag: 'template');
-
-    _watchWaitingFor();
-    Polymer._onInitDone.complete();
-  });
-}
-
-/// Configures [initPolymer] making it optimized for deployment to the internet.
-/// Additionally, after this method is called [initPolymer] omits the [Zone]
-/// that automatically invokes [Observable.dirtyCheck].
-void configureForDeployment() {
-  _deployMode = true;
-}
-
-/// To ensure Dart can interoperate with polymer-element registered by
-/// polymer.js, we need to be able to execute Dart code if we are registering
-/// a Dart class for that element. We trigger Dart logic by patching
-/// polymer-element's register function and:
-///
-/// * if it has a Dart class, run PolymerDeclaration's register.
-/// * otherwise it is a JS prototype, run polymer-element's normal register.
-void _hookJsPolymer() {
-  if (!PolymerJs.checkExists()) {
-    throw new StateError('An error occurred initializing polymer, (could not'
-        'find polymer js). Please file a bug at '
-        'https://github.com/dart-lang/polymer-dart/issues/new.');
-  }
-
-  // TODO(jmesserly): dart:js appears to not callback in the correct zone:
-  // https://code.google.com/p/dart/issues/detail?id=17301
-  var zone = Zone.current;
-
-  PolymerJs.whenPolymerReady(() => Polymer._onReady.complete());
-
-  JsFunction originalRegister = _polymerElementProto['register'];
-  if (originalRegister == null) {
-    throw new StateError('polymer.js must expose "register" function on '
-        'polymer-element to enable polymer.dart to interoperate.');
-  }
-
-  registerDart(jsElem, String name, String extendee) {
-    // By the time we get here, we'll know for sure if it is a Dart object
-    // or not, because polymer-element will wait for us to notify that
-    // the @CustomTag was found.
-    final type = _getRegisteredType(name);
-    if (type != null) {
-      final extendsDecl = _getDeclaration(extendee);
-      return zone.run(() =>
-          new PolymerDeclaration(jsElem, name, type, extendsDecl).register());
-    }
-    // It's a JavaScript polymer element, fall back to the original register.
-    return originalRegister.apply([name, extendee], thisArg: jsElem);
-  }
-
-  _polymerElementProto['register'] = new JsFunction.withThis(registerDart);
-}
-
-// Note: we cache this so we can use it later to look up 'init'.
-// See registerSync.
-JsObject _polymerElementProto = () {
-  var polyElem = document.createElement('polymer-element');
-  var proto = new JsObject.fromBrowserObject(polyElem)['__proto__'];
-  if (proto is Node) proto = new JsObject.fromBrowserObject(proto);
-  return proto;
-}();
-
-// Add support for the polymer js style of enabling logging. The global logging
-// level is respected for specified loggers (see http://goo.gl/btfDe1). All
-// other loggers will be set to [Level.OFF]. Logs will also be printed to the
-// console automatically if any are supplied.
-void _initializeLogging() {
-  hierarchicalLoggingEnabled = true;
-  var webComponents = js.context['WebComponents'];
-  var logFlags = (webComponents == null || webComponents['flags'] == null)
-      ? {}
-      : webComponents['flags']['log'];
-  if (logFlags == null) logFlags = {};
-  var loggers = [
-    _observeLog,
-    _eventsLog,
-    _unbindLog,
-    _bindLog,
-    _watchLog,
-    _readyLog
-  ];
-  var polymerLogger = new Logger('polymer');
-
-  // If no loggers specified then disable globally and return.
-  if (!loggers.any((logger) => logFlags[logger.name] == true)) {
-    polymerLogger.level = Level.OFF;
-    return;
-  }
-
-  // Disable the loggers that were not specified.
-  loggers.where((logger) => logFlags[logger.name] != true).forEach((logger) {
-    logger.level = Level.OFF;
-  });
-
-  // Listen to the polymer logs and print them to the console.
-  polymerLogger.onRecord.listen((rec) {
-    print(rec);
-  });
-}
-
-/// Watches the waitingFor queue and if it fails to make progress then prints
-/// a message to the console.
-void _watchWaitingFor() {
-  int lastWaiting = Polymer.waitingFor.length;
-  int lastAlert;
-  new Timer.periodic(new Duration(seconds: 1), (Timer timer) {
-    var waiting = Polymer.waitingFor;
-    // Done, cancel timer.
-    if (waiting.isEmpty) {
-      timer.cancel();
-      return;
-    }
-    // Made progress, don't alert.
-    if (waiting.length != lastWaiting) {
-      lastWaiting = waiting.length;
-      return;
-    }
-    // Only alert once per waiting state.
-    if (lastAlert == lastWaiting) return;
-    lastAlert = lastWaiting;
-
-    print('No elements registered in a while, but still waiting on '
-        '${waiting.length} elements to be registered. Check that you have a '
-        'class with an @CustomTag annotation for each of the following tags: '
-        '${waiting.map((e) => "'${e.attributes['name']}'").join(', ')}');
-  });
-}
diff --git a/packages/polymer/lib/src/property_accessor.dart b/packages/polymer/lib/src/property_accessor.dart
deleted file mode 100644
index 9903d55..0000000
--- a/packages/polymer/lib/src/property_accessor.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Code for property accessors from declaration/properties.js
-part of polymer;
-
-// Dart note: this matches the property defined by createPropertyAccessor in
-// polymer-dev/src/declarations/properties.js. Unlike Javascript, we can't
-// override the original property, so we instead ask users to write properties
-// using this pattern:
-//
-//     class Foo extends PolymerElement {
-//       ...
-//       @published
-//       get foo => readValue(#foo);
-//       set foo(v) { writeValue(#foo, v); }
-//
-// and internally readValue/writeValue use an instance of this type to
-// implement the semantics in createPropertyAccessor.
-class _PropertyAccessor<T> {
-  // Name of the property, in order to properly fire change notification events.
-  final Symbol _name;
-
-  /// The underlying value of the property.
-  T _value;
-
-  // Polymer element that contains this property, where change notifications are
-  // expected to be fired from.
-  final Polymer _target;
-
-  /// Non-null when the property is bound.
-  Bindable bindable;
-
-  _PropertyAccessor(this._name, this._target, this._value);
-
-  /// Updates the underlyling value and fires the expected notifications.
-  void updateValue(T newValue) {
-    var oldValue = _value;
-    _value = _target.notifyPropertyChange(_name, oldValue, newValue);
-    _target.emitPropertyChangeRecord(_name, newValue, oldValue);
-  }
-
-  /// The current value of the property. If the property is bound, reading this
-  /// property ensures that the changes are first propagated in order to return
-  /// the latest value. Similarly, when setting this property the binding (if
-  /// any) will be updated too.
-  T get value {
-    if (bindable != null) bindable.deliver();
-    return _value;
-  }
-
-  set value(T newValue) {
-    // Dart Note: The js side makes computed properties read only, and bails
-    // out right here for them (ignoreWrites). For us they are automatically
-    // read only unless you define a setter for them, so we left that out.
-    if (bindable != null) {
-      bindable.value = newValue;
-    } else {
-      updateValue(newValue);
-    }
-  }
-
-  toString() {
-    var name = smoke.symbolToName(_name);
-    var hasBinding = bindable == null ? '(no-binding)' : '(with-binding)';
-    return "[$runtimeType: $_target.$name: $_value $hasBinding]";
-  }
-}
diff --git a/packages/polymer/lib/transformer.dart b/packages/polymer/lib/transformer.dart
deleted file mode 100644
index 5e4f3da..0000000
--- a/packages/polymer/lib/transformer.dart
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Transfomer used for pub-serve and pub-deploy.
-library polymer.transformer;
-
-import 'package:barback/barback.dart';
-import 'package:web_components/transformer.dart' as web_components;
-import 'package:observe/transformer.dart';
-
-import 'src/build/build_filter.dart';
-import 'src/build/common.dart';
-import 'src/build/index_page_builder.dart';
-import 'src/build/html_finalizer.dart';
-import 'src/build/linter.dart';
-import 'src/build/build_log_combiner.dart';
-import 'src/build/polyfill_injector.dart';
-import 'src/build/polymer_bootstrap.dart';
-
-/// The Polymer transformer, which internally runs several phases that will:
-///   * Extract inlined script tags into their separate files
-///   * Apply the observable transformer on every Dart script.
-///   * Inline imported html files
-///   * Combine scripts from multiple files into a single script tag
-///   * Inject extra polyfills needed to run on all browsers.
-///
-/// At the end of these phases, this tranformer produces a single entrypoint
-/// HTML file with a single Dart script that can later be compiled with dart2js.
-class PolymerTransformerGroup implements TransformerGroup {
-  final Iterable<Iterable> phases;
-
-  PolymerTransformerGroup(TransformOptions options)
-      : phases = createDeployPhases(options);
-
-  PolymerTransformerGroup.asPlugin(BarbackSettings settings)
-      : this(_parseSettings(settings));
-}
-
-TransformOptions _parseSettings(BarbackSettings settings) {
-  var args = settings.configuration;
-  bool releaseMode = settings.mode == BarbackMode.RELEASE;
-  bool jsOption = args['js'];
-  bool csp = args['csp'] == true; // defaults to false
-  bool injectBuildLogs =
-      !releaseMode && args['inject_build_logs_in_output'] != false;
-  bool injectWebComponentsJs = true;
-  if (args['inject_platform_js'] != null) {
-    print(
-        'Deprecated polymer transformer option `inject_platform_js`. This has '
-        'been renamed `inject_web_components_js` to match the new file name.');
-    injectWebComponentsJs = args['inject_platform_js'] != false;
-  }
-  if (args['inject_webcomponents_js'] != null) {
-    injectWebComponentsJs = args['inject_webcomponents_js'] != false;
-  }
-  return new TransformOptions(
-      entryPoints: readFileList(args['entry_points']),
-      inlineStylesheets: _readInlineStylesheets(args['inline_stylesheets']),
-      directlyIncludeJS: jsOption == null ? releaseMode : jsOption,
-      contentSecurityPolicy: csp,
-      releaseMode: releaseMode,
-      lint: _parseLintOption(args['lint']),
-      injectBuildLogsInOutput: injectBuildLogs,
-      injectWebComponentsJs: injectWebComponentsJs);
-}
-
-// Lint option can be empty (all files), false, true, or a map indicating
-// include/exclude files.
-_parseLintOption(value) {
-  var lint = null;
-  if (value == null || value == true) return new LintOptions();
-  if (value == false) return new LintOptions.disabled();
-  if (value is Map && value.length == 1) {
-    var key = value.keys.single;
-    var files = readFileList(value[key]);
-    if (key == 'include') {
-      return new LintOptions.include(files);
-    } else if (key == 'exclude') {
-      return new LintOptions.exclude(files);
-    }
-  }
-
-  // Any other case it is an error:
-  print('Invalid value for "lint" in the polymer transformer. '
-      'Expected one of the following: \n'
-      '    lint: true  # or\n'
-      '    lint: false # or\n'
-      '    lint: \n'
-      '      include: \n'
-      '        - file1 \n'
-      '        - file2 # or \n'
-      '    lint: \n'
-      '      exclude: \n'
-      '        - file1 \n'
-      '        - file2 \n');
-  return new LintOptions();
-}
-
-readFileList(value) {
-  if (value == null) return null;
-  var files = [];
-  bool error;
-  if (value is List) {
-    files = value;
-    error = value.any((e) => e is! String);
-  } else if (value is String) {
-    files = [value];
-    error = false;
-  } else {
-    error = true;
-  }
-  if (error) {
-    print('Invalid value for "entry_points" in the polymer transformer.');
-  }
-  return files;
-}
-
-Map<String, bool> _readInlineStylesheets(settingValue) {
-  if (settingValue == null) return null;
-  var inlineStylesheets = {};
-  bool error = false;
-  if (settingValue is Map) {
-    settingValue.forEach((key, value) {
-      if (value is! bool || key is! String) {
-        error = true;
-        return;
-      }
-      if (key == 'default') {
-        inlineStylesheets[key] = value;
-        return;
-      }
-
-      key = systemToAssetPath(key);
-      // Special case package urls, convert to AssetId and use serialized form.
-      var packageMatch = _PACKAGE_PATH_REGEX.matchAsPrefix(key);
-      if (packageMatch != null) {
-        var package = packageMatch[1];
-        var path = 'lib/${packageMatch[2]}';
-        key = new AssetId(package, path).toString();
-      }
-      inlineStylesheets[key] = value;
-    });
-  } else if (settingValue is bool) {
-    inlineStylesheets['default'] = settingValue;
-  } else {
-    error = true;
-  }
-  if (error) {
-    print('Invalid value for "inline_stylesheets" in the polymer transformer.');
-  }
-  return inlineStylesheets;
-}
-
-/// Create deploy phases for Polymer. Note that inlining HTML Imports
-/// comes first (other than linter, if [options.linter] is enabled), which
-/// allows the rest of the HTML-processing phases to operate only on HTML that
-/// is actually imported.
-List<List<Transformer>> createDeployPhases(TransformOptions options,
-    {String sdkDir}) {
-  // TODO(sigmund): this should be done differently. We should lint everything
-  // that is reachable and have the option to lint the rest (similar to how
-  // dart2js can analyze reachable code or entire libraries).
-  var phases = [];
-
-  phases.addAll([
-    /// Must happen first, temporarily rewrites <link rel="x-dart-test"> tags to
-    /// <script type="application/dart" _was_test></script> tags.
-    [new web_components.RewriteXDartTestToScript(options.entryPoints)],
-    [new web_components.ScriptCompactorTransformer(options.entryPoints)],
-    [new PolymerBootstrapTransformer(options)],
-  ]);
-
-  // Lint after injecting @HtmlImport imports otherwise we will likely have
-  // incorrect warnings about missing elements.
-  if (options.lint.enabled) phases.add([new Linter(options)]);
-
-  phases.addAll([
-    [
-      new web_components.ImportInlinerTransformer(
-          options.entryPoints, ['[[', '{{'])
-    ],
-    [new HtmlFinalizer(options)],
-    [
-      new ObservableTransformer(
-          releaseMode: options.releaseMode,
-          injectBuildLogsInOutput: options.injectBuildLogsInOutput)
-    ],
-    // TODO(jakemac): Move to web_components.
-    [new PolyfillInjector(options)],
-    [new BuildFilter(options)],
-    [new BuildLogCombiner(options)],
-  ]);
-  if (!options.releaseMode) {
-    phases.add([new IndexPageBuilder(options)]);
-  }
-  /// Must happen last, rewrites
-  /// <script type="application/dart" _was_test></script> tags back to
-  /// <link rel="x-dart-test"> tags.
-  phases.add(
-      [new web_components.RewriteScriptToXDartTest(options.entryPoints)]);
-  return phases;
-}
-
-final RegExp _PACKAGE_PATH_REGEX = new RegExp(r'packages\/([^\/]+)\/(.*)');
diff --git a/packages/polymer/pubspec.yaml b/packages/polymer/pubspec.yaml
deleted file mode 100644
index 5223a1e..0000000
--- a/packages/polymer/pubspec.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
-name: polymer
-version: 0.16.3+3
-author: Polymer.dart Authors <web-ui-dev@dartlang.org>
-description: >
-  Polymer.dart is a new type of library for the web, built on top of Web
-  Components, and designed to leverage the evolving web platform on modern
-  browsers.
-homepage: https://www.dartlang.org/polymer-dart/
-dependencies:
-  analyzer: '>=0.15.6 <0.26.0'
-  args: '>=0.11.0 <0.14.0'
-  barback: '>=0.14.2 <0.16.0'
-  browser: '>=0.10.0 <0.11.0'
-  code_transformers: '>=0.2.7 <0.3.0'
-  html: '>=0.12.0 <0.13.0'
-  initialize: '>=0.5.1+3 <0.7.0'
-  logging: '>=0.9.2 <0.12.0'
-  path: '>=0.9.0 <2.0.0'
-  polymer_expressions: '>=0.12.0 <0.14.0'
-  polymer_interop: '>=0.1.0+2 <0.2.0'
-  smoke: '>=0.2.0 <0.4.0'
-  source_maps: '>=0.9.4 <0.11.0'
-  source_span: '>=1.0.0 <2.0.0'
-  template_binding: '>=0.12.0 <0.15.0'
-  web_components: '>=0.11.3 <0.12.0'
-  yaml: '>=0.9.0 <3.0.0'
-
-  # Because polymer exports observe, it needs to keep its version constraint
-  # tight to ensure that a constraint on polymer properly constraints all
-  # features it provides.
-  observe: '>=0.13.1 <0.13.2'
-dev_dependencies:
-  unittest: '>=0.10.0 <0.12.0'
-  markdown: '>=0.7.0 <0.8.0'
-transformers:
-- code_transformers/src/delete_file:
-    $include:
-      - lib/src/build/log_injector.css
-- observe:
-    files: lib/src/instance.dart
-    $include: lib/src/instance.dart
-
-- polymer:
-    entry_points:
-      - test/attr_deserialize_test.html
-      - test/attr_mustache_test.html
-      - test/auto_binding_test.html
-      - test/bind_mdv_test.html
-      - test/bind_properties_test.html
-      - test/bind_test.html
-      - test/computed_properties_test.html
-      - test/custom_event_test.html
-      - test/entered_view_test.html
-      - test/event_binding_release_handler_test.html
-      - test/event_controller_test.html
-      - test/event_handlers_test.html
-      - test/event_path_declarative_test.html
-      - test/event_path_test.html
-      - test/events_test.html
-      - test/force_ready_test.html
-      - test/import_test.html
-      - test/inject_bound_html_test.html
-      - test/instance_attrs_test.html
-      - test/js_custom_event_test.html
-      - test/js_interop_test.html
-      - test/layout_test.html
-      - test/nested_binding_test.html
-      - test/noscript_test.html
-      - test/prop_attr_bind_reflection_test.html
-      - test/prop_attr_reflection_test.html
-      - test/property_change_test.html
-      - test/property_observe_test.html
-      - test/publish_attributes_test.html
-      - test/publish_inherited_properties_test.html
-      - test/register_test.html
-      - test/sort_registration_test.html
-      - test/take_attributes_test.html
-      - test/template_attr_template_test.html
-      - test/template_distribute_dynamic_test.html
-      - test/two_way_bind_test.html
-      - test/unbind_test.html
-      - test/web_components_less_test.html
-      - test/when_polymer_ready_test.html
-
-environment:
-  sdk: '>=1.4.0 <2.0.0'
diff --git a/packages/polymer/test/attr_deserialize_test.dart b/packages/polymer/test/attr_deserialize_test.dart
deleted file mode 100644
index b2e793e..0000000
--- a/packages/polymer/test/attr_deserialize_test.dart
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('my-element')
-class MyElement extends PolymerElement {
-  MyElement.created() : super.created();
-
-  @published double volume;
-  @published int factor;
-  @published bool crankIt;
-  @published String msg;
-  @published DateTime time;
-  @published Object json;
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('attributes were deserialized', () {
-    MyElement elem = querySelector('my-element');
-    final msg = 'property should match attribute.';
-    expect(elem.volume, 11.0, reason: '"volume" should match attribute');
-    expect(elem.factor, 3, reason: '"factor" should match attribute');
-    expect(elem.crankIt, true, reason: '"crankIt" should match attribute');
-    expect(elem.msg, "Yo!", reason: '"msg" should match attribute');
-    expect(elem.time, DateTime.parse('2013-08-08T18:34Z'),
-        reason: '"time" should match attribute');
-    expect(elem.json, {'here': 'is', 'some': 'json', 'x': 123},
-        reason: '"json" should match attribute');
-
-    var text = elem.shadowRoot.text;
-    // Collapse adjacent whitespace like a browser would:
-    text = text.replaceAll('\n', ' ').replaceAll(new RegExp(r'\s+'), ' ');
-
-    // Note: using "${33.0}" because the toString differs in JS vs Dart VM.
-    expect(text, " Yo! The volume is ${33.0} !! The time is "
-        "2013-08-08 18:34:00.000Z and here's some JSON: "
-        "{here: is, some: json, x: 123} ",
-        reason: 'text should match expected HTML template');
-  });
-}));
diff --git a/packages/polymer/test/attr_deserialize_test.html b/packages/polymer/test/attr_deserialize_test.html
deleted file mode 100644
index 4dbfee3..0000000
--- a/packages/polymer/test/attr_deserialize_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>Polymer.dart attribute deserialization test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-    <polymer-element name="my-element">
-      <template>
-        <h1>{{msg}} The volume is {{volume * factor}}
-          <template if="{{crankIt}}">!!</template></h1>
-        <h3>The time is {{time}} and here's some JSON: {{json}}</h3>
-      </template>
-    </polymer-element>
-
-    <my-element volume="11" crankit msg="Yo!" factor="3"
-        time="2013-08-08T18:34Z"
-        json="{'here': 'is', 'some': 'json', 'x': 123}">
-    </my-element>
-
-    <script type="application/dart" src="attr_deserialize_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/attr_mustache_test.dart b/packages/polymer/test/attr_mustache_test.dart
deleted file mode 100644
index 302ebf0..0000000
--- a/packages/polymer/test/attr_mustache_test.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:template_binding/template_binding.dart';
-
-@CustomTag('x-target')
-class XTarget extends PolymerElement {
-  XTarget.created() : super.created();
-
-  final Completer _found = new Completer();
-  Future get foundSrc => _found.future;
-
-  // force an mdv binding
-  bind(name, value, {oneTime: false}) =>
-      nodeBindFallback(this).bind(name, value, oneTime: oneTime);
-
-  attached() {
-    testSrcForMustache();
-  }
-
-  attributeChanged(name, oldValue, newValue) {
-    testSrcForMustache();
-    if (attributes[name] == '../testSource') {
-      _found.complete();
-    }
-  }
-
-  testSrcForMustache() {
-    expect(attributes['src'], isNot(matches(Polymer.bindPattern)),
-        reason: 'attribute does not contain {{...}}');
-  }
-}
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  XTest.created() : super.created();
-
-  @observable var src = 'testSource';
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('mustache attributes', () {
-    final xtest = document.querySelector('#test');
-    final xtarget = xtest.shadowRoot.querySelector('#target');
-    return xtarget.foundSrc;
-  });
-}));
diff --git a/packages/polymer/test/attr_mustache_test.html b/packages/polymer/test/attr_mustache_test.html
deleted file mode 100644
index 45c6944..0000000
--- a/packages/polymer/test/attr_mustache_test.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>take attributes</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-test id="test"></x-test>
-
-    <polymer-element name="x-target" attributes="src">
-    </polymer-element>
-
-    <polymer-element name="x-test">
-      <template>
-        <x-target id="target" src="../{{src}}"></x-target>
-      </template>
-    </polymer-element>
-
-  <script type="application/dart" src="attr_mustache_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/auto_binding_test.dart b/packages/polymer/test/auto_binding_test.dart
deleted file mode 100644
index 0669933..0000000
--- a/packages/polymer/test/auto_binding_test.dart
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/auto_binding.dart';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-class TestModel {
-  var greeting = 'Hi';
-  eventAction(e) {
-    e.detail.add('handled');
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('elements upgraded', () {
-    AutoBindingElement template = document.getElementById('one');
-    template.model = new TestModel();
-
-    var completer = new Completer();
-    var events = 0;
-    window.addEventListener('template-bound', (e) {
-      events++;
-      if (e.target.id == 'one') {
-        expect(e.target, template);
-
-        var t = template;
-        var h = t.$['h'];
-        expect(h.text, t.model.greeting, reason: 'binding applied');
-        var ce = t.fire('tap', onNode: h, detail: []);
-        expect(ce.detail, ['handled'], reason: 'element event handler fired');
-      }
-
-      if (events == 3) completer.complete();
-    });
-
-    /// test dynamic creation
-    new Future(() {
-      var d = new DivElement();
-      d.setInnerHtml('<template is="auto-binding">Dynamical'
-          ' <input value="{{value}}"><div>{{value}}</div></template>',
-          treeSanitizer: new _NullSanitizer());
-      document.body.append(d);
-    });
-
-    return completer.future;
-  });
-}));
-
-class _NullSanitizer implements NodeTreeSanitizer {
-  sanitizeTree(Node node) {}
-}
diff --git a/packages/polymer/test/auto_binding_test.html b/packages/polymer/test/auto_binding_test.html
deleted file mode 100644
index 0c9dd5d..0000000
--- a/packages/polymer/test/auto_binding_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-for details. 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>auto-binding test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-
-    <div>top</div>
-
-    <template id="one" is="auto-binding-dart">
-      <h2 id="h" on-tap="{{eventAction}}">{{greeting}}</h2>
-    </template>
-
-    <template id="two" is="auto-binding-dart">
-      <div>Say something: <input value="{{value}}"></div>
-      <div>You said: {{value}}</div>
-    </template>
-
-    <div>bottom</div>
-
-    <script type="application/dart" src="auto_binding_test.dart"></script>
-
-  </body>
-</html>
diff --git a/packages/polymer/test/bind_mdv_test.dart b/packages/polymer/test/bind_mdv_test.dart
deleted file mode 100644
index a576e30..0000000
--- a/packages/polymer/test/bind_mdv_test.dart
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.bind_mdv_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:template_binding/template_binding.dart';
-import 'package:observe/observe.dart';
-import 'package:observe/mirrors_used.dart'; // make test smaller.
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:web_components/polyfill.dart';
-
-main() {
-  useHtmlConfiguration();
-
-  var registered = customElementsReady.then((_) {
-    document.registerElement('my-div', MyDivElement);
-  });
-
-  setUp(() => registered);
-
-  group('bindModel', bindModelTests);
-}
-
-bindModelTests() {
-  var div;
-
-  setUp(() {
-    div = new MyDivElement();
-    document.body.append(div);
-  });
-
-  tearDown(() {
-    div.remove();
-  });
-
-  parseAndBindHTML(html, model) => templateBind(new Element.tag('template')
-    ..setInnerHtml(html, treeSanitizer: const NullTreeSanitizer()))
-      .createInstance(model);
-
-  test('bindModel', () {
-    var fragment = parseAndBindHTML('<div id="a" foo="{{bar}}"></div>', div);
-    div.append(fragment);
-    var a = div.query('#a');
-
-    div.bar = 5;
-    return onAttributeChange(a).then((_) {
-      expect(a.attributes['foo'], '5');
-      div.bar = 8;
-      return onAttributeChange(a).then((_) {
-        expect(a.attributes['foo'], '8');
-      });
-    });
-  });
-
-  test('bind input', () {
-    var fragment = parseAndBindHTML('<input value="{{bar}}" />', div);
-    div.append(fragment);
-    var a = div.query('input');
-
-    div.bar = 'hello';
-    // TODO(sorvell): fix this when observe-js lets us explicitly listen for
-    // a change on input.value
-    Observable.dirtyCheck();
-    return new Future.microtask(() {
-      expect(a.value, 'hello');
-    });
-  });
-}
-
-class MyDivElement extends HtmlElement with Observable {
-  factory MyDivElement() => new Element.tag('my-div');
-  MyDivElement.created() : super.created();
-  @observable var bar;
-}
-
-class NullTreeSanitizer implements NodeTreeSanitizer {
-  const NullTreeSanitizer();
-  void sanitizeTree(Node node) {}
-}
-
-Future onAttributeChange(Element node) {
-  var completer = new Completer();
-  new MutationObserver((records, observer) {
-    observer.disconnect();
-    completer.complete();
-  })..observe(node, attributes: true);
-  scheduleMicrotask(Observable.dirtyCheck);
-  return completer.future;
-}
diff --git a/packages/polymer/test/bind_mdv_test.html b/packages/polymer/test/bind_mdv_test.html
deleted file mode 100644
index a69c76b..0000000
--- a/packages/polymer/test/bind_mdv_test.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="dart.unittest" content="full-stack-traces">
-  <title> bind_mdv_test </title>
-  <style>
-     .unittest-table { font-family:monospace; border:1px; }
-     .unittest-pass { background: #6b3;}
-     .unittest-fail { background: #d55;}
-     .unittest-error { background: #a11;}
-  </style>
-
-  <!-- Need to hardcode in the polyfills here since this isn't a polymer test-->
-  <script src="packages/web_components/webcomponents.js"></script>
-  <script src="packages/web_components/dart_support.js"></script>
-  <script src="packages/polymer_interop/src/js/polymer.js"></script>
-</head>
-<body>
-  <h1> Running bind_mdv_test </h1>
-  <script type="text/javascript"
-      src="packages/unittest/test_controller.js"></script>
-  <script type="application/dart" src="bind_mdv_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
-</body>
-</html>
diff --git a/packages/polymer/test/bind_properties_test.dart b/packages/polymer/test/bind_properties_test.dart
deleted file mode 100644
index 65b2d91..0000000
--- a/packages/polymer/test/bind_properties_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-export 'package:polymer/init.dart';
-
-class XBaz extends PolymerElement {
-  @published
-  int get val => readValue(#val);
-  set val(v) => writeValue(#val, v);
-
-  XBaz.created() : super.created();
-}
-
-class XBar extends PolymerElement {
-  @published
-  int get val => readValue(#val);
-  set val(v) => writeValue(#val, v);
-
-  XBar.created() : super.created();
-}
-
-class XBat extends PolymerElement {
-  @published
-  int get val => readValue(#val);
-  set val(v) => writeValue(#val, v);
-
-  XBat.created() : super.created();
-}
-
-class XFoo extends PolymerElement {
-  @published
-  int get val => readValue(#val);
-  set val(v) => writeValue(#val, v);
-
-  XFoo.created() : super.created();
-}
-
-@CustomTag('bind-properties-test')
-class XTest extends PolymerElement {
-  XTest.created() : super.created();
-
-  @published var obj;
-
-  ready() {
-    obj = toObservable({'path': {'to': {'value': 3}}});
-    readyCalled();
-  }
-}
-
-var completer = new Completer();
-waitForElementReady(_) => completer.future;
-readyCalled() {
-  completer.complete(null);
-}
-
-@initMethod
-init() {
-  // TODO(sigmund): investigate why are we still seeing failures due to the
-  // order of registrations, then use @CustomTag instead of this.
-  Polymer.register('x-foo', XFoo);
-  Polymer.register('x-bar', XBar);
-  Polymer.register('x-baz', XBaz);
-  Polymer.register('x-bat', XBat);
-
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady.then(waitForElementReady));
-
-  test('bind properties test', () {
-    var e = document.querySelector('bind-properties-test');
-    var foo = e.shadowRoot.querySelector('#foo');
-    var bar = foo.shadowRoot.querySelector('#bar');
-    var bat = foo.shadowRoot.querySelector('#bat');
-    var baz = bar.shadowRoot.querySelector('#baz');
-
-    expect(foo.val, 3);
-    expect(bar.val, 3);
-    expect(bat.val, 3);
-    expect(baz.val, 3);
-
-    foo.val = 4;
-
-    expect(foo.val, 4);
-    expect(bar.val, 4);
-    expect(bat.val, 4);
-    expect(baz.val, 4);
-
-    baz.val = 5;
-
-    expect(foo.val, 5);
-    expect(bar.val, 5);
-    expect(bat.val, 5);
-    expect(baz.val, 5);
-
-    e.obj['path']['to']['value'] = 6;
-
-    expect(foo.val, 6);
-    expect(bar.val, 6);
-    expect(bat.val, 6);
-    expect(baz.val, 6);
-  });
-}
diff --git a/packages/polymer/test/bind_properties_test.html b/packages/polymer/test/bind_properties_test.html
deleted file mode 100644
index c1ad590..0000000
--- a/packages/polymer/test/bind_properties_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>port of bindProperties test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <polymer-element name="x-baz" attributes="val">
-      <template>{{ val }}</template>
-    </polymer-element>
-
-    <polymer-element name="x-bar" attributes="val">
-      <template>
-        <x-baz id=baz val="{{ val }}"></x-baz>
-      </template>
-    </polymer-element>
-
-    <polymer-element name="x-bat" attributes="val">
-      <template>{{ val }}</template>
-    </polymer-element>
-
-    <polymer-element name="x-foo" attributes="val">
-      <template>
-        <x-bar id=bar val="{{ val }}"></x-bar>
-        <x-bat id=bat val="{{ val }}"></x-bat>
-      </template>
-    </polymer-element>
-
-    <polymer-element name="bind-properties-test">
-      <template>
-        <x-foo id="foo" val="{{ obj['path']['to']['value'] }}"></x-foo>
-      </template>
-    </polymer-element>
-    <bind-properties-test></bind-properties-test>
-    <script type="application/dart" src="bind_properties_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/bind_test.dart b/packages/polymer/test/bind_test.dart
deleted file mode 100644
index 0b91676..0000000
--- a/packages/polymer/test/bind_test.dart
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('x-bar')
-class XBar extends PolymerElement {
-  XBar.created() : super.created();
-
-  get testValue => true;
-}
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  @observable var foo = 'foo!';
-  final _testDone = new Completer();
-  Future get onTestDone => _testDone.future;
-
-  XFoo.created() : super.created();
-
-  _runTest(_) {
-    expect($['bindId'].text.trim(), 'bar!');
-
-    expect(foo, $['foo'].attributes['foo']);
-    expect($['bool'].attributes['foo'], '');
-    expect($['bool'].attributes, isNot(contains('foo?')));
-    expect($['content'].innerHtml, foo);
-
-    expect(foo, $['bar'].attributes['foo']);
-    expect($['barBool'].attributes['foo'], '');
-    expect($['barBool'].attributes, isNot(contains('foo?')));
-    expect($['barContent'].innerHtml, foo);
-    _testDone.complete();
-  }
-
-  ready() {
-    onMutation($['bindId']).then(_runTest);
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('ready called', () => (querySelector('x-foo') as XFoo).onTestDone);
-}));
diff --git a/packages/polymer/test/bind_test.html b/packages/polymer/test/bind_test.html
deleted file mode 100644
index 490e1b5..0000000
--- a/packages/polymer/test/bind_test.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>bind simple</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-foo></x-foo>
-
-    <polymer-element name="x-bar">
-      <template>
-        x-bar
-      </template>
-    </polymer-element>
-
-    <polymer-element name="x-foo">
-      <template>
-        <div id="foo" foo="{{foo}}"></div>
-        <div id="bool" foo?="{{foo}}"></div>
-        <div id="content">{{foo}}</div>
-        <x-bar id="bar" foo="{{foo}}" ></x-bar>
-        <x-bar id="barBool" foo?="{{foo}}"></x-bar>
-        <x-bar id="barContent">{{foo}}</x-bar>
-        <div id="bindId">
-          <template if="{{$['bar'].testValue}}">bar!</template>
-        </div>
-      </template>
-    </polymer-element>
-
-    <script type="application/dart" src="bind_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/build/all_phases_test.dart b/packages/polymer/test/build/all_phases_test.dart
deleted file mode 100644
index 0586822..0000000
--- a/packages/polymer/test/build/all_phases_test.dart
+++ /dev/null
@@ -1,323 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.all_phases_test;
-
-import 'package:code_transformers/tests.dart' show testingDartSdkDirectory;
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/polymer_smoke_generator.dart'
-    show MAIN_HEADER;
-import 'package:polymer/transformer.dart';
-import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS;
-import 'package:unittest/compact_vm_config.dart';
-
-import 'common.dart';
-
-void main() {
-  useCompactVMConfiguration();
-  var phases = createDeployPhases(new TransformOptions(),
-      sdkDir: testingDartSdkDirectory);
-
-  testPhases('observable changes', phases, {
-    'a|web/test.dart': _sampleInput('A', 'foo'),
-    'a|web/test2.dart': _sampleOutput('B', 'bar'),
-  }, {
-    'a|web/test.dart': _sampleOutput('A', 'foo'),
-    'a|web/test2.dart': _sampleOutput('B', 'bar'),
-  });
-
-  testPhases('single script', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="import" href="packages/polymer/polymer.html">'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': _sampleInput('A', 'foo'),
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body><div hidden="">'
-        '<script src="test.html.polymer.bootstrap.dart.js" async=""></script>'
-        '</div>'
-        '</body></html>',
-    'a|web/test.html.polymer.bootstrap.dart': '''$MAIN_HEADER
-          import 'test.web_components.bootstrap.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_1.XA: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XA: {},
-                  smoke_0.PolymerElement: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-    'a|web/test.web_components.bootstrap.dart': '''
-          import 'package:initialize/src/static_loader.dart';
-          import 'package:initialize/initialize.dart';
-          import 'test.bootstrap.dart' as i0;
-          import 'a.dart' as i1;
-          import 'package:polymer/polymer.dart' as i2;
-
-          main() {
-            initializers.addAll([new InitEntry(const i2.CustomTag('x-A'), i1.XA),]);
-
-            return i0.main();
-          }
-          '''.replaceAll('          ', ''),
-    'a|web/test.bootstrap.dart': '''
-          library a.web.test_bootstrap_dart;
-
-          import 'a.dart' as i0;
-
-          main() => i0.main();
-          '''.replaceAll('          ', ''),
-  }, []);
-
-  testPhases('single script in subfolder', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="import" href="packages/polymer/polymer.html">'
-        '<script type="application/dart" src="foo/a.dart"></script>',
-    'a|web/foo/a.dart': _sampleInput('A', 'foo'),
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body><div hidden="">'
-        '<script src="test.html.polymer.bootstrap.dart.js" async=""></script>'
-        '</div>'
-        '</body></html>',
-    'a|web/test.html.polymer.bootstrap.dart': '''$MAIN_HEADER
-        import 'test.web_components.bootstrap.dart' as i0;
-        ${DEFAULT_IMPORTS.join('\n')}
-        import 'package:polymer/polymer.dart' as smoke_0;
-        import 'foo/a.dart' as smoke_1;
-
-        main() {
-          useGeneratedCode(new StaticConfiguration(
-              checkedMode: false,
-              parents: {
-                smoke_1.XA: smoke_0.PolymerElement,
-              },
-              declarations: {
-                smoke_1.XA: {},
-                smoke_0.PolymerElement: {},
-              }));
-          configureForDeployment();
-          return i0.main();
-        }
-        '''.replaceAll('\n        ', '\n'),
-    'a|web/test.web_components.bootstrap.dart': '''
-        import 'package:initialize/src/static_loader.dart';
-        import 'package:initialize/initialize.dart';
-        import 'test.bootstrap.dart' as i0;
-        import 'foo/a.dart' as i1;
-        import 'package:polymer/polymer.dart' as i2;
-
-        main() {
-          initializers.addAll([new InitEntry(const i2.CustomTag('x-A'), i1.XA),]);
-
-          return i0.main();
-        }
-        '''.replaceAll('        ', ''),
-    'a|web/test.bootstrap.dart': '''
-        library a.web.test_bootstrap_dart;
-
-        import 'foo/a.dart' as i0;
-
-        main() => i0.main();
-        '''.replaceAll('        ', ''),
-  }, []);
-
-  testPhases('single inline script', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="import" href="packages/polymer/polymer.html">'
-        '<script type="application/dart">'
-        '${_sampleInput("B", "bar")}</script>',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body><div hidden="">'
-        '<script src="test.html.polymer.bootstrap.dart.js" async=""></script>'
-        '</div>'
-        '</body></html>',
-    'a|web/test.html.polymer.bootstrap.dart': '''$MAIN_HEADER
-          import 'test.web_components.bootstrap.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'test.html.0.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_1.XB: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_0.PolymerElement: {},
-                  smoke_1.XB: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-    'a|web/test.web_components.bootstrap.dart': '''
-          import 'package:initialize/src/static_loader.dart';
-          import 'package:initialize/initialize.dart';
-          import 'test.bootstrap.dart' as i0;
-          import 'test.html.0.dart' as i1;
-          import 'package:polymer/polymer.dart' as i2;
-
-          main() {
-            initializers.addAll([new InitEntry(const i2.CustomTag('x-B'), i1.XB),]);
-
-            return i0.main();
-          }
-          '''.replaceAll('          ', ''),
-    'a|web/test.bootstrap.dart': '''
-          library a.web.test_bootstrap_dart;
-
-          import 'test.html.0.dart' as i0;
-
-          main() => i0.main();
-          '''.replaceAll('          ', ''),
-    'a|web/test.html.0.dart': _sampleOutput("B", "bar"),
-  }, []);
-
-  testPhases('with imports', phases, {
-    'a|web/index.html': '<!DOCTYPE html><html><head>'
-        '<link rel="import" href="packages/polymer/polymer.html">'
-        '<link rel="import" href="packages/a/test2.html">'
-        '</head><body>'
-        '<script type="application/dart" src="b.dart"></script>',
-    'a|web/b.dart': _sampleInput('B', 'bar'),
-    'a|lib/test2.html': '<!DOCTYPE html><html><head>'
-        '<link rel="import" href="../../packages/polymer/polymer.html">'
-        '</head><body>'
-        '<polymer-element name="x-a">1'
-        '<script type="application/dart">'
-        '${_sampleInput("A", "foo")}</script>'
-        '</polymer-element></html>',
-  }, {
-    'a|web/index.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<div hidden="">'
-        '<polymer-element name="x-a">1</polymer-element>'
-        '</div>'
-        '<script src="index.html.polymer.bootstrap.dart.js" async=""></script>'
-        '</body></html>',
-    'a|web/index.html.polymer.bootstrap.dart': '''$MAIN_HEADER
-          import 'index.web_components.bootstrap.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'index.html.0.dart' as smoke_1;
-          import 'b.dart' as smoke_2;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_2.XB: smoke_0.PolymerElement,
-                  smoke_1.XA: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_2.XB: {},
-                  smoke_1.XA: {},
-                  smoke_0.PolymerElement: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-    'a|web/index.web_components.bootstrap.dart': '''
-          import 'package:initialize/src/static_loader.dart';
-          import 'package:initialize/initialize.dart';
-          import 'index.bootstrap.dart' as i0;
-          import 'index.html.0.dart' as i1;
-          import 'package:polymer/polymer.dart' as i2;
-          import 'b.dart' as i3;
-
-          main() {
-            initializers.addAll([
-              new InitEntry(const i2.CustomTag('x-A'), i1.XA),
-              new InitEntry(const i2.CustomTag('x-B'), i3.XB),
-            ]);
-
-            return i0.main();
-          }
-          '''.replaceAll('          ', ''),
-    'a|web/index.bootstrap.dart': '''
-          library a.web.index_bootstrap_dart;
-
-          import 'index.html.0.dart' as i0;
-          import 'b.dart' as i1;
-
-          main() => i1.main();
-          '''.replaceAll('          ', ''),
-    'a|web/index.html.0.dart': _sampleOutput("A", "foo"),
-  }, []);
-
-  testPhases('test compatibility', phases, {
-    'a|test/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="x-dart-test" href="a.dart">'
-        '<script src="packages/test/dart.js"></script>',
-    'a|test/a.dart': _sampleInput('A', 'foo'),
-  }, {
-    'a|test/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '<link rel="x-dart-test" href="test.html.polymer.bootstrap.dart">'
-        '<script src="packages/test/dart.js"></script>'
-        '</head><body></body></html>',
-  }, []);
-}
-
-String _sampleInput(String className, String fieldName) => '''
-library ${className}_$fieldName;
-import 'package:observe/observe.dart';
-import 'package:polymer/polymer.dart';
-
-class $className extends Observable {
-  @observable int $fieldName;
-  $className(this.$fieldName);
-}
-
-@CustomTag('x-$className')
-class X${className} extends PolymerElement {
-  X${className}.created() : super.created();
-}
-@initMethod m_$fieldName() {}
-main() {}
-''';
-
-String _sampleOutput(String className, String fieldName) {
-  var fieldReplacement = '@reflectable @observable '
-      'int get $fieldName => __\$$fieldName; '
-      'int __\$$fieldName; '
-      '@reflectable set $fieldName(int value) { '
-      '__\$$fieldName = notifyPropertyChange(#$fieldName, '
-      '__\$$fieldName, value); }';
-  return '''
-library ${className}_$fieldName;
-import 'package:observe/observe.dart';
-import 'package:polymer/polymer.dart';
-
-class $className extends ChangeNotifier {
-  $fieldReplacement
-  $className($fieldName) : __\$$fieldName = $fieldName;
-}
-
-@CustomTag('x-$className')
-class X${className} extends PolymerElement {
-  X${className}.created() : super.created();
-}
-@initMethod m_$fieldName() {}
-main() {}
-''';
-}
diff --git a/packages/polymer/test/build/build_log_combiner_test.dart b/packages/polymer/test/build/build_log_combiner_test.dart
deleted file mode 100644
index acb1ae6..0000000
--- a/packages/polymer/test/build/build_log_combiner_test.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.build_log_combiner_test;
-
-import 'package:code_transformers/messages/build_logger.dart'
-    show LOG_EXTENSION;
-import 'package:polymer/src/build/build_log_combiner.dart';
-import 'package:polymer/src/build/common.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-
-import 'common.dart';
-
-final options = new TransformOptions(injectBuildLogsInOutput: true);
-final phases = [[new BuildLogCombiner(options)]];
-
-void main() {
-  useCompactVMConfiguration();
-
-  testPhases('combines multiple logs', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/test.html$LOG_EXTENSION.1':
-        '{"foo#0":[${_logString('Info', 0, 'foo')}]}',
-    'a|web/test.html$LOG_EXTENSION.2':
-        '{"foo#2":[${_logString('Warning', 2, 'bar')}]}',
-    'a|web/test.html$LOG_EXTENSION.3': '{'
-        '"foo#2":[${_logString('Error', 2, 'baz1')}],'
-        '"foo#44":[${_logString('Error', 44, 'baz2')}]'
-        '}',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/test.html$LOG_EXTENSION': '{'
-        '"foo#0":[${_logString('Info', 0, 'foo')}],'
-        '"foo#2":[${_logString('Warning', 2, 'bar')},'
-        '${_logString('Error', 2, 'baz1')}],'
-        '"foo#44":[${_logString('Error', 44, 'baz2')}]'
-        '}',
-  });
-}
-
-String _logString(String level, int id, String message) =>
-    '{"level":"$level","message":{"id":"foo#$id","snippet":"$message"}}';
diff --git a/packages/polymer/test/build/common.dart b/packages/polymer/test/build/common.dart
deleted file mode 100644
index 8a1b620..0000000
--- a/packages/polymer/test/build/common.dart
+++ /dev/null
@@ -1,258 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.common;
-
-import 'dart:async';
-
-import 'package:barback/barback.dart';
-import 'package:code_transformers/messages/build_logger.dart'
-    show LOG_EXTENSION;
-import 'package:polymer/src/build/common.dart';
-import 'package:stack_trace/stack_trace.dart';
-import 'package:unittest/unittest.dart';
-
-String idToString(AssetId id) => '${id.package}|${id.path}';
-AssetId idFromString(String s) {
-  int index = s.indexOf('|');
-  return new AssetId(s.substring(0, index), s.substring(index + 1));
-}
-
-String _removeTrailingWhitespace(String str) => str.splitMapJoin('\n',
-    onNonMatch: (s) => s.replaceAll(new RegExp(r'\s+$'), ''));
-
-/// A helper package provider that has files stored in memory, also wraps
-/// [Barback] to simply our tests.
-class TestHelper implements PackageProvider {
-  /// Maps from an asset string identifier of the form 'package|path' to the
-  /// file contents.
-  final Map<String, String> files;
-  final Iterable<String> packages;
-  final List<String> messages;
-  int messagesSeen = 0;
-  bool errorSeen = false;
-
-  Barback barback;
-  var errorSubscription;
-  var resultSubscription;
-  var logSubscription;
-
-  Future<Asset> getAsset(AssetId id) {
-    var content = files[idToString(id)];
-    if (content == null) fail('error: requested $id, but $id is not available');
-    return new Future.value(new Asset.fromString(id, content));
-  }
-
-  TestHelper(List<List<Transformer>> transformers, Map<String, String> files,
-      this.messages)
-      : files = files,
-        packages = files.keys.map((s) => idFromString(s).package) {
-    barback = new Barback(this);
-    for (var p in packages) {
-      barback.updateTransformers(p, transformers);
-    }
-
-    errorSubscription = barback.errors.listen((e) {
-      var trace = null;
-      if (e is Error) trace = e.stackTrace;
-      if (trace != null) {
-        print(Trace.format(trace));
-      }
-      fail('error running barback: $e');
-    });
-
-    resultSubscription = barback.results.listen((result) {
-      expect(result.succeeded, !errorSeen, reason: "${result.errors}");
-    });
-
-    logSubscription = barback.log.listen((entry) {
-      // Ignore info messages.
-      if (entry.level == LogLevel.INFO || entry.level == LogLevel.FINE) return;
-      if (entry.level == LogLevel.ERROR) errorSeen = true;
-      // We only check messages when an expectation is provided.
-      if (messages == null) return;
-
-      var errorLink =
-          new RegExp(' See http://goo.gl/5HPeuP#polymer_[0-9]* for details.');
-      var text = entry.message;
-      var newText = text.replaceFirst(errorLink, '');
-      expect(text != newText, isTrue);
-      var msg = '${entry.level.name.toLowerCase()}: ${newText}';
-      var span = entry.span;
-      var spanInfo = span == null
-          ? ''
-          : ' (${span.sourceUrl} ${span.start.line} ${span.start.column})';
-      var index = messagesSeen++;
-      expect(messagesSeen, lessThanOrEqualTo(messages.length),
-          reason: 'more messages than expected.\nMessage seen: $msg$spanInfo');
-      expect('$msg$spanInfo', messages[index]);
-    });
-  }
-
-  void tearDown() {
-    errorSubscription.cancel();
-    resultSubscription.cancel();
-    logSubscription.cancel();
-  }
-
-  /// Tells barback which files have changed, and thus anything that depends on
-  /// it on should be computed. By default mark all the input files.
-  void run([Iterable<String> paths]) {
-    if (paths == null) paths = files.keys;
-    barback.updateSources(paths.map(idFromString));
-  }
-
-  Future<String> operator [](String assetString) {
-    return barback
-        .getAssetById(idFromString(assetString))
-        .then((asset) => asset.readAsString());
-  }
-
-  Future check(String assetIdString, String content) {
-    return this[assetIdString].then((value) {
-      value = _removeTrailingWhitespace(value);
-      content = _removeTrailingWhitespace(content);
-      expect(value, content, reason: 'Final output of $assetIdString differs.');
-    });
-  }
-
-  Future checkAll(Map<String, String> files) {
-    return barback.results.first.then((_) {
-      if (files == null) return null;
-      var futures = [];
-      files.forEach((k, v) {
-        futures.add(check(k, v));
-      });
-      return Future.wait(futures);
-    }).then((_) {
-      // We only check messages when an expectation is provided.
-      if (messages == null) return;
-      expect(messagesSeen, messages.length,
-          reason: 'less messages than expected');
-    });
-  }
-}
-
-testPhases(String testName, List<List<Transformer>> phases,
-    Map<String, String> inputFiles, Map<String, String> expectedFiles,
-    [List<String> expectedMessages, bool solo = false]) {
-  // Include mock versions of the polymer library that can be used to test
-  // resolver-based code generation.
-  POLYMER_MOCKS.forEach((file, contents) {
-    inputFiles[file] = contents;
-  });
-  (solo ? solo_test : test)(testName, () {
-    var helper = new TestHelper(phases, inputFiles, expectedMessages)..run();
-    return helper.checkAll(expectedFiles).whenComplete(() => helper.tearDown());
-  });
-}
-
-solo_testPhases(String testName, List<List<Transformer>> phases,
-    Map<String, String> inputFiles, Map<String, String> expectedFiles,
-    [List<String> expectedMessages]) => testPhases(
-        testName, phases, inputFiles, expectedFiles, expectedMessages, true);
-
-// Similar to testPhases, but tests all the cases around log behaviour in
-// different modes. Any expectedFiles with [LOG_EXTENSION] will be removed from
-// the expectation as appropriate, and any error logs will be changed to expect
-// warning logs as appropriate.
-testLogOutput(Function buildPhase, String testName,
-    Map<String, String> inputFiles, Map<String, String> expectedFiles,
-    [List<String> expectedMessages, bool solo = false]) {
-  final transformOptions = [
-    new TransformOptions(injectBuildLogsInOutput: false, releaseMode: false),
-    new TransformOptions(injectBuildLogsInOutput: false, releaseMode: true),
-    new TransformOptions(injectBuildLogsInOutput: true, releaseMode: false),
-    new TransformOptions(injectBuildLogsInOutput: true, releaseMode: true),
-  ];
-
-  for (var options in transformOptions) {
-    var phase = buildPhase(options);
-    var actualExpectedFiles = {};
-    expectedFiles.forEach((file, content) {
-      if (file.contains(LOG_EXTENSION) &&
-          (!options.injectBuildLogsInOutput || options.releaseMode)) {
-        return;
-      }
-      actualExpectedFiles[file] = content;
-    });
-    var fullTestName = '$testName: '
-        'injectLogs=${options.injectBuildLogsInOutput} '
-        'releaseMode=${options.releaseMode}';
-    testPhases(fullTestName, [[phase]], inputFiles, actualExpectedFiles,
-        expectedMessages
-            .map((m) =>
-                options.releaseMode ? m : m.replaceFirst('error:', 'warning:'))
-            .toList(), solo);
-  }
-}
-
-/// Generate an expected ._data file, where all files are assumed to be in the
-/// same [package].
-String expectedData(List<String> urls, {package: 'a', experimental: false}) {
-  var ids = urls.map((e) => '["$package","$e"]').join(',');
-  return '{"experimental_bootstrap":$experimental,"script_ids":[$ids]}';
-}
-
-const EMPTY_DATA = '{"experimental_bootstrap":false,"script_ids":[]}';
-
-const DART_SUPPORT_TAG =
-    '<script src="packages/web_components/dart_support.js"></script>';
-const WEB_COMPONENTS_JS_TAG =
-    '<script src="packages/web_components/webcomponents.min.js"></script>';
-const COMPATIBILITY_JS_TAGS = '$WEB_COMPONENTS_JS_TAG$DART_SUPPORT_TAG';
-const PLATFORM_JS_TAG =
-    '<script src="packages/web_components/platform.js"></script>';
-
-const INTEROP_TAG = '<script src="packages/browser/interop.js"></script>';
-const DART_JS_TAG = '<script src="packages/browser/dart.js"></script>';
-
-const POLYMER_MOCKS = const {
-  'initialize|lib/initialize.dart': '''
-      library initialize;
-
-      abstract class Initializer<T> {}
-
-      class _InitMethod implements Initializer<Function> {
-        const _InitMethod();
-      }
-      const _InitMethod initMethod = const _InitMethod();''',
-  'polymer|lib/polymer.html': '<!DOCTYPE html><html>'
-      '<link rel="import" href="../../packages/polymer_interop/polymer.html">',
-  'polymer|lib/polymer_experimental.html': '<!DOCTYPE html><html>'
-      '<link rel="import" href="polymer.html">',
-  'polymer_interop|lib/polymer.html': '<!DOCTYPE html><html>'
-      '<link rel="import" href="src/js/polymer.html">',
-  'polymer_interop|lib/src/js/polymer.html': '<!DOCTYPE html>',
-  'polymer|lib/polymer.dart': 'library polymer;\n'
-      'import "dart:html";\n'
-      'import "package:initialize/initialize.dart";\n'
-      'export "package:observe/observe.dart";\n' // for @observable
-      'part "src/loader.dart";\n' // for @CustomTag and @initMethod
-      'part "src/instance.dart";\n', // for @published and @ObserveProperty
-
-  'polymer|lib/src/loader.dart': 'part of polymer;\n'
-      'class CustomTag implements Initializer<Type> {\n'
-      '  final String tagName;\n'
-      '  const CustomTag(this.tagName);'
-      '}\n',
-  'polymer|lib/src/instance.dart': 'part of polymer;\n'
-      'class PublishedProperty { const PublishedProperty(); }\n'
-      'const published = const PublishedProperty();\n'
-      'class ComputedProperty {'
-      '  final String expression;\n'
-      '  const ComputedProperty();'
-      '}\n'
-      'class ObserveProperty { const ObserveProperty(); }\n'
-      'abstract class Polymer {}\n'
-      'class PolymerElement extends HtmlElement with Polymer {}\n',
-  'polymer|lib/init.dart': 'library polymer.init;\n'
-      'import "package:polymer/polymer.dart";\n'
-      'main() {};\n',
-  'observe|lib/observe.dart': 'library observe;\n'
-      'export "src/metadata.dart";',
-  'observe|lib/src/metadata.dart': 'library observe.src.metadata;\n'
-      'class ObservableProperty { const ObservableProperty(); }\n'
-      'const observable = const ObservableProperty();\n',
-};
diff --git a/packages/polymer/test/build/html_finalizer_test.dart b/packages/polymer/test/build/html_finalizer_test.dart
deleted file mode 100644
index 4369b7e..0000000
--- a/packages/polymer/test/build/html_finalizer_test.dart
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.html_finalizer_test;
-
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/html_finalizer.dart';
-import 'package:polymer/src/build/messages.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-import 'common.dart';
-
-final phases = [[new HtmlFinalizer(new TransformOptions())]];
-
-void main() {
-  useCompactVMConfiguration();
-  group('csp', cspTests);
-  group('rel=stylesheet', stylesheetTests);
-  group('url attributes', urlAttributeTests);
-}
-
-cspTests() {
-  final cspPhases =
-      [[new HtmlFinalizer(new TransformOptions(contentSecurityPolicy: true))]];
-  testPhases('extract Js scripts in CSP mode', cspPhases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="text/javascript">/*first*/</script>'
-        '<script src="second.js"></script>'
-        '<script>/*third*/</script>'
-        '<script type="application/dart">/*fourth*/</script>'
-        '</head><body>'
-        '<script>/*fifth*/</script>'
-        '</body></html>',
-    'a|web/second.js': '/*second*/'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="text/javascript" src="test.html.0.js"></script>'
-        '<script src="second.js"></script>'
-        '<script src="test.html.1.js"></script>'
-        '<script type="application/dart">/*fourth*/</script>'
-        '</head><body>'
-        '<script src="test.html.2.js"></script>'
-        '</body></html>',
-    'a|web/test.html.0.js': '/*first*/',
-    'a|web/test.html.1.js': '/*third*/',
-    'a|web/test.html.2.js': '/*fifth*/',
-  });
-}
-
-void stylesheetTests() {
-  testPhases('empty stylesheet', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="">' // empty href
-        '</head></html>',
-    'a|web/test2.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet">' // no href
-        '</head></html>',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="">' // empty href
-        '</head></html>',
-    'a|web/test2.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet">' // no href
-        '</head></html>',
-  });
-
-  testPhases('shallow, inlines css', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="test2.css">'
-        '</head></html>',
-    'a|web/test2.css': 'h1 { font-size: 70px; }',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<style>h1 { font-size: 70px; }</style>'
-        '</head><body>'
-        '</body></html>',
-  });
-
-  testPhases('deep, inlines css', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="assets/b/test3.css">'
-        '</head></html>',
-    'b|asset/test3.css':
-        'body {\n  background: #eaeaea url("../../assets/b/test4.png");\n}\n'
-        '.foo {\n  background: url("../../packages/c/test5.png");\n}',
-    'b|asset/test4.png': 'PNG',
-    'c|lib/test5.png': 'PNG',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<style>'
-        'body {\n  background: #eaeaea url(assets/b/test4.png);\n}\n'
-        '.foo {\n  background: url(packages/c/test5.png);\n}'
-        '</style>'
-        '</head><body>'
-        '</body></html>',
-  });
-
-  testPhases('shallow, inlines css and preserves order', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<style>.first { color: black }</style>'
-        '<link rel="stylesheet" href="test2.css">'
-        '<style>.second { color: black }</style>'
-        '</head></html>',
-    'a|web/test2.css': 'h1 { font-size: 70px; }',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<style>.first { color: black }</style>'
-        '<style>h1 { font-size: 70px; }</style>'
-        '<style>.second { color: black }</style>'
-        '</head><body>'
-        '</body></html>',
-  });
-
-  testPhases('inlined tags keep original attributes', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="foo.css" no-shim>'
-        '<link rel="stylesheet" href="bar.css" shim-shadow foo>'
-        '</head></html>',
-    'a|web/foo.css': 'h1 { font-size: 70px; }',
-    'a|web/bar.css': 'h2 { font-size: 35px; }',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<style no-shim="">h1 { font-size: 70px; }</style>'
-        '<style shim-shadow="" foo="">h2 { font-size: 35px; }</style>'
-        '</head><body>'
-        '</body></html>',
-  });
-
-  testPhases('can configure default stylesheet inlining', [
-    [
-      new HtmlFinalizer(
-          new TransformOptions(inlineStylesheets: {'default': false}))
-    ]
-  ], {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<link rel="stylesheet" href="foo.css">'
-        '</body></html>',
-    'a|web/foo.css': 'h1 { font-size: 70px; }',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<link rel="stylesheet" href="foo.css">'
-        '</body></html>',
-  });
-
-  testPhases('can override default stylesheet inlining', [
-    [
-      new HtmlFinalizer(new TransformOptions(
-          inlineStylesheets: {
-        'default': false,
-        'web/foo.css': true,
-        'b|lib/baz.css': true,
-      }))
-    ]
-  ], {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<link rel="stylesheet" href="bar.css">'
-        '<link rel="stylesheet" href="foo.css">'
-        '<link rel="stylesheet" href="packages/b/baz.css">'
-        '<link rel="stylesheet" href="packages/c/buz.css">'
-        '</body></html>',
-    'a|web/foo.css': 'h1 { font-size: 70px; }',
-    'a|web/bar.css': 'h1 { font-size: 35px; }',
-    'b|lib/baz.css': 'h1 { font-size: 20px; }',
-    'c|lib/buz.css': 'h1 { font-size: 10px; }',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<link rel="stylesheet" href="bar.css">'
-        '<style>h1 { font-size: 70px; }</style>'
-        '<style>h1 { font-size: 20px; }</style>'
-        '<link rel="stylesheet" href="packages/c/buz.css">'
-        '</body></html>',
-  });
-
-  testLogOutput((options) => new HtmlFinalizer(options),
-      'warns about multiple inlinings of the same css', {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="packages/a/foo.css">'
-        '<link rel="stylesheet" href="packages/a/foo.css">'
-        '</head><body></body></html>',
-    'a|lib/foo.css': 'body {position: relative;}',
-  }, {}, [
-    'warning: ${CSS_FILE_INLINED_MULTIPLE_TIMES.create(
-              {'url': 'lib/foo.css'}).snippet}'
-        ' (web/test.html 0 76)',
-  ]);
-
-  testPhases('doesn\'t warn about multiple css inlinings if overriden', [
-    [
-      new HtmlFinalizer(
-          new TransformOptions(inlineStylesheets: {'lib/foo.css': true}))
-    ]
-  ], {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<link rel="stylesheet" href="packages/a/foo.css">'
-        '<link rel="stylesheet" href="packages/a/foo.css">'
-        '</head><body></body></html>',
-    'a|lib/foo.css': 'body {position: relative;}',
-  }, {}, []);
-}
-
-void urlAttributeTests() {
-  testLogOutput((options) => new HtmlFinalizer(options),
-      'warnings are given about _* attributes', {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<img src="foo/{{bar}}">'
-        '<a _href="foo/bar">test</a>'
-        '</body></html>',
-  }, {}, [
-    'warning: When using bindings with the "src" attribute you may '
-        'experience errors in certain browsers. Please use the "_src" '
-        'attribute instead. (web/test.html 0 40)',
-    'warning: The "_href" attribute is only supported when using '
-        'bindings. Please change to the "href" attribute. '
-        '(web/test.html 0 63)',
-  ]);
-}
diff --git a/packages/polymer/test/build/index_page_builder_test.dart b/packages/polymer/test/build/index_page_builder_test.dart
deleted file mode 100644
index c681893..0000000
--- a/packages/polymer/test/build/index_page_builder_test.dart
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library polymer.test.build.index_page_builder_test;
-
-import 'dart:async';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/index_page_builder.dart';
-
-import 'common.dart';
-
-final phases = [[new IndexPageBuilder(new TransformOptions())]];
-
-void main() {
-  useCompactVMConfiguration();
-
-  testPhases('outputs index pages', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/test2.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/test3.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/test4.html': '<!DOCTYPE html><html></html>',
-    'a|web/foobar/test5.html': '<!DOCTYPE html><html></html>',
-  }, {
-    'a|web/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test.html">test.html</a></li>'
-        '<li><a href="test2.html">test2.html</a></li>'
-        '<li><a href="foo/test3.html">foo/test3.html</a></li>'
-        '<li><a href="foo/bar/test4.html">foo/bar/test4.html</a></li>'
-        '<li><a href="foobar/test5.html">foobar/test5.html</a></li>'
-        '</ul></body></html>',
-    'a|web/foo/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test3.html">test3.html</a></li>'
-        '<li><a href="bar/test4.html">bar/test4.html</a></li>'
-        '</ul></body></html>',
-    'a|web/foo/bar/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test4.html">test4.html</a></li>'
-        '</ul></body></html>',
-    'a|web/foobar/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test5.html">test5.html</a></li>'
-        '</ul></body></html>',
-  });
-
-  testPhases('doesn\'t overwrite existing pages', phases, {
-    'a|web/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/test.html': '<!DOCTYPE html><html></html>',
-  }, {
-    'a|web/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
-  });
-
-  testPhases('can output pages while not overwriting existing ones', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-    'a|web/test2.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/test3.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/test4.html': '<!DOCTYPE html><html></html>',
-    'a|web/foobar/test5.html': '<!DOCTYPE html><html></html>',
-  }, {
-    'a|web/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test.html">test.html</a></li>'
-        '<li><a href="test2.html">test2.html</a></li>'
-        '<li><a href="foo/index.html">foo/index.html</a></li>'
-        '<li><a href="foo/test3.html">foo/test3.html</a></li>'
-        '<li><a href="foo/bar/index.html">foo/bar/index.html</a></li>'
-        '<li><a href="foo/bar/test4.html">foo/bar/test4.html</a></li>'
-        '<li><a href="foobar/test5.html">foobar/test5.html</a></li>'
-        '</ul></body></html>',
-    'a|web/foo/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foo/bar/index.html': '<!DOCTYPE html><html></html>',
-    'a|web/foobar/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test5.html">test5.html</a></li>'
-        '</ul></body></html>',
-  });
-
-  final entryPointPhases = [
-    [
-      new IndexPageBuilder(new TransformOptions(
-          entryPoints: [
-        'web/test1.html',
-        'test/test2.html',
-        'example/test3.html'
-      ]))
-    ]
-  ];
-
-  testPhases('can output files for any entry points', entryPointPhases, {
-    'a|web/test1.html': '<!DOCTYPE html><html></html>',
-    'a|test/test2.html': '<!DOCTYPE html><html></html>',
-    'a|example/test3.html': '<!DOCTYPE html><html></html>',
-  }, {
-    'a|web/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test1.html">test1.html</a></li>'
-        '</ul></body></html>',
-    'a|test/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test2.html">test2.html</a></li>'
-        '</ul></body></html>',
-    'a|example/index.html': '<!DOCTYPE html><html><body>'
-        '<h1>Entry points</h1><ul>'
-        '<li><a href="test3.html">test3.html</a></li>'
-        '</ul></body></html>',
-  });
-}
diff --git a/packages/polymer/test/build/linter_test.dart b/packages/polymer/test/build/linter_test.dart
deleted file mode 100644
index 0b7fe4c..0000000
--- a/packages/polymer/test/build/linter_test.dart
+++ /dev/null
@@ -1,831 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.linter_test;
-
-import 'dart:convert';
-
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/linter.dart';
-import 'package:polymer/src/build/messages.dart';
-import 'package:unittest/unittest.dart';
-
-import 'common.dart';
-
-void main() {
-  _testLinter('nothing to report', {
-    'a|lib/test.html': '<!DOCTYPE html><html></html>',
-  }, []);
-
-  group('must have proper initialization imports', () {
-    _testLinter('nothing to report (no polymer use)', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('nothing to report (no polymer use with import)', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/polymer/polymer.html">'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('nothing to report (polymer used)', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/polymer/polymer.html">'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('nothing to report (polymer imported transitively)', {
-      'a|lib/lib.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="../../packages/polymer/polymer.html">',
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/a/lib.html">'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    test('usePolymerHtmlMessage looks right', () {
-      _check(int i, String url) {
-        expect(_usePolymerHtmlMessage(i),
-            contains('<link rel="import" href="$url">'));
-      }
-      _check(0, 'packages/polymer/polymer.html');
-      _check(1, '../packages/polymer/polymer.html');
-      _check(2, '../../packages/polymer/polymer.html');
-      _check(3, '../../../packages/polymer/polymer.html');
-    });
-
-    _testLinter('missing polymer.html in web', {
-      'a|web/test.html': '<!DOCTYPE html><html>\n'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, [
-      'warning: ${_usePolymerHtmlMessage(0)} '
-          '(web/test.html 1 0)',
-    ]);
-
-    _testLinter('missing polymer.html in web/foo', {
-      'a|web/foo/test.html': '<!DOCTYPE html><html>\n'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, [
-      'warning: ${_usePolymerHtmlMessage(1)} '
-          '(web/foo/test.html 1 0)',
-    ]);
-
-    _testLinter('missing polymer.html doesn\'t warn in lib', {
-      'a|lib/test.html': '<!DOCTYPE html><html>\n'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('missing polymer.html doesn\'t warn in lib/foo/bar', {
-      'a|lib/foo/bar/test.html': '<!DOCTYPE html><html>\n'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('missing Dart code', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/polymer/polymer.html">'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, ['warning: ${MISSING_INIT_POLYMER.snippet}',]);
-
-    _testLinter('nothing to report, experimental with no Dart code', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" '
-          'href="packages/polymer/polymer_experimental.html">'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, []);
-
-    _testLinter('experimental cannot have Dart code in main document', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" '
-          'href="packages/polymer/polymer_experimental.html">\n'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, [
-      'warning: ${NO_DART_SCRIPT_AND_EXPERIMENTAL.snippet} '
-          '(web/test.html 1 0)',
-    ]);
-
-    _testLinter('missing Dart code and polymer.html', {
-      'a|web/test.html': '<!DOCTYPE html><html></html>',
-    }, ['warning: ${MISSING_INIT_POLYMER.snippet}',]);
-
-    _testLinter('dart_support unnecessary', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<script src="packages/web_components/dart_support.js"></script>'
-          '<link rel="import" href="../../packages/polymer/polymer.html">'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, [
-      'warning: ${DART_SUPPORT_NO_LONGER_REQUIRED.snippet} '
-          '(web/test.html 0 21)'
-    ]);
-
-    _testLinter('webcomponents unnecessary', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '$WEB_COMPONENTS_JS_TAG'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '</html>',
-    }, [
-      'warning: ${WEB_COMPONENTS_NO_LONGER_REQUIRED.snippet} '
-          '(web/test.html 0 21)'
-    ]);
-
-    _testLinter('platform.js -> webcomponents.js', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '$PLATFORM_JS_TAG'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '</html>',
-    }, [
-      'warning: ${PLATFORM_JS_RENAMED.snippet} '
-          '(web/test.html 0 21)'
-    ]);
-  });
-
-  group('single script tag per document', () {
-    _testLinter('two top-level tags', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/polymer/polymer.html">'
-          '<script type="application/dart" src="a.dart">'
-          '</script>\n'
-          '<script type="application/dart" src="b.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>',
-    }, ['warning: ${ONLY_ONE_TAG.snippet} (web/test.html 1 0)',]);
-
-    _testLinter('two top-level tags, non entrypoint', {
-      'a|lib/test.html': '<!DOCTYPE html><html>'
-          '<script type="application/dart" src="a.dart">'
-          '</script>\n'
-          '<script type="application/dart" src="b.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-    }, ['warning: ${ONLY_ONE_TAG.snippet} (lib/test.html 1 0)',]);
-
-    _testLinter('tags inside elements', {
-      'a|web/test.html': '<!DOCTYPE html><html>'
-          '<link rel="import" href="packages/polymer/polymer.html">'
-          '<polymer-element name="x-a">'
-          '<script type="application/dart" src="a.dart">'
-          '</script>'
-          '</polymer-element>\n'
-          '<script type="application/dart" src="b.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>',
-    }, ['warning: ${ONLY_ONE_TAG.snippet} (web/test.html 1 0)',]);
-  });
-
-  group('doctype warning', () {
-    _testLinter('in web', {'a|web/test.html': '<html></html>',}, [
-      'warning: (from html) Unexpected start tag (html). '
-          'Expected DOCTYPE. (web/test.html 0 0)',
-      'warning: ${MISSING_INIT_POLYMER.snippet}',
-    ]);
-
-    _testLinter('in lib', {'a|lib/test.html': '<html></html>',}, []);
-  });
-
-  group('duplicate polymer-elements,', () {
-    _testLinter('same file', {
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, [
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ''}).snippet} (lib/test.html 2 0)',
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ' (second definition).'}).snippet} '
-          '(lib/test.html 3 0)',
-    ]);
-
-    _testLinter('other file', {
-      'a|lib/b.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="b.html">
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, [
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ''}).snippet} (lib/b.html 2 0)',
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ' (second definition).'}).snippet} '
-          '(lib/test.html 2 0)',
-    ]);
-
-    _testLinter('non existing file', {
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <link rel="import" href="b.html">
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, [
-      'warning: ${IMPORT_NOT_FOUND.create(
-            {'path': 'lib/b.html', 'package': 'a'}).snippet} '
-          '(lib/test.html 2 0)'
-    ]);
-
-    _testLinter('other package', {
-      'b|lib/b.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/b/b.html">
-            <polymer-element name="x-a"></polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, [
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ''}).snippet} (package:b/b.html 2 0)',
-      'warning: ${DUPLICATE_DEFINITION.create(
-            {'name': 'x-a', 'second': ' (second definition).'}).snippet} '
-          '(lib/test.html 2 0)',
-    ]);
-  });
-
-  _testLinter('bad link-rel tag (href missing)', {
-    'a|lib/test.html': '''<html>
-          <link rel="import">
-          <link rel="stylesheet">
-          <link rel="foo">
-          <link rel="import" href="">
-          </html>'''.replaceAll('          ', ''),
-  }, [
-    'warning: ${MISSING_HREF.create({'rel': 'import'}).snippet} '
-        '(lib/test.html 1 0)',
-    'warning: ${MISSING_HREF.create({'rel': 'stylesheet'}).snippet} '
-        '(lib/test.html 2 0)',
-    'warning: ${MISSING_HREF.create({'rel': 'import'}).snippet} '
-        '(lib/test.html 4 0)',
-  ]);
-
-  _testLinter('<element> is not supported', {
-    'a|lib/test.html': '''<html>
-          <element name="x-a"></element>
-          </html>'''.replaceAll('          ', ''),
-  }, ['warning: ${ELEMENT_DEPRECATED_EONS_AGO.snippet} (lib/test.html 1 0)']);
-
-  _testLinter('do not nest <polymer-element>', {
-    'a|lib/test.html': '''<html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element name="x-a">
-            <template><div>
-              <polymer-element name="b"></polymer-element>
-            </div></template>
-          </polymer-element>
-          </html>'''.replaceAll('          ', ''),
-  }, ['error: ${NESTED_POLYMER_ELEMENT.snippet} (lib/test.html 4 4)']);
-
-  _testLinter('do put import inside <polymer-element>', {
-    'a|lib/b.html': '<html></html>',
-    'a|lib/test.html': '''<html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element name="x-a">
-            <link rel="import" href="b.html">
-            <template><div>
-            </div></template>
-          </polymer-element>
-          </html>'''.replaceAll('          ', ''),
-  }, ['error: ${NO_IMPORT_WITHIN_ELEMENT.snippet} (lib/test.html 3 2)']);
-
-  _testLinter('need a name for <polymer-element>', {
-    'a|lib/test.html': '''<html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element></polymer-element>
-          </html>'''.replaceAll('          ', ''),
-  }, ['error: ${MISSING_TAG_NAME.snippet} (lib/test.html 2 0)']);
-
-  _testLinter('name for <polymer-element> should have dashes', {
-    'a|lib/test.html': '''<html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element name="a"></polymer-element>
-          </html>'''.replaceAll('          ', ''),
-  }, [
-    'error: ${INVALID_TAG_NAME.create({'name': 'a'}).snippet} '
-        '(lib/test.html 2 0)'
-  ]);
-
-  _testLinter('extend is a valid element or existing tag', {
-    'a|web/test.html': '''<!DOCTYPE html><html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element name="x-a" extends="li"></polymer-element>
-          <script type="application/dart">
-            export 'package:polymer/init.dart';
-          </script>
-          </html>'''.replaceAll('          ', ''),
-  }, []);
-
-  _testLinter('extend is a valid element or existing tag', {
-    'a|web/test.html': '''<!DOCTYPE html><html>
-          <link rel="import" href="../../packages/polymer/polymer.html">
-          <polymer-element name="x-a" extends="x-b"></polymer-element>
-          <script type="application/dart">
-            export 'package:polymer/init.dart';
-          </script>
-          </html>'''.replaceAll('          ', ''),
-  }, [
-    'warning: ${CUSTOM_ELEMENT_NOT_FOUND.create({'tag': 'x-b'}).snippet} '
-        '(web/test.html 2 0)'
-  ]);
-
-  group('script type matches code', () {
-    _testLinter('top-level, .dart url', {
-      'a|lib/test.html': '''<html>
-            <script src="foo.dart"></script>
-            </html>'''.replaceAll('            ', ''),
-    }, [
-      'warning: Wrong script type, expected type="application/dart".'
-          ' (lib/test.html 1 0)'
-    ]);
-
-    _testLinter('in polymer-element, .dart url', {
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a">
-            <script src="foo.dart"></script>
-            </polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, ['warning: ${EXPECTED_DART_MIME_TYPE.snippet} (lib/test.html 3 0)']);
-
-    _testLinter('in polymer-element, .js url', {
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a">
-            <script src="foo.js"></script>
-            </polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('in polymer-element, inlined', {
-      'a|lib/test.html': '''<html>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a">
-            <script>foo...</script>
-            </polymer-element>
-            </html>'''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('top-level, dart type & .dart url', {
-      'a|lib/test.html': '''<html>
-            <script type="application/dart" src="foo.dart"></script>
-            </html>'''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('top-level, dart type & .js url', {
-      'a|lib/test.html': '''<html>
-            <script type="application/dart" src="foo.js"></script>
-            </html>'''.replaceAll('            ', ''),
-    }, ['warning: ${EXPECTED_DART_EXTENSION.snippet} (lib/test.html 1 0)']);
-  });
-
-  _testLinter('script tags should have at least src url or inline code', {
-    'a|lib/test.html': '''<html>
-          <script type="application/dart"></script>
-          </html>'''.replaceAll('          ', ''),
-  }, ['warning: ${SCRIPT_TAG_SEEMS_EMPTY.snippet} (lib/test.html 1 0)']);
-
-  _testLinter('script tags should have only src url or inline code', {
-    'a|lib/test.html': '''<html>
-          <script type="application/dart" src="foo.dart">more</script>
-          </html>'''.replaceAll('          ', ''),
-  }, [
-    'warning: ${FOUND_BOTH_SCRIPT_SRC_AND_TEXT.snippet} (lib/test.html 1 0)'
-  ]);
-
-  group('event handlers', () {
-    _testLinter('no longer warn about inline onfoo (Javascript)', {
-      'a|lib/test.html': '''<html><body>
-            <div onfoo="something"></div>
-            '''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('no longer warn about on-foo for auto-binding templates', {
-      'a|lib/test.html': '''<html><body>
-            <template is="auto-binding-dart">
-              <div on-foo="{{something}}"></div>
-              <template>
-                <div>foo</div>
-              </template>
-              <div on-foo="{{something}}"></div>
-            </template>
-            '''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('on-foo is only supported in polymer elements', {
-      'a|lib/test.html': '''<html><body>
-            <div on-foo="{{something}}"></div>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${EVENT_HANDLERS_ONLY_WITHIN_POLYMER.snippet} '
-          '(lib/test.html 1 5)'
-    ]);
-
-    _testLinter('on-foo uses the {{ binding }} syntax', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"><div on-foo="bar"></div>
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${INVALID_EVENT_HANDLER_BODY.create(
-            {'value': 'bar', 'name': 'on-foo'}).snippet} (lib/test.html 2 33)'
-    ]);
-
-    _testLinter('on-foo is not an expression', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"><div on-foo="{{bar()}}"></div>
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${INVALID_EVENT_HANDLER_BODY.create(
-            {'value': '{{bar()}}', 'name': 'on-foo'}).snippet} '
-          '(lib/test.html 2 33)'
-    ]);
-
-    _testLinter('on-foo can\'t be empty', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"><div on-foo="{{}}"></div>
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${INVALID_EVENT_HANDLER_BODY.create(
-            {'value': '{{}}', 'name': 'on-foo'}).snippet} (lib/test.html 2 33)'
-    ]);
-
-    _testLinter('on-foo can\'t be just space', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"><div on-foo="{{ }}"></div>
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${INVALID_EVENT_HANDLER_BODY.create(
-            {'value': '{{ }}', 'name': 'on-foo'}).snippet} (lib/test.html 2 33)'
-    ]);
-
-    _testLinter('on-foo-bar is supported as a custom event name', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"><div on-foo-bar="{{quux}}"></div>
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, []);
-  });
-
-  group('using custom tags', () {
-    _testLinter('tag exists (x-tag)', {
-      'a|web/test.html': '''<!DOCTYPE html>
-            <x-foo></x-foo>
-            <script type="application/dart">
-              export 'package:polymer/init.dart';
-            </script>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${CUSTOM_ELEMENT_NOT_FOUND.create({'tag': 'x-foo'}).snippet} '
-          '(web/test.html 1 0)'
-    ]);
-
-    _testLinter('tag exists (type extension)', {
-      'a|web/test.html': '''<!DOCTYPE html>
-            <div is="x-foo"></div>
-            <script type="application/dart">
-              export 'package:polymer/init.dart';
-            </script>'''.replaceAll('            ', ''),
-    }, [
-      'warning: ${CUSTOM_ELEMENT_NOT_FOUND.create({'tag': 'x-foo'}).snippet} '
-          '(web/test.html 1 0)',
-    ]);
-
-    _testLinter('tag exists (internally defined in code)', {
-      'a|lib/test.html': '<div is="auto-binding-dart"></div>',
-    }, []);
-
-    _testLinter('used correctly (no base tag)', {
-      'a|lib/test.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>
-            <x-a></x-a>
-            '''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('used incorrectly (no base tag)', {
-      'a|lib/test.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>
-            <div is="x-a"></div>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${BAD_INSTANTIATION_BOGUS_BASE_TAG.create(
-            {'tag': 'x-a', 'base': 'div'}).snippet} (lib/test.html 2 0)'
-    ]);
-
-    _testLinter('used incorrectly, imported def (no base tag)', {
-      'a|lib/b.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a"></polymer-element>''',
-      'a|lib/test.html': '''
-            <link rel="import" href="b.html">
-            <div is="x-a"></div>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${BAD_INSTANTIATION_BOGUS_BASE_TAG.create(
-            {'tag': 'x-a', 'base': 'div'}).snippet} (lib/test.html 1 0)'
-    ]);
-
-    _testLinter('used correctly (base tag)', {
-      'a|lib/b.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a" extends="div">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-      'a|lib/test.html': '''
-            <link rel="import" href="b.html">
-            <div is="x-a"></div>
-            '''.replaceAll('            ', ''),
-    }, []);
-
-    _testLinter('used incorrectly (missing base tag)', {
-      'a|lib/b.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a" extends="div">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-      'a|lib/test.html': '''
-            <link rel="import" href="b.html">
-            <x-a></x-a>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${BAD_INSTANTIATION_MISSING_BASE_TAG.create(
-            {'tag': 'x-a', 'base': 'div'}).snippet} (lib/test.html 1 0)'
-    ]);
-
-    _testLinter('used incorrectly (wrong base tag)', {
-      'a|lib/b.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a" extends="div">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-      'a|lib/test.html': '''
-            <link rel="import" href="b.html">
-            <span is="x-a"></span>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${BAD_INSTANTIATION_WRONG_BASE_TAG.create(
-            {'tag': 'x-a', 'base': 'div'}).snippet} (lib/test.html 1 0)'
-    ]);
-
-    _testLinter('used incorrectly (wrong base tag, transitive)', {
-      'a|lib/c.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-c" extends="li">
-            </polymer-element>
-            <polymer-element name="x-b" extends="x-c">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-      'a|lib/b.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <link rel="import" href="c.html">
-            <polymer-element name="x-a" extends="x-b">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-      'a|lib/test.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <link rel="import" href="b.html">
-            <span is="x-a"></span>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${BAD_INSTANTIATION_WRONG_BASE_TAG.create(
-            {'tag': 'x-a', 'base': 'li'}).snippet} (lib/test.html 2 0)'
-    ]);
-
-    _testLinter('FOUC warning works', {
-      'a|web/a.html': '''
-            <!DOCTYPE html>
-            <html><body>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <my-element>hello!</my-element>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      'a|web/b.html': '''
-            <!DOCTYPE html>
-            <html><body>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <div><my-element>hello!</my-element></div>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      'a|web/c.html': '''
-            <!DOCTYPE html>
-            <html unresolved><body>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <my-element>hello!</my-element>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            '''
-    }, [
-      'warning: ${POSSIBLE_FUOC.snippet} (web/a.html 4 14)',
-      'warning: ${POSSIBLE_FUOC.snippet} (web/b.html 4 19)',
-      'warning: ${POSSIBLE_FUOC.snippet} (web/c.html 4 14)',
-    ]);
-
-    _testLinter('FOUC, no false positives.', {
-      // Parent has unresolved attribute.
-      'a|web/a.html': '''
-            <!DOCTYPE html>
-            <html><body>
-              <div unresolved>
-                <link rel="import" href="../../packages/polymer/polymer.html">
-                <polymer-element name="my-element" noscript></polymer-element>
-                <my-element>hello!</my-element>
-              </div>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      // Body has unresolved attribute.
-      'a|web/b.html': '''
-            <!DOCTYPE html>
-            <html><body unresolved>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <my-element>hello!</my-element>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      // Inside polymer-element tags its fine.
-      'a|web/c.html': '''
-            <!DOCTYPE html>
-            <html><body>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <polymer-element name="foo-element">
-                <template><my-element>hello!</my-element></template>
-              </polymer-element>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      // Empty custom elements are fine.
-      'a|web/d.html': '''
-            <!DOCTYPE html>
-            <html><body>
-              <link rel="import" href="../../packages/polymer/polymer.html">
-              <polymer-element name="my-element" noscript></polymer-element>
-              <my-element></my-element>
-              <script type="application/dart">
-                export "package:polymer/init.dart";
-              </script>
-            </body></html>
-            ''',
-      // Entry points only!
-      'a|lib/a.html': '''
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="my-element" noscript></polymer-element>
-            <my-element>hello!</my-element>
-            ''',
-    }, []);
-  });
-
-  group('custom attributes', () {
-    _testLinter('foo-bar is no longer supported in attributes', {
-      'a|lib/test.html': '''<html><body>
-            <link rel="import" href="../../packages/polymer/polymer.html">
-            <polymer-element name="x-a" attributes="foo-bar">
-            </polymer-element>
-            '''.replaceAll('            ', ''),
-    }, [
-      'warning: ${NO_DASHES_IN_CUSTOM_ATTRIBUTES.create(
-            {'name': 'foo-bar', 'alternative': '"fooBar" or "foobar"'})
-                .snippet} (lib/test.html 2 28)'
-    ]);
-  });
-
-  _testLinter("namespaced attributes don't cause an internal error", {
-    'a|lib/test.html': '''<html><body>
-          <svg xmlns="http://www.w3.org/2000/svg" width="520" height="350">
-          </svg>
-          '''.replaceAll('            ', ''),
-  }, []);
-
-  group('output logs to file', () {
-    final outputLogsPhases = [
-      [
-        new Linter(new TransformOptions(
-            injectBuildLogsInOutput: true, releaseMode: false))
-      ]
-    ];
-
-    testPhases("logs are output to file", outputLogsPhases, {
-      'a|web/test.html': '<!DOCTYPE html><html>\n'
-          '<polymer-element name="x-a"></polymer-element>'
-          '<script type="application/dart" src="foo.dart">'
-          '</script>'
-          '<script src="packages/browser/dart.js"></script>'
-          '</html>',
-    }, {
-      'a|web/test.html._buildLogs.1': '{"polymer#3":[{'
-          '"level":"Warning",'
-          '"message":{'
-          '"id":"polymer#3",'
-          '"snippet":"${_usePolymerHtmlMessage(0).replaceAll('"','\\"')}"'
-          '},'
-          '"span":{'
-          '"start":{'
-          '"url":"web/test.html",'
-          '"offset":22,'
-          '"line":1,'
-          '"column":0'
-          '},'
-          '"end":{'
-          '"url":"web/test.html",'
-          '"offset":50,'
-          '"line":1,'
-          '"column":28'
-          '},'
-          '"text":"<polymer-element name=\\"x-a\\">"'
-          '}'
-          '}]}',
-    }, [
-      // Logs should still make it to barback too.
-      'warning: ${_usePolymerHtmlMessage(0)} (web/test.html 1 0)',
-    ]);
-  });
-}
-
-_usePolymerHtmlMessage(int i) {
-  var prefix = '../' * i;
-  return USE_POLYMER_HTML.create({'reachOutPrefix': prefix}).snippet;
-}
-
-_testLinter(String name, Map inputFiles, List outputMessages,
-    [bool solo = false]) {
-  var outputFiles = {};
-  if (outputMessages.every((m) => m.startsWith('warning:'))) {
-    inputFiles.forEach((k, v) => outputFiles[k] = v);
-  }
-  if (outputMessages.isEmpty) {
-    var linter = new Linter(new TransformOptions());
-    testPhases(name, [[linter]], inputFiles, outputFiles, outputMessages, solo);
-  } else {
-    testLogOutput((options) => new Linter(options), name, inputFiles,
-        outputFiles, outputMessages, solo);
-  }
-}
diff --git a/packages/polymer/test/build/log_injector_test.dart b/packages/polymer/test/build/log_injector_test.dart
deleted file mode 100644
index ca251e3..0000000
--- a/packages/polymer/test/build/log_injector_test.dart
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/src/build/log_injector.dart';
-
-main() {
-  useHtmlConfiguration();
-
-  setUp(() => new LogInjector().injectLogs('''{
-        "polymer#0":[{
-            "level":"Info",
-            "message":{"id":"polymer#0","snippet":"foo"}}
-        ],
-        "polymer#1":[{
-            "level":"Info",
-            "message":{"id":"polymer#1","snippet":"foo"},
-            "span":{
-              "start":{
-                "url":"web/test.html",
-                "offset":22,
-                "line":1,
-                "column":0
-              },
-              "end":{
-                "url":"web/test.html",
-                "offset":50,
-                "line":1,
-                "column":28
-              },
-              "text":"<polymer-element name=\\"x-a\\">"
-            }
-          }],
-        "polymer#2":[
-            {"level":"Warning","message":{"id":"polymer#2","snippet":"bar"}},
-            {"level":"Warning","message":{"id":"polymer#2",
-             "snippet":"bar again"}},
-            {"level":"Error","message":{"id":"polymer#2","snippet":"baz1"}}
-        ],
-        "foo#44":[{"level":"Error","message":{"id":"foo#44","snippet":"baz2"}}]
-      }'''));
-
-  test('can inject a functioning log widget', () {
-    var logsElement = document.querySelector(".build-logs");
-    expect(logsElement, isNotNull);
-
-    var menuElements = logsElement.querySelectorAll(".menu > div");
-    expect(menuElements.length, 3);
-    var contentElements = logsElement.querySelectorAll(".content > div");
-    expect(contentElements.length, 3);
-
-    var expectedClasses = ['info', 'warning', 'error'];
-
-    // Check initial setup.
-    for (var i = 0; i < menuElements.length; ++i) {
-      expect(menuElements[i].classes.contains(expectedClasses[i]), true);
-      expect(menuElements[i].classes.contains('active'), false);
-      expect(contentElements[i].classes.contains(expectedClasses[i]), true);
-      expect(contentElements[i].classes.contains('active'), false);
-      expect(contentElements[i].querySelectorAll('.log').length, 2);
-    }
-
-    // Test clicking each of the tabs.
-    for (var i = 0; i < menuElements.length; ++i) {
-      menuElements[i].click();
-      for (var j = 0; j < menuElements.length; ++j) {
-        expect(menuElements[j].classes.contains('active'), j == i);
-        expect(contentElements[j].classes.contains('active'), j == i);
-      }
-    }
-
-    // Test toggling same tab.
-    expect(menuElements[2].classes.contains('active'), true);
-    menuElements[2].click();
-    expect(menuElements[2].classes.contains('active'), false);
-    expect(contentElements[2].classes.contains('active'), false);
-  });
-}
diff --git a/packages/polymer/test/build/polyfill_injector_test.dart b/packages/polymer/test/build/polyfill_injector_test.dart
deleted file mode 100644
index 5f52ed5..0000000
--- a/packages/polymer/test/build/polyfill_injector_test.dart
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.polyfill_injector_test;
-
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/polyfill_injector.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-
-import 'common.dart';
-
-void main() {
-  useCompactVMConfiguration();
-
-  group('js', () => runTests());
-  group('dart', () => runTests(js: false));
-}
-
-void runTests({bool js: true}) {
-  var phases =
-      [[new PolyfillInjector(new TransformOptions(directlyIncludeJS: js))]];
-
-  var ext = js ? '.js' : '';
-  var type = js ? '' : 'type="application/dart" ';
-  var dartJsTag = js ? '' : DART_JS_TAG;
-  var async = js ? ' async=""' : '';
-
-  testPhases('no changes', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-  }, {'a|web/test.html': '<!DOCTYPE html><html></html>',});
-
-  testPhases('no changes under lib ', phases, {
-    'a|lib/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-  }, {
-    'a|lib/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-  });
-
-  testPhases('with some script', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('interop/shadow dom already present', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script type="application/dart" src="a.dart"></script>'
-        '$dartJsTag'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('dart_support.js after webcomponents.js, web_components present',
-      phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$WEB_COMPONENTS_JS_TAG'
-        '</head><body>'
-        '<script type="application/dart" src="a.dart"></script>'
-        '$dartJsTag'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('dart_support.js after webcomponents.js, dart_support present',
-      phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$DART_SUPPORT_TAG'
-        '</head><body>'
-        '<script type="application/dart" src="a.dart"></script>'
-        '$dartJsTag'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('polyfills after base tags', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<base href="/">'
-        '</head><body>'
-        '<script type="application/dart" src="a.dart"></script>'
-        '$dartJsTag'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<base href="/">'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('platform.js -> webcomponents.js', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$PLATFORM_JS_TAG'
-        '</head><body>'
-        '<script type="application/dart" src="a.dart"></script>'
-        '$dartJsTag'
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$COMPATIBILITY_JS_TAGS'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  testPhases('in subfolder', phases, {
-    'a|web/sub/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-  }, {
-    'a|web/sub/test.html': '<!DOCTYPE html><html><head>'
-        '${COMPATIBILITY_JS_TAGS.replaceAll('packages', '../packages')}'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-
-  var noWebComponentsPhases = [
-    [
-      new PolyfillInjector(new TransformOptions(
-          directlyIncludeJS: js, injectWebComponentsJs: false))
-    ]
-  ];
-
-  testPhases('with no webcomponents.js', noWebComponentsPhases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head></head><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '$DART_SUPPORT_TAG'
-        '</head><body>'
-        '<script ${type}src="a.dart$ext"$async></script>'
-        '$dartJsTag'
-        '</body></html>',
-  });
-}
diff --git a/packages/polymer/test/build/polymer_smoke_generator_test.dart b/packages/polymer/test/build/polymer_smoke_generator_test.dart
deleted file mode 100644
index 7a115c1..0000000
--- a/packages/polymer/test/build/polymer_smoke_generator_test.dart
+++ /dev/null
@@ -1,749 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.polymer_smoke_generator_test;
-
-import 'package:code_transformers/tests.dart'
-    show testingDartSdkDirectory, StringFormatter;
-import 'package:polymer/src/build/common.dart';
-import 'package:polymer/src/build/messages.dart';
-import 'package:polymer/src/build/polymer_smoke_generator.dart';
-import 'package:smoke/codegen/generator.dart' show DEFAULT_IMPORTS;
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-
-import 'common.dart';
-
-void main() {
-  useCompactVMConfiguration();
-  var phases = [
-    [
-      new PolymerSmokeGeneratorTransformer(new TransformOptions(),
-          sdkDir: testingDartSdkDirectory)
-    ]
-  ];
-  group('initializers', () => initializerTests(phases));
-  group('codegen', () => codegenTests(phases));
-  group('log element injection', logElementInjectionTests);
-}
-
-initializerTests(phases) {
-  testPhases('no changes', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-  }, {'a|web/test.html': '<!DOCTYPE html><html></html>',});
-
-  testPhases('no changes outside web/', phases, {
-    'a|lib/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-  }, {
-    'a|lib/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-  });
-
-  testPhases('single script', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'main(){}',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="test.html_bootstrap.dart">'
-        '</script>'
-        '</head><body></body></html>',
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                declarations: {
-                  smoke_0.PolymerElement: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'main(){}',
-  });
-
-  testPhases('simple initialization', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '}\n'
-        'main(){}',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {},
-                  smoke_0.PolymerElement: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  testPhases('simple initialization of imports and exports', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': '''
-        library a;
-        import "package:polymer/polymer.dart";
-        import 'b.dart';
-
-        @CustomTag("x-a")
-        class XA extends PolymerElement {}
-        main(){}'''.replaceAll('\n        ', '\n'),
-    'a|web/b.dart': '''
-        library b;
-        import "package:polymer/polymer.dart";
-        export 'c.dart';
-
-        @CustomTag("x-b")
-        class XB extends PolymerElement {}
-        ''',
-    'a|web/c.dart': '''
-        library c;
-        import "package:polymer/polymer.dart";
-
-        @CustomTag("x-c")
-        class XC extends PolymerElement {}
-        ''',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-        import 'a.dart' as i0;
-        ${DEFAULT_IMPORTS.join('\n')}
-        import 'package:polymer/polymer.dart' as smoke_0;
-        import 'c.dart' as smoke_1;
-        import 'b.dart' as smoke_2;
-        import 'a.dart' as smoke_3;
-
-        main() {
-          useGeneratedCode(new StaticConfiguration(
-              checkedMode: false,
-              parents: {
-                smoke_3.XA: smoke_0.PolymerElement,
-                smoke_2.XB: smoke_0.PolymerElement,
-                smoke_1.XC: smoke_0.PolymerElement,
-              },
-              declarations: {
-                smoke_3.XA: {},
-                smoke_2.XB: {},
-                smoke_1.XC: {},
-                smoke_0.PolymerElement: {},
-              }));
-          configureForDeployment();
-          return i0.main();
-        }
-        '''.replaceAll('\n        ', '\n'),
-  });
-
-  testPhases('use const expressions', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/b.dart': 'library a;\n'
-        'const x = "x";\n',
-    'a|web/c.dart': 'part of a;\n'
-        'const dash = "-";\n',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'import "b.dart";\n'
-        'part "c.dart";\n'
-        'const letterO = "o";\n'
-        '@CustomTag("\$x\${dash}f\${letterO}o2")\n'
-        'class XFoo extends PolymerElement {\n'
-        '}\n',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {},
-                  smoke_0.PolymerElement: {},
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  testLogOutput((options) => new PolymerSmokeGeneratorTransformer(options,
-      sdkDir: testingDartSdkDirectory), 'invalid const expression logs', {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("\${x}-foo")\n' // invalid, x is not defined
-        'class XFoo extends PolymerElement {\n'
-        '}\n'
-        'main(){}',
-  }, {}, [
-    'warning: ${INVALID_ANNOTATION_ARGUMENT.create(
-            {'name': 'CustomTag'}).snippet} (web/a.dart 2 11)',
-  ]);
-
-  testPhases('invalid const expression', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("\${x}-foo")\n' // invalid, x is not defined
-        'class XFoo extends PolymerElement {\n'
-        '}\n'
-        'main(){}',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-            import 'a.dart' as i0;
-            ${DEFAULT_IMPORTS.join('\n')}
-            import 'package:polymer/polymer.dart' as smoke_0;
-            import 'a.dart' as smoke_1;
-
-            main() {
-              useGeneratedCode(new StaticConfiguration(
-                  checkedMode: false,
-                  parents: {
-                    smoke_1.XFoo: smoke_0.PolymerElement,
-                  },
-                  declarations: {
-                    smoke_1.XFoo: {},
-                    smoke_0.PolymerElement: {},
-                  }));
-              configureForDeployment();
-              return i0.main();
-            }
-            '''.replaceAll('\n            ', '\n'),
-  });
-
-  testPhases('no polymer import (warning, but no crash)', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.broken.import.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '}\n'
-        'main(){}',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="test.html_bootstrap.dart">'
-        '</script></head><body></body></html>',
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  }, ['warning: ${MISSING_POLYMER_DART.snippet}']);
-}
-
-codegenTests(phases) {
-  testPhases('bindings', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html>'
-        '<head>'
-        '<link rel="import" href="foo_remote.html">'
-        '</head><body>'
-        '<polymer-element name="foo-bar"><template>'
-        '<div>{{a.node}}</div>'
-        '<div>{{ anotherNode }}</div>' // extra space inside bindings is OK
-        '<div>{{a.call1(a)}}</div>'
-        '<div>{{call2(a)}}</div>'
-        '<div>{{}}</div>' // empty bindings are ignored
-        '<div>{{ }}</div>'
-        '<div class="{{an.attribute}}"></div>'
-        '<a href="path/{{within.an.attribute}}/foo/bar"></a>'
-        '<div data-attribute="{{anotherAttribute}}"></div>'
-        // input and custom-element attributes are treated as 2-way bindings:
-        '<input value="{{this.iS.twoWay}}">'
-        '<input value="{{this.iS.twoWayInt | intToStringTransformer}}">'
-        '<something-else my-attribute="{{here.too}}"></something-else>'
-        '<div on-click="{{methodName}}"></div>'
-        '<div on-click="{{ methodName2 }}"></div>' // extra space is OK
-        // empty handlers are invalid, but we still produce valid output.
-        '<div on-click="{{}}"></div>'
-        '<div on-click="{{ }}"></div>'
-        '</template></polymer-element>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/foo_remote.html': '<polymer-element name="foo-remote"><template>'
-        '<div>{{remoteValue}}</div>'
-        '</template></polymer-element>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'main(){}',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                getters: {
-                  #a: (o) => o.a,
-                  #an: (o) => o.an,
-                  #anotherAttribute: (o) => o.anotherAttribute,
-                  #anotherNode: (o) => o.anotherNode,
-                  #attribute: (o) => o.attribute,
-                  #call1: (o) => o.call1,
-                  #call2: (o) => o.call2,
-                  #here: (o) => o.here,
-                  #iS: (o) => o.iS,
-                  #intToStringTransformer: (o) => o.intToStringTransformer,
-                  #methodName: (o) => o.methodName,
-                  #methodName2: (o) => o.methodName2,
-                  #node: (o) => o.node,
-                  #remoteValue: (o) => o.remoteValue,
-                  #too: (o) => o.too,
-                  #twoWay: (o) => o.twoWay,
-                  #twoWayInt: (o) => o.twoWayInt,
-                  #within: (o) => o.within,
-                },
-                setters: {
-                  #too: (o, v) { o.too = v; },
-                  #twoWay: (o, v) { o.twoWay = v; },
-                  #twoWayInt: (o, v) { o.twoWayInt = v; },
-                },
-                declarations: {
-                  smoke_0.PolymerElement: {},
-                },
-                names: {
-                  #a: r'a',
-                  #an: r'an',
-                  #anotherAttribute: r'anotherAttribute',
-                  #anotherNode: r'anotherNode',
-                  #attribute: r'attribute',
-                  #call1: r'call1',
-                  #call2: r'call2',
-                  #here: r'here',
-                  #iS: r'iS',
-                  #intToStringTransformer: r'intToStringTransformer',
-                  #methodName: r'methodName',
-                  #methodName2: r'methodName2',
-                  #node: r'node',
-                  #remoteValue: r'remoteValue',
-                  #too: r'too',
-                  #twoWay: r'twoWay',
-                  #twoWayInt: r'twoWayInt',
-                  #within: r'within',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  computedDeclaration(name, expr) =>
-      '#$name: const Declaration(#$name, Object, kind: PROPERTY,'
-      ' isFinal: true, annotations: const [const smoke_0.ComputedProperty'
-      '(\'$expr\')])';
-
-  testPhases('computed properties', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><body>'
-        '<polymer-element name="x-foo"><template>'
-        '</template></polymer-element>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '  @ComputedProperty("ta.tb")\n'
-        '  get pa => readValue(#pa);\n'
-        '  @ComputedProperty(" tc ")\n' // extra space inside is OK
-        '  get pb => null;\n'
-        '  @ComputedProperty("td.m1(te)")\n'
-        '  get pc => null;\n'
-        '  @ComputedProperty("m2(tf)")\n'
-        '  get pd => null;\n'
-        '  @ComputedProperty("")\n' // empty is ignored
-        '  get pe => null;\n'
-        '  @ComputedProperty(" ")\n'
-        '  get pf => null;\n'
-        '  @ComputedProperty("tg + th")\n'
-        '  get pg => null;\n'
-        '  @ComputedProperty("ti.tj | tk")\n'
-        '  get ph => null;\n'
-        '}\n'
-        'main(){}',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                getters: {
-                  #m1: (o) => o.m1,
-                  #m2: (o) => o.m2,
-                  #pa: (o) => o.pa,
-                  #pb: (o) => o.pb,
-                  #pc: (o) => o.pc,
-                  #pd: (o) => o.pd,
-                  #pe: (o) => o.pe,
-                  #pf: (o) => o.pf,
-                  #pg: (o) => o.pg,
-                  #ph: (o) => o.ph,
-                  #ta: (o) => o.ta,
-                  #tb: (o) => o.tb,
-                  #tc: (o) => o.tc,
-                  #td: (o) => o.td,
-                  #te: (o) => o.te,
-                  #tf: (o) => o.tf,
-                  #tg: (o) => o.tg,
-                  #th: (o) => o.th,
-                  #ti: (o) => o.ti,
-                  #tj: (o) => o.tj,
-                  #tk: (o) => o.tk,
-                },
-                setters: {
-                  #tb: (o, v) { o.tb = v; },
-                  #tc: (o, v) { o.tc = v; },
-                  #tj: (o, v) { o.tj = v; },
-                },
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {
-                    ${computedDeclaration('pa', 'ta.tb')},
-                    ${computedDeclaration('pb', ' tc ')},
-                    ${computedDeclaration('pc', 'td.m1(te)')},
-                    ${computedDeclaration('pd', 'm2(tf)')},
-                    ${computedDeclaration('pe', '')},
-                    ${computedDeclaration('pf', ' ')},
-                    ${computedDeclaration('pg', 'tg + th')},
-                    ${computedDeclaration('ph', 'ti.tj | tk')},
-                  },
-                  smoke_0.PolymerElement: {},
-                },
-                names: {
-                  #m1: r'm1',
-                  #m2: r'm2',
-                  #pa: r'pa',
-                  #pb: r'pb',
-                  #pc: r'pc',
-                  #pd: r'pd',
-                  #pe: r'pe',
-                  #pf: r'pf',
-                  #pg: r'pg',
-                  #ph: r'ph',
-                  #ta: r'ta',
-                  #tb: r'tb',
-                  #tc: r'tc',
-                  #td: r'td',
-                  #te: r'te',
-                  #tf: r'tf',
-                  #tg: r'tg',
-                  #th: r'th',
-                  #ti: r'ti',
-                  #tj: r'tj',
-                  #tk: r'tk',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  final field1Details = "annotations: const [smoke_0.published]";
-  final field3Details = "isFinal: true, annotations: const [smoke_0.published]";
-  final prop1Details = "kind: PROPERTY, annotations: const [smoke_0.published]";
-  final prop3Details =
-      "kind: PROPERTY, isFinal: true, annotations: const [smoke_0.published]";
-  testPhases('published via annotation', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><body>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '  @published int field1;\n'
-        '  int field2;\n'
-        '  @published final int field3;\n'
-        '  final int field4;\n'
-        '  @published int get prop1 => 1;\n'
-        '  set prop1(int x) {};\n'
-        '  int get prop2 => 2;\n'
-        '  set prop2(int x) {};\n'
-        '  @published int get prop3 => 3;\n'
-        '  int get prop4 => 4;\n'
-        '  @published int method1() => 1;\n'
-        '  int method2() => 2;\n'
-        '}\n',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                getters: {
-                  #field1: (o) => o.field1,
-                  #field3: (o) => o.field3,
-                  #prop1: (o) => o.prop1,
-                  #prop3: (o) => o.prop3,
-                },
-                setters: {
-                  #field1: (o, v) { o.field1 = v; },
-                  #prop1: (o, v) { o.prop1 = v; },
-                },
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {
-                    #field1: const Declaration(#field1, int, $field1Details),
-                    #field3: const Declaration(#field3, int, $field3Details),
-                    #prop1: const Declaration(#prop1, int, $prop1Details),
-                    #prop3: const Declaration(#prop3, int, $prop3Details),
-                  },
-                  smoke_0.PolymerElement: {},
-                },
-                names: {
-                  #field1: r'field1',
-                  #field3: r'field3',
-                  #prop1: r'prop1',
-                  #prop3: r'prop3',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  testPhases('published via attributes', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><body>'
-        '<polymer-element name="x-foo" attributes="field1,prop2">'
-        '</polymer-element>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '  int field1;\n'
-        '  int field2;\n'
-        '  int get prop1 => 1;\n'
-        '  set prop1(int x) {};\n'
-        '  int get prop2 => 2;\n'
-        '  set prop2(int x) {};\n'
-        '}\n',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                getters: {
-                  #field1: (o) => o.field1,
-                  #prop2: (o) => o.prop2,
-                },
-                setters: {
-                  #field1: (o, v) { o.field1 = v; },
-                  #prop2: (o, v) { o.prop2 = v; },
-                },
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {
-                    #field1: const Declaration(#field1, int),
-                    #prop2: const Declaration(#prop2, int, kind: PROPERTY),
-                  },
-                  smoke_0.PolymerElement: {},
-                },
-                names: {
-                  #field1: r'field1',
-                  #prop2: r'prop2',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  final fooDetails =
-      "kind: METHOD, annotations: const [const smoke_0.ObserveProperty('x')]";
-  final xChangedDetails = "Function, kind: METHOD";
-  testPhases('ObserveProperty and *Changed methods', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><body>'
-        '</polymer-element>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '  int x;\n'
-        '  void xChanged() {}\n'
-        '  void attributeChanged() {}\n' // should be excluded
-        '  @ObserveProperty("x")'
-        '  void foo() {}\n'
-        '}\n',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                getters: {
-                  #foo: (o) => o.foo,
-                  #xChanged: (o) => o.xChanged,
-                },
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {
-                    #foo: const Declaration(#foo, Function, $fooDetails),
-                    #xChanged: const Declaration(#xChanged, $xChangedDetails),
-                  },
-                  smoke_0.PolymerElement: {},
-                },
-                names: {
-                  #foo: r'foo',
-                  #xChanged: r'xChanged',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-
-  final rcDetails = "#registerCallback, Function, kind: METHOD, isStatic: true";
-  testPhases('register callback is included', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html><body>'
-        '</polymer-element>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        '@CustomTag("x-foo")\n'
-        'class XFoo extends PolymerElement {\n'
-        '  static registerCallback() {};\n'
-        '  static foo() {};\n'
-        '}\n',
-  }, {
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-          import 'a.dart' as smoke_1;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                parents: {
-                  smoke_1.XFoo: smoke_0.PolymerElement,
-                },
-                declarations: {
-                  smoke_1.XFoo: {
-                    #registerCallback: const Declaration($rcDetails),
-                  },
-                  smoke_0.PolymerElement: {},
-                },
-                staticMethods: {
-                  smoke_1.XFoo: {
-                    #registerCallback: smoke_1.XFoo.registerCallback,
-                  },
-                },
-                names: {
-                  #registerCallback: r'registerCallback',
-                }));
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-  });
-}
-
-void logElementInjectionTests() {
-  final outputLogsPhases = [
-    [
-      new PolymerSmokeGeneratorTransformer(new TransformOptions(
-              injectBuildLogsInOutput: true, releaseMode: false),
-          sdkDir: testingDartSdkDirectory)
-    ]
-  ];
-
-  testPhases('Injects logging element and styles', outputLogsPhases, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" src="a.dart"></script>',
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'main(){}',
-  }, {
-    'a|web/test.html': '<!DOCTYPE html><html><head>'
-        '<script type="application/dart" '
-        'src="test.html_bootstrap.dart"></script>'
-        '<link rel="stylesheet" type="text/css" '
-        'href="packages/polymer/src/build/log_injector.css">'
-        '</head><body>'
-        '</body></html>',
-    'a|web/test.html_bootstrap.dart': '''$MAIN_HEADER
-          import 'package:polymer/src/build/log_injector.dart';
-          import 'a.dart' as i0;
-          ${DEFAULT_IMPORTS.join('\n')}
-          import 'package:polymer/polymer.dart' as smoke_0;
-
-          main() {
-            useGeneratedCode(new StaticConfiguration(
-                checkedMode: false,
-                declarations: {
-                  smoke_0.PolymerElement: {},
-                }));
-            new LogInjector().injectLogsFromUrl('test.html._buildLogs');
-            configureForDeployment();
-            return i0.main();
-          }
-          '''.replaceAll('\n          ', '\n'),
-    'a|web/a.dart': 'library a;\n'
-        'import "package:polymer/polymer.dart";\n'
-        'main(){}',
-  });
-}
diff --git a/packages/polymer/test/build/static_clean_test.dart b/packages/polymer/test/build/static_clean_test.dart
deleted file mode 100644
index 2fa62a9..0000000
--- a/packages/polymer/test/build/static_clean_test.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.build.static_clean_test;
-
-import 'package:polymer/builder.dart';
-
-_unused() => build;
-
-void main() {
-  // Check that builder.dart is statically clean. Nothing to do.
-}
diff --git a/packages/polymer/test/build/unique_message_test.dart b/packages/polymer/test/build/unique_message_test.dart
deleted file mode 100644
index 3a69834..0000000
--- a/packages/polymer/test/build/unique_message_test.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests for some of the utility helper functions used by the compiler.
-library polymer.test.build.messages_test;
-
-import 'dart:mirrors';
-
-import 'package:unittest/unittest.dart';
-import 'package:code_transformers/messages/messages.dart' show Message;
-
-import 'package:code_transformers/src/messages.dart' as p1;
-import 'package:polymer/src/build/messages.dart' as p2;
-
-/// [p1] and [p2] are accessed via mirrors, this comment prevents the analyzer
-/// from complaining about it.
-main() {
-  test('each message id is unique', () {
-    var seen = {};
-    int total = 0;
-    var mirrors = currentMirrorSystem();
-    _check(Symbol libName) {
-      var lib = mirrors.findLibrary(libName);
-      expect(lib, isNotNull);
-      lib.declarations.forEach((symbol, decl) {
-        if (decl is! VariableMirror) return;
-        var field = lib.getField(symbol).reflectee;
-        var name = MirrorSystem.getName(symbol);
-        if (field is! Message) return;
-        var id = field.id;
-        expect(seen.containsKey(id), isFalse, reason: 'Duplicate id `$id`. '
-            'Currently set for both `$name` and `${seen[id]}`.');
-        seen[id] = name;
-        total++;
-      });
-    }
-    _check(#polymer.src.build.messages);
-    _check(#code_transformers.src.messages);
-    expect(seen.length, total);
-  });
-}
diff --git a/packages/polymer/test/build/utils_test.dart b/packages/polymer/test/build/utils_test.dart
deleted file mode 100644
index 8aa3bdd..0000000
--- a/packages/polymer/test/build/utils_test.dart
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Tests for some of the utility helper functions used by the compiler.
-library polymer.test.utils_test;
-
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:polymer/src/build/utils.dart';
-
-main() {
-  useCompactVMConfiguration();
-
-  for (bool startUppercase in [false, true]) {
-    Matcher caseEquals(String str) {
-      if (startUppercase) str = str[0].toUpperCase() + str.substring(1);
-      return equals(str);
-    }
-
-    camelCase(str) => toCamelCase(str, startUppercase: startUppercase);
-
-    group('toCamelCase startUppercase=$startUppercase', () {
-      test('empty', () {
-        expect(camelCase(''), equals(''));
-      });
-
-      test('single token', () {
-        expect(camelCase('a'), caseEquals('a'));
-        expect(camelCase('ab'), caseEquals('ab'));
-        expect(camelCase('Ab'), caseEquals('Ab'));
-        expect(camelCase('AB'), caseEquals('AB'));
-        expect(camelCase('long_word'), caseEquals('long_word'));
-      });
-
-      test('dashes in the middle', () {
-        expect(camelCase('a-b'), caseEquals('aB'));
-        expect(camelCase('a-B'), caseEquals('aB'));
-        expect(camelCase('A-b'), caseEquals('AB'));
-        expect(camelCase('long-word'), caseEquals('longWord'));
-      });
-
-      test('leading/trailing dashes', () {
-        expect(camelCase('-hi'), caseEquals('Hi'));
-        expect(camelCase('hi-'), caseEquals('hi'));
-        expect(camelCase('hi-friend-'), caseEquals('hiFriend'));
-      });
-
-      test('consecutive dashes', () {
-        expect(camelCase('--hi-friend'), caseEquals('HiFriend'));
-        expect(camelCase('hi--friend'), caseEquals('hiFriend'));
-        expect(camelCase('hi-friend--'), caseEquals('hiFriend'));
-      });
-    });
-  }
-
-  group('toHyphenedName', () {
-    test('empty', () {
-      expect(toHyphenedName(''), '');
-    });
-
-    test('all lower case', () {
-      expect(toHyphenedName('a'), 'a');
-      expect(toHyphenedName('a-b'), 'a-b');
-      expect(toHyphenedName('aBc'), 'a-bc');
-      expect(toHyphenedName('abC'), 'ab-c');
-      expect(toHyphenedName('abc-d'), 'abc-d');
-      expect(toHyphenedName('long_word'), 'long_word');
-    });
-
-    test('capitalized letters in the middle/end', () {
-      expect(toHyphenedName('aB'), 'a-b');
-      expect(toHyphenedName('longWord'), 'long-word');
-    });
-
-    test('leading capital letters', () {
-      expect(toHyphenedName('Hi'), 'hi');
-      expect(toHyphenedName('Hi-'), 'hi-');
-      expect(toHyphenedName('HiFriend'), 'hi-friend');
-    });
-
-    test('consecutive capital letters', () {
-      expect(toHyphenedName('aBC'), 'a-b-c');
-    });
-  });
-}
diff --git a/packages/polymer/test/computed_properties_test.dart b/packages/polymer/test/computed_properties_test.dart
deleted file mode 100644
index 4c271df..0000000
--- a/packages/polymer/test/computed_properties_test.dart
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-// Test ported from:
-// https://github.com/Polymer/polymer-dev/blob/0.3.4/test/html/computedProperties.html
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  // Left like this to illustrate the old-style @published pattern next to the
-  // new style below.
-  @published int count;
-
-  @published
-  String get foo => readValue(#foo);
-  set foo(String v) => writeValue(#foo, v);
-
-  @published
-  String get bar => readValue(#bar);
-  set bar(String v) => writeValue(#bar, v);
-
-  @ComputedProperty('repeat(fooBar, count)')
-  String get fooBarCounted => readValue(#fooBarCounted);
-
-  @ComputedProperty('foo + "-" + bar')
-  String get fooBar => readValue(#fooBar);
-
-  @ComputedProperty('this.foo')
-  String get foo2 => readValue(#foo2);
-  set foo2(v) => writeValue(#foo2, v);
-
-  @ComputedProperty('bar + ""')
-  String get bar2 => readValue(#bar2);
-  set bar2(v) => writeValue(#bar2, v);
-
-  repeat(String s, int count) {
-    var sb = new StringBuffer();
-    for (var i = 0; i < count; i++) {
-      if (i > 0) sb.write(' ');
-      sb.write(s);
-      sb.write('($i)');
-    }
-    return sb.toString();
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('computed properties basic', () {
-    var xFoo = querySelector('x-foo');
-    var html = xFoo.shadowRoot.innerHtml;
-    expect(html, 'mee-too:mee-too(0) mee-too(1) mee-too(2)');
-    expect(xFoo.fooBar, 'mee-too');
-  });
-
-  // Dart note: the following tests were not in the original JS test.
-  test('computed properties can be updated', () {
-    var xFoo = querySelector('x-foo');
-    expect(xFoo.foo, 'mee');
-    expect(xFoo.foo2, 'mee');
-    xFoo.foo2 = 'hi';
-    expect(xFoo.foo, 'hi');
-    expect(xFoo.foo2, 'hi');
-  });
-
-  test('only assignable expressions can be updated', () {
-    var xFoo = querySelector('x-foo');
-    expect(xFoo.bar, 'too');
-    expect(xFoo.bar2, 'too');
-    xFoo.bar2 = 'hi';
-    expect(xFoo.bar, 'too');
-    expect(xFoo.bar2, 'too');
-  });
-}));
diff --git a/packages/polymer/test/computed_properties_test.html b/packages/polymer/test/computed_properties_test.html
deleted file mode 100644
index e5afe09..0000000
--- a/packages/polymer/test/computed_properties_test.html
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>property to attribute reflection with bind</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <x-foo foo="mee" bar="too" count=3></x-foo>
-
-    <polymer-element name="x-foo" attributes="foo bar count">
-      <template>{{ fooBar }}:{{ fooBarCounted }}</template>
-      <script type="application/dart" src="computed_properties_test.dart"></script>
-    </polymer-element>
-  </body>
-</html>
diff --git a/packages/polymer/test/custom_event_test.dart b/packages/polymer/test/custom_event_test.dart
deleted file mode 100644
index e852812..0000000
--- a/packages/polymer/test/custom_event_test.dart
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.custom_event_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:template_binding/template_binding.dart'
-    show nodeBind, enableBindingsReflection;
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('foo-bar')
-class FooBar extends PolymerElement {
-  // A little too much boilerplate?
-  static const EventStreamProvider<CustomEvent> fooEvent =
-      const EventStreamProvider<CustomEvent>('foo');
-  static const EventStreamProvider<CustomEvent> barBazEvent =
-      const EventStreamProvider<CustomEvent>('barbaz');
-
-  FooBar.created() : super.created();
-
-  Stream<CustomEvent> get onFooEvent => FooBar.fooEvent.forTarget(this);
-  Stream<CustomEvent> get onBarBazEvent => FooBar.barBazEvent.forTarget(this);
-
-  fireFoo(x) => dispatchEvent(new CustomEvent('foo', detail: x));
-  fireBarBaz(x) => dispatchEvent(new CustomEvent('barbaz', detail: x));
-}
-
-@CustomTag('test-custom-event')
-class TestCustomEvent extends PolymerElement {
-  TestCustomEvent.created() : super.created();
-
-  get fooBar => shadowRoots['test-custom-event'].querySelector('foo-bar');
-
-  final events = [];
-  fooHandler(e) => events.add(['foo', e]);
-  barBazHandler(e) => events.add(['barbaz', e]);
-}
-
-main() {
-  enableBindingsReflection = true;
-
-  initPolymer().then((zone) => zone.run(() {
-    useHtmlConfiguration();
-
-    setUp(() => Polymer.onReady);
-
-    test('custom event', () {
-      final testComp = querySelector('test-custom-event');
-      final fooBar = testComp.fooBar;
-
-      final binding = nodeBind(fooBar).bindings['on-barbaz'];
-      expect(binding is Bindable, true,
-          reason: 'on-barbaz event should be bound');
-
-      expect(binding.value, '{{ barBazHandler }}',
-          reason: 'event bindings use the string as value');
-
-      fooBar.fireFoo(123);
-      fooBar.fireBarBaz(42);
-      fooBar.fireFoo(777);
-
-      final events = testComp.events;
-      expect(events.length, 3);
-      expect(events.map((e) => e[0]), ['foo', 'barbaz', 'foo']);
-      expect(events.map((e) => e[1].detail), [123, 42, 777]);
-    });
-  }));
-}
diff --git a/packages/polymer/test/custom_event_test.html b/packages/polymer/test/custom_event_test.html
deleted file mode 100644
index 0d55944..0000000
--- a/packages/polymer/test/custom_event_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>custom events</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-  <polymer-element name="foo-bar">
-    <template></template>
-  </polymer-element>
-
-  <polymer-element name="test-custom-event">
-    <template>
-      <foo-bar on-foo="{{fooHandler}}" on-barbaz="{{barBazHandler}}"></foo-bar>
-    </template>
-  </polymer-element>
-
-  <test-custom-event></test-custom-event>
-
-  <script type="application/dart" src="custom_event_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/element_import/import_a.dart b/packages/polymer/test/element_import/import_a.dart
deleted file mode 100644
index 1277c63..0000000
--- a/packages/polymer/test/element_import/import_a.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-library polymer.test.element_import.import_a;
-
-import 'package:polymer/polymer.dart';
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  final bool isCustom = true;
-
-  XFoo.created() : super.created();
-}
diff --git a/packages/polymer/test/element_import/import_a.html b/packages/polymer/test/element_import/import_a.html
deleted file mode 100644
index 978cb39..0000000
--- a/packages/polymer/test/element_import/import_a.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!--
-    @license
-    Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-    This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-    The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-    The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-    Code distributed by Google as part of the polymer project is also
-    subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../packages/polymer/polymer.html">
-<polymer-element name="x-foo">
-  <template>
-    x-foo
-  </template>
-  <script type="application/dart" src="import_a.dart"></script>
-</polymer-element>
diff --git a/packages/polymer/test/element_import/import_b.dart b/packages/polymer/test/element_import/import_b.dart
deleted file mode 100644
index 6ef2066..0000000
--- a/packages/polymer/test/element_import/import_b.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-library polymer.test.element_import.import_b;
-
-import 'package:polymer/polymer.dart';
-
-@CustomTag('x-bar')
-class XBar extends PolymerElement {
-  final bool isCustom = true;
-
-  XBar.created() : super.created();
-}
diff --git a/packages/polymer/test/element_import/import_b.html b/packages/polymer/test/element_import/import_b.html
deleted file mode 100644
index 045c607..0000000
--- a/packages/polymer/test/element_import/import_b.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<!--
-    @license
-    Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-    This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-    The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-    The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-    Code distributed by Google as part of the polymer project is also
-    subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-<link rel="import" href="../packages/polymer/polymer.html">
-<polymer-element name="x-bar">
-  <template>
-    x-bar
-  </template>
-  <script type="application/dart" src="import_b.dart"></script>
-</polymer-element>
diff --git a/packages/polymer/test/entered_view_test.dart b/packages/polymer/test/entered_view_test.dart
deleted file mode 100644
index ddbda44..0000000
--- a/packages/polymer/test/entered_view_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.entered_view_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@reflectable
-class XOuter extends PolymerElement {
-  @observable bool expand = false;
-
-  XOuter.created() : super.created();
-}
-
-@reflectable
-class XInner extends PolymerElement {
-  int enteredCount = 0;
-
-  XInner.created() : super.created();
-
-  attached() {
-    enteredCount++;
-    super.attached();
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-  Polymer.register('x-inner', XInner);
-  Polymer.register('x-outer', XOuter);
-
-  setUp(() => Polymer.onReady);
-
-  test('element created properly', () {
-    XOuter outer = querySelector('x-outer');
-    outer.expand = true;
-    return outer.onMutation(outer.shadowRoot).then((_) {
-      // Element upgrade is also using mutation observers. Wait another tick so
-      // it goes before we do.
-      return new Future(() {
-        XInner inner = outer.shadowRoot.querySelector('x-inner');
-        expect(inner.enteredCount, 1, reason: 'attached should be called');
-      });
-    });
-  });
-}));
diff --git a/packages/polymer/test/entered_view_test.html b/packages/polymer/test/entered_view_test.html
deleted file mode 100644
index 6af279b..0000000
--- a/packages/polymer/test/entered_view_test.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>attached binding test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    This tests that elements inside the shadowRoot are properly upgraded and
-    attached is called on them. Essentially this is a Shadow DOM and Custom
-    Elements integration test.
-    <br>
-
-    <polymer-element name="x-inner">
-      <template>x-inner</template>
-    </polymer-element>
-    <polymer-element name="x-outer">
-      <template>
-        <template if="{{expand}}">
-          inner element:
-          <x-inner></x-inner>
-        </template>
-      </template>
-    </polymer-element>
-
-    outer element:
-    <x-outer></x-outer>
-
-    <script type="application/dart" src="entered_view_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/event_binding_release_handler_test.dart b/packages/polymer/test/event_binding_release_handler_test.dart
deleted file mode 100644
index f5e8174..0000000
--- a/packages/polymer/test/event_binding_release_handler_test.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.event_binding_release_handler_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:template_binding/template_binding.dart';
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  @PublishedProperty(reflect: true)
-  int count = 1;
-
-  XFoo.created() : super.created();
-
-  increment() {
-    ++count;
-  }
-}
-
-main() {
-  // Do not run the test in the zone so the future does not trigger a
-  // dirtyCheck. We want to verify that event bindings trigger dirty checks on
-  // their own.
-  initPolymer();
-
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('event handlers can be released', () {
-    XFoo element = querySelector('x-foo');
-    expect(element, isNotNull);
-    ButtonElement button = element.shadowRoot.querySelector('button');
-    expect(button, isNotNull);
-
-    button.click();
-    return new Future(() {}).then((_) {
-      expect(element.shadowRoot.querySelector('p').text, 'Count: 2');
-      // Remove and detach the element so the binding is invalidated.
-      element.remove();
-      element.detached();
-    }).then((_) => new Future(() {})).then((_) {
-      // Clicks should no longer affect the elements count.
-      button.click();
-      // TODO(jakemac): This is flaky so its commented out, (the rest of the
-      // test is not flaky). Figure out how to make this not flaky.
-//      expect(element.count, 2);
-    });
-  });
-}
diff --git a/packages/polymer/test/event_binding_release_handler_test.html b/packages/polymer/test/event_binding_release_handler_test.html
deleted file mode 100644
index fda52cb..0000000
--- a/packages/polymer/test/event_binding_release_handler_test.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>event binding release handler test</title>
-  <link rel="import" href="packages/polymer/polymer.html">
-  <script src="packages/unittest/test_controller.js"></script>
-</head>
-<body>
-This tests that event bindings can properly release their event listeners.
-<br>
-
-<polymer-element name="x-foo" attributes="count">
-  <template>
-    <p>Count: {{count}}</p>
-    <button on-click="{{increment}}">add</button>
-  </template>
-</polymer-element>
-
-<x-foo count="1"></x-foo>
-
-<script type="application/dart" src="event_binding_release_handler_test.dart"></script>
-</body>
-</html>
diff --git a/packages/polymer/test/event_controller_test.dart b/packages/polymer/test/event_controller_test.dart
deleted file mode 100644
index 2ecda2d..0000000
--- a/packages/polymer/test/event_controller_test.dart
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.event_controller_test;
-
-import 'dart:async';
-import 'dart:js';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-var clickButtonCount = 0;
-var clickXDartCount = 0;
-var clickXJsCount = 0;
-
-@CustomTag('x-dart')
-class XDart extends PolymerElement {
-  XDart.created() : super.created();
-}
-
-@CustomTag('x-controller')
-class XController extends PolymerElement {
-  XController.created() : super.created();
-  clickButton() {
-    ++clickButtonCount;
-  }
-  clickXDart() {
-    ++clickXDartCount;
-  }
-  clickXJs() {
-    ++clickXJsCount;
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('native element eventController is used properly', () {
-    var controller = querySelector('x-controller');
-    var button = controller.shadowRoot.querySelector('button');
-    new JsObject.fromBrowserObject(button)['eventController'] = controller;
-    button.remove();
-    querySelector('body').append(button);
-
-    button.click();
-    expect(clickButtonCount, 1);
-  });
-
-  test('dart polymer element eventController is used properly', () {
-    var controller = querySelector('x-controller');
-    XDart xDart = controller.shadowRoot.querySelector('x-dart');
-    xDart.eventController = controller;
-    xDart.remove();
-    querySelector('body').append(xDart);
-
-    xDart.click();
-    expect(clickXDartCount, 1);
-  });
-
-  test('js polymer elements eventController is used properly', () {
-    var controller = querySelector('x-controller');
-    var xJs = controller.shadowRoot.querySelector('x-js');
-    new JsObject.fromBrowserObject(xJs)['eventController'] = controller;
-    xJs.remove();
-    querySelector('body').append(xJs);
-
-    xJs.click();
-    expect(clickXJsCount, 1);
-  });
-}));
diff --git a/packages/polymer/test/event_controller_test.html b/packages/polymer/test/event_controller_test.html
deleted file mode 100644
index 30e7878..0000000
--- a/packages/polymer/test/event_controller_test.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>attached binding test</title>
-    <script src="packages/web_components/dart_support.js"></script>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    This tests that eventController can properly be detected from dart,
-    javascript, and native elements.
-    <br>
-
-    <polymer-element name="x-js" noscript>
-      <template>click x-js!</template>
-    </polymer-element>
-
-    <polymer-element name="x-dart">
-      <template>click x-dart!</template>
-    </polymer-element>
-
-    <polymer-element name="x-controller">
-      <template>
-         <button on-click="{{clickButton}}">Click me</button>
-         <x-js on-click="{{clickXJs}}"></x-js>
-         <x-dart on-click="{{clickXDart}}"></x-dart>
-      </template>
-    </polymer-element>
-
-    <x-controller></x-controller>
-
-    <script type="application/dart" src="event_controller_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/event_handlers_test.dart b/packages/polymer/test/event_handlers_test.dart
deleted file mode 100644
index 40b7a53..0000000
--- a/packages/polymer/test/event_handlers_test.dart
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.event_handlers_test;
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:polymer/polymer.dart';
-import 'package:template_binding/template_binding.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  int _testCount = 0;
-  String _lastEvent;
-  String _lastMessage;
-  List list1 = toObservable([]);
-  List list2 = toObservable([]);
-  Future _onTestDone;
-
-  XTest.created() : super.created();
-
-  @override
-  parseDeclaration(elementElement) {
-    var template = fetchTemplate(elementElement);
-    if (template != null) {
-      lightFromTemplate(template);
-    }
-  }
-
-  ready() {
-    super.ready();
-    for (var i = 0; i < 10; i++) {
-      var model = new MiniModel(this, i);
-      list1.add(model);
-      list2.add(model);
-    }
-
-    _onTestDone = new Future.sync(_runTests);
-  }
-
-  hostTapAction(event, detail, node) => _logEvent(event);
-
-  divTapAction(event, detail, node) => _logEvent(event);
-
-  focusAction(event, detail, node) => _logEvent(event);
-
-  blurAction(event, detail, node) => _logEvent(event);
-
-  scrollAction(event, detail, node) => _logEvent(event);
-
-  itemTapAction(event, detail, node) {
-    var model = nodeBind(event.target).templateInstance.model;
-    _logEvent(event, "x-test callback ${model['this']}");
-  }
-
-  _logEvent(event, [message]) {
-    _testCount++;
-    _lastEvent = event.type;
-    _lastMessage = message;
-  }
-
-  Future _runTests() {
-    fire('tap', onNode: $['div']);
-    expect(_testCount, 2, reason: 'event heard at div and host');
-    expect(_lastEvent, 'tap', reason: 'tap handled');
-    fire('focus', onNode: $['input'], canBubble: false);
-    expect(_testCount, 3, reason: 'event heard by input');
-    expect(_lastEvent, 'focus', reason: 'focus handled');
-    fire('blur', onNode: $['input'], canBubble: false);
-    expect(_testCount, 4, reason: 'event heard by input');
-    expect(_lastEvent, 'blur', reason: 'blur handled');
-    fire('scroll', onNode: $['list'], canBubble: false);
-    expect(_testCount, 5, reason: 'event heard by list');
-    expect(_lastEvent, 'scroll', reason: 'scroll handled');
-
-    return onMutation($['list']).then((_) {
-      var l1 = $['list'].querySelectorAll('.list1')[4];
-      fire('tap', onNode: l1, canBubble: false);
-      expect(_testCount, 6, reason: 'event heard by list1 item');
-      expect(_lastEvent, 'tap', reason: 'tap handled');
-      expect(_lastMessage, 'x-test callback <mini-model 4>');
-
-      var l2 = $['list'].querySelectorAll('.list2')[3];
-      fire('tap', onNode: l2, canBubble: false);
-      expect(_testCount, 7, reason: 'event heard by list2 item');
-      expect(_lastEvent, 'tap', reason: 'tap handled by model');
-      expect(_lastMessage, 'x-test callback x-test');
-    });
-  }
-}
-
-class MiniModel extends Observable {
-  XTest _element;
-  @observable final int index;
-  @reflectable void itemTapAction(e, d, n) {
-    _element._logEvent(e, 'mini-model callback $this');
-    e.stopPropagation();
-  }
-  MiniModel(this._element, this.index);
-  String toString() => "<mini-model $index>";
-}
-
-main() => initPolymer();
-
-@initMethod init() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-  test('events handled', () {
-    XTest test = querySelector('x-test');
-    expect(test._onTestDone, isNotNull, reason: 'ready was called');
-    return test._onTestDone;
-  });
-}
diff --git a/packages/polymer/test/event_handlers_test.html b/packages/polymer/test/event_handlers_test.html
deleted file mode 100644
index b05a16d..0000000
--- a/packages/polymer/test/event_handlers_test.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. All rights reserved. Use of this source code is governed by a
-   BSD-style license that can be found in the LICENSE file.
--->
-<html>
-
-  <!-- Test ported from:
-  https://github.com/Polymer/polymer/blob/b720085/test/html/event-handlers.html
-  -->
-  <head>
-    <title>event handlers</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-
-  <x-test>
-    <div>...light...</div>
-  </x-test>
-
-  <polymer-element name="x-test" on-tap="{{hostTapAction}}">
-    <template>
-      <style>
-        :host {
-          display: block;
-        }
-        .gradient {
-          background: -webkit-gradient(linear, left top, left bottom,
-            color-stop(0%,#b4e391), color-stop(50%,#61c419),
-            color-stop(100%,#b4e391));
-        }
-      </style>
-
-      <div id="div" on-tap="{{divTapAction}}">Tap me!
-        <content></content>
-      </div>
-      <input id="input" on-focus="{{focusAction}}"
-                        on-blur="{{blurAction}}">focusy
-      <div id="list"
-           style="height: 200px; overflow: auto; border: 1px solid black;"
-           on-scroll="{{scrollAction}}">
-        <div class="gradient">
-          <template repeat="{{list1}}">
-            <div class="list1" on-tap="{{itemTapAction}}">{{index}}</div>
-          </template>
-          <template repeat="{{item in list2}}">
-            <div class="list2" on-tap="{{itemTapAction}}">{{item.index}}</div>
-          </template>
-        </div>
-      </div>
-    </template>
-    <script type="application/dart" src="event_handlers_test.dart"></script>
-  </polymer-element>
-  </body>
-</html>
diff --git a/packages/polymer/test/event_path_declarative_test.dart b/packages/polymer/test/event_path_declarative_test.dart
deleted file mode 100644
index 49005b3..0000000
--- a/packages/polymer/test/event_path_declarative_test.dart
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// This is ported from event-path-declarative-test.dart in polymer/test/html/.
-// While the original test was intended to test event.path support, we changed
-// the test structure just to check that the event was handled in the expected
-// order.
-library polymer.test.event_path_declarative_test;
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-var _observedEvents = [];
-var _testFired;
-
-main() => initPolymer();
-
-@reflectable
-class XZug extends PolymerElement {
-  XZug.created() : super.created();
-
-  ready() {
-    shadowRoot.on['test-event'].listen((e) {
-      _testFired.complete(null);
-    });
-  }
-
-  contentTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  divTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  testEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-}
-
-@reflectable
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  contentTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  divTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  testEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-}
-
-@reflectable
-class XBar extends PolymerElement {
-  XBar.created() : super.created();
-
-  contentTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  divTestEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-
-  testEventHandler(e, detail, sender) {
-    _observedEvents.add(sender);
-  }
-}
-
-@initMethod init() {
-  useHtmlConfiguration();
-  // TODO(sigmund): switch back to use @CustomTag. We seem to be running into a
-  // problem where using @CustomTag doesn't guarantee that we register the tags
-  // in the following order (the query from mirrors is non deterministic).
-  // We shouldn't care about registration order though. See dartbug.com/14459
-  Polymer.register('x-zug', XZug);
-  Polymer.register('x-foo', XFoo);
-  Polymer.register('x-bar', XBar);
-
-  _testFired = new Completer();
-
-  setUp(() => Polymer.onReady);
-  test('event paths', () {
-    var target = document.querySelector('#target');
-    target.dispatchEvent(new CustomEvent('test-event', canBubble: true));
-    return _testFired.future.then((_) {
-      var xBar = querySelector('x-bar');
-      var xBarDiv = xBar.shadowRoot.querySelector('#xBarDiv');
-      var xBarContent = xBar.shadowRoot.querySelector('#xBarContent');
-      var xFoo = xBar.shadowRoot.querySelector('x-foo');
-      var xFooDiv = xFoo.shadowRoot.querySelector('#xFooDiv');
-      var xFooContent = xFoo.shadowRoot.querySelector('#xFooContent');
-      var xZug = xFoo.shadowRoot.querySelector('x-zug');
-      var xZugDiv = xZug.shadowRoot.querySelector('#xZugDiv');
-      var xZugContent = xZug.shadowRoot.querySelector('#xZugContent');
-
-      var expectedPath = [
-        xBarContent,
-        xBarDiv,
-        xFooContent,
-        xZugContent,
-        xZugDiv,
-        xZug,
-        xFooDiv,
-        xFoo,
-        xBar
-      ];
-      debugName(e) => '${e.localName}#${e.id}';
-      expect(_observedEvents, expectedPath,
-          reason: '<br>\nexpected: ${expectedPath.map(debugName).join(',')}'
-          '<br>\nactual: ${_observedEvents.map(debugName).join(',')}');
-    });
-  });
-}
diff --git a/packages/polymer/test/event_path_declarative_test.html b/packages/polymer/test/event_path_declarative_test.html
deleted file mode 100644
index 0c0fd04..0000000
--- a/packages/polymer/test/event_path_declarative_test.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>event path declarative test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-    <!--
-    Test ported from:
-    https://github.com/Polymer/polymer/blob/7936ff8/test/html/event-path-declarative.html
-    -->
-  </head>
-  <body unresolved>
-    <x-bar><div id="target">Test</div></x-bar>
-    <polymer-element name="x-zug" on-test-event="{{testEventHandler}}">
-      <template>
-        x-zug:
-        <div id="xZugDiv" on-test-event="{{divTestEventHandler}}">
-          <content id="xZugContent" on-test-event="{{contentTestEventHandler}}">
-          </content>
-        </div>
-      </template>
-    </polymer-element>
-
-
-    <polymer-element name="x-foo" on-test-event="{{testEventHandler}}">
-      <template>
-        <style>
-          @host {
-              display: block;
-              border: 1px solid green;
-              padding: 10px;
-            }
-        </style>
-        x-foo:
-        <div id="xFooDiv" on-test-event="{{divTestEventHandler}}">
-          <x-zug><content id="xFooContent"
-                          on-test-event="{{contentTestEventHandler}}"></content>
-          </x-zug>
-        </div>
-      </template>
-    </polymer-element>
-
-
-    <polymer-element name="x-bar" on-test-event="{{testEventHandler}}">
-      <template>
-        <style>
-          @host {
-            display: block;
-            border: 1px solid red;
-            padding: 10px;
-          }
-
-          .clicky {
-            border: 1px solid black;
-          }
-
-        </style>
-        x-bar:
-        <x-foo>
-          <div class="clicky" id="xBarDiv"
-               on-test-event="{{divTestEventHandler}}">
-          <content id="xBarContent" on-test-event="{{contentTestEventHandler}}">
-          </content>
-          </div>
-        </x-foo>
-      </template>
-    </polymer-element>
-
-  <script type="application/dart" src="event_path_declarative_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/event_path_test.dart b/packages/polymer/test/event_path_test.dart
deleted file mode 100644
index 7d61926..0000000
--- a/packages/polymer/test/event_path_test.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.event_path_test;
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-@CustomTag('x-selector')
-class XSelector extends PolymerElement {
-  XSelector.created() : super.created();
-}
-
-@CustomTag('x-overlay')
-class XOverlay extends PolymerElement {
-  XOverlay.created() : super.created();
-}
-
-@CustomTag('x-menu')
-class XMenu extends XSelector {
-  XMenu.created() : super.created();
-}
-
-@CustomTag('x-menu-button')
-class XMenuButton extends PolymerElement {
-  XMenuButton.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('bubbling in the right order', () {
-    var item1 = querySelector('#item1');
-    var menuButton = querySelector('#menuButton');
-    // Note: polymer uses automatic node finding (menuButton.$.menu)
-    // also note that their node finding code also reachs into the ids
-    // from the parent shadow (menu.$.selectorContent instead of
-    // menu.$.menuShadow.$.selectorContent)
-    var menu = menuButton.shadowRoot.querySelector('#menu');
-    var overlay = menuButton.shadowRoot.querySelector('#overlay');
-    var expectedPath = <Node>[
-      item1,
-      menuButton.shadowRoot.querySelector('#menuButtonContent'),
-      menu.shadowRoot.olderShadowRoot.querySelector('#selectorContent'),
-      menu.shadowRoot.olderShadowRoot.querySelector('#selectorDiv'),
-      menu.shadowRoot.olderShadowRoot,
-      menu.shadowRoot.querySelector('#menuShadow'),
-      menu.shadowRoot.querySelector('#menuDiv'),
-      menu.shadowRoot,
-      menu,
-      menuButton.shadowRoot.querySelector('#menuButtonDiv'),
-      // TODO(sigmund): this test is currently broken because currently
-      // registerElement is sensitive to the order in which each custom
-      // element is registered. When fixed, we should be able to add the
-      // following three targets:
-      //   overlay.shadowRoot.query('#overlayContent'),
-      //   overlay.shadowRoot,
-      //   overlay,
-      menuButton.shadowRoot,
-      menuButton
-    ];
-    var x = 0;
-    for (int i = 0; i < expectedPath.length; i++) {
-      var node = expectedPath[i];
-      expect(node, isNotNull, reason: "Should not be null at $i");
-      node.on['x'].listen(expectAsync((e) {
-        expect(e.currentTarget, node);
-        expect(x++, i);
-      }));
-    }
-
-    item1.dispatchEvent(new Event('x', canBubble: true));
-  });
-}));
diff --git a/packages/polymer/test/event_path_test.html b/packages/polymer/test/event_path_test.html
deleted file mode 100644
index 7d6a107..0000000
--- a/packages/polymer/test/event_path_test.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>event path</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-    <!--
-    Test ported from:
-    https://github.com/Polymer/polymer/blob/7936ff8/test/html/event-path.html
-
-    This test actually doesn't test the polymer's event layer. It just ensures
-    that tests are propagated in the right order when using Shadow DOM.
-    -->
-  </head>
-  <body unresolved>
-
-  <polymer-element name="x-selector">
-    <template>
-      <div id="selectorDiv">
-        <content id="selectorContent"></content>
-      </div>
-    </template>
-  </polymer-element>
-
-  <polymer-element name="x-overlay">
-    <template>
-      <content id="overlayContent"></content>
-    </template>
-  </polymer-element>
-
-  <polymer-element name="x-menu" extends="x-selector">
-    <template>
-      <div id="menuDiv">
-        <shadow id="menuShadow"></shadow>
-      </div>
-    </template>
-  </polymer-element>
-
-  <polymer-element name="x-menu-button">
-    <template>
-      <div>
-        <x-overlay id="overlay">
-          <div id="menuButtonDiv">
-            <x-menu id="menu">
-              <content id="menuButtonContent"></content>
-            </x-menu>
-          </div>
-        </x-overlay>
-      </div>
-    </template>
-  </polymer-element>
-
-  <x-menu-button id="menuButton">
-    <div id="item1"><div id="source"></div>Item1</div>
-    <div id="item2">Item2</div>
-  </x-menu-button>
-
-
-  <script type="application/dart" src="event_path_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/events_test.dart b/packages/polymer/test/events_test.dart
deleted file mode 100644
index fd79e49..0000000
--- a/packages/polymer/test/events_test.dart
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.events_test;
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-@CustomTag("test-b")
-class TestB extends PolymerElement {
-  TestB.created() : super.created();
-
-  List clicks = [];
-  void clickHandler(event, detail, target) {
-    clicks.add('local click under $localName (id $id) on ${target.id}');
-  }
-}
-
-@CustomTag("test-a")
-class TestA extends PolymerElement {
-  TestA.created() : super.created();
-
-  List clicks = [];
-  void clickHandler() {
-    clicks.add('host click on: $localName (id $id)');
-  }
-}
-
-@reflectable
-class TestBase extends PolymerElement {
-  TestBase.created() : super.created();
-
-  List clicks = [];
-  void clickHandler(e) {
-    clicks.add('local click under $localName (id $id) on ${e.target.id}');
-  }
-}
-
-@CustomTag("test-c")
-class TestC extends TestBase {
-  TestC.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('host event', () {
-    // Note: this test is currently the only event in
-    // polymer/test/js/events.js at commit #7936ff8
-    var testA = querySelector('#a');
-    expect(testA.clicks, isEmpty);
-    testA.click();
-    expect(testA.clicks, ['host click on: test-a (id a)']);
-  });
-
-  test('local event', () {
-    var testB = querySelector('#b');
-    expect(testB.clicks, isEmpty);
-    testB.click();
-    expect(testB.clicks, []);
-    var b1 = testB.shadowRoot.querySelector('#b-1');
-    b1.click();
-    expect(testB.clicks, []);
-    var b2 = testB.shadowRoot.querySelector('#b-2');
-    b2.click();
-    expect(testB.clicks, ['local click under test-b (id b) on b-2']);
-  });
-
-  test('event on superclass', () {
-    var testC = querySelector('#c');
-    expect(testC.clicks, isEmpty);
-    testC.click();
-    expect(testC.clicks, []);
-    var c1 = testC.shadowRoot.querySelector('#c-1');
-    c1.click();
-    expect(testC.clicks, []);
-    var c2 = testC.shadowRoot.querySelector('#c-2');
-    c2.click();
-    expect(testC.clicks, ['local click under test-c (id c) on c-2']);
-  });
-}));
diff --git a/packages/polymer/test/events_test.html b/packages/polymer/test/events_test.html
deleted file mode 100644
index a8fb3a7..0000000
--- a/packages/polymer/test/events_test.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>event path</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-    <!--
-    Test ported from:
-    https://github.com/Polymer/polymer/blob/7936ff8/test/js/events.js
-
-    TODO(sigmund): when we have support for mutation observers, render all of
-    the test in Dart (like events.js does in JS)
-    -->
-  </head>
-  <body>
-
-  <polymer-element name="test-a" on-click="{{clickHandler}}">
-    <template></template>
-  </polymer-element>
-
-  <polymer-element name="test-b">
-    <template>
-      <div>
-        <span id="b-1">1</span>
-        <span id="b-2" on-click="{{clickHandler}}">2</span>
-      </div>
-    </template>
-  </polymer-element>
-
-  <polymer-element name="test-c">
-    <template>
-      <div>
-        <span id="c-1">1</span>
-        <span id="c-2" on-click="{{clickHandler}}">2</span>
-      </div>
-    </template>
-  </polymer-element>
-
-  <test-a id="a"></test-a>
-  <test-b id="b"></test-b>
-  <test-c id="c"></test-c>
-
-  <script type="application/dart" src="events_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/force_ready_test.dart b/packages/polymer/test/force_ready_test.dart
deleted file mode 100644
index 16df24c..0000000
--- a/packages/polymer/test/force_ready_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => window.on['HTMLImportsLoaded']);
-
-  /// We do not port the full test, since this just proxies through to the
-  /// polymer js implementation.
-  test('can force ready', () {
-    return new Future(() {}).then((_) {
-      expect(Polymer.waitingFor.length, 1);
-      expect(Polymer.waitingFor[0], querySelector('polymer-element'));
-      Polymer.forceReady();
-      return Polymer.onReady;
-    });
-  });
-}));
diff --git a/packages/polymer/test/force_ready_test.html b/packages/polymer/test/force_ready_test.html
deleted file mode 100644
index 0cce7a3..0000000
--- a/packages/polymer/test/force_ready_test.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>force ready</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <polymer-element name="x-foo"></polymer-element>
-
-    <script type="application/dart" src="force_ready_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/import_test.dart b/packages/polymer/test/import_test.dart
deleted file mode 100644
index 0e8a026..0000000
--- a/packages/polymer/test/import_test.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  // **NOTE**: This test is currently being skipped everywhere until deferred
-  // imports have actual support.
-  test('Polymer.import', () {
-    return Polymer.import(['element_import/import_a.html']).then((_) {
-      expect((querySelector('x-foo') as dynamic).isCustom, true);
-      var dom = document.importNode(
-          (querySelector('#myTemplate') as TemplateElement).content, true);
-      return Polymer.importElements(dom).then((_) {
-        expect((querySelector('x-bar') as dynamic).isCustom, true);
-      });
-    });
-  });
-}));
diff --git a/packages/polymer/test/import_test.html b/packages/polymer/test/import_test.html
deleted file mode 100644
index 6993011..0000000
--- a/packages/polymer/test/import_test.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>Polymer.import test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-foo></x-foo>
-    <hr>
-
-    <x-bar></x-bar>
-
-    <template id="myTemplate">
-      <link rel="import" href="element_import/import_b.html">
-    </template>
-
-    <script type="application/dart" src="import_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/inject_bound_html_test.dart b/packages/polymer/test/inject_bound_html_test.dart
deleted file mode 100644
index 2f8910e..0000000
--- a/packages/polymer/test/inject_bound_html_test.dart
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  @observable String bar = "baz";
-
-  XFoo.created() : super.created();
-
-  @ComputedProperty('bar')
-  String get ignore => readValue(#bar);
-}
-
-class NullTreeSanitizer implements NodeTreeSanitizer {
-  const NullTreeSanitizer();
-  void sanitizeTree(Node node) {}
-}
-final nullSanitizer = const NullTreeSanitizer();
-
-class NullNodeValidator implements NodeValidator {
-  const NullNodeValidator();
-  bool allowsAttribute(Element e, String a, String v) => true;
-  bool allowsElement(Element element) => true;
-}
-final nullValidator = const NullNodeValidator();
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  XFoo xFoo;
-  DivElement injectDiv;
-
-  setUp(() => Polymer.onReady.then((_) {
-    xFoo = querySelector('x-foo');
-    injectDiv = xFoo.$['inject'];
-  }));
-
-  tearDown(() {
-    injectDiv.innerHtml = '';
-  });
-
-  test('can inject bound html fragments', () {
-    xFoo.injectBoundHtml('<span>{{bar}}</span>', element: injectDiv);
-    expect(injectDiv.innerHtml, '<span>baz</span>');
-
-    xFoo.bar = 'bat';
-    return new Future(() {}).then((_) {
-      expect(injectDiv.innerHtml, '<span>bat</span>');
-    });
-  });
-
-  test('custom sanitizer and validator', () {
-    var html = '<span style="color: black;"></span>';
-    var sanitizedHtml = '<span></span>';
-
-    // Expect it to sanitize by default.
-    xFoo.injectBoundHtml(html, element: injectDiv);
-    expect(injectDiv.innerHtml, sanitizedHtml);
-
-    // Don't sanitize if we give it a dummy validator
-    xFoo.injectBoundHtml(html, element: injectDiv, validator: nullValidator);
-    expect(injectDiv.innerHtml, html);
-
-    // Don't sanitize if we give it a dummy sanitizer
-    xFoo.injectBoundHtml(html,
-        element: injectDiv, treeSanitizer: nullSanitizer);
-    expect(injectDiv.innerHtml, html);
-  });
-}));
diff --git a/packages/polymer/test/inject_bound_html_test.html b/packages/polymer/test/inject_bound_html_test.html
deleted file mode 100644
index 920a83c..0000000
--- a/packages/polymer/test/inject_bound_html_test.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>force ready</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <polymer-element name="x-foo">
-      <template>
-        <div id="inject"></div>
-      </template>
-    </polymer-element>
-    <x-foo></x-foo>
-    <script type="application/dart" src="inject_bound_html_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/instance_attrs_test.dart b/packages/polymer/test/instance_attrs_test.dart
deleted file mode 100644
index 1671f89..0000000
--- a/packages/polymer/test/instance_attrs_test.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-// Note: we use @CustomTag to make this type reflectable.
-@CustomTag('my-element')
-class MyElement extends PolymerElement {
-  MyElement.created() : super.created();
-
-  // This is here so that [attributes] can be read via mirrors in polymer
-  // expressions (@CustomTag in this class makes the attribute reflectable).
-  get attributes => super.attributes;
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('attributes were deserialized', () {
-    var elem = querySelector('my-element');
-
-    expect(elem.attributes, {'foo': '123', 'bar': 'hi', 'baz': 'world'},
-        reason: 'attributes should be copied to instance');
-
-    var text = elem.shadowRoot.text;
-    // Collapse adjacent whitespace like a browser would:
-    text = text.replaceAll('\n', ' ').replaceAll(new RegExp(r'\s+'), ' ');
-
-    expect(text, " foo: 123 bar: hi baz: world ",
-        reason: 'text should match expected HTML template');
-  });
-}));
diff --git a/packages/polymer/test/instance_attrs_test.html b/packages/polymer/test/instance_attrs_test.html
deleted file mode 100644
index 9c909db..0000000
--- a/packages/polymer/test/instance_attrs_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>Polymer.dart attribute deserialization test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <polymer-element name="my-element" foo="123" bar="hi" baz="there">
-      <template>
-        foo: {{attributes['foo']}}
-        bar: {{attributes['bar']}}
-        baz: {{attributes['baz']}}
-      </template>
-    </polymer-element>
-
-    <my-element baz="world"></my-element>
-
-    <script type="application/dart" src="instance_attrs_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/js_custom_event_test.dart b/packages/polymer/test/js_custom_event_test.dart
deleted file mode 100644
index 61a1b1d..0000000
--- a/packages/polymer/test/js_custom_event_test.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.events_test;
-
-import 'dart:html';
-import 'dart:js';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  bool called = false;
-  XTest.created() : super.created();
-
-  void myEventHandler(e, detail, t) {
-    called = true;
-    expect(detail['value'], 42);
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-  setUp(() => Polymer.onReady);
-
-  test('detail on JS custom events are proxied', () {
-    var element = querySelector('x-test');
-    expect(element.called, isFalse);
-    context.callMethod('fireEvent');
-    expect(element.called, isTrue);
-  });
-}));
diff --git a/packages/polymer/test/js_custom_event_test.html b/packages/polymer/test/js_custom_event_test.html
deleted file mode 100644
index d7c6487..0000000
--- a/packages/polymer/test/js_custom_event_test.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>event path</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-  <polymer-element name="x-test">
-    <template>
-    <div id="a" on-my-event={{myEventHandler}}></div>
-    </template>
-  </polymer-element>
-  <x-test></x-test>
-  <script>
-    function fireEvent() {
-      var x = document.querySelector('x-test');
-      var a = x.shadowRoot.querySelector('#a');
-      var e = new CustomEvent('my-event', {
-          bubbles: true,
-          cancelable: true,
-          // `a` included as a regression for issue 19315.
-          detail: {value: 42, item: a}
-      });
-      a.dispatchEvent(e);
-    }
-  </script>
-  <script type="application/dart" src="js_custom_event_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/js_interop_test.dart b/packages/polymer/test/js_interop_test.dart
deleted file mode 100644
index e22bb96..0000000
--- a/packages/polymer/test/js_interop_test.dart
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.js_interop_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'dart:js';
-import 'package:polymer/polymer.dart';
-import 'package:polymer_interop/polymer_interop.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-@CustomTag('dart-element')
-class DartElement extends PolymerElement {
-  DartElement.created() : super.created();
-}
-
-@CustomTag('dart-element2')
-class DartElement2 extends PolymerElement {
-  Element get quux => this.querySelector('.quux');
-  DartElement2.created() : super.created();
-}
-
-@CustomTag('dart-element3')
-class DartElement3 extends PolymerElement {
-  @observable var quux;
-  DartElement3.created() : super.created();
-
-  domReady() {
-    quux = new JsObject.jsify({'aDartMethod': (x) => 444 + x});
-  }
-}
-
-@CustomTag('dart-two-way')
-class DartTwoWay extends PolymerElement {
-  @observable var twoWay = 40;
-  DartTwoWay.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('dart-element upgraded', () {
-    expect(querySelector('dart-element') is DartElement, true,
-        reason: 'dart-element upgraded');
-  });
-
-  test('js-element in body', () => testInterop(querySelector('js-element')));
-
-  test('js-element in dart-element', () => testInterop(
-      querySelector('dart-element').shadowRoot.querySelector('js-element')));
-
-  test('elements can be passed through Node.bind to JS', () {
-    var text = querySelector('dart-element2').shadowRoot
-        .querySelector('js-element2').shadowRoot.text;
-    expect(text, 'QUX:123');
-  });
-
-  test('objects with functions can be passed through Node.bind to JS', () {
-    var sr = querySelector('dart-element3').shadowRoot
-        .querySelector('js-element3').shadowRoot;
-
-    return new Future(() {
-      expect(sr.text, 'js-element3[qux]:765');
-    });
-  });
-
-  test('two way bindings work', () {
-    var dartElem = querySelector('dart-two-way');
-    var jsElem = dartElem.shadowRoot.querySelector('js-two-way');
-    var interop = new JsObject.fromBrowserObject(jsElem);
-
-    return new Future(() {
-      expect(jsElem.shadowRoot.text, 'FOOBAR:40');
-
-      expect(dartElem.twoWay, 40);
-      expect(interop['foobar'], 40);
-
-      interop.callMethod('aJsMethod', [2]);
-
-      // Because Polymer.js two-way bindings are just a getter/setter pair
-      // pointing at the original, we will see the new value immediately.
-      expect(dartElem.twoWay, 42);
-
-      expect(interop['foobar'], 42);
-
-      // Text will update asynchronously
-      expect(jsElem.shadowRoot.text, 'FOOBAR:40');
-
-      return _onTextChanged(jsElem.shadowRoot).then((_) {
-        expect(jsElem.shadowRoot.text, 'FOOBAR:42');
-      });
-    });
-  });
-}));
-
-Future<List<MutationRecord>> _onTextChanged(Node node) {
-  var completer = new Completer();
-  new MutationObserver((mutations, observer) {
-    observer.disconnect();
-    completer.complete(mutations);
-  })..observe(node, characterData: true, subtree: true);
-  return completer.future;
-}
-
-testInterop(jsElem) {
-  expect(jsElem.shadowRoot.text, 'FOOBAR');
-  var interop = new JsObject.fromBrowserObject(jsElem);
-  expect(interop['baz'], 42, reason: 'can read JS custom element properties');
-
-  jsElem.attributes['baz'] = '123';
-  return flush().then((_) {
-    expect(interop['baz'], 123, reason: 'attribute reflected to property');
-    expect(jsElem.shadowRoot.text, 'FOOBAR', reason: 'text unchanged');
-
-    interop['baz'] = 777;
-    return flush();
-  }).then((_) {
-    expect(jsElem.attributes['baz'], '777',
-        reason: 'property reflected to attribute');
-
-    expect(jsElem.shadowRoot.text, 'FOOBAR', reason: 'text unchanged');
-
-    interop.callMethod('aJsMethod', [123]);
-    return flush();
-  }).then((_) {
-    expect(jsElem.shadowRoot.text, '900', reason: 'text set by JS method');
-    expect(interop['baz'], 777, reason: 'unchanged');
-  });
-}
-
-/// Calls Polymer.flush() to flush Polymer.js pending operations, e.g.
-/// dirty checking for data-bindings.
-Future flush() {
-  PolymerJs.flush();
-
-  var completer = new Completer();
-  PolymerJs.endOfMicrotask(() => completer.complete());
-  return completer.future;
-}
diff --git a/packages/polymer/test/js_interop_test.html b/packages/polymer/test/js_interop_test.html
deleted file mode 100644
index 3664293..0000000
--- a/packages/polymer/test/js_interop_test.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>polymer.js interop test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-
-  <polymer-element name="js-element">
-    <template>FOOBAR</template>
-    <script>
-    Polymer('js-element', {
-      publish: {
-        baz: {value: 42, reflect: true}
-      },
-      aJsMethod: function(inc) {
-        this.shadowRoot.textContent = this.baz + inc;
-      },
-    });
-    </script>
-  </polymer-element>
-
-  <polymer-element name="dart-element">
-    <template>
-      <js-element></js-element>
-    </template>
-  </polymer-element>
-
-  <dart-element></dart-element>
-  <js-element></js-element>
-
-  <polymer-element name="js-element2" attributes="qux">
-    <template>QUX:{{qux.baz}}</template>
-    <script>Polymer('js-element2');</script>
-  </polymer-element>
-
-
-  <polymer-element name="dart-element2">
-    <template>
-     <js-element2 qux="{{quux}}"></js-element2>
-      <!-- TODO(jakemac): remove this once
-          https://github.com/Polymer/ShadowDOM/issues/495 is resolved -->
-      <content hidden></content>
-    </template>
-  </polymer-element>
-
-  <dart-element2>
-    <js-element baz="123" class="quux"></js-element>
-  </dart-element2>
-
-
-  <polymer-element name="js-element3" attributes="qux">
-    <template>FOOBAR</template>
-    <script>Polymer('js-element3', {
-      quxChanged: function() {
-        this.shadowRoot.textContent = 'js-element3[qux]:' +
-            this.qux.aDartMethod(321);
-      }
-    });</script>
-  </polymer-element>
-
-  <polymer-element name="dart-element3">
-    <template>
-      <js-element3 qux="{{quux}}"></js-element3>
-    </template>
-  </polymer-element>
-
-  <dart-element3></dart-element3>
-
-
-  <polymer-element name="js-two-way" attributes="foobar">
-    <template>FOOBAR:{{foobar}}</template>
-    <script>Polymer('js-two-way', {
-      foobar: 0,
-      aJsMethod: function(inc) {
-        this.foobar = this.foobar + inc;
-      },
-    });</script>
-  </polymer-element>
-
-  <polymer-element name="dart-two-way">
-    <template>
-      <js-two-way foobar="{{twoWay}}"></js-two-way>
-    </template>
-  </polymer-element>
-
-  <dart-two-way></dart-two-way>
-
-  <script type="application/dart" src="js_interop_test.dart"></script>
-
-  </body>
-</html>
diff --git a/packages/polymer/test/layout_test.dart b/packages/polymer/test/layout_test.dart
deleted file mode 100644
index 1bd425a..0000000
--- a/packages/polymer/test/layout_test.dart
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.layout_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'dart:js';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  getTestElements(test) {
-    var t = document.getElementById(test);
-    return {
-      'h1': t.querySelector('[horizontal] > [flex]').getComputedStyle(),
-      'h2': t.querySelector('[horizontal] > [flex][sized]').getComputedStyle(),
-      'v1': t.querySelector('[vertical] > [flex]').getComputedStyle(),
-      'v2': t.querySelector('[vertical] > [flex][sized]').getComputedStyle()
-    };
-  }
-
-  // no-size container tests
-
-  test('flex-layout-attributies', () {
-    var elements = getTestElements('test1');
-    expect(elements['h1'].width, elements['h2'].width,
-        reason: 'unsized container: horizontal flex items have same width');
-    expect(elements['v1'].height, '0px',
-        reason: 'unsized container: vertical flex items have no intrinsic '
-        'height');
-  });
-
-  test('flex auto layout attributes', () {
-    var elements = getTestElements('test2');
-    expect(elements['h1'].width, isNot(elements['h2'].width),
-        reason: 'unsized container: horizontal flex auto items have intrinsic '
-        'width + flex amount');
-    expect(elements['v1'].height, isNot('0px'),
-        reason: 'unsized container: vertical flex auto items have intrinsic '
-        'height');
-  });
-
-  test('flex auto-vertical layout attributes', () {
-    var elements = getTestElements('test3');
-    expect(elements['h1'].width, elements['h2'].width,
-        reason: 'unsized container: horizontal flex auto-vertical items have '
-        'same width');
-    expect(elements['v1'].height, isNot('0px'),
-        reason: 'unsized container: vertical flex auto-vertical items have '
-        'intrinsic height');
-  });
-
-  // Sized container tests
-
-  test('flex layout attributes', () {
-    var elements = getTestElements('test4');
-    expect(elements['h1'].width, elements['h2'].width,
-        reason: 'sized container: horizontal flex items have same width');
-    expect(elements['v1'].height, elements['v2'].height,
-        reason: 'sized container: vertical flex items have same height');
-  });
-
-  test('flex auto layout attributes', () {
-    var elements = getTestElements('test5');
-    expect(elements['h1'].width, isNot(elements['h2'].width),
-        reason: 'sized container: horizontal flex auto items have intrinsic '
-        'width + flex amount');
-    expect(elements['v1'].height, isNot('0px'),
-        reason: 'sized container: vertical flex auto items have intrinsic '
-        'height');
-    expect(elements['v1'].height, isNot(elements['v2'].height),
-        reason: 'sized container: vertical flex auto items have intrinsic '
-        'width + flex amount');
-  });
-
-  test('flex auto-vertical layout attributes', () {
-    var elements = getTestElements('test3');
-    expect(elements['h1'].width, elements['h2'].width,
-        reason: 'unsized container: horizontal flex auto-vertical items have '
-        'same width');
-    expect(elements['v1'].height, isNot('0px'),
-        reason: 'sized container: vertical flex auto-vertical items have '
-        'intrinsic height');
-    expect(elements['v1'].height, isNot(elements['v2'].height),
-        reason: 'sized container: vertical flex auto-vertical items have '
-        'intrinsic width + flex amount');
-  });
-}));
diff --git a/packages/polymer/test/layout_test.html b/packages/polymer/test/layout_test.html
deleted file mode 100644
index fbfd105..0000000
--- a/packages/polymer/test/layout_test.html
+++ /dev/null
@@ -1,177 +0,0 @@
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. All rights reserved. Use of this source code is governed by a
-   BSD-style license that can be found in the LICENSE file.
--->
-<!doctype html>
-<html>
-
-<head>
-  <link rel="import" href="packages/polymer/polymer.html">
-  <script src="packages/unittest/test_controller.js"></script>
-
-  <style shim-shadowdom>
-    [layout] {
-    border: 1px solid orange;
-    }
-
-    [flex] {
-    background-color: orange;
-    }
-
-    [sized] {
-    background-color: green;
-    border: 1px solid black;
-    height: 200px;
-    width: 200px;
-    }
-
-    [sized-container] [layout] {
-    height: 500px;
-    width: 500px;
-    }
-
-    /* IE10: requires flex items to be display block */
-    span {
-    display: block;
-    }
-
-  </style>
-
-</head>
-<body unresolved>
-<div id="test1">
-  <h2>layout flex</h2>
-    <span horizontal layout>
-      <span>I am not flex</span>
-      <span flex>
-        intrinsix
-      </span>
-      <span flex sized></span>
-      <span>I am not flex</span>
-    </span>
-  <br><br>
-    <span vertical layout>
-      <span>I am not flex</span>
-      <span flex>
-        intrinsix
-      </span>
-      <span flex sized></span>
-      <span>I am not flex</span>
-    </span>
-</div>
-<br><hr><br>
-<div id="test2">
-  <h2>layout flex auto</h2>
-    <span horizontal layout>
-      <span>I am not flex</span>
-      <span flex auto>
-        intrinsix
-      </span>
-      <span flex auto sized></span>
-      <span>I am not flex</span>
-    </span>
-  <br><br>
-    <span vertical layout>
-      <span>I am not flex</span>
-      <span flex auto>
-        intrinsix
-      </span>
-      <span flex auto sized></span>
-      <span>I am not flex</span>
-    </span>
-</div>
-<br><hr><br>
-<div id="test3">
-  <h2>layout flex auto-vertical</h2>
-  <span horizontal layout>
-    <span>I am not flex</span>
-    <span flex auto-vertical>
-      intrinsix
-    </span>
-    <span flex auto-vertical sized></span>
-    <span>I am not flex</span>
-  </span>
-  <br><br>
-  <span vertical layout>
-    <span>I am not flex</span>
-    <span flex auto-vertical>
-      intrinsix
-    </span>
-    <span flex auto-vertical sized></span>
-    <span>I am not flex</span>
-  </span>
-</div>
-<br><hr><hr><br>
-<h1>Sized Container</h1>
-<div sized-container>
-  <div id="test4">
-    <h2>layout flex</h2>
-    <span horizontal layout>
-      <span>I am not flex</span>
-      <span flex>
-        intrinsix
-      </span>
-      <span flex sized></span>
-      <span>I am not flex</span>
-    </span>
-    <br><br>
-    <span vertical layout>
-      <span>I am not flex</span>
-      <span flex>
-        intrinsix
-      </span>
-      <span flex sized></span>
-      <span>I am not flex</span>
-    </span>
-  </div>
-  <br><hr><br>
-  <div id="test5">
-    <h2>layout flex auto</h2>
-    <span horizontal layout>
-      <span>I am not flex</span>
-      <span flex auto>
-        intrinsix
-      </span>
-      <span flex auto sized></span>
-      <span>I am not flex</span>
-    </span>
-    <br><br>
-    <span vertical layout>
-      <span>I am not flex</span>
-      <span flex auto>
-        intrinsix
-      </span>
-      <span flex auto sized></span>
-      <span>I am not flex</span>
-    </span>
-  </div>
-  <br><hr><br>
-  <div id="test6">
-    <h2>layout flex auto-vertical</h2>
-    <span horizontal layout>
-      <span>I am not flex</span>
-      <span flex auto-vertical>
-        intrinsix
-      </span>
-      <span flex auto-vertical sized></span>
-      <span>I am not flex</span>
-    </span>
-    <br><br>
-    <span vertical layout>
-      <span>I am not flex</span>
-      <span flex auto-vertical>
-        intrinsix
-      </span>
-      <span flex auto-vertical sized></span>
-      <span>I am not flex</span>
-    </span>
-  </div>
-</div>
-
-
-<script type="application/dart" src="layout_test.dart">
-</script>
-
-</body>
-</html>
diff --git a/packages/polymer/test/nested_binding_test.dart b/packages/polymer/test/nested_binding_test.dart
deleted file mode 100644
index e179bcf..0000000
--- a/packages/polymer/test/nested_binding_test.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.nested_binding_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('my-test')
-class MyTest extends PolymerElement {
-  final List fruits = toObservable(['apples', 'oranges', 'pears']);
-
-  final _testDone = new Completer();
-
-  MyTest.created() : super.created();
-
-  ready() {
-    expect($['fruit'].text.trim(), 'Short name: [pears]');
-    _testDone.complete();
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('ready called',
-      () => (querySelector('my-test') as MyTest)._testDone.future);
-}));
diff --git a/packages/polymer/test/nested_binding_test.html b/packages/polymer/test/nested_binding_test.html
deleted file mode 100644
index 0174abd..0000000
--- a/packages/polymer/test/nested_binding_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>nesting binding test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <polymer-element name="my-test">
-      <template>
-        <h2>Fruits</h2>
-        <ul id="fruit">
-          <template repeat="{{fruit in fruits}}">
-            <template if="{{ fruit == 'pears' }}">
-              <li>Short name: [{{fruit}}]</li>
-            </template>
-          </template>
-        </ul>
-      </template>
-    </polymer-element>
-
-    <my-test></my-test>
-
-    <script type="application/dart" src="nested_binding_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/noscript_test.dart b/packages/polymer/test/noscript_test.dart
deleted file mode 100644
index 9338fc3..0000000
--- a/packages/polymer/test/noscript_test.dart
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-import 'package:template_binding/template_binding.dart';
-
-Future<List<MutationRecord>> onMutation(Node node) {
-  var completer = new Completer();
-  new MutationObserver((mutations, observer) {
-    observer.disconnect();
-    completer.complete(mutations);
-  })..observe(node, childList: true, subtree: true);
-  return completer.future;
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  var ready = Polymer.onReady.then((_) {
-    var a = querySelector("#a");
-    templateBind(a).model = "foo";
-    return onMutation(a.parent);
-  });
-
-  setUp(() => ready);
-
-  test('template found with multiple noscript declarations', () {
-    expect(querySelector('x-a').shadowRoot.nodes.first.text, 'a');
-    expect(querySelector('x-c').shadowRoot.nodes.first.text, 'c');
-    expect(querySelector('x-b').shadowRoot.nodes.first.text, 'b');
-    expect(querySelector('x-d').shadowRoot.nodes.first.text, 'd');
-  });
-}));
diff --git a/packages/polymer/test/noscript_test.html b/packages/polymer/test/noscript_test.html
deleted file mode 100644
index ac5c64d..0000000
--- a/packages/polymer/test/noscript_test.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>register test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-  <polymer-element name="x-a" noscript><template>a</template></polymer-element>
-  <polymer-element name="x-b" noscript><template>b</template></polymer-element>
-  <polymer-element name="x-c" noscript><template>c</template></polymer-element>
-  <polymer-element name="x-d" noscript><template>d</template></polymer-element>
-
-  <x-a></x-a>
-  <template id="a" bind>
-    <x-b></x-b>
-    <x-c></x-c>
-  </template>
-  <x-d></x-d>
-
-  <script type="application/dart" src="noscript_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/prop_attr_bind_reflection_test.dart b/packages/polymer/test/prop_attr_bind_reflection_test.dart
deleted file mode 100644
index 0353109..0000000
--- a/packages/polymer/test/prop_attr_bind_reflection_test.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('my-child-element')
-class MyChildElement extends PolymerElement {
-  @PublishedProperty(reflect: true) int camelCase;
-  @PublishedProperty(reflect: true) int lowercase;
-
-  // TODO(sigmund): remove once codegen in polymer is turned on.
-  @reflectable get attributes => super.attributes;
-
-  MyChildElement.created() : super.created();
-
-  // Make this a no-op, so we can verify the initial
-  // reflectPropertyToAttribute works.
-  @override
-  openPropertyObserver() {}
-}
-
-@CustomTag('my-element')
-class MyElement extends PolymerElement {
-  @observable int volume = 11;
-
-  MyElement.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('attribute reflected to property name', () {
-    var child = querySelector('my-element').shadowRoot
-        .querySelector('my-child-element');
-    expect(child.lowercase, 11);
-    expect(child.camelCase, 11);
-
-    expect(child.attributes['lowercase'], '11');
-    expect(child.attributes['camelcase'], '11');
-  });
-}));
diff --git a/packages/polymer/test/prop_attr_bind_reflection_test.html b/packages/polymer/test/prop_attr_bind_reflection_test.html
deleted file mode 100644
index d0736b6..0000000
--- a/packages/polymer/test/prop_attr_bind_reflection_test.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>property to attribute reflection with bind</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <polymer-element name="my-child-element">
-      <template>
-        <h1>Hello from the child</h1>
-        <p>The camelCase is {{camelCase}}, attr {{attributes["camelCase"]}}</p>
-        <p>The lowercase is {{lowercase}}, attr {{attributes["lowercase"]}}</p>
-      </template>
-    </polymer-element>
-
-    <polymer-element name="my-element">
-      <template>
-        <h1>Hello from the custom element. The volume is {{volume}}</h1>
-        <p>
-          <my-child-element id="child"
-              camelCase="{{volume}}" lowercase="{{volume}}"></my-child-element>
-        </p>
-      </template>
-    </polymer-element>
-
-    <my-element></my-element>
-
-    <script type="application/dart" src="prop_attr_bind_reflection_test.dart">
-    </script>
-  </body>
-</html>
diff --git a/packages/polymer/test/prop_attr_reflection_test.dart b/packages/polymer/test/prop_attr_reflection_test.dart
deleted file mode 100644
index c7296e8..0000000
--- a/packages/polymer/test/prop_attr_reflection_test.dart
+++ /dev/null
@@ -1,188 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-class XAttrPublish extends PolymerElement {
-  XAttrPublish.created() : super.created();
-
-  @PublishedProperty(reflect: false)
-  String nog = '';
-}
-
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  @PublishedProperty(reflect: true) var foo = '';
-  @PublishedProperty(reflect: true) String baz = '';
-
-  @PublishedProperty(reflect: true) var def1, def2;
-}
-
-class XBar extends XFoo {
-  XBar.created() : super.created();
-
-  @PublishedProperty(reflect: true) int zot = 3;
-  @PublishedProperty(reflect: true) bool zim = false;
-  @PublishedProperty(reflect: true) String str = 'str';
-  @PublishedProperty(reflect: true) Object obj;
-}
-
-class XZot extends XBar {
-  // Dart note: trying to make this roughly equivalent to the JS
-  @PublishedProperty(reflect: false) int get zot => super.zot;
-  @PublishedProperty(reflect: false) set zot(int x) {
-    super.zot = x;
-  }
-
-  XZot.created() : super.created() {
-    zot = 2;
-    str = 'str2';
-  }
-}
-
-class XCompose extends PolymerElement {
-  XCompose.created() : super.created();
-
-  @observable bool zim = false;
-}
-
-Future onAttributeChange(Element node) {
-  var completer = new Completer();
-  new MutationObserver((records, observer) {
-    observer.disconnect();
-    completer.complete();
-  })..observe(node, attributes: true);
-  scheduleMicrotask(Observable.dirtyCheck);
-  return completer.future;
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  // Most tests use @CustomTag, here we test out the impertive register:
-  Polymer.register('x-foo', XFoo);
-  Polymer.register('x-bar', XBar);
-  Polymer.register('x-zot', XZot);
-  Polymer.register('x-compose', XCompose);
-  Polymer.register('x-attr-publish', XAttrPublish);
-
-  setUp(() => Polymer.onReady);
-
-  test('property to attribute reflection', () {
-    var xbasic = querySelector('x-basic');
-    expect(xbasic.getAttribute('nog'), null,
-        reason: 'property published with `attributes` has correct initial '
-        'value');
-    xbasic.setAttribute('nog', 'hi');
-    expect(xbasic.getAttribute('nog'), 'hi',
-        reason: 'deserialization of property published via `attributes`');
-
-    var xattrpublish = querySelector('x-attr-publish');
-    expect(xattrpublish.nog, '',
-        reason: 'property published with `attributes` has correct initial '
-        'value');
-    xattrpublish.setAttribute('nog', 'hi');
-    expect(xattrpublish.nog, 'hi',
-        reason: 'deserialization of property published via `attributes`');
-
-    var xcompose = querySelector('x-compose');
-    var xfoo = querySelector('x-foo');
-    expect(xfoo.foo, '',
-        reason: 'property published with info object has correct initial '
-        'value');
-    var xbar = querySelector('x-bar');
-    expect(xbar.zim, false,
-        reason: 'property published with info object has correct initial '
-        'value');
-    expect(xbar.foo, '',
-        reason: 'property published with info object has correct initial '
-        'value');
-    var xzot = querySelector('x-zot');
-    xfoo.foo = 5;
-    xfoo.attributes['def1'] = '15';
-    xfoo.def2 = 15;
-
-    // Dart note: our test here is more async than JS until we change
-    // Polymer.dart bindings to work like observe.js "bindToInstance".
-    return onAttributeChange(xfoo).then((_) {
-      expect(xcompose.$['bar'].attributes.containsKey('zim'), false,
-          reason: 'attribute bound to property updates when binding is made');
-
-      expect(xfoo.attributes['def2'], '15',
-          reason: 'default valued published property reflects to attr');
-
-      expect(xfoo.def1, 15,
-          reason: 'attr updates default valued published property');
-
-      expect('${xfoo.foo}', xfoo.attributes['foo'],
-          reason: 'attribute reflects property as string');
-      xfoo.attributes['foo'] = '27';
-      // TODO(jmesserly): why is JS leaving this as a String? From the code it
-      // looks like it should use the type of 5 and parse it as a number.
-      expect('${xfoo.foo}', xfoo.attributes['foo'],
-          reason: 'property reflects attribute');
-      //
-      xfoo.baz = 'Hello';
-    }).then((_) => onAttributeChange(xfoo)).then((_) {
-      expect(xfoo.baz, xfoo.attributes['baz'],
-          reason: 'attribute reflects property');
-      //
-      xbar.foo = 'foo!';
-      xbar.zot = 27;
-      xbar.zim = true;
-      xbar.str = 'str!';
-      xbar.obj = {'hello': 'world'};
-    }).then((_) => onAttributeChange(xbar)).then((_) {
-      expect(xbar.foo, xbar.attributes['foo'],
-          reason: 'inherited published property is reflected');
-      expect('${xbar.zot}', xbar.attributes['zot'],
-          reason: 'attribute reflects property as number');
-      expect(xbar.attributes['zim'], '',
-          reason: 'attribute reflects true valued boolean property as '
-          'having attribute');
-      expect(xbar.str, xbar.attributes['str'],
-          reason: 'attribute reflects property as published string');
-      expect(xbar.attributes.containsKey('obj'), false,
-          reason: 'attribute does not reflect object property');
-      xbar.attributes['zim'] = 'false';
-      xbar.attributes['foo'] = 'foo!!';
-      xbar.attributes['zot'] = '54';
-      xbar.attributes['str'] = 'str!!';
-      xbar.attributes['obj'] = "{'hello': 'world'}";
-      expect(xbar.foo, xbar.attributes['foo'],
-          reason: 'property reflects attribute as string');
-      expect(xbar.zot, 54, reason: 'property reflects attribute as number');
-      expect(xbar.zim, false, reason: 'property reflects attribute as boolean');
-      expect(xbar.str, 'str!!',
-          reason: 'property reflects attribute as published string');
-      expect(xbar.obj, {'hello': 'world'},
-          reason: 'property reflects attribute as object');
-      xbar.zim = false;
-    }).then((_) => onAttributeChange(xbar)).then((_) {
-      expect(xbar.attributes.containsKey('zim'), false,
-          reason: 'attribute reflects false valued boolean property as NOT '
-          'having attribute');
-      xbar.obj = 'hi';
-    }).then((_) => onAttributeChange(xbar)).then((_) {
-      expect(xbar.attributes['obj'], 'hi',
-          reason: 'reflect property based on current type');
-
-      expect(xzot.str, 'str2');
-      expect(xzot.zot, 2);
-      xzot.str = 'hello';
-      xzot.zot = 5;
-    }).then((_) => onAttributeChange(xzot)).then((_) {
-      expect(xzot.attributes['str'], xzot.str);
-      // TODO(jmesserly): the JS test seems backwards of the description text.
-      // Is it because it doesn't do "WebComponents.flush()"?
-      expect(xzot.attributes['zot'], '5',
-          reason: 'extendee reflect false not honored');
-    });
-  });
-}));
diff --git a/packages/polymer/test/prop_attr_reflection_test.html b/packages/polymer/test/prop_attr_reflection_test.html
deleted file mode 100644
index c7e7217..0000000
--- a/packages/polymer/test/prop_attr_reflection_test.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>property to attribute reflection</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-basic></x-basic>
-    <polymer-element name="x-basic" attributes="nog" noscript>
-    </polymer-element>
-
-    <x-attr-publish></x-attr-publish>
-    <polymer-element name="x-attr-publish" attributes="nog">
-    </polymer-element>
-
-    <x-foo></x-foo>
-    <polymer-element name="x-foo"></polymer-element>
-
-    <x-bar></x-bar>
-    <polymer-element name="x-bar" extends="x-foo"></polymer-element>
-
-    <x-zot></x-zot>
-    <polymer-element name="x-zot" extends="x-bar"></polymer-element>
-
-    <x-compose></x-compose>
-    <polymer-element name="x-compose">
-      <template>
-        <x-bar id="bar" zim="{{zim}}"></x-bar>
-      </template>
-    </polymer-element>
-
-  <script type="application/dart" src="prop_attr_reflection_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/property_change_test.dart b/packages/polymer/test/property_change_test.dart
deleted file mode 100644
index 4bb6564..0000000
--- a/packages/polymer/test/property_change_test.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.property_change_test;
-
-import 'dart:async';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-// Dart note: this is a tad different from the JS code. We don't support putting
-// expandos on Dart objects and then observing them. On the other hand, we want
-// to make sure that superclass observers are correctly detected.
-
-final _zonk = new Completer();
-final _bar = new Completer();
-
-@reflectable
-class XBase extends PolymerElement {
-  @observable String zonk = '';
-
-  XBase.created() : super.created();
-
-  zonkChanged() {
-    expect(zonk, 'zonk', reason: 'change calls *Changed on superclass');
-    _zonk.complete();
-  }
-}
-
-@CustomTag('x-test')
-class XTest extends XBase {
-  @observable String bar = '';
-
-  XTest.created() : super.created();
-
-  ready() {
-    bar = 'bar';
-    new Future(() {
-      zonk = 'zonk';
-    });
-  }
-
-  barChanged() {
-    expect(bar, 'bar', reason: 'change in ready calls *Changed');
-    _bar.complete();
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('bar change detected', () => _bar.future);
-  test('zonk change detected', () => _zonk.future);
-}));
diff --git a/packages/polymer/test/property_change_test.html b/packages/polymer/test/property_change_test.html
deleted file mode 100644
index 404cdfc..0000000
--- a/packages/polymer/test/property_change_test.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>property changes</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-test id="test"></x-test>
-
-    <polymer-element name="x-test"><template></template></polymer-element>
-    <script type="application/dart" src="property_change_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/property_observe_test.dart b/packages/polymer/test/property_observe_test.dart
deleted file mode 100644
index 2f4d696..0000000
--- a/packages/polymer/test/property_observe_test.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.property_change_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-var _changes = 0;
-final _done = new Completer();
-
-checkDone() {
-  if (6 == ++_changes) {
-    _done.complete();
-  }
-}
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  @observable String bar = '';
-  @observable String pie;
-  @observable Map a;
-
-  XTest.created() : super.created();
-
-  ready() {
-    bar = 'bar';
-    pie = 'pie';
-    a = {'b': {'c': 'exists'}};
-  }
-
-  barChanged() {
-    // Dart note: unlike polymer-js we support multiple observers, due to how
-    // our @ObserveProperty metadata translated.
-    // _done.completeError('barChanged should not be called.');
-    expect('bar', 'bar', reason: 'barChanged called');
-    checkDone();
-  }
-
-  @ObserveProperty('bar pie')
-  validate() {
-    window.console.log('validate');
-    expect('bar', 'bar', reason: 'custom change observer called');
-    expect('pie', 'pie', reason: 'custom change observer called');
-    checkDone();
-  }
-
-  // Dart note: test that we can observe "pie" twice.
-  @ObserveProperty('pie')
-  validateYummyPie() {
-    window.console.log('validateYummyPie');
-    expect('pie', 'pie', reason: 'validateYummyPie called');
-    checkDone();
-  }
-
-  @ObserveProperty('a.b.c')
-  validateSubPath(oldValue, newValue) {
-    window.console.log('validateSubPath $oldValue $newValue');
-    expect(newValue, 'exists', reason: 'subpath change observer called');
-    checkDone();
-  }
-}
-
-@CustomTag('x-test2')
-class XTest2 extends XTest {
-  @observable String noogle;
-
-  XTest2.created() : super.created();
-
-  @ObserveProperty('noogle')
-  validate() => super.validate();
-
-  ready() {
-    super.ready();
-    noogle = 'noogle';
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('changes detected', () => _done.future);
-}));
diff --git a/packages/polymer/test/property_observe_test.html b/packages/polymer/test/property_observe_test.html
deleted file mode 100644
index 7743631..0000000
--- a/packages/polymer/test/property_observe_test.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>property.observe changes</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-    <x-test id="test"></x-test>
-    <x-test2 id="test"></x-test2>
-
-    <polymer-element name="x-test"><template></template></polymer-element>
-    <polymer-element name="x-test2" extends="x-test">
-      <template></template>
-    </polymer-element>
-    <script type="application/dart" src="property_observe_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/publish_attributes_test.dart b/packages/polymer/test/publish_attributes_test.dart
deleted file mode 100644
index 35ca126..0000000
--- a/packages/polymer/test/publish_attributes_test.dart
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-// Dart note: unlike JS, you can't publish something that doesn't
-// have a corresponding field because we can't dynamically add properties.
-// So we define XFoo and XBar types here.
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  @observable var Foo;
-  @observable var baz;
-}
-
-@CustomTag('x-bar')
-class XBar extends XFoo {
-  XBar.created() : super.created();
-
-  @observable var Bar;
-}
-
-@CustomTag('x-zot')
-class XZot extends XBar {
-  XZot.created() : super.created();
-
-  @published int zot = 3;
-}
-
-@CustomTag('x-squid')
-class XSquid extends XZot {
-  XSquid.created() : super.created();
-
-  @published int baz = 13;
-  @published int zot = 3;
-  @published int squid = 7;
-}
-
-// Test inherited "attriubtes"
-class XBaz extends PolymerElement {
-  XBaz.created() : super.created();
-  @observable int qux = 13;
-}
-
-@CustomTag('x-qux')
-class XQux extends XBaz {
-  XQux.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('published properties', () {
-    published(tag) =>
-        (new Element.tag(tag) as PolymerElement).element.publishedProperties;
-
-    expect(published('x-foo'), ['Foo', 'baz']);
-    expect(published('x-bar'), ['Foo', 'baz', 'Bar']);
-    expect(published('x-zot'), ['Foo', 'baz', 'Bar', 'zot']);
-    expect(published('x-squid'), ['Foo', 'baz', 'Bar', 'zot', 'squid']);
-    expect(published('x-qux'), ['qux']);
-  });
-}));
diff --git a/packages/polymer/test/publish_attributes_test.html b/packages/polymer/test/publish_attributes_test.html
deleted file mode 100644
index 29b24d9..0000000
--- a/packages/polymer/test/publish_attributes_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>publish attributes</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-    <polymer-element name="x-foo" attributes="Foo baz">
-    </polymer-element>
-
-    <polymer-element name="x-bar" extends="x-foo" attributes="Bar">
-    </polymer-element>
-
-    <polymer-element name="x-zot" extends="x-bar">
-    </polymer-element>
-
-    <polymer-element name="x-squid" extends="x-zot" attributes="squid">
-    </polymer-element>
-
-    <polymer-element name="x-qux" attributes="qux"></polymer-element>
-
-  <script type="application/dart" src="publish_attributes_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/publish_inherited_properties_test.dart b/packages/polymer/test/publish_inherited_properties_test.dart
deleted file mode 100644
index efc44b1..0000000
--- a/packages/polymer/test/publish_inherited_properties_test.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-import 'package:logging/logging.dart';
-
-// Dart note: unlike JS, you can't publish something that doesn't
-// have a corresponding field because we can't dynamically add properties.
-// So we define XFoo and XBar types here.
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  @published var Foo;
-}
-
-class XBar extends XFoo {
-  XBar.created() : super.created();
-
-  @published var Bar;
-}
-
-@CustomTag('x-zot')
-class XZot extends XBar {
-  XZot.created() : super.created();
-
-  // Note: this is published because it appears in the `attributes` attribute.
-  var m;
-
-  @published int zot = 3;
-}
-
-// Regresion test for dartbug.comk/14559. The bug is still open, but we don't
-// hit it now that we use smoke. The bug was assinging @CustomTag('x-zot') to
-// this class incorrectly and as a result `zap` was listed in `x-zot`.
-class XWho extends XZot {
-  XWho.created() : super.created();
-
-  @published var zap;
-}
-
-@CustomTag('x-squid')
-class XSquid extends XZot {
-  XSquid.created() : super.created();
-
-  @published int baz = 13;
-  @published int zot = 5;
-  @published int squid = 7;
-}
-
-main() {
-  useHtmlConfiguration();
-
-  initPolymer().then((zone) {
-    zone.run(() {
-      Logger.root.level = Level.ALL;
-      Logger.root.onRecord.listen((r) => print('${r.loggerName} ${r.message}'));
-
-      Polymer.register('x-noscript', XZot);
-
-      setUp(() => Polymer.onReady);
-
-      test('published properties', () {
-        published(tag) => (new Element.tag(
-            tag) as PolymerElement).element.publishedProperties;
-
-        expect(published('x-zot'), ['Foo', 'Bar', 'zot', 'm']);
-        expect(
-            published('x-squid'), ['Foo', 'Bar', 'zot', 'm', 'baz', 'squid']);
-        expect(published('x-noscript'), ['Foo', 'Bar', 'zot', 'm']);
-        expect(
-            published('x-squid'), ['Foo', 'Bar', 'zot', 'm', 'baz', 'squid']);
-      });
-    });
-  });
-}
diff --git a/packages/polymer/test/publish_inherited_properties_test.html b/packages/polymer/test/publish_inherited_properties_test.html
deleted file mode 100644
index 1d2e65c..0000000
--- a/packages/polymer/test/publish_inherited_properties_test.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>publish inherited properties</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-    <polymer-element name="x-zot" attributes="m">
-    </polymer-element>
-
-    <polymer-element name="x-squid" extends="x-zot" attributes="squid">
-    </polymer-element>
-
-    <!--
-    Dart note: changed from 'noscript', since those are implemented by JS
-    we can't extend a 'noscript' element from Dart or have it extend a Dart
-    element.
-    -->
-    <polymer-element name="x-noscript" extends="x-zot">
-    </polymer-element>
-
-  <script type="application/dart" src="publish_inherited_properties_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/register_test.dart b/packages/polymer/test/register_test.dart
deleted file mode 100644
index 0d6d9c5..0000000
--- a/packages/polymer/test/register_test.dart
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('x-html')
-class XHtmlElement extends PolymerElement {
-  XHtmlElement.created() : super.created();
-}
-
-@CustomTag('x-html-two')
-class XHtml2Element extends XHtmlElement {
-  XHtml2Element.created() : super.created();
-}
-
-@CustomTag('x-div')
-class XDivElement extends DivElement with Polymer, Observable {
-  XDivElement.created() : super.created() {
-    polymerCreated();
-  }
-}
-
-@CustomTag('x-div-two')
-class XDiv2Element extends XDivElement {
-  XDiv2Element.created() : super.created();
-}
-
-/// Dart-specific test:
-/// This element is registered from code without an associated polymer-element.
-class XPolymerElement extends PolymerElement {
-  XPolymerElement.created() : super.created();
-}
-
-/// Dart-specific test:
-/// This element is registered from code without an associated polymer-element.
-class XButtonElement extends ButtonElement with Polymer, Observable {
-  XButtonElement.created() : super.created() {
-    polymerCreated();
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('elements upgraded', () {
-    expect(querySelector('x-html') is XHtmlElement, isTrue);
-    expect(querySelector('x-html-two') is XHtml2Element, isTrue);
-    expect(querySelector('#x-div') is XDivElement, isTrue);
-    expect(querySelector('#x-div-two') is XDiv2Element, isTrue);
-  });
-
-  group('register without polymer-element', () {
-    test('custom element', () {
-      Polymer.registerSync('x-polymer', XPolymerElement,
-          template: new Element.html('<template>FOOBAR'));
-
-      expect(document.createElement('x-polymer') is XPolymerElement, isTrue,
-          reason: 'should have been registered');
-
-      var e = document.querySelector('x-polymer');
-      expect(e is XPolymerElement, isTrue,
-          reason: 'elements on page should be upgraded');
-      expect(e.shadowRoot, isNotNull,
-          reason: 'shadowRoot was created from template');
-      expect(e.shadowRoot.nodes[0].text, 'FOOBAR');
-    });
-
-    test('type extension', () {
-      Polymer.registerSync('x-button', XButtonElement, extendsTag: 'button');
-
-      expect(document.createElement('button', 'x-button') is XButtonElement,
-          isTrue, reason: 'should have been registered');
-      expect(document.querySelector('[is=x-button]') is XButtonElement, isTrue,
-          reason: 'elements on page should be upgraded');
-    });
-  });
-}));
diff --git a/packages/polymer/test/register_test.html b/packages/polymer/test/register_test.html
deleted file mode 100644
index 68e24df..0000000
--- a/packages/polymer/test/register_test.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>register test</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-    <polymer-element name="x-html">
-    </polymer-element>
-
-    <polymer-element name="x-html-two" extends="x-html">
-    </polymer-element>
-
-    <polymer-element name="x-div" extends="div">
-    </polymer-element>
-
-    <polymer-element name="x-div-two" extends="x-div">
-    </polymer-element>
-
-    <x-html></x-html>
-    <x-html-two></x-html-two>
-    <div is='x-div' id='x-div'></div>
-    <div is='x-div-two' id='x-div-two'></div>
-
-    <button is='x-button'></button>
-    <x-polymer></x-polymer>
-
-  <script type="application/dart" src="register_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/sort_registration_part1.dart b/packages/polymer/test/sort_registration_part1.dart
deleted file mode 100644
index b9f2497..0000000
--- a/packages/polymer/test/sort_registration_part1.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer.test.sort_registration_test;
-
-// D will be registered after B below.
-@CustomTag('x-d')
-class D extends B {
-  D.created() : super.created();
-}
-
-@CustomTag('x-b')
-class B extends A {
-  B.created() : super.created();
-}
-
-// C is declared in another file, but it will be registered after B and before E
-@CustomTag('x-e')
-class E extends C {
-  E.created() : super.created();
-}
diff --git a/packages/polymer/test/sort_registration_part2.dart b/packages/polymer/test/sort_registration_part2.dart
deleted file mode 100644
index 7b423e5..0000000
--- a/packages/polymer/test/sort_registration_part2.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of polymer.test.sort_registration_test;
-
-@CustomTag('x-c')
-class C extends B {
-  C.created() : super.created();
-}
diff --git a/packages/polymer/test/sort_registration_test.dart b/packages/polymer/test/sort_registration_test.dart
deleted file mode 100644
index 3775a48..0000000
--- a/packages/polymer/test/sort_registration_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.sort_registration_test;
-
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-part 'sort_registration_part1.dart';
-part 'sort_registration_part2.dart';
-
-@CustomTag('x-a')
-class A extends PolymerElement {
-  A.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-  setUp(() => Polymer.onReady);
-
-  test('registration is done in the right order', () {
-    expect(querySelector('x-e') is E, isTrue);
-  });
-}));
diff --git a/packages/polymer/test/sort_registration_test.html b/packages/polymer/test/sort_registration_test.html
deleted file mode 100644
index 62e0a55..0000000
--- a/packages/polymer/test/sort_registration_test.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. 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>event path</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-
-  <polymer-element name="x-e" extends="x-c"><template></template></polymer-element>
-  <polymer-element name="x-a"><template></template></polymer-element>
-  <polymer-element name="x-b" extends="x-a"><template></template></polymer-element>
-  <polymer-element name="x-c" extends="x-b"><template></template></polymer-element>
-  <polymer-element name="x-d" extends="x-b"><template></template></polymer-element>
-  <x-a></x-a>
-  <x-b></x-b>
-  <x-c></x-c>
-  <x-d></x-d>
-  <x-e></x-e>
-  <script type="application/dart" src="sort_registration_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/take_attributes_test.dart b/packages/polymer/test/take_attributes_test.dart
deleted file mode 100644
index 582d1ef..0000000
--- a/packages/polymer/test/take_attributes_test.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
-  XFoo.created() : super.created();
-
-  @published bool boolean = false;
-  @published num number = 42;
-  @published String str = "don't panic";
-}
-
-@CustomTag('x-bar')
-class XBar extends PolymerElement {
-  XBar.created() : super.created();
-
-  @observable bool boolean = false;
-  @observable num number = 42;
-  @observable String str = "don't panic";
-}
-
-@CustomTag('x-zot')
-class XZot extends XBar {
-  XZot.created() : super.created();
-  @observable num number = 84;
-}
-
-@CustomTag('x-date')
-class XDate extends PolymerElement {
-  XDate.created() : super.created();
-  @observable var value = new DateTime(2013, 9, 25);
-}
-
-@CustomTag('x-array')
-class XArray extends PolymerElement {
-  XArray.created() : super.created();
-  @observable List values;
-}
-
-@CustomTag('x-obj')
-class XObj extends PolymerElement {
-  XObj.created() : super.created();
-  @observable var values = {};
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('take attributes', () {
-    queryXTag(x) => document.querySelector(x);
-
-    expect(queryXTag("#foo0").boolean, true);
-    expect(queryXTag("#foo1").boolean, false);
-    expect(queryXTag("#foo2").boolean, true);
-    expect(queryXTag("#foo3").boolean, false);
-    // this one is only 'truthy'
-    expect(queryXTag("#foo4").boolean, true);
-    // this one is also 'truthy', but should it be?
-    expect(queryXTag("#foo5").boolean, true);
-    //
-    expect(queryXTag("#foo0").number, 42);
-    expect(queryXTag("#foo0").str, "don't panic");
-    //
-    expect(queryXTag("#bar0").boolean, true);
-    expect(queryXTag("#bar1").boolean, false);
-    expect(queryXTag("#bar2").boolean, true);
-    expect(queryXTag("#bar3").boolean, false);
-    // this one is only 'truthy'
-    expect(queryXTag("#bar4").boolean, true);
-    // this one is also 'truthy', but should it be?
-    expect(queryXTag("#bar5").boolean, true);
-    //
-    expect(queryXTag("#bar0").number, 42);
-    expect(queryXTag("#bar0").str, "don't panic");
-    //
-    expect(queryXTag("#zot0").boolean, true);
-    expect(queryXTag("#zot1").boolean, false);
-    expect(queryXTag("#zot2").boolean, true);
-    expect(queryXTag("#zot3").boolean, false);
-    // this one is only 'truthy'
-    expect(queryXTag("#zot4").boolean, true);
-    // this one is also 'truthy', but should it be?
-    expect(queryXTag("#zot5").boolean, true);
-    //
-    // Issue 14096 - field initializers are in the incorrect order.
-    // This should be expecting 84.
-    //expect(queryXTag("#zot0").number, 84);
-    expect(queryXTag("#zot6").number, 185);
-    expect(queryXTag("#zot0").str, "don't panic");
-    //
-    // Date deserialization tests
-    expect(queryXTag("#date1").value, new DateTime(2014, 12, 25));
-    expect(queryXTag("#date2").value, isNot(equals(new DateTime(2014, 12, 25))),
-        reason: 'Dart does not support this format');
-    expect(queryXTag("#date3").value, new DateTime(2014, 12, 25, 11, 45));
-    expect(queryXTag("#date4").value, new DateTime(2014, 12, 25, 11, 45, 30));
-    // Failures on Firefox. Need to fix this with custom parsing
-    //expect(String(queryXTag("#date5").value), String(new Date(2014, 11, 25, 11, 45, 30)));
-    //
-    // milliseconds in the Date string not supported on Firefox
-    //expect(queryXTag("#date5").value.getMilliseconds(), new Date(2014, 11, 25, 11, 45, 30, 33).getMilliseconds());
-    //
-    // Array deserialization tests
-    expect(queryXTag("#arr1").values, [0, 1, 2]);
-    expect(queryXTag("#arr2").values, [33]);
-    // Object deserialization tests
-    expect(queryXTag("#obj1").values, {'name': 'Brandon', 'nums': [1, 22, 33]});
-    expect(queryXTag("#obj2").values, {"color": "Red"});
-    expect(queryXTag("#obj3").values, {
-      'movie': 'Buckaroo Banzai',
-      'DOB': '07/31/1978'
-    });
-  });
-}));
diff --git a/packages/polymer/test/take_attributes_test.html b/packages/polymer/test/take_attributes_test.html
deleted file mode 100644
index 12ac0fc..0000000
--- a/packages/polymer/test/take_attributes_test.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>take attributes</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body unresolved>
-
-    <polymer-element name="x-foo"></polymer-element>
-
-    <x-foo id="foo0" boolean="true"></x-foo>
-    <x-foo id="foo1" boolean="false"></x-foo>
-    <x-foo id="foo2" boolean></x-foo>
-    <x-foo id="foo3"></x-foo>
-    <x-foo id="foo4" boolean="squid"></x-foo>
-    <x-foo id="foo5" boolean="0"></x-foo>
-
-    <polymer-element name="x-bar" attributes="boolean number str">
-    </polymer-element>
-
-    <x-bar id="bar0" boolean="true"></x-bar>
-    <x-bar id="bar1" boolean="false"></x-bar>
-    <x-bar id="bar2" boolean></x-bar>
-    <x-bar id="bar3"></x-bar>
-    <x-bar id="bar4" boolean="squid"></x-bar>
-    <x-bar id="bar5" boolean="0"></x-bar>
-
-    <polymer-element name="x-zot" extends="x-bar" attributes="boolean">
-    </polymer-element>
-
-    <x-zot id="zot0" boolean="true"></x-zot>
-    <x-zot id="zot1" boolean="false"></x-zot>
-    <x-zot id="zot2" boolean></x-zot>
-    <x-zot id="zot3"></x-zot>
-    <x-zot id="zot4" boolean="squid"></x-zot>
-    <x-zot id="zot5" boolean="0"></x-zot>
-    <x-zot id="zot6" number="185"></x-zot>
-
-    <polymer-element name="x-date" attributes="value"></polymer-element>
-
-    <!--
-    TODO(jmesserly): Dart note: I changed these to dash "-" instead of slash "/"
-    as the year-month-day separator. Also the form "December 25, 2014" is not
-    supported in Dart.
-    -->
-    <x-date id="date1" value="2014-12-25"></x-date>
-    <x-date id="date2" value="December 25, 2014"></x-date>
-    <x-date id="date3" value="2014-12-25 11:45"></x-date>
-    <x-date id="date4" value="2014-12-25 11:45:30"></x-date>
-    <x-date id="date5" value="2014-12-25 11:45:30:33"></x-date>
-    <x-date id="dated" value="2014-12-25T11:45:30:33"></x-date>
-
-    <polymer-element name="x-array" attributes="values"></polymer-element>
-
-    <x-array id="arr1" values="[0, 1, 2]"></x-array>
-    <x-array id="arr2" values="[33]"></x-array>
-
-    <polymer-element name="x-obj" attributes="values"></polymer-element>
-
-    <x-obj id="obj1" values='{ "name": "Brandon", "nums": [1, 22, 33] }'>
-    </x-obj>
-    <x-obj id="obj2" values='{ "color": "Red" }'></x-obj>
-    <x-obj id="obj3"
-           values="{ 'movie': 'Buckaroo Banzai', 'DOB': '07/31/1978' }">
-    </x-obj>
-
-  <script type="application/dart" src="take_attributes_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/template_attr_template_test.dart b/packages/polymer/test/template_attr_template_test.dart
deleted file mode 100644
index 15b84a1..0000000
--- a/packages/polymer/test/template_attr_template_test.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-int testsRun = 0;
-
-@CustomTag('decoration-test')
-class DecorationTest extends PolymerElement {
-  List<int> options = [1, 2, 3, 4];
-
-  DecorationTest.created() : super.created();
-
-  ready() {
-    this.test();
-    testsRun++;
-  }
-
-  test() {
-    expect($['select'].children.length, 5,
-        reason: 'attribute template stamped');
-  }
-}
-
-@CustomTag('decoration-test2')
-class DecorationTest2 extends DecorationTest {
-  List<List<int>> arrs = [[1, 2, 3], [4, 5, 6]];
-
-  DecorationTest2.created() : super.created();
-
-  test() {
-    expect($['tbody'].children.length, 3, reason: 'attribute template stamped');
-    expect($['tbody'].children[1].children.length, 4,
-        reason: 'attribute sub-template stamped');
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('declaration-tests-ran', () {
-    expect(testsRun, 2, reason: 'decoration-tests-ran');
-  });
-}));
diff --git a/packages/polymer/test/template_attr_template_test.html b/packages/polymer/test/template_attr_template_test.html
deleted file mode 100644
index 277cd9b..0000000
--- a/packages/polymer/test/template_attr_template_test.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. All rights reserved. Use of this source code is governed by a
-   BSD-style license that can be found in the LICENSE file.
--->
-<!doctype html>
-<html>
-
-<head>
-  <title>template attribute test</title>
-  <link rel="import" href="packages/polymer/polymer.html">
-  <script src="packages/unittest/test_controller.js"></script>
-  <link rel="import" href="template_attr_template_test_import.html">
-</head>
-<body unresolved>
-
-<polymer-element name="decoration-test2" extends="decoration-test">
-  <template>
-    <table>
-      <thead>
-        <tr>
-          <th>one</th>
-          <th>two</th>
-          <th>three</th>
-        </tr>
-      </thead>
-      <tbody id="tbody">
-      <tr template repeat="{{ arr in arrs }}">
-        <td template repeat="{{ n in arr }}">
-          {{n}}
-        </td>
-      </tr>
-      </tbody>
-    </table>
-  </template>
-</polymer-element>
-
-<decoration-test></decoration-test>
-<br>
-<decoration-test2></decoration-test2>
-
-<script type="application/dart" src="template_attr_template_test.dart">
-</script>
-
-</body>
-</html>
diff --git a/packages/polymer/test/template_attr_template_test_import.html b/packages/polymer/test/template_attr_template_test_import.html
deleted file mode 100644
index e05538f..0000000
--- a/packages/polymer/test/template_attr_template_test_import.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. All rights reserved. Use of this source code is governed by a
-   BSD-style license that can be found in the LICENSE file.
--->
-<link rel="import" href="packages/polymer/polymer.html">
-<polymer-element name="decoration-test">
-  <template>
-    <select id="select">
-      <option template repeat="{{opt in options}}" value="{{opt}}">{{opt}}</option>
-    </select>
-  </template>
-</polymer-element>
diff --git a/packages/polymer/test/template_distribute_dynamic_test.dart b/packages/polymer/test/template_distribute_dynamic_test.dart
deleted file mode 100644
index 806f9d5..0000000
--- a/packages/polymer/test/template_distribute_dynamic_test.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  @observable List list;
-
-  final _attached = new Completer();
-  Future onTestDone;
-
-  XTest.created() : super.created() {
-    onTestDone = _attached.future.then(_runTest);
-  }
-
-  attached() {
-    super.attached();
-    _attached.complete();
-  }
-
-  _runTest(_) {
-    list = [{'name': 'foo'}, {'name': 'bar'}];
-    return new Future(() {
-      // tickle SD polyfill
-      offsetHeight;
-      var children = this.$['echo'].children;
-      expect(children[0].localName, 'template',
-          reason: 'shadowDOM dynamic distribution via template');
-      expect(children[1].text, 'foo',
-          reason: 'shadowDOM dynamic distribution via template');
-      expect(children[2].text, 'bar',
-          reason: 'shadowDOM dynamic distribution via template');
-      expect(children.length, 3, reason: 'expected number of children');
-    });
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('inserted called', () => (querySelector('x-test') as XTest).onTestDone);
-}));
diff --git a/packages/polymer/test/template_distribute_dynamic_test.html b/packages/polymer/test/template_distribute_dynamic_test.html
deleted file mode 100644
index 2d8859b..0000000
--- a/packages/polymer/test/template_distribute_dynamic_test.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>template distribute</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-  <x-test></x-test>
-
-  <polymer-element name="x-echo" noscript>
-    <template>
-      <div>Echoing:</div>
-      <content select="*"></content>
-    </template>
-  </polymer-element>
-
-  <polymer-element name="x-test">
-    <template>
-      <x-echo id="echo">
-        <template repeat="{{list}}">
-          <div>{{this['name']}}</div>
-        </template>
-      </x-echo>
-    </template>
-  </polymer-element>
-
-  <script type="application/dart" src="template_distribute_dynamic_test.dart">
-  </script>
-  </body>
-</html>
diff --git a/packages/polymer/test/two_way_bind_test.dart b/packages/polymer/test/two_way_bind_test.dart
deleted file mode 100644
index d026379..0000000
--- a/packages/polymer/test/two_way_bind_test.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-@CustomTag('inner-element')
-class InnerElement extends PolymerElement {
-  @published int number;
-  @published bool boolean;
-  @published String string;
-
-  InnerElement.created() : super.created();
-}
-
-@CustomTag('outer-element')
-class OuterElement extends PolymerElement {
-  @observable int number = 1;
-  @observable bool boolean = false;
-  @observable String string = 'a';
-
-  OuterElement.created() : super.created();
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('inner element gets initial values', () {
-    var outer = querySelector('outer-element');
-    var inner = outer.shadowRoot.querySelector('inner-element');
-
-    expect(inner.number, 1);
-    expect(inner.boolean, false);
-    expect(inner.string, 'a');
-  });
-
-  test('inner element updates the outer element', () {
-    var outer = querySelector('outer-element');
-    var inner = outer.shadowRoot.querySelector('inner-element');
-
-    // Toggle the value in the child and make sure that propagates around.
-    inner.number = 2;
-    inner.boolean = true;
-    inner.string = 'b';
-    return new Future(() {}).then((_) {
-      expect(outer.number, 2);
-      expect(outer.boolean, true);
-      expect(outer.string, 'b');
-
-      inner.number = 1;
-      inner.boolean = false;
-      inner.string = 'a';
-    }).then((_) => new Future(() {})).then((_) {
-      expect(outer.number, 1);
-      expect(outer.boolean, false);
-      expect(outer.string, 'a');
-    });
-  });
-
-  test('outer element updates the inner element', () {
-    var outer = querySelector('outer-element');
-    var inner = outer.shadowRoot.querySelector('inner-element');
-
-    // Toggle the value in the parent and make sure that propagates around.
-    outer.number = 2;
-    outer.boolean = true;
-    outer.string = 'b';
-    return new Future(() {}).then((_) {
-      expect(inner.number, 2);
-      expect(inner.boolean, true);
-      expect(inner.string, 'b');
-
-      outer.number = 1;
-      outer.boolean = false;
-      outer.string = 'a';
-    }).then((_) => new Future(() {})).then((_) {
-      expect(inner.number, 1);
-      expect(inner.boolean, false);
-      expect(inner.string, 'a');
-    });
-  });
-}));
diff --git a/packages/polymer/test/two_way_bind_test.html b/packages/polymer/test/two_way_bind_test.html
deleted file mode 100644
index 92147bf..0000000
--- a/packages/polymer/test/two_way_bind_test.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-  <head>
-    <title>two way bindings</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-
-  <body>
-    <polymer-element name="inner-element">
-      <template>
-        <h1>Hello from the child</h1>
-        <p>The number is {{number}}</p>
-        <p>The boolean is {{boolean}}</p>
-        <p>The string is {{string}}</p>
-      </template>
-    </polymer-element>
-
-    <polymer-element name="outer-element">
-      <template>
-        <h1>Hello from the custom element</h1>
-        <p>The number is {{number}}</p>
-        <p>The boolean is {{boolean}}</p>
-        <p>The string is {{string}}</p>
-        <p>
-          <inner-element id="child" number="{{number}}"
-              boolean="{{boolean}}" string="{{string}}"></inner-element>
-        </p>
-      </template>
-    </polymer-element>
-
-    <outer-element></outer-element>
-
-    <script type="application/dart" src="two_way_bind_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/unbind_test.dart b/packages/polymer/test/unbind_test.dart
deleted file mode 100644
index 248ee51..0000000
--- a/packages/polymer/test/unbind_test.dart
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.unbind_test;
-
-import 'dart:async' show Future, scheduleMicrotask;
-import 'dart:html';
-
-@MirrorsUsed(targets: const [Polymer], override: 'polymer.test.unbind_test')
-import 'dart:mirrors' show reflect, reflectClass, MirrorSystem, MirrorsUsed;
-
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
-  @observable var foo = '';
-  @observable var bar;
-
-  bool fooWasChanged = false;
-  var validBar;
-
-  factory XTest() => new Element.tag('x-test');
-  XTest.created() : super.created();
-
-  ready() {}
-
-  fooChanged() {
-    fooWasChanged = true;
-  }
-
-  barChanged() {
-    validBar = bar;
-  }
-
-  bool get isBarValid => validBar == bar;
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('unbind', unbindTests);
-}));
-
-Future testAsync(List<Function> tests, int delayMs, [List args]) {
-  if (tests.length == 0) return new Future.value();
-  // TODO(jmesserly): CustomElements.takeRecords();
-  return new Future.delayed(new Duration(milliseconds: delayMs), () {
-    if (args == null) args = [];
-    var lastArgs = Function.apply(tests.removeAt(0), args);
-    return testAsync(tests, delayMs, lastArgs);
-  });
-}
-
-// TODO(sorvell): In IE, the unbind time is indeterminate, so wait an
-// extra beat.
-delay(x) => new Future.delayed(new Duration(milliseconds: 50), () => x);
-
-// TODO(jmesserly): fix this when it's easier to get a private symbol.
-final unboundSymbol = reflectClass(Polymer).declarations.keys
-    .firstWhere((s) => MirrorSystem.getName(s) == '_unbound');
-final observersSymbol = reflectClass(Polymer).declarations.keys
-    .firstWhere((s) => MirrorSystem.getName(s) == '_observers');
-
-_unbound(node) => reflect(node).getField(unboundSymbol).reflectee;
-_observerCount(node) =>
-    reflect(node).getField(observersSymbol).reflectee.length;
-
-unbindTests() {
-  var xTest = document.querySelector('x-test');
-  xTest.foo = 'bar';
-  scheduleMicrotask(Observable.dirtyCheck);
-
-  return delay(null).then((_) {
-    expect(_unbound(xTest), null, reason: 'element is bound when inserted');
-    expect(xTest.fooWasChanged, true, reason: 'element is actually bound');
-    // Dart note: we don't have a way to check for the global count of
-    // observables/bindables, so we just check the count in the node.
-    expect(_observerCount(xTest), greaterThan(0));
-    xTest.remove();
-  }).then(delay).then((_) {
-    expect(_unbound(xTest), true, reason: 'element is unbound when removed');
-    expect(_observerCount(xTest), 0);
-    return new XTest();
-  }).then(delay).then((node) {
-    expect(_unbound(node), null, reason: 'element is bound when not inserted');
-    node.foo = 'bar';
-    expect(_observerCount(node), greaterThan(0));
-    scheduleMicrotask(Observable.dirtyCheck);
-    return node;
-  }).then(delay).then((node) {
-    expect(node.fooWasChanged, true, reason: 'node is actually bound');
-    node.unbindAll();
-    var n = new XTest();
-    n.cancelUnbindAll();
-    return n;
-  }).then(delay).then((node) {
-    expect(_unbound(node), null,
-        reason: 'element is bound when cancelUnbindAll is called');
-    expect(_observerCount(node), greaterThan(0));
-    node.unbindAll();
-    expect(_unbound(node), true,
-        reason: 'element is unbound when unbindAll is called');
-    expect(_observerCount(node), 0);
-    var n = new XTest()..id = 'foobar!!!';
-    document.body.append(n);
-    return n;
-  }).then(delay).then((node) {
-    expect(_unbound(node), null,
-        reason: 'element is bound when manually inserted');
-    expect(_observerCount(node), greaterThan(0));
-    node.remove();
-    return node;
-  }).then(delay).then((node) {
-    expect(_unbound(node), true,
-        reason: 'element is unbound when manually removed is called');
-    expect(_observerCount(node), 0);
-  });
-}
diff --git a/packages/polymer/test/unbind_test.html b/packages/polymer/test/unbind_test.html
deleted file mode 100644
index d9fa7d5..0000000
--- a/packages/polymer/test/unbind_test.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>unbind</title>
-    <link rel="import" href="packages/polymer/polymer.html">
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-  <x-test></x-test>
-
-  <polymer-element name="x-test" attributes="bar"></polymer-element>
-
-  <script type="application/dart" src="unbind_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/test/web_components_less_test.dart b/packages/polymer/test/web_components_less_test.dart
deleted file mode 100644
index d1d1db5..0000000
--- a/packages/polymer/test/web_components_less_test.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.web.web_components_less_test;
-
-import 'dart:html';
-import 'dart:js';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-
-int elementsReadied = 0;
-
-@CustomTag('x-import')
-class XImport extends PolymerElement {
-  XImport.created() : super.created();
-
-  ready() {
-    elementsReadied++;
-  }
-}
-
-@CustomTag('x-main')
-class XMain extends PolymerElement {
-  XMain.created() : super.created();
-
-  ready() {
-    elementsReadied++;
-  }
-}
-
-main() => initPolymer().then((zone) => zone.run(() {
-  useHtmlConfiguration();
-
-  setUp(() => Polymer.onReady);
-
-  test('web-components-less configuration', () {
-    var jsDoc = new JsObject.fromBrowserObject(document);
-    var htmlImports = context['HTMLImports'];
-
-    if (!ShadowRoot.supported || !(new LinkElement()).supportsImport) return;
-
-    expect(elementsReadied, 2, reason: 'imported elements upgraded');
-  });
-}));
diff --git a/packages/polymer/test/web_components_less_test.html b/packages/polymer/test/web_components_less_test.html
deleted file mode 100644
index 2b39095..0000000
--- a/packages/polymer/test/web_components_less_test.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-   Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-   for details. All rights reserved. Use of this source code is governed by a
-   BSD-style license that can be found in the LICENSE file.
--->
-<!doctype html>
-<html>
-
-<head>
-  <title>web_compnents-less test</title>
-  <link rel="import" href="packages/polymer/polymer.html">
-  <script src="packages/unittest/test_controller.js"></script>
-  <link rel="import" href="web_components_less_test_import.html">
-</head>
-<body unresolved>
-
-<polymer-element name="x-main">
-  <template>
-    Hi
-  </template>
-</polymer-element>
-
-<script type="application/dart" src="web_components_less_test.dart">
-</script>
-
-<x-main></x-main>
-<x-import></x-import>
-
-</body>
-</html>
diff --git a/packages/polymer/test/web_components_less_test_import.html b/packages/polymer/test/web_components_less_test_import.html
deleted file mode 100644
index 38464b6..0000000
--- a/packages/polymer/test/web_components_less_test_import.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<link rel="import" href="packages/polymer/polymer.html">
-<polymer-element name="x-import">
-<template>
-  Hi
-</template>
-</polymer-element>
diff --git a/packages/polymer/test/when_polymer_ready_test.dart b/packages/polymer/test/when_polymer_ready_test.dart
deleted file mode 100644
index 54d0e8f..0000000
--- a/packages/polymer/test/when_polymer_ready_test.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer.test.when_polymer_ready_test;
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-final Completer done = new Completer();
-
-@CustomTag('x-a')
-class XA extends PolymerElement {
-  XA.created() : super.created();
-}
-
-main() {
-  useHtmlConfiguration();
-
-  test('whenPolymerReady functions get called when polymer is ready', () {
-    expect(querySelector('x-a') is XA, isFalse);
-    initPolymer();
-    return done.future;
-  });
-}
-
-@whenPolymerReady
-void whenReady() {
-  expect(querySelector('x-a') is XA, isTrue);
-  done.complete();
-}
diff --git a/packages/polymer/test/when_polymer_ready_test.html b/packages/polymer/test/when_polymer_ready_test.html
deleted file mode 100644
index bbd9042..0000000
--- a/packages/polymer/test/when_polymer_ready_test.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!doctype html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>whenPolymerReady</title>
-    <script src="packages/unittest/test_controller.js"></script>
-  </head>
-  <body>
-
-  <x-a></x-a>
-
-  <polymer-element name="x-a"><template>hello!</template></polymer-element>
-
-  <script type="application/dart" src="when_polymer_ready_test.dart"></script>
-  </body>
-</html>
diff --git a/packages/polymer/tool/create_message_details_page.dart b/packages/polymer/tool/create_message_details_page.dart
deleted file mode 100644
index d3db186..0000000
--- a/packages/polymer/tool/create_message_details_page.dart
+++ /dev/null
@@ -1,286 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Simple script to generate a page summarizing all error messages produces by
-/// the polymer compiler code. The generated code will be placed directly under
-/// the `polymer/lib/src/generated` folder. This script should be invoked from
-/// the root of the polymer package either by doing:
-///
-///    dart tool/create_message_details_page.dart
-///
-/// or
-///
-///    pub run tool/create_message_details_page
-library polymer.tool.create_message_details_page;
-
-import 'dart:io';
-import 'dart:mirrors';
-
-import 'package:code_transformers/messages/messages.dart';
-import 'package:code_transformers/src/messages.dart' as m1; // used via mirrors
-import 'package:observe/src/messages.dart' as m2; // used via mirrors
-import 'package:polymer/src/build/messages.dart' as m3; // used via mirrors
-import 'package:web_components/build/messages.dart' as m4; // used via mirrors
-import 'package:markdown/markdown.dart';
-import 'package:path/path.dart' as path;
-import 'package:args/args.dart';
-
-main(args) {
-  var options = _parseOptions(args);
-  var seen = {};
-  var templates = [];
-  _getMessagesFrom(#polymer.src.build.messages, seen, templates);
-  _getMessagesFrom(#code_transformers.src.messages, seen, templates);
-  _getMessagesFrom(#observe.src.messages, seen, templates);
-  _getMessagesFrom(#web_components.build.messages, seen, templates);
-
-  templates.sort((a, b) => a.id.compareTo(b.id));
-  var sb = new StringBuffer();
-  bool forSite = options['site'];
-  var out = path.join(path.current, options['out']);
-  var ext = forSite ? '.markdown' : '.html';
-  if (!out.endsWith(ext)) {
-    print('error: expected to have a $ext extension.');
-    exit(1);
-  }
-
-  sb.write(forSite ? _SITE_HEADER : _LOCAL_HEADER);
-
-  var lastPackage = '';
-  for (var t in templates) {
-    if (lastPackage != t.id.package) {
-      lastPackage = t.id.package;
-      var sectionTitle = '## Messages from package `$lastPackage`\n\n----\n\n';
-      sb.write(forSite ? sectionTitle : markdownToHtml(sectionTitle));
-    }
-    _generateMessage(t, forSite, sb);
-  }
-  sb.write(forSite ? '' : _LOCAL_FOOTER);
-  new File(out).writeAsStringSync(sb.toString());
-  print('updated: ${options["out"]}');
-}
-
-final _mirrors = currentMirrorSystem();
-
-_getMessagesFrom(Symbol libName, Map seen, List templates) {
-  var lib = _mirrors.findLibrary(libName);
-  lib.declarations.forEach((symbol, decl) {
-    if (decl is! VariableMirror) return;
-    var template = lib.getField(symbol).reflectee;
-    var name = MirrorSystem.getName(symbol);
-    if (template is! MessageTemplate) return;
-    var id = template.id;
-    if (seen.containsKey(id)) {
-      print('error: duplicate id `$id`. '
-          'Currently set for both `$name` and `${seen[id]}`.');
-    }
-    seen[id] = name;
-    templates.add(template);
-  });
-}
-
-_generateMessage(MessageTemplate template, bool forSite, StringBuffer sb) {
-  var details =
-      template.details == null ? 'No details available' : template.details;
-  if (forSite) details = '{% raw %}$details{% endraw %}';
-  var id = template.id;
-  var hashTag = '${id.package}_${id.id}';
-  var title = '### ${template.description} [#${id.id}](#$hashTag)';
-  var body = '\n$details\n\n----\n\n';
-  // We add the anchor inside the <h3> title, otherwise the link doesn't work.
-  if (forSite) {
-    sb
-      ..write(title)
-      ..write('\n{: #$hashTag}\n')
-      ..write(body);
-  } else {
-    var html = markdownToHtml('$title$body').replaceFirst('<hr', '</div><hr');
-    sb.write('\n\n<div id="$hashTag">$html');
-  }
-}
-
-_parseOptions(args) {
-  var parser = new ArgParser(allowTrailingOptions: true)
-    ..addOption('out',
-        abbr: 'o',
-        defaultsTo: 'lib/src/build/generated/messages.html',
-        help: 'the output file path')
-    ..addFlag('site',
-        abbr: 's',
-        negatable: false,
-        help: 'generate contents for the dartlang.org site')
-    ..addFlag('help', abbr: 'h', negatable: false);
-
-  var options = parser.parse(args);
-  if (options['help']) {
-    var command = Platform.script.path;
-    var relPath = path.relative(command, from: path.current);
-    if (!relPath.startsWith('../')) command = relPath;
-    print('usage: dart $command [-o path_to_output_file] [-s]');
-    print(parser.getUsage());
-    exit(0);
-  }
-  return options;
-}
-
-const _SITE_HEADER = '''
----
-# WARNING: GENERATED FILE. DO NOT EDIT.
-#
-#   This file was generated automatically from the polymer package.
-#   To regenerate this file, from the top directory of the polymer package run:
-#
-#     dart tool/create_message_details_page.dart -s -o path_to_this_file
-layout: default
-title: "Error Messages"
-subsite: "Polymer.dart"
-description: "Details about error messages from polymer and related packages."
----
-
-{% include breadcrumbs.html %}
-
-# {{ page.title }}
-
-<style>
-h3 > a {
-  display: none;
-}
-
-h3:hover > a {
-  display: inline;
-}
-
-</style>
-
-
-This page contains a list of error messages produced during `pub build` and `pub
-serve` by transformers in polymer and its related packages. You can find here
-additional details that can often help you figure out how to fix the underlying
-problem.
-
-
-''';
-
-const _LOCAL_HEADER = '''
-<!doctype html>
-<!--
-  This file is autogenerated with polymer/tool/create_message_details_page.dart
--->
-<html>
-<style>
-@font-face {
-  font-family: 'Montserrat';
-  font-style: normal;
-  font-weight: 400;
-  src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff) format('woff');
-}
-@font-face {
-  font-family: 'Montserrat';
-  font-style: normal;
-  font-weight: 700;
-  src: url(https://themes.googleusercontent.com/static/fonts/montserrat/v4/IQHow_FEYlDC4Gzy_m8fcnbFhgvWbfSbdVg11QabG8w.woff) format('woff');
-}
-@font-face {
-  font-family: 'Roboto';
-  font-style: normal;
-  font-weight: 300;
-  src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/Hgo13k-tfSpn0qi1SFdUfbO3LdcAZYWl9Si6vvxL-qU.woff) format('woff');
-}
-@font-face {
-  font-family: 'Roboto';
-  font-style: normal;
-  font-weight: 400;
-  src: url(https://themes.googleusercontent.com/static/fonts/roboto/v10/CrYjSnGjrRCn0pd9VQsnFOvvDin1pK8aKteLpeZ5c0A.woff) format('woff');
-}
-
-body {
-  width: 80vw;
-  margin: 20px;
-  font-family: Roboto, sans-serif;
-  background-color: #f0f0f0;
-}
-
-h2 {
-  font-family: Montserrat, sans-serif;
-  box-sizing: border-box;
-  color: rgb(72, 72, 72);
-  display: block;
-  font-style: normal;
-  font-variant: normal;
-  font-weight: normal;
-}
-
-div:target {
-  background-color: #fff;
-  border: 1px solid #888;
-  border-radius: 5px;
-  padding: 0px 10px 2px 10px;
-  box-shadow: 7px 7px 5px #888888;
-  margin-bottom: 15px;
-}
-
-
-h3 {
-  font-family: Montserrat, sans-serif;
-  box-sizing: border-box;
-  color: rgb(72, 72, 72);
-  display: block;
-  font-style: normal;
-  font-variant: normal;
-  font-weight: normal;
-}
-
-div:target > h3 {
-  font-weight: bold;
-}
-
-pre {
-  display: block;
-  padding: 9.5px;
-  margin: 0 0 10px;
-  color: #333;
-  word-break: break-all;
-  word-wrap: break-word;
-  background-color: #f5f5f5;
-  border: 1px solid #ccc;
-  border-radius: 4px;
-}
-
-code {
-   font-family: Menlo,Monaco,Consolas,"Courier New",monospace;
-   box-sizing: border-box;
-   padding: 0;
-   font-size: 90%;
-   color: #0084c5;
-   white-space: nowrap;
-   border-radius: 4px;
-   background-color: #f9f2f4;
-}
-
-pre code {
-   white-space: inherit;
-   color: inherit;
-   background-color: inherit;
-}
-
-a {
-  color: rgb(42, 100, 150);
-}
-
-h3 > a {
-  display: none;
-  font-size: 0.8em;
-}
-
-h3:hover > a {
-  display: inline;
-}
-</style>
-<body>
-''';
-
-const _LOCAL_FOOTER = '''
-</body>
-</html>
-''';
diff --git a/packages/polymer_expressions/.gitignore b/packages/polymer_expressions/.gitignore
deleted file mode 100644
index e979170..0000000
--- a/packages/polymer_expressions/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-# Don’t commit the following directories created by pub.
-.pub
-build/
-packages
-
-# Or the files created by dart2js.
-*.dart.js
-*.dart.precompiled.js
-*.js_
-*.js.deps
-*.js.map
-*.sw?
-.idea/
-.pub/
-
-# Include when developing application packages.
-pubspec.lock
diff --git a/packages/polymer_expressions/.status b/packages/polymer_expressions/.status
deleted file mode 100644
index e1c661c..0000000
--- a/packages/polymer_expressions/.status
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Don't run any test-like files that show up in packages directories. It
-# shouldn't be necessary to run "pub install" in these packages, but if you do
-# it shouldn't break the tests.
-*/packages/*/*: Skip
-*/*/packages/*/*: Skip
-*/*/*/packages/*/*: Skip
-*/*/*/*/packages/*/*: Skip
-*/*/*/*/*/packages/*/*: Skip
-
-build/test/eval_test: Skip      # avoid testing twice
-build/test/parser_test: Skip    # avoid testing twice
-build/test/tokenizer_test: Skip # avoid testing twice
-build/test/visitor_test: Skip   # avoid testing twice
-
-[ $compiler == dart2js ]
-test/syntax_test: Skip  # use pub-build to test together with the .html file
-test/globals_test: Skip  # use pub-build to test together with the .html file
-test/bindings_test: Skip  # use pub-build to test together with the .html file
-
-[ $ie ]
-build/test/syntax_test: Fail, Timeout, Pass # Issue 19138
-
-[ $runtime == ie10 ]
-test/*: Pass, RuntimeError # Issue 19265
-
-[ $runtime == vm ]
-test/syntax_test: Skip
-test/globals_test: Skip
-test/bindings_test: Skip
-build/*: Skip
diff --git a/packages/polymer_expressions/AUTHORS b/packages/polymer_expressions/AUTHORS
deleted file mode 100644
index 0617765..0000000
--- a/packages/polymer_expressions/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-# Names should be added to this file with this pattern:
-#
-# For individuals:
-#   Name <email address>
-#
-# For organizations:
-#   Organization <fnmatch pattern>
-#
-Google Inc. <*@google.com>
diff --git a/packages/polymer_expressions/CHANGELOG.md b/packages/polymer_expressions/CHANGELOG.md
deleted file mode 100644
index d17238b..0000000
--- a/packages/polymer_expressions/CHANGELOG.md
+++ /dev/null
@@ -1,67 +0,0 @@
-#### Pub version 0.13.1
- * Update `observe` dependency.
-
-#### Pub version 0.13.0
-  * Move minimum 'template_binding' constraint to 0.13.0.
-  * Additional polyfills are now required when using this package outside of 
-    polymer. All the files in the 'template_binding' package under lib/js should
-    be included at the top of your app in addition to platform.js from the
-    'web_components' package.
-
-#### Pub version 0.12.0+1
-  * Widen dependency constraint on `observe`.
-
-#### Pub version 0.12.0
-  * Exposed a couple new APIs to create a polymer expression binding outside the
-    context of a template binding.
-  * Updated to depend on latest template_binding and observe. Setting a value on
-    a polymer expression binding now produces a change notification.
-
-#### Pub version 0.11.0
-  * Remove faulty assert that threw when an iterable field was updated.
-  
-#### Pub version 0.11.0
-  * Scopes created by templates are created less often and nested properly. The
-    previous version had a bug with respect to the names visible in 
-    <template releat> tags without an "in" expression, and <template bind> tags.
-    In those templates, names for the outer templates should not be visible.
-    This may result in some breakages in templates that relied on the buggy
-    behavior.
-  * <template bind> now supports "as" expressions.
-  * Removed warnings when attempting to assign a value to a property on null
-    object, or assign a value to a non-assignable expression. Polymer binding
-    initialization sometimes assigns to expressions, so this should reduce
-    unecessary warnings.
-  * Added the % (modulo), === (identical) and !== (not identical) operators.
-  * Fast-path for eval(). eval() no longer observes expressions or creates a
-    tree of observers.
-  * PolymerExpressions bindings clean up expression observers when closed,
-    fixing a potential memory leak.
-  * Better parse errors. Unknown operators are reported, and all exceptions are
-    instances of ParseException so that they can be caught independently of
-    exceptions generated by calling user code.
-
-
-#### Pub version 0.10.0
-  * package:polymer_expressions no longer declares @MirrosUsed. The package uses
-    mirrors at development time, but assumes frameworks like polymer will
-    generate code that replaces the use of mirrors. If you use this directly,
-    you might need to do code generation as well, or add the @MirrorsUsed
-    declaration. This can be done either explicitly or by importing the old
-    settings from 'package:observe/mirrors_used.dart' (which include
-    @reflectable and @observable by default).
-
-  * Errors that occur within bindings are now thrown asycnhronously. We used to
-    trap some errors and report them in a Logger, and we would let other errors
-    halt the rendering process. Now all errors are caught, but they are reported
-    asynchornously so they are visible even when logging is not set up.
-
-  * Fixed several bugs, including:
-      * propagating list changes ([18749][]).
-      * precedence of ternary operators ([17805][]).
-      * two-way bindings ([18410][] and [18792][]).
-
-[17805]: https://code.google.com/p/dart/issues/detail?id=17805
-[18410]: https://code.google.com/p/dart/issues/detail?id=18410
-[18749]: https://code.google.com/p/dart/issues/detail?id=18749
-[18792]: https://code.google.com/p/dart/issues/detail?id=18792
diff --git a/packages/polymer_expressions/LICENSE b/packages/polymer_expressions/LICENSE
deleted file mode 100644
index ee99930..0000000
--- a/packages/polymer_expressions/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright 2013, the Dart project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of Google Inc. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/polymer_expressions/PATENTS b/packages/polymer_expressions/PATENTS
deleted file mode 100644
index 6954196..0000000
--- a/packages/polymer_expressions/PATENTS
+++ /dev/null
@@ -1,23 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Dart Project.
-
-Google hereby grants to you a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this
-section) patent license to make, have made, use, offer to sell, sell,
-import, transfer, and otherwise run, modify and propagate the contents
-of this implementation of Dart, where such license applies only to
-those patent claims, both currently owned by Google and acquired in
-the future, licensable by Google that are necessarily infringed by
-this implementation of Dart. This grant does not include claims that
-would be infringed only as a consequence of further modification of
-this implementation. If you or your agent or exclusive licensee
-institute or order or agree to the institution of patent litigation
-against any entity (including a cross-claim or counterclaim in a
-lawsuit) alleging that this implementation of Dart or any code
-incorporated within this implementation of Dart constitutes direct or
-contributory patent infringement, or inducement of patent
-infringement, then any patent rights granted to you under this License
-for this implementation of Dart shall terminate as of the date such
-litigation is filed.
diff --git a/packages/polymer_expressions/README.md b/packages/polymer_expressions/README.md
deleted file mode 100644
index 6f0db01..0000000
--- a/packages/polymer_expressions/README.md
+++ /dev/null
@@ -1,297 +0,0 @@
-polymer_expressions
-===================
-
-
-Polymer expressions are an expressive syntax that can be used in HTML templates
-with Dart.
-
-Templates are one feature of Polymer.dart, which is a set of comprehensive UI
-and utility components for building web applications.
-This package is automatically included with the
-[Polymer](https://pub.dartlang.org/packages/polymer) package
-because Polymer expressions are the default expression syntax
-in Polymer Dart apps.
-The [Polymer.dart homepage][home_page]
-contains a list of features, project status,
-installation instructions, tips for upgrading from Web UI,
-and links to other documentation.
-
-
-## Overview
-
-Polymer expressions allow you to write complex binding expressions, with
-property access, function invocation, list/map indexing, and two-way filtering
-like:
-
-```html
-    {{ person.title + " " + person.getFullName() | upppercase }}
-```
-
-### Model-Driven Views (MDV)
-[MDV][mdv] allows you to define templates directly in HTML that are rendered by
-the browser into the DOM. Templates are bound to a data model, and changes to
-the data are automatically reflected in the DOM, and changes in HTML inputs are
-assigned back into the model. The template and model are bound together via
-binding expressions that are evaluated against the model. These binding
-expressions are placed in double-curly-braces, or "mustaches".
-
-Example:
-
-```html
-    <template>
-      <p>Hello {{ person.name }}</p>
-    </template>
-```
-
-MDV includes a very basic binding syntax which only allows a series of
-dot-separate property names.
-
-[mdv]: http://www.polymer-project.org/platform/mdv.html
-
-### Custom binding syntaxes with binding delegate
-
-While MDV's built-in syntax is very basic, it does allow custom syntaxes called
-"binding delegates" to be installed and used. A binding delegate can interpret
-the contents of mustaches however it likes. PolymerExpressions is such a
-binding delegate.
-
-Example:
-
-```html
-    <template bind>
-      <p>Hello {{ person.title + " " + person.getFullName() | uppercase }}</p>
-    </template>
-```
-
-## Usage
-
-### Installing from Pub
-
-Add the following to your pubspec.yaml file:
-
-```yaml
-    dependencies:
-      polymer_expressions: any
-```
-
-Hint: check https://pub.dartlang.org/packages/polymer_expressions for the latest
-version number.
-
-Then import polymer_expressions.dart:
-
-    import 'package:polymer_expressions/polymer_expressions.dart';
-
-### Registering a binding delegate
-
-**Polymer Expressions are now the default syntax for `<polymer-element>` custom
-elements.**
-
-You do not need to manually register the bindingDelegate if your bindings are
-inside a custom element. However, if you want to use polymer_expressions outside
-a custom element, read on:
-
-Binding delegates must be installed on a template before they can be used.
-For example, set the bindingDelegate property of your template
-elements to an instance of PolymerExpressions. The templates will then use the
-PolymerExpressions instance to interpret
-binding expressions.
-
-```dart
-    import 'dart:html';
-    import 'package:polymer_expressions/polymer_expressions.dart';
-
-    main() {
-      var template = query('#my_template');
-      template.bindingDelegate = new PolymerExpressions();
-    }
-```
-
-### Registering top-level variables
-
-Before a top-level variable can be used, it must be registered. The
-PolymerExpressions constructor takes a map of named values to use as variables.
-
-```dart
-    main() {
-      var globals = {
-        'uppercase': (String v) => v.toUpperCase(),
-        'app_id': 'my_app_123',
-      };
-      var template = query('#my_template');
-      template.bindingDelegate = new PolymerExpressions(globals: globals);
-    }
-```
-
-## Features
-
-### The model and scope
-
-Polymer Expressions allow binding to more than just the model assigned to a
-template instance. Top-level variables can be defined so that you can use
-filters, global variables and constants, functions, etc. These variables and the
-model are held together in a container called a Scope. Scopes can be nested,
-which happens when template tags are nested.
-
-### Two-way bindings
-
-Bindings can be used to modify the data model based on events in the DOM. The
-most common case is to bind an &lt;input&gt; element's value field to a model
-property and have the property update when the input changes. For this to work,
-the binding expression must be "assignable". Only a subset of expressions are
-assignable. Assignable expressions cannot contain function calls, operators, and
-any index operator must have a literal argument. Assignable expressions can
-contain filter operators as long as all the filters are two-way transformers.
-
-Some restrictions may be relaxed further as allowed.
-
-Assignable Expressions:
-
- * `foo`
- * `foo.bar`
- * `items[0].description`
- * `people['john'].name`
- * `product.cost | convertCurrency('ZWD')` where `convertCurrency` evaluates to
-   a Tranformer object.
-
-Non-Assignable Expressions:
-
- * `a + 1`
- * `!c`
- * `foo()`
- * `person.lastName | uppercase` where `uppercase` is a filter function.
-
-### Null-Safety
-
-Expressions are generally null-safe. If an intermediate expression yields `null`
-the entire expression will return null, rather than throwing an exception.
-Property access, method invocation and operators are null-safe. Passing null to
-a function that doesn't handle null will not be null safe.
-
-### Streams
-
-Polymer Expressions have experimental support for binding to streams, and when
-new values are passed to the stream, the template updates. The feature is not
-fully implemented yet.
-
-See the examples in /example/streams for more details.
-
-## Syntax
-
-### Property access
-
-Properties on the model and in the scope are looked up via simple property
-names, like `foo`. Property names are looked up first in the top-level
-variables, next in the model, then recursively in parent scopes. Properties on
-objects can be access with dot notation like `foo.bar`.
-
-The keyword `this` always refers to the model if there is one, otherwise `this`
-is `null`. If you have model properties and top-level variables with the same
-name, you can use `this` to refer to the model property.
-
-### Literals
-
-Polymer Expressions support number, boolean, string, and map literals. Strings
-can use either single or double quotes.
-
- * Numbers: `1`, `1.0`
- * Booleans: `true`, `false`
- * Strings: `'abc'`, `"xyz"`
- * Maps: `{ 'a': 1, 'b': 2 }`
-
-List literals are planned, see [issue 9](https://github.com/dart-lang/polymer_expressions/issues/9)
-
-### Functions and methods
-
-If a property is a function in the scope, a method on the model, or a method on
-an object, it can be invoked with standard function syntax. Functions and
-Methods can take arguments. Named arguments are not supported. Arguments can be
-literals or variables.
-
-Examples:
-
- * Top-level function: `myFunction()`
- * Top-level function with arguments: `myFunction(a, b, 42)`
- * Model method: `aMethod()`
- * Method on nested-property: `a.b.anotherMethod()`
-
-### Operators
-
-Polymer Expressions supports the following binary and unary operators:
-
- * Arithmetic operators: +, -, *, /, %, unary + and -
- * Comparison operators: ==, !=, <=, <, >, >=
- * Boolean operators: &&, ||, unary !
-
-Expressions do not support bitwise operators such as &, |, << and >>, or increment/decrement operators (++ and --)
-
-### List and Map indexing
-
-List and Map like objects can be accessed via the index operator: []
-
-Examples:
-
- * `items[2]`
- * `people['john']`
-
-Unlike JavaScript, list and map contents are not generally available via
-property access. That is, the previous examples are not equivalent to `items.2`
-and `people.john`. This ensures that access to properties and methods on Lists
-and Maps is preserved.
-
-### Filters and transformers
-
-A filter is a function that transforms a value into another, used via the pipe
-syntax: `value | filter` Any function that takes exactly one argument can be
-used as a filter.
-
-Example:
-
-If `person.name` is "John", and a top-level function named `uppercase` has been
-registered, then `person.name | uppercase` will have the value "JOHN".
-
-The pipe syntax is used rather than a regular function call so that we can
-support two-way bindings through transformers. A transformer is a filter that
-has an inverse function. Transformers must extend or implement the `Transformer`
-class, which has `forward()` and `reverse()` methods.
-
-### Repeating templates
-
-A template can be repeated by using the "repeat" attribute with a binding. The
-binding can either evaluate to an Iterable, in which case the template is
-instantiated for each item in the iterable and the model of the instance is
-set to the item, or the binding can be a "in" iterator expression, in which
-case a new variable is added to each scope.
-
-The following examples produce the same output.
-
-Evaluate to an iterable:
-
-```html
-    <template repeat="{{ items }}">
-      <div>{{ }}</div>
-    </template>
-```
-
-"in" expression:
-
-```html
-    <template repeat="{{ item in items }}">
-      <div>{{ item }}</div>
-    </template>
-```
-
-## Status
-
-The syntax implemented is experimental and subject to change, in fact, it
-**will** change soon. The goal is to be compatible with Polymer's binding
-syntax. We will announce breaking changes on the
-[web-ui@dartlang.org mailing list][web-ui-list].
-
-Please [file issues on Dart project page](http://dartbug.com/new)
-for any bugs you find or for feature requests. Make a note that it applies to
-"package:polymer_expressions"
-
-You can discuss Polymer Expressions on the
-[web-ui@dartlang.org mailing list][web-ui-list].
-
-[web-ui-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/web-ui
diff --git a/packages/polymer_expressions/benchmark/all.dart b/packages/polymer_expressions/benchmark/all.dart
deleted file mode 100644
index 2aaabca..0000000
--- a/packages/polymer_expressions/benchmark/all.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.benchmark.all;
-
-import 'parse.dart' as parse;
-import 'eval.dart' as eval;
-
-main() {
-  parse.main();
-  eval.main();
-}
diff --git a/packages/polymer_expressions/benchmark/eval.dart b/packages/polymer_expressions/benchmark/eval.dart
deleted file mode 100644
index 7bc0f56..0000000
--- a/packages/polymer_expressions/benchmark/eval.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.benchmark.eval;
-
-import 'package:benchmark_harness/benchmark_harness.dart';
-import 'package:polymer_expressions/parser.dart' show parse;
-import 'package:polymer_expressions/eval.dart' show eval, Scope;
-
-class Foo {
-  final Bar bar;
-  Foo(this.bar);
-}
-
-class Bar {
-  String baz;
-  Bar(this.baz);
-}
-
-class EvalBenchmark extends BenchmarkBase {
-  final expr;
-  final scope;
-
-  EvalBenchmark(String name, String expr, {Object model, Map variables})
-      : expr = parse(expr),
-        scope = new Scope(model: model, variables: variables),
-        super('$name: $expr ');
-
-  run() {
-    var value = eval(expr, scope);
-  }
-
-}
-
-double total = 0.0;
-
-benchmark(String name, String expr, {Object model, Map variables}) {
-  var score = new EvalBenchmark(name, expr, model: model, variables: variables)
-      .measure();
-  print("$name $expr: $score us");
-  total += score;
-}
-
-main() {
-
-  benchmark('Constant', '1');
-  benchmark('Top-level Name', 'foo',
-      variables: {'foo': new Foo(new Bar('hello'))});
-  benchmark('Model field', 'bar',
-      model: new Foo(new Bar('hello')));
-  benchmark('Path', 'foo.bar.baz',
-      variables: {'foo': new Foo(new Bar('hello'))});
-  benchmark('Map', 'm["foo"]',
-      variables: {'m': {'foo': 1}});
-  benchmark('Equality', '"abc" == "123"');
-  print('total: $total us');
-
-}
diff --git a/packages/polymer_expressions/benchmark/parse.dart b/packages/polymer_expressions/benchmark/parse.dart
deleted file mode 100644
index b131509..0000000
--- a/packages/polymer_expressions/benchmark/parse.dart
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.benchmark.parse;
-
-import 'package:benchmark_harness/benchmark_harness.dart';
-import 'package:polymer_expressions/parser.dart' show parse;
-
-/**
- * Measures pure parsing time of several expressions
- */
-class PolymerParseBenchmark extends BenchmarkBase {
-  PolymerParseBenchmark() : super('PolymerParseBenchmark');
-
-  run() {
-    parse('foo.bar.baz');
-    parse('f()');
-    parse('(1 + 2) * 3');
-    parse('1 + 2.0 + false + "abcdefg" + {"a": 1}');
-    parse('(a * (b * (c * (d * (e)))))');
-    parse('a(b(c(d(e(f)))))');
-  }
-}
-
-main() {
-  new PolymerParseBenchmark().report();
-}
diff --git a/packages/polymer_expressions/codereview.settings b/packages/polymer_expressions/codereview.settings
deleted file mode 100644
index 39ffa4f..0000000
--- a/packages/polymer_expressions/codereview.settings
+++ /dev/null
@@ -1,3 +0,0 @@
-CODE_REVIEW_SERVER: http://codereview.chromium.org/
-VIEW_VC: https://github.com/dart-lang/core-elements/commit/
-CC_LIST: reviews@dartlang.org
diff --git a/packages/polymer_expressions/example/example.dart b/packages/polymer_expressions/example/example.dart
deleted file mode 100644
index 79c9a35..0000000
--- a/packages/polymer_expressions/example/example.dart
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:html';
-
-import 'package:polymer_expressions/polymer_expressions.dart';
-import 'package:template_binding/template_binding.dart' show templateBind;
-
-// We use mirrors for illustration purposes, but ideally we would generate a
-// static configuration with smoke/static.dart.
-import 'package:smoke/mirrors.dart';
-
-// Since we use smoke/mirrors, we need to preserve symbols used in the template.
-// This includes String.startsWith, List.take, and Person.
-@MirrorsUsed(targets: const [String, List, Person])
-import 'dart:mirrors';
-
-import 'person.dart';
-
-main() {
-  useMirrors();
-  var john = new Person('John', 'Messerly', ['A', 'B', 'C']);
-  var justin = new Person('Justin', 'Fagnani', ['D', 'E', 'F']);
-  var globals = {
-    'uppercase': (String v) => v.toUpperCase(),
-    'people': [john, justin],
-  };
-
-  templateBind(querySelector('#test'))
-      ..bindingDelegate = new PolymerExpressions(globals: globals)
-      ..model = john;
-
-  templateBind(querySelector('#test2')).model = john;
-}
diff --git a/packages/polymer_expressions/example/example.html b/packages/polymer_expressions/example/example.html
deleted file mode 100644
index 50a2ef8..0000000
--- a/packages/polymer_expressions/example/example.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. 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>example</title>
-    <style>
-      .jname {
-        background: #faa;
-      }
-      .fname {
-        border: solid 1px #88f;
-      }
-    </style>
-  </head>
-
-  <body>
-    <template id="test" bind>
-      <h1>Polymer Expression Syntax</h1>
-      <label> first name: <input value="{{ firstName }}"></label>
-      <label> last name: <input value="{{ lastName }}"></label>
-      <div>Hello {{ getFullName() }}!</div>
-      <div>{{ firstName }} {{ lastName }}</div>
-      <div>
-        <h2>Iteration</h2>
-        <ul>
-          <template repeat="{{ item in items.take(2) }}">
-            <li>{{ item }}</li>
-          </template>
-        </ul>
-        <ul>
-          <template repeat="{{ people }}">
-            <li class="{{ {'jname': firstName.startsWith('J'),
-                'fname': lastName.startsWith('F')} }}">
-              {{ firstName }} {{ lastName }}
-            </li>
-            <ul>
-              <template repeat="{{ item in items }}">
-                <li checked?="{{ item == 'A'}}">{{ firstName }} {{ item }}</li>
-              </template>
-            </ul>
-          </template>
-        </ul>
-      </div>
-    </template>
-
-    <template id="test2" bind>
-      <h1>Default  Syntax</h1>
-      <label> first name: <input value="{{ firstName }}"></label>
-      <label> last name: <input value="{{ lastName }}"></label>
-    </template>
-
-    <script type="application/dart" src="example.dart"></script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/packages/polymer_expressions/example/person.dart b/packages/polymer_expressions/example/person.dart
deleted file mode 100644
index aeb6bd0..0000000
--- a/packages/polymer_expressions/example/person.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library person;
-
-import 'package:observe/observe.dart';
-
-class Person extends ChangeNotifier {
-  String _firstName;
-  String _lastName;
-  List<String> _items;
-
-  Person(this._firstName, this._lastName, this._items);
-
-  String get firstName => _firstName;
-
-  void set firstName(String value) {
-    _firstName = notifyPropertyChange(#firstName, _firstName, value);
-  }
-
-  String get lastName => _lastName;
-
-  void set lastName(String value) {
-    _lastName = notifyPropertyChange(#lastName, _lastName, value);
-  }
-
-  String getFullName() => '$_firstName $_lastName';
-
-  List<String> get items => _items;
-
-  void set items(List<String> value) {
-    _items = notifyPropertyChange(#items, _items, value);
-  }
-
-  String toString() => "Person(firstName: $_firstName, lastName: $_lastName)";
-}
diff --git a/packages/polymer_expressions/example/streams/collect_key_press.html b/packages/polymer_expressions/example/streams/collect_key_press.html
deleted file mode 100644
index d2225f5..0000000
--- a/packages/polymer_expressions/example/streams/collect_key_press.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-
-<html>
-  <body>
-    <template id="test" repeat="{{ keyPress | collect }}">
-      <div>key: {{ }}</div>
-    </template>
-    <script type="application/dart">
-      import 'dart:async';
-      import 'dart:html';
-      import 'package:polymer_expressions/polymer_expressions.dart';
-      import 'package:polymer_expressions/async.dart';
-      import 'package:template_binding/template_binding.dart';
-      import 'package:observe/observe.dart';
-
-      Iterable collect(StreamBinding s) {
-        var list = new ObservableList();
-        s.stream.listen((e) { list.add(e); });
-        return list;
-      }
-
-      main() {
-        var globals = {
-          'keyPress': document.onKeyPress
-              .map((e) => new String.fromCharCode(e.charCode)),
-          'collect': collect,
-        };
-
-        templateBind(querySelector('#test'))
-            ..bindingDelegate = new PolymerExpressions(globals: globals)
-            ..model = null;
-      }
-    </script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/packages/polymer_expressions/example/streams/count_clicks.html b/packages/polymer_expressions/example/streams/count_clicks.html
deleted file mode 100644
index 01a1667..0000000
--- a/packages/polymer_expressions/example/streams/count_clicks.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-
-<html>
-  <body>
-    <template id="test" bind="{{ mouseDown | count }}">
-      Clicks: {{ value }}
-    </template>
-    <script type="application/dart">
-      import 'dart:async';
-      import 'dart:html';
-      import 'package:polymer_expressions/polymer_expressions.dart';
-      import 'package:polymer_expressions/async.dart';
-      import 'package:template_binding/template_binding.dart';
-      import 'package:observe/observe.dart';
-
-      count(StreamBinding s) {
-        var box = new ObservableBox();
-        box.value = 0;
-        s.stream.listen((e) { box.value++; });
-        return box;
-      }
-
-      main() {
-        var globals = {
-          'mouseDown': document.onMouseDown,
-          'count': count,
-        };
-
-        templateBind(query('#test'))
-            ..bindingDelegate = new PolymerExpressions(globals: globals)
-            ..model = null;
-      }
-    </script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/packages/polymer_expressions/example/streams/mouse_move.html b/packages/polymer_expressions/example/streams/mouse_move.html
deleted file mode 100644
index 2ac6154..0000000
--- a/packages/polymer_expressions/example/streams/mouse_move.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-
-<html>
-  <body>
-    <template id="test" bind="{{ mouse }}">
-      ({{ value.offsetX }}, {{ value.offsetY }})
-    </template>
-    <script type="application/dart">
-      import 'dart:html';
-      import 'package:polymer_expressions/polymer_expressions.dart';
-      import 'package:template_binding/template_binding.dart';
-
-      main() {
-        var globals = {
-          'mouse': document.onMouseMove,
-        };
-
-        templateBind(query('#test'))
-            ..bindingDelegate = new PolymerExpressions(globals: globals)
-            ..model = null;
-      }
-    </script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/packages/polymer_expressions/example/streams/mouse_resize_image.html b/packages/polymer_expressions/example/streams/mouse_resize_image.html
deleted file mode 100644
index 461e6ab..0000000
--- a/packages/polymer_expressions/example/streams/mouse_resize_image.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<!--
-Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-for details. All rights reserved. Use of this source code is governed by a
-BSD-style license that can be found in the LICENSE file.
--->
-
-<html>
-  <body>
-    <template id="test" bind="{{ mouseMax }}">
-      <img src="http://www.dartlang.org/logos/dart-logo.png"
-           width="{{ value }}"
-           height="{{ value }}">
-    </template>
-    <script type="application/dart">
-      import 'dart:html';
-      import 'dart:math';
-      import 'package:polymer_expressions/polymer_expressions.dart';
-      import 'package:template_binding/template_binding.dart';
-
-      main() {
-        var globals = {
-          'mouse': document.onMouseMove,
-          'mouseMax':
-              document.onMouseMove.map((e) => max(e.offsetX, e.offsetY)),
-        };
-
-        templateBind(query('#test'))
-            ..bindingDelegate = new PolymerExpressions(globals: globals)
-            ..model = null;
-      }
-    </script>
-    <script src="packages/browser/dart.js"></script>
-  </body>
-</html>
diff --git a/packages/polymer_expressions/lib/async.dart b/packages/polymer_expressions/lib/async.dart
deleted file mode 100644
index 23e9846..0000000
--- a/packages/polymer_expressions/lib/async.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.async;
-
-import 'dart:async';
-import 'package:observe/observe.dart';
-
-class StreamBinding<T> extends ObservableBox {
-  final Stream<T> stream;
-
-  StreamBinding(this.stream) {
-    stream.listen((T i) { value = i; });
-  }
-
-}
diff --git a/packages/polymer_expressions/lib/eval.dart b/packages/polymer_expressions/lib/eval.dart
deleted file mode 100644
index 8f7988b..0000000
--- a/packages/polymer_expressions/lib/eval.dart
+++ /dev/null
@@ -1,823 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.eval;
-
-import 'dart:async';
-import 'dart:collection';
-
-import 'package:observe/observe.dart';
-import 'package:smoke/smoke.dart' as smoke;
-
-import 'async.dart';
-import 'expression.dart';
-import 'filter.dart';
-import 'visitor.dart';
-
-final _BINARY_OPERATORS = {
-  '+':   (a, b) => a + b,
-  '-':   (a, b) => a - b,
-  '*':   (a, b) => a * b,
-  '/':   (a, b) => a / b,
-  '%':   (a, b) => a % b,
-  '==':  (a, b) => a == b,
-  '!=':  (a, b) => a != b,
-  '===': (a, b) => identical(a, b),
-  '!==': (a, b) => !identical(a, b),
-  '>':   (a, b) => a > b,
-  '>=':  (a, b) => a >= b,
-  '<':   (a, b) => a < b,
-  '<=':  (a, b) => a <= b,
-  '||':  (a, b) => a || b,
-  '&&':  (a, b) => a && b,
-  '|':   (a, f) {
-    if (f is Transformer) return f.forward(a);
-    if (f is Filter) return f(a);
-    throw new EvalException("Filters must be a one-argument function.");
-  }
-};
-
-final _UNARY_OPERATORS = {
-  '+': (a) => a,
-  '-': (a) => -a,
-  '!': (a) => !a,
-};
-
-final _BOOLEAN_OPERATORS = ['!', '||', '&&'];
-
-/**
- * Evaluation [expr] in the context of [scope].
- */
-Object eval(Expression expr, Scope scope) => new EvalVisitor(scope).visit(expr);
-
-/**
- * Returns an [ExpressionObserver] that evaluates [expr] in the context of
- * scope] and listens for any changes on [Observable] values that are
- * returned from sub-expressions. When a value changes the expression is
- * reevaluated and the new result is sent to the [onUpdate] stream of the
- * [ExpressionObsserver].
- */
-ExpressionObserver observe(Expression expr, Scope scope) {
-  var observer = new ObserverBuilder().visit(expr);
-  return observer;
-}
-
-/**
- * Causes [expr] to be reevaluated a returns it's value.
- */
-Object update(ExpressionObserver expr, Scope scope, {skipChanges: false}) {
-  new Updater(scope, skipChanges).visit(expr);
-  return expr.currentValue;
-}
-
-/**
- * Assign [value] to the variable or field referenced by [expr] in the context
- * of [scope].
- *
- * [expr] must be an /assignable/ expression, it must not contain
- * operators or function invocations, and any index operations must use a
- * literal index.
- */
-Object assign(Expression expr, Object value, Scope scope,
-    {bool checkAssignability: true}) {
-
-  Expression expression;
-  var property;
-  bool isIndex = false;
-  var filters = <Expression>[]; // reversed order for assignment
-
-  while (expr is BinaryOperator) {
-    BinaryOperator op = expr;
-    if (op.operator != '|') {
-      break;
-    }
-    filters.add(op.right);
-    expr = op.left;
-  }
-
-  if (expr is Identifier) {
-    expression = empty();
-    property = expr.value;
-  } else if (expr is Index) {
-    expression = expr.receiver;
-    property = expr.argument;
-    isIndex = true;
-  } else if (expr is Getter) {
-    expression = expr.receiver;
-    property = expr.name;
-  } else {
-    if (checkAssignability) {
-      throw new EvalException("Expression is not assignable: $expr");
-    }
-    return null;
-  }
-
-  // transform the values backwards through the filters
-  for (var filterExpr in filters) {
-    var filter = eval(filterExpr, scope);
-    if (filter is! Transformer) {
-      if (checkAssignability) {
-        throw new EvalException("filter must implement Transformer to be "
-            "assignable: $filterExpr");
-      } else {
-        return null;
-      }
-    }
-    value = filter.reverse(value);
-  }
-  // evaluate the receiver
-  var o = eval(expression, scope);
-
-  // can't assign to a property on a null LHS object. Silently fail.
-  if (o == null) return null;
-
-  if (isIndex) {
-    var index = eval(property, scope);
-    o[index] = value;
-  } else {
-    smoke.write(o, smoke.nameToSymbol(property), value);
-  }
-  return value;
-}
-
-
-/**
- * A scope in polymer expressions that can map names to objects. Scopes contain
- * a set of named variables and a unique model object. The scope structure
- * is then used to lookup names using the `[]` operator. The lookup first
- * searches for the name in local variables, then in global variables,
- * and then finally looks up the name as a property in the model.
- */
-abstract class Scope implements Indexable<String, Object> {
-  Scope._();
-
-  /** Create a scope containing a [model] and all of [variables]. */
-  factory Scope({Object model, Map<String, Object> variables}) {
-    var scope = new _ModelScope(model);
-    return variables == null ? scope
-        : new _GlobalsScope(new Map<String, Object>.from(variables), scope);
-  }
-
-  /** Return the unique model in this scope. */
-  Object get model;
-
-  /**
-   * Lookup the value of [name] in the current scope. If [name] is 'this', then
-   * we return the [model]. For any other name, this finds the first variable
-   * matching [name] or, if none exists, the property [name] in the [model].
-   */
-  Object operator [](String name);
-
-  operator []=(String name, Object value) {
-    throw new UnsupportedError('[]= is not supported in Scope.');
-  }
-
-  /**
-   * Returns whether [name] is defined in [model], that is, a lookup
-   * would not find a variable with that name, but there is a non-null model
-   * where we can look it up as a property.
-   */
-  bool _isModelProperty(String name);
-
-  /** Create a new scope extending this scope with an additional variable. */
-  Scope childScope(String name, Object value) =>
-      new _LocalVariableScope(name, value, this);
-}
-
-/**
- * A scope that looks up names in a model object. This kind of scope has no
- * parent scope because all our lookup operations stop when we reach the model
- * object. Any variables added in scope or global variables are added as child
- * scopes.
- */
-class _ModelScope extends Scope {
-  final Object model;
-
-  _ModelScope(this.model) : super._();
-
-  Object operator[](String name) {
-    if (name == 'this') return model;
-    var symbol = smoke.nameToSymbol(name);
-    if (model == null || symbol == null) {
-      throw new EvalException("variable '$name' not found");
-    }
-    return _convert(smoke.read(model, symbol));
-  }
-
-  Object _isModelProperty(String name) => name != 'this';
-
-  String toString() => "[model: $model]";
-}
-
-/**
- * A scope that holds a reference to a single variable. Polymer expressions
- * introduce variables to the scope one at a time. Each time a variable is
- * added, a new [_LocalVariableScope] is created.
- */
-class _LocalVariableScope extends Scope {
-  final Scope parent;
-  final String varName;
-  // TODO(sigmund,justinfagnani): make this @observable?
-  final Object value;
-
-  _LocalVariableScope(this.varName, this.value, this.parent) : super._() {
-    if (varName == 'this') {
-      throw new EvalException("'this' cannot be used as a variable name.");
-    }
-  }
-
-  Object get model => parent != null ? parent.model : null;
-
-  Object operator[](String name) {
-    if (varName == name) return _convert(value);
-    if (parent != null) return parent[name];
-    throw new EvalException("variable '$name' not found");
-  }
-
-  bool _isModelProperty(String name) {
-    if (varName == name) return false;
-    return parent == null ? false : parent._isModelProperty(name);
-  }
-
-  String toString() => "$parent > [local: $varName]";
-}
-
-/** A scope that holds a reference to a global variables. */
-class _GlobalsScope extends Scope {
-  final _ModelScope parent;
-  final Map<String, Object> variables;
-
-  _GlobalsScope(this.variables, this.parent) : super._() {
-    if (variables.containsKey('this')) {
-      throw new EvalException("'this' cannot be used as a variable name.");
-    }
-  }
-
-  Object get model => parent != null ? parent.model : null;
-
-  Object operator[](String name) {
-    if (variables.containsKey(name)) return _convert(variables[name]);
-    if (parent != null) return parent[name];
-    throw new EvalException("variable '$name' not found");
-  }
-
-  bool _isModelProperty(String name) {
-    if (variables.containsKey(name)) return false;
-    return parent == null ? false : parent._isModelProperty(name);
-  }
-
-  String toString() => "$parent > [global: ${variables.keys}]";
-}
-
-Object _convert(v) => v is Stream ? new StreamBinding(v) : v;
-
-abstract class ExpressionObserver<E extends Expression> implements Expression {
-  final E _expr;
-  ExpressionObserver _parent;
-
-  StreamSubscription _subscription;
-  Object _value;
-
-  StreamController _controller = new StreamController.broadcast();
-  Stream get onUpdate => _controller.stream;
-
-  ExpressionObserver(this._expr);
-
-  Expression get expression => _expr;
-
-  Object get currentValue => _value;
-
-  update(Scope scope) => _updateSelf(scope);
-
-  _updateSelf(Scope scope) {}
-
-  _invalidate(Scope scope) {
-    _observe(scope, false);
-    if (_parent != null) {
-      _parent._invalidate(scope);
-    }
-  }
-
-  _unobserve() {
-    if (_subscription != null) {
-      _subscription.cancel();
-      _subscription = null;
-    }
-  }
-
-  _observe(Scope scope, skipChanges) {
-    _unobserve();
-
-    var _oldValue = _value;
-
-    // evaluate
-    _updateSelf(scope);
-
-    if (!skipChanges && !identical(_value, _oldValue)) {
-      _controller.add(_value);
-    }
-  }
-
-  String toString() => _expr.toString();
-}
-
-class Updater extends RecursiveVisitor {
-  final Scope scope;
-  final bool skipChanges;
-
-  Updater(this.scope, [this.skipChanges = false]);
-
-  visitExpression(ExpressionObserver e) {
-    e._observe(scope, skipChanges);
-  }
-}
-
-class Closer extends RecursiveVisitor {
-  static final _instance = new Closer._();
-  factory Closer() => _instance;
-  Closer._();
-
-  visitExpression(ExpressionObserver e) {
-    e._unobserve();
-  }
-}
-
-class EvalVisitor extends Visitor {
-  final Scope scope;
-
-  EvalVisitor(this.scope);
-
-  visitEmptyExpression(EmptyExpression e) => scope.model;
-
-  visitParenthesizedExpression(ParenthesizedExpression e) => visit(e.child);
-
-  visitGetter(Getter g) {
-    var receiver = visit(g.receiver);
-    if (receiver == null) return null;
-    var symbol = smoke.nameToSymbol(g.name);
-    return smoke.read(receiver, symbol);
-  }
-
-  visitIndex(Index i) {
-    var receiver = visit(i.receiver);
-    if (receiver == null) return null;
-    var key = visit(i.argument);
-    return receiver[key];
-  }
-
-  visitInvoke(Invoke i) {
-    var receiver = visit(i.receiver);
-    if (receiver == null) return null;
-    var args = (i.arguments == null)
-        ? null
-        : i.arguments.map(visit).toList(growable: false);
-
-    if (i.method == null) {
-      assert(receiver is Function);
-      return Function.apply(receiver, args);
-    }
-
-    var symbol = smoke.nameToSymbol(i.method);
-    return smoke.invoke(receiver, symbol, args);
-  }
-
-  visitLiteral(Literal l) => l.value;
-
-  visitListLiteral(ListLiteral l) => l.items.map(visit).toList();
-
-  visitMapLiteral(MapLiteral l) {
-    var map = {};
-    for (var entry in l.entries) {
-      var key = visit(entry.key);
-      var value = visit(entry.entryValue);
-      map[key] = value;
-    }
-    return map;
-  }
-
-  visitMapLiteralEntry(MapLiteralEntry e) =>
-      throw new UnsupportedError("should never be called");
-
-  visitIdentifier(Identifier i) => scope[i.value];
-
-  visitBinaryOperator(BinaryOperator o) {
-    var operator = o.operator;
-    var left = visit(o.left);
-    var right = visit(o.right);
-
-    var f = _BINARY_OPERATORS[operator];
-    if (operator == '&&' || operator == '||') {
-      // TODO: short-circuit
-      return f(_toBool(left), _toBool(right));
-    } else if (operator == '==' || operator == '!=') {
-      return f(left, right);
-    } else if (left == null || right == null) {
-      return null;
-    }
-    return f(left, right);
-  }
-
-  visitUnaryOperator(UnaryOperator o) {
-    var expr = visit(o.child);
-    var f = _UNARY_OPERATORS[o.operator];
-    if (o.operator == '!') {
-      return f(_toBool(expr));
-    }
-    return (expr == null) ? null : f(expr);
-  }
-
-  visitTernaryOperator(TernaryOperator o) =>
-      visit(o.condition) == true ? visit(o.trueExpr) : visit(o.falseExpr);
-
-  visitInExpression(InExpression i) =>
-      throw new UnsupportedError("can't eval an 'in' expression");
-
-  visitAsExpression(AsExpression i) =>
-      throw new UnsupportedError("can't eval an 'as' expression");
-}
-
-class ObserverBuilder extends Visitor {
-  final Queue parents = new Queue();
-
-  ObserverBuilder();
-
-  visitEmptyExpression(EmptyExpression e) => new EmptyObserver(e);
-
-  visitParenthesizedExpression(ParenthesizedExpression e) => visit(e.child);
-
-  visitGetter(Getter g) {
-    var receiver = visit(g.receiver);
-    var getter = new GetterObserver(g, receiver);
-    receiver._parent = getter;
-    return getter;
-  }
-
-  visitIndex(Index i) {
-    var receiver = visit(i.receiver);
-    var arg = visit(i.argument);
-    var index =  new IndexObserver(i, receiver, arg);
-    receiver._parent = index;
-    arg._parent = index;
-    return index;
-  }
-
-  visitInvoke(Invoke i) {
-    var receiver = visit(i.receiver);
-    var args = (i.arguments == null)
-        ? null
-        : i.arguments.map(visit).toList(growable: false);
-    var invoke =  new InvokeObserver(i, receiver, args);
-    receiver._parent = invoke;
-    if (args != null) args.forEach((a) => a._parent = invoke);
-    return invoke;
-  }
-
-  visitLiteral(Literal l) => new LiteralObserver(l);
-
-  visitListLiteral(ListLiteral l) {
-    var items = l.items.map(visit).toList(growable: false);
-    var list = new ListLiteralObserver(l, items);
-    items.forEach((e) => e._parent = list);
-    return list;
-  }
-
-  visitMapLiteral(MapLiteral l) {
-    var entries = l.entries.map(visit).toList(growable: false);
-    var map = new MapLiteralObserver(l, entries);
-    entries.forEach((e) => e._parent = map);
-    return map;
-  }
-
-  visitMapLiteralEntry(MapLiteralEntry e) {
-    var key = visit(e.key);
-    var value = visit(e.entryValue);
-    var entry = new MapLiteralEntryObserver(e, key, value);
-    key._parent = entry;
-    value._parent = entry;
-    return entry;
-  }
-
-  visitIdentifier(Identifier i) => new IdentifierObserver(i);
-
-  visitBinaryOperator(BinaryOperator o) {
-    var left = visit(o.left);
-    var right = visit(o.right);
-    var binary = new BinaryObserver(o, left, right);
-    left._parent = binary;
-    right._parent = binary;
-    return binary;
-  }
-
-  visitUnaryOperator(UnaryOperator o) {
-    var expr = visit(o.child);
-    var unary = new UnaryObserver(o, expr);
-    expr._parent = unary;
-    return unary;
-  }
-
-  visitTernaryOperator(TernaryOperator o) {
-    var condition = visit(o.condition);
-    var trueExpr = visit(o.trueExpr);
-    var falseExpr = visit(o.falseExpr);
-    var ternary = new TernaryObserver(o, condition, trueExpr, falseExpr);
-    condition._parent = ternary;
-    trueExpr._parent = ternary;
-    falseExpr._parent = ternary;
-    return ternary;
-  }
-
-  visitInExpression(InExpression i) {
-    throw new UnsupportedError("can't eval an 'in' expression");
-  }
-
-  visitAsExpression(AsExpression i) {
-    throw new UnsupportedError("can't eval an 'as' expression");
-  }
-}
-
-class EmptyObserver extends ExpressionObserver<EmptyExpression>
-    implements EmptyExpression {
-
-  EmptyObserver(EmptyExpression value) : super(value);
-
-  _updateSelf(Scope scope) {
-    _value = scope.model;
-    // TODO(justin): listen for scope.model changes?
-  }
-
-  accept(Visitor v) => v.visitEmptyExpression(this);
-}
-
-class LiteralObserver extends ExpressionObserver<Literal> implements Literal {
-
-  LiteralObserver(Literal value) : super(value);
-
-  dynamic get value => _expr.value;
-
-  _updateSelf(Scope scope) {
-    _value = _expr.value;
-  }
-
-  accept(Visitor v) => v.visitLiteral(this);
-}
-
-class ListLiteralObserver extends ExpressionObserver<ListLiteral>
-    implements ListLiteral {
-
-  final List<ExpressionObserver> items;
-
-  ListLiteralObserver(ListLiteral value, this.items) : super(value);
-
-  _updateSelf(Scope scope) {
-    _value = items.map((i) => i._value).toList();
-  }
-
-  accept(Visitor v) => v.visitListLiteral(this);
-}
-
-class MapLiteralObserver extends ExpressionObserver<MapLiteral>
-    implements MapLiteral {
-
-  final List<MapLiteralEntryObserver> entries;
-
-  MapLiteralObserver(MapLiteral value, this.entries) : super(value);
-
-  _updateSelf(Scope scope) {
-    _value = entries.fold(new Map(),
-        (m, e) => m..[e.key._value] = e.entryValue._value);
-  }
-
-  accept(Visitor v) => v.visitMapLiteral(this);
-}
-
-class MapLiteralEntryObserver extends ExpressionObserver<MapLiteralEntry>
-    implements MapLiteralEntry {
-
-  final LiteralObserver key;
-  final ExpressionObserver entryValue;
-
-  MapLiteralEntryObserver(MapLiteralEntry value, this.key, this.entryValue)
-      : super(value);
-
-  accept(Visitor v) => v.visitMapLiteralEntry(this);
-}
-
-class IdentifierObserver extends ExpressionObserver<Identifier>
-    implements Identifier {
-
-  IdentifierObserver(Identifier value) : super(value);
-
-  String get value => _expr.value;
-
-  _updateSelf(Scope scope) {
-    _value = scope[value];
-    if (!scope._isModelProperty(value)) return;
-    var model = scope.model;
-    if (model is! Observable) return;
-    var symbol = smoke.nameToSymbol(value);
-    _subscription = (model as Observable).changes.listen((changes) {
-      if (changes.any((c) => c is PropertyChangeRecord && c.name == symbol)) {
-        _invalidate(scope);
-      }
-    });
-  }
-
-  accept(Visitor v) => v.visitIdentifier(this);
-}
-
-class ParenthesizedObserver extends ExpressionObserver<ParenthesizedExpression>
-    implements ParenthesizedExpression {
-  final ExpressionObserver child;
-
-  ParenthesizedObserver(ParenthesizedExpression expr, this.child) : super(expr);
-
-
-  _updateSelf(Scope scope) {
-    _value = child._value;
-  }
-
-  accept(Visitor v) => v.visitParenthesizedExpression(this);
-}
-
-class UnaryObserver extends ExpressionObserver<UnaryOperator>
-    implements UnaryOperator {
-  final ExpressionObserver child;
-
-  UnaryObserver(UnaryOperator expr, this.child) : super(expr);
-
-  String get operator => _expr.operator;
-
-  _updateSelf(Scope scope) {
-    var f = _UNARY_OPERATORS[_expr.operator];
-    if (operator == '!') {
-      _value = f(_toBool(child._value));
-    } else {
-      _value = (child._value == null) ? null : f(child._value);
-    }
-  }
-
-  accept(Visitor v) => v.visitUnaryOperator(this);
-}
-
-class BinaryObserver extends ExpressionObserver<BinaryOperator>
-    implements BinaryOperator {
-
-  final ExpressionObserver left;
-  final ExpressionObserver right;
-
-  BinaryObserver(BinaryOperator expr, this.left, this.right)
-      : super(expr);
-
-  String get operator => _expr.operator;
-
-  _updateSelf(Scope scope) {
-    var f = _BINARY_OPERATORS[operator];
-    if (operator == '&&' || operator == '||') {
-      _value = f(_toBool(left._value), _toBool(right._value));
-    } else if (operator == '==' || operator == '!=') {
-      _value = f(left._value, right._value);
-    } else if (left._value == null || right._value == null) {
-      _value = null;
-    } else {
-      if (operator == '|' && left._value is ObservableList) {
-        _subscription = (left._value as ObservableList).listChanges
-            .listen((_) => _invalidate(scope));
-      }
-      _value = f(left._value, right._value);
-    }
-  }
-
-  accept(Visitor v) => v.visitBinaryOperator(this);
-
-}
-
-class TernaryObserver extends ExpressionObserver<TernaryOperator>
-    implements TernaryOperator {
-
-  final ExpressionObserver condition;
-  final ExpressionObserver trueExpr;
-  final ExpressionObserver falseExpr;
-
-  TernaryObserver(TernaryOperator expr, this.condition, this.trueExpr,
-      this.falseExpr) : super(expr);
-
-  _updateSelf(Scope scope) {
-    _value = _toBool(condition._value) ? trueExpr._value : falseExpr._value;
-  }
-
-  accept(Visitor v) => v.visitTernaryOperator(this);
-
-}
-
-class GetterObserver extends ExpressionObserver<Getter> implements Getter {
-  final ExpressionObserver receiver;
-
-  GetterObserver(Expression expr, this.receiver) : super(expr);
-
-  String get name => _expr.name;
-
-  _updateSelf(Scope scope) {
-    var receiverValue = receiver._value;
-    if (receiverValue == null) {
-      _value = null;
-      return;
-    }
-    var symbol = smoke.nameToSymbol(_expr.name);
-    _value = smoke.read(receiverValue, symbol);
-
-    if (receiverValue is Observable) {
-      _subscription = (receiverValue as Observable).changes.listen((changes) {
-        if (changes.any((c) => c is PropertyChangeRecord && c.name == symbol)) {
-          _invalidate(scope);
-        }
-      });
-    }
-  }
-
-  accept(Visitor v) => v.visitGetter(this);
-}
-
-class IndexObserver extends ExpressionObserver<Index> implements Index {
-  final ExpressionObserver receiver;
-  final ExpressionObserver argument;
-
-  IndexObserver(Expression expr, this.receiver, this.argument) : super(expr);
-
-  _updateSelf(Scope scope) {
-    var receiverValue = receiver._value;
-    if (receiverValue == null) {
-      _value = null;
-      return;
-    }
-    var key = argument._value;
-    _value = receiverValue[key];
-
-    if (receiverValue is ObservableList) {
-      _subscription = (receiverValue as ObservableList).listChanges
-          .listen((changes) {
-        if (changes.any((c) => c.indexChanged(key))) _invalidate(scope);
-      });
-    } else if (receiverValue is Observable) {
-      _subscription = (receiverValue as Observable).changes.listen((changes) {
-        if (changes.any((c) => c is MapChangeRecord && c.key == key)) {
-          _invalidate(scope);
-        }
-      });
-    }
-  }
-
-  accept(Visitor v) => v.visitIndex(this);
-}
-
-class InvokeObserver extends ExpressionObserver<Invoke> implements Invoke {
-  final ExpressionObserver receiver;
-  final List<ExpressionObserver> arguments;
-
-  InvokeObserver(Expression expr, this.receiver, this.arguments)
-      : super(expr) {
-    assert(arguments != null);
-  }
-
-  String get method => _expr.method;
-
-  _updateSelf(Scope scope) {
-    var args = arguments.map((a) => a._value).toList();
-    var receiverValue = receiver._value;
-    if (receiverValue == null) {
-      _value = null;
-      return;
-    }
-    if (_expr.method == null) {
-      // top-level function or model method
-      // TODO(justin): listen to model changes to see if the method has
-      // changed? listen to the scope to see if the top-level method has
-      // changed?
-      assert(receiverValue is Function);
-      _value = _convert(Function.apply(receiverValue, args));
-    } else {
-      var symbol = smoke.nameToSymbol(_expr.method);
-      _value = smoke.invoke(receiverValue, symbol, args);
-
-      if (receiverValue is Observable) {
-        _subscription = (receiverValue as Observable).changes.listen(
-            (List<ChangeRecord> changes) {
-              if (changes.any(
-                  (c) => c is PropertyChangeRecord && c.name == symbol)) {
-                _invalidate(scope);
-              }
-            });
-      }
-    }
-  }
-
-  accept(Visitor v) => v.visitInvoke(this);
-}
-
-_toBool(v) => (v == null) ? false : v;
-
-class EvalException implements Exception {
-  final String message;
-  EvalException(this.message);
-  String toString() => "EvalException: $message";
-}
diff --git a/packages/polymer_expressions/lib/expression.dart b/packages/polymer_expressions/lib/expression.dart
deleted file mode 100644
index ac36c8b..0000000
--- a/packages/polymer_expressions/lib/expression.dart
+++ /dev/null
@@ -1,368 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.expression;
-
-import 'visitor.dart';
-
-// Helper functions for building expression trees programmatically
-
-EmptyExpression empty() => const EmptyExpression();
-Literal literal(v) => new Literal(v);
-ListLiteral listLiteral(List<Expression> items) => new ListLiteral(items);
-MapLiteral mapLiteral(List<MapLiteralEntry> entries) => new MapLiteral(entries);
-MapLiteralEntry mapLiteralEntry(Literal key, Expression value) =>
-    new MapLiteralEntry(key, value);
-Identifier ident(String v) => new Identifier(v);
-ParenthesizedExpression paren(Expression e) => new ParenthesizedExpression(e);
-UnaryOperator unary(String op, Expression e) => new UnaryOperator(op, e);
-BinaryOperator binary(Expression l, String op, Expression r) =>
-    new BinaryOperator(l, op, r);
-Getter getter(Expression e, String m) => new Getter(e, m);
-Index index(Expression e, Expression a) => new Index(e, a);
-Invoke invoke(Expression e, String m, List<Expression> a) =>
-    new Invoke(e, m, a);
-InExpression inExpr(Expression l, Expression r) => new InExpression(l, r);
-AsExpression asExpr(Expression l, Expression r) => new AsExpression(l, r);
-TernaryOperator ternary(Expression c, Expression t, Expression f) =>
-    new TernaryOperator(c, t, f);
-
-class AstFactory {
-  EmptyExpression empty() => const EmptyExpression();
-
-  Literal literal(v) => new Literal(v);
-
-  MapLiteral mapLiteral(List<MapLiteralEntry> entries) =>
-      new MapLiteral(entries);
-
-  MapLiteralEntry mapLiteralEntry(Literal key, Expression value) =>
-      new MapLiteralEntry(key, value);
-
-  Identifier identifier(String v) => new Identifier(v);
-
-  ParenthesizedExpression parenthesized(Expression e) =>
-      new ParenthesizedExpression(e);
-
-  UnaryOperator unary(String op, Expression e) => new UnaryOperator(op, e);
-
-  BinaryOperator binary(Expression l, String op, Expression r) =>
-      new BinaryOperator(l, op, r);
-
-  TernaryOperator ternary(Expression c, Expression t, Expression f) =>
-      new TernaryOperator(c, t, f);
-
-  Getter getter(Expression g, String n) => new Getter(g, n);
-
-  Index index(Expression e, Expression a) => new Index(e, a);
-
-  Invoke invoke(Expression e, String m, List<Expression> a) =>
-      new Invoke(e, m, a);
-
-  InExpression inExpr(Expression l, Expression r) => new InExpression(l, r);
-
-  AsExpression asExpr(Expression l, Expression r) => new AsExpression(l, r);
-}
-
-/// Base class for all expressions
-abstract class Expression {
-  const Expression();
-  accept(Visitor v);
-}
-
-abstract class HasIdentifier {
-  String get identifier;
-  Expression get expr;
-}
-
-class EmptyExpression extends Expression {
-  const EmptyExpression();
-  accept(Visitor v) => v.visitEmptyExpression(this);
-}
-
-class Literal<T> extends Expression {
-  final T value;
-
-  Literal(this.value);
-
-  accept(Visitor v) => v.visitLiteral(this);
-
-  String toString() => (value is String) ? '"$value"' : '$value';
-
-  bool operator ==(o) => o is Literal<T> && o.value == value;
-
-  int get hashCode => value.hashCode;
-}
-
-class ListLiteral extends Expression {
-  final List<Expression> items;
-
-  ListLiteral(this.items);
-
-  accept(Visitor v) => v.visitListLiteral(this);
-
-  String toString() => "$items";
-
-  bool operator ==(o) => o is ListLiteral && _listEquals(o.items, items);
-
-  int get hashCode => _hashList(items);
-}
-
-class MapLiteral extends Expression {
-  final List<MapLiteralEntry> entries;
-
-  MapLiteral(this.entries);
-
-  accept(Visitor v) => v.visitMapLiteral(this);
-
-  String toString() => "{$entries}";
-
-  bool operator ==(o) => o is MapLiteral && _listEquals(o.entries, entries);
-
-  int get hashCode => _hashList(entries);
-}
-
-class MapLiteralEntry extends Expression {
-  final Literal key;
-  final Expression entryValue;
-
-  MapLiteralEntry(this.key, this.entryValue);
-
-  accept(Visitor v) => v.visitMapLiteralEntry(this);
-
-  String toString() => "$key: $entryValue";
-
-  bool operator ==(o) => o is MapLiteralEntry && o.key == key
-      && o.entryValue == entryValue;
-
-  int get hashCode => _JenkinsSmiHash.hash2(key.hashCode, entryValue.hashCode);
-}
-
-class ParenthesizedExpression extends Expression {
-  final Expression child;
-
-  ParenthesizedExpression(this.child);
-
-  accept(Visitor v) => v.visitParenthesizedExpression(this);
-
-  String toString() => '($child)';
-
-  bool operator ==(o) => o is ParenthesizedExpression && o.child == child;
-
-  int get hashCode => child.hashCode;
-}
-
-class Identifier extends Expression {
-  final String value;
-
-  Identifier(this.value);
-
-  accept(Visitor v) => v.visitIdentifier(this);
-
-  String toString() => value;
-
-  bool operator ==(o) => o is Identifier && o.value == value;
-
-  int get hashCode => value.hashCode;
-}
-
-class UnaryOperator extends Expression {
-  final String operator;
-  final Expression child;
-
-  UnaryOperator(this.operator, this.child);
-
-  accept(Visitor v) => v.visitUnaryOperator(this);
-
-  String toString() => '$operator $child';
-
-  bool operator ==(o) => o is UnaryOperator && o.operator == operator
-      && o.child == child;
-
-  int get hashCode => _JenkinsSmiHash.hash2(operator.hashCode, child.hashCode);
-}
-
-class BinaryOperator extends Expression {
-  final String operator;
-  final Expression left;
-  final Expression right;
-
-  BinaryOperator(this.left, this.operator, this.right);
-
-  accept(Visitor v) => v.visitBinaryOperator(this);
-
-  String toString() => '($left $operator $right)';
-
-  bool operator ==(o) => o is BinaryOperator && o.operator == operator
-      && o.left == left && o.right == right;
-
-  int get hashCode => _JenkinsSmiHash.hash3(operator.hashCode, left.hashCode,
-      right.hashCode);
-}
-
-class TernaryOperator extends Expression {
-  final Expression condition;
-  final Expression trueExpr;
-  final Expression falseExpr;
-
-  TernaryOperator(this.condition, this.trueExpr, this.falseExpr);
-
-  accept(Visitor v) => v.visitTernaryOperator(this);
-
-  String toString() => '($condition ? $trueExpr : $falseExpr)';
-
-  bool operator ==(o) => o is TernaryOperator
-      && o.condition == condition
-      && o.trueExpr == trueExpr
-      && o.falseExpr == falseExpr;
-
-  int get hashCode => _JenkinsSmiHash.hash3(condition.hashCode,
-      trueExpr.hashCode, falseExpr.hashCode);
-}
-
-class InExpression extends Expression implements HasIdentifier {
-  final Identifier left;
-  final Expression right;
-
-  InExpression(this.left, this.right);
-
-  accept(Visitor v) => v.visitInExpression(this);
-
-  String get identifier => left.value;
-
-  Expression get expr => right;
-
-  String toString() => '($left in $right)';
-
-  bool operator ==(o) => o is InExpression && o.left == left
-      && o.right == right;
-
-  int get hashCode => _JenkinsSmiHash.hash2(left.hashCode, right.hashCode);
-}
-
-class AsExpression extends Expression implements HasIdentifier {
-  final Expression left;
-  final Identifier right;
-
-  AsExpression(this.left, this.right);
-
-  accept(Visitor v) => v.visitAsExpression(this);
-
-  String get identifier => right.value;
-
-  Expression get expr => left;
-
-  String toString() => '($left as $right)';
-
-  bool operator ==(o) => o is AsExpression && o.left == left
-      && o.right == right;
-
-  int get hashCode => _JenkinsSmiHash.hash2(left.hashCode, right.hashCode);
-}
-
-class Index extends Expression {
-  final Expression receiver;
-  final Expression argument;
-
-  Index(this.receiver, this.argument);
-
-  accept(Visitor v) => v.visitIndex(this);
-
-  String toString() => '$receiver[$argument]';
-
-  bool operator ==(o) =>
-      o is Index
-      && o.receiver == receiver
-      && o.argument == argument;
-
-  int get hashCode =>
-      _JenkinsSmiHash.hash2(receiver.hashCode, argument.hashCode);
-}
-
-class Getter extends Expression {
-  final Expression receiver;
-  final String name;
-
-  Getter(this.receiver, this.name);
-
-  accept(Visitor v) => v.visitGetter(this);
-
-  String toString() => '$receiver.$name';
-
-  bool operator ==(o) =>
-      o is Getter
-      && o.receiver == receiver
-      && o.name == name;
-
-  int get hashCode => _JenkinsSmiHash.hash2(receiver.hashCode, name.hashCode);
-
-}
-
-/**
- * Represents a function or method invocation. If [method] is null, then
- * [receiver] is an expression that should evaluate to a function. If [method]
- * is not null, then [receiver] is an expression that should evaluate to an
- * object that has an appropriate method.
- */
-class Invoke extends Expression {
-  final Expression receiver;
-  final String method;
-  final List<Expression> arguments;
-
-  Invoke(this.receiver, this.method, this.arguments) {
-    assert(arguments != null);
-  }
-
-  accept(Visitor v) => v.visitInvoke(this);
-
-  String toString() => '$receiver.$method($arguments)';
-
-  bool operator ==(o) =>
-      o is Invoke
-      && o.receiver == receiver
-      && o.method == method
-      && _listEquals(o.arguments, arguments);
-
-  int get hashCode => _JenkinsSmiHash.hash3(receiver.hashCode, method.hashCode,
-      _hashList(arguments));
-}
-
-bool _listEquals(List a, List b) {
-  if (a == b) return true;
-  if (a == null || b == null) return false;
-  if (a.length != b.length) return false;
-  for (int i = 0; i < a.length; i++) {
-    if (a[i] != b[i]) return false;
-  }
-  return true;
-}
-
-int _hashList(List l) {
-  var hash = l.fold(0,
-      (h, item) => _JenkinsSmiHash.combine(h, item.hashCode));
-  return _JenkinsSmiHash.finish(hash);
-}
-
-class _JenkinsSmiHash {
-  // TODO: Bug 11617- This class should be optimized and standardized elsewhere.
-
-  static int combine(int hash, int value) {
-    hash = 0x1fffffff & (hash + value);
-    hash = 0x1fffffff & (hash + ((0x0007ffff & hash) << 10));
-    return hash ^ (hash >> 6);
-  }
-
-  static int finish(int hash) {
-    hash = 0x1fffffff & (hash + ((0x03ffffff & hash) <<  3));
-    hash = hash ^ (hash >> 11);
-    return 0x1fffffff & (hash + ((0x00003fff & hash) << 15));
-  }
-
-  static int hash2(int a, int b) => finish(combine(combine(0, a), b));
-
-  static int hash3(int a, int b, int c) =>
-      finish(combine(combine(combine(0, a), b), c));
-
-  static int hash4(int a, int b, int c, int d) =>
-      finish(combine(combine(combine(combine(0, a), b), c), d));
-}
diff --git a/packages/polymer_expressions/lib/filter.dart b/packages/polymer_expressions/lib/filter.dart
deleted file mode 100644
index c972584..0000000
--- a/packages/polymer_expressions/lib/filter.dart
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.filter;
-
-typedef Object Filter(Object value);
-
-abstract class Transformer<T, V> {
-
-  T forward(V v);
-  V reverse(T t);
-  Transformer<V, T> get inverse => new _InverseTransformer/*<V, T>*/(this);
-}
-
-// TODO(jmesserly): restore types when Issue 14094 is fixed.
-class _InverseTransformer/*<V, T>*/ implements Transformer/*<V, T>*/ {
-  final Transformer/*<T, V>*/ _t;
-  _InverseTransformer(this._t);
-
-  /*V*/ forward(/*T*/ v) => _t.reverse(v);
-  /*T*/ reverse(/*V*/ t) => _t.forward(t);
-  Transformer/*<T, V>*/ get inverse => _t;
-}
diff --git a/packages/polymer_expressions/lib/parser.dart b/packages/polymer_expressions/lib/parser.dart
deleted file mode 100644
index 7ab9b4c..0000000
--- a/packages/polymer_expressions/lib/parser.dart
+++ /dev/null
@@ -1,324 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.parser;
-
-import 'tokenizer.dart';
-export 'tokenizer.dart' show ParseException;
-import 'expression.dart';
-
-const _UNARY_OPERATORS = const <String>['+', '-', '!'];
-const _BINARY_OPERATORS = const <String>['+', '-', '*', '/', '%', '^', '==',
-    '!=', '>', '<', '>=', '<=', '||', '&&', '&', '===', '!==', '|'];
-
-Expression parse(String expr) => new Parser(expr).parse();
-
-class Parser {
-  final AstFactory _astFactory;
-  final Tokenizer _tokenizer;
-  List<Token> _tokens;
-  Iterator _iterator;
-  Token get _token => _iterator.current;
-
-  Parser(String input, {AstFactory astFactory})
-      : _tokenizer = new Tokenizer(input),
-        _astFactory = (astFactory == null) ? new AstFactory() : astFactory;
-
-  Expression parse() {
-    _tokens = _tokenizer.tokenize();
-    _iterator = _tokens.iterator;
-    _advance();
-    return _parseExpression();
-  }
-
-  _advance([int kind, String value]) {
-    if ((kind != null && (_token == null || _token.kind != kind))
-        || (value != null && (_token == null || _token.value != value))) {
-      throw new ParseException("Expected kind $kind ($value): $_token");
-    }
-    _iterator.moveNext();
-  }
-
-  Expression _parseExpression() {
-    if (_token == null) return _astFactory.empty();
-    var expr = _parseUnary();
-    return (expr == null) ? null : _parsePrecedence(expr, 0);
-  }
-
-  // _parsePrecedence and _parseBinary implement the precedence climbing
-  // algorithm as described in:
-  // http://en.wikipedia.org/wiki/Operator-precedence_parser#Precedence_climbing_method
-  Expression _parsePrecedence(Expression left, int precedence) {
-    assert(left != null);
-    while (_token != null) {
-      if (_token.kind == GROUPER_TOKEN) {
-        if (_token.value == '(') {
-          var args = _parseArguments();
-          assert(args != null);
-          left = _astFactory.invoke(left, null, args);
-        } else if (_token.value == '[') {
-          var indexExpr = _parseIndex();
-          left = _astFactory.index(left, indexExpr);
-        } else {
-          break;
-        }
-      } else if (_token.kind == DOT_TOKEN) {
-        _advance();
-        var right = _parseUnary();
-        left = _makeInvokeOrGetter(left, right);
-      } else if (_token.kind == KEYWORD_TOKEN) {
-        if (_token.value == 'in') {
-          left = _parseInExpression(left);
-        } else if (_token.value == 'as') {
-          left = _parseAsExpression(left);
-        } else {
-          break;
-        }
-      } else if (_token.kind == OPERATOR_TOKEN
-          && _token.precedence >= precedence) {
-        left = _token.value == '?' ? _parseTernary(left) : _parseBinary(left);
-      } else {
-        break;
-      }
-    }
-    return left;
-  }
-
-  // invoke or getter
-  Expression _makeInvokeOrGetter(left, right) {
-    if (right is Identifier) {
-      return _astFactory.getter(left, right.value);
-    } else if (right is Invoke && right.receiver is Identifier) {
-      Identifier method = right.receiver;
-      return _astFactory.invoke(left, method.value, right.arguments);
-    } else {
-      throw new ParseException("expected identifier: $right");
-    }
-  }
-
-  Expression _parseBinary(left) {
-    var op = _token;
-    if (!_BINARY_OPERATORS.contains(op.value)) {
-      throw new ParseException("unknown operator: ${op.value}");
-    }
-    _advance();
-    var right = _parseUnary();
-    while (_token != null
-        && (_token.kind == OPERATOR_TOKEN
-        || _token.kind == DOT_TOKEN
-        || _token.kind == GROUPER_TOKEN)
-        && _token.precedence > op.precedence) {
-      right = _parsePrecedence(right, _token.precedence);
-    }
-    return _astFactory.binary(left, op.value, right);
-  }
-
-  Expression _parseUnary() {
-    if (_token.kind == OPERATOR_TOKEN) {
-      var value = _token.value;
-      if (value == '+' || value == '-') {
-        _advance();
-        if (_token.kind == INTEGER_TOKEN) {
-          return _parseInteger(value);
-        } else if (_token.kind == DECIMAL_TOKEN) {
-          return _parseDecimal(value);
-        } else {
-          var expr = _parsePrecedence(_parsePrimary(), POSTFIX_PRECEDENCE);
-          return _astFactory.unary(value, expr);
-        }
-      } else if (value == '!') {
-        _advance();
-        var expr = _parsePrecedence(_parsePrimary(), POSTFIX_PRECEDENCE);
-        return _astFactory.unary(value, expr);
-      } else {
-        throw new ParseException("unexpected token: $value");
-      }
-    }
-    return _parsePrimary();
-  }
-
-  Expression _parseTernary(condition) {
-    _advance(OPERATOR_TOKEN, '?');
-    var trueExpr = _parseExpression();
-    _advance(COLON_TOKEN);
-    var falseExpr = _parseExpression();
-    return _astFactory.ternary(condition, trueExpr, falseExpr);
-  }
-
-  Expression _parsePrimary() {
-    var kind = _token.kind;
-    switch (kind) {
-      case KEYWORD_TOKEN:
-        var keyword = _token.value;
-        if (keyword == 'this') {
-          _advance();
-          // TODO(justin): return keyword node
-          return _astFactory.identifier('this');
-        } else if (KEYWORDS.contains(keyword)) {
-          throw new ParseException('unexpected keyword: $keyword');
-        }
-        throw new ParseException('unrecognized keyword: $keyword');
-      case IDENTIFIER_TOKEN:
-        return _parseInvokeOrIdentifier();
-      case STRING_TOKEN:
-        return _parseString();
-      case INTEGER_TOKEN:
-        return _parseInteger();
-      case DECIMAL_TOKEN:
-        return _parseDecimal();
-      case GROUPER_TOKEN:
-        if (_token.value == '(') {
-          return _parseParenthesized();
-        } else if (_token.value == '{') {
-          return _parseMapLiteral();
-        } else if (_token.value == '[') {
-          return _parseListLiteral();
-        }
-        return null;
-      case COLON_TOKEN:
-        throw new ParseException('unexpected token ":"');
-      default:
-        return null;
-    }
-  }
-
-  ListLiteral _parseListLiteral() {
-    var items = [];
-    do {
-      _advance();
-      if (_token.kind == GROUPER_TOKEN && _token.value == ']') {
-        break;
-      }
-      items.add(_parseExpression());
-    } while(_token != null && _token.value == ',');
-    _advance(GROUPER_TOKEN, ']');
-    return new ListLiteral(items);
-  }
-
-  MapLiteral _parseMapLiteral() {
-    var entries = [];
-    do {
-      _advance();
-      if (_token.kind == GROUPER_TOKEN && _token.value == '}') {
-        break;
-      }
-      entries.add(_parseMapLiteralEntry());
-    } while(_token != null && _token.value == ',');
-    _advance(GROUPER_TOKEN, '}');
-    return new MapLiteral(entries);
-  }
-
-  MapLiteralEntry _parseMapLiteralEntry() {
-    var key = _parseString();
-    _advance(COLON_TOKEN, ':');
-    var value = _parseExpression();
-    return _astFactory.mapLiteralEntry(key, value);
-  }
-
-  InExpression _parseInExpression(Expression left) {
-    assert(_token.value == 'in');
-    if (left is! Identifier) {
-      throw new ParseException(
-          "in... statements must start with an identifier");
-    }
-    _advance();
-    var right = _parseExpression();
-    return _astFactory.inExpr(left, right);
-  }
-
-  AsExpression _parseAsExpression(Expression left) {
-    assert(_token.value == 'as');
-    _advance();
-    var right = _parseExpression();
-    if (right is! Identifier) {
-      throw new ParseException(
-          "'as' statements must end with an identifier");
-    }
-    return _astFactory.asExpr(left, right);
-  }
-
-  Expression _parseInvokeOrIdentifier() {
-    if (_token.value == 'true') {
-      _advance();
-      return _astFactory.literal(true);
-    }
-    if (_token.value == 'false') {
-      _advance();
-      return _astFactory.literal(false);
-    }
-    if (_token.value == 'null') {
-      _advance();
-      return _astFactory.literal(null);
-    }
-    var identifier = _parseIdentifier();
-    var args = _parseArguments();
-    if (args == null) {
-      return identifier;
-    } else {
-      return _astFactory.invoke(identifier, null, args);
-    }
-  }
-
-  Identifier _parseIdentifier() {
-    if (_token.kind != IDENTIFIER_TOKEN) {
-      throw new ParseException("expected identifier: $_token.value");
-    }
-    var value = _token.value;
-    _advance();
-    return _astFactory.identifier(value);
-  }
-
-  List<Expression> _parseArguments() {
-    if (_token != null && _token.kind == GROUPER_TOKEN && _token.value == '(') {
-      var args = [];
-      do {
-        _advance();
-        if (_token.kind == GROUPER_TOKEN && _token.value == ')') {
-          break;
-        }
-        var expr = _parseExpression();
-        args.add(expr);
-      } while(_token != null && _token.value == ',');
-      _advance(GROUPER_TOKEN, ')');
-      return args;
-    }
-    return null;
-  }
-
-  Expression _parseIndex() {
-    if (_token != null && _token.kind == GROUPER_TOKEN && _token.value == '[') {
-      _advance();
-      var expr = _parseExpression();
-      _advance(GROUPER_TOKEN, ']');
-      return expr;
-    }
-    return null;
-  }
-
-  ParenthesizedExpression _parseParenthesized() {
-    _advance();
-    var expr = _parseExpression();
-    _advance(GROUPER_TOKEN, ')');
-    return _astFactory.parenthesized(expr);
-  }
-
-  Literal<String> _parseString() {
-    var value = _astFactory.literal(_token.value);
-    _advance();
-    return value;
-  }
-
-  Literal<int> _parseInteger([String prefix = '']) {
-    var value = _astFactory.literal(int.parse('$prefix${_token.value}'));
-    _advance();
-    return value;
-  }
-
-  Literal<double> _parseDecimal([String prefix = '']) {
-    var value = _astFactory.literal(double.parse('$prefix${_token.value}'));
-    _advance();
-    return value;
-  }
-
-}
diff --git a/packages/polymer_expressions/lib/polymer_expressions.dart b/packages/polymer_expressions/lib/polymer_expressions.dart
deleted file mode 100644
index 332e3a1..0000000
--- a/packages/polymer_expressions/lib/polymer_expressions.dart
+++ /dev/null
@@ -1,397 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * A binding delegate used with Polymer elements that
- * allows for complex binding expressions, including
- * property access, function invocation,
- * list/map indexing, and two-way filtering.
- *
- * When you install polymer.dart,
- * polymer_expressions is automatically installed as well.
- *
- * Polymer expressions are part of the Polymer.dart project.
- * Refer to the
- * [Polymer.dart](http://www.dartlang.org/polymer-dart/)
- * homepage for example code, project status, and
- * information about how to get started using Polymer.dart in your apps.
- *
- * ## Other resources
- *
- * The
- * [Polymer expressions](http://pub.dartlang.org/packages/polymer_expressions)
- * pub repository contains detailed documentation about using polymer
- * expressions.
- */
-
-library polymer_expressions;
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:observe/observe.dart';
-import 'package:template_binding/template_binding.dart';
-
-import 'eval.dart';
-import 'expression.dart';
-import 'parser.dart';
-import 'src/globals.dart';
-
-Object _classAttributeConverter(v) =>
-    (v is Map) ? v.keys.where((k) => v[k] == true).join(' ') :
-    (v is Iterable) ? v.join(' ') :
-    v;
-
-Object _styleAttributeConverter(v) =>
-    (v is Map) ? v.keys.map((k) => '$k: ${v[k]}').join(';') :
-    (v is Iterable) ? v.join(';') :
-    v;
-
-class PolymerExpressions extends BindingDelegate {
-  /** The default [globals] to use for Polymer expressions. */
-  static const Map DEFAULT_GLOBALS = const { 'enumerate': enumerate };
-
-  final ScopeFactory _scopeFactory;
-  final Map<String, Object> globals;
-
-  // allows access to scopes created for template instances
-  final Expando<Scope> _scopes = new Expando<Scope>();
-  // allows access to scope identifiers (for "in" and "as")
-  final Expando<String> _scopeIdents = new Expando<String>();
-
-  /**
-   * Creates a new binding delegate for Polymer expressions, with the provided
-   * variables used as [globals]. If no globals are supplied, a copy of the
-   * [DEFAULT_GLOBALS] will be used.
-   */
-  PolymerExpressions({Map<String, Object> globals,
-      ScopeFactory scopeFactory: const ScopeFactory()})
-      : globals = globals == null ?
-          new Map<String, Object>.from(DEFAULT_GLOBALS) : globals,
-          _scopeFactory = scopeFactory;
-
-  @override
-  PrepareBindingFunction prepareBinding(String path, name, Node boundNode) {
-    if (path == null) return null;
-    var expr = new Parser(path).parse();
-
-    if (isSemanticTemplate(boundNode) && (name == 'bind' || name == 'repeat')) {
-      if (expr is HasIdentifier) {
-        var identifier = expr.identifier;
-        var bindExpr = expr.expr;
-        return (model, Node node, bool oneTime) {
-          _scopeIdents[node] = identifier;
-          // model may not be a Scope if it was assigned directly via
-          // template.model = x; In that case, prepareInstanceModel will
-          // be called _after_ prepareBinding and will lookup this scope from
-          // _scopes
-          var scope = _scopes[node] = (model is Scope)
-              ? model
-              : _scopeFactory.modelScope(model: model, variables: globals);
-          return new _Binding(bindExpr, scope);
-        };
-      } else {
-        return (model, Node node, bool oneTime) {
-          var scope = _scopes[node] = (model is Scope)
-              ? model
-              : _scopeFactory.modelScope(model: model, variables: globals);
-          if (oneTime) {
-            return _Binding._oneTime(expr, scope);
-          }
-          return new _Binding(expr, scope);
-        };
-      }
-    }
-
-    // For regular bindings, not bindings on a template, the model is always
-    // a Scope created by prepareInstanceModel
-    _Converter converter = null;
-    if (boundNode is Element && name == 'class') {
-      converter = _classAttributeConverter;
-    } else if (boundNode is Element && name == 'style') {
-      converter = _styleAttributeConverter;
-    }
-
-    return (model, Node node, bool oneTime) {
-      var scope = _getScopeForModel(node, model);
-      if (oneTime) {
-        return _Binding._oneTime(expr, scope, converter);
-      }
-      return new _Binding(expr, scope, converter);
-    };
-  }
-
-  prepareInstanceModel(Element template) {
-    var ident = _scopeIdents[template];
-
-    if (ident == null) {
-      return (model) {
-        var existingScope = _scopes[template];
-        // TODO (justinfagnani): make template binding always call
-        // prepareInstanceModel first and get rid of this check
-        if (existingScope != null) {
-          // If there's an existing scope, we created it in prepareBinding
-          // If it has the same model, then we can reuse it, otherwise it's
-          // a repeat with no identifier and we create new scope to occlude
-          // the outer one
-          if (model == existingScope.model) return existingScope;
-          return _scopeFactory.modelScope(model: model, variables: globals);
-        } else {
-          return _getScopeForModel(template, model);
-        }
-      };
-    }
-
-    return (model) {
-      var existingScope = _scopes[template];
-      if (existingScope != null) {
-        // This only happens when a model has been assigned programatically
-        // and prepareBinding is called _before_ prepareInstanceModel.
-        // The scope assigned in prepareBinding wraps the model and is the
-        // scope of the expression. That should be the parent of the templates
-        // scope in the case of bind/as or repeat/in bindings.
-        return _scopeFactory.childScope(existingScope, ident, model);
-      } else {
-        // If there's not an existing scope then we have a bind/as or
-        // repeat/in binding enclosed in an outer scope, so we use that as
-        // the parent
-        var parentScope = _getParentScope(template);
-        return _scopeFactory.childScope(parentScope, ident, model);
-      }
-    };
-  }
-
-  /**
-   * Gets an existing scope for use as a parent, but does not create a new one.
-   */
-  Scope _getParentScope(Node node) {
-    var parent = node.parentNode;
-    if (parent == null) return null;
-
-    if (isSemanticTemplate(node)) {
-      var templateExtension = templateBind(node);
-      var templateInstance = templateExtension.templateInstance;
-      var model = templateInstance == null
-          ? templateExtension.model
-          : templateInstance.model;
-      if (model is Scope) {
-        return model;
-      } else {
-        // A template with a bind binding might have a non-Scope model
-        return _scopes[node];
-      }
-    }
-    if (parent != null) return _getParentScope(parent);
-    return null;
-  }
-
-  /**
-   * Returns the Scope to be used to evaluate expressions in the template
-   * containing [node]. Since all expressions in the same template evaluate
-   * against the same model, [model] is passed in and checked against the
-   * template model to make sure they agree.
-   *
-   * For nested templates, we might have a binding on the nested template that
-   * should be evaluated in the context of the parent template. All scopes are
-   * retreived from an ancestor of [node], since node may be establishing a new
-   * Scope.
-   */
-  Scope _getScopeForModel(Node node, model) {
-    // This only happens in bindings_test because it calls prepareBinding()
-    // directly. Fix the test and throw if node is null?
-    if (node == null) {
-      return _scopeFactory.modelScope(model: model, variables: globals);
-    }
-
-    var id = node is Element ? node.id : '';
-    if (model is Scope) {
-      return model;
-    }
-    if (_scopes[node] != null) {
-      var scope = _scopes[node];
-      assert(scope.model == model);
-      return _scopes[node];
-    } else if (node.parentNode != null) {
-      return _getContainingScope(node.parentNode, model);
-    } else {
-      // here we should be at a top-level template, so there's no parent to
-      // look for a Scope on.
-      if (!isSemanticTemplate(node)) {
-        throw "expected a template instead of $node";
-      }
-      return _getContainingScope(node, model);
-    }
-  }
-
-  Scope _getContainingScope(Node node, model) {
-    if (isSemanticTemplate(node)) {
-      var templateExtension = templateBind(node);
-      var templateInstance = templateExtension.templateInstance;
-      var templateModel = templateInstance == null
-          ? templateExtension.model
-          : templateInstance.model;
-      assert(templateModel == model);
-      var scope = _scopes[node];
-      assert(scope != null);
-      assert(scope.model == model);
-      return scope;
-    } else if (node.parent == null) {
-      var scope = _scopes[node];
-      if (scope != null) {
-        assert(scope.model == model);
-      } else {
-        // only happens in bindings_test
-        scope = _scopeFactory.modelScope(model: model, variables: globals);
-      }
-      return scope;
-    } else {
-      return _getContainingScope(node.parentNode, model);
-    }
-  }
-
-  /// Parse the expression string and return an expression tree.
-  static Expression getExpression(String exprString) =>
-      new Parser(exprString).parse();
-
-  /// Determines the value of evaluating [expr] on the given [model] and returns
-  /// either its value or a binding for it. If [oneTime] is true, it direclty
-  /// returns the value. Otherwise, when [oneTime] is false, it returns a
-  /// [Bindable] that besides evaluating the expression, it will also react to
-  /// observable changes from the model and update the value accordingly.
-  static getBinding(Expression expr, model, {Map<String, Object> globals,
-      oneTime: false}) {
-    if (globals == null) globals = new Map.from(DEFAULT_GLOBALS);
-    var scope = model is Scope ? model
-        : new Scope(model: model, variables: globals);
-    return oneTime ? _Binding._oneTime(expr, scope)
-        : new _Binding(expr, scope);
-  }
-}
-
-typedef Object _Converter(Object);
-
-class _Binding extends Bindable {
-  final Scope _scope;
-  final _Converter _converter;
-  final Expression _expr;
-
-  Function _callback;
-  StreamSubscription _sub;
-  ExpressionObserver _observer;
-  var _value;
-
-  _Binding(this._expr, this._scope, [this._converter]);
-
-  static Object _oneTime(Expression expr, Scope scope, [_Converter converter]) {
-    try {
-      var value = eval(expr, scope);
-      return (converter == null) ? value : converter(value);
-    } catch (e, s) {
-      new Completer().completeError(
-          "Error evaluating expression '$expr': $e", s);
-    }
-    return null;
-  }
-
-  bool _convertAndCheck(newValue, {bool skipChanges: false}) {
-    var oldValue = _value;
-    _value = _converter == null ? newValue : _converter(newValue);
-
-    if (!skipChanges && _callback != null && oldValue != _value) {
-      _callback(_value);
-      return true;
-    }
-    return false;
-  }
-
-  get value {
-    // if there's a callback, then _value has been set, if not we need to
-    // force an evaluation
-    if (_callback != null) {
-      _check(skipChanges: true);
-      return _value;
-    }
-    return _Binding._oneTime(_expr, _scope, _converter);
-  }
-
-  set value(v) {
-    try {
-      assign(_expr, v, _scope, checkAssignability: false);
-    } catch (e, s) {
-      new Completer().completeError(
-          "Error evaluating expression '$_expr': $e", s);
-    }
-  }
-
-  Object open(callback(value)) {
-    if (_callback != null) throw new StateError('already open');
-
-    _callback = callback;
-    _observer = observe(_expr, _scope);
-    _sub = _observer.onUpdate.listen(_convertAndCheck)..onError((e, s) {
-      new Completer().completeError(
-          "Error evaluating expression '$_observer': $e", s);
-    });
-
-    _check(skipChanges: true);
-    return _value;
-  }
-
-  bool _check({bool skipChanges: false}) {
-    try {
-      update(_observer, _scope, skipChanges: skipChanges);
-      return _convertAndCheck(_observer.currentValue, skipChanges: skipChanges);
-    } catch (e, s) {
-      new Completer().completeError(
-          "Error evaluating expression '$_observer': $e", s);
-      return false;
-    }
-  }
-
-  void close() {
-    if (_callback == null) return;
-
-    _sub.cancel();
-    _sub = null;
-    _callback = null;
-
-    new Closer().visit(_observer);
-    _observer = null;
-  }
-
-
-  // TODO(jmesserly): the following code is copy+pasted from path_observer.dart
-  // What seems to be going on is: polymer_expressions.dart has its own _Binding
-  // unlike polymer-expressions.js, which builds on CompoundObserver.
-  // This can lead to subtle bugs and should be reconciled. I'm not sure how it
-  // should go, but CompoundObserver does have some nice optimizations around
-  // ObservedSet which are lacking here. And reuse is nice.
-  void deliver() {
-    if (_callback != null) _dirtyCheck();
-  }
-
-  bool _dirtyCheck() {
-    var cycles = 0;
-    while (cycles < _MAX_DIRTY_CHECK_CYCLES && _check()) {
-      cycles++;
-    }
-    return cycles > 0;
-  }
-
-  static const int _MAX_DIRTY_CHECK_CYCLES = 1000;
-}
-
-_identity(x) => x;
-
-/**
- * Factory function used for testing.
- */
-class ScopeFactory {
-  const ScopeFactory();
-  modelScope({Object model, Map<String, Object> variables}) =>
-      new Scope(model: model, variables: variables);
-
-  childScope(Scope parent, String name, Object value) =>
-      parent.childScope(name, value);
-}
diff --git a/packages/polymer_expressions/lib/src/globals.dart b/packages/polymer_expressions/lib/src/globals.dart
deleted file mode 100644
index d2a4ffd..0000000
--- a/packages/polymer_expressions/lib/src/globals.dart
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * Contains functions that are included by default in [PolymerExpressions].
- *
- *   - [enumerate]: a convenient way to iterate over items and the indexes.
- */
-// Code from https://github.com/google/quiver-dart/commit/52edc4baf37e99ff6a8f99c648b29b135fc0b880
-library polymer_expressions.src.globals;
-
-import 'dart:collection';
-import 'package:observe/observe.dart' show reflectable;
-
-/**
- * Returns an [Iterable] of [IndexedValue]s where the nth value holds the nth
- * element of [iterable] and its index.
- */
-Iterable<IndexedValue> enumerate(Iterable iterable) =>
-    new EnumerateIterable(iterable);
-
-@reflectable class IndexedValue<V> {
-  final int index;
-  final V value;
-
-  operator==(o) => o is IndexedValue && o.index == index && o.value == value;
-  int get hashCode => value.hashCode;
-  String toString() => '($index, $value)';
-
-  IndexedValue(this.index, this.value);
-}
-
-/**
- * An [Iterable] of [IndexedValue]s where the nth value holds the nth
- * element of [iterable] and its index. See [enumerate].
- */
-// This was inspired by MappedIterable internal to Dart collections.
-class EnumerateIterable<V> extends IterableBase<IndexedValue<V>> {
-  final Iterable<V> _iterable;
-
-  EnumerateIterable(this._iterable);
-
-  Iterator<IndexedValue<V>> get iterator =>
-      new EnumerateIterator<V>(_iterable.iterator);
-
-  // Length related functions are independent of the mapping.
-  int get length => _iterable.length;
-  bool get isEmpty => _iterable.isEmpty;
-
-  // Index based lookup can be done before transforming.
-  IndexedValue<V> get first => new IndexedValue<V>(0, _iterable.first);
-  IndexedValue<V> get last => new IndexedValue<V>(length - 1, _iterable.last);
-  IndexedValue<V> get single => new IndexedValue<V>(0, _iterable.single);
-  IndexedValue<V> elementAt(int index) =>
-      new IndexedValue<V>(index, _iterable.elementAt(index));
-}
-
-/** The [Iterator] returned by [EnumerateIterable.iterator]. */
-class EnumerateIterator<V> extends Iterator<IndexedValue<V>> {
-  final Iterator<V> _iterator;
-  int _index = 0;
-  IndexedValue<V> _current;
-
-  EnumerateIterator(this._iterator);
-
-  IndexedValue<V> get current => _current;
-
-  bool moveNext() {
-    if (_iterator.moveNext()) {
-      _current = new IndexedValue(_index++, _iterator.current);
-      return true;
-    }
-    _current = null;
-    return false;
-  }
-}
diff --git a/packages/polymer_expressions/lib/tokenizer.dart b/packages/polymer_expressions/lib/tokenizer.dart
deleted file mode 100644
index c8e5b13..0000000
--- a/packages/polymer_expressions/lib/tokenizer.dart
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.tokenizer;
-
-const int _TAB = 9;
-const int _LF = 10;
-const int _VTAB = 11;
-const int _FF = 12;
-const int _CR = 13;
-const int _SPACE = 32;
-const int _BANG = 33;
-const int _DQ = 34;
-const int _$ = 36;
-const int _PERCENT = 37;
-const int _AMPERSAND = 38;
-const int _SQ = 39;
-const int _OPEN_PAREN = 40;
-const int _CLOSE_PAREN = 41;
-const int _STAR = 42;
-const int _PLUS = 43;
-const int _COMMA = 44;
-const int _MINUS = 45;
-const int _PERIOD = 46;
-const int _SLASH = 47;
-const int _0 = 48;
-const int _9 = 57;
-const int _COLON = 58;
-const int _LT = 60;
-const int _EQ = 61;
-const int _GT = 62;
-const int _QUESTION = 63;
-const int _A = 65;
-const int _Z = 90;
-const int _OPEN_SQUARE_BRACKET = 91;
-const int _BACKSLASH = 92;
-const int _CLOSE_SQUARE_BRACKET = 93;
-const int _CARET = 94;
-const int _US = 95;
-const int _a = 97;
-const int _f = 102;
-const int _n = 110;
-const int _r = 114;
-const int _t = 116;
-const int _v = 118;
-const int _z = 122;
-const int _OPEN_CURLY_BRACKET = 123;
-const int _BAR = 124;
-const int _CLOSE_CURLY_BRACKET = 125;
-const int _NBSP = 160;
-
-const _OPERATORS = const [_PLUS, _MINUS, _STAR, _SLASH, _BANG, _AMPERSAND,
-                          _PERCENT, _LT, _EQ, _GT, _QUESTION, _CARET, _BAR];
-
-const _GROUPERS = const [_OPEN_PAREN, _CLOSE_PAREN,
-                         _OPEN_SQUARE_BRACKET, _CLOSE_SQUARE_BRACKET,
-                         _OPEN_CURLY_BRACKET, _CLOSE_CURLY_BRACKET];
-
-const _TWO_CHAR_OPS = const ['==', '!=', '<=', '>=', '||', '&&'];
-
-const KEYWORDS = const ['as', 'in', 'this'];
-
-const _PRECEDENCE = const {
-  '!':  0,
-  ':':  0,
-  ',':  0,
-  ')':  0,
-  ']':  0,
-  '}':  0, // ?
-  '?':  1,
-  '||': 2,
-  '&&': 3,
-  '|':  4,
-  '^':  5,
-  '&':  6,
-
-  // equality
-  '!=': 7,
-  '==': 7,
-  '!==': 7,
-  '===': 7,
-
-  // relational
-  '>=': 8,
-  '>':  8,
-  '<=': 8,
-  '<':  8,
-
-  // additive
-  '+':  9,
-  '-':  9,
-
-  // multiplicative
-  '%':  10,
-  '/':  10,
-  '*':  10,
-
-  // postfix
-  '(':  11,
-  '[':  11,
-  '.':  11,
-  '{': 11, //not sure this is correct
-};
-
-const POSTFIX_PRECEDENCE = 11;
-
-const int STRING_TOKEN = 1;
-const int IDENTIFIER_TOKEN = 2;
-const int DOT_TOKEN = 3;
-const int COMMA_TOKEN = 4;
-const int COLON_TOKEN = 5;
-const int INTEGER_TOKEN = 6;
-const int DECIMAL_TOKEN = 7;
-const int OPERATOR_TOKEN = 8;
-const int GROUPER_TOKEN = 9;
-const int KEYWORD_TOKEN = 10;
-
-bool isWhitespace(int next) => next == _SPACE || next == _TAB || next == _NBSP;
-
-bool isIdentifierOrKeywordStart(int next) => (_a <= next && next <= _z) ||
-    (_A <= next && next <= _Z) || next == _US || next == _$ || next > 127;
-
-bool isIdentifier(int next) => (_a <= next && next <= _z) ||
-    (_A <= next && next <= _Z) || (_0 <= next && next <= _9) ||
-    next == _US || next == _$ || next > 127;
-
-bool isQuote(int next) => next == _DQ || next == _SQ;
-
-bool isNumber(int next) => _0 <= next && next <= _9;
-
-bool isOperator(int next) => _OPERATORS.contains(next);
-
-bool isGrouper(int next) => _GROUPERS.contains(next);
-
-int escape(int c) {
-  switch (c) {
-    case _f: return _FF;
-    case _n: return _LF;
-    case _r: return _CR;
-    case _t: return _TAB;
-    case _v: return _VTAB;
-    default: return c;
-  }
-}
-
-class Token {
-  final int kind;
-  final String value;
-  final int precedence;
-
-  Token(this.kind, this.value, [this.precedence = 0]);
-
-  String toString() => "($kind, '$value')";
-}
-
-class Tokenizer {
-  final List<Token> _tokens = <Token>[];
-  final StringBuffer _sb = new StringBuffer();
-  final RuneIterator _iterator;
-
-  int _next;
-
-  Tokenizer(String input) : _iterator = new RuneIterator(input);
-
-  _advance() {
-    _next = _iterator.moveNext() ? _iterator.current : null;
-  }
-
-  List<Token> tokenize() {
-    _advance();
-    while(_next != null) {
-      if (isWhitespace(_next)) {
-        _advance();
-      } else if (isQuote(_next)) {
-        tokenizeString();
-      } else if (isIdentifierOrKeywordStart(_next)) {
-        tokenizeIdentifierOrKeyword();
-      } else if (isNumber(_next)) {
-        tokenizeNumber();
-      } else if (_next == _PERIOD) {
-        tokenizeDot();
-      } else if (_next == _COMMA) {
-        tokenizeComma();
-      } else if (_next == _COLON) {
-        tokenizeColon();
-      } else if (isOperator(_next)) {
-        tokenizeOperator();
-      } else if (isGrouper(_next)) {
-        tokenizeGrouper();
-      } else {
-        _advance();
-      }
-    }
-    return _tokens;
-  }
-
-  tokenizeString() {
-    int quoteChar = _next;
-    _advance();
-    while (_next != quoteChar) {
-      if (_next == null) throw new ParseException("unterminated string");
-      if (_next == _BACKSLASH) {
-        _advance();
-        if (_next == null) throw new ParseException("unterminated string");
-        _sb.writeCharCode(escape(_next));
-      } else {
-        _sb.writeCharCode(_next);
-      }
-      _advance();
-    }
-    _tokens.add(new Token(STRING_TOKEN, _sb.toString()));
-    _sb.clear();
-    _advance();
-  }
-
-  tokenizeIdentifierOrKeyword() {
-    while (_next != null && isIdentifier(_next)) {
-      _sb.writeCharCode(_next);
-      _advance();
-    }
-    var value = _sb.toString();
-    if (KEYWORDS.contains(value)) {
-      _tokens.add(new Token(KEYWORD_TOKEN, value));
-    } else {
-      _tokens.add(new Token(IDENTIFIER_TOKEN, value));
-    }
-    _sb.clear();
-  }
-
-  tokenizeNumber() {
-    while (_next != null && isNumber(_next)) {
-      _sb.writeCharCode(_next);
-      _advance();
-    }
-    if (_next == _PERIOD) {
-      tokenizeDot();
-    } else {
-      _tokens.add(new Token(INTEGER_TOKEN, _sb.toString()));
-      _sb.clear();
-    }
-  }
-
-  tokenizeDot() {
-    _advance();
-    if (isNumber(_next)) {
-      tokenizeFraction();
-    } else {
-      _tokens.add(new Token(DOT_TOKEN, '.', POSTFIX_PRECEDENCE));
-    }
-  }
-
-  tokenizeComma() {
-    _advance();
-    _tokens.add(new Token(COMMA_TOKEN, ','));
-  }
-
-  tokenizeColon() {
-    _advance();
-    _tokens.add(new Token(COLON_TOKEN, ':'));
-  }
-
-  tokenizeFraction() {
-    _sb.writeCharCode(_PERIOD);
-    while (_next != null && isNumber(_next)) {
-      _sb.writeCharCode(_next);
-      _advance();
-    }
-    _tokens.add(new Token(DECIMAL_TOKEN, _sb.toString()));
-    _sb.clear();
-  }
-
-  tokenizeOperator() {
-    int startChar = _next;
-    _advance();
-    var op;
-    // check for 2 character operators
-    if (isOperator(_next)) {
-      var op2 = new String.fromCharCodes([startChar, _next]);
-      if (_TWO_CHAR_OPS.contains(op2)) {
-        op = op2;
-        _advance();
-        // kind of hacky check for === and !===, could be better / more general
-        if (_next == _EQ && (startChar == _BANG || startChar == _EQ)) {
-          op = op2 + '=';
-          _advance();
-        }
-      } else {
-        op = new String.fromCharCode(startChar);
-      }
-    } else {
-      op = new String.fromCharCode(startChar);
-    }
-    _tokens.add(new Token(OPERATOR_TOKEN, op, _PRECEDENCE[op]));
-  }
-
-  tokenizeGrouper() {
-    var value = new String.fromCharCode(_next);
-    _tokens.add(new Token(GROUPER_TOKEN, value, _PRECEDENCE[value]));
-    _advance();
-  }
-}
-
-class ParseException implements Exception {
-  final String message;
-  ParseException(this.message);
-  String toString() => "ParseException: $message";
-}
diff --git a/packages/polymer_expressions/lib/visitor.dart b/packages/polymer_expressions/lib/visitor.dart
deleted file mode 100644
index 7bf8053..0000000
--- a/packages/polymer_expressions/lib/visitor.dart
+++ /dev/null
@@ -1,133 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library polymer_expressions.visitor;
-
-import 'expression.dart';
-
-abstract class Visitor {
-  visit(Expression s) => s.accept(this);
-  visitEmptyExpression(EmptyExpression e);
-  visitParenthesizedExpression(ParenthesizedExpression e);
-  visitGetter(Getter i);
-  visitIndex(Index i);
-  visitInvoke(Invoke i);
-  visitLiteral(Literal l);
-  visitListLiteral(ListLiteral l);
-  visitMapLiteral(MapLiteral l);
-  visitMapLiteralEntry(MapLiteralEntry l);
-  visitIdentifier(Identifier i);
-  visitBinaryOperator(BinaryOperator o);
-  visitUnaryOperator(UnaryOperator o);
-  visitTernaryOperator(TernaryOperator o);
-  visitInExpression(InExpression c);
-  visitAsExpression(AsExpression c);
-}
-
-class RecursiveVisitor extends Visitor {
-  preVisitExpression(Expression e) {}
-  visitExpression(Expression e) {}
-
-  visitEmptyExpression(EmptyExpression e) {
-    preVisitExpression(e);
-    visitExpression(e);
-  }
-
-  visitParenthesizedExpression(ParenthesizedExpression e) {
-    preVisitExpression(e);
-    visit(e.child);
-    visitExpression(e);
-  }
-
-  visitGetter(Getter i) {
-    preVisitExpression(i);
-    visit(i.receiver);
-    visitExpression(i);
-  }
-
-  visitIndex(Index i) {
-    preVisitExpression(i);
-    visit(i.receiver);
-    visit(i.argument);
-    visitExpression(i);
-  }
-
-  visitInvoke(Invoke i) {
-    preVisitExpression(i);
-    visit(i.receiver);
-    if (i.arguments != null) {
-      for (var a in i.arguments) {
-        visit(a);
-      }
-    }
-    visitExpression(i);
-  }
-
-  visitLiteral(Literal l) {
-    preVisitExpression(l);
-    visitExpression(l);
-  }
-
-  visitListLiteral(ListLiteral l) {
-    preVisitExpression(l);
-    for (var i in l.items) {
-      visit(i);
-    }
-    visitExpression(l);
-  }
-
-  visitMapLiteral(MapLiteral l) {
-    preVisitExpression(l);
-    for (var e in l.entries) {
-      visit(e);
-    }
-    visitExpression(l);
-  }
-
-  visitMapLiteralEntry(MapLiteralEntry e) {
-    preVisitExpression(e);
-    visit(e.key);
-    visit(e.entryValue);
-    visitExpression(e);
-  }
-
-  visitIdentifier(Identifier i) {
-    preVisitExpression(i);
-    visitExpression(i);
-  }
-
-  visitBinaryOperator(BinaryOperator o) {
-    preVisitExpression(o);
-    visit(o.left);
-    visit(o.right);
-    visitExpression(o);
-  }
-
-  visitUnaryOperator(UnaryOperator o) {
-    preVisitExpression(o);
-    visit(o.child);
-    visitExpression(o);
-  }
-
-  visitTernaryOperator(TernaryOperator o) {
-    preVisitExpression(o);
-    visit(o.condition);
-    visit(o.trueExpr);
-    visit(o.falseExpr);
-    visitExpression(o);
-  }
-
-  visitInExpression(InExpression c) {
-    preVisitExpression(c);
-    visit(c.left);
-    visit(c.right);
-    visitExpression(c);
-  }
-
-  visitAsExpression(AsExpression c) {
-    visit(c.left);
-    visit(c.right);
-    visitExpression(c);
-  }
-}
diff --git a/packages/polymer_expressions/pubspec.yaml b/packages/polymer_expressions/pubspec.yaml
deleted file mode 100644
index 5313ff3..0000000
--- a/packages/polymer_expressions/pubspec.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-name: polymer_expressions
-version: 0.13.1
-author: Polymer.dart Authors <web-ui-dev@dartlang.org>
-description: An expressive custom binding syntax for HTML templates
-homepage: http://www.dartlang.org/polymer-dart/
-dependencies:
-  browser: ">=0.10.0 <0.11.0"
-  observe: ">=0.11.0 <0.14.0"
-  template_binding: ">=0.13.0 <0.15.0"
-dev_dependencies:
-  unittest: ">=0.10.0 <0.11.0"
-  benchmark_harness: ">=1.0.0 <2.0.0"
-environment:
-  sdk: ">=1.2.0 <2.0.0"
diff --git a/packages/polymer_expressions/test/all_tests.dart b/packages/polymer_expressions/test/all_tests.dart
deleted file mode 100644
index dfe6a3a..0000000
--- a/packages/polymer_expressions/test/all_tests.dart
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library all_tests;
-
-import 'eval_test.dart' as eval;
-import 'parser_test.dart' as parser;
-import 'tokenizer_test.dart' as tokenizer;
-import 'visitor_test.dart' as visitor;
-
-main() {
-  eval.main();
-  parser.main();
-  tokenizer.main();
-  visitor.main();
-}
diff --git a/packages/polymer_expressions/test/bindings_test.dart b/packages/polymer_expressions/test/bindings_test.dart
deleted file mode 100644
index b067782..0000000
--- a/packages/polymer_expressions/test/bindings_test.dart
+++ /dev/null
@@ -1,307 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library bindings_test;
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:observe/observe.dart';
-import 'package:observe/mirrors_used.dart'; // make test smaller.
-import 'package:observe/src/dirty_check.dart' show dirtyCheckZone;
-import 'package:polymer_expressions/polymer_expressions.dart';
-import 'package:smoke/mirrors.dart' as smoke;
-import 'package:template_binding/template_binding.dart' show
-    TemplateBindExtension, templateBind;
-import 'package:unittest/html_config.dart';
-
-import 'package:unittest/unittest.dart';
-
-var testDiv;
-
-main() => dirtyCheckZone().run(() {
-  useHtmlConfiguration();
-  smoke.useMirrors();
-
-  group('bindings', () {
-    var stop = null;
-    setUp(() {
-      document.body.append(testDiv = new DivElement());
-    });
-
-    tearDown(() {
-      testDiv.remove();
-      testDiv = null;
-    });
-
-    test('should update binding when data changes', () {
-      var model = new NotifyModel();
-      var binding = new PolymerExpressions()
-          .prepareBinding('x', null, null)(model, null, false);
-      expect(binding.value, isNull);
-      model.x = "hi";
-      return new Future(() {
-        expect(binding.value, 'hi');
-      });
-    });
-
-    // regression test for issue 19296
-    test('should not throw when data changes', () {
-      var model = new NotifyModel();
-      testDiv.append(_createTemplateInstance(
-          '<template repeat="{{ i in x }}">{{ i }}</template>', model));
-
-      return new Future(() {
-        model.x = [1, 2, 3];
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text,'123');
-      });
-    });
-
-
-    test('should update text content when data changes', () {
-      var model = new NotifyModel('abcde');
-      testDiv.append(_createTemplateInstance('<span>{{x}}</span>', model));
-
-      var el;
-      return new Future(() {
-        el = testDiv.query("span");
-        expect(el.text, 'abcde');
-        expect(model.x, 'abcde');
-        model.x = '___';
-      }).then(_nextMicrotask).then((_) {
-        expect(model.x, '___');
-        expect(el.text, '___');
-      });
-    });
-
-    test('should log eval exceptions', () {
-      var model = new NotifyModel('abcde');
-      var completer = new Completer();
-      runZoned(() {
-        testDiv.append(_createTemplateInstance('<span>{{foo}}</span>', model));
-        return _nextMicrotask(null);
-      }, onError: (e) {
-        expect('$e', startsWith("Error evaluating expression 'foo':"));
-        completer.complete(true);
-      });
-      return completer.future;
-    });
-
-    test('detects changes to ObservableList', () {
-      var list = new ObservableList.from([1, 2, 3]);
-      var model = new NotifyModel(list);
-      testDiv.append(_createTemplateInstance('{{x[1]}}', model));
-
-      return new Future(() {
-        expect(testDiv.text, '2');
-        list[1] = 10;
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text, '10');
-        list[1] = 11;
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text, '11');
-        list[0] = 9;
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text, '11');
-        list.removeAt(0);
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text, '3');
-        list.add(90);
-        list.removeAt(0);
-      }).then(_nextMicrotask).then((_) {
-        expect(testDiv.text, '90');
-      });
-    });
-
-    // Regression tests for issue 18792.
-    for (var usePolymer in [true, false]) {
-      // We run these tests both with PolymerExpressions and with the default
-      // delegate to ensure the results are consistent. When possible, the
-      // expressions on these tests use syntax common to both delegates.
-      var name = usePolymer ? 'polymer-expressions' : 'default';
-      group('$name delegate', () {
-        // Use <option template repeat="{{y}}" value="{{}}">item {{}}
-        _initialSelectTest('{{y}}', '{{}}', usePolymer);
-        _updateSelectTest('{{y}}', '{{}}', usePolymer);
-        _detectKeyValueChanges(usePolymer);
-        if (usePolymer) _detectKeyValueChangesPolymerSyntax();
-        _cursorPositionTest(usePolymer);
-      });
-    }
-
-    group('polymer-expressions delegate, polymer syntax', () {
-        // Use <option template repeat="{{i in y}}" value="{{i}}">item {{i}}
-      _initialSelectTest('{{i in y}}', '{{i}}', true);
-      _updateSelectTest('{{i in y}}', '{{i}}', true);
-    });
-  });
-});
-
-
-_cursorPositionTest(bool usePolymer) {
-  test('should preserve the cursor position', () {
-    var model = new NotifyModel('abcde');
-    testDiv.append(_createTemplateInstance(
-        '<input id="i1" value={{x}}>', model, usePolymer: usePolymer));
-    var el;
-    return new Future(() {
-      el = testDiv.query("#i1");
-      var subscription = el.onInput.listen(expectAsync((_) {}, count: 1));
-      el.focus();
-
-      expect(el.value, 'abcde');
-      expect(model.x, 'abcde');
-
-      el.selectionStart = 3;
-      el.selectionEnd = 3;
-      expect(el.selectionStart, 3);
-      expect(el.selectionEnd, 3);
-
-      el.value = 'abc de';
-      // Updating the input value programmatically (even to the same value in
-      // Chrome) loses the selection position.
-      expect(el.selectionStart, 6);
-      expect(el.selectionEnd, 6);
-
-      el.selectionStart = 4;
-      el.selectionEnd = 4;
-
-      expect(model.x, 'abcde');
-      el.dispatchEvent(new Event('input'));
-      expect(model.x, 'abc de');
-      expect(el.value, 'abc de');
-
-      // But propagating observable values through reassign the value and
-      // selection will be preserved.
-      expect(el.selectionStart, 4);
-      expect(el.selectionEnd, 4);
-      subscription.cancel();
-    }).then(_nextMicrotask).then((_) {
-      // Nothing changes on the next micro task.
-      expect(el.selectionStart, 4);
-      expect(el.selectionEnd, 4);
-    }).then((_) => window.animationFrame).then((_) {
-      // ... or on the next animation frame.
-      expect(el.selectionStart, 4);
-      expect(el.selectionEnd, 4);
-    }).then(_afterTimeout).then((_) {
-      // ... or later.
-      expect(el.selectionStart, 4);
-      expect(el.selectionEnd, 4);
-    });
-  });
-}
-
-_initialSelectTest(String repeatExp, String valueExp, bool usePolymer) {
-  test('initial select value is set correctly', () {
-    var list = const ['a', 'b'];
-    var model = new NotifyModel('b', list);
-    testDiv.append(_createTemplateInstance('<select value="{{x}}">'
-        '<option template repeat="$repeatExp" value="$valueExp">item $valueExp'
-        '</option></select>',
-        model, usePolymer: usePolymer));
-
-    expect(testDiv.querySelector('select').value, 'b');
-    return new Future(() {
-      expect(model.x, 'b');
-      expect(testDiv.querySelector('select').value, 'b');
-    });
-  });
-}
-
-_updateSelectTest(String repeatExp, String valueExp, bool usePolymer) {
-  test('updates to select value propagate correctly', () {
-    var list = const ['a', 'b'];
-    var model = new NotifyModel('a', list);
-
-    testDiv.append(_createTemplateInstance('<select value="{{x}}">'
-        '<option template repeat="$repeatExp" value="$valueExp">item $valueExp'
-        '</option></select></template>', model, usePolymer: usePolymer));
-
-    expect(testDiv.querySelector('select').value, 'a');
-    return new Future(() {
-      expect(testDiv.querySelector('select').value, 'a');
-      model.x = 'b';
-    }).then(_nextMicrotask).then((_) {
-      expect(testDiv.querySelector('select').value, 'b');
-    });
-  });
-}
-
-_detectKeyValueChanges(bool usePolymer) {
-  test('detects changes to ObservableMap keys', () {
-    var map = new ObservableMap.from({'a': 1, 'b': 2});
-    var model = new NotifyModel(map);
-    testDiv.append(_createTemplateInstance(
-        '<template repeat="{{x.keys}}">{{}},</template>',
-        model, usePolymer: usePolymer));
-
-    return new Future(() {
-      expect(testDiv.text, 'a,b,');
-      map.remove('b');
-      map['c'] = 3;
-    }).then(_nextMicrotask).then((_) {
-      expect(testDiv.text, 'a,c,');
-      map['a'] = 4;
-    }).then(_nextMicrotask).then((_) {
-      expect(testDiv.text, 'a,c,');
-    });
-  });
-}
-
-// This test uses 'in', which is a polymer_expressions only feature.
-_detectKeyValueChangesPolymerSyntax() {
-  test('detects changes to ObservableMap values', () {
-    var map = new ObservableMap.from({'a': 1, 'b': 2});
-    var model = new NotifyModel(map);
-    testDiv.append(_createTemplateInstance(
-        '<template repeat="{{k in  x.keys}}">{{x[k]}},</template>', model));
-
-    return new Future(() {
-      expect(testDiv.text, '1,2,');
-      map.remove('b');
-      map['c'] = 3;
-    }).then(_nextMicrotask).then((_) {
-      expect(testDiv.text, '1,3,');
-      map['a'] = 4;
-    }).then(_nextMicrotask).then((_) {
-      expect(testDiv.text, '4,3,');
-    });
-  });
-}
-
-_createTemplateInstance(String templateBody, model, {bool usePolymer: true}) {
-  var tag = new Element.html('<template>$templateBody</template>',
-        treeSanitizer: _nullTreeSanitizer);
-  TemplateBindExtension.bootstrap(tag);
-  var template = templateBind(tag);
-  var delegate = usePolymer ? new PolymerExpressions() : null;
-  return template.createInstance(model, delegate);
-}
-
-_nextMicrotask(_) => new Future(() {});
-_afterTimeout(_) => new Future.delayed(new Duration(milliseconds: 30), () {});
-
-@reflectable
-class NotifyModel extends ChangeNotifier {
-  var _x;
-  var _y;
-  NotifyModel([this._x, this._y]);
-
-  get x => _x;
-  set x(value) {
-    _x = notifyPropertyChange(#x, _x, value);
-  }
-
-  get y => _y;
-  set y(value) {
-    _y = notifyPropertyChange(#y, _y, value);
-  }
-}
-
-class _NullTreeSanitizer implements NodeTreeSanitizer {
-  void sanitizeTree(Node node) {}
-}
-final _nullTreeSanitizer = new _NullTreeSanitizer();
diff --git a/packages/polymer_expressions/test/bindings_test.html b/packages/polymer_expressions/test/bindings_test.html
deleted file mode 100644
index 6461682..0000000
--- a/packages/polymer_expressions/test/bindings_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="dart.unittest" content="full-stack-traces">
-  <title> bindings_test </title>
-  <style>
-     .unittest-table { font-family:monospace; border:1px; }
-     .unittest-pass { background: #6b3;}
-     .unittest-fail { background: #d55;}
-     .unittest-error { background: #a11;}
-  </style>
-  <script src="/packages/web_components/platform.concat.js"></script>
-  <script src="/packages/template_binding/js/observe.js"></script>
-  <script src="/packages/template_binding/js/node_bind.js"></script>
-  <script src="/packages/template_binding/js/microtask.js"></script>
-  <script src="/packages/template_binding/js/patches_mdv.js"></script>
-  <script src="/packages/web_components/dart_support.js"></script>
-</head>
-<body>
-  <h1> Running template_binding_test </h1>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="bindings_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
-</body>
-</html>
diff --git a/packages/polymer_expressions/test/eval_test.dart b/packages/polymer_expressions/test/eval_test.dart
deleted file mode 100644
index c2dbdca..0000000
--- a/packages/polymer_expressions/test/eval_test.dart
+++ /dev/null
@@ -1,466 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library eval_test;
-
-import 'dart:async';
-
-// Import mirrors to cause all mirrors to be retained by dart2js.
-// The tests reflect on LinkedHashMap.length and String.length.
-import 'dart:mirrors';
-
-import 'package:polymer_expressions/eval.dart';
-import 'package:polymer_expressions/filter.dart';
-import 'package:polymer_expressions/parser.dart';
-import 'package:unittest/unittest.dart';
-import 'package:observe/observe.dart';
-import 'package:observe/mirrors_used.dart'; // make test smaller.
-
-main() {
-  reflectClass(Object); // suppress unused import warning
-
-  group('eval', () {
-    test('should return the model for an empty expression', () {
-      expectEval('', 'model', 'model');
-    });
-
-    test('should handle the "this" keyword', () {
-      expectEval('this', 'model', 'model');
-      expectEval('this.name', 'foo', new Foo(name: 'foo'));
-      expectEval('this["a"]', 'x', {'a': 'x'});
-    });
-
-    test('should return a literal int', () {
-      expectEval('1', 1);
-      expectEval('+1', 1);
-      expectEval('-1', -1);
-    });
-
-    test('should return a literal double', () {
-      expectEval('1.2', 1.2);
-      expectEval('+1.2', 1.2);
-      expectEval('-1.2', -1.2);
-    });
-
-    test('should return a literal string', () {
-      expectEval('"hello"', "hello");
-      expectEval("'hello'", "hello");
-    });
-
-    test('should return a literal boolean', () {
-      expectEval('true', true);
-      expectEval('false', false);
-    });
-
-    test('should return a literal null', () {
-      expectEval('null', null);
-    });
-
-    test('should return a literal list', () {
-      expectEval('[1, 2, 3]', equals([1, 2, 3]));
-    });
-
-    test('should return a literal map', () {
-      expectEval('{"a": 1}', equals(new Map.from({'a': 1})));
-      expectEval('{"a": 1}', containsPair('a', 1));
-    });
-
-    test('should call methods on a literal map', () {
-      expectEval('{"a": 1}.length', 1);
-    });
-
-    test('should evaluate unary operators', () {
-      expectEval('+a', 2, null, {'a': 2});
-      expectEval('-a', -2, null, {'a': 2});
-      expectEval('!a', false, null, {'a': true});
-    });
-
-    test('should evaluate binary operators', () {
-      expectEval('1 + 2', 3);
-      expectEval('2 - 1', 1);
-      expectEval('4 / 2', 2);
-      expectEval('2 * 3', 6);
-      expectEval('5 % 2', 1);
-      expectEval('5 % -2', 1);
-      expectEval('-5 % 2', 1);
-
-      expectEval('1 == 1', true);
-      expectEval('1 == 2', false);
-      expectEval('1 == null', false);
-      expectEval('1 != 1', false);
-      expectEval('1 != 2', true);
-      expectEval('1 != null', true);
-
-      var x = {};
-      var y = {};
-      expectEval('x === y', true, null, {'x': x, 'y': x});
-      expectEval('x !== y', false, null, {'x': x, 'y': x});
-      expectEval('x === y', false, null, {'x': x, 'y': y});
-      expectEval('x !== y', true, null, {'x': x, 'y': y});
-
-      expectEval('1 > 1', false);
-      expectEval('1 > 2', false);
-      expectEval('2 > 1', true);
-      expectEval('1 >= 1', true);
-      expectEval('1 >= 2', false);
-      expectEval('2 >= 1', true);
-      expectEval('1 < 1', false);
-      expectEval('1 < 2', true);
-      expectEval('2 < 1', false);
-      expectEval('1 <= 1', true);
-      expectEval('1 <= 2', true);
-      expectEval('2 <= 1', false);
-
-      expectEval('true || true', true);
-      expectEval('true || false', true);
-      expectEval('false || true', true);
-      expectEval('false || false', false);
-
-      expectEval('true && true', true);
-      expectEval('true && false', false);
-      expectEval('false && true', false);
-      expectEval('false && false', false);
-    });
-
-    test('should evaulate ternary operators', () {
-      expectEval('true ? 1 : 2', 1);
-      expectEval('false ? 1 : 2', 2);
-      expectEval('true ? true ? 1 : 2 : 3', 1);
-      expectEval('true ? false ? 1 : 2 : 3', 2);
-      expectEval('false ? true ? 1 : 2 : 3', 3);
-      expectEval('false ? 1 : true ? 2 : 3', 2);
-      expectEval('false ? 1 : false ? 2 : 3', 3);
-      expectEval('null ? 1 : 2', 2);
-      // TODO(justinfagnani): re-enable and check for an EvalError when
-      // we implement the final bool conversion rules and this expression
-      // throws in both checked and unchecked mode
-//      expect(() => eval(parse('42 ? 1 : 2'), null), throws);
-    });
-
-    test('should invoke a method on the model', () {
-      var foo = new Foo(name: 'foo', age: 2);
-      expectEval('x()', foo.x(), foo);
-      expectEval('name', foo.name, foo);
-    });
-
-    test('should invoke chained methods', () {
-      var foo = new Foo(name: 'foo', age: 2);
-      expectEval('name.length', foo.name.length, foo);
-      expectEval('x().toString()', foo.x().toString(), foo);
-      expectEval('name.substring(2)', foo.name.substring(2), foo);
-      expectEval('a()()', 1, null, {'a': () => () => 1});
-    });
-
-    test('should invoke a top-level function', () {
-      expectEval('x()', 42, null, {'x': () => 42});
-      expectEval('x(5)', 5, null, {'x': (i) => i});
-      expectEval('y(5, 10)', 50, null, {'y': (i, j) => i * j});
-    });
-
-    test('should give precedence to top-level functions over methods', () {
-      var foo = new Foo(name: 'foo', age: 2);
-      expectEval('x()', 42, foo, {'x': () => 42});
-    });
-
-    test('should invoke the [] operator', () {
-      var map = {'a': 1, 'b': 2};
-      expectEval('map["a"]', 1, null, {'map': map});
-      expectEval('map["a"] + map["b"]', 3, null, {'map': map});
-    });
-
-    test('should call a filter', () {
-      var topLevel = {
-        'a': 'foo',
-        'uppercase': (s) => s.toUpperCase(),
-      };
-      expectEval('a | uppercase', 'FOO', null, topLevel);
-    });
-
-    test('should call a transformer', () {
-      var topLevel = {
-        'a': '42',
-        'parseInt': parseInt,
-        'add': add,
-      };
-      expectEval('a | parseInt()', 42, null, topLevel);
-      expectEval('a | parseInt(8)', 34, null, topLevel);
-      expectEval('a | parseInt() | add(10)', 52, null, topLevel);
-    });
-
-    test('should filter a list', () {
-      expectEval('chars1 | filteredList', ['a', 'b'], new WordElement());
-    });
-
-    test('should return null if the receiver of a method is null', () {
-      expectEval('a.b', null, null, {'a': null});
-      expectEval('a.b()', null, null, {'a': null});
-    });
-
-    test('should return null if null is invoked', () {
-      expectEval('a()', null, null, {'a': null});
-    });
-
-    test('should return null if an operand is null', () {
-      expectEval('a + b', null, null, {'a': null, 'b': null});
-      expectEval('+a', null, null, {'a': null});
-    });
-
-    test('should treat null as false', () {
-      expectEval('!null', true);
-      expectEval('true && null', false);
-      expectEval('null || false', false);
-
-      expectEval('!a', true, null, {'a': null});
-
-      expectEval('a && b', false, null, {'a': null, 'b': true});
-      expectEval('a && b', false, null, {'a': true, 'b': null});
-      expectEval('a && b', false, null, {'a': null, 'b': false});
-      expectEval('a && b', false, null, {'a': false, 'b': null});
-      expectEval('a && b', false, null, {'a': null, 'b': null});
-
-      expectEval('a || b', true, null, {'a': null, 'b': true});
-      expectEval('a || b', true, null, {'a': true, 'b': null});
-      expectEval('a || b', false, null, {'a': null, 'b': false});
-      expectEval('a || b', false, null, {'a': false, 'b': null});
-      expectEval('a || b', false, null, {'a': null, 'b': null});
-    });
-
-    test('should not evaluate "in" expressions', () {
-      expect(() => eval(parse('item in items'), null), throws);
-    });
-
-  });
-
-  group('assign', () {
-
-    test('should assign a single identifier', () {
-      var foo = new Foo(name: 'a');
-      assign(parse('name'), 'b', new Scope(model: foo));
-      expect(foo.name, 'b');
-    });
-
-    test('should assign a sub-property', () {
-      var child = new Foo(name: 'child');
-      var parent = new Foo(child: child);
-      assign(parse('child.name'), 'Joe', new Scope(model: parent));
-      expect(parent.child.name, 'Joe');
-    });
-
-    test('should assign an index', () {
-      var foo = new Foo(items: [1, 2, 3]);
-      assign(parse('items[0]'), 4, new Scope(model: foo));
-      expect(foo.items[0], 4);
-      assign(parse('items[a]'), 5, new Scope(model: foo, variables: {'a': 0}));
-      expect(foo.items[0], 5);
-    });
-
-    test('should assign with a function call subexpression', () {
-      var child = new Foo();
-      var foo = new Foo(items: [1, 2, 3], child: child);
-      assign(parse('getChild().name'), 'child', new Scope(model: foo));
-      expect(child.name, 'child');
-    });
-
-    test('should assign through transformers', () {
-      var foo = new Foo(name: '42', age: 32);
-      var globals = {
-        'a': '42',
-        'parseInt': parseInt,
-        'add': add,
-      };
-      var scope = new Scope(model: foo, variables: globals);
-      assign(parse('age | add(7)'), 29, scope);
-      expect(foo.age, 22);
-      assign(parse('name | parseInt() | add(10)'), 29, scope);
-      expect(foo.name, '19');
-    });
-
-    test('should not throw on assignments to properties on null', () {
-      assign(parse('name'), 'b', new Scope(model: null));
-    });
-
-    test('should throw on assignments to non-assignable expressions', () {
-      var foo = new Foo(name: 'a');
-      var scope = new Scope(model: foo);
-      expect(() => assign(parse('name + 1'), 1, scope),
-          throwsA(new isInstanceOf<EvalException>()));
-      expect(() => assign(parse('toString()'), 1, scope),
-          throwsA(new isInstanceOf<EvalException>()));
-      expect(() => assign(parse('name | filter'), 1, scope),
-          throwsA(new isInstanceOf<EvalException>()));
-    });
-
-    test('should not throw on assignments to non-assignable expressions if '
-        'checkAssignability is false', () {
-      var foo = new Foo(name: 'a');
-      var scope = new Scope(model: foo);
-      expect(
-          assign(parse('name + 1'), 1, scope, checkAssignability: false),
-          null);
-      expect(
-          assign(parse('toString()'), 1, scope, checkAssignability: false),
-          null);
-      expect(
-          assign(parse('name | filter'), 1, scope, checkAssignability: false),
-          null);
-    });
-
-  });
-
-  group('scope', () {
-    test('should return fields on the model', () {
-      var foo = new Foo(name: 'a', age: 1);
-      var scope = new Scope(model: foo);
-      expect(scope['name'], 'a');
-      expect(scope['age'], 1);
-    });
-
-    test('should throw for undefined names', () {
-      var scope = new Scope();
-      expect(() => scope['a'], throwsException);
-    });
-
-    test('should return variables', () {
-      var scope = new Scope(variables: {'a': 'A'});
-      expect(scope['a'], 'A');
-    });
-
-    test("should a field from the parent's model", () {
-      var parent = new Scope(variables: {'a': 'A', 'b': 'B'});
-      var child = parent.childScope('a', 'a');
-      expect(child['a'], 'a');
-      expect(parent['a'], 'A');
-      expect(child['b'], 'B');
-    });
-
-  });
-
-  group('observe', () {
-    test('should observe an identifier', () {
-      var foo = new Foo(name: 'foo');
-      return expectObserve('name',
-          model: foo,
-          beforeMatcher: 'foo',
-          mutate: () {
-            foo.name = 'fooz';
-          },
-          afterMatcher: 'fooz'
-      );
-    });
-
-    test('should observe an invocation', () {
-      var foo = new Foo(name: 'foo');
-      return expectObserve('foo.name',
-          variables: {'foo': foo},
-          beforeMatcher: 'foo',
-          mutate: () {
-            foo.name = 'fooz';
-          },
-          afterMatcher: 'fooz'
-      );
-    });
-
-    test('should observe map access', () {
-      var foo = toObservable({'one': 'one', 'two': 'two'});
-      return expectObserve('foo["one"]',
-          variables: {'foo': foo},
-          beforeMatcher: 'one',
-          mutate: () {
-            foo['one'] = '1';
-          },
-          afterMatcher: '1'
-      );
-    });
-
-  });
-
-}
-
-@reflectable
-class Foo extends ChangeNotifier {
-  String _name;
-  String get name => _name;
-  void set name(String n) {
-    _name = notifyPropertyChange(#name, _name, n);
-  }
-
-  int age;
-  Foo child;
-  List<int> items;
-
-  Foo({name, this.age, this.child, this.items}) : _name = name;
-
-  int x() => age * age;
-
-  getChild() => child;
-
-  filter(i) => i;
-}
-
-@reflectable
-class ListHolder {
-  List items;
-  ListHolder(this.items);
-}
-
-parseInt([int radix = 10]) => new IntToString(radix: radix);
-
-class IntToString extends Transformer<int, String> {
-  final int radix;
-  IntToString({this.radix: 10});
-  int forward(String s) => int.parse(s, radix: radix);
-  String reverse(int i) => '$i';
-}
-
-add(int i) => new Add(i);
-
-class Add extends Transformer<int, int> {
-  final int i;
-  Add(this.i);
-  int forward(int x) => x + i;
-  int reverse(int x) => x - i;
-}
-
-Object evalString(String s, [Object model, Map vars]) =>
-    eval(new Parser(s).parse(), new Scope(model: model, variables: vars));
-
-expectEval(String s, dynamic matcher, [Object model, Map vars = const {}]) {
-  var expr = new Parser(s).parse();
-  var scope = new Scope(model: model, variables: vars);
-  expect(eval(expr, scope), matcher, reason: s);
-
-  var observer = observe(expr, scope);
-  new Updater(scope).visit(observer);
-  expect(observer.currentValue, matcher, reason: s);
-}
-
-expectObserve(String s, {
-    Object model,
-    Map variables: const {},
-    dynamic beforeMatcher,
-    mutate(),
-    dynamic afterMatcher}) {
-
-  var scope = new Scope(model: model, variables: variables);
-  var observer = observe(new Parser(s).parse(), scope);
-  update(observer, scope);
-  expect(observer.currentValue, beforeMatcher);
-  var passed = false;
-  var future = observer.onUpdate.first.then((value) {
-    expect(value, afterMatcher);
-    expect(observer.currentValue, afterMatcher);
-    passed = true;
-  });
-  mutate();
-  // fail if we don't receive an update by the next event loop
-  return Future.wait([future, new Future(() {
-    expect(passed, true, reason: "Didn't receive a change notification on $s");
-  })]);
-}
-
-// Regression test from https://code.google.com/p/dart/issues/detail?id=13459
-class WordElement extends Observable {
-  @observable List chars1 = 'abcdefg'.split('');
-  @reflectable List filteredList(List original) => [original[0], original[1]];
-}
diff --git a/packages/polymer_expressions/test/globals_test.dart b/packages/polymer_expressions/test/globals_test.dart
deleted file mode 100644
index 5b14799..0000000
--- a/packages/polymer_expressions/test/globals_test.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:observe/observe.dart';
-import 'package:observe/mirrors_used.dart'; // make test smaller.
-import 'package:smoke/mirrors.dart' as smoke;
-import 'package:polymer_expressions/polymer_expressions.dart';
-import 'package:template_binding/template_binding.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-main() {
-  useHtmlConfiguration();
-  smoke.useMirrors();
-
-  var testDiv;
-  group('enumerate', () {
-    setUp(() {
-      testDiv = new Element.html('''
-          <div id="test">
-            <template bind>
-              <template repeat="{{entry in this | enumerate}}">
-                <div>Item {{ entry.index }} is {{ entry.value }}</div>
-              </template>
-            </template>
-          </div>''');
-      TemplateBindExtension.bootstrap(testDiv);
-      document.body.nodes.add(testDiv);
-    });
-
-    tearDown(() {
-      testDiv.remove();
-      testDiv = null;
-    });
-
-    test('should enumerate item and index', () {
-      templateBind(testDiv.query('template'))
-          ..bindingDelegate = new PolymerExpressions()
-          ..model = toObservable(
-              ['hello', 'from', 'polymer', 'expressions']);
-
-      return new Future(() {
-        expect(testDiv.queryAll('div').map((n) => n.text), [
-          'Item 0 is hello',
-          'Item 1 is from',
-          'Item 2 is polymer',
-          'Item 3 is expressions',
-        ]);
-      });
-    });
-
-    test('should update after changes', () {
-      var model = toObservable(
-              ['hello', 'from', 'polymer', 'expressions', 'a', 'b', 'c']);
-
-      templateBind(testDiv.query('template'))
-          ..bindingDelegate = new PolymerExpressions()
-          ..model = model;
-
-      return new Future(() {
-        expect(testDiv.queryAll('div').map((n) => n.text), [
-          'Item 0 is hello',
-          'Item 1 is from',
-          'Item 2 is polymer',
-          'Item 3 is expressions',
-          'Item 4 is a',
-          'Item 5 is b',
-          'Item 6 is c',
-        ]);
-
-        model.removeAt(1);
-        model[1] = 'world';
-        model[2] = '!';
-        model.insert(5, 'e');
-
-        return new Future(() {
-          expect(testDiv.queryAll('div').map((n) => n.text), [
-            'Item 0 is hello',
-            'Item 1 is world',
-            'Item 2 is !',
-            'Item 3 is a',
-            'Item 4 is b',
-            'Item 5 is e',
-            'Item 6 is c',
-          ]);
-        });
-      });
-    });
-  });
-}
diff --git a/packages/polymer_expressions/test/globals_test.html b/packages/polymer_expressions/test/globals_test.html
deleted file mode 100644
index bc1df9a..0000000
--- a/packages/polymer_expressions/test/globals_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="dart.unittest" content="full-stack-traces">
-  <title> globals_test </title>
-  <style>
-     .unittest-table { font-family:monospace; border:1px; }
-     .unittest-pass { background: #6b3;}
-     .unittest-fail { background: #d55;}
-     .unittest-error { background: #a11;}
-  </style>
-  <script src="/packages/web_components/platform.concat.js"></script>
-  <script src="/packages/template_binding/js/observe.js"></script>
-  <script src="/packages/template_binding/js/node_bind.js"></script>
-  <script src="/packages/template_binding/js/microtask.js"></script>
-  <script src="/packages/template_binding/js/patches_mdv.js"></script>
-  <script src="/packages/web_components/dart_support.js"></script>
-</head>
-<body>
-  <h1> Running template_binding_test </h1>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="globals_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
-</body>
-</html>
diff --git a/packages/polymer_expressions/test/parser_test.dart b/packages/polymer_expressions/test/parser_test.dart
deleted file mode 100644
index 8a7da1a..0000000
--- a/packages/polymer_expressions/test/parser_test.dart
+++ /dev/null
@@ -1,244 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library parser_test;
-
-import 'package:polymer_expressions/parser.dart';
-import 'package:polymer_expressions/expression.dart';
-import 'package:unittest/unittest.dart';
-
-expectParse(String s, Expression e) =>
-    expect(new Parser(s).parse(), e, reason: s);
-
-final Matcher throwsParseException =
-    throwsA(new isInstanceOf<ParseException>('ParseException'));
-
-main() {
-
-  group('parser', () {
-
-    test('should parse an empty expression', () {
-      expectParse('', empty());
-    });
-
-    test('should parse an identifier', () {
-      expectParse('abc', ident('abc'));
-    });
-
-    test('should parse a string literal', () {
-      expectParse('"abc"', literal('abc'));
-    });
-
-    test('should parse a bool literal', () {
-      expectParse('true', literal(true));
-      expectParse('false', literal(false));
-    });
-
-    test('should parse a null literal', () {
-      expectParse('null', literal(null));
-    });
-
-    test('should parse an integer literal', () {
-      expectParse('123', literal(123));
-    });
-
-    test('should parse a double literal', () {
-      expectParse('1.23', literal(1.23));
-    });
-
-    test('should parse a positive double literal', () {
-      expectParse('+1.23', literal(1.23));
-    });
-
-    test('should parse a negative double literal', () {
-      expectParse('-1.23', literal(-1.23));
-    });
-
-    test('should parse binary operators', () {
-      var operators = ['+', '-', '*', '/', '%', '^', '==', '!=', '>', '<',
-          '>=', '<=', '||', '&&', '&', '===', '!==', '|'];
-      for (var op in operators) {
-        expectParse('a $op b', binary(ident('a'), op, ident('b')));
-        expectParse('1 $op 2', binary(literal(1), op, literal(2)));
-        expectParse('this $op null', binary(ident('this'), op, literal(null)));
-      }
-    });
-
-    test('should thrown on unknown operators', () {
-      expect(() => parse('a ?? b'), throwsParseException);
-      expect(() => parse('a &&& b'), throwsParseException);
-      expect(() => parse('a ==== b'), throwsParseException);
-    });
-
-    test('should give multiply higher associativity than plus', () {
-      expectParse('a + b * c',
-          binary(ident('a'), '+', binary(ident('b'), '*', ident('c'))));
-      expectParse('a * b + c',
-          binary(binary(ident('a'), '*', ident('b')), '+', ident('c')));
-    });
-
-    test('should parse a dot operator', () {
-      expectParse('a.b', getter(ident('a'), 'b'));
-    });
-
-    test('should parse chained dot operators', () {
-      expectParse('a.b.c', getter(getter(ident('a'), 'b'), 'c'));
-    });
-
-    test('should give dot high associativity', () {
-      expectParse('a * b.c', binary(ident('a'), '*', getter(ident('b'), 'c')));
-    });
-
-    test('should parse a function with no arguments', () {
-      expectParse('a()', invoke(ident('a'), null, []));
-    });
-
-    test('should parse a single function argument', () {
-      expectParse('a(b)', invoke(ident('a'), null, [ident('b')]));
-    });
-
-    test('should parse a function call as a subexpression', () {
-      expectParse('a() + 1',
-          binary(
-              invoke(ident('a'), null, []),
-              '+',
-              literal(1)));
-    });
-
-    test('should parse multiple function arguments', () {
-      expectParse('a(b, c)',
-          invoke(ident('a'), null, [ident('b'), ident('c')]));
-    });
-
-    test('should parse nested function calls', () {
-      expectParse('a(b(c))', invoke(ident('a'), null, [
-          invoke(ident('b'), null, [ident('c')])]));
-    });
-
-    test('should parse an empty method call', () {
-      expectParse('a.b()', invoke(ident('a'), 'b', []));
-    });
-
-    test('should parse a method call with a single argument', () {
-      expectParse('a.b(c)', invoke(ident('a'), 'b', [ident('c')]));
-    });
-
-    test('should parse a method call with multiple arguments', () {
-      expectParse('a.b(c, d)',
-          invoke(ident('a'), 'b', [ident('c'), ident('d')]));
-    });
-
-    test('should parse chained method calls', () {
-      expectParse('a.b().c()', invoke(invoke(ident('a'), 'b', []), 'c', []));
-    });
-
-    test('should parse chained function calls', () {
-      expectParse('a()()', invoke(invoke(ident('a'), null, []), null, []));
-    });
-
-    test('should parse parenthesized expression', () {
-      expectParse('(a)', paren(ident('a')));
-      expectParse('(( 3 * ((1 + 2)) ))', paren(paren(
-          binary(literal(3), '*', paren(paren(
-              binary(literal(1), '+', literal(2))))))));
-    });
-
-    test('should parse an index operator', () {
-      expectParse('a[b]', index(ident('a'), ident('b')));
-      expectParse('a.b[c]', index(getter(ident('a'), 'b'), ident('c')));
-    });
-
-    test('should parse chained index operators', () {
-      expectParse('a[][]', index(index(ident('a'), null), null));
-    });
-
-    test('should parse multiple index operators', () {
-      expectParse('a[b] + c[d]', binary(
-          index(ident('a'), ident('b')),
-          '+',
-          index(ident('c'), ident('d'))));
-    });
-
-    test('should parse ternary operators', () {
-      expectParse('a ? b : c', ternary(ident('a'), ident('b'), ident('c')));
-      expectParse('a.a ? b.a : c.a', ternary(getter(ident('a'), 'a'),
-          getter(ident('b'), 'a'), getter(ident('c'), 'a')));
-      expect(() => parse('a + 1 ? b + 1 :: c.d + 3'), throwsParseException);
-    });
-
-    test('ternary operators have lowest associativity', () {
-      expectParse('a == b ? c + d : e - f', ternary(
-            binary(ident('a'), '==', ident('b')),
-            binary(ident('c'), '+', ident('d')),
-            binary(ident('e'), '-', ident('f'))));
-
-      expectParse('a.x == b.y ? c + d : e - f', ternary(
-            binary(getter(ident('a'), 'x'), '==', getter(ident('b'), 'y')),
-            binary(ident('c'), '+', ident('d')),
-            binary(ident('e'), '-', ident('f'))));
-
-      expectParse('a.x == b.y ? c + d : e - f', ternary(
-            binary(getter(ident('a'), 'x'), '==', getter(ident('b'), 'y')),
-            binary(ident('c'), '+', ident('d')),
-            binary(ident('e'), '-', ident('f'))));
-    });
-
-    test('should parse a filter chain', () {
-      expectParse('a | b | c', binary(binary(ident('a'), '|', ident('b')),
-          '|', ident('c')));
-    });
-
-    test('should parse "in" expression', () {
-      expectParse('a in b', inExpr(ident('a'), ident('b')));
-      expectParse('a in b.c',
-          inExpr(ident('a'), getter(ident('b'), 'c')));
-      expectParse('a in b + c',
-          inExpr(ident('a'), binary(ident('b'), '+', ident('c'))));
-    });
-
-    test('should reject comprehension with non-assignable left expression', () {
-      expect(() => parse('a + 1 in b'), throwsParseException);
-    });
-
-    test('should parse "as" expressions', () {
-      expectParse('a as b', asExpr(ident('a'), ident('b')));
-    });
-
-    skip_test('should reject keywords as identifiers', () {
-      expect(() => parse('a.in'), throwsParseException);
-      expect(() => parse('a.as'), throwsParseException);
-      expect(() => parse('a.this'), throwsParseException);
-    });
-
-    test('should parse map literals', () {
-      expectParse("{'a': 1}",
-          mapLiteral([mapLiteralEntry(literal('a'), literal(1))]));
-      expectParse("{'a': 1, 'b': 2 + 3}",
-          mapLiteral([
-              mapLiteralEntry(literal('a'), literal(1)),
-              mapLiteralEntry(literal('b'),
-                  binary(literal(2), '+', literal(3)))]));
-      expectParse("{'a': foo()}",
-          mapLiteral([mapLiteralEntry(
-              literal('a'), invoke(ident('foo'), null, []))]));
-      expectParse("{'a': foo('a')}",
-          mapLiteral([mapLiteralEntry(
-              literal('a'), invoke(ident('foo'), null, [literal('a')]))]));
-    });
-
-    test('should parse map literals with method calls', () {
-      expectParse("{'a': 1}.length",
-          getter(mapLiteral([mapLiteralEntry(literal('a'), literal(1))]),
-              'length'));
-    });
-
-    test('should parse list literals', () {
-      expectParse('[1, "a", b]',
-          listLiteral([literal(1), literal('a'), ident('b')]));
-      expectParse('[[1, 2], [3, 4]]',
-          listLiteral([listLiteral([literal(1), literal(2)]),
-                       listLiteral([literal(3), literal(4)])]));
-    });
-  });
-}
diff --git a/packages/polymer_expressions/test/syntax_test.dart b/packages/polymer_expressions/test/syntax_test.dart
deleted file mode 100644
index d4f8d9e..0000000
--- a/packages/polymer_expressions/test/syntax_test.dart
+++ /dev/null
@@ -1,609 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-import 'dart:html';
-
-import 'package:observe/observe.dart';
-import 'package:observe/mirrors_used.dart'; // make test smaller.
-import 'package:polymer_expressions/polymer_expressions.dart';
-import 'package:polymer_expressions/eval.dart';
-import 'package:template_binding/template_binding.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
-import 'package:smoke/mirrors.dart' as smoke;
-
-class TestScopeFactory implements ScopeFactory {
-  int scopeCount = 0;
-
-  modelScope({Object model, Map<String, Object> variables}) {
-    scopeCount++;
-    return new Scope(model: model, variables: variables);
-  }
-
-  childScope(Scope parent, String name, Object value) {
-    scopeCount++;
-    return parent.childScope(name, value);
-  }
-}
-
-main() {
-  useHtmlConfiguration();
-  smoke.useMirrors();
-
-  group('PolymerExpressions', () {
-    DivElement testDiv;
-    TestScopeFactory testScopeFactory;
-
-    setUp(() {
-      document.body.append(testDiv = new DivElement());
-      testScopeFactory = new TestScopeFactory();
-    });
-
-    tearDown(() {
-      testDiv.children.clear();
-      testDiv = null;
-    });
-
-    Future<Element> setUpTest(String html, {model, Map globals}) {
-      var tag = new Element.html(html,
-          treeSanitizer: new NullNodeTreeSanitizer());
-
-      // make sure templates behave in the polyfill
-      TemplateBindExtension.bootstrap(tag);
-
-      templateBind(tag)
-        ..bindingDelegate = new PolymerExpressions(globals: globals,
-            scopeFactory: testScopeFactory)
-        ..model = model;
-      testDiv.children.clear();
-      testDiv.append(tag);
-      return waitForChange(testDiv);
-    }
-
-    group('scope creation', () {
-      // These tests are sensitive to some internals of the implementation that
-      // might not be visible to applications, but are useful for verifying that
-      // that we're not creating too many Scopes.
-
-      // The reason that we create two Scopes in the cases with one binding is
-      // that <template bind> has one scope for the context to evaluate the bind
-      // binding in, and another scope for the bindings inside the template.
-
-      // We could try to optimize the outer scope away in cases where the
-      // expression is empty, but there are a lot of special cases in the
-      // syntax code already.
-      test('should create one scope for a single binding', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, 'a');
-          expect(testScopeFactory.scopeCount, 1);
-        }));
-
-      test('should only create a single scope for two bindings', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-              <div>{{ data }}</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 3);
-          expect(testDiv.children[1].text, 'a');
-          expect(testDiv.children[2].text, 'a');
-          expect(testScopeFactory.scopeCount, 1);
-        }));
-
-      test('should create a new scope for a bind/as binding', () {
-        return setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-              <template bind="{{ data as a }}" id="inner">
-                <div>{{ a }}</div>
-                <div>{{ data }}</div>
-              </template>
-            </template>''',
-            model: new Model('foo'))
-        .then((_) {
-          expect(testDiv.children.length, 5);
-          expect(testDiv.children[1].text, 'foo');
-          expect(testDiv.children[3].text, 'foo');
-          expect(testDiv.children[4].text, 'foo');
-          expect(testScopeFactory.scopeCount, 2);
-        });
-      });
-
-      test('should create scopes for a repeat/in binding', () {
-        return setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-              <template repeat="{{ i in items }}" id="inner">
-                <div>{{ i }}</div>
-                <div>{{ data }}</div>
-              </template>
-            </template>''',
-            model: new Model('foo'), globals: {'items': ['a', 'b', 'c']})
-        .then((_) {
-          expect(testDiv.children.length, 9);
-          expect(testDiv.children[1].text, 'foo');
-          expect(testDiv.children[3].text, 'a');
-          expect(testDiv.children[4].text, 'foo');
-          expect(testDiv.children[5].text, 'b');
-          expect(testDiv.children[6].text, 'foo');
-          expect(testDiv.children[7].text, 'c');
-          expect(testDiv.children[8].text, 'foo');
-          // 1 scopes for <template bind>, 1 for each repeat
-          expect(testScopeFactory.scopeCount, 4);
-        });
-      });
-
-
-    });
-
-    group('with template bind', () {
-
-      test('should show a simple binding on the model', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, 'a');
-        }));
-
-      test('should handle an empty binding on the model', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ }}</div>
-            </template>''',
-            model: 'a')
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, 'a');
-        }));
-
-      test('should show a simple binding to a global', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ a }}</div>
-            </template>''',
-            globals: {'a': '123'})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, '123');
-        }));
-
-      test('should show an expression binding', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data + 'b' }}</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, 'ab');
-        }));
-
-      test('should handle an expression in the bind attribute', () =>
-        setUpTest('''
-            <template id="test" bind="{{ data }}">
-              <div>{{ this }}</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].text, 'a');
-        }));
-
-      test('should handle a nested template with an expression in the bind '
-          'attribute', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <template id="inner" bind="{{ data }}">
-                <div>{{ this }}</div>
-              </template>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 3);
-          expect(testDiv.children[2].text, 'a');
-        }));
-
-
-      test('should handle an "as" expression in the bind attribute', () =>
-        setUpTest('''
-            <template id="test" bind="{{ data as a }}">
-              <div>{{ data }}b</div>
-              <div>{{ a }}c</div>
-            </template>''',
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children.length, 3);
-          expect(testDiv.children[1].text, 'ab');
-          expect(testDiv.children[2].text, 'ac');
-        }));
-
-      // passes safari
-      test('should not resolve names in the outer template from within a nested'
-          ' template with a bind binding', () {
-        var completer = new Completer();
-        var bindingErrorHappened = false;
-        var templateRendered = false;
-        maybeComplete() {
-          if (bindingErrorHappened && templateRendered) {
-            completer.complete(true);
-          }
-        }
-        runZoned(() {
-          setUpTest('''
-              <template id="test" bind>
-                <div>{{ data }}</div>
-                <div>{{ b }}</div>
-                <template id="inner" bind="{{ b }}">
-                  <div>{{ data }}</div>
-                  <div>{{ b }}</div>
-                  <div>{{ this }}</div>
-                </template>
-              </template>''',
-              model: new Model('foo'), globals: {'b': 'bbb'})
-          .then((_) {
-            expect(testDiv.children[0].text, '');
-            expect(testDiv.children[1].text, 'foo');
-            expect(testDiv.children[2].text, 'bbb');
-            // Something very strage is happening in the template bindings
-            // polyfill, and the template is being stamped out, inside the
-            // template tag (which shouldn't happen), and outside the template
-            //expect(testDiv.children[3].text, '');
-            expect(testDiv.children[3].tagName.toLowerCase(), 'template');
-            expect(testDiv.children[4].text, '');
-            expect(testDiv.children[5].text, 'bbb');
-            expect(testDiv.children[6].text, 'bbb');
-            templateRendered = true;
-            maybeComplete();
-          });
-        }, onError: (e, s) {
-          expect('$e', contains('data'));
-          bindingErrorHappened = true;
-          maybeComplete();
-        });
-        return completer.future;
-      });
-
-      // passes safari
-      test('should shadow names in the outer template from within a nested '
-          'template', () =>
-          setUpTest('''
-            <template id="test" bind>
-              <div>{{ a }}</div>
-              <div>{{ b }}</div>
-              <template bind="{{ b as a }}">
-                <div>{{ a }}</div>
-                <div>{{ b }}</div>
-              </template>
-            </template>''',
-            globals: {'a': 'aaa', 'b': 'bbb'})
-        .then((_) {
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].text, 'aaa');
-          expect(testDiv.children[2].text, 'bbb');
-          expect(testDiv.children[3].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[4].text, 'bbb');
-          expect(testDiv.children[5].text, 'bbb');
-        }));
-
-    });
-
-    group('with template repeat', () {
-
-      // passes safari
-      test('should not resolve names in the outer template from within a nested'
-          ' template with a repeat binding', () {
-        var completer = new Completer();
-        var bindingErrorHappened = false;
-        var templateRendered = false;
-        maybeComplete() {
-          if (bindingErrorHappened && templateRendered) {
-            completer.complete(true);
-          }
-        }
-        runZoned(() {
-          setUpTest('''
-              <template id="test" bind>
-                <div>{{ data }}</div>
-                <template repeat="{{ items }}">
-                  <div>{{ }}{{ data }}</div>
-                </template>
-              </template>''',
-              globals: {'items': [1, 2, 3]},
-              model: new Model('a'))
-          .then((_) {
-            expect(testDiv.children[0].text, '');
-            expect(testDiv.children[1].text, 'a');
-            expect(testDiv.children[2].tagName.toLowerCase(), 'template');
-            expect(testDiv.children[3].text, '1');
-            expect(testDiv.children[4].text, '2');
-            expect(testDiv.children[5].text, '3');
-            templateRendered = true;
-            maybeComplete();
-          });
-        }, onError: (e, s) {
-          expect('$e', contains('data'));
-          bindingErrorHappened = true;
-          maybeComplete();
-        });
-        return completer.future;
-      });
-
-      test('should handle repeat/in bindings', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-              <template repeat="{{ item in items }}">
-                <div>{{ item }}{{ data }}</div>
-              </template>
-            </template>''',
-            globals: {'items': [1, 2, 3]},
-            model: new Model('a'))
-        .then((_) {
-          // expect 6 children: two templates, a div and three instances
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].text, 'a');
-          expect(testDiv.children[2].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[3].text, '1a');
-          expect(testDiv.children[4].text, '2a');
-          expect(testDiv.children[5].text, '3a');
-//          expect(testDiv.children.map((c) => c.text),
-//              ['', 'a', '', '1a', '2a', '3a']);
-        }));
-
-      test('should observe changes to lists in repeat bindings', () {
-        var items = new ObservableList.from([1, 2, 3]);
-        return setUpTest('''
-            <template id="test" bind>
-              <template repeat="{{ items }}">
-                <div>{{ }}</div>
-              </template>
-            </template>''',
-            globals: {'items': items},
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[2].text, '1');
-          expect(testDiv.children[3].text, '2');
-          expect(testDiv.children[4].text, '3');
-//          expect(testDiv.children.map((c) => c.text),
-//              ['', '', '1', '2', '3']);
-          items.add(4);
-          return waitForChange(testDiv);
-        }).then((_) {
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[2].text, '1');
-          expect(testDiv.children[3].text, '2');
-          expect(testDiv.children[4].text, '3');
-          expect(testDiv.children[5].text, '4');
-//          expect(testDiv.children.map((c) => c.text),
-//              ['', '', '1', '2', '3', '4']);
-        });
-      });
-
-      test('should observe changes to lists in repeat/in bindings', () {
-        var items = new ObservableList.from([1, 2, 3]);
-        return setUpTest('''
-            <template id="test" bind>
-              <template repeat="{{ item in items }}">
-                <div>{{ item }}</div>
-              </template>
-            </template>''',
-            globals: {'items': items},
-            model: new Model('a'))
-        .then((_) {
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[2].text, '1');
-          expect(testDiv.children[3].text, '2');
-          expect(testDiv.children[4].text, '3');
-//          expect(testDiv.children.map((c) => c.text),
-//              ['', '', '1', '2', '3']);
-          items.add(4);
-          return waitForChange(testDiv);
-        }).then((_) {
-          expect(testDiv.children[0].text, '');
-          expect(testDiv.children[1].tagName.toLowerCase(), 'template');
-          expect(testDiv.children[2].text, '1');
-          expect(testDiv.children[3].text, '2');
-          expect(testDiv.children[4].text, '3');
-          expect(testDiv.children[5].text, '4');
-//          expect(testDiv.children.map((c) => c.text),
-//              ['', '', '1', '2', '3', '4']);
-        });
-      });
-    });
-
-    group('with template if', () {
-
-      Future doTest(value, bool shouldRender) =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ data }}</div>
-              <template if="{{ show }}">
-                <div>{{ data }}</div>
-              </template>
-            </template>''',
-            globals: {'show': value},
-            model: new Model('a'))
-        .then((_) {
-          if (shouldRender) {
-            expect(testDiv.children.length, 4);
-            expect(testDiv.children[1].text, 'a');
-            expect(testDiv.children[3].text, 'a');
-          } else {
-            expect(testDiv.children.length, 3);
-            expect(testDiv.children[1].text, 'a');
-          }
-        });
-
-      test('should render for a true expression',
-          () => doTest(true, true));
-
-      test('should treat a non-null expression as truthy',
-          () => doTest('a', true));
-
-      test('should treat an empty list as truthy',
-          () => doTest([], true));
-
-      test('should handle a false expression',
-          () => doTest(false, false));
-
-      test('should treat null as falsey',
-          () => doTest(null, false));
-    });
-
-    group('error handling', () {
-
-      test('should silently handle bad variable names', () {
-        var completer = new Completer();
-        runZoned(() {
-          testDiv.nodes.add(new Element.html('''
-              <template id="test" bind>{{ foo }}</template>'''));
-          templateBind(query('#test'))
-              ..bindingDelegate = new PolymerExpressions()
-              ..model = [];
-          return new Future(() {});
-        }, onError: (e, s) {
-          expect('$e', contains('foo'));
-          completer.complete(true);
-        });
-        return completer.future;
-      });
-
-      test('should handle null collections in "in" expressions', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <template repeat="{{ item in items }}">
-                {{ item }}
-              </template>
-            </template>''',
-            globals: {'items': null})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[0].id, 'test');
-        }));
-
-    });
-
-    group('special bindings', () {
-
-      test('should handle class attributes with lists', ()  =>
-        setUpTest('''
-            <template id="test" bind>
-              <div class="{{ classes }}">
-            </template>''',
-            globals: {'classes': ['a', 'b']})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].attributes['class'], 'a b');
-          expect(testDiv.children[1].classes, ['a', 'b']);
-        }));
-
-      test('should handle class attributes with maps', ()  =>
-        setUpTest('''
-            <template id="test" bind>
-              <div class="{{ classes }}">
-            </template>''',
-            globals: {'classes': {'a': true, 'b': false, 'c': true}})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].attributes['class'], 'a c');
-          expect(testDiv.children[1].classes, ['a', 'c']);
-        }));
-
-      test('should handle style attributes with lists', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div style="{{ styles }}">
-            </template>''',
-            globals: {'styles': ['display: none', 'color: black']})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].attributes['style'],
-              'display: none;color: black');
-        }));
-
-      test('should handle style attributes with maps', ()  =>
-        setUpTest('''
-            <template id="test" bind>
-              <div style="{{ styles }}">
-            </template>''',
-            globals: {'styles': {'display': 'none', 'color': 'black'}})
-        .then((_) {
-          expect(testDiv.children.length, 2);
-          expect(testDiv.children[1].attributes['style'],
-              'display: none;color: black');
-        }));
-    });
-
-    group('regression tests', () {
-
-      test('should bind to literals', () =>
-        setUpTest('''
-            <template id="test" bind>
-              <div>{{ 123 }}</div>
-              <div>{{ 123.456 }}</div>
-              <div>{{ "abc" }}</div>
-              <div>{{ true }}</div>
-              <div>{{ null }}</div>
-            </template>''',
-            globals: {'items': null})
-        .then((_) {
-          expect(testDiv.children.length, 6);
-          expect(testDiv.children[1].text, '123');
-          expect(testDiv.children[2].text, '123.456');
-          expect(testDiv.children[3].text, 'abc');
-          expect(testDiv.children[4].text, 'true');
-          expect(testDiv.children[5].text, '');
-        }));
-
-      });
-
-  });
-}
-
-Future<Element> waitForChange(Element e) {
-  var completer = new Completer<Element>();
-  new MutationObserver((mutations, observer) {
-    observer.disconnect();
-    completer.complete(e);
-  }).observe(e, childList: true);
-  return completer.future.timeout(new Duration(seconds: 1));
-}
-
-@reflectable
-class Model extends ChangeNotifier {
-  String _data;
-
-  Model(this._data);
-
-  String get data => _data;
-
-  void set data(String value) {
-    _data = notifyPropertyChange(#data, _data, value);
-  }
-
-  String toString() => "Model(data: $_data)";
-}
-
-class NullNodeTreeSanitizer implements NodeTreeSanitizer {
-
-  @override
-  void sanitizeTree(Node node) {}
-}
\ No newline at end of file
diff --git a/packages/polymer_expressions/test/syntax_test.html b/packages/polymer_expressions/test/syntax_test.html
deleted file mode 100644
index d3cb518..0000000
--- a/packages/polymer_expressions/test/syntax_test.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="dart.unittest" content="full-stack-traces">
-  <title> syntax_test </title>
-  <style>
-     .unittest-table { font-family:monospace; border:1px; }
-     .unittest-pass { background: #6b3;}
-     .unittest-fail { background: #d55;}
-     .unittest-error { background: #a11;}
-  </style>
-  <script src="/packages/web_components/platform.concat.js"></script>
-  <script src="/packages/template_binding/js/observe.js"></script>
-  <script src="/packages/template_binding/js/node_bind.js"></script>
-  <script src="/packages/template_binding/js/microtask.js"></script>
-  <script src="/packages/template_binding/js/patches_mdv.js"></script>
-  <script src="/packages/web_components/dart_support.js"></script>
-</head>
-<body>
-  <h1> Running template_binding_test </h1>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="syntax_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
-</body>
-</html>
diff --git a/packages/polymer_expressions/test/tokenizer_test.dart b/packages/polymer_expressions/test/tokenizer_test.dart
deleted file mode 100644
index 9689b86..0000000
--- a/packages/polymer_expressions/test/tokenizer_test.dart
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library tokenizer_test;
-
-import 'package:polymer_expressions/tokenizer.dart';
-import 'package:unittest/unittest.dart';
-
-main() {
-
-  group('tokenizer', () {
-
-    test('should tokenize an empty expression', () {
-      expectTokens('', []);
-    });
-
-    test('should tokenize an identifier', () {
-      expectTokens('abc', [t(IDENTIFIER_TOKEN, 'abc')]);
-    });
-
-    test('should tokenize a double quoted String', () {
-      expectTokens('"abc"', [t(STRING_TOKEN, 'abc')]);
-    });
-
-    test('should tokenize a single quoted String', () {
-      expectTokens("'abc'", [t(STRING_TOKEN, 'abc')]);
-    });
-
-    test('should tokenize a String with escaping', () {
-      expectTokens('"a\\b\\\\c\\\'\\""', [t(STRING_TOKEN, 'ab\\c\'"')]);
-    });
-
-    test('should tokenize a dot operator', () {
-      expectTokens('a.b', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(DOT_TOKEN, '.'),
-          t(IDENTIFIER_TOKEN, 'b')]);
-    });
-
-    test('should tokenize a unary plus operator', () {
-      expectTokens('+a', [
-          t(OPERATOR_TOKEN, '+'),
-          t(IDENTIFIER_TOKEN, 'a')]);
-    });
-
-    test('should tokenize a binary plus operator', () {
-      expectTokens('a + b', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(OPERATOR_TOKEN, '+'),
-          t(IDENTIFIER_TOKEN, 'b')]);
-    });
-
-    test('should tokenize a logical and operator', () {
-      expectTokens('a && b', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(OPERATOR_TOKEN, '&&'),
-          t(IDENTIFIER_TOKEN, 'b')]);
-    });
-
-    test('should tokenize a ternary operator', () {
-      expectTokens('a ? b : c', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(OPERATOR_TOKEN, '?'),
-          t(IDENTIFIER_TOKEN, 'b'),
-          t(COLON_TOKEN, ':'),
-          t(IDENTIFIER_TOKEN, 'c')]);
-    });
-
-    test('should tokenize "in" expressions', () {
-      expectTokens('item in items', [
-          t(IDENTIFIER_TOKEN, 'item'),
-          t(KEYWORD_TOKEN, 'in'),
-          t(IDENTIFIER_TOKEN, 'items')]);
-    });
-
-    test('should takenize an "as" expression', () {
-      expectTokens('a as b', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(KEYWORD_TOKEN, 'as'),
-          t(IDENTIFIER_TOKEN, 'b')]);
-    });
-
-    test('should tokenize keywords', () {
-      expectTokens('in', [t(KEYWORD_TOKEN, 'in')]);
-      expectTokens('as', [t(KEYWORD_TOKEN, 'as')]);
-      expectTokens('this', [t(KEYWORD_TOKEN, 'this')]);
-    });
-
-    test('should tokenize groups', () {
-      expectTokens('a(b)[]{}', [
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(GROUPER_TOKEN, '('),
-          t(IDENTIFIER_TOKEN, 'b'),
-          t(GROUPER_TOKEN, ')'),
-          t(GROUPER_TOKEN, '['),
-          t(GROUPER_TOKEN, ']'),
-          t(GROUPER_TOKEN, '{'),
-          t(GROUPER_TOKEN, '}')]);
-    });
-
-    test('should tokenize argument lists', () {
-      expectTokens('(a, b)', [
-          t(GROUPER_TOKEN, '('),
-          t(IDENTIFIER_TOKEN, 'a'),
-          t(COMMA_TOKEN, ','),
-          t(IDENTIFIER_TOKEN, 'b'),
-          t(GROUPER_TOKEN, ')')]);
-    });
-
-    test('should tokenize maps', () {
-      expectTokens("{'a': b}", [
-          t(GROUPER_TOKEN, '{'),
-          t(STRING_TOKEN, 'a'),
-          t(COLON_TOKEN, ':'),
-          t(IDENTIFIER_TOKEN, 'b'),
-          t(GROUPER_TOKEN, '}')]);
-    });
-
-    test('should tokenize lists', () {
-      expectTokens("[1, 'a', b]", [
-          t(GROUPER_TOKEN, '['),
-          t(INTEGER_TOKEN, '1'),
-          t(COMMA_TOKEN, ','),
-          t(STRING_TOKEN, 'a'),
-          t(COMMA_TOKEN, ','),
-          t(IDENTIFIER_TOKEN, 'b'),
-          t(GROUPER_TOKEN, ']')]);
-    });
-
-    test('should tokenize integers', () {
-      expectTokens('123', [t(INTEGER_TOKEN, '123')]);
-      expectTokens('+123', [t(OPERATOR_TOKEN, '+'), t(INTEGER_TOKEN, '123')]);
-      expectTokens('-123', [t(OPERATOR_TOKEN, '-'), t(INTEGER_TOKEN, '123')]);
-    });
-
-    test('should tokenize decimals', () {
-      expectTokens('1.23', [t(DECIMAL_TOKEN, '1.23')]);
-      expectTokens('+1.23', [t(OPERATOR_TOKEN, '+'), t(DECIMAL_TOKEN, '1.23')]);
-      expectTokens('-1.23', [t(OPERATOR_TOKEN, '-'), t(DECIMAL_TOKEN, '1.23')]);
-    });
-
-    test('should tokenize booleans as identifiers', () {
-      expectTokens('true', [t(IDENTIFIER_TOKEN, 'true')]);
-      expectTokens('false', [t(IDENTIFIER_TOKEN, 'false')]);
-    });
-
-  });
-}
-
-TokenMatcher isToken(int index, String text) => new TokenMatcher(index, text);
-
-class TokenMatcher extends Matcher {
-  final int kind;
-  final String value;
-
-  TokenMatcher(this.kind, this.value);
-
-  bool matches(Token t, Map m) => t.kind == kind && t.value == value;
-
-  Description describe(Description d) => d.add('isToken($kind, $value) ');
-}
-
-expectTokens(String s, List<Token> expected) {
-  var tokens = new Tokenizer(s).tokenize();
-  var matchers = expected.map((t) => isToken(t.kind, t.value)).toList();
-  expect(tokens, matchList(matchers), reason: s);
-}
-
-Token t(int kind, String value) => new Token(kind, value);
-
-MatcherList matchList(List matchers) => new MatcherList(matchers);
-
-class MatcherList extends Matcher {
-  final List<Matcher> matchers;
-
-  MatcherList(this.matchers);
-
-  bool matches(List o, Map matchState) {
-    if (o.length != matchers.length) return false;
-    for (int i = 0; i < o.length; i++) {
-      var state = new Map();
-      if (!matchers[i].matches(o[i], state)) {
-        matchState.addAll({
-          'index': i,
-          'value': o[i],
-          'state': state,
-        });
-        return false;
-      }
-    }
-    return true;
-  }
-
-  Description describe(Description d) {
-    d.add('matches all: ');
-    matchers.forEach((m) => m.describe(d));
-  }
-
-  Description describeMismatch(item, Description mismatchDescription,
-      Map matchState, bool verbose) {
-    if (matchState != null) {
-      var index = matchState['index'];
-      var value = matchState['value'];
-      var state = matchState['state'];
-      var matcher = matchers[index];
-      mismatchDescription.add("Mismatch at index $index: ");
-      matcher.describeMismatch(value, mismatchDescription, state, verbose);
-    } else {
-      if (item.length != matchers.length) {
-        mismatchDescription.add('wrong lengths');
-      } else {
-        mismatchDescription.add('was ').addDescriptionOf(item);
-      }
-    }
-  }
-
-}
diff --git a/packages/polymer_expressions/test/visitor_test.dart b/packages/polymer_expressions/test/visitor_test.dart
deleted file mode 100644
index 66573b8..0000000
--- a/packages/polymer_expressions/test/visitor_test.dart
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library visitor_test;
-
-import 'package:polymer_expressions/parser.dart';
-import 'package:polymer_expressions/visitor.dart';
-import 'package:unittest/unittest.dart';
-
-main() {
-
-  group('visitor', () {
-
-    // regression test
-    test('should not infinitely recurse on parenthesized expressions', () {
-      var visitor = new TestVisitor();
-      var expr = new Parser('(1)').parse();
-      visitor.visit(expr);
-    });
-
-  });
-}
-
-class TestVisitor extends RecursiveVisitor {}
diff --git a/packages/polymer_interop/.gitignore b/packages/polymer_interop/.gitignore
deleted file mode 100644
index 9c3aa5b..0000000
--- a/packages/polymer_interop/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.buildlog
-.DS_Store
-.idea
-.pub/
-.settings/
-/build/
-packages
-pubspec.lock
diff --git a/packages/polymer_interop/.status b/packages/polymer_interop/.status
deleted file mode 100644
index 59f3573..0000000
--- a/packages/polymer_interop/.status
+++ /dev/null
@@ -1,3 +0,0 @@
-# Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
diff --git a/packages/polymer_interop/AUTHORS b/packages/polymer_interop/AUTHORS
deleted file mode 100644
index e8063a8..0000000
--- a/packages/polymer_interop/AUTHORS
+++ /dev/null
@@ -1,6 +0,0 @@
-# Below is a list of people and organizations that have contributed
-# to the project. Names should be added to the list like so:
-#
-#   Name/Organization <email address>
-
-Google Inc.
diff --git a/packages/polymer_interop/CHANGELOG.md b/packages/polymer_interop/CHANGELOG.md
deleted file mode 100644
index 739f539..0000000
--- a/packages/polymer_interop/CHANGELOG.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## 0.1.1
-  * Delete `lib/src/polymer.js` when deploying to reduce output size.
-
-## 0.1.0+2
-  * Fix bad import.
-
-## 0.1.0+1
-  * Fix the `replace_polymer_js` transformer.
-
-## 0.1.0
-
-  * Initial commit, up to date with polymer js version 0.5.5.
diff --git a/packages/polymer_interop/CONTRIBUTING.md b/packages/polymer_interop/CONTRIBUTING.md
deleted file mode 100644
index 6f5e0ea..0000000
--- a/packages/polymer_interop/CONTRIBUTING.md
+++ /dev/null
@@ -1,33 +0,0 @@
-Want to contribute? Great! First, read this page (including the small print at
-the end).
-
-### Before you contribute
-Before we can use your code, you must sign the
-[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual)
-(CLA), which you can do online. The CLA is necessary mainly because you own the
-copyright to your changes, even after your contribution becomes part of our
-codebase, so we need your permission to use and distribute your code. We also
-need to be sure of various other things—for instance that you'll tell us if you
-know that your code infringes on other people's patents. You don't have to sign
-the CLA until after you've submitted your code for review and a member has
-approved it, but you must do it before we can put your code into our codebase.
-
-Before you start working on a larger contribution, you should get in touch with
-us first through the issue tracker with your idea so that we can help out and
-possibly guide you. Coordinating up front makes it much easier to avoid
-frustration later on.
-
-### Code reviews
-All submissions, including submissions by project members, require review.
-
-### File headers
-All files in the project must start with the following header.
-
-    // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-    // for details. All rights reserved. Use of this source code is governed by a
-    // BSD-style license that can be found in the LICENSE file.
-
-### The small print
-Contributions made by corporations are covered by a different agreement than the
-one above, the
-[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate).
diff --git a/packages/polymer_interop/LICENSE b/packages/polymer_interop/LICENSE
deleted file mode 100644
index de31e1a..0000000
--- a/packages/polymer_interop/LICENSE
+++ /dev/null
@@ -1,26 +0,0 @@
-Copyright 2015, the Dart project authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials provided
-      with the distribution.
-    * Neither the name of Google Inc. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/polymer_interop/README.md b/packages/polymer_interop/README.md
deleted file mode 100644
index e16a6d4..0000000
--- a/packages/polymer_interop/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Polymer Interop
-
-This package provides the original polymer js sources, and a dart wrapper around
-them to abstract away the js interop calls.
-
-## Features and bugs
-
-Please file feature requests and bugs at the [issue tracker][tracker].
-
-[tracker]: https://github.com/dart-lang/polymer_interop/issues
diff --git a/packages/polymer_interop/codereview.settings b/packages/polymer_interop/codereview.settings
deleted file mode 100644
index f167e12..0000000
--- a/packages/polymer_interop/codereview.settings
+++ /dev/null
@@ -1,3 +0,0 @@
-CODE_REVIEW_SERVER: http://codereview.chromium.org/
-VIEW_VC: https://github.com/dart-lang/polymer_interop/commit/
-CC_LIST: reviews@dartlang.org
diff --git a/packages/polymer_interop/lib/polymer.html b/packages/polymer_interop/lib/polymer.html
deleted file mode 100644
index d10b4db..0000000
--- a/packages/polymer_interop/lib/polymer.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by 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="src/js/polymer.html">
-<script>
-// This empty script tag is necessary to work around dartbug.com/19650
-</script>
diff --git a/packages/polymer_interop/lib/polymer_interop.dart b/packages/polymer_interop/lib/polymer_interop.dart
deleted file mode 100644
index 2467c04..0000000
--- a/packages/polymer_interop/lib/polymer_interop.dart
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-@HtmlImport('polymer.html')
-library polymer_interop.polymer_interop;
-
-import 'dart:async';
-import 'dart:html';
-import 'dart:js' as js;
-import 'package:web_components/web_components.dart';
-export 'src/polymer_proxy_mixin.dart';
-
-final js.JsObject _polymer = js.context['Polymer'];
-
-/// Wrapper which provides access to many polymer js apis.
-class PolymerJs {
-  static js.JsFunction get constructor => _polymer as js.JsFunction;
-
-  static void resolveElementPaths(Node node) {
-    if (!checkExists()) return;
-    _polymer['urlResolver'].callMethod('resolveDom', [node]);
-  }
-
-  static void flush() {
-    if (!checkExists()) return;
-    _polymer.callMethod('flush');
-  }
-
-  static List<Element> get waitingFor {
-    if (!checkExists()) return null;
-    return _polymer.callMethod('waitingFor', [null]);
-  }
-
-  static void forceReady([int timeout]) {
-    if (!checkExists()) return null;
-    _polymer.callMethod('forceReady', [null, timeout]);
-  }
-
-  static Future importElements(Node elementOrFragment) {
-    if (!checkExists()) return null;
-    var completer = new Completer();
-    _polymer.callMethod(
-        'importElements', [elementOrFragment, () => completer.complete()]);
-    return completer.future;
-  }
-
-  static Future import(List urls) {
-    if (!checkExists()) return null;
-    var completer = new Completer();
-    _polymer.callMethod('import', [urls, () => completer.complete()]);
-    return completer.future;
-  }
-
-  static void whenPolymerReady(f()) {
-    if (!checkExists()) return null;
-    _polymer.callMethod(
-        'whenPolymerReady', [Zone.current.bindCallback(() => f())]);
-  }
-
-  static void endOfMicrotask(f()) {
-    if (!checkExists()) return null;
-    _polymer.callMethod('endOfMicrotask', [() => f()]);
-  }
-
-  static bool outputPolymerError = false;
-  static bool checkExists() {
-    if (_polymer != null) return true;
-    if (!outputPolymerError) {
-      outputPolymerError = true;
-      window.console.error('Unable to find Polymer. Please make sure you are '
-          'waiting on initWebComponents() or initPolymer() before attempting '
-          'to use Polymer.');
-    }
-    return false;
-  }
-}
-
-final js.JsObject _polymerGestures = js.context['PolymerGestures'];
-
-class PolymerGesturesJs {
-  static void addEventListener(Node node, String type, callback) {
-    if (!checkExists()) return null;
-    _polymerGestures.callMethod('addEventListener', [node, type, callback]);
-  }
-
-  static void removeEventListener(Node node, String type, callback) {
-    if (!checkExists()) return null;
-    _polymerGestures.callMethod('removeEventListener', [node, type, callback]);
-  }
-
-  static bool outputPolymerGesturesError = false;
-  static bool checkExists() {
-    if (_polymerGestures != null) return true;
-    if (!outputPolymerGesturesError) {
-      outputPolymerGesturesError = true;
-      window.console.error('Unable to find PolymerGestures. Please make sure '
-          'you are waiting on initWebComponents() or initPolymer() before '
-          'attempting to use PolymerGestures.');
-    }
-    return false;
-  }
-}
diff --git a/packages/polymer_interop/lib/src/build/replace_polymer_js.dart b/packages/polymer_interop/lib/src/build/replace_polymer_js.dart
deleted file mode 100644
index b81f3e7..0000000
--- a/packages/polymer_interop/lib/src/build/replace_polymer_js.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library polymer_interop.src.build.replace_polymer_js.dart;
-
-import 'dart:async';
-import 'package:barback/barback.dart';
-
-/// Replaces `polymer.min.js` with `polymer.js` in development mode.
-class ReplacePolymerJsTransformer extends Transformer {
-  BarbackSettings settings;
-
-  ReplacePolymerJsTransformer.asPlugin(this.settings);
-
-  bool isPrimary(AssetId id) {
-    if (settings.mode == BarbackMode.RELEASE) return false;
-    return id.path == 'lib/src/js/polymer.html';
-  }
-
-  Future apply(Transform transform) async {
-    var contents = await transform.primaryInput.readAsString();
-    contents = contents.replaceFirst('polymer.min.js', 'polymer.js');
-    transform
-        .addOutput(new Asset.fromString(transform.primaryInput.id, contents));
-  }
-}
diff --git a/packages/polymer_interop/lib/src/js/AUTHORS b/packages/polymer_interop/lib/src/js/AUTHORS
deleted file mode 100644
index 0617765..0000000
--- a/packages/polymer_interop/lib/src/js/AUTHORS
+++ /dev/null
@@ -1,9 +0,0 @@
-# Names should be added to this file with this pattern:
-#
-# For individuals:
-#   Name <email address>
-#
-# For organizations:
-#   Organization <fnmatch pattern>
-#
-Google Inc. <*@google.com>
diff --git a/packages/polymer_interop/lib/src/js/CONTRIBUTING.md b/packages/polymer_interop/lib/src/js/CONTRIBUTING.md
deleted file mode 100644
index 1de2f34..0000000
--- a/packages/polymer_interop/lib/src/js/CONTRIBUTING.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Contributing
-
-Want to contribute to Polymer? Great!
-
-We are more than happy to accept external contributions to the project in the form of [feedback](https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev), [bug reports](../../issues), and pull requests.
-
-## Contributor License Agreement
-
-Before we can accept patches, there's a quick web form you need to fill out.
-
-- If you're contributing as an individual (e.g. you own the intellectual property), fill out [this form](http://code.google.com/legal/individual-cla-v1.0.html).
-- If you're contributing under a company, fill out [this form](http://code.google.com/legal/corporate-cla-v1.0.html) instead.
-
-This CLA asserts that contributions are owned by you and that we can license all work under our [license](LICENSE).
-
-Other projects require a similar agreement: jQuery, Firefox, Apache, Node, and many more.
-
-[More about CLAs](https://www.google.com/search?q=Contributor%20License%20Agreement)
-
-## Initial setup
-
-Here's an easy guide that should get you up and running:
-
-1. Setup Grunt: `sudo npm install -g grunt-cli`
-1. Fork the project on github and pull down your copy.
-   > replace the {{ username }} with your username and {{ repository }} with the repository name
-
-        git clone git@github.com:{{ username }}/{{ repository }}.git --recursive
-
-    Note the `--recursive`. This is necessary for submodules to initialize properly. If you don't do a recursive clone, you'll have to init them manually:
-
-        git submodule init
-        git submodule update
-
-    Download and run the `pull-all.sh` script to install the sibling dependencies.
-
-        git clone git://github.com/Polymer/tools.git && tools/bin/pull-all.sh
-
-1. Test your change
-   > in the repo you've made changes to, run the tests:
-
-        cd $REPO
-        npm install
-        grunt test
-
-1. Commit your code and make a pull request.
-
-That's it for the one time setup. Now you're ready to make a change.
-
-## Submitting a pull request
-
-We iterate fast! To avoid potential merge conflicts, it's a good idea to pull from the main project before making a change and submitting a pull request. The easiest way to do this is setup a remote called `upstream` and do a pull before working on a change:
-
-    git remote add upstream git://github.com/Polymer/{{ repository }}.git
-
-Then before making a change, do a pull from the upstream `master` branch:
-
-    git pull upstream master
-
-To make life easier, add a "pull upstream" alias in your `.gitconfig`:
-
-    [alias]
-      pu = !"git fetch origin -v; git fetch upstream -v; git merge upstream/master"
-
-That will pull in changes from your forked repo, the main (upstream) repo, and merge the two. Then it's just a matter of running `git pu` before a change and pushing to your repo:
-
-    git checkout master
-    git pu
-    # make change
-    git commit -a -m 'Awesome things.'
-    git push
-
-Lastly, don't forget to submit the pull request.
diff --git a/packages/polymer_interop/lib/src/js/LICENSE b/packages/polymer_interop/lib/src/js/LICENSE
deleted file mode 100644
index 95987ba..0000000
--- a/packages/polymer_interop/lib/src/js/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-//    * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-//    * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//    * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/polymer_interop/lib/src/js/PATENTS b/packages/polymer_interop/lib/src/js/PATENTS
deleted file mode 100644
index e120963..0000000
--- a/packages/polymer_interop/lib/src/js/PATENTS
+++ /dev/null
@@ -1,23 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Polymer project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Polymer, where such license applies only to those
-patent claims, both currently owned or controlled by Google and acquired
-in the future, licensable by Google that are necessarily infringed by
-this implementation of Polymer.  This grant does not include claims
-that would be infringed only as a consequence of further modification of
-this implementation.  If you or your agent or exclusive licensee
-institute or order or agree to the institution of patent litigation
-against any entity (including a cross-claim or counterclaim in a
-lawsuit) alleging that this implementation of Polymer or any code
-incorporated within this implementation of Polymer constitutes
-direct or contributory patent infringement, or inducement of patent
-infringement, then any patent rights granted to you under this License
-for this implementation of Polymer shall terminate as of the date
-such litigation is filed.
diff --git a/packages/polymer_interop/lib/src/js/README.md b/packages/polymer_interop/lib/src/js/README.md
deleted file mode 100644
index 236a88c..0000000
--- a/packages/polymer_interop/lib/src/js/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# Polymer
-
-[![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon)
-
-Build Status: [http://build.chromium.org/p/client.polymer/waterfall](http://build.chromium.org/p/client.polymer/waterfall)
-
-## Brief Overview
-
-For more detailed info goto [http://polymer-project.org/](http://polymer-project.org/).
-
-Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries.
-
-Polymer is based on a set of future technologies, including [Shadow DOM](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html), [Custom Elements](https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
-
-## Tools & Testing
-
-For running tests or building minified files, consult the [tooling information](http://www.polymer-project.org/resources/tooling-strategy.html).
diff --git a/packages/polymer_interop/lib/src/js/bower.json b/packages/polymer_interop/lib/src/js/bower.json
deleted file mode 100644
index dbc7596..0000000
--- a/packages/polymer_interop/lib/src/js/bower.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "name": "polymer",
-  "description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.",
-  "homepage": "http://www.polymer-project.org/",
-  "keywords": [
-    "util",
-    "client",
-    "browser",
-    "web components",
-    "web-components"
-  ],
-  "author": "Polymer Authors <polymer-dev@googlegroups.com>",
-  "private": true,
-  "dependencies": {
-    "core-component-page": "Polymer/core-component-page#^0.5",
-    "webcomponentsjs": "Polymer/webcomponentsjs#^0.5"
-  },
-  "devDependencies": {
-    "tools": "Polymer/tools#master",
-    "web-component-tester": "Polymer/web-component-tester#^1.4.2"
-  },
-  "version": "0.5.5"
-}
\ No newline at end of file
diff --git a/packages/polymer_interop/lib/src/js/build.log b/packages/polymer_interop/lib/src/js/build.log
deleted file mode 100644
index 3eef92a..0000000
--- a/packages/polymer_interop/lib/src/js/build.log
+++ /dev/null
@@ -1,26 +0,0 @@
-BUILD LOG
----------
-Build Time: 2015-02-17T17:25:22
-
-NODEJS INFORMATION
-==================
-nodejs: v0.12.0
-grunt: 0.4.5
-grunt-audit: 1.0.0
-grunt-contrib-concat: 0.5.0
-grunt-contrib-copy: 0.7.0
-grunt-contrib-uglify: 0.6.0
-grunt-string-replace: 1.0.0
-web-component-tester: 1.6.2
-
-REPO REVISIONS
-==============
-polymer-expressions: f2229c2f3db2332aab5c4dba029c17f8bc3f99f2
-polymer-gestures: ccd9dfae58896dff2e4fe9ce123870d321e393d1
-polymer: f53db3fe961a3094844ad46e70e3f721604b0a2b
-
-BUILD HASHES
-============
-dist/polymer.js: 0238138d46a41de3724926295213f1babf66ed41
-dist/polymer.min.js: d5907053e8535c422393aa240e9026ffe0b5fefc
-dist/layout.html: 348d358a91712ecc2f8811efa430fcd954b4590c
\ No newline at end of file
diff --git a/packages/polymer_interop/lib/src/js/layout.html b/packages/polymer_interop/lib/src/js/layout.html
deleted file mode 100644
index 55d4d2f..0000000
--- a/packages/polymer_interop/lib/src/js/layout.html
+++ /dev/null
@@ -1,286 +0,0 @@
-<!--

-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.

-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt

-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt

-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt

-Code distributed by Google as part of the polymer project is also

-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt

--->

-<style shim-shadowdom>

-/*******************************

-          Flex Layout

-*******************************/

-

-html /deep/ [layout][horizontal], html /deep/ [layout][vertical] {

-  display: -ms-flexbox;

-  display: -webkit-flex;

-  display: flex;

-}

-

-html /deep/ [layout][horizontal][inline], html /deep/ [layout][vertical][inline] {

-  display: -ms-inline-flexbox;

-  display: -webkit-inline-flex;

-  display: inline-flex;

-}

-

-html /deep/ [layout][horizontal] {

-  -ms-flex-direction: row;

-  -webkit-flex-direction: row;

-  flex-direction: row;

-}

-

-html /deep/ [layout][horizontal][reverse] {

-  -ms-flex-direction: row-reverse;

-  -webkit-flex-direction: row-reverse;

-  flex-direction: row-reverse;

-}

-

-html /deep/ [layout][vertical] {

-  -ms-flex-direction: column;

-  -webkit-flex-direction: column;

-  flex-direction: column;

-}

-

-html /deep/ [layout][vertical][reverse] {

-  -ms-flex-direction: column-reverse;

-  -webkit-flex-direction: column-reverse;

-  flex-direction: column-reverse;

-}

-

-html /deep/ [layout][wrap] {

-  -ms-flex-wrap: wrap;

-  -webkit-flex-wrap: wrap;

-  flex-wrap: wrap;

-}

-

-html /deep/ [layout][wrap-reverse] {

-  -ms-flex-wrap: wrap-reverse;

-  -webkit-flex-wrap: wrap-reverse;

-  flex-wrap: wrap-reverse;

-}

-

-html /deep/ [flex] {

-  -ms-flex: 1 1 0.000000001px;

-  -webkit-flex: 1;

-  flex: 1;

-  -webkit-flex-basis: 0.000000001px;

-  flex-basis: 0.000000001px;

-}

-

-html /deep/ [vertical][layout] > [flex][auto-vertical], html /deep/ [vertical][layout]::shadow [flex][auto-vertical] {

-  -ms-flex: 1 1 auto;

-  -webkit-flex-basis: auto;

-  flex-basis: auto;

-}

-

-html /deep/ [flex][auto] {

-  -ms-flex: 1 1 auto;

-  -webkit-flex-basis: auto;

-  flex-basis: auto;

-}

-

-html /deep/ [flex][none] {

-  -ms-flex: none;

-  -webkit-flex: none;

-  flex: none;

-}

-

-html /deep/ [flex][one] {

-  -ms-flex: 1;

-  -webkit-flex: 1;

-  flex: 1;

-}

-

-html /deep/ [flex][two] {

-  -ms-flex: 2;

-  -webkit-flex: 2;

-  flex: 2;

-}

-

-html /deep/ [flex][three] {

-  -ms-flex: 3;

-  -webkit-flex: 3;

-  flex: 3;

-}

-

-html /deep/ [flex][four] {

-  -ms-flex: 4;

-  -webkit-flex: 4;

-  flex: 4;

-}

-

-html /deep/ [flex][five] {

-  -ms-flex: 5;

-  -webkit-flex: 5;

-  flex: 5;

-}

-

-html /deep/ [flex][six] {

-  -ms-flex: 6;

-  -webkit-flex: 6;

-  flex: 6;

-}

-

-html /deep/ [flex][seven] {

-  -ms-flex: 7;

-  -webkit-flex: 7;

-  flex: 7;

-}

-

-html /deep/ [flex][eight] {

-  -ms-flex: 8;

-  -webkit-flex: 8;

-  flex: 8;

-}

-

-html /deep/ [flex][nine] {

-  -ms-flex: 9;

-  -webkit-flex: 9;

-  flex: 9;

-}

-

-html /deep/ [flex][ten] {

-  -ms-flex: 10;

-  -webkit-flex: 10;

-  flex: 10;

-}

-

-html /deep/ [flex][eleven] {

-  -ms-flex: 11;

-  -webkit-flex: 11;

-  flex: 11;

-}

-

-html /deep/ [flex][twelve] {

-  -ms-flex: 12;

-  -webkit-flex: 12;

-  flex: 12;

-}

-

-/* alignment in cross axis */

-

-html /deep/ [layout][start] {

-  -ms-flex-align: start;

-  -webkit-align-items: flex-start;

-  align-items: flex-start;

-}

-

-html /deep/ [layout][center], html /deep/ [layout][center-center] {

-  -ms-flex-align: center;

-  -webkit-align-items: center;

-  align-items: center;

-}

-

-html /deep/ [layout][end] {

-  -ms-flex-align: end;

-  -webkit-align-items: flex-end;

-  align-items: flex-end;

-}

-

-/* alignment in main axis */

-

-html /deep/ [layout][start-justified] {

-  -ms-flex-pack: start;

-  -webkit-justify-content: flex-start;

-  justify-content: flex-start;

-}

-

-html /deep/ [layout][center-justified], html /deep/ [layout][center-center] {

-  -ms-flex-pack: center;

-  -webkit-justify-content: center;

-  justify-content: center;

-}

-

-html /deep/ [layout][end-justified] {

-  -ms-flex-pack: end;

-  -webkit-justify-content: flex-end;

-  justify-content: flex-end;

-}

-

-html /deep/ [layout][around-justified] {

-  -ms-flex-pack: distribute;

-  -webkit-justify-content: space-around;

-  justify-content: space-around;

-}

-

-html /deep/ [layout][justified] {

-  -ms-flex-pack: justify;

-  -webkit-justify-content: space-between;

-  justify-content: space-between;

-}

-

-/* self alignment */

-

-html /deep/ [self-start] {

-  -ms-align-self: flex-start;

-  -webkit-align-self: flex-start;

-  align-self: flex-start;

-}

-

-html /deep/ [self-center] {

-  -ms-align-self: center;

-  -webkit-align-self: center;

-  align-self: center;

-}

-

-html /deep/ [self-end] {

-  -ms-align-self: flex-end;

-  -webkit-align-self: flex-end;

-  align-self: flex-end;

-}

-

-html /deep/ [self-stretch] {

-  -ms-align-self: stretch;

-  -webkit-align-self: stretch;

-  align-self: stretch;

-}

-

-/*******************************

-          Other Layout

-*******************************/

-

-html /deep/ [block] {

-  display: block;

-}

-

-/* ie support for hidden */

-html /deep/ [hidden] {

-  display: none !important;

-}

-

-html /deep/ [relative] {

-  position: relative;

-}

-

-html /deep/ [fit] {

-  position: absolute;

-  top: 0;

-  right: 0;

-  bottom: 0;

-  left: 0;

-}

-

-body[fullbleed] {

-  margin: 0;

-  height: 100vh;

-}

-

-/*******************************

-            Other

-*******************************/

-

-html /deep/ [segment], html /deep/ segment {

-  display: block;

-  position: relative;

-  -webkit-box-sizing: border-box;

-  -ms-box-sizing: border-box;

-  box-sizing: border-box;

-  margin: 1em 0.5em;

-  padding: 1em;

-  background-color: white;

-  -webkit-box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);

-  box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.1);

-  border-radius: 5px 5px 5px 5px;

-}

-

-</style>
\ No newline at end of file
diff --git a/packages/polymer_interop/lib/src/js/polymer.html b/packages/polymer_interop/lib/src/js/polymer.html
deleted file mode 100644
index 8b38742..0000000
--- a/packages/polymer_interop/lib/src/js/polymer.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-Code distributed by Google as part of the polymer project is also
-subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
--->
-
-<link rel="import" href="layout.html">
-
-<script src="polymer.min.js"></script>
diff --git a/packages/polymer_interop/lib/src/js/polymer.js b/packages/polymer_interop/lib/src/js/polymer.js
deleted file mode 100644
index f3df2e8..0000000
--- a/packages/polymer_interop/lib/src/js/polymer.js
+++ /dev/null
@@ -1,11859 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.5.5
-window.PolymerGestures = {};
-
-(function(scope) {
-  var hasFullPath = false;
-
-  // test for full event path support
-  var pathTest = document.createElement('meta');
-  if (pathTest.createShadowRoot) {
-    var sr = pathTest.createShadowRoot();
-    var s = document.createElement('span');
-    sr.appendChild(s);
-    pathTest.addEventListener('testpath', function(ev) {
-      if (ev.path) {
-        // if the span is in the event path, then path[0] is the real source for all events
-        hasFullPath = ev.path[0] === s;
-      }
-      ev.stopPropagation();
-    });
-    var ev = new CustomEvent('testpath', {bubbles: true});
-    // must add node to DOM to trigger event listener
-    document.head.appendChild(pathTest);
-    s.dispatchEvent(ev);
-    pathTest.parentNode.removeChild(pathTest);
-    sr = s = null;
-  }
-  pathTest = null;
-
-  var target = {
-    shadow: function(inEl) {
-      if (inEl) {
-        return inEl.shadowRoot || inEl.webkitShadowRoot;
-      }
-    },
-    canTarget: function(shadow) {
-      return shadow && Boolean(shadow.elementFromPoint);
-    },
-    targetingShadow: function(inEl) {
-      var s = this.shadow(inEl);
-      if (this.canTarget(s)) {
-        return s;
-      }
-    },
-    olderShadow: function(shadow) {
-      var os = shadow.olderShadowRoot;
-      if (!os) {
-        var se = shadow.querySelector('shadow');
-        if (se) {
-          os = se.olderShadowRoot;
-        }
-      }
-      return os;
-    },
-    allShadows: function(element) {
-      var shadows = [], s = this.shadow(element);
-      while(s) {
-        shadows.push(s);
-        s = this.olderShadow(s);
-      }
-      return shadows;
-    },
-    searchRoot: function(inRoot, x, y) {
-      var t, st, sr, os;
-      if (inRoot) {
-        t = inRoot.elementFromPoint(x, y);
-        if (t) {
-          // found element, check if it has a ShadowRoot
-          sr = this.targetingShadow(t);
-        } else if (inRoot !== document) {
-          // check for sibling roots
-          sr = this.olderShadow(inRoot);
-        }
-        // search other roots, fall back to light dom element
-        return this.searchRoot(sr, x, y) || t;
-      }
-    },
-    owner: function(element) {
-      if (!element) {
-        return document;
-      }
-      var s = element;
-      // walk up until you hit the shadow root or document
-      while (s.parentNode) {
-        s = s.parentNode;
-      }
-      // the owner element is expected to be a Document or ShadowRoot
-      if (s.nodeType != Node.DOCUMENT_NODE && s.nodeType != Node.DOCUMENT_FRAGMENT_NODE) {
-        s = document;
-      }
-      return s;
-    },
-    findTarget: function(inEvent) {
-      if (hasFullPath && inEvent.path && inEvent.path.length) {
-        return inEvent.path[0];
-      }
-      var x = inEvent.clientX, y = inEvent.clientY;
-      // if the listener is in the shadow root, it is much faster to start there
-      var s = this.owner(inEvent.target);
-      // if x, y is not in this root, fall back to document search
-      if (!s.elementFromPoint(x, y)) {
-        s = document;
-      }
-      return this.searchRoot(s, x, y);
-    },
-    findTouchAction: function(inEvent) {
-      var n;
-      if (hasFullPath && inEvent.path && inEvent.path.length) {
-        var path = inEvent.path;
-        for (var i = 0; i < path.length; i++) {
-          n = path[i];
-          if (n.nodeType === Node.ELEMENT_NODE && n.hasAttribute('touch-action')) {
-            return n.getAttribute('touch-action');
-          }
-        }
-      } else {
-        n = inEvent.target;
-        while(n) {
-          if (n.nodeType === Node.ELEMENT_NODE && n.hasAttribute('touch-action')) {
-            return n.getAttribute('touch-action');
-          }
-          n = n.parentNode || n.host;
-        }
-      }
-      // auto is default
-      return "auto";
-    },
-    LCA: function(a, b) {
-      if (a === b) {
-        return a;
-      }
-      if (a && !b) {
-        return a;
-      }
-      if (b && !a) {
-        return b;
-      }
-      if (!b && !a) {
-        return document;
-      }
-      // fast case, a is a direct descendant of b or vice versa
-      if (a.contains && a.contains(b)) {
-        return a;
-      }
-      if (b.contains && b.contains(a)) {
-        return b;
-      }
-      var adepth = this.depth(a);
-      var bdepth = this.depth(b);
-      var d = adepth - bdepth;
-      if (d >= 0) {
-        a = this.walk(a, d);
-      } else {
-        b = this.walk(b, -d);
-      }
-      while (a && b && a !== b) {
-        a = a.parentNode || a.host;
-        b = b.parentNode || b.host;
-      }
-      return a;
-    },
-    walk: function(n, u) {
-      for (var i = 0; n && (i < u); i++) {
-        n = n.parentNode || n.host;
-      }
-      return n;
-    },
-    depth: function(n) {
-      var d = 0;
-      while(n) {
-        d++;
-        n = n.parentNode || n.host;
-      }
-      return d;
-    },
-    deepContains: function(a, b) {
-      var common = this.LCA(a, b);
-      // if a is the common ancestor, it must "deeply" contain b
-      return common === a;
-    },
-    insideNode: function(node, x, y) {
-      var rect = node.getBoundingClientRect();
-      return (rect.left <= x) && (x <= rect.right) && (rect.top <= y) && (y <= rect.bottom);
-    },
-    path: function(event) {
-      var p;
-      if (hasFullPath && event.path && event.path.length) {
-        p = event.path;
-      } else {
-        p = [];
-        var n = this.findTarget(event);
-        while (n) {
-          p.push(n);
-          n = n.parentNode || n.host;
-        }
-      }
-      return p;
-    }
-  };
-  scope.targetFinding = target;
-  /**
-   * Given an event, finds the "deepest" node that could have been the original target before ShadowDOM retargetting
-   *
-   * @param {Event} Event An event object with clientX and clientY properties
-   * @return {Element} The probable event origninator
-   */
-  scope.findTarget = target.findTarget.bind(target);
-  /**
-   * Determines if the "container" node deeply contains the "containee" node, including situations where the "containee" is contained by one or more ShadowDOM
-   * roots.
-   *
-   * @param {Node} container
-   * @param {Node} containee
-   * @return {Boolean}
-   */
-  scope.deepContains = target.deepContains.bind(target);
-
-  /**
-   * Determines if the x/y position is inside the given node.
-   *
-   * Example:
-   *
-   *     function upHandler(event) {
-   *       var innode = PolymerGestures.insideNode(event.target, event.clientX, event.clientY);
-   *       if (innode) {
-   *         // wait for tap?
-   *       } else {
-   *         // tap will never happen
-   *       }
-   *     }
-   *
-   * @param {Node} node
-   * @param {Number} x Screen X position
-   * @param {Number} y screen Y position
-   * @return {Boolean}
-   */
-  scope.insideNode = target.insideNode;
-
-})(window.PolymerGestures);
-
-(function() {
-  function shadowSelector(v) {
-    return 'html /deep/ ' + selector(v);
-  }
-  function selector(v) {
-    return '[touch-action="' + v + '"]';
-  }
-  function rule(v) {
-    return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + ';}';
-  }
-  var attrib2css = [
-    'none',
-    'auto',
-    'pan-x',
-    'pan-y',
-    {
-      rule: 'pan-x pan-y',
-      selectors: [
-        'pan-x pan-y',
-        'pan-y pan-x'
-      ]
-    },
-    'manipulation'
-  ];
-  var styles = '';
-  // only install stylesheet if the browser has touch action support
-  var hasTouchAction = typeof document.head.style.touchAction === 'string';
-  // only add shadow selectors if shadowdom is supported
-  var hasShadowRoot = !window.ShadowDOMPolyfill && document.head.createShadowRoot;
-
-  if (hasTouchAction) {
-    attrib2css.forEach(function(r) {
-      if (String(r) === r) {
-        styles += selector(r) + rule(r) + '\n';
-        if (hasShadowRoot) {
-          styles += shadowSelector(r) + rule(r) + '\n';
-        }
-      } else {
-        styles += r.selectors.map(selector) + rule(r.rule) + '\n';
-        if (hasShadowRoot) {
-          styles += r.selectors.map(shadowSelector) + rule(r.rule) + '\n';
-        }
-      }
-    });
-
-    var el = document.createElement('style');
-    el.textContent = styles;
-    document.head.appendChild(el);
-  }
-})();
-
-/**
- * This is the constructor for new PointerEvents.
- *
- * New Pointer Events must be given a type, and an optional dictionary of
- * initialization properties.
- *
- * Due to certain platform requirements, events returned from the constructor
- * identify as MouseEvents.
- *
- * @constructor
- * @param {String} inType The type of the event to create.
- * @param {Object} [inDict] An optional dictionary of initial event properties.
- * @return {Event} A new PointerEvent of type `inType` and initialized with properties from `inDict`.
- */
-(function(scope) {
-
-  var MOUSE_PROPS = [
-    'bubbles',
-    'cancelable',
-    'view',
-    'detail',
-    'screenX',
-    'screenY',
-    'clientX',
-    'clientY',
-    'ctrlKey',
-    'altKey',
-    'shiftKey',
-    'metaKey',
-    'button',
-    'relatedTarget',
-    'pageX',
-    'pageY'
-  ];
-
-  var MOUSE_DEFAULTS = [
-    false,
-    false,
-    null,
-    null,
-    0,
-    0,
-    0,
-    0,
-    false,
-    false,
-    false,
-    false,
-    0,
-    null,
-    0,
-    0
-  ];
-
-  var NOP_FACTORY = function(){ return function(){}; };
-
-  var eventFactory = {
-    // TODO(dfreedm): this is overridden by tap recognizer, needs review
-    preventTap: NOP_FACTORY,
-    makeBaseEvent: function(inType, inDict) {
-      var e = document.createEvent('Event');
-      e.initEvent(inType, inDict.bubbles || false, inDict.cancelable || false);
-      e.preventTap = eventFactory.preventTap(e);
-      return e;
-    },
-    makeGestureEvent: function(inType, inDict) {
-      inDict = inDict || Object.create(null);
-
-      var e = this.makeBaseEvent(inType, inDict);
-      for (var i = 0, keys = Object.keys(inDict), k; i < keys.length; i++) {
-        k = keys[i];
-        if( k !== 'bubbles' && k !== 'cancelable' ) {
-           e[k] = inDict[k];
-        }
-      }
-      return e;
-    },
-    makePointerEvent: function(inType, inDict) {
-      inDict = inDict || Object.create(null);
-
-      var e = this.makeBaseEvent(inType, inDict);
-      // define inherited MouseEvent properties
-      for(var i = 2, p; i < MOUSE_PROPS.length; i++) {
-        p = MOUSE_PROPS[i];
-        e[p] = inDict[p] || MOUSE_DEFAULTS[i];
-      }
-      e.buttons = inDict.buttons || 0;
-
-      // Spec requires that pointers without pressure specified use 0.5 for down
-      // state and 0 for up state.
-      var pressure = 0;
-      if (inDict.pressure) {
-        pressure = inDict.pressure;
-      } else {
-        pressure = e.buttons ? 0.5 : 0;
-      }
-
-      // add x/y properties aliased to clientX/Y
-      e.x = e.clientX;
-      e.y = e.clientY;
-
-      // define the properties of the PointerEvent interface
-      e.pointerId = inDict.pointerId || 0;
-      e.width = inDict.width || 0;
-      e.height = inDict.height || 0;
-      e.pressure = pressure;
-      e.tiltX = inDict.tiltX || 0;
-      e.tiltY = inDict.tiltY || 0;
-      e.pointerType = inDict.pointerType || '';
-      e.hwTimestamp = inDict.hwTimestamp || 0;
-      e.isPrimary = inDict.isPrimary || false;
-      e._source = inDict._source || '';
-      return e;
-    }
-  };
-
-  scope.eventFactory = eventFactory;
-})(window.PolymerGestures);
-
-/**
- * This module implements an map of pointer states
- */
-(function(scope) {
-  var USE_MAP = window.Map && window.Map.prototype.forEach;
-  var POINTERS_FN = function(){ return this.size; };
-  function PointerMap() {
-    if (USE_MAP) {
-      var m = new Map();
-      m.pointers = POINTERS_FN;
-      return m;
-    } else {
-      this.keys = [];
-      this.values = [];
-    }
-  }
-
-  PointerMap.prototype = {
-    set: function(inId, inEvent) {
-      var i = this.keys.indexOf(inId);
-      if (i > -1) {
-        this.values[i] = inEvent;
-      } else {
-        this.keys.push(inId);
-        this.values.push(inEvent);
-      }
-    },
-    has: function(inId) {
-      return this.keys.indexOf(inId) > -1;
-    },
-    'delete': function(inId) {
-      var i = this.keys.indexOf(inId);
-      if (i > -1) {
-        this.keys.splice(i, 1);
-        this.values.splice(i, 1);
-      }
-    },
-    get: function(inId) {
-      var i = this.keys.indexOf(inId);
-      return this.values[i];
-    },
-    clear: function() {
-      this.keys.length = 0;
-      this.values.length = 0;
-    },
-    // return value, key, map
-    forEach: function(callback, thisArg) {
-      this.values.forEach(function(v, i) {
-        callback.call(thisArg, v, this.keys[i], this);
-      }, this);
-    },
-    pointers: function() {
-      return this.keys.length;
-    }
-  };
-
-  scope.PointerMap = PointerMap;
-})(window.PolymerGestures);
-
-(function(scope) {
-  var CLONE_PROPS = [
-    // MouseEvent
-    'bubbles',
-    'cancelable',
-    'view',
-    'detail',
-    'screenX',
-    'screenY',
-    'clientX',
-    'clientY',
-    'ctrlKey',
-    'altKey',
-    'shiftKey',
-    'metaKey',
-    'button',
-    'relatedTarget',
-    // DOM Level 3
-    'buttons',
-    // PointerEvent
-    'pointerId',
-    'width',
-    'height',
-    'pressure',
-    'tiltX',
-    'tiltY',
-    'pointerType',
-    'hwTimestamp',
-    'isPrimary',
-    // event instance
-    'type',
-    'target',
-    'currentTarget',
-    'which',
-    'pageX',
-    'pageY',
-    'timeStamp',
-    // gesture addons
-    'preventTap',
-    'tapPrevented',
-    '_source'
-  ];
-
-  var CLONE_DEFAULTS = [
-    // MouseEvent
-    false,
-    false,
-    null,
-    null,
-    0,
-    0,
-    0,
-    0,
-    false,
-    false,
-    false,
-    false,
-    0,
-    null,
-    // DOM Level 3
-    0,
-    // PointerEvent
-    0,
-    0,
-    0,
-    0,
-    0,
-    0,
-    '',
-    0,
-    false,
-    // event instance
-    '',
-    null,
-    null,
-    0,
-    0,
-    0,
-    0,
-    function(){},
-    false
-  ];
-
-  var HAS_SVG_INSTANCE = (typeof SVGElementInstance !== 'undefined');
-
-  var eventFactory = scope.eventFactory;
-
-  // set of recognizers to run for the currently handled event
-  var currentGestures;
-
-  /**
-   * This module is for normalizing events. Mouse and Touch events will be
-   * collected here, and fire PointerEvents that have the same semantics, no
-   * matter the source.
-   * Events fired:
-   *   - pointerdown: a pointing is added
-   *   - pointerup: a pointer is removed
-   *   - pointermove: a pointer is moved
-   *   - pointerover: a pointer crosses into an element
-   *   - pointerout: a pointer leaves an element
-   *   - pointercancel: a pointer will no longer generate events
-   */
-  var dispatcher = {
-    IS_IOS: false,
-    pointermap: new scope.PointerMap(),
-    requiredGestures: new scope.PointerMap(),
-    eventMap: Object.create(null),
-    // Scope objects for native events.
-    // This exists for ease of testing.
-    eventSources: Object.create(null),
-    eventSourceList: [],
-    gestures: [],
-    // map gesture event -> {listeners: int, index: gestures[int]}
-    dependencyMap: {
-      // make sure down and up are in the map to trigger "register"
-      down: {listeners: 0, index: -1},
-      up: {listeners: 0, index: -1}
-    },
-    gestureQueue: [],
-    /**
-     * Add a new event source that will generate pointer events.
-     *
-     * `inSource` must contain an array of event names named `events`, and
-     * functions with the names specified in the `events` array.
-     * @param {string} name A name for the event source
-     * @param {Object} source A new source of platform events.
-     */
-    registerSource: function(name, source) {
-      var s = source;
-      var newEvents = s.events;
-      if (newEvents) {
-        newEvents.forEach(function(e) {
-          if (s[e]) {
-            this.eventMap[e] = s[e].bind(s);
-          }
-        }, this);
-        this.eventSources[name] = s;
-        this.eventSourceList.push(s);
-      }
-    },
-    registerGesture: function(name, source) {
-      var obj = Object.create(null);
-      obj.listeners = 0;
-      obj.index = this.gestures.length;
-      for (var i = 0, g; i < source.exposes.length; i++) {
-        g = source.exposes[i].toLowerCase();
-        this.dependencyMap[g] = obj;
-      }
-      this.gestures.push(source);
-    },
-    register: function(element, initial) {
-      var l = this.eventSourceList.length;
-      for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {
-        // call eventsource register
-        es.register.call(es, element, initial);
-      }
-    },
-    unregister: function(element) {
-      var l = this.eventSourceList.length;
-      for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {
-        // call eventsource register
-        es.unregister.call(es, element);
-      }
-    },
-    // EVENTS
-    down: function(inEvent) {
-      this.requiredGestures.set(inEvent.pointerId, currentGestures);
-      this.fireEvent('down', inEvent);
-    },
-    move: function(inEvent) {
-      // pipe move events into gesture queue directly
-      inEvent.type = 'move';
-      this.fillGestureQueue(inEvent);
-    },
-    up: function(inEvent) {
-      this.fireEvent('up', inEvent);
-      this.requiredGestures.delete(inEvent.pointerId);
-    },
-    cancel: function(inEvent) {
-      inEvent.tapPrevented = true;
-      this.fireEvent('up', inEvent);
-      this.requiredGestures.delete(inEvent.pointerId);
-    },
-    addGestureDependency: function(node, currentGestures) {
-      var gesturesWanted = node._pgEvents;
-      if (gesturesWanted && currentGestures) {
-        var gk = Object.keys(gesturesWanted);
-        for (var i = 0, r, ri, g; i < gk.length; i++) {
-          // gesture
-          g = gk[i];
-          if (gesturesWanted[g] > 0) {
-            // lookup gesture recognizer
-            r = this.dependencyMap[g];
-            // recognizer index
-            ri = r ? r.index : -1;
-            currentGestures[ri] = true;
-          }
-        }
-      }
-    },
-    // LISTENER LOGIC
-    eventHandler: function(inEvent) {
-      // This is used to prevent multiple dispatch of events from
-      // platform events. This can happen when two elements in different scopes
-      // are set up to create pointer events, which is relevant to Shadow DOM.
-
-      var type = inEvent.type;
-
-      // only generate the list of desired events on "down"
-      if (type === 'touchstart' || type === 'mousedown' || type === 'pointerdown' || type === 'MSPointerDown') {
-        if (!inEvent._handledByPG) {
-          currentGestures = {};
-        }
-
-        // in IOS mode, there is only a listener on the document, so this is not re-entrant
-        if (this.IS_IOS) {
-          var ev = inEvent;
-          if (type === 'touchstart') {
-            var ct = inEvent.changedTouches[0];
-            // set up a fake event to give to the path builder
-            ev = {target: inEvent.target, clientX: ct.clientX, clientY: ct.clientY, path: inEvent.path};
-          }
-          // use event path if available, otherwise build a path from target finding
-          var nodes = inEvent.path || scope.targetFinding.path(ev);
-          for (var i = 0, n; i < nodes.length; i++) {
-            n = nodes[i];
-            this.addGestureDependency(n, currentGestures);
-          }
-        } else {
-          this.addGestureDependency(inEvent.currentTarget, currentGestures);
-        }
-      }
-
-      if (inEvent._handledByPG) {
-        return;
-      }
-      var fn = this.eventMap && this.eventMap[type];
-      if (fn) {
-        fn(inEvent);
-      }
-      inEvent._handledByPG = true;
-    },
-    // set up event listeners
-    listen: function(target, events) {
-      for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {
-        this.addEvent(target, e);
-      }
-    },
-    // remove event listeners
-    unlisten: function(target, events) {
-      for (var i = 0, l = events.length, e; (i < l) && (e = events[i]); i++) {
-        this.removeEvent(target, e);
-      }
-    },
-    addEvent: function(target, eventName) {
-      target.addEventListener(eventName, this.boundHandler);
-    },
-    removeEvent: function(target, eventName) {
-      target.removeEventListener(eventName, this.boundHandler);
-    },
-    // EVENT CREATION AND TRACKING
-    /**
-     * Creates a new Event of type `inType`, based on the information in
-     * `inEvent`.
-     *
-     * @param {string} inType A string representing the type of event to create
-     * @param {Event} inEvent A platform event with a target
-     * @return {Event} A PointerEvent of type `inType`
-     */
-    makeEvent: function(inType, inEvent) {
-      var e = eventFactory.makePointerEvent(inType, inEvent);
-      e.preventDefault = inEvent.preventDefault;
-      e.tapPrevented = inEvent.tapPrevented;
-      e._target = e._target || inEvent.target;
-      return e;
-    },
-    // make and dispatch an event in one call
-    fireEvent: function(inType, inEvent) {
-      var e = this.makeEvent(inType, inEvent);
-      return this.dispatchEvent(e);
-    },
-    /**
-     * Returns a snapshot of inEvent, with writable properties.
-     *
-     * @param {Event} inEvent An event that contains properties to copy.
-     * @return {Object} An object containing shallow copies of `inEvent`'s
-     *    properties.
-     */
-    cloneEvent: function(inEvent) {
-      var eventCopy = Object.create(null), p;
-      for (var i = 0; i < CLONE_PROPS.length; i++) {
-        p = CLONE_PROPS[i];
-        eventCopy[p] = inEvent[p] || CLONE_DEFAULTS[i];
-        // Work around SVGInstanceElement shadow tree
-        // Return the <use> element that is represented by the instance for Safari, Chrome, IE.
-        // This is the behavior implemented by Firefox.
-        if (p === 'target' || p === 'relatedTarget') {
-          if (HAS_SVG_INSTANCE && eventCopy[p] instanceof SVGElementInstance) {
-            eventCopy[p] = eventCopy[p].correspondingUseElement;
-          }
-        }
-      }
-      // keep the semantics of preventDefault
-      eventCopy.preventDefault = function() {
-        inEvent.preventDefault();
-      };
-      return eventCopy;
-    },
-    /**
-     * Dispatches the event to its target.
-     *
-     * @param {Event} inEvent The event to be dispatched.
-     * @return {Boolean} True if an event handler returns true, false otherwise.
-     */
-    dispatchEvent: function(inEvent) {
-      var t = inEvent._target;
-      if (t) {
-        t.dispatchEvent(inEvent);
-        // clone the event for the gesture system to process
-        // clone after dispatch to pick up gesture prevention code
-        var clone = this.cloneEvent(inEvent);
-        clone.target = t;
-        this.fillGestureQueue(clone);
-      }
-    },
-    gestureTrigger: function() {
-      // process the gesture queue
-      for (var i = 0, e, rg; i < this.gestureQueue.length; i++) {
-        e = this.gestureQueue[i];
-        rg = e._requiredGestures;
-        if (rg) {
-          for (var j = 0, g, fn; j < this.gestures.length; j++) {
-            // only run recognizer if an element in the source event's path is listening for those gestures
-            if (rg[j]) {
-              g = this.gestures[j];
-              fn = g[e.type];
-              if (fn) {
-                fn.call(g, e);
-              }
-            }
-          }
-        }
-      }
-      this.gestureQueue.length = 0;
-    },
-    fillGestureQueue: function(ev) {
-      // only trigger the gesture queue once
-      if (!this.gestureQueue.length) {
-        requestAnimationFrame(this.boundGestureTrigger);
-      }
-      ev._requiredGestures = this.requiredGestures.get(ev.pointerId);
-      this.gestureQueue.push(ev);
-    }
-  };
-  dispatcher.boundHandler = dispatcher.eventHandler.bind(dispatcher);
-  dispatcher.boundGestureTrigger = dispatcher.gestureTrigger.bind(dispatcher);
-  scope.dispatcher = dispatcher;
-
-  /**
-   * Listen for `gesture` on `node` with the `handler` function
-   *
-   * If `handler` is the first listener for `gesture`, the underlying gesture recognizer is then enabled.
-   *
-   * @param {Element} node
-   * @param {string} gesture
-   * @return Boolean `gesture` is a valid gesture
-   */
-  scope.activateGesture = function(node, gesture) {
-    var g = gesture.toLowerCase();
-    var dep = dispatcher.dependencyMap[g];
-    if (dep) {
-      var recognizer = dispatcher.gestures[dep.index];
-      if (!node._pgListeners) {
-        dispatcher.register(node);
-        node._pgListeners = 0;
-      }
-      // TODO(dfreedm): re-evaluate bookkeeping to avoid using attributes
-      if (recognizer) {
-        var touchAction = recognizer.defaultActions && recognizer.defaultActions[g];
-        var actionNode;
-        switch(node.nodeType) {
-          case Node.ELEMENT_NODE:
-            actionNode = node;
-          break;
-          case Node.DOCUMENT_FRAGMENT_NODE:
-            actionNode = node.host;
-          break;
-          default:
-            actionNode = null;
-          break;
-        }
-        if (touchAction && actionNode && !actionNode.hasAttribute('touch-action')) {
-          actionNode.setAttribute('touch-action', touchAction);
-        }
-      }
-      if (!node._pgEvents) {
-        node._pgEvents = {};
-      }
-      node._pgEvents[g] = (node._pgEvents[g] || 0) + 1;
-      node._pgListeners++;
-    }
-    return Boolean(dep);
-  };
-
-  /**
-   *
-   * Listen for `gesture` from `node` with `handler` function.
-   *
-   * @param {Element} node
-   * @param {string} gesture
-   * @param {Function} handler
-   * @param {Boolean} capture
-   */
-  scope.addEventListener = function(node, gesture, handler, capture) {
-    if (handler) {
-      scope.activateGesture(node, gesture);
-      node.addEventListener(gesture, handler, capture);
-    }
-  };
-
-  /**
-   * Tears down the gesture configuration for `node`
-   *
-   * If `handler` is the last listener for `gesture`, the underlying gesture recognizer is disabled.
-   *
-   * @param {Element} node
-   * @param {string} gesture
-   * @return Boolean `gesture` is a valid gesture
-   */
-  scope.deactivateGesture = function(node, gesture) {
-    var g = gesture.toLowerCase();
-    var dep = dispatcher.dependencyMap[g];
-    if (dep) {
-      if (node._pgListeners > 0) {
-        node._pgListeners--;
-      }
-      if (node._pgListeners === 0) {
-        dispatcher.unregister(node);
-      }
-      if (node._pgEvents) {
-        if (node._pgEvents[g] > 0) {
-          node._pgEvents[g]--;
-        } else {
-          node._pgEvents[g] = 0;
-        }
-      }
-    }
-    return Boolean(dep);
-  };
-
-  /**
-   * Stop listening for `gesture` from `node` with `handler` function.
-   *
-   * @param {Element} node
-   * @param {string} gesture
-   * @param {Function} handler
-   * @param {Boolean} capture
-   */
-  scope.removeEventListener = function(node, gesture, handler, capture) {
-    if (handler) {
-      scope.deactivateGesture(node, gesture);
-      node.removeEventListener(gesture, handler, capture);
-    }
-  };
-})(window.PolymerGestures);
-
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var pointermap = dispatcher.pointermap;
-  // radius around touchend that swallows mouse events
-  var DEDUP_DIST = 25;
-
-  var WHICH_TO_BUTTONS = [0, 1, 4, 2];
-
-  var currentButtons = 0;
-
-  var FIREFOX_LINUX = /Linux.*Firefox\//i;
-
-  var HAS_BUTTONS = (function() {
-    // firefox on linux returns spec-incorrect values for mouseup.buttons
-    // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent.buttons#See_also
-    // https://codereview.chromium.org/727593003/#msg16
-    if (FIREFOX_LINUX.test(navigator.userAgent)) {
-      return false;
-    }
-    try {
-      return new MouseEvent('test', {buttons: 1}).buttons === 1;
-    } catch (e) {
-      return false;
-    }
-  })();
-
-  // handler block for native mouse events
-  var mouseEvents = {
-    POINTER_ID: 1,
-    POINTER_TYPE: 'mouse',
-    events: [
-      'mousedown',
-      'mousemove',
-      'mouseup'
-    ],
-    exposes: [
-      'down',
-      'up',
-      'move'
-    ],
-    register: function(target) {
-      dispatcher.listen(target, this.events);
-    },
-    unregister: function(target) {
-      if (target.nodeType === Node.DOCUMENT_NODE) {
-        return;
-      }
-      dispatcher.unlisten(target, this.events);
-    },
-    lastTouches: [],
-    // collide with the global mouse listener
-    isEventSimulatedFromTouch: function(inEvent) {
-      var lts = this.lastTouches;
-      var x = inEvent.clientX, y = inEvent.clientY;
-      for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
-        // simulated mouse events will be swallowed near a primary touchend
-        var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
-        if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {
-          return true;
-        }
-      }
-    },
-    prepareEvent: function(inEvent) {
-      var e = dispatcher.cloneEvent(inEvent);
-      e.pointerId = this.POINTER_ID;
-      e.isPrimary = true;
-      e.pointerType = this.POINTER_TYPE;
-      e._source = 'mouse';
-      if (!HAS_BUTTONS) {
-        var type = inEvent.type;
-        var bit = WHICH_TO_BUTTONS[inEvent.which] || 0;
-        if (type === 'mousedown') {
-          currentButtons |= bit;
-        } else if (type === 'mouseup') {
-          currentButtons &= ~bit;
-        }
-        e.buttons = currentButtons;
-      }
-      return e;
-    },
-    mousedown: function(inEvent) {
-      if (!this.isEventSimulatedFromTouch(inEvent)) {
-        var p = pointermap.has(this.POINTER_ID);
-        var e = this.prepareEvent(inEvent);
-        e.target = scope.findTarget(inEvent);
-        pointermap.set(this.POINTER_ID, e.target);
-        dispatcher.down(e);
-      }
-    },
-    mousemove: function(inEvent) {
-      if (!this.isEventSimulatedFromTouch(inEvent)) {
-        var target = pointermap.get(this.POINTER_ID);
-        if (target) {
-          var e = this.prepareEvent(inEvent);
-          e.target = target;
-          // handle case where we missed a mouseup
-          if ((HAS_BUTTONS ? e.buttons : e.which) === 0) {
-            if (!HAS_BUTTONS) {
-              currentButtons = e.buttons = 0;
-            }
-            dispatcher.cancel(e);
-            this.cleanupMouse(e.buttons);
-          } else {
-            dispatcher.move(e);
-          }
-        }
-      }
-    },
-    mouseup: function(inEvent) {
-      if (!this.isEventSimulatedFromTouch(inEvent)) {
-        var e = this.prepareEvent(inEvent);
-        e.relatedTarget = scope.findTarget(inEvent);
-        e.target = pointermap.get(this.POINTER_ID);
-        dispatcher.up(e);
-        this.cleanupMouse(e.buttons);
-      }
-    },
-    cleanupMouse: function(buttons) {
-      if (buttons === 0) {
-        pointermap.delete(this.POINTER_ID);
-      }
-    }
-  };
-
-  scope.mouseEvents = mouseEvents;
-})(window.PolymerGestures);
-
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var allShadows = scope.targetFinding.allShadows.bind(scope.targetFinding);
-  var pointermap = dispatcher.pointermap;
-  var touchMap = Array.prototype.map.call.bind(Array.prototype.map);
-  // This should be long enough to ignore compat mouse events made by touch
-  var DEDUP_TIMEOUT = 2500;
-  var DEDUP_DIST = 25;
-  var CLICK_COUNT_TIMEOUT = 200;
-  var HYSTERESIS = 20;
-  var ATTRIB = 'touch-action';
-  // TODO(dfreedm): disable until http://crbug.com/399765 is resolved
-  // var HAS_TOUCH_ACTION = ATTRIB in document.head.style;
-  var HAS_TOUCH_ACTION = false;
-
-  // handler block for native touch events
-  var touchEvents = {
-    IS_IOS: false,
-    events: [
-      'touchstart',
-      'touchmove',
-      'touchend',
-      'touchcancel'
-    ],
-    exposes: [
-      'down',
-      'up',
-      'move'
-    ],
-    register: function(target, initial) {
-      if (this.IS_IOS ? initial : !initial) {
-        dispatcher.listen(target, this.events);
-      }
-    },
-    unregister: function(target) {
-      if (!this.IS_IOS) {
-        dispatcher.unlisten(target, this.events);
-      }
-    },
-    scrollTypes: {
-      EMITTER: 'none',
-      XSCROLLER: 'pan-x',
-      YSCROLLER: 'pan-y',
-    },
-    touchActionToScrollType: function(touchAction) {
-      var t = touchAction;
-      var st = this.scrollTypes;
-      if (t === st.EMITTER) {
-        return 'none';
-      } else if (t === st.XSCROLLER) {
-        return 'X';
-      } else if (t === st.YSCROLLER) {
-        return 'Y';
-      } else {
-        return 'XY';
-      }
-    },
-    POINTER_TYPE: 'touch',
-    firstTouch: null,
-    isPrimaryTouch: function(inTouch) {
-      return this.firstTouch === inTouch.identifier;
-    },
-    setPrimaryTouch: function(inTouch) {
-      // set primary touch if there no pointers, or the only pointer is the mouse
-      if (pointermap.pointers() === 0 || (pointermap.pointers() === 1 && pointermap.has(1))) {
-        this.firstTouch = inTouch.identifier;
-        this.firstXY = {X: inTouch.clientX, Y: inTouch.clientY};
-        this.firstTarget = inTouch.target;
-        this.scrolling = null;
-        this.cancelResetClickCount();
-      }
-    },
-    removePrimaryPointer: function(inPointer) {
-      if (inPointer.isPrimary) {
-        this.firstTouch = null;
-        this.firstXY = null;
-        this.resetClickCount();
-      }
-    },
-    clickCount: 0,
-    resetId: null,
-    resetClickCount: function() {
-      var fn = function() {
-        this.clickCount = 0;
-        this.resetId = null;
-      }.bind(this);
-      this.resetId = setTimeout(fn, CLICK_COUNT_TIMEOUT);
-    },
-    cancelResetClickCount: function() {
-      if (this.resetId) {
-        clearTimeout(this.resetId);
-      }
-    },
-    typeToButtons: function(type) {
-      var ret = 0;
-      if (type === 'touchstart' || type === 'touchmove') {
-        ret = 1;
-      }
-      return ret;
-    },
-    findTarget: function(touch, id) {
-      if (this.currentTouchEvent.type === 'touchstart') {
-        if (this.isPrimaryTouch(touch)) {
-          var fastPath = {
-            clientX: touch.clientX,
-            clientY: touch.clientY,
-            path: this.currentTouchEvent.path,
-            target: this.currentTouchEvent.target
-          };
-          return scope.findTarget(fastPath);
-        } else {
-          return scope.findTarget(touch);
-        }
-      }
-      // reuse target we found in touchstart
-      return pointermap.get(id);
-    },
-    touchToPointer: function(inTouch) {
-      var cte = this.currentTouchEvent;
-      var e = dispatcher.cloneEvent(inTouch);
-      // Spec specifies that pointerId 1 is reserved for Mouse.
-      // Touch identifiers can start at 0.
-      // Add 2 to the touch identifier for compatibility.
-      var id = e.pointerId = inTouch.identifier + 2;
-      e.target = this.findTarget(inTouch, id);
-      e.bubbles = true;
-      e.cancelable = true;
-      e.detail = this.clickCount;
-      e.buttons = this.typeToButtons(cte.type);
-      e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;
-      e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;
-      e.pressure = inTouch.webkitForce || inTouch.force || 0.5;
-      e.isPrimary = this.isPrimaryTouch(inTouch);
-      e.pointerType = this.POINTER_TYPE;
-      e._source = 'touch';
-      // forward touch preventDefaults
-      var self = this;
-      e.preventDefault = function() {
-        self.scrolling = false;
-        self.firstXY = null;
-        cte.preventDefault();
-      };
-      return e;
-    },
-    processTouches: function(inEvent, inFunction) {
-      var tl = inEvent.changedTouches;
-      this.currentTouchEvent = inEvent;
-      for (var i = 0, t, p; i < tl.length; i++) {
-        t = tl[i];
-        p = this.touchToPointer(t);
-        if (inEvent.type === 'touchstart') {
-          pointermap.set(p.pointerId, p.target);
-        }
-        if (pointermap.has(p.pointerId)) {
-          inFunction.call(this, p);
-        }
-        if (inEvent.type === 'touchend' || inEvent._cancel) {
-          this.cleanUpPointer(p);
-        }
-      }
-    },
-    // For single axis scrollers, determines whether the element should emit
-    // pointer events or behave as a scroller
-    shouldScroll: function(inEvent) {
-      if (this.firstXY) {
-        var ret;
-        var touchAction = scope.targetFinding.findTouchAction(inEvent);
-        var scrollAxis = this.touchActionToScrollType(touchAction);
-        if (scrollAxis === 'none') {
-          // this element is a touch-action: none, should never scroll
-          ret = false;
-        } else if (scrollAxis === 'XY') {
-          // this element should always scroll
-          ret = true;
-        } else {
-          var t = inEvent.changedTouches[0];
-          // check the intended scroll axis, and other axis
-          var a = scrollAxis;
-          var oa = scrollAxis === 'Y' ? 'X' : 'Y';
-          var da = Math.abs(t['client' + a] - this.firstXY[a]);
-          var doa = Math.abs(t['client' + oa] - this.firstXY[oa]);
-          // if delta in the scroll axis > delta other axis, scroll instead of
-          // making events
-          ret = da >= doa;
-        }
-        return ret;
-      }
-    },
-    findTouch: function(inTL, inId) {
-      for (var i = 0, l = inTL.length, t; i < l && (t = inTL[i]); i++) {
-        if (t.identifier === inId) {
-          return true;
-        }
-      }
-    },
-    // In some instances, a touchstart can happen without a touchend. This
-    // leaves the pointermap in a broken state.
-    // Therefore, on every touchstart, we remove the touches that did not fire a
-    // touchend event.
-    // To keep state globally consistent, we fire a
-    // pointercancel for this "abandoned" touch
-    vacuumTouches: function(inEvent) {
-      var tl = inEvent.touches;
-      // pointermap.pointers() should be < tl.length here, as the touchstart has not
-      // been processed yet.
-      if (pointermap.pointers() >= tl.length) {
-        var d = [];
-        pointermap.forEach(function(value, key) {
-          // Never remove pointerId == 1, which is mouse.
-          // Touch identifiers are 2 smaller than their pointerId, which is the
-          // index in pointermap.
-          if (key !== 1 && !this.findTouch(tl, key - 2)) {
-            var p = value;
-            d.push(p);
-          }
-        }, this);
-        d.forEach(function(p) {
-          this.cancel(p);
-          pointermap.delete(p.pointerId);
-        }, this);
-      }
-    },
-    touchstart: function(inEvent) {
-      this.vacuumTouches(inEvent);
-      this.setPrimaryTouch(inEvent.changedTouches[0]);
-      this.dedupSynthMouse(inEvent);
-      if (!this.scrolling) {
-        this.clickCount++;
-        this.processTouches(inEvent, this.down);
-      }
-    },
-    down: function(inPointer) {
-      dispatcher.down(inPointer);
-    },
-    touchmove: function(inEvent) {
-      if (HAS_TOUCH_ACTION) {
-        // touchevent.cancelable == false is sent when the page is scrolling under native Touch Action in Chrome 36
-        // https://groups.google.com/a/chromium.org/d/msg/input-dev/wHnyukcYBcA/b9kmtwM1jJQJ
-        if (inEvent.cancelable) {
-          this.processTouches(inEvent, this.move);
-        }
-      } else {
-        if (!this.scrolling) {
-          if (this.scrolling === null && this.shouldScroll(inEvent)) {
-            this.scrolling = true;
-          } else {
-            this.scrolling = false;
-            inEvent.preventDefault();
-            this.processTouches(inEvent, this.move);
-          }
-        } else if (this.firstXY) {
-          var t = inEvent.changedTouches[0];
-          var dx = t.clientX - this.firstXY.X;
-          var dy = t.clientY - this.firstXY.Y;
-          var dd = Math.sqrt(dx * dx + dy * dy);
-          if (dd >= HYSTERESIS) {
-            this.touchcancel(inEvent);
-            this.scrolling = true;
-            this.firstXY = null;
-          }
-        }
-      }
-    },
-    move: function(inPointer) {
-      dispatcher.move(inPointer);
-    },
-    touchend: function(inEvent) {
-      this.dedupSynthMouse(inEvent);
-      this.processTouches(inEvent, this.up);
-    },
-    up: function(inPointer) {
-      inPointer.relatedTarget = scope.findTarget(inPointer);
-      dispatcher.up(inPointer);
-    },
-    cancel: function(inPointer) {
-      dispatcher.cancel(inPointer);
-    },
-    touchcancel: function(inEvent) {
-      inEvent._cancel = true;
-      this.processTouches(inEvent, this.cancel);
-    },
-    cleanUpPointer: function(inPointer) {
-      pointermap['delete'](inPointer.pointerId);
-      this.removePrimaryPointer(inPointer);
-    },
-    // prevent synth mouse events from creating pointer events
-    dedupSynthMouse: function(inEvent) {
-      var lts = scope.mouseEvents.lastTouches;
-      var t = inEvent.changedTouches[0];
-      // only the primary finger will synth mouse events
-      if (this.isPrimaryTouch(t)) {
-        // remember x/y of last touch
-        var lt = {x: t.clientX, y: t.clientY};
-        lts.push(lt);
-        var fn = (function(lts, lt){
-          var i = lts.indexOf(lt);
-          if (i > -1) {
-            lts.splice(i, 1);
-          }
-        }).bind(null, lts, lt);
-        setTimeout(fn, DEDUP_TIMEOUT);
-      }
-    }
-  };
-
-  // prevent "ghost clicks" that come from elements that were removed in a touch handler
-  var STOP_PROP_FN = Event.prototype.stopImmediatePropagation || Event.prototype.stopPropagation;
-  document.addEventListener('click', function(ev) {
-    var x = ev.clientX, y = ev.clientY;
-    // check if a click is within DEDUP_DIST px radius of the touchstart
-    var closeTo = function(touch) {
-      var dx = Math.abs(x - touch.x), dy = Math.abs(y - touch.y);
-      return (dx <= DEDUP_DIST && dy <= DEDUP_DIST);
-    };
-    // if click coordinates are close to touch coordinates, assume the click came from a touch
-    var wasTouched = scope.mouseEvents.lastTouches.some(closeTo);
-    // if the click came from touch, and the touchstart target is not in the path of the click event,
-    // then the touchstart target was probably removed, and the click should be "busted"
-    var path = scope.targetFinding.path(ev);
-    if (wasTouched) {
-      for (var i = 0; i < path.length; i++) {
-        if (path[i] === touchEvents.firstTarget) {
-          return;
-        }
-      }
-      ev.preventDefault();
-      STOP_PROP_FN.call(ev);
-    }
-  }, true);
-
-  scope.touchEvents = touchEvents;
-})(window.PolymerGestures);
-
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var pointermap = dispatcher.pointermap;
-  var HAS_BITMAP_TYPE = window.MSPointerEvent && typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE === 'number';
-  var msEvents = {
-    events: [
-      'MSPointerDown',
-      'MSPointerMove',
-      'MSPointerUp',
-      'MSPointerCancel',
-    ],
-    register: function(target) {
-      dispatcher.listen(target, this.events);
-    },
-    unregister: function(target) {
-      if (target.nodeType === Node.DOCUMENT_NODE) {
-        return;
-      }
-      dispatcher.unlisten(target, this.events);
-    },
-    POINTER_TYPES: [
-      '',
-      'unavailable',
-      'touch',
-      'pen',
-      'mouse'
-    ],
-    prepareEvent: function(inEvent) {
-      var e = inEvent;
-      e = dispatcher.cloneEvent(inEvent);
-      if (HAS_BITMAP_TYPE) {
-        e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
-      }
-      e._source = 'ms';
-      return e;
-    },
-    cleanup: function(id) {
-      pointermap['delete'](id);
-    },
-    MSPointerDown: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.target = scope.findTarget(inEvent);
-      pointermap.set(inEvent.pointerId, e.target);
-      dispatcher.down(e);
-    },
-    MSPointerMove: function(inEvent) {
-      var target = pointermap.get(inEvent.pointerId);
-      if (target) {
-        var e = this.prepareEvent(inEvent);
-        e.target = target;
-        dispatcher.move(e);
-      }
-    },
-    MSPointerUp: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.relatedTarget = scope.findTarget(inEvent);
-      e.target = pointermap.get(e.pointerId);
-      dispatcher.up(e);
-      this.cleanup(inEvent.pointerId);
-    },
-    MSPointerCancel: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.relatedTarget = scope.findTarget(inEvent);
-      e.target = pointermap.get(e.pointerId);
-      dispatcher.cancel(e);
-      this.cleanup(inEvent.pointerId);
-    }
-  };
-
-  scope.msEvents = msEvents;
-})(window.PolymerGestures);
-
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var pointermap = dispatcher.pointermap;
-  var pointerEvents = {
-    events: [
-      'pointerdown',
-      'pointermove',
-      'pointerup',
-      'pointercancel'
-    ],
-    prepareEvent: function(inEvent) {
-      var e = dispatcher.cloneEvent(inEvent);
-      e._source = 'pointer';
-      return e;
-    },
-    register: function(target) {
-      dispatcher.listen(target, this.events);
-    },
-    unregister: function(target) {
-      if (target.nodeType === Node.DOCUMENT_NODE) {
-        return;
-      }
-      dispatcher.unlisten(target, this.events);
-    },
-    cleanup: function(id) {
-      pointermap['delete'](id);
-    },
-    pointerdown: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.target = scope.findTarget(inEvent);
-      pointermap.set(e.pointerId, e.target);
-      dispatcher.down(e);
-    },
-    pointermove: function(inEvent) {
-      var target = pointermap.get(inEvent.pointerId);
-      if (target) {
-        var e = this.prepareEvent(inEvent);
-        e.target = target;
-        dispatcher.move(e);
-      }
-    },
-    pointerup: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.relatedTarget = scope.findTarget(inEvent);
-      e.target = pointermap.get(e.pointerId);
-      dispatcher.up(e);
-      this.cleanup(inEvent.pointerId);
-    },
-    pointercancel: function(inEvent) {
-      var e = this.prepareEvent(inEvent);
-      e.relatedTarget = scope.findTarget(inEvent);
-      e.target = pointermap.get(e.pointerId);
-      dispatcher.cancel(e);
-      this.cleanup(inEvent.pointerId);
-    }
-  };
-
-  scope.pointerEvents = pointerEvents;
-})(window.PolymerGestures);
-
-/**
- * This module contains the handlers for native platform events.
- * From here, the dispatcher is called to create unified pointer events.
- * Included are touch events (v1), mouse events, and MSPointerEvents.
- */
-(function(scope) {
-
-  var dispatcher = scope.dispatcher;
-  var nav = window.navigator;
-
-  if (window.PointerEvent) {
-    dispatcher.registerSource('pointer', scope.pointerEvents);
-  } else if (nav.msPointerEnabled) {
-    dispatcher.registerSource('ms', scope.msEvents);
-  } else {
-    dispatcher.registerSource('mouse', scope.mouseEvents);
-    if (window.ontouchstart !== undefined) {
-      dispatcher.registerSource('touch', scope.touchEvents);
-    }
-  }
-
-  // Work around iOS bugs https://bugs.webkit.org/show_bug.cgi?id=135628 and https://bugs.webkit.org/show_bug.cgi?id=136506
-  var ua = navigator.userAgent;
-  var IS_IOS = ua.match(/iPad|iPhone|iPod/) && 'ontouchstart' in window;
-
-  dispatcher.IS_IOS = IS_IOS;
-  scope.touchEvents.IS_IOS = IS_IOS;
-
-  dispatcher.register(document, true);
-})(window.PolymerGestures);
-
-/**
- * This event denotes the beginning of a series of tracking events.
- *
- * @module PointerGestures
- * @submodule Events
- * @class trackstart
- */
-/**
- * Pixels moved in the x direction since trackstart.
- * @type Number
- * @property dx
- */
-/**
- * Pixes moved in the y direction since trackstart.
- * @type Number
- * @property dy
- */
-/**
- * Pixels moved in the x direction since the last track.
- * @type Number
- * @property ddx
- */
-/**
- * Pixles moved in the y direction since the last track.
- * @type Number
- * @property ddy
- */
-/**
- * The clientX position of the track gesture.
- * @type Number
- * @property clientX
- */
-/**
- * The clientY position of the track gesture.
- * @type Number
- * @property clientY
- */
-/**
- * The pageX position of the track gesture.
- * @type Number
- * @property pageX
- */
-/**
- * The pageY position of the track gesture.
- * @type Number
- * @property pageY
- */
-/**
- * The screenX position of the track gesture.
- * @type Number
- * @property screenX
- */
-/**
- * The screenY position of the track gesture.
- * @type Number
- * @property screenY
- */
-/**
- * The last x axis direction of the pointer.
- * @type Number
- * @property xDirection
- */
-/**
- * The last y axis direction of the pointer.
- * @type Number
- * @property yDirection
- */
-/**
- * A shared object between all tracking events.
- * @type Object
- * @property trackInfo
- */
-/**
- * The element currently under the pointer.
- * @type Element
- * @property relatedTarget
- */
-/**
- * The type of pointer that make the track gesture.
- * @type String
- * @property pointerType
- */
-/**
- *
- * This event fires for all pointer movement being tracked.
- *
- * @class track
- * @extends trackstart
- */
-/**
- * This event fires when the pointer is no longer being tracked.
- *
- * @class trackend
- * @extends trackstart
- */
-
- (function(scope) {
-   var dispatcher = scope.dispatcher;
-   var eventFactory = scope.eventFactory;
-   var pointermap = new scope.PointerMap();
-   var track = {
-     events: [
-       'down',
-       'move',
-       'up',
-     ],
-     exposes: [
-      'trackstart',
-      'track',
-      'trackx',
-      'tracky',
-      'trackend'
-     ],
-     defaultActions: {
-       'track': 'none',
-       'trackx': 'pan-y',
-       'tracky': 'pan-x'
-     },
-     WIGGLE_THRESHOLD: 4,
-     clampDir: function(inDelta) {
-       return inDelta > 0 ? 1 : -1;
-     },
-     calcPositionDelta: function(inA, inB) {
-       var x = 0, y = 0;
-       if (inA && inB) {
-         x = inB.pageX - inA.pageX;
-         y = inB.pageY - inA.pageY;
-       }
-       return {x: x, y: y};
-     },
-     fireTrack: function(inType, inEvent, inTrackingData) {
-       var t = inTrackingData;
-       var d = this.calcPositionDelta(t.downEvent, inEvent);
-       var dd = this.calcPositionDelta(t.lastMoveEvent, inEvent);
-       if (dd.x) {
-         t.xDirection = this.clampDir(dd.x);
-       } else if (inType === 'trackx') {
-         return;
-       }
-       if (dd.y) {
-         t.yDirection = this.clampDir(dd.y);
-       } else if (inType === 'tracky') {
-         return;
-       }
-       var gestureProto = {
-         bubbles: true,
-         cancelable: true,
-         trackInfo: t.trackInfo,
-         relatedTarget: inEvent.relatedTarget,
-         pointerType: inEvent.pointerType,
-         pointerId: inEvent.pointerId,
-         _source: 'track'
-       };
-       if (inType !== 'tracky') {
-         gestureProto.x = inEvent.x;
-         gestureProto.dx = d.x;
-         gestureProto.ddx = dd.x;
-         gestureProto.clientX = inEvent.clientX;
-         gestureProto.pageX = inEvent.pageX;
-         gestureProto.screenX = inEvent.screenX;
-         gestureProto.xDirection = t.xDirection;
-       }
-       if (inType !== 'trackx') {
-         gestureProto.dy = d.y;
-         gestureProto.ddy = dd.y;
-         gestureProto.y = inEvent.y;
-         gestureProto.clientY = inEvent.clientY;
-         gestureProto.pageY = inEvent.pageY;
-         gestureProto.screenY = inEvent.screenY;
-         gestureProto.yDirection = t.yDirection;
-       }
-       var e = eventFactory.makeGestureEvent(inType, gestureProto);
-       t.downTarget.dispatchEvent(e);
-     },
-     down: function(inEvent) {
-       if (inEvent.isPrimary && (inEvent.pointerType === 'mouse' ? inEvent.buttons === 1 : true)) {
-         var p = {
-           downEvent: inEvent,
-           downTarget: inEvent.target,
-           trackInfo: {},
-           lastMoveEvent: null,
-           xDirection: 0,
-           yDirection: 0,
-           tracking: false
-         };
-         pointermap.set(inEvent.pointerId, p);
-       }
-     },
-     move: function(inEvent) {
-       var p = pointermap.get(inEvent.pointerId);
-       if (p) {
-         if (!p.tracking) {
-           var d = this.calcPositionDelta(p.downEvent, inEvent);
-           var move = d.x * d.x + d.y * d.y;
-           // start tracking only if finger moves more than WIGGLE_THRESHOLD
-           if (move > this.WIGGLE_THRESHOLD) {
-             p.tracking = true;
-             p.lastMoveEvent = p.downEvent;
-             this.fireTrack('trackstart', inEvent, p);
-           }
-         }
-         if (p.tracking) {
-           this.fireTrack('track', inEvent, p);
-           this.fireTrack('trackx', inEvent, p);
-           this.fireTrack('tracky', inEvent, p);
-         }
-         p.lastMoveEvent = inEvent;
-       }
-     },
-     up: function(inEvent) {
-       var p = pointermap.get(inEvent.pointerId);
-       if (p) {
-         if (p.tracking) {
-           this.fireTrack('trackend', inEvent, p);
-         }
-         pointermap.delete(inEvent.pointerId);
-       }
-     }
-   };
-   dispatcher.registerGesture('track', track);
- })(window.PolymerGestures);
-
-/**
- * This event is fired when a pointer is held down for 200ms.
- *
- * @module PointerGestures
- * @submodule Events
- * @class hold
- */
-/**
- * Type of pointer that made the holding event.
- * @type String
- * @property pointerType
- */
-/**
- * Screen X axis position of the held pointer
- * @type Number
- * @property clientX
- */
-/**
- * Screen Y axis position of the held pointer
- * @type Number
- * @property clientY
- */
-/**
- * Type of pointer that made the holding event.
- * @type String
- * @property pointerType
- */
-/**
- * This event is fired every 200ms while a pointer is held down.
- *
- * @class holdpulse
- * @extends hold
- */
-/**
- * Milliseconds pointer has been held down.
- * @type Number
- * @property holdTime
- */
-/**
- * This event is fired when a held pointer is released or moved.
- *
- * @class release
- */
-
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var eventFactory = scope.eventFactory;
-  var hold = {
-    // wait at least HOLD_DELAY ms between hold and pulse events
-    HOLD_DELAY: 200,
-    // pointer can move WIGGLE_THRESHOLD pixels before not counting as a hold
-    WIGGLE_THRESHOLD: 16,
-    events: [
-      'down',
-      'move',
-      'up',
-    ],
-    exposes: [
-      'hold',
-      'holdpulse',
-      'release'
-    ],
-    heldPointer: null,
-    holdJob: null,
-    pulse: function() {
-      var hold = Date.now() - this.heldPointer.timeStamp;
-      var type = this.held ? 'holdpulse' : 'hold';
-      this.fireHold(type, hold);
-      this.held = true;
-    },
-    cancel: function() {
-      clearInterval(this.holdJob);
-      if (this.held) {
-        this.fireHold('release');
-      }
-      this.held = false;
-      this.heldPointer = null;
-      this.target = null;
-      this.holdJob = null;
-    },
-    down: function(inEvent) {
-      if (inEvent.isPrimary && !this.heldPointer) {
-        this.heldPointer = inEvent;
-        this.target = inEvent.target;
-        this.holdJob = setInterval(this.pulse.bind(this), this.HOLD_DELAY);
-      }
-    },
-    up: function(inEvent) {
-      if (this.heldPointer && this.heldPointer.pointerId === inEvent.pointerId) {
-        this.cancel();
-      }
-    },
-    move: function(inEvent) {
-      if (this.heldPointer && this.heldPointer.pointerId === inEvent.pointerId) {
-        var x = inEvent.clientX - this.heldPointer.clientX;
-        var y = inEvent.clientY - this.heldPointer.clientY;
-        if ((x * x + y * y) > this.WIGGLE_THRESHOLD) {
-          this.cancel();
-        }
-      }
-    },
-    fireHold: function(inType, inHoldTime) {
-      var p = {
-        bubbles: true,
-        cancelable: true,
-        pointerType: this.heldPointer.pointerType,
-        pointerId: this.heldPointer.pointerId,
-        x: this.heldPointer.clientX,
-        y: this.heldPointer.clientY,
-        _source: 'hold'
-      };
-      if (inHoldTime) {
-        p.holdTime = inHoldTime;
-      }
-      var e = eventFactory.makeGestureEvent(inType, p);
-      this.target.dispatchEvent(e);
-    }
-  };
-  dispatcher.registerGesture('hold', hold);
-})(window.PolymerGestures);
-
-/**
- * This event is fired when a pointer quickly goes down and up, and is used to
- * denote activation.
- *
- * Any gesture event can prevent the tap event from being created by calling
- * `event.preventTap`.
- *
- * Any pointer event can prevent the tap by setting the `tapPrevented` property
- * on itself.
- *
- * @module PointerGestures
- * @submodule Events
- * @class tap
- */
-/**
- * X axis position of the tap.
- * @property x
- * @type Number
- */
-/**
- * Y axis position of the tap.
- * @property y
- * @type Number
- */
-/**
- * Type of the pointer that made the tap.
- * @property pointerType
- * @type String
- */
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var eventFactory = scope.eventFactory;
-  var pointermap = new scope.PointerMap();
-  var tap = {
-    events: [
-      'down',
-      'up'
-    ],
-    exposes: [
-      'tap'
-    ],
-    down: function(inEvent) {
-      if (inEvent.isPrimary && !inEvent.tapPrevented) {
-        pointermap.set(inEvent.pointerId, {
-          target: inEvent.target,
-          buttons: inEvent.buttons,
-          x: inEvent.clientX,
-          y: inEvent.clientY
-        });
-      }
-    },
-    shouldTap: function(e, downState) {
-      var tap = true;
-      if (e.pointerType === 'mouse') {
-        // only allow left click to tap for mouse
-        tap = (e.buttons ^ 1) && (downState.buttons & 1);
-      }
-      return tap && !e.tapPrevented;
-    },
-    up: function(inEvent) {
-      var start = pointermap.get(inEvent.pointerId);
-      if (start && this.shouldTap(inEvent, start)) {
-        // up.relatedTarget is target currently under finger
-        var t = scope.targetFinding.LCA(start.target, inEvent.relatedTarget);
-        if (t) {
-          var e = eventFactory.makeGestureEvent('tap', {
-            bubbles: true,
-            cancelable: true,
-            x: inEvent.clientX,
-            y: inEvent.clientY,
-            detail: inEvent.detail,
-            pointerType: inEvent.pointerType,
-            pointerId: inEvent.pointerId,
-            altKey: inEvent.altKey,
-            ctrlKey: inEvent.ctrlKey,
-            metaKey: inEvent.metaKey,
-            shiftKey: inEvent.shiftKey,
-            _source: 'tap'
-          });
-          t.dispatchEvent(e);
-        }
-      }
-      pointermap.delete(inEvent.pointerId);
-    }
-  };
-  // patch eventFactory to remove id from tap's pointermap for preventTap calls
-  eventFactory.preventTap = function(e) {
-    return function() {
-      e.tapPrevented = true;
-      pointermap.delete(e.pointerId);
-    };
-  };
-  dispatcher.registerGesture('tap', tap);
-})(window.PolymerGestures);
-
-/*
- * Basic strategy: find the farthest apart points, use as diameter of circle
- * react to size change and rotation of the chord
- */
-
-/**
- * @module pointer-gestures
- * @submodule Events
- * @class pinch
- */
-/**
- * Scale of the pinch zoom gesture
- * @property scale
- * @type Number
- */
-/**
- * Center X position of pointers causing pinch
- * @property centerX
- * @type Number
- */
-/**
- * Center Y position of pointers causing pinch
- * @property centerY
- * @type Number
- */
-
-/**
- * @module pointer-gestures
- * @submodule Events
- * @class rotate
- */
-/**
- * Angle (in degrees) of rotation. Measured from starting positions of pointers.
- * @property angle
- * @type Number
- */
-/**
- * Center X position of pointers causing rotation
- * @property centerX
- * @type Number
- */
-/**
- * Center Y position of pointers causing rotation
- * @property centerY
- * @type Number
- */
-(function(scope) {
-  var dispatcher = scope.dispatcher;
-  var eventFactory = scope.eventFactory;
-  var pointermap = new scope.PointerMap();
-  var RAD_TO_DEG = 180 / Math.PI;
-  var pinch = {
-    events: [
-      'down',
-      'up',
-      'move',
-      'cancel'
-    ],
-    exposes: [
-      'pinchstart',
-      'pinch',
-      'pinchend',
-      'rotate'
-    ],
-    defaultActions: {
-      'pinch': 'none',
-      'rotate': 'none'
-    },
-    reference: {},
-    down: function(inEvent) {
-      pointermap.set(inEvent.pointerId, inEvent);
-      if (pointermap.pointers() == 2) {
-        var points = this.calcChord();
-        var angle = this.calcAngle(points);
-        this.reference = {
-          angle: angle,
-          diameter: points.diameter,
-          target: scope.targetFinding.LCA(points.a.target, points.b.target)
-        };
-
-        this.firePinch('pinchstart', points.diameter, points);
-      }
-    },
-    up: function(inEvent) {
-      var p = pointermap.get(inEvent.pointerId);
-      var num = pointermap.pointers();
-      if (p) {
-        if (num === 2) {
-          // fire 'pinchend' before deleting pointer
-          var points = this.calcChord();
-          this.firePinch('pinchend', points.diameter, points);
-        }
-        pointermap.delete(inEvent.pointerId);
-      }
-    },
-    move: function(inEvent) {
-      if (pointermap.has(inEvent.pointerId)) {
-        pointermap.set(inEvent.pointerId, inEvent);
-        if (pointermap.pointers() > 1) {
-          this.calcPinchRotate();
-        }
-      }
-    },
-    cancel: function(inEvent) {
-        this.up(inEvent);
-    },
-    firePinch: function(type, diameter, points) {
-      var zoom = diameter / this.reference.diameter;
-      var e = eventFactory.makeGestureEvent(type, {
-        bubbles: true,
-        cancelable: true,
-        scale: zoom,
-        centerX: points.center.x,
-        centerY: points.center.y,
-        _source: 'pinch'
-      });
-      this.reference.target.dispatchEvent(e);
-    },
-    fireRotate: function(angle, points) {
-      var diff = Math.round((angle - this.reference.angle) % 360);
-      var e = eventFactory.makeGestureEvent('rotate', {
-        bubbles: true,
-        cancelable: true,
-        angle: diff,
-        centerX: points.center.x,
-        centerY: points.center.y,
-        _source: 'pinch'
-      });
-      this.reference.target.dispatchEvent(e);
-    },
-    calcPinchRotate: function() {
-      var points = this.calcChord();
-      var diameter = points.diameter;
-      var angle = this.calcAngle(points);
-      if (diameter != this.reference.diameter) {
-        this.firePinch('pinch', diameter, points);
-      }
-      if (angle != this.reference.angle) {
-        this.fireRotate(angle, points);
-      }
-    },
-    calcChord: function() {
-      var pointers = [];
-      pointermap.forEach(function(p) {
-        pointers.push(p);
-      });
-      var dist = 0;
-      // start with at least two pointers
-      var points = {a: pointers[0], b: pointers[1]};
-      var x, y, d;
-      for (var i = 0; i < pointers.length; i++) {
-        var a = pointers[i];
-        for (var j = i + 1; j < pointers.length; j++) {
-          var b = pointers[j];
-          x = Math.abs(a.clientX - b.clientX);
-          y = Math.abs(a.clientY - b.clientY);
-          d = x + y;
-          if (d > dist) {
-            dist = d;
-            points = {a: a, b: b};
-          }
-        }
-      }
-      x = Math.abs(points.a.clientX + points.b.clientX) / 2;
-      y = Math.abs(points.a.clientY + points.b.clientY) / 2;
-      points.center = { x: x, y: y };
-      points.diameter = dist;
-      return points;
-    },
-    calcAngle: function(points) {
-      var x = points.a.clientX - points.b.clientX;
-      var y = points.a.clientY - points.b.clientY;
-      return (360 + Math.atan2(y, x) * RAD_TO_DEG) % 360;
-    }
-  };
-  dispatcher.registerGesture('pinch', pinch);
-})(window.PolymerGestures);
-
-(function (global) {
-    'use strict';
-
-    var Token,
-        TokenName,
-        Syntax,
-        Messages,
-        source,
-        index,
-        length,
-        delegate,
-        lookahead,
-        state;
-
-    Token = {
-        BooleanLiteral: 1,
-        EOF: 2,
-        Identifier: 3,
-        Keyword: 4,
-        NullLiteral: 5,
-        NumericLiteral: 6,
-        Punctuator: 7,
-        StringLiteral: 8
-    };
-
-    TokenName = {};
-    TokenName[Token.BooleanLiteral] = 'Boolean';
-    TokenName[Token.EOF] = '<end>';
-    TokenName[Token.Identifier] = 'Identifier';
-    TokenName[Token.Keyword] = 'Keyword';
-    TokenName[Token.NullLiteral] = 'Null';
-    TokenName[Token.NumericLiteral] = 'Numeric';
-    TokenName[Token.Punctuator] = 'Punctuator';
-    TokenName[Token.StringLiteral] = 'String';
-
-    Syntax = {
-        ArrayExpression: 'ArrayExpression',
-        BinaryExpression: 'BinaryExpression',
-        CallExpression: 'CallExpression',
-        ConditionalExpression: 'ConditionalExpression',
-        EmptyStatement: 'EmptyStatement',
-        ExpressionStatement: 'ExpressionStatement',
-        Identifier: 'Identifier',
-        Literal: 'Literal',
-        LabeledStatement: 'LabeledStatement',
-        LogicalExpression: 'LogicalExpression',
-        MemberExpression: 'MemberExpression',
-        ObjectExpression: 'ObjectExpression',
-        Program: 'Program',
-        Property: 'Property',
-        ThisExpression: 'ThisExpression',
-        UnaryExpression: 'UnaryExpression'
-    };
-
-    // Error messages should be identical to V8.
-    Messages = {
-        UnexpectedToken:  'Unexpected token %0',
-        UnknownLabel: 'Undefined label \'%0\'',
-        Redeclaration: '%0 \'%1\' has already been declared'
-    };
-
-    // Ensure the condition is true, otherwise throw an error.
-    // This is only to have a better contract semantic, i.e. another safety net
-    // to catch a logic error. The condition shall be fulfilled in normal case.
-    // Do NOT use this to enforce a certain condition on any user input.
-
-    function assert(condition, message) {
-        if (!condition) {
-            throw new Error('ASSERT: ' + message);
-        }
-    }
-
-    function isDecimalDigit(ch) {
-        return (ch >= 48 && ch <= 57);   // 0..9
-    }
-
-
-    // 7.2 White Space
-
-    function isWhiteSpace(ch) {
-        return (ch === 32) ||  // space
-            (ch === 9) ||      // tab
-            (ch === 0xB) ||
-            (ch === 0xC) ||
-            (ch === 0xA0) ||
-            (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0);
-    }
-
-    // 7.3 Line Terminators
-
-    function isLineTerminator(ch) {
-        return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029);
-    }
-
-    // 7.6 Identifier Names and Identifiers
-
-    function isIdentifierStart(ch) {
-        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
-            (ch >= 65 && ch <= 90) ||         // A..Z
-            (ch >= 97 && ch <= 122);          // a..z
-    }
-
-    function isIdentifierPart(ch) {
-        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
-            (ch >= 65 && ch <= 90) ||         // A..Z
-            (ch >= 97 && ch <= 122) ||        // a..z
-            (ch >= 48 && ch <= 57);           // 0..9
-    }
-
-    // 7.6.1.1 Keywords
-
-    function isKeyword(id) {
-        return (id === 'this')
-    }
-
-    // 7.4 Comments
-
-    function skipWhitespace() {
-        while (index < length && isWhiteSpace(source.charCodeAt(index))) {
-           ++index;
-        }
-    }
-
-    function getIdentifier() {
-        var start, ch;
-
-        start = index++;
-        while (index < length) {
-            ch = source.charCodeAt(index);
-            if (isIdentifierPart(ch)) {
-                ++index;
-            } else {
-                break;
-            }
-        }
-
-        return source.slice(start, index);
-    }
-
-    function scanIdentifier() {
-        var start, id, type;
-
-        start = index;
-
-        id = getIdentifier();
-
-        // There is no keyword or literal with only one character.
-        // Thus, it must be an identifier.
-        if (id.length === 1) {
-            type = Token.Identifier;
-        } else if (isKeyword(id)) {
-            type = Token.Keyword;
-        } else if (id === 'null') {
-            type = Token.NullLiteral;
-        } else if (id === 'true' || id === 'false') {
-            type = Token.BooleanLiteral;
-        } else {
-            type = Token.Identifier;
-        }
-
-        return {
-            type: type,
-            value: id,
-            range: [start, index]
-        };
-    }
-
-
-    // 7.7 Punctuators
-
-    function scanPunctuator() {
-        var start = index,
-            code = source.charCodeAt(index),
-            code2,
-            ch1 = source[index],
-            ch2;
-
-        switch (code) {
-
-        // Check for most common single-character punctuators.
-        case 46:   // . dot
-        case 40:   // ( open bracket
-        case 41:   // ) close bracket
-        case 59:   // ; semicolon
-        case 44:   // , comma
-        case 123:  // { open curly brace
-        case 125:  // } close curly brace
-        case 91:   // [
-        case 93:   // ]
-        case 58:   // :
-        case 63:   // ?
-            ++index;
-            return {
-                type: Token.Punctuator,
-                value: String.fromCharCode(code),
-                range: [start, index]
-            };
-
-        default:
-            code2 = source.charCodeAt(index + 1);
-
-            // '=' (char #61) marks an assignment or comparison operator.
-            if (code2 === 61) {
-                switch (code) {
-                case 37:  // %
-                case 38:  // &
-                case 42:  // *:
-                case 43:  // +
-                case 45:  // -
-                case 47:  // /
-                case 60:  // <
-                case 62:  // >
-                case 124: // |
-                    index += 2;
-                    return {
-                        type: Token.Punctuator,
-                        value: String.fromCharCode(code) + String.fromCharCode(code2),
-                        range: [start, index]
-                    };
-
-                case 33: // !
-                case 61: // =
-                    index += 2;
-
-                    // !== and ===
-                    if (source.charCodeAt(index) === 61) {
-                        ++index;
-                    }
-                    return {
-                        type: Token.Punctuator,
-                        value: source.slice(start, index),
-                        range: [start, index]
-                    };
-                default:
-                    break;
-                }
-            }
-            break;
-        }
-
-        // Peek more characters.
-
-        ch2 = source[index + 1];
-
-        // Other 2-character punctuators: && ||
-
-        if (ch1 === ch2 && ('&|'.indexOf(ch1) >= 0)) {
-            index += 2;
-            return {
-                type: Token.Punctuator,
-                value: ch1 + ch2,
-                range: [start, index]
-            };
-        }
-
-        if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {
-            ++index;
-            return {
-                type: Token.Punctuator,
-                value: ch1,
-                range: [start, index]
-            };
-        }
-
-        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
-    }
-
-    // 7.8.3 Numeric Literals
-    function scanNumericLiteral() {
-        var number, start, ch;
-
-        ch = source[index];
-        assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
-            'Numeric literal must start with a decimal digit or a decimal point');
-
-        start = index;
-        number = '';
-        if (ch !== '.') {
-            number = source[index++];
-            ch = source[index];
-
-            // Hex number starts with '0x'.
-            // Octal number starts with '0'.
-            if (number === '0') {
-                // decimal number starts with '0' such as '09' is illegal.
-                if (ch && isDecimalDigit(ch.charCodeAt(0))) {
-                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
-                }
-            }
-
-            while (isDecimalDigit(source.charCodeAt(index))) {
-                number += source[index++];
-            }
-            ch = source[index];
-        }
-
-        if (ch === '.') {
-            number += source[index++];
-            while (isDecimalDigit(source.charCodeAt(index))) {
-                number += source[index++];
-            }
-            ch = source[index];
-        }
-
-        if (ch === 'e' || ch === 'E') {
-            number += source[index++];
-
-            ch = source[index];
-            if (ch === '+' || ch === '-') {
-                number += source[index++];
-            }
-            if (isDecimalDigit(source.charCodeAt(index))) {
-                while (isDecimalDigit(source.charCodeAt(index))) {
-                    number += source[index++];
-                }
-            } else {
-                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
-            }
-        }
-
-        if (isIdentifierStart(source.charCodeAt(index))) {
-            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
-        }
-
-        return {
-            type: Token.NumericLiteral,
-            value: parseFloat(number),
-            range: [start, index]
-        };
-    }
-
-    // 7.8.4 String Literals
-
-    function scanStringLiteral() {
-        var str = '', quote, start, ch, octal = false;
-
-        quote = source[index];
-        assert((quote === '\'' || quote === '"'),
-            'String literal must starts with a quote');
-
-        start = index;
-        ++index;
-
-        while (index < length) {
-            ch = source[index++];
-
-            if (ch === quote) {
-                quote = '';
-                break;
-            } else if (ch === '\\') {
-                ch = source[index++];
-                if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
-                    switch (ch) {
-                    case 'n':
-                        str += '\n';
-                        break;
-                    case 'r':
-                        str += '\r';
-                        break;
-                    case 't':
-                        str += '\t';
-                        break;
-                    case 'b':
-                        str += '\b';
-                        break;
-                    case 'f':
-                        str += '\f';
-                        break;
-                    case 'v':
-                        str += '\x0B';
-                        break;
-
-                    default:
-                        str += ch;
-                        break;
-                    }
-                } else {
-                    if (ch ===  '\r' && source[index] === '\n') {
-                        ++index;
-                    }
-                }
-            } else if (isLineTerminator(ch.charCodeAt(0))) {
-                break;
-            } else {
-                str += ch;
-            }
-        }
-
-        if (quote !== '') {
-            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
-        }
-
-        return {
-            type: Token.StringLiteral,
-            value: str,
-            octal: octal,
-            range: [start, index]
-        };
-    }
-
-    function isIdentifierName(token) {
-        return token.type === Token.Identifier ||
-            token.type === Token.Keyword ||
-            token.type === Token.BooleanLiteral ||
-            token.type === Token.NullLiteral;
-    }
-
-    function advance() {
-        var ch;
-
-        skipWhitespace();
-
-        if (index >= length) {
-            return {
-                type: Token.EOF,
-                range: [index, index]
-            };
-        }
-
-        ch = source.charCodeAt(index);
-
-        // Very common: ( and ) and ;
-        if (ch === 40 || ch === 41 || ch === 58) {
-            return scanPunctuator();
-        }
-
-        // String literal starts with single quote (#39) or double quote (#34).
-        if (ch === 39 || ch === 34) {
-            return scanStringLiteral();
-        }
-
-        if (isIdentifierStart(ch)) {
-            return scanIdentifier();
-        }
-
-        // Dot (.) char #46 can also start a floating-point number, hence the need
-        // to check the next character.
-        if (ch === 46) {
-            if (isDecimalDigit(source.charCodeAt(index + 1))) {
-                return scanNumericLiteral();
-            }
-            return scanPunctuator();
-        }
-
-        if (isDecimalDigit(ch)) {
-            return scanNumericLiteral();
-        }
-
-        return scanPunctuator();
-    }
-
-    function lex() {
-        var token;
-
-        token = lookahead;
-        index = token.range[1];
-
-        lookahead = advance();
-
-        index = token.range[1];
-
-        return token;
-    }
-
-    function peek() {
-        var pos;
-
-        pos = index;
-        lookahead = advance();
-        index = pos;
-    }
-
-    // Throw an exception
-
-    function throwError(token, messageFormat) {
-        var error,
-            args = Array.prototype.slice.call(arguments, 2),
-            msg = messageFormat.replace(
-                /%(\d)/g,
-                function (whole, index) {
-                    assert(index < args.length, 'Message reference must be in range');
-                    return args[index];
-                }
-            );
-
-        error = new Error(msg);
-        error.index = index;
-        error.description = msg;
-        throw error;
-    }
-
-    // Throw an exception because of the token.
-
-    function throwUnexpected(token) {
-        throwError(token, Messages.UnexpectedToken, token.value);
-    }
-
-    // Expect the next token to match the specified punctuator.
-    // If not, an exception will be thrown.
-
-    function expect(value) {
-        var token = lex();
-        if (token.type !== Token.Punctuator || token.value !== value) {
-            throwUnexpected(token);
-        }
-    }
-
-    // Return true if the next token matches the specified punctuator.
-
-    function match(value) {
-        return lookahead.type === Token.Punctuator && lookahead.value === value;
-    }
-
-    // Return true if the next token matches the specified keyword
-
-    function matchKeyword(keyword) {
-        return lookahead.type === Token.Keyword && lookahead.value === keyword;
-    }
-
-    function consumeSemicolon() {
-        // Catch the very common case first: immediately a semicolon (char #59).
-        if (source.charCodeAt(index) === 59) {
-            lex();
-            return;
-        }
-
-        skipWhitespace();
-
-        if (match(';')) {
-            lex();
-            return;
-        }
-
-        if (lookahead.type !== Token.EOF && !match('}')) {
-            throwUnexpected(lookahead);
-        }
-    }
-
-    // 11.1.4 Array Initialiser
-
-    function parseArrayInitialiser() {
-        var elements = [];
-
-        expect('[');
-
-        while (!match(']')) {
-            if (match(',')) {
-                lex();
-                elements.push(null);
-            } else {
-                elements.push(parseExpression());
-
-                if (!match(']')) {
-                    expect(',');
-                }
-            }
-        }
-
-        expect(']');
-
-        return delegate.createArrayExpression(elements);
-    }
-
-    // 11.1.5 Object Initialiser
-
-    function parseObjectPropertyKey() {
-        var token;
-
-        skipWhitespace();
-        token = lex();
-
-        // Note: This function is called only from parseObjectProperty(), where
-        // EOF and Punctuator tokens are already filtered out.
-        if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {
-            return delegate.createLiteral(token);
-        }
-
-        return delegate.createIdentifier(token.value);
-    }
-
-    function parseObjectProperty() {
-        var token, key;
-
-        token = lookahead;
-        skipWhitespace();
-
-        if (token.type === Token.EOF || token.type === Token.Punctuator) {
-            throwUnexpected(token);
-        }
-
-        key = parseObjectPropertyKey();
-        expect(':');
-        return delegate.createProperty('init', key, parseExpression());
-    }
-
-    function parseObjectInitialiser() {
-        var properties = [];
-
-        expect('{');
-
-        while (!match('}')) {
-            properties.push(parseObjectProperty());
-
-            if (!match('}')) {
-                expect(',');
-            }
-        }
-
-        expect('}');
-
-        return delegate.createObjectExpression(properties);
-    }
-
-    // 11.1.6 The Grouping Operator
-
-    function parseGroupExpression() {
-        var expr;
-
-        expect('(');
-
-        expr = parseExpression();
-
-        expect(')');
-
-        return expr;
-    }
-
-
-    // 11.1 Primary Expressions
-
-    function parsePrimaryExpression() {
-        var type, token, expr;
-
-        if (match('(')) {
-            return parseGroupExpression();
-        }
-
-        type = lookahead.type;
-
-        if (type === Token.Identifier) {
-            expr = delegate.createIdentifier(lex().value);
-        } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {
-            expr = delegate.createLiteral(lex());
-        } else if (type === Token.Keyword) {
-            if (matchKeyword('this')) {
-                lex();
-                expr = delegate.createThisExpression();
-            }
-        } else if (type === Token.BooleanLiteral) {
-            token = lex();
-            token.value = (token.value === 'true');
-            expr = delegate.createLiteral(token);
-        } else if (type === Token.NullLiteral) {
-            token = lex();
-            token.value = null;
-            expr = delegate.createLiteral(token);
-        } else if (match('[')) {
-            expr = parseArrayInitialiser();
-        } else if (match('{')) {
-            expr = parseObjectInitialiser();
-        }
-
-        if (expr) {
-            return expr;
-        }
-
-        throwUnexpected(lex());
-    }
-
-    // 11.2 Left-Hand-Side Expressions
-
-    function parseArguments() {
-        var args = [];
-
-        expect('(');
-
-        if (!match(')')) {
-            while (index < length) {
-                args.push(parseExpression());
-                if (match(')')) {
-                    break;
-                }
-                expect(',');
-            }
-        }
-
-        expect(')');
-
-        return args;
-    }
-
-    function parseNonComputedProperty() {
-        var token;
-
-        token = lex();
-
-        if (!isIdentifierName(token)) {
-            throwUnexpected(token);
-        }
-
-        return delegate.createIdentifier(token.value);
-    }
-
-    function parseNonComputedMember() {
-        expect('.');
-
-        return parseNonComputedProperty();
-    }
-
-    function parseComputedMember() {
-        var expr;
-
-        expect('[');
-
-        expr = parseExpression();
-
-        expect(']');
-
-        return expr;
-    }
-
-    function parseLeftHandSideExpression() {
-        var expr, args, property;
-
-        expr = parsePrimaryExpression();
-
-        while (true) {
-            if (match('[')) {
-                property = parseComputedMember();
-                expr = delegate.createMemberExpression('[', expr, property);
-            } else if (match('.')) {
-                property = parseNonComputedMember();
-                expr = delegate.createMemberExpression('.', expr, property);
-            } else if (match('(')) {
-                args = parseArguments();
-                expr = delegate.createCallExpression(expr, args);
-            } else {
-                break;
-            }
-        }
-
-        return expr;
-    }
-
-    // 11.3 Postfix Expressions
-
-    var parsePostfixExpression = parseLeftHandSideExpression;
-
-    // 11.4 Unary Operators
-
-    function parseUnaryExpression() {
-        var token, expr;
-
-        if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
-            expr = parsePostfixExpression();
-        } else if (match('+') || match('-') || match('!')) {
-            token = lex();
-            expr = parseUnaryExpression();
-            expr = delegate.createUnaryExpression(token.value, expr);
-        } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
-            throwError({}, Messages.UnexpectedToken);
-        } else {
-            expr = parsePostfixExpression();
-        }
-
-        return expr;
-    }
-
-    function binaryPrecedence(token) {
-        var prec = 0;
-
-        if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
-            return 0;
-        }
-
-        switch (token.value) {
-        case '||':
-            prec = 1;
-            break;
-
-        case '&&':
-            prec = 2;
-            break;
-
-        case '==':
-        case '!=':
-        case '===':
-        case '!==':
-            prec = 6;
-            break;
-
-        case '<':
-        case '>':
-        case '<=':
-        case '>=':
-        case 'instanceof':
-            prec = 7;
-            break;
-
-        case 'in':
-            prec = 7;
-            break;
-
-        case '+':
-        case '-':
-            prec = 9;
-            break;
-
-        case '*':
-        case '/':
-        case '%':
-            prec = 11;
-            break;
-
-        default:
-            break;
-        }
-
-        return prec;
-    }
-
-    // 11.5 Multiplicative Operators
-    // 11.6 Additive Operators
-    // 11.7 Bitwise Shift Operators
-    // 11.8 Relational Operators
-    // 11.9 Equality Operators
-    // 11.10 Binary Bitwise Operators
-    // 11.11 Binary Logical Operators
-
-    function parseBinaryExpression() {
-        var expr, token, prec, stack, right, operator, left, i;
-
-        left = parseUnaryExpression();
-
-        token = lookahead;
-        prec = binaryPrecedence(token);
-        if (prec === 0) {
-            return left;
-        }
-        token.prec = prec;
-        lex();
-
-        right = parseUnaryExpression();
-
-        stack = [left, token, right];
-
-        while ((prec = binaryPrecedence(lookahead)) > 0) {
-
-            // Reduce: make a binary expression from the three topmost entries.
-            while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {
-                right = stack.pop();
-                operator = stack.pop().value;
-                left = stack.pop();
-                expr = delegate.createBinaryExpression(operator, left, right);
-                stack.push(expr);
-            }
-
-            // Shift.
-            token = lex();
-            token.prec = prec;
-            stack.push(token);
-            expr = parseUnaryExpression();
-            stack.push(expr);
-        }
-
-        // Final reduce to clean-up the stack.
-        i = stack.length - 1;
-        expr = stack[i];
-        while (i > 1) {
-            expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);
-            i -= 2;
-        }
-
-        return expr;
-    }
-
-
-    // 11.12 Conditional Operator
-
-    function parseConditionalExpression() {
-        var expr, consequent, alternate;
-
-        expr = parseBinaryExpression();
-
-        if (match('?')) {
-            lex();
-            consequent = parseConditionalExpression();
-            expect(':');
-            alternate = parseConditionalExpression();
-
-            expr = delegate.createConditionalExpression(expr, consequent, alternate);
-        }
-
-        return expr;
-    }
-
-    // Simplification since we do not support AssignmentExpression.
-    var parseExpression = parseConditionalExpression;
-
-    // Polymer Syntax extensions
-
-    // Filter ::
-    //   Identifier
-    //   Identifier "(" ")"
-    //   Identifier "(" FilterArguments ")"
-
-    function parseFilter() {
-        var identifier, args;
-
-        identifier = lex();
-
-        if (identifier.type !== Token.Identifier) {
-            throwUnexpected(identifier);
-        }
-
-        args = match('(') ? parseArguments() : [];
-
-        return delegate.createFilter(identifier.value, args);
-    }
-
-    // Filters ::
-    //   "|" Filter
-    //   Filters "|" Filter
-
-    function parseFilters() {
-        while (match('|')) {
-            lex();
-            parseFilter();
-        }
-    }
-
-    // TopLevel ::
-    //   LabelledExpressions
-    //   AsExpression
-    //   InExpression
-    //   FilterExpression
-
-    // AsExpression ::
-    //   FilterExpression as Identifier
-
-    // InExpression ::
-    //   Identifier, Identifier in FilterExpression
-    //   Identifier in FilterExpression
-
-    // FilterExpression ::
-    //   Expression
-    //   Expression Filters
-
-    function parseTopLevel() {
-        skipWhitespace();
-        peek();
-
-        var expr = parseExpression();
-        if (expr) {
-            if (lookahead.value === ',' || lookahead.value == 'in' &&
-                       expr.type === Syntax.Identifier) {
-                parseInExpression(expr);
-            } else {
-                parseFilters();
-                if (lookahead.value === 'as') {
-                    parseAsExpression(expr);
-                } else {
-                    delegate.createTopLevel(expr);
-                }
-            }
-        }
-
-        if (lookahead.type !== Token.EOF) {
-            throwUnexpected(lookahead);
-        }
-    }
-
-    function parseAsExpression(expr) {
-        lex();  // as
-        var identifier = lex().value;
-        delegate.createAsExpression(expr, identifier);
-    }
-
-    function parseInExpression(identifier) {
-        var indexName;
-        if (lookahead.value === ',') {
-            lex();
-            if (lookahead.type !== Token.Identifier)
-                throwUnexpected(lookahead);
-            indexName = lex().value;
-        }
-
-        lex();  // in
-        var expr = parseExpression();
-        parseFilters();
-        delegate.createInExpression(identifier.name, indexName, expr);
-    }
-
-    function parse(code, inDelegate) {
-        delegate = inDelegate;
-        source = code;
-        index = 0;
-        length = source.length;
-        lookahead = null;
-        state = {
-            labelSet: {}
-        };
-
-        return parseTopLevel();
-    }
-
-    global.esprima = {
-        parse: parse
-    };
-})(this);
-
-// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-// Code distributed by Google as part of the polymer project is also
-// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-
-(function (global) {
-  'use strict';
-
-  function prepareBinding(expressionText, name, node, filterRegistry) {
-    var expression;
-    try {
-      expression = getExpression(expressionText);
-      if (expression.scopeIdent &&
-          (node.nodeType !== Node.ELEMENT_NODE ||
-           node.tagName !== 'TEMPLATE' ||
-           (name !== 'bind' && name !== 'repeat'))) {
-        throw Error('as and in can only be used within <template bind/repeat>');
-      }
-    } catch (ex) {
-      console.error('Invalid expression syntax: ' + expressionText, ex);
-      return;
-    }
-
-    return function(model, node, oneTime) {
-      var binding = expression.getBinding(model, filterRegistry, oneTime);
-      if (expression.scopeIdent && binding) {
-        node.polymerExpressionScopeIdent_ = expression.scopeIdent;
-        if (expression.indexIdent)
-          node.polymerExpressionIndexIdent_ = expression.indexIdent;
-      }
-
-      return binding;
-    }
-  }
-
-  // TODO(rafaelw): Implement simple LRU.
-  var expressionParseCache = Object.create(null);
-
-  function getExpression(expressionText) {
-    var expression = expressionParseCache[expressionText];
-    if (!expression) {
-      var delegate = new ASTDelegate();
-      esprima.parse(expressionText, delegate);
-      expression = new Expression(delegate);
-      expressionParseCache[expressionText] = expression;
-    }
-    return expression;
-  }
-
-  function Literal(value) {
-    this.value = value;
-    this.valueFn_ = undefined;
-  }
-
-  Literal.prototype = {
-    valueFn: function() {
-      if (!this.valueFn_) {
-        var value = this.value;
-        this.valueFn_ = function() {
-          return value;
-        }
-      }
-
-      return this.valueFn_;
-    }
-  }
-
-  function IdentPath(name) {
-    this.name = name;
-    this.path = Path.get(name);
-  }
-
-  IdentPath.prototype = {
-    valueFn: function() {
-      if (!this.valueFn_) {
-        var name = this.name;
-        var path = this.path;
-        this.valueFn_ = function(model, observer) {
-          if (observer)
-            observer.addPath(model, path);
-
-          return path.getValueFrom(model);
-        }
-      }
-
-      return this.valueFn_;
-    },
-
-    setValue: function(model, newValue) {
-      if (this.path.length == 1)
-        model = findScope(model, this.path[0]);
-
-      return this.path.setValueFrom(model, newValue);
-    }
-  };
-
-  function MemberExpression(object, property, accessor) {
-    this.computed = accessor == '[';
-
-    this.dynamicDeps = typeof object == 'function' ||
-                       object.dynamicDeps ||
-                       (this.computed && !(property instanceof Literal));
-
-    this.simplePath =
-        !this.dynamicDeps &&
-        (property instanceof IdentPath || property instanceof Literal) &&
-        (object instanceof MemberExpression || object instanceof IdentPath);
-
-    this.object = this.simplePath ? object : getFn(object);
-    this.property = !this.computed || this.simplePath ?
-        property : getFn(property);
-  }
-
-  MemberExpression.prototype = {
-    get fullPath() {
-      if (!this.fullPath_) {
-
-        var parts = this.object instanceof MemberExpression ?
-            this.object.fullPath.slice() : [this.object.name];
-        parts.push(this.property instanceof IdentPath ?
-            this.property.name : this.property.value);
-        this.fullPath_ = Path.get(parts);
-      }
-
-      return this.fullPath_;
-    },
-
-    valueFn: function() {
-      if (!this.valueFn_) {
-        var object = this.object;
-
-        if (this.simplePath) {
-          var path = this.fullPath;
-
-          this.valueFn_ = function(model, observer) {
-            if (observer)
-              observer.addPath(model, path);
-
-            return path.getValueFrom(model);
-          };
-        } else if (!this.computed) {
-          var path = Path.get(this.property.name);
-
-          this.valueFn_ = function(model, observer, filterRegistry) {
-            var context = object(model, observer, filterRegistry);
-
-            if (observer)
-              observer.addPath(context, path);
-
-            return path.getValueFrom(context);
-          }
-        } else {
-          // Computed property.
-          var property = this.property;
-
-          this.valueFn_ = function(model, observer, filterRegistry) {
-            var context = object(model, observer, filterRegistry);
-            var propName = property(model, observer, filterRegistry);
-            if (observer)
-              observer.addPath(context, [propName]);
-
-            return context ? context[propName] : undefined;
-          };
-        }
-      }
-      return this.valueFn_;
-    },
-
-    setValue: function(model, newValue) {
-      if (this.simplePath) {
-        this.fullPath.setValueFrom(model, newValue);
-        return newValue;
-      }
-
-      var object = this.object(model);
-      var propName = this.property instanceof IdentPath ? this.property.name :
-          this.property(model);
-      return object[propName] = newValue;
-    }
-  };
-
-  function Filter(name, args) {
-    this.name = name;
-    this.args = [];
-    for (var i = 0; i < args.length; i++) {
-      this.args[i] = getFn(args[i]);
-    }
-  }
-
-  Filter.prototype = {
-    transform: function(model, observer, filterRegistry, toModelDirection,
-                        initialArgs) {
-      var context = model;
-      var fn = context[this.name];
-
-      if (!fn) {
-        fn = filterRegistry[this.name];
-        if (!fn) {
-          console.error('Cannot find function or filter: ' + this.name);
-          return;
-        }
-      }
-
-      // If toModelDirection is falsey, then the "normal" (dom-bound) direction
-      // is used. Otherwise, it looks for a 'toModel' property function on the
-      // object.
-      if (toModelDirection) {
-        fn = fn.toModel;
-      } else if (typeof fn.toDOM == 'function') {
-        fn = fn.toDOM;
-      }
-
-      if (typeof fn != 'function') {
-        console.error('Cannot find function or filter: ' + this.name);
-        return;
-      }
-
-      var args = initialArgs || [];
-      for (var i = 0; i < this.args.length; i++) {
-        args.push(getFn(this.args[i])(model, observer, filterRegistry));
-      }
-
-      return fn.apply(context, args);
-    }
-  };
-
-  function notImplemented() { throw Error('Not Implemented'); }
-
-  var unaryOperators = {
-    '+': function(v) { return +v; },
-    '-': function(v) { return -v; },
-    '!': function(v) { return !v; }
-  };
-
-  var binaryOperators = {
-    '+': function(l, r) { return l+r; },
-    '-': function(l, r) { return l-r; },
-    '*': function(l, r) { return l*r; },
-    '/': function(l, r) { return l/r; },
-    '%': function(l, r) { return l%r; },
-    '<': function(l, r) { return l<r; },
-    '>': function(l, r) { return l>r; },
-    '<=': function(l, r) { return l<=r; },
-    '>=': function(l, r) { return l>=r; },
-    '==': function(l, r) { return l==r; },
-    '!=': function(l, r) { return l!=r; },
-    '===': function(l, r) { return l===r; },
-    '!==': function(l, r) { return l!==r; },
-    '&&': function(l, r) { return l&&r; },
-    '||': function(l, r) { return l||r; },
-  };
-
-  function getFn(arg) {
-    return typeof arg == 'function' ? arg : arg.valueFn();
-  }
-
-  function ASTDelegate() {
-    this.expression = null;
-    this.filters = [];
-    this.deps = {};
-    this.currentPath = undefined;
-    this.scopeIdent = undefined;
-    this.indexIdent = undefined;
-    this.dynamicDeps = false;
-  }
-
-  ASTDelegate.prototype = {
-    createUnaryExpression: function(op, argument) {
-      if (!unaryOperators[op])
-        throw Error('Disallowed operator: ' + op);
-
-      argument = getFn(argument);
-
-      return function(model, observer, filterRegistry) {
-        return unaryOperators[op](argument(model, observer, filterRegistry));
-      };
-    },
-
-    createBinaryExpression: function(op, left, right) {
-      if (!binaryOperators[op])
-        throw Error('Disallowed operator: ' + op);
-
-      left = getFn(left);
-      right = getFn(right);
-
-      switch (op) {
-        case '||':
-          this.dynamicDeps = true;
-          return function(model, observer, filterRegistry) {
-            return left(model, observer, filterRegistry) ||
-                right(model, observer, filterRegistry);
-          };
-        case '&&':
-          this.dynamicDeps = true;
-          return function(model, observer, filterRegistry) {
-            return left(model, observer, filterRegistry) &&
-                right(model, observer, filterRegistry);
-          };
-      }
-
-      return function(model, observer, filterRegistry) {
-        return binaryOperators[op](left(model, observer, filterRegistry),
-                                   right(model, observer, filterRegistry));
-      };
-    },
-
-    createConditionalExpression: function(test, consequent, alternate) {
-      test = getFn(test);
-      consequent = getFn(consequent);
-      alternate = getFn(alternate);
-
-      this.dynamicDeps = true;
-
-      return function(model, observer, filterRegistry) {
-        return test(model, observer, filterRegistry) ?
-            consequent(model, observer, filterRegistry) :
-            alternate(model, observer, filterRegistry);
-      }
-    },
-
-    createIdentifier: function(name) {
-      var ident = new IdentPath(name);
-      ident.type = 'Identifier';
-      return ident;
-    },
-
-    createMemberExpression: function(accessor, object, property) {
-      var ex = new MemberExpression(object, property, accessor);
-      if (ex.dynamicDeps)
-        this.dynamicDeps = true;
-      return ex;
-    },
-
-    createCallExpression: function(expression, args) {
-      if (!(expression instanceof IdentPath))
-        throw Error('Only identifier function invocations are allowed');
-
-      var filter = new Filter(expression.name, args);
-
-      return function(model, observer, filterRegistry) {
-        return filter.transform(model, observer, filterRegistry, false);
-      };
-    },
-
-    createLiteral: function(token) {
-      return new Literal(token.value);
-    },
-
-    createArrayExpression: function(elements) {
-      for (var i = 0; i < elements.length; i++)
-        elements[i] = getFn(elements[i]);
-
-      return function(model, observer, filterRegistry) {
-        var arr = []
-        for (var i = 0; i < elements.length; i++)
-          arr.push(elements[i](model, observer, filterRegistry));
-        return arr;
-      }
-    },
-
-    createProperty: function(kind, key, value) {
-      return {
-        key: key instanceof IdentPath ? key.name : key.value,
-        value: value
-      };
-    },
-
-    createObjectExpression: function(properties) {
-      for (var i = 0; i < properties.length; i++)
-        properties[i].value = getFn(properties[i].value);
-
-      return function(model, observer, filterRegistry) {
-        var obj = {};
-        for (var i = 0; i < properties.length; i++)
-          obj[properties[i].key] =
-              properties[i].value(model, observer, filterRegistry);
-        return obj;
-      }
-    },
-
-    createFilter: function(name, args) {
-      this.filters.push(new Filter(name, args));
-    },
-
-    createAsExpression: function(expression, scopeIdent) {
-      this.expression = expression;
-      this.scopeIdent = scopeIdent;
-    },
-
-    createInExpression: function(scopeIdent, indexIdent, expression) {
-      this.expression = expression;
-      this.scopeIdent = scopeIdent;
-      this.indexIdent = indexIdent;
-    },
-
-    createTopLevel: function(expression) {
-      this.expression = expression;
-    },
-
-    createThisExpression: notImplemented
-  }
-
-  function ConstantObservable(value) {
-    this.value_ = value;
-  }
-
-  ConstantObservable.prototype = {
-    open: function() { return this.value_; },
-    discardChanges: function() { return this.value_; },
-    deliver: function() {},
-    close: function() {},
-  }
-
-  function Expression(delegate) {
-    this.scopeIdent = delegate.scopeIdent;
-    this.indexIdent = delegate.indexIdent;
-
-    if (!delegate.expression)
-      throw Error('No expression found.');
-
-    this.expression = delegate.expression;
-    getFn(this.expression); // forces enumeration of path dependencies
-
-    this.filters = delegate.filters;
-    this.dynamicDeps = delegate.dynamicDeps;
-  }
-
-  Expression.prototype = {
-    getBinding: function(model, filterRegistry, oneTime) {
-      if (oneTime)
-        return this.getValue(model, undefined, filterRegistry);
-
-      var observer = new CompoundObserver();
-      // captures deps.
-      var firstValue = this.getValue(model, observer, filterRegistry);
-      var firstTime = true;
-      var self = this;
-
-      function valueFn() {
-        // deps cannot have changed on first value retrieval.
-        if (firstTime) {
-          firstTime = false;
-          return firstValue;
-        }
-
-        if (self.dynamicDeps)
-          observer.startReset();
-
-        var value = self.getValue(model,
-                                  self.dynamicDeps ? observer : undefined,
-                                  filterRegistry);
-        if (self.dynamicDeps)
-          observer.finishReset();
-
-        return value;
-      }
-
-      function setValueFn(newValue) {
-        self.setValue(model, newValue, filterRegistry);
-        return newValue;
-      }
-
-      return new ObserverTransform(observer, valueFn, setValueFn, true);
-    },
-
-    getValue: function(model, observer, filterRegistry) {
-      var value = getFn(this.expression)(model, observer, filterRegistry);
-      for (var i = 0; i < this.filters.length; i++) {
-        value = this.filters[i].transform(model, observer, filterRegistry,
-            false, [value]);
-      }
-
-      return value;
-    },
-
-    setValue: function(model, newValue, filterRegistry) {
-      var count = this.filters ? this.filters.length : 0;
-      while (count-- > 0) {
-        newValue = this.filters[count].transform(model, undefined,
-            filterRegistry, true, [newValue]);
-      }
-
-      if (this.expression.setValue)
-        return this.expression.setValue(model, newValue);
-    }
-  }
-
-  /**
-   * Converts a style property name to a css property name. For example:
-   * "WebkitUserSelect" to "-webkit-user-select"
-   */
-  function convertStylePropertyName(name) {
-    return String(name).replace(/[A-Z]/g, function(c) {
-      return '-' + c.toLowerCase();
-    });
-  }
-
-  var parentScopeName = '@' + Math.random().toString(36).slice(2);
-
-  // Single ident paths must bind directly to the appropriate scope object.
-  // I.e. Pushed values in two-bindings need to be assigned to the actual model
-  // object.
-  function findScope(model, prop) {
-    while (model[parentScopeName] &&
-           !Object.prototype.hasOwnProperty.call(model, prop)) {
-      model = model[parentScopeName];
-    }
-
-    return model;
-  }
-
-  function isLiteralExpression(pathString) {
-    switch (pathString) {
-      case '':
-        return false;
-
-      case 'false':
-      case 'null':
-      case 'true':
-        return true;
-    }
-
-    if (!isNaN(Number(pathString)))
-      return true;
-
-    return false;
-  };
-
-  function PolymerExpressions() {}
-
-  PolymerExpressions.prototype = {
-    // "built-in" filters
-    styleObject: function(value) {
-      var parts = [];
-      for (var key in value) {
-        parts.push(convertStylePropertyName(key) + ': ' + value[key]);
-      }
-      return parts.join('; ');
-    },
-
-    tokenList: function(value) {
-      var tokens = [];
-      for (var key in value) {
-        if (value[key])
-          tokens.push(key);
-      }
-      return tokens.join(' ');
-    },
-
-    // binding delegate API
-    prepareInstancePositionChanged: function(template) {
-      var indexIdent = template.polymerExpressionIndexIdent_;
-      if (!indexIdent)
-        return;
-
-      return function(templateInstance, index) {
-        templateInstance.model[indexIdent] = index;
-      };
-    },
-
-    prepareBinding: function(pathString, name, node) {
-      var path = Path.get(pathString);
-
-      if (!isLiteralExpression(pathString) && path.valid) {
-        if (path.length == 1) {
-          return function(model, node, oneTime) {
-            if (oneTime)
-              return path.getValueFrom(model);
-
-            var scope = findScope(model, path[0]);
-            return new PathObserver(scope, path);
-          };
-        }
-        return; // bail out early if pathString is simple path.
-      }
-
-      return prepareBinding(pathString, name, node, this);
-    },
-
-    prepareInstanceModel: function(template) {
-      var scopeName = template.polymerExpressionScopeIdent_;
-      if (!scopeName)
-        return;
-
-      var parentScope = template.templateInstance ?
-          template.templateInstance.model :
-          template.model;
-
-      var indexName = template.polymerExpressionIndexIdent_;
-
-      return function(model) {
-        return createScopeObject(parentScope, model, scopeName, indexName);
-      };
-    }
-  };
-
-  var createScopeObject = ('__proto__' in {}) ?
-    function(parentScope, model, scopeName, indexName) {
-      var scope = {};
-      scope[scopeName] = model;
-      scope[indexName] = undefined;
-      scope[parentScopeName] = parentScope;
-      scope.__proto__ = parentScope;
-      return scope;
-    } :
-    function(parentScope, model, scopeName, indexName) {
-      var scope = Object.create(parentScope);
-      Object.defineProperty(scope, scopeName,
-          { value: model, configurable: true, writable: true });
-      Object.defineProperty(scope, indexName,
-          { value: undefined, configurable: true, writable: true });
-      Object.defineProperty(scope, parentScopeName,
-          { value: parentScope, configurable: true, writable: true });
-      return scope;
-    };
-
-  global.PolymerExpressions = PolymerExpressions;
-  PolymerExpressions.getExpression = getExpression;
-})(this);
-
-Polymer = {
-  version: '0.5.5'
-};
-
-// TODO(sorvell): this ensures Polymer is an object and not a function
-// Platform is currently defining it as a function to allow for async loading
-// of polymer; once we refine the loading process this likely goes away.
-if (typeof window.Polymer === 'function') {
-  Polymer = {};
-}
-
-
-(function(scope) {
-
-  function withDependencies(task, depends) {
-    depends = depends || [];
-    if (!depends.map) {
-      depends = [depends];
-    }
-    return task.apply(this, depends.map(marshal));
-  }
-
-  function module(name, dependsOrFactory, moduleFactory) {
-    var module;
-    switch (arguments.length) {
-      case 0:
-        return;
-      case 1:
-        module = null;
-        break;
-      case 2:
-        // dependsOrFactory is `factory` in this case
-        module = dependsOrFactory.apply(this);
-        break;
-      default:
-        // dependsOrFactory is `depends` in this case
-        module = withDependencies(moduleFactory, dependsOrFactory);
-        break;
-    }
-    modules[name] = module;
-  };
-
-  function marshal(name) {
-    return modules[name];
-  }
-
-  var modules = {};
-
-  function using(depends, task) {
-    HTMLImports.whenImportsReady(function() {
-      withDependencies(task, depends);
-    });
-  };
-
-  // exports
-
-  scope.marshal = marshal;
-  // `module` confuses commonjs detectors
-  scope.modularize = module;
-  scope.using = using;
-
-})(window);
-
-/*
-	Build only script.
-
-  Ensures scripts needed for basic x-platform compatibility
-  will be run when platform.js is not loaded.
- */
-if (!window.WebComponents) {
-
-/*
-	On supported platforms, platform.js is not needed. To retain compatibility
-	with the polyfills, we stub out minimal functionality.
- */
-if (!window.WebComponents) {
-
-  WebComponents = {
-  	flush: function() {},
-    flags: {log: {}}
-  };
-
-  Platform = WebComponents;
-
-  CustomElements = {
-  	useNative: true,
-    ready: true,
-    takeRecords: function() {},
-    instanceof: function(obj, base) {
-      return obj instanceof base;
-    }
-  };
-  
-  HTMLImports = {
-  	useNative: true
-  };
-
-  
-  addEventListener('HTMLImportsLoaded', function() {
-    document.dispatchEvent(
-      new CustomEvent('WebComponentsReady', {bubbles: true})
-    );
-  });
-
-
-  // ShadowDOM
-  ShadowDOMPolyfill = null;
-  wrap = unwrap = function(n){
-    return n;
-  };
-
-}
-
-/*
-  Create polyfill scope and feature detect native support.
-*/
-window.HTMLImports = window.HTMLImports || {flags:{}};
-
-(function(scope) {
-
-/**
-  Basic setup and simple module executer. We collect modules and then execute
-  the code later, only if it's necessary for polyfilling.
-*/
-var IMPORT_LINK_TYPE = 'import';
-var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement('link'));
-
-/**
-  Support `currentScript` on all browsers as `document._currentScript.`
-
-  NOTE: We cannot polyfill `document.currentScript` because it's not possible
-  both to override and maintain the ability to capture the native value.
-  Therefore we choose to expose `_currentScript` both when native imports
-  and the polyfill are in use.
-*/
-// NOTE: ShadowDOMPolyfill intrusion.
-var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
-var wrap = function(node) {
-  return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
-};
-var rootDocument = wrap(document);
-
-var currentScriptDescriptor = {
-  get: function() {
-    var script = HTMLImports.currentScript || document.currentScript ||
-        // NOTE: only works when called in synchronously executing code.
-        // readyState should check if `loading` but IE10 is
-        // interactive when scripts run so we cheat.
-        (document.readyState !== 'complete' ?
-        document.scripts[document.scripts.length - 1] : null);
-    return wrap(script);
-  },
-  configurable: true
-};
-
-Object.defineProperty(document, '_currentScript', currentScriptDescriptor);
-Object.defineProperty(rootDocument, '_currentScript', currentScriptDescriptor);
-
-/**
-  Add support for the `HTMLImportsLoaded` event and the `HTMLImports.whenReady`
-  method. This api is necessary because unlike the native implementation,
-  script elements do not force imports to resolve. Instead, users should wrap
-  code in either an `HTMLImportsLoaded` hander or after load time in an
-  `HTMLImports.whenReady(callback)` call.
-
-  NOTE: This module also supports these apis under the native implementation.
-  Therefore, if this file is loaded, the same code can be used under both
-  the polyfill and native implementation.
- */
-
-var isIE = /Trident/.test(navigator.userAgent);
-
-// call a callback when all HTMLImports in the document at call time
-// (or at least document ready) have loaded.
-// 1. ensure the document is in a ready state (has dom), then
-// 2. watch for loading of imports and call callback when done
-function whenReady(callback, doc) {
-  doc = doc || rootDocument;
-  // if document is loading, wait and try again
-  whenDocumentReady(function() {
-    watchImportsLoad(callback, doc);
-  }, doc);
-}
-
-// call the callback when the document is in a ready state (has dom)
-var requiredReadyState = isIE ? 'complete' : 'interactive';
-var READY_EVENT = 'readystatechange';
-function isDocumentReady(doc) {
-  return (doc.readyState === 'complete' ||
-      doc.readyState === requiredReadyState);
-}
-
-// call <callback> when we ensure the document is in a ready state
-function whenDocumentReady(callback, doc) {
-  if (!isDocumentReady(doc)) {
-    var checkReady = function() {
-      if (doc.readyState === 'complete' ||
-          doc.readyState === requiredReadyState) {
-        doc.removeEventListener(READY_EVENT, checkReady);
-        whenDocumentReady(callback, doc);
-      }
-    };
-    doc.addEventListener(READY_EVENT, checkReady);
-  } else if (callback) {
-    callback();
-  }
-}
-
-function markTargetLoaded(event) {
-  event.target.__loaded = true;
-}
-
-// call <callback> when we ensure all imports have loaded
-function watchImportsLoad(callback, doc) {
-  var imports = doc.querySelectorAll('link[rel=import]');
-  var loaded = 0, l = imports.length;
-  function checkDone(d) {
-    if ((loaded == l) && callback) {
-       callback();
-    }
-  }
-  function loadedImport(e) {
-    markTargetLoaded(e);
-    loaded++;
-    checkDone();
-  }
-  if (l) {
-    for (var i=0, imp; (i<l) && (imp=imports[i]); i++) {
-      if (isImportLoaded(imp)) {
-        loadedImport.call(imp, {target: imp});
-      } else {
-        imp.addEventListener('load', loadedImport);
-        imp.addEventListener('error', loadedImport);
-      }
-    }
-  } else {
-    checkDone();
-  }
-}
-
-// NOTE: test for native imports loading is based on explicitly watching
-// all imports (see below).
-// However, we cannot rely on this entirely without watching the entire document
-// for import links. For perf reasons, currently only head is watched.
-// Instead, we fallback to checking if the import property is available
-// and the document is not itself loading.
-function isImportLoaded(link) {
-  return useNative ? link.__loaded ||
-      (link.import && link.import.readyState !== 'loading') :
-      link.__importParsed;
-}
-
-// TODO(sorvell): Workaround for
-// https://www.w3.org/Bugs/Public/show_bug.cgi?id=25007, should be removed when
-// this bug is addressed.
-// (1) Install a mutation observer to see when HTMLImports have loaded
-// (2) if this script is run during document load it will watch any existing
-// imports for loading.
-//
-// NOTE: The workaround has restricted functionality: (1) it's only compatible
-// with imports that are added to document.head since the mutation observer
-// watches only head for perf reasons, (2) it requires this script
-// to run before any imports have completed loading.
-if (useNative) {
-  new MutationObserver(function(mxns) {
-    for (var i=0, l=mxns.length, m; (i < l) && (m=mxns[i]); i++) {
-      if (m.addedNodes) {
-        handleImports(m.addedNodes);
-      }
-    }
-  }).observe(document.head, {childList: true});
-
-  function handleImports(nodes) {
-    for (var i=0, l=nodes.length, n; (i<l) && (n=nodes[i]); i++) {
-      if (isImport(n)) {
-        handleImport(n);
-      }
-    }
-  }
-
-  function isImport(element) {
-    return element.localName === 'link' && element.rel === 'import';
-  }
-
-  function handleImport(element) {
-    var loaded = element.import;
-    if (loaded) {
-      markTargetLoaded({target: element});
-    } else {
-      element.addEventListener('load', markTargetLoaded);
-      element.addEventListener('error', markTargetLoaded);
-    }
-  }
-
-  // make sure to catch any imports that are in the process of loading
-  // when this script is run.
-  (function() {
-    if (document.readyState === 'loading') {
-      var imports = document.querySelectorAll('link[rel=import]');
-      for (var i=0, l=imports.length, imp; (i<l) && (imp=imports[i]); i++) {
-        handleImport(imp);
-      }
-    }
-  })();
-
-}
-
-// Fire the 'HTMLImportsLoaded' event when imports in document at load time
-// have loaded. This event is required to simulate the script blocking
-// behavior of native imports. A main document script that needs to be sure
-// imports have loaded should wait for this event.
-whenReady(function() {
-  HTMLImports.ready = true;
-  HTMLImports.readyTime = new Date().getTime();
-  rootDocument.dispatchEvent(
-    new CustomEvent('HTMLImportsLoaded', {bubbles: true})
-  );
-});
-
-// exports
-scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
-scope.useNative = useNative;
-scope.rootDocument = rootDocument;
-scope.whenReady = whenReady;
-scope.isIE = isIE;
-
-})(HTMLImports);
-
-(function(scope) {
-
-  // TODO(sorvell): It's desireable to provide a default stylesheet 
-  // that's convenient for styling unresolved elements, but
-  // it's cumbersome to have to include this manually in every page.
-  // It would make sense to put inside some HTMLImport but 
-  // the HTMLImports polyfill does not allow loading of stylesheets 
-  // that block rendering. Therefore this injection is tolerated here.
-  var style = document.createElement('style');
-  style.textContent = ''
-      + 'body {'
-      + 'transition: opacity ease-in 0.2s;' 
-      + ' } \n'
-      + 'body[unresolved] {'
-      + 'opacity: 0; display: block; overflow: hidden;' 
-      + ' } \n'
-      ;
-  var head = document.querySelector('head');
-  head.insertBefore(style, head.firstChild);
-
-})(Platform);
-
-/*
-	Build only script.
-
-  Ensures scripts needed for basic x-platform compatibility
-  will be run when platform.js is not loaded.
- */
-}
-(function(global) {
-  'use strict';
-
-  var testingExposeCycleCount = global.testingExposeCycleCount;
-
-  // Detect and do basic sanity checking on Object/Array.observe.
-  function detectObjectObserve() {
-    if (typeof Object.observe !== 'function' ||
-        typeof Array.observe !== 'function') {
-      return false;
-    }
-
-    var records = [];
-
-    function callback(recs) {
-      records = recs;
-    }
-
-    var test = {};
-    var arr = [];
-    Object.observe(test, callback);
-    Array.observe(arr, callback);
-    test.id = 1;
-    test.id = 2;
-    delete test.id;
-    arr.push(1, 2);
-    arr.length = 0;
-
-    Object.deliverChangeRecords(callback);
-    if (records.length !== 5)
-      return false;
-
-    if (records[0].type != 'add' ||
-        records[1].type != 'update' ||
-        records[2].type != 'delete' ||
-        records[3].type != 'splice' ||
-        records[4].type != 'splice') {
-      return false;
-    }
-
-    Object.unobserve(test, callback);
-    Array.unobserve(arr, callback);
-
-    return true;
-  }
-
-  var hasObserve = detectObjectObserve();
-
-  function detectEval() {
-    // Don't test for eval if we're running in a Chrome App environment.
-    // We check for APIs set that only exist in a Chrome App context.
-    if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {
-      return false;
-    }
-
-    // Firefox OS Apps do not allow eval. This feature detection is very hacky
-    // but even if some other platform adds support for this function this code
-    // will continue to work.
-    if (typeof navigator != 'undefined' && navigator.getDeviceStorage) {
-      return false;
-    }
-
-    try {
-      var f = new Function('', 'return true;');
-      return f();
-    } catch (ex) {
-      return false;
-    }
-  }
-
-  var hasEval = detectEval();
-
-  function isIndex(s) {
-    return +s === s >>> 0 && s !== '';
-  }
-
-  function toNumber(s) {
-    return +s;
-  }
-
-  function isObject(obj) {
-    return obj === Object(obj);
-  }
-
-  var numberIsNaN = global.Number.isNaN || function(value) {
-    return typeof value === 'number' && global.isNaN(value);
-  }
-
-  function areSameValue(left, right) {
-    if (left === right)
-      return left !== 0 || 1 / left === 1 / right;
-    if (numberIsNaN(left) && numberIsNaN(right))
-      return true;
-
-    return left !== left && right !== right;
-  }
-
-  var createObject = ('__proto__' in {}) ?
-    function(obj) { return obj; } :
-    function(obj) {
-      var proto = obj.__proto__;
-      if (!proto)
-        return obj;
-      var newObject = Object.create(proto);
-      Object.getOwnPropertyNames(obj).forEach(function(name) {
-        Object.defineProperty(newObject, name,
-                             Object.getOwnPropertyDescriptor(obj, name));
-      });
-      return newObject;
-    };
-
-  var identStart = '[\$_a-zA-Z]';
-  var identPart = '[\$_a-zA-Z0-9]';
-  var identRegExp = new RegExp('^' + identStart + '+' + identPart + '*' + '$');
-
-  function getPathCharType(char) {
-    if (char === undefined)
-      return 'eof';
-
-    var code = char.charCodeAt(0);
-
-    switch(code) {
-      case 0x5B: // [
-      case 0x5D: // ]
-      case 0x2E: // .
-      case 0x22: // "
-      case 0x27: // '
-      case 0x30: // 0
-        return char;
-
-      case 0x5F: // _
-      case 0x24: // $
-        return 'ident';
-
-      case 0x20: // Space
-      case 0x09: // Tab
-      case 0x0A: // Newline
-      case 0x0D: // Return
-      case 0xA0:  // No-break space
-      case 0xFEFF:  // Byte Order Mark
-      case 0x2028:  // Line Separator
-      case 0x2029:  // Paragraph Separator
-        return 'ws';
-    }
-
-    // a-z, A-Z
-    if ((0x61 <= code && code <= 0x7A) || (0x41 <= code && code <= 0x5A))
-      return 'ident';
-
-    // 1-9
-    if (0x31 <= code && code <= 0x39)
-      return 'number';
-
-    return 'else';
-  }
-
-  var pathStateMachine = {
-    'beforePath': {
-      'ws': ['beforePath'],
-      'ident': ['inIdent', 'append'],
-      '[': ['beforeElement'],
-      'eof': ['afterPath']
-    },
-
-    'inPath': {
-      'ws': ['inPath'],
-      '.': ['beforeIdent'],
-      '[': ['beforeElement'],
-      'eof': ['afterPath']
-    },
-
-    'beforeIdent': {
-      'ws': ['beforeIdent'],
-      'ident': ['inIdent', 'append']
-    },
-
-    'inIdent': {
-      'ident': ['inIdent', 'append'],
-      '0': ['inIdent', 'append'],
-      'number': ['inIdent', 'append'],
-      'ws': ['inPath', 'push'],
-      '.': ['beforeIdent', 'push'],
-      '[': ['beforeElement', 'push'],
-      'eof': ['afterPath', 'push']
-    },
-
-    'beforeElement': {
-      'ws': ['beforeElement'],
-      '0': ['afterZero', 'append'],
-      'number': ['inIndex', 'append'],
-      "'": ['inSingleQuote', 'append', ''],
-      '"': ['inDoubleQuote', 'append', '']
-    },
-
-    'afterZero': {
-      'ws': ['afterElement', 'push'],
-      ']': ['inPath', 'push']
-    },
-
-    'inIndex': {
-      '0': ['inIndex', 'append'],
-      'number': ['inIndex', 'append'],
-      'ws': ['afterElement'],
-      ']': ['inPath', 'push']
-    },
-
-    'inSingleQuote': {
-      "'": ['afterElement'],
-      'eof': ['error'],
-      'else': ['inSingleQuote', 'append']
-    },
-
-    'inDoubleQuote': {
-      '"': ['afterElement'],
-      'eof': ['error'],
-      'else': ['inDoubleQuote', 'append']
-    },
-
-    'afterElement': {
-      'ws': ['afterElement'],
-      ']': ['inPath', 'push']
-    }
-  }
-
-  function noop() {}
-
-  function parsePath(path) {
-    var keys = [];
-    var index = -1;
-    var c, newChar, key, type, transition, action, typeMap, mode = 'beforePath';
-
-    var actions = {
-      push: function() {
-        if (key === undefined)
-          return;
-
-        keys.push(key);
-        key = undefined;
-      },
-
-      append: function() {
-        if (key === undefined)
-          key = newChar
-        else
-          key += newChar;
-      }
-    };
-
-    function maybeUnescapeQuote() {
-      if (index >= path.length)
-        return;
-
-      var nextChar = path[index + 1];
-      if ((mode == 'inSingleQuote' && nextChar == "'") ||
-          (mode == 'inDoubleQuote' && nextChar == '"')) {
-        index++;
-        newChar = nextChar;
-        actions.append();
-        return true;
-      }
-    }
-
-    while (mode) {
-      index++;
-      c = path[index];
-
-      if (c == '\\' && maybeUnescapeQuote(mode))
-        continue;
-
-      type = getPathCharType(c);
-      typeMap = pathStateMachine[mode];
-      transition = typeMap[type] || typeMap['else'] || 'error';
-
-      if (transition == 'error')
-        return; // parse error;
-
-      mode = transition[0];
-      action = actions[transition[1]] || noop;
-      newChar = transition[2] === undefined ? c : transition[2];
-      action();
-
-      if (mode === 'afterPath') {
-        return keys;
-      }
-    }
-
-    return; // parse error
-  }
-
-  function isIdent(s) {
-    return identRegExp.test(s);
-  }
-
-  var constructorIsPrivate = {};
-
-  function Path(parts, privateToken) {
-    if (privateToken !== constructorIsPrivate)
-      throw Error('Use Path.get to retrieve path objects');
-
-    for (var i = 0; i < parts.length; i++) {
-      this.push(String(parts[i]));
-    }
-
-    if (hasEval && this.length) {
-      this.getValueFrom = this.compiledGetValueFromFn();
-    }
-  }
-
-  // TODO(rafaelw): Make simple LRU cache
-  var pathCache = {};
-
-  function getPath(pathString) {
-    if (pathString instanceof Path)
-      return pathString;
-
-    if (pathString == null || pathString.length == 0)
-      pathString = '';
-
-    if (typeof pathString != 'string') {
-      if (isIndex(pathString.length)) {
-        // Constructed with array-like (pre-parsed) keys
-        return new Path(pathString, constructorIsPrivate);
-      }
-
-      pathString = String(pathString);
-    }
-
-    var path = pathCache[pathString];
-    if (path)
-      return path;
-
-    var parts = parsePath(pathString);
-    if (!parts)
-      return invalidPath;
-
-    var path = new Path(parts, constructorIsPrivate);
-    pathCache[pathString] = path;
-    return path;
-  }
-
-  Path.get = getPath;
-
-  function formatAccessor(key) {
-    if (isIndex(key)) {
-      return '[' + key + ']';
-    } else {
-      return '["' + key.replace(/"/g, '\\"') + '"]';
-    }
-  }
-
-  Path.prototype = createObject({
-    __proto__: [],
-    valid: true,
-
-    toString: function() {
-      var pathString = '';
-      for (var i = 0; i < this.length; i++) {
-        var key = this[i];
-        if (isIdent(key)) {
-          pathString += i ? '.' + key : key;
-        } else {
-          pathString += formatAccessor(key);
-        }
-      }
-
-      return pathString;
-    },
-
-    getValueFrom: function(obj, directObserver) {
-      for (var i = 0; i < this.length; i++) {
-        if (obj == null)
-          return;
-        obj = obj[this[i]];
-      }
-      return obj;
-    },
-
-    iterateObjects: function(obj, observe) {
-      for (var i = 0; i < this.length; i++) {
-        if (i)
-          obj = obj[this[i - 1]];
-        if (!isObject(obj))
-          return;
-        observe(obj, this[i]);
-      }
-    },
-
-    compiledGetValueFromFn: function() {
-      var str = '';
-      var pathString = 'obj';
-      str += 'if (obj != null';
-      var i = 0;
-      var key;
-      for (; i < (this.length - 1); i++) {
-        key = this[i];
-        pathString += isIdent(key) ? '.' + key : formatAccessor(key);
-        str += ' &&\n     ' + pathString + ' != null';
-      }
-      str += ')\n';
-
-      var key = this[i];
-      pathString += isIdent(key) ? '.' + key : formatAccessor(key);
-
-      str += '  return ' + pathString + ';\nelse\n  return undefined;';
-      return new Function('obj', str);
-    },
-
-    setValueFrom: function(obj, value) {
-      if (!this.length)
-        return false;
-
-      for (var i = 0; i < this.length - 1; i++) {
-        if (!isObject(obj))
-          return false;
-        obj = obj[this[i]];
-      }
-
-      if (!isObject(obj))
-        return false;
-
-      obj[this[i]] = value;
-      return true;
-    }
-  });
-
-  var invalidPath = new Path('', constructorIsPrivate);
-  invalidPath.valid = false;
-  invalidPath.getValueFrom = invalidPath.setValueFrom = function() {};
-
-  var MAX_DIRTY_CHECK_CYCLES = 1000;
-
-  function dirtyCheck(observer) {
-    var cycles = 0;
-    while (cycles < MAX_DIRTY_CHECK_CYCLES && observer.check_()) {
-      cycles++;
-    }
-    if (testingExposeCycleCount)
-      global.dirtyCheckCycleCount = cycles;
-
-    return cycles > 0;
-  }
-
-  function objectIsEmpty(object) {
-    for (var prop in object)
-      return false;
-    return true;
-  }
-
-  function diffIsEmpty(diff) {
-    return objectIsEmpty(diff.added) &&
-           objectIsEmpty(diff.removed) &&
-           objectIsEmpty(diff.changed);
-  }
-
-  function diffObjectFromOldObject(object, oldObject) {
-    var added = {};
-    var removed = {};
-    var changed = {};
-
-    for (var prop in oldObject) {
-      var newValue = object[prop];
-
-      if (newValue !== undefined && newValue === oldObject[prop])
-        continue;
-
-      if (!(prop in object)) {
-        removed[prop] = undefined;
-        continue;
-      }
-
-      if (newValue !== oldObject[prop])
-        changed[prop] = newValue;
-    }
-
-    for (var prop in object) {
-      if (prop in oldObject)
-        continue;
-
-      added[prop] = object[prop];
-    }
-
-    if (Array.isArray(object) && object.length !== oldObject.length)
-      changed.length = object.length;
-
-    return {
-      added: added,
-      removed: removed,
-      changed: changed
-    };
-  }
-
-  var eomTasks = [];
-  function runEOMTasks() {
-    if (!eomTasks.length)
-      return false;
-
-    for (var i = 0; i < eomTasks.length; i++) {
-      eomTasks[i]();
-    }
-    eomTasks.length = 0;
-    return true;
-  }
-
-  var runEOM = hasObserve ? (function(){
-    return function(fn) {
-      return Promise.resolve().then(fn);
-    }
-  })() :
-  (function() {
-    return function(fn) {
-      eomTasks.push(fn);
-    };
-  })();
-
-  var observedObjectCache = [];
-
-  function newObservedObject() {
-    var observer;
-    var object;
-    var discardRecords = false;
-    var first = true;
-
-    function callback(records) {
-      if (observer && observer.state_ === OPENED && !discardRecords)
-        observer.check_(records);
-    }
-
-    return {
-      open: function(obs) {
-        if (observer)
-          throw Error('ObservedObject in use');
-
-        if (!first)
-          Object.deliverChangeRecords(callback);
-
-        observer = obs;
-        first = false;
-      },
-      observe: function(obj, arrayObserve) {
-        object = obj;
-        if (arrayObserve)
-          Array.observe(object, callback);
-        else
-          Object.observe(object, callback);
-      },
-      deliver: function(discard) {
-        discardRecords = discard;
-        Object.deliverChangeRecords(callback);
-        discardRecords = false;
-      },
-      close: function() {
-        observer = undefined;
-        Object.unobserve(object, callback);
-        observedObjectCache.push(this);
-      }
-    };
-  }
-
-  /*
-   * The observedSet abstraction is a perf optimization which reduces the total
-   * number of Object.observe observations of a set of objects. The idea is that
-   * groups of Observers will have some object dependencies in common and this
-   * observed set ensures that each object in the transitive closure of
-   * dependencies is only observed once. The observedSet acts as a write barrier
-   * such that whenever any change comes through, all Observers are checked for
-   * changed values.
-   *
-   * Note that this optimization is explicitly moving work from setup-time to
-   * change-time.
-   *
-   * TODO(rafaelw): Implement "garbage collection". In order to move work off
-   * the critical path, when Observers are closed, their observed objects are
-   * not Object.unobserve(d). As a result, it's possible that if the observedSet
-   * is kept open, but some Observers have been closed, it could cause "leaks"
-   * (prevent otherwise collectable objects from being collected). At some
-   * point, we should implement incremental "gc" which keeps a list of
-   * observedSets which may need clean-up and does small amounts of cleanup on a
-   * timeout until all is clean.
-   */
-
-  function getObservedObject(observer, object, arrayObserve) {
-    var dir = observedObjectCache.pop() || newObservedObject();
-    dir.open(observer);
-    dir.observe(object, arrayObserve);
-    return dir;
-  }
-
-  var observedSetCache = [];
-
-  function newObservedSet() {
-    var observerCount = 0;
-    var observers = [];
-    var objects = [];
-    var rootObj;
-    var rootObjProps;
-
-    function observe(obj, prop) {
-      if (!obj)
-        return;
-
-      if (obj === rootObj)
-        rootObjProps[prop] = true;
-
-      if (objects.indexOf(obj) < 0) {
-        objects.push(obj);
-        Object.observe(obj, callback);
-      }
-
-      observe(Object.getPrototypeOf(obj), prop);
-    }
-
-    function allRootObjNonObservedProps(recs) {
-      for (var i = 0; i < recs.length; i++) {
-        var rec = recs[i];
-        if (rec.object !== rootObj ||
-            rootObjProps[rec.name] ||
-            rec.type === 'setPrototype') {
-          return false;
-        }
-      }
-      return true;
-    }
-
-    function callback(recs) {
-      if (allRootObjNonObservedProps(recs))
-        return;
-
-      var observer;
-      for (var i = 0; i < observers.length; i++) {
-        observer = observers[i];
-        if (observer.state_ == OPENED) {
-          observer.iterateObjects_(observe);
-        }
-      }
-
-      for (var i = 0; i < observers.length; i++) {
-        observer = observers[i];
-        if (observer.state_ == OPENED) {
-          observer.check_();
-        }
-      }
-    }
-
-    var record = {
-      objects: objects,
-      get rootObject() { return rootObj; },
-      set rootObject(value) {
-        rootObj = value;
-        rootObjProps = {};
-      },
-      open: function(obs, object) {
-        observers.push(obs);
-        observerCount++;
-        obs.iterateObjects_(observe);
-      },
-      close: function(obs) {
-        observerCount--;
-        if (observerCount > 0) {
-          return;
-        }
-
-        for (var i = 0; i < objects.length; i++) {
-          Object.unobserve(objects[i], callback);
-          Observer.unobservedCount++;
-        }
-
-        observers.length = 0;
-        objects.length = 0;
-        rootObj = undefined;
-        rootObjProps = undefined;
-        observedSetCache.push(this);
-        if (lastObservedSet === this)
-          lastObservedSet = null;
-      },
-    };
-
-    return record;
-  }
-
-  var lastObservedSet;
-
-  function getObservedSet(observer, obj) {
-    if (!lastObservedSet || lastObservedSet.rootObject !== obj) {
-      lastObservedSet = observedSetCache.pop() || newObservedSet();
-      lastObservedSet.rootObject = obj;
-    }
-    lastObservedSet.open(observer, obj);
-    return lastObservedSet;
-  }
-
-  var UNOPENED = 0;
-  var OPENED = 1;
-  var CLOSED = 2;
-  var RESETTING = 3;
-
-  var nextObserverId = 1;
-
-  function Observer() {
-    this.state_ = UNOPENED;
-    this.callback_ = undefined;
-    this.target_ = undefined; // TODO(rafaelw): Should be WeakRef
-    this.directObserver_ = undefined;
-    this.value_ = undefined;
-    this.id_ = nextObserverId++;
-  }
-
-  Observer.prototype = {
-    open: function(callback, target) {
-      if (this.state_ != UNOPENED)
-        throw Error('Observer has already been opened.');
-
-      addToAll(this);
-      this.callback_ = callback;
-      this.target_ = target;
-      this.connect_();
-      this.state_ = OPENED;
-      return this.value_;
-    },
-
-    close: function() {
-      if (this.state_ != OPENED)
-        return;
-
-      removeFromAll(this);
-      this.disconnect_();
-      this.value_ = undefined;
-      this.callback_ = undefined;
-      this.target_ = undefined;
-      this.state_ = CLOSED;
-    },
-
-    deliver: function() {
-      if (this.state_ != OPENED)
-        return;
-
-      dirtyCheck(this);
-    },
-
-    report_: function(changes) {
-      try {
-        this.callback_.apply(this.target_, changes);
-      } catch (ex) {
-        Observer._errorThrownDuringCallback = true;
-        console.error('Exception caught during observer callback: ' +
-                       (ex.stack || ex));
-      }
-    },
-
-    discardChanges: function() {
-      this.check_(undefined, true);
-      return this.value_;
-    }
-  }
-
-  var collectObservers = !hasObserve;
-  var allObservers;
-  Observer._allObserversCount = 0;
-
-  if (collectObservers) {
-    allObservers = [];
-  }
-
-  function addToAll(observer) {
-    Observer._allObserversCount++;
-    if (!collectObservers)
-      return;
-
-    allObservers.push(observer);
-  }
-
-  function removeFromAll(observer) {
-    Observer._allObserversCount--;
-  }
-
-  var runningMicrotaskCheckpoint = false;
-
-  global.Platform = global.Platform || {};
-
-  global.Platform.performMicrotaskCheckpoint = function() {
-    if (runningMicrotaskCheckpoint)
-      return;
-
-    if (!collectObservers)
-      return;
-
-    runningMicrotaskCheckpoint = true;
-
-    var cycles = 0;
-    var anyChanged, toCheck;
-
-    do {
-      cycles++;
-      toCheck = allObservers;
-      allObservers = [];
-      anyChanged = false;
-
-      for (var i = 0; i < toCheck.length; i++) {
-        var observer = toCheck[i];
-        if (observer.state_ != OPENED)
-          continue;
-
-        if (observer.check_())
-          anyChanged = true;
-
-        allObservers.push(observer);
-      }
-      if (runEOMTasks())
-        anyChanged = true;
-    } while (cycles < MAX_DIRTY_CHECK_CYCLES && anyChanged);
-
-    if (testingExposeCycleCount)
-      global.dirtyCheckCycleCount = cycles;
-
-    runningMicrotaskCheckpoint = false;
-  };
-
-  if (collectObservers) {
-    global.Platform.clearObservers = function() {
-      allObservers = [];
-    };
-  }
-
-  function ObjectObserver(object) {
-    Observer.call(this);
-    this.value_ = object;
-    this.oldObject_ = undefined;
-  }
-
-  ObjectObserver.prototype = createObject({
-    __proto__: Observer.prototype,
-
-    arrayObserve: false,
-
-    connect_: function(callback, target) {
-      if (hasObserve) {
-        this.directObserver_ = getObservedObject(this, this.value_,
-                                                 this.arrayObserve);
-      } else {
-        this.oldObject_ = this.copyObject(this.value_);
-      }
-
-    },
-
-    copyObject: function(object) {
-      var copy = Array.isArray(object) ? [] : {};
-      for (var prop in object) {
-        copy[prop] = object[prop];
-      };
-      if (Array.isArray(object))
-        copy.length = object.length;
-      return copy;
-    },
-
-    check_: function(changeRecords, skipChanges) {
-      var diff;
-      var oldValues;
-      if (hasObserve) {
-        if (!changeRecords)
-          return false;
-
-        oldValues = {};
-        diff = diffObjectFromChangeRecords(this.value_, changeRecords,
-                                           oldValues);
-      } else {
-        oldValues = this.oldObject_;
-        diff = diffObjectFromOldObject(this.value_, this.oldObject_);
-      }
-
-      if (diffIsEmpty(diff))
-        return false;
-
-      if (!hasObserve)
-        this.oldObject_ = this.copyObject(this.value_);
-
-      this.report_([
-        diff.added || {},
-        diff.removed || {},
-        diff.changed || {},
-        function(property) {
-          return oldValues[property];
-        }
-      ]);
-
-      return true;
-    },
-
-    disconnect_: function() {
-      if (hasObserve) {
-        this.directObserver_.close();
-        this.directObserver_ = undefined;
-      } else {
-        this.oldObject_ = undefined;
-      }
-    },
-
-    deliver: function() {
-      if (this.state_ != OPENED)
-        return;
-
-      if (hasObserve)
-        this.directObserver_.deliver(false);
-      else
-        dirtyCheck(this);
-    },
-
-    discardChanges: function() {
-      if (this.directObserver_)
-        this.directObserver_.deliver(true);
-      else
-        this.oldObject_ = this.copyObject(this.value_);
-
-      return this.value_;
-    }
-  });
-
-  function ArrayObserver(array) {
-    if (!Array.isArray(array))
-      throw Error('Provided object is not an Array');
-    ObjectObserver.call(this, array);
-  }
-
-  ArrayObserver.prototype = createObject({
-
-    __proto__: ObjectObserver.prototype,
-
-    arrayObserve: true,
-
-    copyObject: function(arr) {
-      return arr.slice();
-    },
-
-    check_: function(changeRecords) {
-      var splices;
-      if (hasObserve) {
-        if (!changeRecords)
-          return false;
-        splices = projectArraySplices(this.value_, changeRecords);
-      } else {
-        splices = calcSplices(this.value_, 0, this.value_.length,
-                              this.oldObject_, 0, this.oldObject_.length);
-      }
-
-      if (!splices || !splices.length)
-        return false;
-
-      if (!hasObserve)
-        this.oldObject_ = this.copyObject(this.value_);
-
-      this.report_([splices]);
-      return true;
-    }
-  });
-
-  ArrayObserver.applySplices = function(previous, current, splices) {
-    splices.forEach(function(splice) {
-      var spliceArgs = [splice.index, splice.removed.length];
-      var addIndex = splice.index;
-      while (addIndex < splice.index + splice.addedCount) {
-        spliceArgs.push(current[addIndex]);
-        addIndex++;
-      }
-
-      Array.prototype.splice.apply(previous, spliceArgs);
-    });
-  };
-
-  function PathObserver(object, path) {
-    Observer.call(this);
-
-    this.object_ = object;
-    this.path_ = getPath(path);
-    this.directObserver_ = undefined;
-  }
-
-  PathObserver.prototype = createObject({
-    __proto__: Observer.prototype,
-
-    get path() {
-      return this.path_;
-    },
-
-    connect_: function() {
-      if (hasObserve)
-        this.directObserver_ = getObservedSet(this, this.object_);
-
-      this.check_(undefined, true);
-    },
-
-    disconnect_: function() {
-      this.value_ = undefined;
-
-      if (this.directObserver_) {
-        this.directObserver_.close(this);
-        this.directObserver_ = undefined;
-      }
-    },
-
-    iterateObjects_: function(observe) {
-      this.path_.iterateObjects(this.object_, observe);
-    },
-
-    check_: function(changeRecords, skipChanges) {
-      var oldValue = this.value_;
-      this.value_ = this.path_.getValueFrom(this.object_);
-      if (skipChanges || areSameValue(this.value_, oldValue))
-        return false;
-
-      this.report_([this.value_, oldValue, this]);
-      return true;
-    },
-
-    setValue: function(newValue) {
-      if (this.path_)
-        this.path_.setValueFrom(this.object_, newValue);
-    }
-  });
-
-  function CompoundObserver(reportChangesOnOpen) {
-    Observer.call(this);
-
-    this.reportChangesOnOpen_ = reportChangesOnOpen;
-    this.value_ = [];
-    this.directObserver_ = undefined;
-    this.observed_ = [];
-  }
-
-  var observerSentinel = {};
-
-  CompoundObserver.prototype = createObject({
-    __proto__: Observer.prototype,
-
-    connect_: function() {
-      if (hasObserve) {
-        var object;
-        var needsDirectObserver = false;
-        for (var i = 0; i < this.observed_.length; i += 2) {
-          object = this.observed_[i]
-          if (object !== observerSentinel) {
-            needsDirectObserver = true;
-            break;
-          }
-        }
-
-        if (needsDirectObserver)
-          this.directObserver_ = getObservedSet(this, object);
-      }
-
-      this.check_(undefined, !this.reportChangesOnOpen_);
-    },
-
-    disconnect_: function() {
-      for (var i = 0; i < this.observed_.length; i += 2) {
-        if (this.observed_[i] === observerSentinel)
-          this.observed_[i + 1].close();
-      }
-      this.observed_.length = 0;
-      this.value_.length = 0;
-
-      if (this.directObserver_) {
-        this.directObserver_.close(this);
-        this.directObserver_ = undefined;
-      }
-    },
-
-    addPath: function(object, path) {
-      if (this.state_ != UNOPENED && this.state_ != RESETTING)
-        throw Error('Cannot add paths once started.');
-
-      var path = getPath(path);
-      this.observed_.push(object, path);
-      if (!this.reportChangesOnOpen_)
-        return;
-      var index = this.observed_.length / 2 - 1;
-      this.value_[index] = path.getValueFrom(object);
-    },
-
-    addObserver: function(observer) {
-      if (this.state_ != UNOPENED && this.state_ != RESETTING)
-        throw Error('Cannot add observers once started.');
-
-      this.observed_.push(observerSentinel, observer);
-      if (!this.reportChangesOnOpen_)
-        return;
-      var index = this.observed_.length / 2 - 1;
-      this.value_[index] = observer.open(this.deliver, this);
-    },
-
-    startReset: function() {
-      if (this.state_ != OPENED)
-        throw Error('Can only reset while open');
-
-      this.state_ = RESETTING;
-      this.disconnect_();
-    },
-
-    finishReset: function() {
-      if (this.state_ != RESETTING)
-        throw Error('Can only finishReset after startReset');
-      this.state_ = OPENED;
-      this.connect_();
-
-      return this.value_;
-    },
-
-    iterateObjects_: function(observe) {
-      var object;
-      for (var i = 0; i < this.observed_.length; i += 2) {
-        object = this.observed_[i]
-        if (object !== observerSentinel)
-          this.observed_[i + 1].iterateObjects(object, observe)
-      }
-    },
-
-    check_: function(changeRecords, skipChanges) {
-      var oldValues;
-      for (var i = 0; i < this.observed_.length; i += 2) {
-        var object = this.observed_[i];
-        var path = this.observed_[i+1];
-        var value;
-        if (object === observerSentinel) {
-          var observable = path;
-          value = this.state_ === UNOPENED ?
-              observable.open(this.deliver, this) :
-              observable.discardChanges();
-        } else {
-          value = path.getValueFrom(object);
-        }
-
-        if (skipChanges) {
-          this.value_[i / 2] = value;
-          continue;
-        }
-
-        if (areSameValue(value, this.value_[i / 2]))
-          continue;
-
-        oldValues = oldValues || [];
-        oldValues[i / 2] = this.value_[i / 2];
-        this.value_[i / 2] = value;
-      }
-
-      if (!oldValues)
-        return false;
-
-      // TODO(rafaelw): Having observed_ as the third callback arg here is
-      // pretty lame API. Fix.
-      this.report_([this.value_, oldValues, this.observed_]);
-      return true;
-    }
-  });
-
-  function identFn(value) { return value; }
-
-  function ObserverTransform(observable, getValueFn, setValueFn,
-                             dontPassThroughSet) {
-    this.callback_ = undefined;
-    this.target_ = undefined;
-    this.value_ = undefined;
-    this.observable_ = observable;
-    this.getValueFn_ = getValueFn || identFn;
-    this.setValueFn_ = setValueFn || identFn;
-    // TODO(rafaelw): This is a temporary hack. PolymerExpressions needs this
-    // at the moment because of a bug in it's dependency tracking.
-    this.dontPassThroughSet_ = dontPassThroughSet;
-  }
-
-  ObserverTransform.prototype = {
-    open: function(callback, target) {
-      this.callback_ = callback;
-      this.target_ = target;
-      this.value_ =
-          this.getValueFn_(this.observable_.open(this.observedCallback_, this));
-      return this.value_;
-    },
-
-    observedCallback_: function(value) {
-      value = this.getValueFn_(value);
-      if (areSameValue(value, this.value_))
-        return;
-      var oldValue = this.value_;
-      this.value_ = value;
-      this.callback_.call(this.target_, this.value_, oldValue);
-    },
-
-    discardChanges: function() {
-      this.value_ = this.getValueFn_(this.observable_.discardChanges());
-      return this.value_;
-    },
-
-    deliver: function() {
-      return this.observable_.deliver();
-    },
-
-    setValue: function(value) {
-      value = this.setValueFn_(value);
-      if (!this.dontPassThroughSet_ && this.observable_.setValue)
-        return this.observable_.setValue(value);
-    },
-
-    close: function() {
-      if (this.observable_)
-        this.observable_.close();
-      this.callback_ = undefined;
-      this.target_ = undefined;
-      this.observable_ = undefined;
-      this.value_ = undefined;
-      this.getValueFn_ = undefined;
-      this.setValueFn_ = undefined;
-    }
-  }
-
-  var expectedRecordTypes = {
-    add: true,
-    update: true,
-    delete: true
-  };
-
-  function diffObjectFromChangeRecords(object, changeRecords, oldValues) {
-    var added = {};
-    var removed = {};
-
-    for (var i = 0; i < changeRecords.length; i++) {
-      var record = changeRecords[i];
-      if (!expectedRecordTypes[record.type]) {
-        console.error('Unknown changeRecord type: ' + record.type);
-        console.error(record);
-        continue;
-      }
-
-      if (!(record.name in oldValues))
-        oldValues[record.name] = record.oldValue;
-
-      if (record.type == 'update')
-        continue;
-
-      if (record.type == 'add') {
-        if (record.name in removed)
-          delete removed[record.name];
-        else
-          added[record.name] = true;
-
-        continue;
-      }
-
-      // type = 'delete'
-      if (record.name in added) {
-        delete added[record.name];
-        delete oldValues[record.name];
-      } else {
-        removed[record.name] = true;
-      }
-    }
-
-    for (var prop in added)
-      added[prop] = object[prop];
-
-    for (var prop in removed)
-      removed[prop] = undefined;
-
-    var changed = {};
-    for (var prop in oldValues) {
-      if (prop in added || prop in removed)
-        continue;
-
-      var newValue = object[prop];
-      if (oldValues[prop] !== newValue)
-        changed[prop] = newValue;
-    }
-
-    return {
-      added: added,
-      removed: removed,
-      changed: changed
-    };
-  }
-
-  function newSplice(index, removed, addedCount) {
-    return {
-      index: index,
-      removed: removed,
-      addedCount: addedCount
-    };
-  }
-
-  var EDIT_LEAVE = 0;
-  var EDIT_UPDATE = 1;
-  var EDIT_ADD = 2;
-  var EDIT_DELETE = 3;
-
-  function ArraySplice() {}
-
-  ArraySplice.prototype = {
-
-    // Note: This function is *based* on the computation of the Levenshtein
-    // "edit" distance. The one change is that "updates" are treated as two
-    // edits - not one. With Array splices, an update is really a delete
-    // followed by an add. By retaining this, we optimize for "keeping" the
-    // maximum array items in the original array. For example:
-    //
-    //   'xxxx123' -> '123yyyy'
-    //
-    // With 1-edit updates, the shortest path would be just to update all seven
-    // characters. With 2-edit updates, we delete 4, leave 3, and add 4. This
-    // leaves the substring '123' intact.
-    calcEditDistances: function(current, currentStart, currentEnd,
-                                old, oldStart, oldEnd) {
-      // "Deletion" columns
-      var rowCount = oldEnd - oldStart + 1;
-      var columnCount = currentEnd - currentStart + 1;
-      var distances = new Array(rowCount);
-
-      // "Addition" rows. Initialize null column.
-      for (var i = 0; i < rowCount; i++) {
-        distances[i] = new Array(columnCount);
-        distances[i][0] = i;
-      }
-
-      // Initialize null row
-      for (var j = 0; j < columnCount; j++)
-        distances[0][j] = j;
-
-      for (var i = 1; i < rowCount; i++) {
-        for (var j = 1; j < columnCount; j++) {
-          if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1]))
-            distances[i][j] = distances[i - 1][j - 1];
-          else {
-            var north = distances[i - 1][j] + 1;
-            var west = distances[i][j - 1] + 1;
-            distances[i][j] = north < west ? north : west;
-          }
-        }
-      }
-
-      return distances;
-    },
-
-    // This starts at the final weight, and walks "backward" by finding
-    // the minimum previous weight recursively until the origin of the weight
-    // matrix.
-    spliceOperationsFromEditDistances: function(distances) {
-      var i = distances.length - 1;
-      var j = distances[0].length - 1;
-      var current = distances[i][j];
-      var edits = [];
-      while (i > 0 || j > 0) {
-        if (i == 0) {
-          edits.push(EDIT_ADD);
-          j--;
-          continue;
-        }
-        if (j == 0) {
-          edits.push(EDIT_DELETE);
-          i--;
-          continue;
-        }
-        var northWest = distances[i - 1][j - 1];
-        var west = distances[i - 1][j];
-        var north = distances[i][j - 1];
-
-        var min;
-        if (west < north)
-          min = west < northWest ? west : northWest;
-        else
-          min = north < northWest ? north : northWest;
-
-        if (min == northWest) {
-          if (northWest == current) {
-            edits.push(EDIT_LEAVE);
-          } else {
-            edits.push(EDIT_UPDATE);
-            current = northWest;
-          }
-          i--;
-          j--;
-        } else if (min == west) {
-          edits.push(EDIT_DELETE);
-          i--;
-          current = west;
-        } else {
-          edits.push(EDIT_ADD);
-          j--;
-          current = north;
-        }
-      }
-
-      edits.reverse();
-      return edits;
-    },
-
-    /**
-     * Splice Projection functions:
-     *
-     * A splice map is a representation of how a previous array of items
-     * was transformed into a new array of items. Conceptually it is a list of
-     * tuples of
-     *
-     *   <index, removed, addedCount>
-     *
-     * which are kept in ascending index order of. The tuple represents that at
-     * the |index|, |removed| sequence of items were removed, and counting forward
-     * from |index|, |addedCount| items were added.
-     */
-
-    /**
-     * Lacking individual splice mutation information, the minimal set of
-     * splices can be synthesized given the previous state and final state of an
-     * array. The basic approach is to calculate the edit distance matrix and
-     * choose the shortest path through it.
-     *
-     * Complexity: O(l * p)
-     *   l: The length of the current array
-     *   p: The length of the old array
-     */
-    calcSplices: function(current, currentStart, currentEnd,
-                          old, oldStart, oldEnd) {
-      var prefixCount = 0;
-      var suffixCount = 0;
-
-      var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
-      if (currentStart == 0 && oldStart == 0)
-        prefixCount = this.sharedPrefix(current, old, minLength);
-
-      if (currentEnd == current.length && oldEnd == old.length)
-        suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
-
-      currentStart += prefixCount;
-      oldStart += prefixCount;
-      currentEnd -= suffixCount;
-      oldEnd -= suffixCount;
-
-      if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0)
-        return [];
-
-      if (currentStart == currentEnd) {
-        var splice = newSplice(currentStart, [], 0);
-        while (oldStart < oldEnd)
-          splice.removed.push(old[oldStart++]);
-
-        return [ splice ];
-      } else if (oldStart == oldEnd)
-        return [ newSplice(currentStart, [], currentEnd - currentStart) ];
-
-      var ops = this.spliceOperationsFromEditDistances(
-          this.calcEditDistances(current, currentStart, currentEnd,
-                                 old, oldStart, oldEnd));
-
-      var splice = undefined;
-      var splices = [];
-      var index = currentStart;
-      var oldIndex = oldStart;
-      for (var i = 0; i < ops.length; i++) {
-        switch(ops[i]) {
-          case EDIT_LEAVE:
-            if (splice) {
-              splices.push(splice);
-              splice = undefined;
-            }
-
-            index++;
-            oldIndex++;
-            break;
-          case EDIT_UPDATE:
-            if (!splice)
-              splice = newSplice(index, [], 0);
-
-            splice.addedCount++;
-            index++;
-
-            splice.removed.push(old[oldIndex]);
-            oldIndex++;
-            break;
-          case EDIT_ADD:
-            if (!splice)
-              splice = newSplice(index, [], 0);
-
-            splice.addedCount++;
-            index++;
-            break;
-          case EDIT_DELETE:
-            if (!splice)
-              splice = newSplice(index, [], 0);
-
-            splice.removed.push(old[oldIndex]);
-            oldIndex++;
-            break;
-        }
-      }
-
-      if (splice) {
-        splices.push(splice);
-      }
-      return splices;
-    },
-
-    sharedPrefix: function(current, old, searchLength) {
-      for (var i = 0; i < searchLength; i++)
-        if (!this.equals(current[i], old[i]))
-          return i;
-      return searchLength;
-    },
-
-    sharedSuffix: function(current, old, searchLength) {
-      var index1 = current.length;
-      var index2 = old.length;
-      var count = 0;
-      while (count < searchLength && this.equals(current[--index1], old[--index2]))
-        count++;
-
-      return count;
-    },
-
-    calculateSplices: function(current, previous) {
-      return this.calcSplices(current, 0, current.length, previous, 0,
-                              previous.length);
-    },
-
-    equals: function(currentValue, previousValue) {
-      return currentValue === previousValue;
-    }
-  };
-
-  var arraySplice = new ArraySplice();
-
-  function calcSplices(current, currentStart, currentEnd,
-                       old, oldStart, oldEnd) {
-    return arraySplice.calcSplices(current, currentStart, currentEnd,
-                                   old, oldStart, oldEnd);
-  }
-
-  function intersect(start1, end1, start2, end2) {
-    // Disjoint
-    if (end1 < start2 || end2 < start1)
-      return -1;
-
-    // Adjacent
-    if (end1 == start2 || end2 == start1)
-      return 0;
-
-    // Non-zero intersect, span1 first
-    if (start1 < start2) {
-      if (end1 < end2)
-        return end1 - start2; // Overlap
-      else
-        return end2 - start2; // Contained
-    } else {
-      // Non-zero intersect, span2 first
-      if (end2 < end1)
-        return end2 - start1; // Overlap
-      else
-        return end1 - start1; // Contained
-    }
-  }
-
-  function mergeSplice(splices, index, removed, addedCount) {
-
-    var splice = newSplice(index, removed, addedCount);
-
-    var inserted = false;
-    var insertionOffset = 0;
-
-    for (var i = 0; i < splices.length; i++) {
-      var current = splices[i];
-      current.index += insertionOffset;
-
-      if (inserted)
-        continue;
-
-      var intersectCount = intersect(splice.index,
-                                     splice.index + splice.removed.length,
-                                     current.index,
-                                     current.index + current.addedCount);
-
-      if (intersectCount >= 0) {
-        // Merge the two splices
-
-        splices.splice(i, 1);
-        i--;
-
-        insertionOffset -= current.addedCount - current.removed.length;
-
-        splice.addedCount += current.addedCount - intersectCount;
-        var deleteCount = splice.removed.length +
-                          current.removed.length - intersectCount;
-
-        if (!splice.addedCount && !deleteCount) {
-          // merged splice is a noop. discard.
-          inserted = true;
-        } else {
-          var removed = current.removed;
-
-          if (splice.index < current.index) {
-            // some prefix of splice.removed is prepended to current.removed.
-            var prepend = splice.removed.slice(0, current.index - splice.index);
-            Array.prototype.push.apply(prepend, removed);
-            removed = prepend;
-          }
-
-          if (splice.index + splice.removed.length > current.index + current.addedCount) {
-            // some suffix of splice.removed is appended to current.removed.
-            var append = splice.removed.slice(current.index + current.addedCount - splice.index);
-            Array.prototype.push.apply(removed, append);
-          }
-
-          splice.removed = removed;
-          if (current.index < splice.index) {
-            splice.index = current.index;
-          }
-        }
-      } else if (splice.index < current.index) {
-        // Insert splice here.
-
-        inserted = true;
-
-        splices.splice(i, 0, splice);
-        i++;
-
-        var offset = splice.addedCount - splice.removed.length
-        current.index += offset;
-        insertionOffset += offset;
-      }
-    }
-
-    if (!inserted)
-      splices.push(splice);
-  }
-
-  function createInitialSplices(array, changeRecords) {
-    var splices = [];
-
-    for (var i = 0; i < changeRecords.length; i++) {
-      var record = changeRecords[i];
-      switch(record.type) {
-        case 'splice':
-          mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);
-          break;
-        case 'add':
-        case 'update':
-        case 'delete':
-          if (!isIndex(record.name))
-            continue;
-          var index = toNumber(record.name);
-          if (index < 0)
-            continue;
-          mergeSplice(splices, index, [record.oldValue], 1);
-          break;
-        default:
-          console.error('Unexpected record type: ' + JSON.stringify(record));
-          break;
-      }
-    }
-
-    return splices;
-  }
-
-  function projectArraySplices(array, changeRecords) {
-    var splices = [];
-
-    createInitialSplices(array, changeRecords).forEach(function(splice) {
-      if (splice.addedCount == 1 && splice.removed.length == 1) {
-        if (splice.removed[0] !== array[splice.index])
-          splices.push(splice);
-
-        return
-      };
-
-      splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount,
-                                           splice.removed, 0, splice.removed.length));
-    });
-
-    return splices;
-  }
-
-  // Export the observe-js object for **Node.js**, with backwards-compatibility
-  // for the old `require()` API. Also ensure `exports` is not a DOM Element.
-  // If we're in the browser, export as a global object.
-
-  var expose = global;
-
-  if (typeof exports !== 'undefined' && !exports.nodeType) {
-    if (typeof module !== 'undefined' && module.exports) {
-      exports = module.exports;
-    }
-    expose = exports;
-  }
-
-  expose.Observer = Observer;
-  expose.Observer.runEOM_ = runEOM;
-  expose.Observer.observerSentinel_ = observerSentinel; // for testing.
-  expose.Observer.hasObjectObserve = hasObserve;
-  expose.ArrayObserver = ArrayObserver;
-  expose.ArrayObserver.calculateSplices = function(current, previous) {
-    return arraySplice.calculateSplices(current, previous);
-  };
-
-  expose.ArraySplice = ArraySplice;
-  expose.ObjectObserver = ObjectObserver;
-  expose.PathObserver = PathObserver;
-  expose.CompoundObserver = CompoundObserver;
-  expose.Path = Path;
-  expose.ObserverTransform = ObserverTransform;
-  
-})(typeof global !== 'undefined' && global && typeof module !== 'undefined' && module ? global : this || window);
-
-// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-// Code distributed by Google as part of the polymer project is also
-// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-
-(function(global) {
-  'use strict';
-
-  var filter = Array.prototype.filter.call.bind(Array.prototype.filter);
-
-  function getTreeScope(node) {
-    while (node.parentNode) {
-      node = node.parentNode;
-    }
-
-    return typeof node.getElementById === 'function' ? node : null;
-  }
-
-  Node.prototype.bind = function(name, observable) {
-    console.error('Unhandled binding to Node: ', this, name, observable);
-  };
-
-  Node.prototype.bindFinished = function() {};
-
-  function updateBindings(node, name, binding) {
-    var bindings = node.bindings_;
-    if (!bindings)
-      bindings = node.bindings_ = {};
-
-    if (bindings[name])
-      binding[name].close();
-
-    return bindings[name] = binding;
-  }
-
-  function returnBinding(node, name, binding) {
-    return binding;
-  }
-
-  function sanitizeValue(value) {
-    return value == null ? '' : value;
-  }
-
-  function updateText(node, value) {
-    node.data = sanitizeValue(value);
-  }
-
-  function textBinding(node) {
-    return function(value) {
-      return updateText(node, value);
-    };
-  }
-
-  var maybeUpdateBindings = returnBinding;
-
-  Object.defineProperty(Platform, 'enableBindingsReflection', {
-    get: function() {
-      return maybeUpdateBindings === updateBindings;
-    },
-    set: function(enable) {
-      maybeUpdateBindings = enable ? updateBindings : returnBinding;
-      return enable;
-    },
-    configurable: true
-  });
-
-  Text.prototype.bind = function(name, value, oneTime) {
-    if (name !== 'textContent')
-      return Node.prototype.bind.call(this, name, value, oneTime);
-
-    if (oneTime)
-      return updateText(this, value);
-
-    var observable = value;
-    updateText(this, observable.open(textBinding(this)));
-    return maybeUpdateBindings(this, name, observable);
-  }
-
-  function updateAttribute(el, name, conditional, value) {
-    if (conditional) {
-      if (value)
-        el.setAttribute(name, '');
-      else
-        el.removeAttribute(name);
-      return;
-    }
-
-    el.setAttribute(name, sanitizeValue(value));
-  }
-
-  function attributeBinding(el, name, conditional) {
-    return function(value) {
-      updateAttribute(el, name, conditional, value);
-    };
-  }
-
-  Element.prototype.bind = function(name, value, oneTime) {
-    var conditional = name[name.length - 1] == '?';
-    if (conditional) {
-      this.removeAttribute(name);
-      name = name.slice(0, -1);
-    }
-
-    if (oneTime)
-      return updateAttribute(this, name, conditional, value);
-
-
-    var observable = value;
-    updateAttribute(this, name, conditional,
-        observable.open(attributeBinding(this, name, conditional)));
-
-    return maybeUpdateBindings(this, name, observable);
-  };
-
-  var checkboxEventType;
-  (function() {
-    // Attempt to feature-detect which event (change or click) is fired first
-    // for checkboxes.
-    var div = document.createElement('div');
-    var checkbox = div.appendChild(document.createElement('input'));
-    checkbox.setAttribute('type', 'checkbox');
-    var first;
-    var count = 0;
-    checkbox.addEventListener('click', function(e) {
-      count++;
-      first = first || 'click';
-    });
-    checkbox.addEventListener('change', function() {
-      count++;
-      first = first || 'change';
-    });
-
-    var event = document.createEvent('MouseEvent');
-    event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false,
-        false, false, false, 0, null);
-    checkbox.dispatchEvent(event);
-    // WebKit/Blink don't fire the change event if the element is outside the
-    // document, so assume 'change' for that case.
-    checkboxEventType = count == 1 ? 'change' : first;
-  })();
-
-  function getEventForInputType(element) {
-    switch (element.type) {
-      case 'checkbox':
-        return checkboxEventType;
-      case 'radio':
-      case 'select-multiple':
-      case 'select-one':
-        return 'change';
-      case 'range':
-        if (/Trident|MSIE/.test(navigator.userAgent))
-          return 'change';
-      default:
-        return 'input';
-    }
-  }
-
-  function updateInput(input, property, value, santizeFn) {
-    input[property] = (santizeFn || sanitizeValue)(value);
-  }
-
-  function inputBinding(input, property, santizeFn) {
-    return function(value) {
-      return updateInput(input, property, value, santizeFn);
-    }
-  }
-
-  function noop() {}
-
-  function bindInputEvent(input, property, observable, postEventFn) {
-    var eventType = getEventForInputType(input);
-
-    function eventHandler() {
-      var isNum = property == 'value' && input.type == 'number';
-      observable.setValue(isNum ? input.valueAsNumber : input[property]);
-      observable.discardChanges();
-      (postEventFn || noop)(input);
-      Platform.performMicrotaskCheckpoint();
-    }
-    input.addEventListener(eventType, eventHandler);
-
-    return {
-      close: function() {
-        input.removeEventListener(eventType, eventHandler);
-        observable.close();
-      },
-
-      observable_: observable
-    }
-  }
-
-  function booleanSanitize(value) {
-    return Boolean(value);
-  }
-
-  // |element| is assumed to be an HTMLInputElement with |type| == 'radio'.
-  // Returns an array containing all radio buttons other than |element| that
-  // have the same |name|, either in the form that |element| belongs to or,
-  // if no form, in the document tree to which |element| belongs.
-  //
-  // This implementation is based upon the HTML spec definition of a
-  // "radio button group":
-  //   http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#radio-button-group
-  //
-  function getAssociatedRadioButtons(element) {
-    if (element.form) {
-      return filter(element.form.elements, function(el) {
-        return el != element &&
-            el.tagName == 'INPUT' &&
-            el.type == 'radio' &&
-            el.name == element.name;
-      });
-    } else {
-      var treeScope = getTreeScope(element);
-      if (!treeScope)
-        return [];
-      var radios = treeScope.querySelectorAll(
-          'input[type="radio"][name="' + element.name + '"]');
-      return filter(radios, function(el) {
-        return el != element && !el.form;
-      });
-    }
-  }
-
-  function checkedPostEvent(input) {
-    // Only the radio button that is getting checked gets an event. We
-    // therefore find all the associated radio buttons and update their
-    // check binding manually.
-    if (input.tagName === 'INPUT' &&
-        input.type === 'radio') {
-      getAssociatedRadioButtons(input).forEach(function(radio) {
-        var checkedBinding = radio.bindings_.checked;
-        if (checkedBinding) {
-          // Set the value directly to avoid an infinite call stack.
-          checkedBinding.observable_.setValue(false);
-        }
-      });
-    }
-  }
-
-  HTMLInputElement.prototype.bind = function(name, value, oneTime) {
-    if (name !== 'value' && name !== 'checked')
-      return HTMLElement.prototype.bind.call(this, name, value, oneTime);
-
-    this.removeAttribute(name);
-    var sanitizeFn = name == 'checked' ? booleanSanitize : sanitizeValue;
-    var postEventFn = name == 'checked' ? checkedPostEvent : noop;
-
-    if (oneTime)
-      return updateInput(this, name, value, sanitizeFn);
-
-
-    var observable = value;
-    var binding = bindInputEvent(this, name, observable, postEventFn);
-    updateInput(this, name,
-                observable.open(inputBinding(this, name, sanitizeFn)),
-                sanitizeFn);
-
-    // Checkboxes may need to update bindings of other checkboxes.
-    return updateBindings(this, name, binding);
-  }
-
-  HTMLTextAreaElement.prototype.bind = function(name, value, oneTime) {
-    if (name !== 'value')
-      return HTMLElement.prototype.bind.call(this, name, value, oneTime);
-
-    this.removeAttribute('value');
-
-    if (oneTime)
-      return updateInput(this, 'value', value);
-
-    var observable = value;
-    var binding = bindInputEvent(this, 'value', observable);
-    updateInput(this, 'value',
-                observable.open(inputBinding(this, 'value', sanitizeValue)));
-    return maybeUpdateBindings(this, name, binding);
-  }
-
-  function updateOption(option, value) {
-    var parentNode = option.parentNode;;
-    var select;
-    var selectBinding;
-    var oldValue;
-    if (parentNode instanceof HTMLSelectElement &&
-        parentNode.bindings_ &&
-        parentNode.bindings_.value) {
-      select = parentNode;
-      selectBinding = select.bindings_.value;
-      oldValue = select.value;
-    }
-
-    option.value = sanitizeValue(value);
-
-    if (select && select.value != oldValue) {
-      selectBinding.observable_.setValue(select.value);
-      selectBinding.observable_.discardChanges();
-      Platform.performMicrotaskCheckpoint();
-    }
-  }
-
-  function optionBinding(option) {
-    return function(value) {
-      updateOption(option, value);
-    }
-  }
-
-  HTMLOptionElement.prototype.bind = function(name, value, oneTime) {
-    if (name !== 'value')
-      return HTMLElement.prototype.bind.call(this, name, value, oneTime);
-
-    this.removeAttribute('value');
-
-    if (oneTime)
-      return updateOption(this, value);
-
-    var observable = value;
-    var binding = bindInputEvent(this, 'value', observable);
-    updateOption(this, observable.open(optionBinding(this)));
-    return maybeUpdateBindings(this, name, binding);
-  }
-
-  HTMLSelectElement.prototype.bind = function(name, value, oneTime) {
-    if (name === 'selectedindex')
-      name = 'selectedIndex';
-
-    if (name !== 'selectedIndex' && name !== 'value')
-      return HTMLElement.prototype.bind.call(this, name, value, oneTime);
-
-    this.removeAttribute(name);
-
-    if (oneTime)
-      return updateInput(this, name, value);
-
-    var observable = value;
-    var binding = bindInputEvent(this, name, observable);
-    updateInput(this, name,
-                observable.open(inputBinding(this, name)));
-
-    // Option update events may need to access select bindings.
-    return updateBindings(this, name, binding);
-  }
-})(this);
-
-// Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
-// This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
-// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
-// The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
-// Code distributed by Google as part of the polymer project is also
-// subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-
-(function(global) {
-  'use strict';
-
-  function assert(v) {
-    if (!v)
-      throw new Error('Assertion failed');
-  }
-
-  var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
-
-  function getFragmentRoot(node) {
-    var p;
-    while (p = node.parentNode) {
-      node = p;
-    }
-
-    return node;
-  }
-
-  function searchRefId(node, id) {
-    if (!id)
-      return;
-
-    var ref;
-    var selector = '#' + id;
-    while (!ref) {
-      node = getFragmentRoot(node);
-
-      if (node.protoContent_)
-        ref = node.protoContent_.querySelector(selector);
-      else if (node.getElementById)
-        ref = node.getElementById(id);
-
-      if (ref || !node.templateCreator_)
-        break
-
-      node = node.templateCreator_;
-    }
-
-    return ref;
-  }
-
-  function getInstanceRoot(node) {
-    while (node.parentNode) {
-      node = node.parentNode;
-    }
-    return node.templateCreator_ ? node : null;
-  }
-
-  var Map;
-  if (global.Map && typeof global.Map.prototype.forEach === 'function') {
-    Map = global.Map;
-  } else {
-    Map = function() {
-      this.keys = [];
-      this.values = [];
-    };
-
-    Map.prototype = {
-      set: function(key, value) {
-        var index = this.keys.indexOf(key);
-        if (index < 0) {
-          this.keys.push(key);
-          this.values.push(value);
-        } else {
-          this.values[index] = value;
-        }
-      },
-
-      get: function(key) {
-        var index = this.keys.indexOf(key);
-        if (index < 0)
-          return;
-
-        return this.values[index];
-      },
-
-      delete: function(key, value) {
-        var index = this.keys.indexOf(key);
-        if (index < 0)
-          return false;
-
-        this.keys.splice(index, 1);
-        this.values.splice(index, 1);
-        return true;
-      },
-
-      forEach: function(f, opt_this) {
-        for (var i = 0; i < this.keys.length; i++)
-          f.call(opt_this || this, this.values[i], this.keys[i], this);
-      }
-    };
-  }
-
-  // JScript does not have __proto__. We wrap all object literals with
-  // createObject which uses Object.create, Object.defineProperty and
-  // Object.getOwnPropertyDescriptor to create a new object that does the exact
-  // same thing. The main downside to this solution is that we have to extract
-  // all those property descriptors for IE.
-  var createObject = ('__proto__' in {}) ?
-      function(obj) { return obj; } :
-      function(obj) {
-        var proto = obj.__proto__;
-        if (!proto)
-          return obj;
-        var newObject = Object.create(proto);
-        Object.getOwnPropertyNames(obj).forEach(function(name) {
-          Object.defineProperty(newObject, name,
-                               Object.getOwnPropertyDescriptor(obj, name));
-        });
-        return newObject;
-      };
-
-  // IE does not support have Document.prototype.contains.
-  if (typeof document.contains != 'function') {
-    Document.prototype.contains = function(node) {
-      if (node === this || node.parentNode === this)
-        return true;
-      return this.documentElement.contains(node);
-    }
-  }
-
-  var BIND = 'bind';
-  var REPEAT = 'repeat';
-  var IF = 'if';
-
-  var templateAttributeDirectives = {
-    'template': true,
-    'repeat': true,
-    'bind': true,
-    'ref': true,
-    'if': true
-  };
-
-  var semanticTemplateElements = {
-    'THEAD': true,
-    'TBODY': true,
-    'TFOOT': true,
-    'TH': true,
-    'TR': true,
-    'TD': true,
-    'COLGROUP': true,
-    'COL': true,
-    'CAPTION': true,
-    'OPTION': true,
-    'OPTGROUP': true
-  };
-
-  var hasTemplateElement = typeof HTMLTemplateElement !== 'undefined';
-  if (hasTemplateElement) {
-    // TODO(rafaelw): Remove when fix for
-    // https://codereview.chromium.org/164803002/
-    // makes it to Chrome release.
-    (function() {
-      var t = document.createElement('template');
-      var d = t.content.ownerDocument;
-      var html = d.appendChild(d.createElement('html'));
-      var head = html.appendChild(d.createElement('head'));
-      var base = d.createElement('base');
-      base.href = document.baseURI;
-      head.appendChild(base);
-    })();
-  }
-
-  var allTemplatesSelectors = 'template, ' +
-      Object.keys(semanticTemplateElements).map(function(tagName) {
-        return tagName.toLowerCase() + '[template]';
-      }).join(', ');
-
-  function isSVGTemplate(el) {
-    return el.tagName == 'template' &&
-           el.namespaceURI == 'http://www.w3.org/2000/svg';
-  }
-
-  function isHTMLTemplate(el) {
-    return el.tagName == 'TEMPLATE' &&
-           el.namespaceURI == 'http://www.w3.org/1999/xhtml';
-  }
-
-  function isAttributeTemplate(el) {
-    return Boolean(semanticTemplateElements[el.tagName] &&
-                   el.hasAttribute('template'));
-  }
-
-  function isTemplate(el) {
-    if (el.isTemplate_ === undefined)
-      el.isTemplate_ = el.tagName == 'TEMPLATE' || isAttributeTemplate(el);
-
-    return el.isTemplate_;
-  }
-
-  // FIXME: Observe templates being added/removed from documents
-  // FIXME: Expose imperative API to decorate and observe templates in
-  // "disconnected tress" (e.g. ShadowRoot)
-  document.addEventListener('DOMContentLoaded', function(e) {
-    bootstrapTemplatesRecursivelyFrom(document);
-    // FIXME: Is this needed? Seems like it shouldn't be.
-    Platform.performMicrotaskCheckpoint();
-  }, false);
-
-  function forAllTemplatesFrom(node, fn) {
-    var subTemplates = node.querySelectorAll(allTemplatesSelectors);
-
-    if (isTemplate(node))
-      fn(node)
-    forEach(subTemplates, fn);
-  }
-
-  function bootstrapTemplatesRecursivelyFrom(node) {
-    function bootstrap(template) {
-      if (!HTMLTemplateElement.decorate(template))
-        bootstrapTemplatesRecursivelyFrom(template.content);
-    }
-
-    forAllTemplatesFrom(node, bootstrap);
-  }
-
-  if (!hasTemplateElement) {
-    /**
-     * This represents a <template> element.
-     * @constructor
-     * @extends {HTMLElement}
-     */
-    global.HTMLTemplateElement = function() {
-      throw TypeError('Illegal constructor');
-    };
-  }
-
-  var hasProto = '__proto__' in {};
-
-  function mixin(to, from) {
-    Object.getOwnPropertyNames(from).forEach(function(name) {
-      Object.defineProperty(to, name,
-                            Object.getOwnPropertyDescriptor(from, name));
-    });
-  }
-
-  // http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#dfn-template-contents-owner
-  function getOrCreateTemplateContentsOwner(template) {
-    var doc = template.ownerDocument
-    if (!doc.defaultView)
-      return doc;
-    var d = doc.templateContentsOwner_;
-    if (!d) {
-      // TODO(arv): This should either be a Document or HTMLDocument depending
-      // on doc.
-      d = doc.implementation.createHTMLDocument('');
-      while (d.lastChild) {
-        d.removeChild(d.lastChild);
-      }
-      doc.templateContentsOwner_ = d;
-    }
-    return d;
-  }
-
-  function getTemplateStagingDocument(template) {
-    if (!template.stagingDocument_) {
-      var owner = template.ownerDocument;
-      if (!owner.stagingDocument_) {
-        owner.stagingDocument_ = owner.implementation.createHTMLDocument('');
-        owner.stagingDocument_.isStagingDocument = true;
-        // TODO(rafaelw): Remove when fix for
-        // https://codereview.chromium.org/164803002/
-        // makes it to Chrome release.
-        var base = owner.stagingDocument_.createElement('base');
-        base.href = document.baseURI;
-        owner.stagingDocument_.head.appendChild(base);
-
-        owner.stagingDocument_.stagingDocument_ = owner.stagingDocument_;
-      }
-
-      template.stagingDocument_ = owner.stagingDocument_;
-    }
-
-    return template.stagingDocument_;
-  }
-
-  // For non-template browsers, the parser will disallow <template> in certain
-  // locations, so we allow "attribute templates" which combine the template
-  // element with the top-level container node of the content, e.g.
-  //
-  //   <tr template repeat="{{ foo }}"" class="bar"><td>Bar</td></tr>
-  //
-  // becomes
-  //
-  //   <template repeat="{{ foo }}">
-  //   + #document-fragment
-  //     + <tr class="bar">
-  //       + <td>Bar</td>
-  //
-  function extractTemplateFromAttributeTemplate(el) {
-    var template = el.ownerDocument.createElement('template');
-    el.parentNode.insertBefore(template, el);
-
-    var attribs = el.attributes;
-    var count = attribs.length;
-    while (count-- > 0) {
-      var attrib = attribs[count];
-      if (templateAttributeDirectives[attrib.name]) {
-        if (attrib.name !== 'template')
-          template.setAttribute(attrib.name, attrib.value);
-        el.removeAttribute(attrib.name);
-      }
-    }
-
-    return template;
-  }
-
-  function extractTemplateFromSVGTemplate(el) {
-    var template = el.ownerDocument.createElement('template');
-    el.parentNode.insertBefore(template, el);
-
-    var attribs = el.attributes;
-    var count = attribs.length;
-    while (count-- > 0) {
-      var attrib = attribs[count];
-      template.setAttribute(attrib.name, attrib.value);
-      el.removeAttribute(attrib.name);
-    }
-
-    el.parentNode.removeChild(el);
-    return template;
-  }
-
-  function liftNonNativeTemplateChildrenIntoContent(template, el, useRoot) {
-    var content = template.content;
-    if (useRoot) {
-      content.appendChild(el);
-      return;
-    }
-
-    var child;
-    while (child = el.firstChild) {
-      content.appendChild(child);
-    }
-  }
-
-  var templateObserver;
-  if (typeof MutationObserver == 'function') {
-    templateObserver = new MutationObserver(function(records) {
-      for (var i = 0; i < records.length; i++) {
-        records[i].target.refChanged_();
-      }
-    });
-  }
-
-  /**
-   * Ensures proper API and content model for template elements.
-   * @param {HTMLTemplateElement} opt_instanceRef The template element which
-   *     |el| template element will return as the value of its ref(), and whose
-   *     content will be used as source when createInstance() is invoked.
-   */
-  HTMLTemplateElement.decorate = function(el, opt_instanceRef) {
-    if (el.templateIsDecorated_)
-      return false;
-
-    var templateElement = el;
-    templateElement.templateIsDecorated_ = true;
-
-    var isNativeHTMLTemplate = isHTMLTemplate(templateElement) &&
-                               hasTemplateElement;
-    var bootstrapContents = isNativeHTMLTemplate;
-    var liftContents = !isNativeHTMLTemplate;
-    var liftRoot = false;
-
-    if (!isNativeHTMLTemplate) {
-      if (isAttributeTemplate(templateElement)) {
-        assert(!opt_instanceRef);
-        templateElement = extractTemplateFromAttributeTemplate(el);
-        templateElement.templateIsDecorated_ = true;
-        isNativeHTMLTemplate = hasTemplateElement;
-        liftRoot = true;
-      } else if (isSVGTemplate(templateElement)) {
-        templateElement = extractTemplateFromSVGTemplate(el);
-        templateElement.templateIsDecorated_ = true;
-        isNativeHTMLTemplate = hasTemplateElement;
-      }
-    }
-
-    if (!isNativeHTMLTemplate) {
-      fixTemplateElementPrototype(templateElement);
-      var doc = getOrCreateTemplateContentsOwner(templateElement);
-      templateElement.content_ = doc.createDocumentFragment();
-    }
-
-    if (opt_instanceRef) {
-      // template is contained within an instance, its direct content must be
-      // empty
-      templateElement.instanceRef_ = opt_instanceRef;
-    } else if (liftContents) {
-      liftNonNativeTemplateChildrenIntoContent(templateElement,
-                                               el,
-                                               liftRoot);
-    } else if (bootstrapContents) {
-      bootstrapTemplatesRecursivelyFrom(templateElement.content);
-    }
-
-    return true;
-  };
-
-  // TODO(rafaelw): This used to decorate recursively all templates from a given
-  // node. This happens by default on 'DOMContentLoaded', but may be needed
-  // in subtrees not descendent from document (e.g. ShadowRoot).
-  // Review whether this is the right public API.
-  HTMLTemplateElement.bootstrap = bootstrapTemplatesRecursivelyFrom;
-
-  var htmlElement = global.HTMLUnknownElement || HTMLElement;
-
-  var contentDescriptor = {
-    get: function() {
-      return this.content_;
-    },
-    enumerable: true,
-    configurable: true
-  };
-
-  if (!hasTemplateElement) {
-    // Gecko is more picky with the prototype than WebKit. Make sure to use the
-    // same prototype as created in the constructor.
-    HTMLTemplateElement.prototype = Object.create(htmlElement.prototype);
-
-    Object.defineProperty(HTMLTemplateElement.prototype, 'content',
-                          contentDescriptor);
-  }
-
-  function fixTemplateElementPrototype(el) {
-    if (hasProto)
-      el.__proto__ = HTMLTemplateElement.prototype;
-    else
-      mixin(el, HTMLTemplateElement.prototype);
-  }
-
-  function ensureSetModelScheduled(template) {
-    if (!template.setModelFn_) {
-      template.setModelFn_ = function() {
-        template.setModelFnScheduled_ = false;
-        var map = getBindings(template,
-            template.delegate_ && template.delegate_.prepareBinding);
-        processBindings(template, map, template.model_);
-      };
-    }
-
-    if (!template.setModelFnScheduled_) {
-      template.setModelFnScheduled_ = true;
-      Observer.runEOM_(template.setModelFn_);
-    }
-  }
-
-  mixin(HTMLTemplateElement.prototype, {
-    bind: function(name, value, oneTime) {
-      if (name != 'ref')
-        return Element.prototype.bind.call(this, name, value, oneTime);
-
-      var self = this;
-      var ref = oneTime ? value : value.open(function(ref) {
-        self.setAttribute('ref', ref);
-        self.refChanged_();
-      });
-
-      this.setAttribute('ref', ref);
-      this.refChanged_();
-      if (oneTime)
-        return;
-
-      if (!this.bindings_) {
-        this.bindings_ = { ref: value };
-      } else {
-        this.bindings_.ref = value;
-      }
-
-      return value;
-    },
-
-    processBindingDirectives_: function(directives) {
-      if (this.iterator_)
-        this.iterator_.closeDeps();
-
-      if (!directives.if && !directives.bind && !directives.repeat) {
-        if (this.iterator_) {
-          this.iterator_.close();
-          this.iterator_ = undefined;
-        }
-
-        return;
-      }
-
-      if (!this.iterator_) {
-        this.iterator_ = new TemplateIterator(this);
-      }
-
-      this.iterator_.updateDependencies(directives, this.model_);
-
-      if (templateObserver) {
-        templateObserver.observe(this, { attributes: true,
-                                         attributeFilter: ['ref'] });
-      }
-
-      return this.iterator_;
-    },
-
-    createInstance: function(model, bindingDelegate, delegate_) {
-      if (bindingDelegate)
-        delegate_ = this.newDelegate_(bindingDelegate);
-      else if (!delegate_)
-        delegate_ = this.delegate_;
-
-      if (!this.refContent_)
-        this.refContent_ = this.ref_.content;
-      var content = this.refContent_;
-      if (content.firstChild === null)
-        return emptyInstance;
-
-      var map = getInstanceBindingMap(content, delegate_);
-      var stagingDocument = getTemplateStagingDocument(this);
-      var instance = stagingDocument.createDocumentFragment();
-      instance.templateCreator_ = this;
-      instance.protoContent_ = content;
-      instance.bindings_ = [];
-      instance.terminator_ = null;
-      var instanceRecord = instance.templateInstance_ = {
-        firstNode: null,
-        lastNode: null,
-        model: model
-      };
-
-      var i = 0;
-      var collectTerminator = false;
-      for (var child = content.firstChild; child; child = child.nextSibling) {
-        // The terminator of the instance is the clone of the last child of the
-        // content. If the last child is an active template, it may produce
-        // instances as a result of production, so simply collecting the last
-        // child of the instance after it has finished producing may be wrong.
-        if (child.nextSibling === null)
-          collectTerminator = true;
-
-        var clone = cloneAndBindInstance(child, instance, stagingDocument,
-                                         map.children[i++],
-                                         model,
-                                         delegate_,
-                                         instance.bindings_);
-        clone.templateInstance_ = instanceRecord;
-        if (collectTerminator)
-          instance.terminator_ = clone;
-      }
-
-      instanceRecord.firstNode = instance.firstChild;
-      instanceRecord.lastNode = instance.lastChild;
-      instance.templateCreator_ = undefined;
-      instance.protoContent_ = undefined;
-      return instance;
-    },
-
-    get model() {
-      return this.model_;
-    },
-
-    set model(model) {
-      this.model_ = model;
-      ensureSetModelScheduled(this);
-    },
-
-    get bindingDelegate() {
-      return this.delegate_ && this.delegate_.raw;
-    },
-
-    refChanged_: function() {
-      if (!this.iterator_ || this.refContent_ === this.ref_.content)
-        return;
-
-      this.refContent_ = undefined;
-      this.iterator_.valueChanged();
-      this.iterator_.updateIteratedValue(this.iterator_.getUpdatedValue());
-    },
-
-    clear: function() {
-      this.model_ = undefined;
-      this.delegate_ = undefined;
-      if (this.bindings_ && this.bindings_.ref)
-        this.bindings_.ref.close()
-      this.refContent_ = undefined;
-      if (!this.iterator_)
-        return;
-      this.iterator_.valueChanged();
-      this.iterator_.close()
-      this.iterator_ = undefined;
-    },
-
-    setDelegate_: function(delegate) {
-      this.delegate_ = delegate;
-      this.bindingMap_ = undefined;
-      if (this.iterator_) {
-        this.iterator_.instancePositionChangedFn_ = undefined;
-        this.iterator_.instanceModelFn_ = undefined;
-      }
-    },
-
-    newDelegate_: function(bindingDelegate) {
-      if (!bindingDelegate)
-        return;
-
-      function delegateFn(name) {
-        var fn = bindingDelegate && bindingDelegate[name];
-        if (typeof fn != 'function')
-          return;
-
-        return function() {
-          return fn.apply(bindingDelegate, arguments);
-        };
-      }
-
-      return {
-        bindingMaps: {},
-        raw: bindingDelegate,
-        prepareBinding: delegateFn('prepareBinding'),
-        prepareInstanceModel: delegateFn('prepareInstanceModel'),
-        prepareInstancePositionChanged:
-            delegateFn('prepareInstancePositionChanged')
-      };
-    },
-
-    set bindingDelegate(bindingDelegate) {
-      if (this.delegate_) {
-        throw Error('Template must be cleared before a new bindingDelegate ' +
-                    'can be assigned');
-      }
-
-      this.setDelegate_(this.newDelegate_(bindingDelegate));
-    },
-
-    get ref_() {
-      var ref = searchRefId(this, this.getAttribute('ref'));
-      if (!ref)
-        ref = this.instanceRef_;
-
-      if (!ref)
-        return this;
-
-      var nextRef = ref.ref_;
-      return nextRef ? nextRef : ref;
-    }
-  });
-
-  // Returns
-  //   a) undefined if there are no mustaches.
-  //   b) [TEXT, (ONE_TIME?, PATH, DELEGATE_FN, TEXT)+] if there is at least one mustache.
-  function parseMustaches(s, name, node, prepareBindingFn) {
-    if (!s || !s.length)
-      return;
-
-    var tokens;
-    var length = s.length;
-    var startIndex = 0, lastIndex = 0, endIndex = 0;
-    var onlyOneTime = true;
-    while (lastIndex < length) {
-      var startIndex = s.indexOf('{{', lastIndex);
-      var oneTimeStart = s.indexOf('[[', lastIndex);
-      var oneTime = false;
-      var terminator = '}}';
-
-      if (oneTimeStart >= 0 &&
-          (startIndex < 0 || oneTimeStart < startIndex)) {
-        startIndex = oneTimeStart;
-        oneTime = true;
-        terminator = ']]';
-      }
-
-      endIndex = startIndex < 0 ? -1 : s.indexOf(terminator, startIndex + 2);
-
-      if (endIndex < 0) {
-        if (!tokens)
-          return;
-
-        tokens.push(s.slice(lastIndex)); // TEXT
-        break;
-      }
-
-      tokens = tokens || [];
-      tokens.push(s.slice(lastIndex, startIndex)); // TEXT
-      var pathString = s.slice(startIndex + 2, endIndex).trim();
-      tokens.push(oneTime); // ONE_TIME?
-      onlyOneTime = onlyOneTime && oneTime;
-      var delegateFn = prepareBindingFn &&
-                       prepareBindingFn(pathString, name, node);
-      // Don't try to parse the expression if there's a prepareBinding function
-      if (delegateFn == null) {
-        tokens.push(Path.get(pathString)); // PATH
-      } else {
-        tokens.push(null);
-      }
-      tokens.push(delegateFn); // DELEGATE_FN
-      lastIndex = endIndex + 2;
-    }
-
-    if (lastIndex === length)
-      tokens.push(''); // TEXT
-
-    tokens.hasOnePath = tokens.length === 5;
-    tokens.isSimplePath = tokens.hasOnePath &&
-                          tokens[0] == '' &&
-                          tokens[4] == '';
-    tokens.onlyOneTime = onlyOneTime;
-
-    tokens.combinator = function(values) {
-      var newValue = tokens[0];
-
-      for (var i = 1; i < tokens.length; i += 4) {
-        var value = tokens.hasOnePath ? values : values[(i - 1) / 4];
-        if (value !== undefined)
-          newValue += value;
-        newValue += tokens[i + 3];
-      }
-
-      return newValue;
-    }
-
-    return tokens;
-  };
-
-  function processOneTimeBinding(name, tokens, node, model) {
-    if (tokens.hasOnePath) {
-      var delegateFn = tokens[3];
-      var value = delegateFn ? delegateFn(model, node, true) :
-                               tokens[2].getValueFrom(model);
-      return tokens.isSimplePath ? value : tokens.combinator(value);
-    }
-
-    var values = [];
-    for (var i = 1; i < tokens.length; i += 4) {
-      var delegateFn = tokens[i + 2];
-      values[(i - 1) / 4] = delegateFn ? delegateFn(model, node) :
-          tokens[i + 1].getValueFrom(model);
-    }
-
-    return tokens.combinator(values);
-  }
-
-  function processSinglePathBinding(name, tokens, node, model) {
-    var delegateFn = tokens[3];
-    var observer = delegateFn ? delegateFn(model, node, false) :
-        new PathObserver(model, tokens[2]);
-
-    return tokens.isSimplePath ? observer :
-        new ObserverTransform(observer, tokens.combinator);
-  }
-
-  function processBinding(name, tokens, node, model) {
-    if (tokens.onlyOneTime)
-      return processOneTimeBinding(name, tokens, node, model);
-
-    if (tokens.hasOnePath)
-      return processSinglePathBinding(name, tokens, node, model);
-
-    var observer = new CompoundObserver();
-
-    for (var i = 1; i < tokens.length; i += 4) {
-      var oneTime = tokens[i];
-      var delegateFn = tokens[i + 2];
-
-      if (delegateFn) {
-        var value = delegateFn(model, node, oneTime);
-        if (oneTime)
-          observer.addPath(value)
-        else
-          observer.addObserver(value);
-        continue;
-      }
-
-      var path = tokens[i + 1];
-      if (oneTime)
-        observer.addPath(path.getValueFrom(model))
-      else
-        observer.addPath(model, path);
-    }
-
-    return new ObserverTransform(observer, tokens.combinator);
-  }
-
-  function processBindings(node, bindings, model, instanceBindings) {
-    for (var i = 0; i < bindings.length; i += 2) {
-      var name = bindings[i]
-      var tokens = bindings[i + 1];
-      var value = processBinding(name, tokens, node, model);
-      var binding = node.bind(name, value, tokens.onlyOneTime);
-      if (binding && instanceBindings)
-        instanceBindings.push(binding);
-    }
-
-    node.bindFinished();
-    if (!bindings.isTemplate)
-      return;
-
-    node.model_ = model;
-    var iter = node.processBindingDirectives_(bindings);
-    if (instanceBindings && iter)
-      instanceBindings.push(iter);
-  }
-
-  function parseWithDefault(el, name, prepareBindingFn) {
-    var v = el.getAttribute(name);
-    return parseMustaches(v == '' ? '{{}}' : v, name, el, prepareBindingFn);
-  }
-
-  function parseAttributeBindings(element, prepareBindingFn) {
-    assert(element);
-
-    var bindings = [];
-    var ifFound = false;
-    var bindFound = false;
-
-    for (var i = 0; i < element.attributes.length; i++) {
-      var attr = element.attributes[i];
-      var name = attr.name;
-      var value = attr.value;
-
-      // Allow bindings expressed in attributes to be prefixed with underbars.
-      // We do this to allow correct semantics for browsers that don't implement
-      // <template> where certain attributes might trigger side-effects -- and
-      // for IE which sanitizes certain attributes, disallowing mustache
-      // replacements in their text.
-      while (name[0] === '_') {
-        name = name.substring(1);
-      }
-
-      if (isTemplate(element) &&
-          (name === IF || name === BIND || name === REPEAT)) {
-        continue;
-      }
-
-      var tokens = parseMustaches(value, name, element,
-                                  prepareBindingFn);
-      if (!tokens)
-        continue;
-
-      bindings.push(name, tokens);
-    }
-
-    if (isTemplate(element)) {
-      bindings.isTemplate = true;
-      bindings.if = parseWithDefault(element, IF, prepareBindingFn);
-      bindings.bind = parseWithDefault(element, BIND, prepareBindingFn);
-      bindings.repeat = parseWithDefault(element, REPEAT, prepareBindingFn);
-
-      if (bindings.if && !bindings.bind && !bindings.repeat)
-        bindings.bind = parseMustaches('{{}}', BIND, element, prepareBindingFn);
-    }
-
-    return bindings;
-  }
-
-  function getBindings(node, prepareBindingFn) {
-    if (node.nodeType === Node.ELEMENT_NODE)
-      return parseAttributeBindings(node, prepareBindingFn);
-
-    if (node.nodeType === Node.TEXT_NODE) {
-      var tokens = parseMustaches(node.data, 'textContent', node,
-                                  prepareBindingFn);
-      if (tokens)
-        return ['textContent', tokens];
-    }
-
-    return [];
-  }
-
-  function cloneAndBindInstance(node, parent, stagingDocument, bindings, model,
-                                delegate,
-                                instanceBindings,
-                                instanceRecord) {
-    var clone = parent.appendChild(stagingDocument.importNode(node, false));
-
-    var i = 0;
-    for (var child = node.firstChild; child; child = child.nextSibling) {
-      cloneAndBindInstance(child, clone, stagingDocument,
-                            bindings.children[i++],
-                            model,
-                            delegate,
-                            instanceBindings);
-    }
-
-    if (bindings.isTemplate) {
-      HTMLTemplateElement.decorate(clone, node);
-      if (delegate)
-        clone.setDelegate_(delegate);
-    }
-
-    processBindings(clone, bindings, model, instanceBindings);
-    return clone;
-  }
-
-  function createInstanceBindingMap(node, prepareBindingFn) {
-    var map = getBindings(node, prepareBindingFn);
-    map.children = {};
-    var index = 0;
-    for (var child = node.firstChild; child; child = child.nextSibling) {
-      map.children[index++] = createInstanceBindingMap(child, prepareBindingFn);
-    }
-
-    return map;
-  }
-
-  var contentUidCounter = 1;
-
-  // TODO(rafaelw): Setup a MutationObserver on content which clears the id
-  // so that bindingMaps regenerate when the template.content changes.
-  function getContentUid(content) {
-    var id = content.id_;
-    if (!id)
-      id = content.id_ = contentUidCounter++;
-    return id;
-  }
-
-  // Each delegate is associated with a set of bindingMaps, one for each
-  // content which may be used by a template. The intent is that each binding
-  // delegate gets the opportunity to prepare the instance (via the prepare*
-  // delegate calls) once across all uses.
-  // TODO(rafaelw): Separate out the parse map from the binding map. In the
-  // current implementation, if two delegates need a binding map for the same
-  // content, the second will have to reparse.
-  function getInstanceBindingMap(content, delegate_) {
-    var contentId = getContentUid(content);
-    if (delegate_) {
-      var map = delegate_.bindingMaps[contentId];
-      if (!map) {
-        map = delegate_.bindingMaps[contentId] =
-            createInstanceBindingMap(content, delegate_.prepareBinding) || [];
-      }
-      return map;
-    }
-
-    var map = content.bindingMap_;
-    if (!map) {
-      map = content.bindingMap_ =
-          createInstanceBindingMap(content, undefined) || [];
-    }
-    return map;
-  }
-
-  Object.defineProperty(Node.prototype, 'templateInstance', {
-    get: function() {
-      var instance = this.templateInstance_;
-      return instance ? instance :
-          (this.parentNode ? this.parentNode.templateInstance : undefined);
-    }
-  });
-
-  var emptyInstance = document.createDocumentFragment();
-  emptyInstance.bindings_ = [];
-  emptyInstance.terminator_ = null;
-
-  function TemplateIterator(templateElement) {
-    this.closed = false;
-    this.templateElement_ = templateElement;
-    this.instances = [];
-    this.deps = undefined;
-    this.iteratedValue = [];
-    this.presentValue = undefined;
-    this.arrayObserver = undefined;
-  }
-
-  TemplateIterator.prototype = {
-    closeDeps: function() {
-      var deps = this.deps;
-      if (deps) {
-        if (deps.ifOneTime === false)
-          deps.ifValue.close();
-        if (deps.oneTime === false)
-          deps.value.close();
-      }
-    },
-
-    updateDependencies: function(directives, model) {
-      this.closeDeps();
-
-      var deps = this.deps = {};
-      var template = this.templateElement_;
-
-      var ifValue = true;
-      if (directives.if) {
-        deps.hasIf = true;
-        deps.ifOneTime = directives.if.onlyOneTime;
-        deps.ifValue = processBinding(IF, directives.if, template, model);
-
-        ifValue = deps.ifValue;
-
-        // oneTime if & predicate is false. nothing else to do.
-        if (deps.ifOneTime && !ifValue) {
-          this.valueChanged();
-          return;
-        }
-
-        if (!deps.ifOneTime)
-          ifValue = ifValue.open(this.updateIfValue, this);
-      }
-
-      if (directives.repeat) {
-        deps.repeat = true;
-        deps.oneTime = directives.repeat.onlyOneTime;
-        deps.value = processBinding(REPEAT, directives.repeat, template, model);
-      } else {
-        deps.repeat = false;
-        deps.oneTime = directives.bind.onlyOneTime;
-        deps.value = processBinding(BIND, directives.bind, template, model);
-      }
-
-      var value = deps.value;
-      if (!deps.oneTime)
-        value = value.open(this.updateIteratedValue, this);
-
-      if (!ifValue) {
-        this.valueChanged();
-        return;
-      }
-
-      this.updateValue(value);
-    },
-
-    /**
-     * Gets the updated value of the bind/repeat. This can potentially call
-     * user code (if a bindingDelegate is set up) so we try to avoid it if we
-     * already have the value in hand (from Observer.open).
-     */
-    getUpdatedValue: function() {
-      var value = this.deps.value;
-      if (!this.deps.oneTime)
-        value = value.discardChanges();
-      return value;
-    },
-
-    updateIfValue: function(ifValue) {
-      if (!ifValue) {
-        this.valueChanged();
-        return;
-      }
-
-      this.updateValue(this.getUpdatedValue());
-    },
-
-    updateIteratedValue: function(value) {
-      if (this.deps.hasIf) {
-        var ifValue = this.deps.ifValue;
-        if (!this.deps.ifOneTime)
-          ifValue = ifValue.discardChanges();
-        if (!ifValue) {
-          this.valueChanged();
-          return;
-        }
-      }
-
-      this.updateValue(value);
-    },
-
-    updateValue: function(value) {
-      if (!this.deps.repeat)
-        value = [value];
-      var observe = this.deps.repeat &&
-                    !this.deps.oneTime &&
-                    Array.isArray(value);
-      this.valueChanged(value, observe);
-    },
-
-    valueChanged: function(value, observeValue) {
-      if (!Array.isArray(value))
-        value = [];
-
-      if (value === this.iteratedValue)
-        return;
-
-      this.unobserve();
-      this.presentValue = value;
-      if (observeValue) {
-        this.arrayObserver = new ArrayObserver(this.presentValue);
-        this.arrayObserver.open(this.handleSplices, this);
-      }
-
-      this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,
-                                                        this.iteratedValue));
-    },
-
-    getLastInstanceNode: function(index) {
-      if (index == -1)
-        return this.templateElement_;
-      var instance = this.instances[index];
-      var terminator = instance.terminator_;
-      if (!terminator)
-        return this.getLastInstanceNode(index - 1);
-
-      if (terminator.nodeType !== Node.ELEMENT_NODE ||
-          this.templateElement_ === terminator) {
-        return terminator;
-      }
-
-      var subtemplateIterator = terminator.iterator_;
-      if (!subtemplateIterator)
-        return terminator;
-
-      return subtemplateIterator.getLastTemplateNode();
-    },
-
-    getLastTemplateNode: function() {
-      return this.getLastInstanceNode(this.instances.length - 1);
-    },
-
-    insertInstanceAt: function(index, fragment) {
-      var previousInstanceLast = this.getLastInstanceNode(index - 1);
-      var parent = this.templateElement_.parentNode;
-      this.instances.splice(index, 0, fragment);
-
-      parent.insertBefore(fragment, previousInstanceLast.nextSibling);
-    },
-
-    extractInstanceAt: function(index) {
-      var previousInstanceLast = this.getLastInstanceNode(index - 1);
-      var lastNode = this.getLastInstanceNode(index);
-      var parent = this.templateElement_.parentNode;
-      var instance = this.instances.splice(index, 1)[0];
-
-      while (lastNode !== previousInstanceLast) {
-        var node = previousInstanceLast.nextSibling;
-        if (node == lastNode)
-          lastNode = previousInstanceLast;
-
-        instance.appendChild(parent.removeChild(node));
-      }
-
-      return instance;
-    },
-
-    getDelegateFn: function(fn) {
-      fn = fn && fn(this.templateElement_);
-      return typeof fn === 'function' ? fn : null;
-    },
-
-    handleSplices: function(splices) {
-      if (this.closed || !splices.length)
-        return;
-
-      var template = this.templateElement_;
-
-      if (!template.parentNode) {
-        this.close();
-        return;
-      }
-
-      ArrayObserver.applySplices(this.iteratedValue, this.presentValue,
-                                 splices);
-
-      var delegate = template.delegate_;
-      if (this.instanceModelFn_ === undefined) {
-        this.instanceModelFn_ =
-            this.getDelegateFn(delegate && delegate.prepareInstanceModel);
-      }
-
-      if (this.instancePositionChangedFn_ === undefined) {
-        this.instancePositionChangedFn_ =
-            this.getDelegateFn(delegate &&
-                               delegate.prepareInstancePositionChanged);
-      }
-
-      // Instance Removals
-      var instanceCache = new Map;
-      var removeDelta = 0;
-      for (var i = 0; i < splices.length; i++) {
-        var splice = splices[i];
-        var removed = splice.removed;
-        for (var j = 0; j < removed.length; j++) {
-          var model = removed[j];
-          var instance = this.extractInstanceAt(splice.index + removeDelta);
-          if (instance !== emptyInstance) {
-            instanceCache.set(model, instance);
-          }
-        }
-
-        removeDelta -= splice.addedCount;
-      }
-
-      // Instance Insertions
-      for (var i = 0; i < splices.length; i++) {
-        var splice = splices[i];
-        var addIndex = splice.index;
-        for (; addIndex < splice.index + splice.addedCount; addIndex++) {
-          var model = this.iteratedValue[addIndex];
-          var instance = instanceCache.get(model);
-          if (instance) {
-            instanceCache.delete(model);
-          } else {
-            if (this.instanceModelFn_) {
-              model = this.instanceModelFn_(model);
-            }
-
-            if (model === undefined) {
-              instance = emptyInstance;
-            } else {
-              instance = template.createInstance(model, undefined, delegate);
-            }
-          }
-
-          this.insertInstanceAt(addIndex, instance);
-        }
-      }
-
-      instanceCache.forEach(function(instance) {
-        this.closeInstanceBindings(instance);
-      }, this);
-
-      if (this.instancePositionChangedFn_)
-        this.reportInstancesMoved(splices);
-    },
-
-    reportInstanceMoved: function(index) {
-      var instance = this.instances[index];
-      if (instance === emptyInstance)
-        return;
-
-      this.instancePositionChangedFn_(instance.templateInstance_, index);
-    },
-
-    reportInstancesMoved: function(splices) {
-      var index = 0;
-      var offset = 0;
-      for (var i = 0; i < splices.length; i++) {
-        var splice = splices[i];
-        if (offset != 0) {
-          while (index < splice.index) {
-            this.reportInstanceMoved(index);
-            index++;
-          }
-        } else {
-          index = splice.index;
-        }
-
-        while (index < splice.index + splice.addedCount) {
-          this.reportInstanceMoved(index);
-          index++;
-        }
-
-        offset += splice.addedCount - splice.removed.length;
-      }
-
-      if (offset == 0)
-        return;
-
-      var length = this.instances.length;
-      while (index < length) {
-        this.reportInstanceMoved(index);
-        index++;
-      }
-    },
-
-    closeInstanceBindings: function(instance) {
-      var bindings = instance.bindings_;
-      for (var i = 0; i < bindings.length; i++) {
-        bindings[i].close();
-      }
-    },
-
-    unobserve: function() {
-      if (!this.arrayObserver)
-        return;
-
-      this.arrayObserver.close();
-      this.arrayObserver = undefined;
-    },
-
-    close: function() {
-      if (this.closed)
-        return;
-      this.unobserve();
-      for (var i = 0; i < this.instances.length; i++) {
-        this.closeInstanceBindings(this.instances[i]);
-      }
-
-      this.instances.length = 0;
-      this.closeDeps();
-      this.templateElement_.iterator_ = undefined;
-      this.closed = true;
-    }
-  };
-
-  // Polyfill-specific API.
-  HTMLTemplateElement.forAllTemplatesFrom_ = forAllTemplatesFrom;
-})(this);
-
-(function(scope) {
-  'use strict';
-
-  // feature detect for URL constructor
-  var hasWorkingUrl = false;
-  if (!scope.forceJURL) {
-    try {
-      var u = new URL('b', 'http://a');
-      u.pathname = 'c%20d';
-      hasWorkingUrl = u.href === 'http://a/c%20d';
-    } catch(e) {}
-  }
-
-  if (hasWorkingUrl)
-    return;
-
-  var relative = Object.create(null);
-  relative['ftp'] = 21;
-  relative['file'] = 0;
-  relative['gopher'] = 70;
-  relative['http'] = 80;
-  relative['https'] = 443;
-  relative['ws'] = 80;
-  relative['wss'] = 443;
-
-  var relativePathDotMapping = Object.create(null);
-  relativePathDotMapping['%2e'] = '.';
-  relativePathDotMapping['.%2e'] = '..';
-  relativePathDotMapping['%2e.'] = '..';
-  relativePathDotMapping['%2e%2e'] = '..';
-
-  function isRelativeScheme(scheme) {
-    return relative[scheme] !== undefined;
-  }
-
-  function invalid() {
-    clear.call(this);
-    this._isInvalid = true;
-  }
-
-  function IDNAToASCII(h) {
-    if ('' == h) {
-      invalid.call(this)
-    }
-    // XXX
-    return h.toLowerCase()
-  }
-
-  function percentEscape(c) {
-    var unicode = c.charCodeAt(0);
-    if (unicode > 0x20 &&
-       unicode < 0x7F &&
-       // " # < > ? `
-       [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1
-      ) {
-      return c;
-    }
-    return encodeURIComponent(c);
-  }
-
-  function percentEscapeQuery(c) {
-    // XXX This actually needs to encode c using encoding and then
-    // convert the bytes one-by-one.
-
-    var unicode = c.charCodeAt(0);
-    if (unicode > 0x20 &&
-       unicode < 0x7F &&
-       // " # < > ` (do not escape '?')
-       [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1
-      ) {
-      return c;
-    }
-    return encodeURIComponent(c);
-  }
-
-  var EOF = undefined,
-      ALPHA = /[a-zA-Z]/,
-      ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
-
-  function parse(input, stateOverride, base) {
-    function err(message) {
-      errors.push(message)
-    }
-
-    var state = stateOverride || 'scheme start',
-        cursor = 0,
-        buffer = '',
-        seenAt = false,
-        seenBracket = false,
-        errors = [];
-
-    loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
-      var c = input[cursor];
-      switch (state) {
-        case 'scheme start':
-          if (c && ALPHA.test(c)) {
-            buffer += c.toLowerCase(); // ASCII-safe
-            state = 'scheme';
-          } else if (!stateOverride) {
-            buffer = '';
-            state = 'no scheme';
-            continue;
-          } else {
-            err('Invalid scheme.');
-            break loop;
-          }
-          break;
-
-        case 'scheme':
-          if (c && ALPHANUMERIC.test(c)) {
-            buffer += c.toLowerCase(); // ASCII-safe
-          } else if (':' == c) {
-            this._scheme = buffer;
-            buffer = '';
-            if (stateOverride) {
-              break loop;
-            }
-            if (isRelativeScheme(this._scheme)) {
-              this._isRelative = true;
-            }
-            if ('file' == this._scheme) {
-              state = 'relative';
-            } else if (this._isRelative && base && base._scheme == this._scheme) {
-              state = 'relative or authority';
-            } else if (this._isRelative) {
-              state = 'authority first slash';
-            } else {
-              state = 'scheme data';
-            }
-          } else if (!stateOverride) {
-            buffer = '';
-            cursor = 0;
-            state = 'no scheme';
-            continue;
-          } else if (EOF == c) {
-            break loop;
-          } else {
-            err('Code point not allowed in scheme: ' + c)
-            break loop;
-          }
-          break;
-
-        case 'scheme data':
-          if ('?' == c) {
-            query = '?';
-            state = 'query';
-          } else if ('#' == c) {
-            this._fragment = '#';
-            state = 'fragment';
-          } else {
-            // XXX error handling
-            if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
-              this._schemeData += percentEscape(c);
-            }
-          }
-          break;
-
-        case 'no scheme':
-          if (!base || !(isRelativeScheme(base._scheme))) {
-            err('Missing scheme.');
-            invalid.call(this);
-          } else {
-            state = 'relative';
-            continue;
-          }
-          break;
-
-        case 'relative or authority':
-          if ('/' == c && '/' == input[cursor+1]) {
-            state = 'authority ignore slashes';
-          } else {
-            err('Expected /, got: ' + c);
-            state = 'relative';
-            continue
-          }
-          break;
-
-        case 'relative':
-          this._isRelative = true;
-          if ('file' != this._scheme)
-            this._scheme = base._scheme;
-          if (EOF == c) {
-            this._host = base._host;
-            this._port = base._port;
-            this._path = base._path.slice();
-            this._query = base._query;
-            break loop;
-          } else if ('/' == c || '\\' == c) {
-            if ('\\' == c)
-              err('\\ is an invalid code point.');
-            state = 'relative slash';
-          } else if ('?' == c) {
-            this._host = base._host;
-            this._port = base._port;
-            this._path = base._path.slice();
-            this._query = '?';
-            state = 'query';
-          } else if ('#' == c) {
-            this._host = base._host;
-            this._port = base._port;
-            this._path = base._path.slice();
-            this._query = base._query;
-            this._fragment = '#';
-            state = 'fragment';
-          } else {
-            var nextC = input[cursor+1]
-            var nextNextC = input[cursor+2]
-            if (
-              'file' != this._scheme || !ALPHA.test(c) ||
-              (nextC != ':' && nextC != '|') ||
-              (EOF != nextNextC && '/' != nextNextC && '\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {
-              this._host = base._host;
-              this._port = base._port;
-              this._path = base._path.slice();
-              this._path.pop();
-            }
-            state = 'relative path';
-            continue;
-          }
-          break;
-
-        case 'relative slash':
-          if ('/' == c || '\\' == c) {
-            if ('\\' == c) {
-              err('\\ is an invalid code point.');
-            }
-            if ('file' == this._scheme) {
-              state = 'file host';
-            } else {
-              state = 'authority ignore slashes';
-            }
-          } else {
-            if ('file' != this._scheme) {
-              this._host = base._host;
-              this._port = base._port;
-            }
-            state = 'relative path';
-            continue;
-          }
-          break;
-
-        case 'authority first slash':
-          if ('/' == c) {
-            state = 'authority second slash';
-          } else {
-            err("Expected '/', got: " + c);
-            state = 'authority ignore slashes';
-            continue;
-          }
-          break;
-
-        case 'authority second slash':
-          state = 'authority ignore slashes';
-          if ('/' != c) {
-            err("Expected '/', got: " + c);
-            continue;
-          }
-          break;
-
-        case 'authority ignore slashes':
-          if ('/' != c && '\\' != c) {
-            state = 'authority';
-            continue;
-          } else {
-            err('Expected authority, got: ' + c);
-          }
-          break;
-
-        case 'authority':
-          if ('@' == c) {
-            if (seenAt) {
-              err('@ already seen.');
-              buffer += '%40';
-            }
-            seenAt = true;
-            for (var i = 0; i < buffer.length; i++) {
-              var cp = buffer[i];
-              if ('\t' == cp || '\n' == cp || '\r' == cp) {
-                err('Invalid whitespace in authority.');
-                continue;
-              }
-              // XXX check URL code points
-              if (':' == cp && null === this._password) {
-                this._password = '';
-                continue;
-              }
-              var tempC = percentEscape(cp);
-              (null !== this._password) ? this._password += tempC : this._username += tempC;
-            }
-            buffer = '';
-          } else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
-            cursor -= buffer.length;
-            buffer = '';
-            state = 'host';
-            continue;
-          } else {
-            buffer += c;
-          }
-          break;
-
-        case 'file host':
-          if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
-            if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {
-              state = 'relative path';
-            } else if (buffer.length == 0) {
-              state = 'relative path start';
-            } else {
-              this._host = IDNAToASCII.call(this, buffer);
-              buffer = '';
-              state = 'relative path start';
-            }
-            continue;
-          } else if ('\t' == c || '\n' == c || '\r' == c) {
-            err('Invalid whitespace in file host.');
-          } else {
-            buffer += c;
-          }
-          break;
-
-        case 'host':
-        case 'hostname':
-          if (':' == c && !seenBracket) {
-            // XXX host parsing
-            this._host = IDNAToASCII.call(this, buffer);
-            buffer = '';
-            state = 'port';
-            if ('hostname' == stateOverride) {
-              break loop;
-            }
-          } else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c) {
-            this._host = IDNAToASCII.call(this, buffer);
-            buffer = '';
-            state = 'relative path start';
-            if (stateOverride) {
-              break loop;
-            }
-            continue;
-          } else if ('\t' != c && '\n' != c && '\r' != c) {
-            if ('[' == c) {
-              seenBracket = true;
-            } else if (']' == c) {
-              seenBracket = false;
-            }
-            buffer += c;
-          } else {
-            err('Invalid code point in host/hostname: ' + c);
-          }
-          break;
-
-        case 'port':
-          if (/[0-9]/.test(c)) {
-            buffer += c;
-          } else if (EOF == c || '/' == c || '\\' == c || '?' == c || '#' == c || stateOverride) {
-            if ('' != buffer) {
-              var temp = parseInt(buffer, 10);
-              if (temp != relative[this._scheme]) {
-                this._port = temp + '';
-              }
-              buffer = '';
-            }
-            if (stateOverride) {
-              break loop;
-            }
-            state = 'relative path start';
-            continue;
-          } else if ('\t' == c || '\n' == c || '\r' == c) {
-            err('Invalid code point in port: ' + c);
-          } else {
-            invalid.call(this);
-          }
-          break;
-
-        case 'relative path start':
-          if ('\\' == c)
-            err("'\\' not allowed in path.");
-          state = 'relative path';
-          if ('/' != c && '\\' != c) {
-            continue;
-          }
-          break;
-
-        case 'relative path':
-          if (EOF == c || '/' == c || '\\' == c || (!stateOverride && ('?' == c || '#' == c))) {
-            if ('\\' == c) {
-              err('\\ not allowed in relative path.');
-            }
-            var tmp;
-            if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
-              buffer = tmp;
-            }
-            if ('..' == buffer) {
-              this._path.pop();
-              if ('/' != c && '\\' != c) {
-                this._path.push('');
-              }
-            } else if ('.' == buffer && '/' != c && '\\' != c) {
-              this._path.push('');
-            } else if ('.' != buffer) {
-              if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {
-                buffer = buffer[0] + ':';
-              }
-              this._path.push(buffer);
-            }
-            buffer = '';
-            if ('?' == c) {
-              this._query = '?';
-              state = 'query';
-            } else if ('#' == c) {
-              this._fragment = '#';
-              state = 'fragment';
-            }
-          } else if ('\t' != c && '\n' != c && '\r' != c) {
-            buffer += percentEscape(c);
-          }
-          break;
-
-        case 'query':
-          if (!stateOverride && '#' == c) {
-            this._fragment = '#';
-            state = 'fragment';
-          } else if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
-            this._query += percentEscapeQuery(c);
-          }
-          break;
-
-        case 'fragment':
-          if (EOF != c && '\t' != c && '\n' != c && '\r' != c) {
-            this._fragment += c;
-          }
-          break;
-      }
-
-      cursor++;
-    }
-  }
-
-  function clear() {
-    this._scheme = '';
-    this._schemeData = '';
-    this._username = '';
-    this._password = null;
-    this._host = '';
-    this._port = '';
-    this._path = [];
-    this._query = '';
-    this._fragment = '';
-    this._isInvalid = false;
-    this._isRelative = false;
-  }
-
-  // Does not process domain names or IP addresses.
-  // Does not handle encoding for the query parameter.
-  function jURL(url, base /* , encoding */) {
-    if (base !== undefined && !(base instanceof jURL))
-      base = new jURL(String(base));
-
-    this._url = url;
-    clear.call(this);
-
-    var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, '');
-    // encoding = encoding || 'utf-8'
-
-    parse.call(this, input, null, base);
-  }
-
-  jURL.prototype = {
-    get href() {
-      if (this._isInvalid)
-        return this._url;
-
-      var authority = '';
-      if ('' != this._username || null != this._password) {
-        authority = this._username +
-            (null != this._password ? ':' + this._password : '') + '@';
-      }
-
-      return this.protocol +
-          (this._isRelative ? '//' + authority + this.host : '') +
-          this.pathname + this._query + this._fragment;
-    },
-    set href(href) {
-      clear.call(this);
-      parse.call(this, href);
-    },
-
-    get protocol() {
-      return this._scheme + ':';
-    },
-    set protocol(protocol) {
-      if (this._isInvalid)
-        return;
-      parse.call(this, protocol + ':', 'scheme start');
-    },
-
-    get host() {
-      return this._isInvalid ? '' : this._port ?
-          this._host + ':' + this._port : this._host;
-    },
-    set host(host) {
-      if (this._isInvalid || !this._isRelative)
-        return;
-      parse.call(this, host, 'host');
-    },
-
-    get hostname() {
-      return this._host;
-    },
-    set hostname(hostname) {
-      if (this._isInvalid || !this._isRelative)
-        return;
-      parse.call(this, hostname, 'hostname');
-    },
-
-    get port() {
-      return this._port;
-    },
-    set port(port) {
-      if (this._isInvalid || !this._isRelative)
-        return;
-      parse.call(this, port, 'port');
-    },
-
-    get pathname() {
-      return this._isInvalid ? '' : this._isRelative ?
-          '/' + this._path.join('/') : this._schemeData;
-    },
-    set pathname(pathname) {
-      if (this._isInvalid || !this._isRelative)
-        return;
-      this._path = [];
-      parse.call(this, pathname, 'relative path start');
-    },
-
-    get search() {
-      return this._isInvalid || !this._query || '?' == this._query ?
-          '' : this._query;
-    },
-    set search(search) {
-      if (this._isInvalid || !this._isRelative)
-        return;
-      this._query = '?';
-      if ('?' == search[0])
-        search = search.slice(1);
-      parse.call(this, search, 'query');
-    },
-
-    get hash() {
-      return this._isInvalid || !this._fragment || '#' == this._fragment ?
-          '' : this._fragment;
-    },
-    set hash(hash) {
-      if (this._isInvalid)
-        return;
-      this._fragment = '#';
-      if ('#' == hash[0])
-        hash = hash.slice(1);
-      parse.call(this, hash, 'fragment');
-    },
-
-    get origin() {
-      var host;
-      if (this._isInvalid || !this._scheme) {
-        return '';
-      }
-      // javascript: Gecko returns String(""), WebKit/Blink String("null")
-      // Gecko throws error for "data://"
-      // data: Gecko returns "", Blink returns "data://", WebKit returns "null"
-      // Gecko returns String("") for file: mailto:
-      // WebKit/Blink returns String("SCHEME://") for file: mailto:
-      switch (this._scheme) {
-        case 'data':
-        case 'file':
-        case 'javascript':
-        case 'mailto':
-          return 'null';
-      }
-      host = this.host;
-      if (!host) {
-        return '';
-      }
-      return this._scheme + '://' + host;
-    }
-  };
-
-  // Copy over the static methods
-  var OriginalURL = scope.URL;
-  if (OriginalURL) {
-    jURL.createObjectURL = function(blob) {
-      // IE extension allows a second optional options argument.
-      // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx
-      return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
-    };
-    jURL.revokeObjectURL = function(url) {
-      OriginalURL.revokeObjectURL(url);
-    };
-  }
-
-  scope.URL = jURL;
-
-})(this);
-
-(function(scope) {
-
-var iterations = 0;
-var callbacks = [];
-var twiddle = document.createTextNode('');
-
-function endOfMicrotask(callback) {
-  twiddle.textContent = iterations++;
-  callbacks.push(callback);
-}
-
-function atEndOfMicrotask() {
-  while (callbacks.length) {
-    callbacks.shift()();
-  }
-}
-
-new (window.MutationObserver || JsMutationObserver)(atEndOfMicrotask)
-  .observe(twiddle, {characterData: true})
-  ;
-
-// exports
-scope.endOfMicrotask = endOfMicrotask;
-// bc 
-Platform.endOfMicrotask = endOfMicrotask;
-
-})(Polymer);
-
-
-(function(scope) {
-
-/**
- * @class Polymer
- */
-
-// imports
-var endOfMicrotask = scope.endOfMicrotask;
-
-// logging
-var log = window.WebComponents ? WebComponents.flags.log : {};
-
-// inject style sheet
-var style = document.createElement('style');
-style.textContent = 'template {display: none !important;} /* injected by platform.js */';
-var head = document.querySelector('head');
-head.insertBefore(style, head.firstChild);
-
-
-/**
- * Force any pending data changes to be observed before 
- * the next task. Data changes are processed asynchronously but are guaranteed
- * to be processed, for example, before painting. This method should rarely be 
- * needed. It does nothing when Object.observe is available; 
- * when Object.observe is not available, Polymer automatically flushes data 
- * changes approximately every 1/10 second. 
- * Therefore, `flush` should only be used when a data mutation should be 
- * observed sooner than this.
- * 
- * @method flush
- */
-// flush (with logging)
-var flushing;
-function flush() {
-  if (!flushing) {
-    flushing = true;
-    endOfMicrotask(function() {
-      flushing = false;
-      log.data && console.group('flush');
-      Platform.performMicrotaskCheckpoint();
-      log.data && console.groupEnd();
-    });
-  }
-};
-
-// polling dirty checker
-// flush periodically if platform does not have object observe.
-if (!Observer.hasObjectObserve) {
-  var FLUSH_POLL_INTERVAL = 125;
-  window.addEventListener('WebComponentsReady', function() {
-    flush();
-    // watch document visiblity to toggle dirty-checking
-    var visibilityHandler = function() {
-      // only flush if the page is visibile
-      if (document.visibilityState === 'hidden') {
-        if (scope.flushPoll) {
-          clearInterval(scope.flushPoll);
-        }
-      } else {
-        scope.flushPoll = setInterval(flush, FLUSH_POLL_INTERVAL);
-      }
-    };
-    if (typeof document.visibilityState === 'string') {
-      document.addEventListener('visibilitychange', visibilityHandler);
-    }
-    visibilityHandler();
-  });
-} else {
-  // make flush a no-op when we have Object.observe
-  flush = function() {};
-}
-
-if (window.CustomElements && !CustomElements.useNative) {
-  var originalImportNode = Document.prototype.importNode;
-  Document.prototype.importNode = function(node, deep) {
-    var imported = originalImportNode.call(this, node, deep);
-    CustomElements.upgradeAll(imported);
-    return imported;
-  };
-}
-
-// exports
-scope.flush = flush;
-// bc
-Platform.flush = flush;
-
-})(window.Polymer);
-
-
-(function(scope) {
-
-var urlResolver = {
-  resolveDom: function(root, url) {
-    url = url || baseUrl(root);
-    this.resolveAttributes(root, url);
-    this.resolveStyles(root, url);
-    // handle template.content
-    var templates = root.querySelectorAll('template');
-    if (templates) {
-      for (var i = 0, l = templates.length, t; (i < l) && (t = templates[i]); i++) {
-        if (t.content) {
-          this.resolveDom(t.content, url);
-        }
-      }
-    }
-  },
-  resolveTemplate: function(template) {
-    this.resolveDom(template.content, baseUrl(template));
-  },
-  resolveStyles: function(root, url) {
-    var styles = root.querySelectorAll('style');
-    if (styles) {
-      for (var i = 0, l = styles.length, s; (i < l) && (s = styles[i]); i++) {
-        this.resolveStyle(s, url);
-      }
-    }
-  },
-  resolveStyle: function(style, url) {
-    url = url || baseUrl(style);
-    style.textContent = this.resolveCssText(style.textContent, url);
-  },
-  resolveCssText: function(cssText, baseUrl, keepAbsolute) {
-    cssText = replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_URL_REGEXP);
-    return replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, CSS_IMPORT_REGEXP);
-  },
-  resolveAttributes: function(root, url) {
-    if (root.hasAttributes && root.hasAttributes()) {
-      this.resolveElementAttributes(root, url);
-    }
-    // search for attributes that host urls
-    var nodes = root && root.querySelectorAll(URL_ATTRS_SELECTOR);
-    if (nodes) {
-      for (var i = 0, l = nodes.length, n; (i < l) && (n = nodes[i]); i++) {
-        this.resolveElementAttributes(n, url);
-      }
-    }
-  },
-  resolveElementAttributes: function(node, url) {
-    url = url || baseUrl(node);
-    URL_ATTRS.forEach(function(v) {
-      var attr = node.attributes[v];
-      var value = attr && attr.value;
-      var replacement;
-      if (value && value.search(URL_TEMPLATE_SEARCH) < 0) {
-        if (v === 'style') {
-          replacement = replaceUrlsInCssText(value, url, false, CSS_URL_REGEXP);
-        } else {
-          replacement = resolveRelativeUrl(url, value);
-        }
-        attr.value = replacement;
-      }
-    });
-  }
-};
-
-var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
-var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
-var URL_ATTRS = ['href', 'src', 'action', 'style', 'url'];
-var URL_ATTRS_SELECTOR = '[' + URL_ATTRS.join('],[') + ']';
-var URL_TEMPLATE_SEARCH = '{{.*}}';
-var URL_HASH = '#';
-
-function baseUrl(node) {
-  var u = new URL(node.ownerDocument.baseURI);
-  u.search = '';
-  u.hash = '';
-  return u;
-}
-
-function replaceUrlsInCssText(cssText, baseUrl, keepAbsolute, regexp) {
-  return cssText.replace(regexp, function(m, pre, url, post) {
-    var urlPath = url.replace(/["']/g, '');
-    urlPath = resolveRelativeUrl(baseUrl, urlPath, keepAbsolute);
-    return pre + '\'' + urlPath + '\'' + post;
-  });
-}
-
-function resolveRelativeUrl(baseUrl, url, keepAbsolute) {
-  // do not resolve '/' absolute urls
-  if (url && url[0] === '/') {
-    return url;
-  }
-  // do not resolve '#' links, they are used for routing
-  if (url && url[0] === '#') {
-    return url;
-  }
-  var u = new URL(url, baseUrl);
-  return keepAbsolute ? u.href : makeDocumentRelPath(u.href);
-}
-
-function makeDocumentRelPath(url) {
-  var root = baseUrl(document.documentElement);
-  var u = new URL(url, root);
-  if (u.host === root.host && u.port === root.port &&
-      u.protocol === root.protocol) {
-    return makeRelPath(root, u);
-  } else {
-    return url;
-  }
-}
-
-// make a relative path from source to target
-function makeRelPath(sourceUrl, targetUrl) {
-  var source = sourceUrl.pathname;
-  var target = targetUrl.pathname;
-  var s = source.split('/');
-  var t = target.split('/');
-  while (s.length && s[0] === t[0]){
-    s.shift();
-    t.shift();
-  }
-  for (var i = 0, l = s.length - 1; i < l; i++) {
-    t.unshift('..');
-  }
-  // empty '#' is discarded but we need to preserve it.
-  var hash = (targetUrl.href.slice(-1) === URL_HASH) ? URL_HASH : targetUrl.hash;
-  return t.join('/') + targetUrl.search + hash;
-}
-
-// exports
-scope.urlResolver = urlResolver;
-
-})(Polymer);
-
-(function(scope) {
-  var endOfMicrotask = Polymer.endOfMicrotask;
-
-  // Generic url loader
-  function Loader(regex) {
-    this.cache = Object.create(null);
-    this.map = Object.create(null);
-    this.requests = 0;
-    this.regex = regex;
-  }
-  Loader.prototype = {
-
-    // TODO(dfreedm): there may be a better factoring here
-    // extract absolute urls from the text (full of relative urls)
-    extractUrls: function(text, base) {
-      var matches = [];
-      var matched, u;
-      while ((matched = this.regex.exec(text))) {
-        u = new URL(matched[1], base);
-        matches.push({matched: matched[0], url: u.href});
-      }
-      return matches;
-    },
-    // take a text blob, a root url, and a callback and load all the urls found within the text
-    // returns a map of absolute url to text
-    process: function(text, root, callback) {
-      var matches = this.extractUrls(text, root);
-
-      // every call to process returns all the text this loader has ever received
-      var done = callback.bind(null, this.map);
-      this.fetch(matches, done);
-    },
-    // build a mapping of url -> text from matches
-    fetch: function(matches, callback) {
-      var inflight = matches.length;
-
-      // return early if there is no fetching to be done
-      if (!inflight) {
-        return callback();
-      }
-
-      // wait for all subrequests to return
-      var done = function() {
-        if (--inflight === 0) {
-          callback();
-        }
-      };
-
-      // start fetching all subrequests
-      var m, req, url;
-      for (var i = 0; i < inflight; i++) {
-        m = matches[i];
-        url = m.url;
-        req = this.cache[url];
-        // if this url has already been requested, skip requesting it again
-        if (!req) {
-          req = this.xhr(url);
-          req.match = m;
-          this.cache[url] = req;
-        }
-        // wait for the request to process its subrequests
-        req.wait(done);
-      }
-    },
-    handleXhr: function(request) {
-      var match = request.match;
-      var url = match.url;
-
-      // handle errors with an empty string
-      var response = request.response || request.responseText || '';
-      this.map[url] = response;
-      this.fetch(this.extractUrls(response, url), request.resolve);
-    },
-    xhr: function(url) {
-      this.requests++;
-      var request = new XMLHttpRequest();
-      request.open('GET', url, true);
-      request.send();
-      request.onerror = request.onload = this.handleXhr.bind(this, request);
-
-      // queue of tasks to run after XHR returns
-      request.pending = [];
-      request.resolve = function() {
-        var pending = request.pending;
-        for(var i = 0; i < pending.length; i++) {
-          pending[i]();
-        }
-        request.pending = null;
-      };
-
-      // if we have already resolved, pending is null, async call the callback
-      request.wait = function(fn) {
-        if (request.pending) {
-          request.pending.push(fn);
-        } else {
-          endOfMicrotask(fn);
-        }
-      };
-
-      return request;
-    }
-  };
-
-  scope.Loader = Loader;
-})(Polymer);
-
-(function(scope) {
-
-var urlResolver = scope.urlResolver;
-var Loader = scope.Loader;
-
-function StyleResolver() {
-  this.loader = new Loader(this.regex);
-}
-StyleResolver.prototype = {
-  regex: /@import\s+(?:url)?["'\(]*([^'"\)]*)['"\)]*;/g,
-  // Recursively replace @imports with the text at that url
-  resolve: function(text, url, callback) {
-    var done = function(map) {
-      callback(this.flatten(text, url, map));
-    }.bind(this);
-    this.loader.process(text, url, done);
-  },
-  // resolve the textContent of a style node
-  resolveNode: function(style, url, callback) {
-    var text = style.textContent;
-    var done = function(text) {
-      style.textContent = text;
-      callback(style);
-    };
-    this.resolve(text, url, done);
-  },
-  // flatten all the @imports to text
-  flatten: function(text, base, map) {
-    var matches = this.loader.extractUrls(text, base);
-    var match, url, intermediate;
-    for (var i = 0; i < matches.length; i++) {
-      match = matches[i];
-      url = match.url;
-      // resolve any css text to be relative to the importer, keep absolute url
-      intermediate = urlResolver.resolveCssText(map[url], url, true);
-      // flatten intermediate @imports
-      intermediate = this.flatten(intermediate, base, map);
-      text = text.replace(match.matched, intermediate);
-    }
-    return text;
-  },
-  loadStyles: function(styles, base, callback) {
-    var loaded=0, l = styles.length;
-    // called in the context of the style
-    function loadedStyle(style) {
-      loaded++;
-      if (loaded === l && callback) {
-        callback();
-      }
-    }
-    for (var i=0, s; (i<l) && (s=styles[i]); i++) {
-      this.resolveNode(s, base, loadedStyle);
-    }
-  }
-};
-
-var styleResolver = new StyleResolver();
-
-// exports
-scope.styleResolver = styleResolver;
-
-})(Polymer);
-
-(function(scope) {
-
-  // copy own properties from 'api' to 'prototype, with name hinting for 'super'
-  function extend(prototype, api) {
-    if (prototype && api) {
-      // use only own properties of 'api'
-      Object.getOwnPropertyNames(api).forEach(function(n) {
-        // acquire property descriptor
-        var pd = Object.getOwnPropertyDescriptor(api, n);
-        if (pd) {
-          // clone property via descriptor
-          Object.defineProperty(prototype, n, pd);
-          // cache name-of-method for 'super' engine
-          if (typeof pd.value == 'function') {
-            // hint the 'super' engine
-            pd.value.nom = n;
-          }
-        }
-      });
-    }
-    return prototype;
-  }
-
-
-  // mixin
-
-  // copy all properties from inProps (et al) to inObj
-  function mixin(inObj/*, inProps, inMoreProps, ...*/) {
-    var obj = inObj || {};
-    for (var i = 1; i < arguments.length; i++) {
-      var p = arguments[i];
-      try {
-        for (var n in p) {
-          copyProperty(n, p, obj);
-        }
-      } catch(x) {
-      }
-    }
-    return obj;
-  }
-
-  // copy property inName from inSource object to inTarget object
-  function copyProperty(inName, inSource, inTarget) {
-    var pd = getPropertyDescriptor(inSource, inName);
-    Object.defineProperty(inTarget, inName, pd);
-  }
-
-  // get property descriptor for inName on inObject, even if
-  // inName exists on some link in inObject's prototype chain
-  function getPropertyDescriptor(inObject, inName) {
-    if (inObject) {
-      var pd = Object.getOwnPropertyDescriptor(inObject, inName);
-      return pd || getPropertyDescriptor(Object.getPrototypeOf(inObject), inName);
-    }
-  }
-
-  // exports
-
-  scope.extend = extend;
-  scope.mixin = mixin;
-
-  // for bc
-  Platform.mixin = mixin;
-
-})(Polymer);
-
-(function(scope) {
-  
-  // usage
-  
-  // invoke cb.call(this) in 100ms, unless the job is re-registered,
-  // which resets the timer
-  // 
-  // this.myJob = this.job(this.myJob, cb, 100)
-  //
-  // returns a job handle which can be used to re-register a job
-
-  var Job = function(inContext) {
-    this.context = inContext;
-    this.boundComplete = this.complete.bind(this)
-  };
-  Job.prototype = {
-    go: function(callback, wait) {
-      this.callback = callback;
-      var h;
-      if (!wait) {
-        h = requestAnimationFrame(this.boundComplete);
-        this.handle = function() {
-          cancelAnimationFrame(h);
-        }
-      } else {
-        h = setTimeout(this.boundComplete, wait);
-        this.handle = function() {
-          clearTimeout(h);
-        }
-      }
-    },
-    stop: function() {
-      if (this.handle) {
-        this.handle();
-        this.handle = null;
-      }
-    },
-    complete: function() {
-      if (this.handle) {
-        this.stop();
-        this.callback.call(this.context);
-      }
-    }
-  };
-  
-  function job(job, callback, wait) {
-    if (job) {
-      job.stop();
-    } else {
-      job = new Job(this);
-    }
-    job.go(callback, wait);
-    return job;
-  }
-  
-  // exports 
-
-  scope.job = job;
-  
-})(Polymer);
-
-(function(scope) {
-
-  // dom polyfill, additions, and utility methods
-
-  var registry = {};
-
-  HTMLElement.register = function(tag, prototype) {
-    registry[tag] = prototype;
-  };
-
-  // get prototype mapped to node <tag>
-  HTMLElement.getPrototypeForTag = function(tag) {
-    var prototype = !tag ? HTMLElement.prototype : registry[tag];
-    // TODO(sjmiles): creating <tag> is likely to have wasteful side-effects
-    return prototype || Object.getPrototypeOf(document.createElement(tag));
-  };
-
-  // we have to flag propagation stoppage for the event dispatcher
-  var originalStopPropagation = Event.prototype.stopPropagation;
-  Event.prototype.stopPropagation = function() {
-    this.cancelBubble = true;
-    originalStopPropagation.apply(this, arguments);
-  };
-  
-  
-  // polyfill DOMTokenList
-  // * add/remove: allow these methods to take multiple classNames
-  // * toggle: add a 2nd argument which forces the given state rather
-  //  than toggling.
-
-  var add = DOMTokenList.prototype.add;
-  var remove = DOMTokenList.prototype.remove;
-  DOMTokenList.prototype.add = function() {
-    for (var i = 0; i < arguments.length; i++) {
-      add.call(this, arguments[i]);
-    }
-  };
-  DOMTokenList.prototype.remove = function() {
-    for (var i = 0; i < arguments.length; i++) {
-      remove.call(this, arguments[i]);
-    }
-  };
-  DOMTokenList.prototype.toggle = function(name, bool) {
-    if (arguments.length == 1) {
-      bool = !this.contains(name);
-    }
-    bool ? this.add(name) : this.remove(name);
-  };
-  DOMTokenList.prototype.switch = function(oldName, newName) {
-    oldName && this.remove(oldName);
-    newName && this.add(newName);
-  };
-
-  // add array() to NodeList, NamedNodeMap, HTMLCollection
-
-  var ArraySlice = function() {
-    return Array.prototype.slice.call(this);
-  };
-
-  var namedNodeMap = (window.NamedNodeMap || window.MozNamedAttrMap || {});
-
-  NodeList.prototype.array = ArraySlice;
-  namedNodeMap.prototype.array = ArraySlice;
-  HTMLCollection.prototype.array = ArraySlice;
-
-  // utility
-
-  function createDOM(inTagOrNode, inHTML, inAttrs) {
-    var dom = typeof inTagOrNode == 'string' ?
-        document.createElement(inTagOrNode) : inTagOrNode.cloneNode(true);
-    dom.innerHTML = inHTML;
-    if (inAttrs) {
-      for (var n in inAttrs) {
-        dom.setAttribute(n, inAttrs[n]);
-      }
-    }
-    return dom;
-  }
-
-  // exports
-
-  scope.createDOM = createDOM;
-
-})(Polymer);
-
-(function(scope) {

-    // super

-

-    // `arrayOfArgs` is an optional array of args like one might pass

-    // to `Function.apply`

-

-    // TODO(sjmiles):

-    //    $super must be installed on an instance or prototype chain

-    //    as `super`, and invoked via `this`, e.g.

-    //      `this.super();`

-

-    //    will not work if function objects are not unique, for example,

-    //    when using mixins.

-    //    The memoization strategy assumes each function exists on only one 

-    //    prototype chain i.e. we use the function object for memoizing)

-    //    perhaps we can bookkeep on the prototype itself instead

-    function $super(arrayOfArgs) {

-      // since we are thunking a method call, performance is important here: 

-      // memoize all lookups, once memoized the fast path calls no other 

-      // functions

-      //

-      // find the caller (cannot be `strict` because of 'caller')

-      var caller = $super.caller;

-      // memoized 'name of method' 

-      var nom = caller.nom;

-      // memoized next implementation prototype

-      var _super = caller._super;

-      if (!_super) {

-        if (!nom) {

-          nom = caller.nom = nameInThis.call(this, caller);

-        }

-        if (!nom) {

-          console.warn('called super() on a method not installed declaratively (has no .nom property)');

-        }

-        // super prototype is either cached or we have to find it

-        // by searching __proto__ (at the 'top')

-        // invariant: because we cache _super on fn below, we never reach 

-        // here from inside a series of calls to super(), so it's ok to 

-        // start searching from the prototype of 'this' (at the 'top')

-        // we must never memoize a null super for this reason

-        _super = memoizeSuper(caller, nom, getPrototypeOf(this));

-      }

-      // our super function

-      var fn = _super[nom];

-      if (fn) {

-        // memoize information so 'fn' can call 'super'

-        if (!fn._super) {

-          // must not memoize null, or we lose our invariant above

-          memoizeSuper(fn, nom, _super);

-        }

-        // invoke the inherited method

-        // if 'fn' is not function valued, this will throw

-        return fn.apply(this, arrayOfArgs || []);

-      }

-    }

-

-    function nameInThis(value) {

-      var p = this.__proto__;

-      while (p && p !== HTMLElement.prototype) {

-        // TODO(sjmiles): getOwnPropertyNames is absurdly expensive

-        var n$ = Object.getOwnPropertyNames(p);

-        for (var i=0, l=n$.length, n; i<l && (n=n$[i]); i++) {

-          var d = Object.getOwnPropertyDescriptor(p, n);

-          if (typeof d.value === 'function' && d.value === value) {

-            return n;

-          }

-        }

-        p = p.__proto__;

-      }

-    }

-

-    function memoizeSuper(method, name, proto) {

-      // find and cache next prototype containing `name`

-      // we need the prototype so we can do another lookup

-      // from here

-      var s = nextSuper(proto, name, method);

-      if (s[name]) {

-        // `s` is a prototype, the actual method is `s[name]`

-        // tag super method with it's name for quicker lookups

-        s[name].nom = name;

-      }

-      return method._super = s;

-    }

-

-    function nextSuper(proto, name, caller) {

-      // look for an inherited prototype that implements name

-      while (proto) {

-        if ((proto[name] !== caller) && proto[name]) {

-          return proto;

-        }

-        proto = getPrototypeOf(proto);

-      }

-      // must not return null, or we lose our invariant above

-      // in this case, a super() call was invoked where no superclass

-      // method exists

-      // TODO(sjmiles): thow an exception?

-      return Object;

-    }

-

-    // NOTE: In some platforms (IE10) the prototype chain is faked via 

-    // __proto__. Therefore, always get prototype via __proto__ instead of

-    // the more standard Object.getPrototypeOf.

-    function getPrototypeOf(prototype) {

-      return prototype.__proto__;

-    }

-

-    // utility function to precompute name tags for functions

-    // in a (unchained) prototype

-    function hintSuper(prototype) {

-      // tag functions with their prototype name to optimize

-      // super call invocations

-      for (var n in prototype) {

-        var pd = Object.getOwnPropertyDescriptor(prototype, n);

-        if (pd && typeof pd.value === 'function') {

-          pd.value.nom = n;

-        }

-      }

-    }

-

-    // exports

-

-    scope.super = $super;

-

-})(Polymer);

-
-(function(scope) {
-
-  function noopHandler(value) {
-    return value;
-  }
-
-  // helper for deserializing properties of various types to strings
-  var typeHandlers = {
-    string: noopHandler,
-    'undefined': noopHandler,
-    date: function(value) {
-      return new Date(Date.parse(value) || Date.now());
-    },
-    boolean: function(value) {
-      if (value === '') {
-        return true;
-      }
-      return value === 'false' ? false : !!value;
-    },
-    number: function(value) {
-      var n = parseFloat(value);
-      // hex values like "0xFFFF" parseFloat as 0
-      if (n === 0) {
-        n = parseInt(value);
-      }
-      return isNaN(n) ? value : n;
-      // this code disabled because encoded values (like "0xFFFF")
-      // do not round trip to their original format
-      //return (String(floatVal) === value) ? floatVal : value;
-    },
-    object: function(value, currentValue) {
-      if (currentValue === null) {
-        return value;
-      }
-      try {
-        // If the string is an object, we can parse is with the JSON library.
-        // include convenience replace for single-quotes. If the author omits
-        // quotes altogether, parse will fail.
-        return JSON.parse(value.replace(/'/g, '"'));
-      } catch(e) {
-        // The object isn't valid JSON, return the raw value
-        return value;
-      }
-    },
-    // avoid deserialization of functions
-    'function': function(value, currentValue) {
-      return currentValue;
-    }
-  };
-
-  function deserializeValue(value, currentValue) {
-    // attempt to infer type from default value
-    var inferredType = typeof currentValue;
-    // invent 'date' type value for Date
-    if (currentValue instanceof Date) {
-      inferredType = 'date';
-    }
-    // delegate deserialization via type string
-    return typeHandlers[inferredType](value, currentValue);
-  }
-
-  // exports
-
-  scope.deserializeValue = deserializeValue;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var extend = scope.extend;
-
-  // module
-
-  var api = {};
-
-  api.declaration = {};
-  api.instance = {};
-
-  api.publish = function(apis, prototype) {
-    for (var n in apis) {
-      extend(prototype, apis[n]);
-    }
-  };
-
-  // exports
-
-  scope.api = api;
-
-})(Polymer);
-
-(function(scope) {
-
-  /**
-   * @class polymer-base
-   */
-
-  var utils = {
-
-    /**
-      * Invokes a function asynchronously. The context of the callback
-      * function is bound to 'this' automatically. Returns a handle which may 
-      * be passed to <a href="#cancelAsync">cancelAsync</a> to cancel the 
-      * asynchronous call.
-      *
-      * @method async
-      * @param {Function|String} method
-      * @param {any|Array} args
-      * @param {number} timeout
-      */
-    async: function(method, args, timeout) {
-      // when polyfilling Object.observe, ensure changes 
-      // propagate before executing the async method
-      Polymer.flush();
-      // second argument to `apply` must be an array
-      args = (args && args.length) ? args : [args];
-      // function to invoke
-      var fn = function() {
-        (this[method] || method).apply(this, args);
-      }.bind(this);
-      // execute `fn` sooner or later
-      var handle = timeout ? setTimeout(fn, timeout) :
-          requestAnimationFrame(fn);
-      // NOTE: switch on inverting handle to determine which time is used.
-      return timeout ? handle : ~handle;
-    },
-
-    /**
-      * Cancels a pending callback that was scheduled via 
-      * <a href="#async">async</a>. 
-      *
-      * @method cancelAsync
-      * @param {handle} handle Handle of the `async` to cancel.
-      */
-    cancelAsync: function(handle) {
-      if (handle < 0) {
-        cancelAnimationFrame(~handle);
-      } else {
-        clearTimeout(handle);
-      }
-    },
-
-    /**
-      * Fire an event.
-      *
-      * @method fire
-      * @returns {Object} event
-      * @param {string} type An event name.
-      * @param {any} detail
-      * @param {Node} onNode Target node.
-      * @param {Boolean} bubbles Set false to prevent bubbling, defaults to true
-      * @param {Boolean} cancelable Set false to prevent cancellation, defaults to true
-      */
-    fire: function(type, detail, onNode, bubbles, cancelable) {
-      var node = onNode || this;
-      var detail = detail === null || detail === undefined ? {} : detail;
-      var event = new CustomEvent(type, {
-        bubbles: bubbles !== undefined ? bubbles : true,
-        cancelable: cancelable !== undefined ? cancelable : true,
-        detail: detail
-      });
-      node.dispatchEvent(event);
-      return event;
-    },
-
-    /**
-      * Fire an event asynchronously.
-      *
-      * @method asyncFire
-      * @param {string} type An event name.
-      * @param detail
-      * @param {Node} toNode Target node.
-      */
-    asyncFire: function(/*inType, inDetail*/) {
-      this.async("fire", arguments);
-    },
-
-    /**
-      * Remove class from old, add class to anew, if they exist.
-      *
-      * @param classFollows
-      * @param anew A node.
-      * @param old A node
-      * @param className
-      */
-    classFollows: function(anew, old, className) {
-      if (old) {
-        old.classList.remove(className);
-      }
-      if (anew) {
-        anew.classList.add(className);
-      }
-    },
-
-    /**
-      * Inject HTML which contains markup bound to this element into
-      * a target element (replacing target element content).
-      *
-      * @param String html to inject
-      * @param Element target element
-      */
-    injectBoundHTML: function(html, element) {
-      var template = document.createElement('template');
-      template.innerHTML = html;
-      var fragment = this.instanceTemplate(template);
-      if (element) {
-        element.textContent = '';
-        element.appendChild(fragment);
-      }
-      return fragment;
-    }
-  };
-
-  // no-operation function for handy stubs
-  var nop = function() {};
-
-  // null-object for handy stubs
-  var nob = {};
-
-  // deprecated
-
-  utils.asyncMethod = utils.async;
-
-  // exports
-
-  scope.api.instance.utils = utils;
-  scope.nop = nop;
-  scope.nob = nob;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-  var EVENT_PREFIX = 'on-';
-
-  // instance events api
-  var events = {
-    // read-only
-    EVENT_PREFIX: EVENT_PREFIX,
-    // event listeners on host
-    addHostListeners: function() {
-      var events = this.eventDelegates;
-      log.events && (Object.keys(events).length > 0) && console.log('[%s] addHostListeners:', this.localName, events);
-      // NOTE: host events look like bindings but really are not;
-      // (1) we don't want the attribute to be set and (2) we want to support
-      // multiple event listeners ('host' and 'instance') and Node.bind
-      // by default supports 1 thing being bound.
-      for (var type in events) {
-        var methodName = events[type];
-        PolymerGestures.addEventListener(this, type, this.element.getEventHandler(this, this, methodName));
-      }
-    },
-    // call 'method' or function method on 'obj' with 'args', if the method exists
-    dispatchMethod: function(obj, method, args) {
-      if (obj) {
-        log.events && console.group('[%s] dispatch [%s]', obj.localName, method);
-        var fn = typeof method === 'function' ? method : obj[method];
-        if (fn) {
-          fn[args ? 'apply' : 'call'](obj, args);
-        }
-        log.events && console.groupEnd();
-        // NOTE: dirty check right after calling method to ensure 
-        // changes apply quickly; in a very complicated app using high 
-        // frequency events, this can be a perf concern; in this case,
-        // imperative handlers can be used to avoid flushing.
-        Polymer.flush();
-      }
-    }
-  };
-
-  // exports
-
-  scope.api.instance.events = events;
-
-  /**
-   * @class Polymer
-   */
-
-  /**
-   * Add a gesture aware event handler to the given `node`. Can be used 
-   * in place of `element.addEventListener` and ensures gestures will function
-   * as expected on mobile platforms. Please note that Polymer's declarative
-   * event handlers include this functionality by default.
-   * 
-   * @method addEventListener
-   * @param {Node} node node on which to listen
-   * @param {String} eventType name of the event
-   * @param {Function} handlerFn event handler function
-   * @param {Boolean} capture set to true to invoke event capturing
-   * @type Function
-   */
-  // alias PolymerGestures event listener logic
-  scope.addEventListener = function(node, eventType, handlerFn, capture) {
-    PolymerGestures.addEventListener(wrap(node), eventType, handlerFn, capture);
-  };
-
-  /**
-   * Remove a gesture aware event handler on the given `node`. To remove an
-   * event listener, the exact same arguments are required that were passed
-   * to `Polymer.addEventListener`.
-   * 
-   * @method removeEventListener
-   * @param {Node} node node on which to listen
-   * @param {String} eventType name of the event
-   * @param {Function} handlerFn event handler function
-   * @param {Boolean} capture set to true to invoke event capturing
-   * @type Function
-   */
-  scope.removeEventListener = function(node, eventType, handlerFn, capture) {
-    PolymerGestures.removeEventListener(wrap(node), eventType, handlerFn, capture);
-  };
-
-})(Polymer);
-
-(function(scope) {

-

-  // instance api for attributes

-

-  var attributes = {

-    // copy attributes defined in the element declaration to the instance

-    // e.g. <polymer-element name="x-foo" tabIndex="0"> tabIndex is copied

-    // to the element instance here.

-    copyInstanceAttributes: function () {

-      var a$ = this._instanceAttributes;

-      for (var k in a$) {

-        if (!this.hasAttribute(k)) {

-          this.setAttribute(k, a$[k]);

-        }

-      }

-    },

-    // for each attribute on this, deserialize value to property as needed

-    takeAttributes: function() {

-      // if we have no publish lookup table, we have no attributes to take

-      // TODO(sjmiles): ad hoc

-      if (this._publishLC) {

-        for (var i=0, a$=this.attributes, l=a$.length, a; (a=a$[i]) && i<l; i++) {

-          this.attributeToProperty(a.name, a.value);

-        }

-      }

-    },

-    // if attribute 'name' is mapped to a property, deserialize

-    // 'value' into that property

-    attributeToProperty: function(name, value) {

-      // try to match this attribute to a property (attributes are

-      // all lower-case, so this is case-insensitive search)

-      var name = this.propertyForAttribute(name);

-      if (name) {

-        // filter out 'mustached' values, these are to be

-        // replaced with bound-data and are not yet values

-        // themselves

-        if (value && value.search(scope.bindPattern) >= 0) {

-          return;

-        }

-        // get original value

-        var currentValue = this[name];

-        // deserialize Boolean or Number values from attribute

-        var value = this.deserializeValue(value, currentValue);

-        // only act if the value has changed

-        if (value !== currentValue) {

-          // install new value (has side-effects)

-          this[name] = value;

-        }

-      }

-    },

-    // return the published property matching name, or undefined

-    propertyForAttribute: function(name) {

-      var match = this._publishLC && this._publishLC[name];

-      return match;

-    },

-    // convert representation of `stringValue` based on type of `currentValue`

-    deserializeValue: function(stringValue, currentValue) {

-      return scope.deserializeValue(stringValue, currentValue);

-    },

-    // convert to a string value based on the type of `inferredType`

-    serializeValue: function(value, inferredType) {

-      if (inferredType === 'boolean') {

-        return value ? '' : undefined;

-      } else if (inferredType !== 'object' && inferredType !== 'function'

-          && value !== undefined) {

-        return value;

-      }

-    },

-    // serializes `name` property value and updates the corresponding attribute

-    // note that reflection is opt-in.

-    reflectPropertyToAttribute: function(name) {

-      var inferredType = typeof this[name];

-      // try to intelligently serialize property value

-      var serializedValue = this.serializeValue(this[name], inferredType);

-      // boolean properties must reflect as boolean attributes

-      if (serializedValue !== undefined) {

-        this.setAttribute(name, serializedValue);

-        // TODO(sorvell): we should remove attr for all properties

-        // that have undefined serialization; however, we will need to

-        // refine the attr reflection system to achieve this; pica, for example,

-        // relies on having inferredType object properties not removed as

-        // attrs.

-      } else if (inferredType === 'boolean') {

-        this.removeAttribute(name);

-      }

-    }

-  };

-

-  // exports

-

-  scope.api.instance.attributes = attributes;

-

-})(Polymer);

-
-(function(scope) {
-
-  /**
-   * @class polymer-base
-   */
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-
-  // magic words
-
-  var OBSERVE_SUFFIX = 'Changed';
-
-  // element api
-
-  var empty = [];
-
-  var updateRecord = {
-    object: undefined,
-    type: 'update',
-    name: undefined,
-    oldValue: undefined
-  };
-
-  var numberIsNaN = Number.isNaN || function(value) {
-    return typeof value === 'number' && isNaN(value);
-  };
-
-  function areSameValue(left, right) {
-    if (left === right)
-      return left !== 0 || 1 / left === 1 / right;
-    if (numberIsNaN(left) && numberIsNaN(right))
-      return true;
-    return left !== left && right !== right;
-  }
-
-  // capture A's value if B's value is null or undefined,
-  // otherwise use B's value
-  function resolveBindingValue(oldValue, value) {
-    if (value === undefined && oldValue === null) {
-      return value;
-    }
-    return (value === null || value === undefined) ? oldValue : value;
-  }
-
-  var properties = {
-
-    // creates a CompoundObserver to observe property changes
-    // NOTE, this is only done there are any properties in the `observe` object
-    createPropertyObserver: function() {
-      var n$ = this._observeNames;
-      if (n$ && n$.length) {
-        var o = this._propertyObserver = new CompoundObserver(true);
-        this.registerObserver(o);
-        // TODO(sorvell): may not be kosher to access the value here (this[n]);
-        // previously we looked at the descriptor on the prototype
-        // this doesn't work for inheritance and not for accessors without
-        // a value property
-        for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
-          o.addPath(this, n);
-          this.observeArrayValue(n, this[n], null);
-        }
-      }
-    },
-
-    // start observing property changes
-    openPropertyObserver: function() {
-      if (this._propertyObserver) {
-        this._propertyObserver.open(this.notifyPropertyChanges, this);
-      }
-    },
-
-    // handler for property changes; routes changes to observing methods
-    // note: array valued properties are observed for array splices
-    notifyPropertyChanges: function(newValues, oldValues, paths) {
-      var name, method, called = {};
-      for (var i in oldValues) {
-        // note: paths is of form [object, path, object, path]
-        name = paths[2 * i + 1];
-        method = this.observe[name];
-        if (method) {
-          var ov = oldValues[i], nv = newValues[i];
-          // observes the value if it is an array
-          this.observeArrayValue(name, nv, ov);
-          if (!called[method]) {
-            // only invoke change method if one of ov or nv is not (undefined | null)
-            if ((ov !== undefined && ov !== null) || (nv !== undefined && nv !== null)) {
-              called[method] = true;
-              // TODO(sorvell): call method with the set of values it's expecting;
-              // e.g. 'foo bar': 'invalidate' expects the new and old values for
-              // foo and bar. Currently we give only one of these and then
-              // deliver all the arguments.
-              this.invokeMethod(method, [ov, nv, arguments]);
-            }
-          }
-        }
-      }
-    },
-
-    // call method iff it exists.
-    invokeMethod: function(method, args) {
-      var fn = this[method] || method;
-      if (typeof fn === 'function') {
-        fn.apply(this, args);
-      }
-    },
-
-    /**
-     * Force any pending property changes to synchronously deliver to
-     * handlers specified in the `observe` object.
-     * Note, normally changes are processed at microtask time.
-     *
-     * @method deliverChanges
-     */
-    deliverChanges: function() {
-      if (this._propertyObserver) {
-        this._propertyObserver.deliver();
-      }
-    },
-
-    observeArrayValue: function(name, value, old) {
-      // we only care if there are registered side-effects
-      var callbackName = this.observe[name];
-      if (callbackName) {
-        // if we are observing the previous value, stop
-        if (Array.isArray(old)) {
-          log.observe && console.log('[%s] observeArrayValue: unregister observer [%s]', this.localName, name);
-          this.closeNamedObserver(name + '__array');
-        }
-        // if the new value is an array, being observing it
-        if (Array.isArray(value)) {
-          log.observe && console.log('[%s] observeArrayValue: register observer [%s]', this.localName, name, value);
-          var observer = new ArrayObserver(value);
-          observer.open(function(splices) {
-            this.invokeMethod(callbackName, [splices]);
-          }, this);
-          this.registerNamedObserver(name + '__array', observer);
-        }
-      }
-    },
-
-    emitPropertyChangeRecord: function(name, value, oldValue) {
-      var object = this;
-      if (areSameValue(value, oldValue)) {
-        return;
-      }
-      // invoke property change side effects
-      this._propertyChanged(name, value, oldValue);
-      // emit change record
-      if (!Observer.hasObjectObserve) {
-        return;
-      }
-      var notifier = this._objectNotifier;
-      if (!notifier) {
-        notifier = this._objectNotifier = Object.getNotifier(this);
-      }
-      updateRecord.object = this;
-      updateRecord.name = name;
-      updateRecord.oldValue = oldValue;
-      notifier.notify(updateRecord);
-    },
-
-    _propertyChanged: function(name, value, oldValue) {
-      if (this.reflect[name]) {
-        this.reflectPropertyToAttribute(name);
-      }
-    },
-
-    // creates a property binding (called via bind) to a published property.
-    bindProperty: function(property, observable, oneTime) {
-      if (oneTime) {
-        this[property] = observable;
-        return;
-      }
-      var computed = this.element.prototype.computed;
-      // Binding an "out-only" value to a computed property. Note that
-      // since this observer isn't opened, it doesn't need to be closed on
-      // cleanup.
-      if (computed && computed[property]) {
-        var privateComputedBoundValue = property + 'ComputedBoundObservable_';
-        this[privateComputedBoundValue] = observable;
-        return;
-      }
-      return this.bindToAccessor(property, observable, resolveBindingValue);
-    },
-
-    // NOTE property `name` must be published. This makes it an accessor.
-    bindToAccessor: function(name, observable, resolveFn) {
-      var privateName = name + '_';
-      var privateObservable  = name + 'Observable_';
-      // Present for properties which are computed and published and have a
-      // bound value.
-      var privateComputedBoundValue = name + 'ComputedBoundObservable_';
-      this[privateObservable] = observable;
-      var oldValue = this[privateName];
-      // observable callback
-      var self = this;
-      function updateValue(value, oldValue) {
-        self[privateName] = value;
-        var setObserveable = self[privateComputedBoundValue];
-        if (setObserveable && typeof setObserveable.setValue == 'function') {
-          setObserveable.setValue(value);
-        }
-        self.emitPropertyChangeRecord(name, value, oldValue);
-      }
-      // resolve initial value
-      var value = observable.open(updateValue);
-      if (resolveFn && !areSameValue(oldValue, value)) {
-        var resolvedValue = resolveFn(oldValue, value);
-        if (!areSameValue(value, resolvedValue)) {
-          value = resolvedValue;
-          if (observable.setValue) {
-            observable.setValue(value);
-          }
-        }
-      }
-      updateValue(value, oldValue);
-      // register and return observable
-      var observer = {
-        close: function() {
-          observable.close();
-          self[privateObservable] = undefined;
-          self[privateComputedBoundValue] = undefined;
-        }
-      };
-      this.registerObserver(observer);
-      return observer;
-    },
-
-    createComputedProperties: function() {
-      if (!this._computedNames) {
-        return;
-      }
-      for (var i = 0; i < this._computedNames.length; i++) {
-        var name = this._computedNames[i];
-        var expressionText = this.computed[name];
-        try {
-          var expression = PolymerExpressions.getExpression(expressionText);
-          var observable = expression.getBinding(this, this.element.syntax);
-          this.bindToAccessor(name, observable);
-        } catch (ex) {
-          console.error('Failed to create computed property', ex);
-        }
-      }
-    },
-
-    // property bookkeeping
-    registerObserver: function(observer) {
-      if (!this._observers) {
-        this._observers = [observer];
-        return;
-      }
-      this._observers.push(observer);
-    },
-
-    closeObservers: function() {
-      if (!this._observers) {
-        return;
-      }
-      // observer array items are arrays of observers.
-      var observers = this._observers;
-      for (var i = 0; i < observers.length; i++) {
-        var observer = observers[i];
-        if (observer && typeof observer.close == 'function') {
-          observer.close();
-        }
-      }
-      this._observers = [];
-    },
-
-    // bookkeeping observers for memory management
-    registerNamedObserver: function(name, observer) {
-      var o$ = this._namedObservers || (this._namedObservers = {});
-      o$[name] = observer;
-    },
-
-    closeNamedObserver: function(name) {
-      var o$ = this._namedObservers;
-      if (o$ && o$[name]) {
-        o$[name].close();
-        o$[name] = null;
-        return true;
-      }
-    },
-
-    closeNamedObservers: function() {
-      if (this._namedObservers) {
-        for (var i in this._namedObservers) {
-          this.closeNamedObserver(i);
-        }
-        this._namedObservers = {};
-      }
-    }
-
-  };
-
-  // logging
-  var LOG_OBSERVE = '[%s] watching [%s]';
-  var LOG_OBSERVED = '[%s#%s] watch: [%s] now [%s] was [%s]';
-  var LOG_CHANGED = '[%s#%s] propertyChanged: [%s] now [%s] was [%s]';
-
-  // exports
-
-  scope.api.instance.properties = properties;
-
-})(Polymer);
-
-(function(scope) {
-
-  /**
-   * @class polymer-base
-   */
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-
-  // element api supporting mdv
-  var mdv = {
-
-    /**
-     * Creates dom cloned from the given template, instantiating bindings
-     * with this element as the template model and `PolymerExpressions` as the
-     * binding delegate.
-     *
-     * @method instanceTemplate
-     * @param {Template} template source template from which to create dom.
-     */
-    instanceTemplate: function(template) {
-      // ensure template is decorated (lets' things like <tr template ...> work)
-      HTMLTemplateElement.decorate(template);
-      // ensure a default bindingDelegate
-      var syntax = this.syntax || (!template.bindingDelegate &&
-          this.element.syntax);
-      var dom = template.createInstance(this, syntax);
-      var observers = dom.bindings_;
-      for (var i = 0; i < observers.length; i++) {
-        this.registerObserver(observers[i]);
-      }
-      return dom;
-    },
-
-    // Called by TemplateBinding/NodeBind to setup a binding to the given
-    // property. It's overridden here to support property bindings
-    // in addition to attribute bindings that are supported by default.
-    bind: function(name, observable, oneTime) {
-      var property = this.propertyForAttribute(name);
-      if (!property) {
-        // TODO(sjmiles): this mixin method must use the special form
-        // of `super` installed by `mixinMethod` in declaration/prototype.js
-        return this.mixinSuper(arguments);
-      } else {
-        // use n-way Polymer binding
-        var observer = this.bindProperty(property, observable, oneTime);
-        // NOTE: reflecting binding information is typically required only for
-        // tooling. It has a performance cost so it's opt-in in Node.bind.
-        if (Platform.enableBindingsReflection && observer) {
-          observer.path = observable.path_;
-          this._recordBinding(property, observer);
-        }
-        if (this.reflect[property]) {
-          this.reflectPropertyToAttribute(property);
-        }
-        return observer;
-      }
-    },
-
-    _recordBinding: function(name, observer) {
-      this.bindings_ = this.bindings_ || {};
-      this.bindings_[name] = observer;
-    },
-
-    // Called by TemplateBinding when all bindings on an element have been 
-    // executed. This signals that all element inputs have been gathered
-    // and it's safe to ready the element, create shadow-root and start
-    // data-observation.
-    bindFinished: function() {
-      this.makeElementReady();
-    },
-
-    // called at detached time to signal that an element's bindings should be
-    // cleaned up. This is done asynchronously so that users have the chance
-    // to call `cancelUnbindAll` to prevent unbinding.
-    asyncUnbindAll: function() {
-      if (!this._unbound) {
-        log.unbind && console.log('[%s] asyncUnbindAll', this.localName);
-        this._unbindAllJob = this.job(this._unbindAllJob, this.unbindAll, 0);
-      }
-    },
-    
-    /**
-     * This method should rarely be used and only if 
-     * <a href="#cancelUnbindAll">`cancelUnbindAll`</a> has been called to 
-     * prevent element unbinding. In this case, the element's bindings will 
-     * not be automatically cleaned up and it cannot be garbage collected 
-     * by the system. If memory pressure is a concern or a 
-     * large amount of elements need to be managed in this way, `unbindAll`
-     * can be called to deactivate the element's bindings and allow its 
-     * memory to be reclaimed.
-     *
-     * @method unbindAll
-     */
-    unbindAll: function() {
-      if (!this._unbound) {
-        this.closeObservers();
-        this.closeNamedObservers();
-        this._unbound = true;
-      }
-    },
-
-    /**
-     * Call in `detached` to prevent the element from unbinding when it is 
-     * detached from the dom. The element is unbound as a cleanup step that 
-     * allows its memory to be reclaimed. 
-     * If `cancelUnbindAll` is used, consider calling 
-     * <a href="#unbindAll">`unbindAll`</a> when the element is no longer
-     * needed. This will allow its memory to be reclaimed.
-     * 
-     * @method cancelUnbindAll
-     */
-    cancelUnbindAll: function() {
-      if (this._unbound) {
-        log.unbind && console.warn('[%s] already unbound, cannot cancel unbindAll', this.localName);
-        return;
-      }
-      log.unbind && console.log('[%s] cancelUnbindAll', this.localName);
-      if (this._unbindAllJob) {
-        this._unbindAllJob = this._unbindAllJob.stop();
-      }
-    }
-
-  };
-
-  function unbindNodeTree(node) {
-    forNodeTree(node, _nodeUnbindAll);
-  }
-
-  function _nodeUnbindAll(node) {
-    node.unbindAll();
-  }
-
-  function forNodeTree(node, callback) {
-    if (node) {
-      callback(node);
-      for (var child = node.firstChild; child; child = child.nextSibling) {
-        forNodeTree(child, callback);
-      }
-    }
-  }
-
-  var mustachePattern = /\{\{([^{}]*)}}/;
-
-  // exports
-
-  scope.bindPattern = mustachePattern;
-  scope.api.instance.mdv = mdv;
-
-})(Polymer);
-
-(function(scope) {
-
-  /**
-   * Common prototype for all Polymer Elements.
-   * 
-   * @class polymer-base
-   * @homepage polymer.github.io
-   */
-  var base = {
-    /**
-     * Tags this object as the canonical Base prototype.
-     *
-     * @property PolymerBase
-     * @type boolean
-     * @default true
-     */
-    PolymerBase: true,
-
-    /**
-     * Debounce signals. 
-     * 
-     * Call `job` to defer a named signal, and all subsequent matching signals, 
-     * until a wait time has elapsed with no new signal.
-     * 
-     *     debouncedClickAction: function(e) {
-     *       // processClick only when it's been 100ms since the last click
-     *       this.job('click', function() {
-     *        this.processClick;
-     *       }, 100);
-     *     }
-     *
-     * @method job
-     * @param String {String} job A string identifier for the job to debounce.
-     * @param Function {Function} callback A function that is called (with `this` context) when the wait time elapses.
-     * @param Number {Number} wait Time in milliseconds (ms) after the last signal that must elapse before invoking `callback`
-     * @type Handle
-     */
-    job: function(job, callback, wait) {
-      if (typeof job === 'string') {
-        var n = '___' + job;
-        this[n] = Polymer.job.call(this, this[n], callback, wait);
-      } else {
-        // TODO(sjmiles): suggest we deprecate this call signature
-        return Polymer.job.call(this, job, callback, wait);
-      }
-    },
-
-    /**
-     * Invoke a superclass method. 
-     * 
-     * Use `super()` to invoke the most recently overridden call to the 
-     * currently executing function. 
-     * 
-     * To pass arguments through, use the literal `arguments` as the parameter 
-     * to `super()`.
-     *
-     *     nextPageAction: function(e) {
-     *       // invoke the superclass version of `nextPageAction`
-     *       this.super(arguments); 
-     *     }
-     *
-     * To pass custom arguments, arrange them in an array.
-     *
-     *     appendSerialNo: function(value, serial) {
-     *       // prefix the superclass serial number with our lot # before
-     *       // invoking the superlcass
-     *       return this.super([value, this.lotNo + serial])
-     *     }
-     *
-     * @method super
-     * @type Any
-     * @param {args) An array of arguments to use when calling the superclass method, or null.
-     */
-    super: Polymer.super,
-
-    /**
-     * Lifecycle method called when the element is instantiated.
-     * 
-     * Override `created` to perform custom create-time tasks. No need to call 
-     * super-class `created` unless you are extending another Polymer element.
-     * Created is called before the element creates `shadowRoot` or prepares
-     * data-observation.
-     * 
-     * @method created
-     * @type void
-     */
-    created: function() {
-    },
-
-    /**
-     * Lifecycle method called when the element has populated it's `shadowRoot`,
-     * prepared data-observation, and made itself ready for API interaction.
-     * 
-     * @method ready
-     * @type void
-     */
-    ready: function() {
-    },
-
-    /**
-     * Low-level lifecycle method called as part of standard Custom Elements
-     * operation. Polymer implements this method to provide basic default 
-     * functionality. For custom create-time tasks, implement `created` 
-     * instead, which is called immediately after `createdCallback`. 
-     * 
-     * @method createdCallback
-     */
-    createdCallback: function() {
-      if (this.templateInstance && this.templateInstance.model) {
-        console.warn('Attributes on ' + this.localName + ' were data bound ' +
-            'prior to Polymer upgrading the element. This may result in ' +
-            'incorrect binding types.');
-      }
-      this.created();
-      this.prepareElement();
-      if (!this.ownerDocument.isStagingDocument) {
-        this.makeElementReady();
-      }
-    },
-
-    // system entry point, do not override
-    prepareElement: function() {
-      if (this._elementPrepared) {
-        console.warn('Element already prepared', this.localName);
-        return;
-      }
-      this._elementPrepared = true;
-      // storage for shadowRoots info
-      this.shadowRoots = {};
-      // install property observers
-      this.createPropertyObserver();
-      this.openPropertyObserver();
-      // install boilerplate attributes
-      this.copyInstanceAttributes();
-      // process input attributes
-      this.takeAttributes();
-      // add event listeners
-      this.addHostListeners();
-    },
-
-    // system entry point, do not override
-    makeElementReady: function() {
-      if (this._readied) {
-        return;
-      }
-      this._readied = true;
-      this.createComputedProperties();
-      this.parseDeclarations(this.__proto__);
-      // NOTE: Support use of the `unresolved` attribute to help polyfill
-      // custom elements' `:unresolved` feature.
-      this.removeAttribute('unresolved');
-      // user entry point
-      this.ready();
-    },
-
-    /**
-     * Low-level lifecycle method called as part of standard Custom Elements
-     * operation. Polymer implements this method to provide basic default 
-     * functionality. For custom tasks in your element, implement `attributeChanged` 
-     * instead, which is called immediately after `attributeChangedCallback`. 
-     * 
-     * @method attributeChangedCallback
-     */
-    attributeChangedCallback: function(name, oldValue) {
-      // TODO(sjmiles): adhoc filter
-      if (name !== 'class' && name !== 'style') {
-        this.attributeToProperty(name, this.getAttribute(name));
-      }
-      if (this.attributeChanged) {
-        this.attributeChanged.apply(this, arguments);
-      }
-    },
-
-    /**
-     * Low-level lifecycle method called as part of standard Custom Elements
-     * operation. Polymer implements this method to provide basic default 
-     * functionality. For custom create-time tasks, implement `attached` 
-     * instead, which is called immediately after `attachedCallback`. 
-     * 
-     * @method attachedCallback
-     */
-     attachedCallback: function() {
-      // when the element is attached, prevent it from unbinding.
-      this.cancelUnbindAll();
-      // invoke user action
-      if (this.attached) {
-        this.attached();
-      }
-      if (!this.hasBeenAttached) {
-        this.hasBeenAttached = true;
-        if (this.domReady) {
-          this.async('domReady');
-        }
-      }
-    },
-
-     /**
-     * Implement to access custom elements in dom descendants, ancestors, 
-     * or siblings. Because custom elements upgrade in document order, 
-     * elements accessed in `ready` or `attached` may not be upgraded. When
-     * `domReady` is called, all registered custom elements are guaranteed
-     * to have been upgraded.
-     * 
-     * @method domReady
-     */
-
-    /**
-     * Low-level lifecycle method called as part of standard Custom Elements
-     * operation. Polymer implements this method to provide basic default 
-     * functionality. For custom create-time tasks, implement `detached` 
-     * instead, which is called immediately after `detachedCallback`. 
-     * 
-     * @method detachedCallback
-     */
-    detachedCallback: function() {
-      if (!this.preventDispose) {
-        this.asyncUnbindAll();
-      }
-      // invoke user action
-      if (this.detached) {
-        this.detached();
-      }
-      // TODO(sorvell): bc
-      if (this.leftView) {
-        this.leftView();
-      }
-    },
-
-    /**
-     * Walks the prototype-chain of this element and allows specific
-     * classes a chance to process static declarations.
-     * 
-     * In particular, each polymer-element has it's own `template`.
-     * `parseDeclarations` is used to accumulate all element `template`s
-     * from an inheritance chain.
-     *
-     * `parseDeclaration` static methods implemented in the chain are called
-     * recursively, oldest first, with the `<polymer-element>` associated
-     * with the current prototype passed as an argument.
-     * 
-     * An element may override this method to customize shadow-root generation. 
-     * 
-     * @method parseDeclarations
-     */
-    parseDeclarations: function(p) {
-      if (p && p.element) {
-        this.parseDeclarations(p.__proto__);
-        p.parseDeclaration.call(this, p.element);
-      }
-    },
-
-    /**
-     * Perform init-time actions based on static information in the
-     * `<polymer-element>` instance argument.
-     *
-     * For example, the standard implementation locates the template associated
-     * with the given `<polymer-element>` and stamps it into a shadow-root to
-     * implement shadow inheritance.
-     *  
-     * An element may override this method for custom behavior. 
-     * 
-     * @method parseDeclaration
-     */
-    parseDeclaration: function(elementElement) {
-      var template = this.fetchTemplate(elementElement);
-      if (template) {
-        var root = this.shadowFromTemplate(template);
-        this.shadowRoots[elementElement.name] = root;
-      }
-    },
-
-    /**
-     * Given a `<polymer-element>`, find an associated template (if any) to be
-     * used for shadow-root generation.
-     *
-     * An element may override this method for custom behavior. 
-     * 
-     * @method fetchTemplate
-     */
-    fetchTemplate: function(elementElement) {
-      return elementElement.querySelector('template');
-    },
-
-    /**
-     * Create a shadow-root in this host and stamp `template` as it's 
-     * content. 
-     *
-     * An element may override this method for custom behavior. 
-     * 
-     * @method shadowFromTemplate
-     */
-    shadowFromTemplate: function(template) {
-      if (template) {
-        // make a shadow root
-        var root = this.createShadowRoot();
-        // stamp template
-        // which includes parsing and applying MDV bindings before being
-        // inserted (to avoid {{}} in attribute values)
-        // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
-        var dom = this.instanceTemplate(template);
-        // append to shadow dom
-        root.appendChild(dom);
-        // perform post-construction initialization tasks on shadow root
-        this.shadowRootReady(root, template);
-        // return the created shadow root
-        return root;
-      }
-    },
-
-    // utility function that stamps a <template> into light-dom
-    lightFromTemplate: function(template, refNode) {
-      if (template) {
-        // TODO(sorvell): mark this element as an eventController so that
-        // event listeners on bound nodes inside it will be called on it.
-        // Note, the expectation here is that events on all descendants
-        // should be handled by this element.
-        this.eventController = this;
-        // stamp template
-        // which includes parsing and applying MDV bindings before being
-        // inserted (to avoid {{}} in attribute values)
-        // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
-        var dom = this.instanceTemplate(template);
-        // append to shadow dom
-        if (refNode) {
-          this.insertBefore(dom, refNode);
-        } else {
-          this.appendChild(dom);
-        }
-        // perform post-construction initialization tasks on ahem, light root
-        this.shadowRootReady(this);
-        // return the created shadow root
-        return dom;
-      }
-    },
-
-    shadowRootReady: function(root) {
-      // locate nodes with id and store references to them in this.$ hash
-      this.marshalNodeReferences(root);
-    },
-
-    // locate nodes with id and store references to them in this.$ hash
-    marshalNodeReferences: function(root) {
-      // establish $ instance variable
-      var $ = this.$ = this.$ || {};
-      // populate $ from nodes with ID from the LOCAL tree
-      if (root) {
-        var n$ = root.querySelectorAll("[id]");
-        for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {
-          $[n.id] = n;
-        };
-      }
-    },
-
-    /**
-     * Register a one-time callback when a child-list or sub-tree mutation
-     * occurs on node. 
-     *
-     * For persistent callbacks, call onMutation from your listener. 
-     * 
-     * @method onMutation
-     * @param Node {Node} node Node to watch for mutations.
-     * @param Function {Function} listener Function to call on mutation. The function is invoked as `listener.call(this, observer, mutations);` where `observer` is the MutationObserver that triggered the notification, and `mutations` is the native mutation list.
-     */
-    onMutation: function(node, listener) {
-      var observer = new MutationObserver(function(mutations) {
-        listener.call(this, observer, mutations);
-        observer.disconnect();
-      }.bind(this));
-      observer.observe(node, {childList: true, subtree: true});
-    }
-  };
-
-  /**
-   * @class Polymer
-   */
-  
-  /**
-   * Returns true if the object includes <a href="#polymer-base">polymer-base</a> in it's prototype chain.
-   * 
-   * @method isBase
-   * @param Object {Object} object Object to test.
-   * @type Boolean
-   */
-  function isBase(object) {
-    return object.hasOwnProperty('PolymerBase')
-  }
-
-  // name a base constructor for dev tools
-
-  /**
-   * The Polymer base-class constructor.
-   * 
-   * @property Base
-   * @type Function
-   */
-  function PolymerBase() {};
-  PolymerBase.prototype = base;
-  base.constructor = PolymerBase;
-
-  // exports
-
-  scope.Base = PolymerBase;
-  scope.isBase = isBase;
-  scope.api.instance.base = base;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-  var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;
-
-  // magic words
-  
-  var STYLE_SCOPE_ATTRIBUTE = 'element';
-  var STYLE_CONTROLLER_SCOPE = 'controller';
-  
-  var styles = {
-    STYLE_SCOPE_ATTRIBUTE: STYLE_SCOPE_ATTRIBUTE,
-    /**
-     * Installs external stylesheets and <style> elements with the attribute 
-     * polymer-scope='controller' into the scope of element. This is intended
-     * to be a called during custom element construction.
-    */
-    installControllerStyles: function() {
-      // apply controller styles, but only if they are not yet applied
-      var scope = this.findStyleScope();
-      if (scope && !this.scopeHasNamedStyle(scope, this.localName)) {
-        // allow inherited controller styles
-        var proto = getPrototypeOf(this), cssText = '';
-        while (proto && proto.element) {
-          cssText += proto.element.cssTextForScope(STYLE_CONTROLLER_SCOPE);
-          proto = getPrototypeOf(proto);
-        }
-        if (cssText) {
-          this.installScopeCssText(cssText, scope);
-        }
-      }
-    },
-    installScopeStyle: function(style, name, scope) {
-      var scope = scope || this.findStyleScope(), name = name || '';
-      if (scope && !this.scopeHasNamedStyle(scope, this.localName + name)) {
-        var cssText = '';
-        if (style instanceof Array) {
-          for (var i=0, l=style.length, s; (i<l) && (s=style[i]); i++) {
-            cssText += s.textContent + '\n\n';
-          }
-        } else {
-          cssText = style.textContent;
-        }
-        this.installScopeCssText(cssText, scope, name);
-      }
-    },
-    installScopeCssText: function(cssText, scope, name) {
-      scope = scope || this.findStyleScope();
-      name = name || '';
-      if (!scope) {
-        return;
-      }
-      if (hasShadowDOMPolyfill) {
-        cssText = shimCssText(cssText, scope.host);
-      }
-      var style = this.element.cssTextToScopeStyle(cssText,
-          STYLE_CONTROLLER_SCOPE);
-      Polymer.applyStyleToScope(style, scope);
-      // cache that this style has been applied
-      this.styleCacheForScope(scope)[this.localName + name] = true;
-    },
-    findStyleScope: function(node) {
-      // find the shadow root that contains this element
-      var n = node || this;
-      while (n.parentNode) {
-        n = n.parentNode;
-      }
-      return n;
-    },
-    scopeHasNamedStyle: function(scope, name) {
-      var cache = this.styleCacheForScope(scope);
-      return cache[name];
-    },
-    styleCacheForScope: function(scope) {
-      if (hasShadowDOMPolyfill) {
-        var scopeName = scope.host ? scope.host.localName : scope.localName;
-        return polyfillScopeStyleCache[scopeName] || (polyfillScopeStyleCache[scopeName] = {});
-      } else {
-        return scope._scopeStyles = (scope._scopeStyles || {});
-      }
-    }
-  };
-
-  var polyfillScopeStyleCache = {};
-  
-  // NOTE: use raw prototype traversal so that we ensure correct traversal
-  // on platforms where the protoype chain is simulated via __proto__ (IE10)
-  function getPrototypeOf(prototype) {
-    return prototype.__proto__;
-  }
-
-  function shimCssText(cssText, host) {
-    var name = '', is = false;
-    if (host) {
-      name = host.localName;
-      is = host.hasAttribute('is');
-    }
-    var selector = WebComponents.ShadowCSS.makeScopeSelector(name, is);
-    return WebComponents.ShadowCSS.shimCssText(cssText, selector);
-  }
-
-  // exports
-
-  scope.api.instance.styles = styles;
-  
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var extend = scope.extend;
-  var api = scope.api;
-
-  // imperative implementation: Polymer()
-
-  // specify an 'own' prototype for tag `name`
-  function element(name, prototype) {
-    if (typeof name !== 'string') {
-      var script = prototype || document._currentScript;
-      prototype = name;
-      name = script && script.parentNode && script.parentNode.getAttribute ?
-          script.parentNode.getAttribute('name') : '';
-      if (!name) {
-        throw 'Element name could not be inferred.';
-      }
-    }
-    if (getRegisteredPrototype(name)) {
-      throw 'Already registered (Polymer) prototype for element ' + name;
-    }
-    // cache the prototype
-    registerPrototype(name, prototype);
-    // notify the registrar waiting for 'name', if any
-    notifyPrototype(name);
-  }
-
-  // async prototype source
-
-  function waitingForPrototype(name, client) {
-    waitPrototype[name] = client;
-  }
-
-  var waitPrototype = {};
-
-  function notifyPrototype(name) {
-    if (waitPrototype[name]) {
-      waitPrototype[name].registerWhenReady();
-      delete waitPrototype[name];
-    }
-  }
-
-  // utility and bookkeeping
-
-  // maps tag names to prototypes, as registered with
-  // Polymer. Prototypes associated with a tag name
-  // using document.registerElement are available from
-  // HTMLElement.getPrototypeForTag().
-  // If an element was fully registered by Polymer, then
-  // Polymer.getRegisteredPrototype(name) === 
-  //   HTMLElement.getPrototypeForTag(name)
-
-  var prototypesByName = {};
-
-  function registerPrototype(name, prototype) {
-    return prototypesByName[name] = prototype || {};
-  }
-
-  function getRegisteredPrototype(name) {
-    return prototypesByName[name];
-  }
-
-  function instanceOfType(element, type) {
-    if (typeof type !== 'string') {
-      return false;
-    }
-    var proto = HTMLElement.getPrototypeForTag(type);
-    var ctor = proto && proto.constructor;
-    if (!ctor) {
-      return false;
-    }
-    if (CustomElements.instanceof) {
-      return CustomElements.instanceof(element, ctor);
-    }
-    return element instanceof ctor;
-  }
-
-  // exports
-
-  scope.getRegisteredPrototype = getRegisteredPrototype;
-  scope.waitingForPrototype = waitingForPrototype;
-  scope.instanceOfType = instanceOfType;
-
-  // namespace shenanigans so we can expose our scope on the registration 
-  // function
-
-  // make window.Polymer reference `element()`
-
-  window.Polymer = element;
-
-  // TODO(sjmiles): find a way to do this that is less terrible
-  // copy window.Polymer properties onto `element()`
-
-  extend(Polymer, scope);
-
-  // Under the HTMLImports polyfill, scripts in the main document
-  // do not block on imports; we want to allow calls to Polymer in the main
-  // document. WebComponents collects those calls until we can process them, which
-  // we do here.
-
-  if (WebComponents.consumeDeclarations) {
-    WebComponents.consumeDeclarations(function(declarations) {
-      if (declarations) {
-        for (var i=0, l=declarations.length, d; (i<l) && (d=declarations[i]); i++) {
-          element.apply(null, d);
-        }
-      }
-    });
-  }
-
-})(Polymer);
-
-(function(scope) {
-
-/**
- * @class polymer-base
- */
-
- /**
-  * Resolve a url path to be relative to a `base` url. If unspecified, `base`
-  * defaults to the element's ownerDocument url. Can be used to resolve
-  * paths from element's in templates loaded in HTMLImports to be relative
-  * to the document containing the element. Polymer automatically does this for
-  * url attributes in element templates; however, if a url, for
-  * example, contains a binding, then `resolvePath` can be used to ensure it is 
-  * relative to the element document. For example, in an element's template,
-  *
-  *     <a href="{{resolvePath(path)}}">Resolved</a>
-  * 
-  * @method resolvePath
-  * @param {String} url Url path to resolve.
-  * @param {String} base Optional base url against which to resolve, defaults
-  * to the element's ownerDocument url.
-  * returns {String} resolved url.
-  */
-
-var path = {
-  resolveElementPaths: function(node) {
-    Polymer.urlResolver.resolveDom(node);
-  },
-  addResolvePathApi: function() {
-    // let assetpath attribute modify the resolve path
-    var assetPath = this.getAttribute('assetpath') || '';
-    var root = new URL(assetPath, this.ownerDocument.baseURI);
-    this.prototype.resolvePath = function(urlPath, base) {
-      var u = new URL(urlPath, base || root);
-      return u.href;
-    };
-  }
-};
-
-// exports
-scope.api.declaration.path = path;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-  var api = scope.api.instance.styles;
-  var STYLE_SCOPE_ATTRIBUTE = api.STYLE_SCOPE_ATTRIBUTE;
-
-  var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;
-
-  // magic words
-
-  var STYLE_SELECTOR = 'style';
-  var STYLE_LOADABLE_MATCH = '@import';
-  var SHEET_SELECTOR = 'link[rel=stylesheet]';
-  var STYLE_GLOBAL_SCOPE = 'global';
-  var SCOPE_ATTR = 'polymer-scope';
-
-  var styles = {
-    // returns true if resources are loading
-    loadStyles: function(callback) {
-      var template = this.fetchTemplate();
-      var content = template && this.templateContent();
-      if (content) {
-        this.convertSheetsToStyles(content);
-        var styles = this.findLoadableStyles(content);
-        if (styles.length) {
-          var templateUrl = template.ownerDocument.baseURI;
-          return Polymer.styleResolver.loadStyles(styles, templateUrl, callback);
-        }
-      }
-      if (callback) {
-        callback();
-      }
-    },
-    convertSheetsToStyles: function(root) {
-      var s$ = root.querySelectorAll(SHEET_SELECTOR);
-      for (var i=0, l=s$.length, s, c; (i<l) && (s=s$[i]); i++) {
-        c = createStyleElement(importRuleForSheet(s, this.ownerDocument.baseURI),
-            this.ownerDocument);
-        this.copySheetAttributes(c, s);
-        s.parentNode.replaceChild(c, s);
-      }
-    },
-    copySheetAttributes: function(style, link) {
-      for (var i=0, a$=link.attributes, l=a$.length, a; (a=a$[i]) && i<l; i++) {
-        if (a.name !== 'rel' && a.name !== 'href') {
-          style.setAttribute(a.name, a.value);
-        }
-      }
-    },
-    findLoadableStyles: function(root) {
-      var loadables = [];
-      if (root) {
-        var s$ = root.querySelectorAll(STYLE_SELECTOR);
-        for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {
-          if (s.textContent.match(STYLE_LOADABLE_MATCH)) {
-            loadables.push(s);
-          }
-        }
-      }
-      return loadables;
-    },
-    /**
-     * Install external stylesheets loaded in <polymer-element> elements into the 
-     * element's template.
-     * @param elementElement The <element> element to style.
-     */
-    installSheets: function() {
-      this.cacheSheets();
-      this.cacheStyles();
-      this.installLocalSheets();
-      this.installGlobalStyles();
-    },
-    /**
-     * Remove all sheets from element and store for later use.
-     */
-    cacheSheets: function() {
-      this.sheets = this.findNodes(SHEET_SELECTOR);
-      this.sheets.forEach(function(s) {
-        if (s.parentNode) {
-          s.parentNode.removeChild(s);
-        }
-      });
-    },
-    cacheStyles: function() {
-      this.styles = this.findNodes(STYLE_SELECTOR + '[' + SCOPE_ATTR + ']');
-      this.styles.forEach(function(s) {
-        if (s.parentNode) {
-          s.parentNode.removeChild(s);
-        }
-      });
-    },
-    /**
-     * Takes external stylesheets loaded in an <element> element and moves
-     * their content into a <style> element inside the <element>'s template.
-     * The sheet is then removed from the <element>. This is done only so 
-     * that if the element is loaded in the main document, the sheet does
-     * not become active.
-     * Note, ignores sheets with the attribute 'polymer-scope'.
-     * @param elementElement The <element> element to style.
-     */
-    installLocalSheets: function () {
-      var sheets = this.sheets.filter(function(s) {
-        return !s.hasAttribute(SCOPE_ATTR);
-      });
-      var content = this.templateContent();
-      if (content) {
-        var cssText = '';
-        sheets.forEach(function(sheet) {
-          cssText += cssTextFromSheet(sheet) + '\n';
-        });
-        if (cssText) {
-          var style = createStyleElement(cssText, this.ownerDocument);
-          content.insertBefore(style, content.firstChild);
-        }
-      }
-    },
-    findNodes: function(selector, matcher) {
-      var nodes = this.querySelectorAll(selector).array();
-      var content = this.templateContent();
-      if (content) {
-        var templateNodes = content.querySelectorAll(selector).array();
-        nodes = nodes.concat(templateNodes);
-      }
-      return matcher ? nodes.filter(matcher) : nodes;
-    },
-    /**
-     * Promotes external stylesheets and <style> elements with the attribute 
-     * polymer-scope='global' into global scope.
-     * This is particularly useful for defining @keyframe rules which 
-     * currently do not function in scoped or shadow style elements.
-     * (See wkb.ug/72462)
-     * @param elementElement The <element> element to style.
-    */
-    // TODO(sorvell): remove when wkb.ug/72462 is addressed.
-    installGlobalStyles: function() {
-      var style = this.styleForScope(STYLE_GLOBAL_SCOPE);
-      applyStyleToScope(style, document.head);
-    },
-    cssTextForScope: function(scopeDescriptor) {
-      var cssText = '';
-      // handle stylesheets
-      var selector = '[' + SCOPE_ATTR + '=' + scopeDescriptor + ']';
-      var matcher = function(s) {
-        return matchesSelector(s, selector);
-      };
-      var sheets = this.sheets.filter(matcher);
-      sheets.forEach(function(sheet) {
-        cssText += cssTextFromSheet(sheet) + '\n\n';
-      });
-      // handle cached style elements
-      var styles = this.styles.filter(matcher);
-      styles.forEach(function(style) {
-        cssText += style.textContent + '\n\n';
-      });
-      return cssText;
-    },
-    styleForScope: function(scopeDescriptor) {
-      var cssText = this.cssTextForScope(scopeDescriptor);
-      return this.cssTextToScopeStyle(cssText, scopeDescriptor);
-    },
-    cssTextToScopeStyle: function(cssText, scopeDescriptor) {
-      if (cssText) {
-        var style = createStyleElement(cssText);
-        style.setAttribute(STYLE_SCOPE_ATTRIBUTE, this.getAttribute('name') +
-            '-' + scopeDescriptor);
-        return style;
-      }
-    }
-  };
-
-  function importRuleForSheet(sheet, baseUrl) {
-    var href = new URL(sheet.getAttribute('href'), baseUrl).href;
-    return '@import \'' + href + '\';';
-  }
-
-  function applyStyleToScope(style, scope) {
-    if (style) {
-      if (scope === document) {
-        scope = document.head;
-      }
-      if (hasShadowDOMPolyfill) {
-        scope = document.head;
-      }
-      // TODO(sorvell): necessary for IE
-      // see https://connect.microsoft.com/IE/feedback/details/790212/
-      // cloning-a-style-element-and-adding-to-document-produces
-      // -unexpected-result#details
-      // var clone = style.cloneNode(true);
-      var clone = createStyleElement(style.textContent);
-      var attr = style.getAttribute(STYLE_SCOPE_ATTRIBUTE);
-      if (attr) {
-        clone.setAttribute(STYLE_SCOPE_ATTRIBUTE, attr);
-      }
-      // TODO(sorvell): probably too brittle; try to figure out 
-      // where to put the element.
-      var refNode = scope.firstElementChild;
-      if (scope === document.head) {
-        var selector = 'style[' + STYLE_SCOPE_ATTRIBUTE + ']';
-        var s$ = document.head.querySelectorAll(selector);
-        if (s$.length) {
-          refNode = s$[s$.length-1].nextElementSibling;
-        }
-      }
-      scope.insertBefore(clone, refNode);
-    }
-  }
-
-  function createStyleElement(cssText, scope) {
-    scope = scope || document;
-    scope = scope.createElement ? scope : scope.ownerDocument;
-    var style = scope.createElement('style');
-    style.textContent = cssText;
-    return style;
-  }
-
-  function cssTextFromSheet(sheet) {
-    return (sheet && sheet.__resource) || '';
-  }
-
-  function matchesSelector(node, inSelector) {
-    if (matches) {
-      return matches.call(node, inSelector);
-    }
-  }
-  var p = HTMLElement.prototype;
-  var matches = p.matches || p.matchesSelector || p.webkitMatchesSelector 
-      || p.mozMatchesSelector;
-  
-  // exports
-
-  scope.api.declaration.styles = styles;
-  scope.applyStyleToScope = applyStyleToScope;
-  
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var log = window.WebComponents ? WebComponents.flags.log : {};
-  var api = scope.api.instance.events;
-  var EVENT_PREFIX = api.EVENT_PREFIX;
-
-  var mixedCaseEventTypes = {};
-  [
-    'webkitAnimationStart',
-    'webkitAnimationEnd',
-    'webkitTransitionEnd',
-    'DOMFocusOut',
-    'DOMFocusIn',
-    'DOMMouseScroll'
-  ].forEach(function(e) {
-    mixedCaseEventTypes[e.toLowerCase()] = e;
-  });
-
-  // polymer-element declarative api: events feature
-  var events = {
-    parseHostEvents: function() {
-      // our delegates map
-      var delegates = this.prototype.eventDelegates;
-      // extract data from attributes into delegates
-      this.addAttributeDelegates(delegates);
-    },
-    addAttributeDelegates: function(delegates) {
-      // for each attribute
-      for (var i=0, a; a=this.attributes[i]; i++) {
-        // does it have magic marker identifying it as an event delegate?
-        if (this.hasEventPrefix(a.name)) {
-          // if so, add the info to delegates
-          delegates[this.removeEventPrefix(a.name)] = a.value.replace('{{', '')
-              .replace('}}', '').trim();
-        }
-      }
-    },
-    // starts with 'on-'
-    hasEventPrefix: function (n) {
-      return n && (n[0] === 'o') && (n[1] === 'n') && (n[2] === '-');
-    },
-    removeEventPrefix: function(n) {
-      return n.slice(prefixLength);
-    },
-    findController: function(node) {
-      while (node.parentNode) {
-        if (node.eventController) {
-          return node.eventController;
-        }
-        node = node.parentNode;
-      }
-      return node.host;
-    },
-    getEventHandler: function(controller, target, method) {
-      var events = this;
-      return function(e) {
-        if (!controller || !controller.PolymerBase) {
-          controller = events.findController(target);
-        }
-
-        var args = [e, e.detail, e.currentTarget];
-        controller.dispatchMethod(controller, method, args);
-      };
-    },
-    prepareEventBinding: function(pathString, name, node) {
-      if (!this.hasEventPrefix(name))
-        return;
-
-      var eventType = this.removeEventPrefix(name);
-      eventType = mixedCaseEventTypes[eventType] || eventType;
-
-      var events = this;
-
-      return function(model, node, oneTime) {
-        var handler = events.getEventHandler(undefined, node, pathString);
-        PolymerGestures.addEventListener(node, eventType, handler);
-
-        if (oneTime)
-          return;
-
-        // TODO(rafaelw): This is really pointless work. Aside from the cost
-        // of these allocations, NodeBind is going to setAttribute back to its
-        // current value. Fixing this would mean changing the TemplateBinding
-        // binding delegate API.
-        function bindingValue() {
-          return '{{ ' + pathString + ' }}';
-        }
-
-        return {
-          open: bindingValue,
-          discardChanges: bindingValue,
-          close: function() {
-            PolymerGestures.removeEventListener(node, eventType, handler);
-          }
-        };
-      };
-    }
-  };
-
-  var prefixLength = EVENT_PREFIX.length;
-
-  // exports
-  scope.api.declaration.events = events;
-
-})(Polymer);
-
-(function(scope) {
-
-  // element api
-
-  var observationBlacklist = ['attribute'];
-
-  var properties = {
-    inferObservers: function(prototype) {
-      // called before prototype.observe is chained to inherited object
-      var observe = prototype.observe, property;
-      for (var n in prototype) {
-        if (n.slice(-7) === 'Changed') {
-          property = n.slice(0, -7);
-          if (this.canObserveProperty(property)) {
-            if (!observe) {
-              observe  = (prototype.observe = {});
-            }
-            observe[property] = observe[property] || n;
-          }
-        }
-      }
-    },
-    canObserveProperty: function(property) {
-      return (observationBlacklist.indexOf(property) < 0);
-    },
-    explodeObservers: function(prototype) {
-      // called before prototype.observe is chained to inherited object
-      var o = prototype.observe;
-      if (o) {
-        var exploded = {};
-        for (var n in o) {
-          var names = n.split(' ');
-          for (var i=0, ni; ni=names[i]; i++) {
-            exploded[ni] = o[n];
-          }
-        }
-        prototype.observe = exploded;
-      }
-    },
-    optimizePropertyMaps: function(prototype) {
-      if (prototype.observe) {
-        // construct name list
-        var a = prototype._observeNames = [];
-        for (var n in prototype.observe) {
-          var names = n.split(' ');
-          for (var i=0, ni; ni=names[i]; i++) {
-            a.push(ni);
-          }
-        }
-      }
-      if (prototype.publish) {
-        // construct name list
-        var a = prototype._publishNames = [];
-        for (var n in prototype.publish) {
-          a.push(n);
-        }
-      }
-      if (prototype.computed) {
-        // construct name list
-        var a = prototype._computedNames = [];
-        for (var n in prototype.computed) {
-          a.push(n);
-        }
-      }
-    },
-    publishProperties: function(prototype, base) {
-      // if we have any properties to publish
-      var publish = prototype.publish;
-      if (publish) {
-        // transcribe `publish` entries onto own prototype
-        this.requireProperties(publish, prototype, base);
-        // warn and remove accessor names that are broken on some browsers
-        this.filterInvalidAccessorNames(publish);
-        // construct map of lower-cased property names
-        prototype._publishLC = this.lowerCaseMap(publish);
-      }
-      var computed = prototype.computed;
-      if (computed) {
-        // warn and remove accessor names that are broken on some browsers
-        this.filterInvalidAccessorNames(computed);
-      }
-    },
-    // Publishing/computing a property where the name might conflict with a
-    // browser property is not currently supported to help users of Polymer
-    // avoid browser bugs:
-    //
-    // https://code.google.com/p/chromium/issues/detail?id=43394
-    // https://bugs.webkit.org/show_bug.cgi?id=49739
-    //
-    // We can lift this restriction when those bugs are fixed.
-    filterInvalidAccessorNames: function(propertyNames) {
-      for (var name in propertyNames) {
-        // Check if the name is in our blacklist.
-        if (this.propertyNameBlacklist[name]) {
-          console.warn('Cannot define property "' + name + '" for element "' +
-            this.name + '" because it has the same name as an HTMLElement ' +
-            'property, and not all browsers support overriding that. ' +
-            'Consider giving it a different name.');
-          // Remove the invalid accessor from the list.
-          delete propertyNames[name];
-        }
-      }
-    },
-    //
-    // `name: value` entries in the `publish` object may need to generate 
-    // matching properties on the prototype.
-    //
-    // Values that are objects may have a `reflect` property, which
-    // signals that the value describes property control metadata.
-    // In metadata objects, the prototype default value (if any)
-    // is encoded in the `value` property.
-    //
-    // publish: {
-    //   foo: 5, 
-    //   bar: {value: true, reflect: true},
-    //   zot: {}
-    // }
-    //
-    // `reflect` metadata property controls whether changes to the property
-    // are reflected back to the attribute (default false). 
-    //
-    // A value is stored on the prototype unless it's === `undefined`,
-    // in which case the base chain is checked for a value.
-    // If the basal value is also undefined, `null` is stored on the prototype.
-    //
-    // The reflection data is stored on another prototype object, `reflect`
-    // which also can be specified directly.
-    //
-    // reflect: {
-    //   foo: true
-    // }
-    //
-    requireProperties: function(propertyInfos, prototype, base) {
-      // per-prototype storage for reflected properties
-      prototype.reflect = prototype.reflect || {};
-      // ensure a prototype value for each property
-      // and update the property's reflect to attribute status
-      for (var n in propertyInfos) {
-        var value = propertyInfos[n];
-        // value has metadata if it has a `reflect` property
-        if (value && value.reflect !== undefined) {
-          prototype.reflect[n] = Boolean(value.reflect);
-          value = value.value;
-        }
-        // only set a value if one is specified
-        if (value !== undefined) {
-          prototype[n] = value;
-        }
-      }
-    },
-    lowerCaseMap: function(properties) {
-      var map = {};
-      for (var n in properties) {
-        map[n.toLowerCase()] = n;
-      }
-      return map;
-    },
-    createPropertyAccessor: function(name, ignoreWrites) {
-      var proto = this.prototype;
-
-      var privateName = name + '_';
-      var privateObservable  = name + 'Observable_';
-      proto[privateName] = proto[name];
-
-      Object.defineProperty(proto, name, {
-        get: function() {
-          var observable = this[privateObservable];
-          if (observable)
-            observable.deliver();
-
-          return this[privateName];
-        },
-        set: function(value) {
-          if (ignoreWrites) {
-            return this[privateName];
-          }
-
-          var observable = this[privateObservable];
-          if (observable) {
-            observable.setValue(value);
-            return;
-          }
-
-          var oldValue = this[privateName];
-          this[privateName] = value;
-          this.emitPropertyChangeRecord(name, value, oldValue);
-
-          return value;
-        },
-        configurable: true
-      });
-    },
-    createPropertyAccessors: function(prototype) {
-      var n$ = prototype._computedNames;
-      if (n$ && n$.length) {
-        for (var i=0, l=n$.length, n, fn; (i<l) && (n=n$[i]); i++) {
-          this.createPropertyAccessor(n, true);
-        }
-      }
-      var n$ = prototype._publishNames;
-      if (n$ && n$.length) {
-        for (var i=0, l=n$.length, n, fn; (i<l) && (n=n$[i]); i++) {
-          // If the property is computed and published, the accessor is created
-          // above.
-          if (!prototype.computed || !prototype.computed[n]) {
-            this.createPropertyAccessor(n);
-          }
-        }
-      }
-    },
-    // This list contains some property names that people commonly want to use,
-    // but won't work because of Chrome/Safari bugs. It isn't an exhaustive
-    // list. In particular it doesn't contain any property names found on
-    // subtypes of HTMLElement (e.g. name, value). Rather it attempts to catch
-    // some common cases.
-    propertyNameBlacklist: {
-      children: 1,
-      'class': 1,
-      id: 1,
-      hidden: 1,
-      style: 1,
-      title: 1,
-    }
-  };
-
-  // exports
-
-  scope.api.declaration.properties = properties;
-
-})(Polymer);
-
-(function(scope) {
-
-  // magic words
-
-  var ATTRIBUTES_ATTRIBUTE = 'attributes';
-  var ATTRIBUTES_REGEX = /\s|,/;
-
-  // attributes api
-
-  var attributes = {
-    
-    inheritAttributesObjects: function(prototype) {
-      // chain our lower-cased publish map to the inherited version
-      this.inheritObject(prototype, 'publishLC');
-      // chain our instance attributes map to the inherited version
-      this.inheritObject(prototype, '_instanceAttributes');
-    },
-
-    publishAttributes: function(prototype, base) {
-      // merge names from 'attributes' attribute into the 'publish' object
-      var attributes = this.getAttribute(ATTRIBUTES_ATTRIBUTE);
-      if (attributes) {
-        // create a `publish` object if needed.
-        // the `publish` object is only relevant to this prototype, the 
-        // publishing logic in `declaration/properties.js` is responsible for
-        // managing property values on the prototype chain.
-        // TODO(sjmiles): the `publish` object is later chained to it's 
-        //                ancestor object, presumably this is only for 
-        //                reflection or other non-library uses. 
-        var publish = prototype.publish || (prototype.publish = {}); 
-        // names='a b c' or names='a,b,c'
-        var names = attributes.split(ATTRIBUTES_REGEX);
-        // record each name for publishing
-        for (var i=0, l=names.length, n; i<l; i++) {
-          // remove excess ws
-          n = names[i].trim();
-          // looks weird, but causes n to exist on `publish` if it does not;
-          // a more careful test would need expensive `in` operator
-          if (n && publish[n] === undefined) {
-            publish[n] = undefined;
-          }
-        }
-      }
-    },
-
-    // record clonable attributes from <element>
-    accumulateInstanceAttributes: function() {
-      // inherit instance attributes
-      var clonable = this.prototype._instanceAttributes;
-      // merge attributes from element
-      var a$ = this.attributes;
-      for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) {  
-        if (this.isInstanceAttribute(a.name)) {
-          clonable[a.name] = a.value;
-        }
-      }
-    },
-
-    isInstanceAttribute: function(name) {
-      return !this.blackList[name] && name.slice(0,3) !== 'on-';
-    },
-
-    // do not clone these attributes onto instances
-    blackList: {
-      name: 1,
-      'extends': 1,
-      constructor: 1,
-      noscript: 1,
-      assetpath: 1,
-      'cache-csstext': 1
-    }
-    
-  };
-
-  // add ATTRIBUTES_ATTRIBUTE to the blacklist
-  attributes.blackList[ATTRIBUTES_ATTRIBUTE] = 1;
-
-  // exports
-
-  scope.api.declaration.attributes = attributes;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-  var events = scope.api.declaration.events;
-
-  var syntax = new PolymerExpressions();
-  var prepareBinding = syntax.prepareBinding;
-
-  // Polymer takes a first crack at the binding to see if it's a declarative
-  // event handler.
-  syntax.prepareBinding = function(pathString, name, node) {
-    return events.prepareEventBinding(pathString, name, node) ||
-           prepareBinding.call(syntax, pathString, name, node);
-  };
-
-  // declaration api supporting mdv
-  var mdv = {
-    syntax: syntax,
-    fetchTemplate: function() {
-      return this.querySelector('template');
-    },
-    templateContent: function() {
-      var template = this.fetchTemplate();
-      return template && template.content;
-    },
-    installBindingDelegate: function(template) {
-      if (template) {
-        template.bindingDelegate = this.syntax;
-      }
-    }
-  };
-
-  // exports
-  scope.api.declaration.mdv = mdv;
-
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-  
-  var api = scope.api;
-  var isBase = scope.isBase;
-  var extend = scope.extend;
-
-  var hasShadowDOMPolyfill = window.ShadowDOMPolyfill;
-
-  // prototype api
-
-  var prototype = {
-
-    register: function(name, extendeeName) {
-      // build prototype combining extendee, Polymer base, and named api
-      this.buildPrototype(name, extendeeName);
-      // register our custom element with the platform
-      this.registerPrototype(name, extendeeName);
-      // reference constructor in a global named by 'constructor' attribute
-      this.publishConstructor();
-    },
-
-    buildPrototype: function(name, extendeeName) {
-      // get our custom prototype (before chaining)
-      var extension = scope.getRegisteredPrototype(name);
-      // get basal prototype
-      var base = this.generateBasePrototype(extendeeName);
-      // implement declarative features
-      this.desugarBeforeChaining(extension, base);
-      // join prototypes
-      this.prototype = this.chainPrototypes(extension, base);
-      // more declarative features
-      this.desugarAfterChaining(name, extendeeName);
-    },
-
-    desugarBeforeChaining: function(prototype, base) {
-      // back reference declaration element
-      // TODO(sjmiles): replace `element` with `elementElement` or `declaration`
-      prototype.element = this;
-      // transcribe `attributes` declarations onto own prototype's `publish`
-      this.publishAttributes(prototype, base);
-      // `publish` properties to the prototype and to attribute watch
-      this.publishProperties(prototype, base);
-      // infer observers for `observe` list based on method names
-      this.inferObservers(prototype);
-      // desugar compound observer syntax, e.g. 'a b c' 
-      this.explodeObservers(prototype);
-    },
-
-    chainPrototypes: function(prototype, base) {
-      // chain various meta-data objects to inherited versions
-      this.inheritMetaData(prototype, base);
-      // chain custom api to inherited
-      var chained = this.chainObject(prototype, base);
-      // x-platform fixup
-      ensurePrototypeTraversal(chained);
-      return chained;
-    },
-
-    inheritMetaData: function(prototype, base) {
-      // chain observe object to inherited
-      this.inheritObject('observe', prototype, base);
-      // chain publish object to inherited
-      this.inheritObject('publish', prototype, base);
-      // chain reflect object to inherited
-      this.inheritObject('reflect', prototype, base);
-      // chain our lower-cased publish map to the inherited version
-      this.inheritObject('_publishLC', prototype, base);
-      // chain our instance attributes map to the inherited version
-      this.inheritObject('_instanceAttributes', prototype, base);
-      // chain our event delegates map to the inherited version
-      this.inheritObject('eventDelegates', prototype, base);
-    },
-
-    // implement various declarative features
-    desugarAfterChaining: function(name, extendee) {
-      // build side-chained lists to optimize iterations
-      this.optimizePropertyMaps(this.prototype);
-      this.createPropertyAccessors(this.prototype);
-      // install mdv delegate on template
-      this.installBindingDelegate(this.fetchTemplate());
-      // install external stylesheets as if they are inline
-      this.installSheets();
-      // adjust any paths in dom from imports
-      this.resolveElementPaths(this);
-      // compile list of attributes to copy to instances
-      this.accumulateInstanceAttributes();
-      // parse on-* delegates declared on `this` element
-      this.parseHostEvents();
-      //
-      // install a helper method this.resolvePath to aid in 
-      // setting resource urls. e.g.
-      // this.$.image.src = this.resolvePath('images/foo.png')
-      this.addResolvePathApi();
-      // under ShadowDOMPolyfill, transforms to approximate missing CSS features
-      if (hasShadowDOMPolyfill) {
-        WebComponents.ShadowCSS.shimStyling(this.templateContent(), name,
-          extendee);
-      }
-      // allow custom element access to the declarative context
-      if (this.prototype.registerCallback) {
-        this.prototype.registerCallback(this);
-      }
-    },
-
-    // if a named constructor is requested in element, map a reference
-    // to the constructor to the given symbol
-    publishConstructor: function() {
-      var symbol = this.getAttribute('constructor');
-      if (symbol) {
-        window[symbol] = this.ctor;
-      }
-    },
-
-    // build prototype combining extendee, Polymer base, and named api
-    generateBasePrototype: function(extnds) {
-      var prototype = this.findBasePrototype(extnds);
-      if (!prototype) {
-        // create a prototype based on tag-name extension
-        var prototype = HTMLElement.getPrototypeForTag(extnds);
-        // insert base api in inheritance chain (if needed)
-        prototype = this.ensureBaseApi(prototype);
-        // memoize this base
-        memoizedBases[extnds] = prototype;
-      }
-      return prototype;
-    },
-
-    findBasePrototype: function(name) {
-      return memoizedBases[name];
-    },
-
-    // install Polymer instance api into prototype chain, as needed 
-    ensureBaseApi: function(prototype) {
-      if (prototype.PolymerBase) {
-        return prototype;
-      }
-      var extended = Object.create(prototype);
-      // we need a unique copy of base api for each base prototype
-      // therefore we 'extend' here instead of simply chaining
-      api.publish(api.instance, extended);
-      // TODO(sjmiles): sharing methods across prototype chains is
-      // not supported by 'super' implementation which optimizes
-      // by memoizing prototype relationships.
-      // Probably we should have a version of 'extend' that is 
-      // share-aware: it could study the text of each function,
-      // look for usage of 'super', and wrap those functions in
-      // closures.
-      // As of now, there is only one problematic method, so 
-      // we just patch it manually.
-      // To avoid re-entrancy problems, the special super method
-      // installed is called `mixinSuper` and the mixin method
-      // must use this method instead of the default `super`.
-      this.mixinMethod(extended, prototype, api.instance.mdv, 'bind');
-      // return buffed-up prototype
-      return extended;
-    },
-
-    mixinMethod: function(extended, prototype, api, name) {
-      var $super = function(args) {
-        return prototype[name].apply(this, args);
-      };
-      extended[name] = function() {
-        this.mixinSuper = $super;
-        return api[name].apply(this, arguments);
-      }
-    },
-
-    // ensure prototype[name] inherits from a prototype.prototype[name]
-    inheritObject: function(name, prototype, base) {
-      // require an object
-      var source = prototype[name] || {};
-      // chain inherited properties onto a new object
-      prototype[name] = this.chainObject(source, base[name]);
-    },
-
-    // register 'prototype' to custom element 'name', store constructor 
-    registerPrototype: function(name, extendee) { 
-      var info = {
-        prototype: this.prototype
-      }
-      // native element must be specified in extends
-      var typeExtension = this.findTypeExtension(extendee);
-      if (typeExtension) {
-        info.extends = typeExtension;
-      }
-      // register the prototype with HTMLElement for name lookup
-      HTMLElement.register(name, this.prototype);
-      // register the custom type
-      this.ctor = document.registerElement(name, info);
-    },
-
-    findTypeExtension: function(name) {
-      if (name && name.indexOf('-') < 0) {
-        return name;
-      } else {
-        var p = this.findBasePrototype(name);
-        if (p.element) {
-          return this.findTypeExtension(p.element.extends);
-        }
-      }
-    }
-
-  };
-
-  // memoize base prototypes
-  var memoizedBases = {};
-
-  // implementation of 'chainObject' depends on support for __proto__
-  if (Object.__proto__) {
-    prototype.chainObject = function(object, inherited) {
-      if (object && inherited && object !== inherited) {
-        object.__proto__ = inherited;
-      }
-      return object;
-    }
-  } else {
-    prototype.chainObject = function(object, inherited) {
-      if (object && inherited && object !== inherited) {
-        var chained = Object.create(inherited);
-        object = extend(chained, object);
-      }
-      return object;
-    }
-  }
-
-  // On platforms that do not support __proto__ (versions of IE), the prototype
-  // chain of a custom element is simulated via installation of __proto__.
-  // Although custom elements manages this, we install it here so it's
-  // available during desugaring.
-  function ensurePrototypeTraversal(prototype) {
-    if (!Object.__proto__) {
-      var ancestor = Object.getPrototypeOf(prototype);
-      prototype.__proto__ = ancestor;
-      if (isBase(ancestor)) {
-        ancestor.__proto__ = Object.getPrototypeOf(ancestor);
-      }
-    }
-  }
-
-  // exports
-
-  api.declaration.prototype = prototype;
-
-})(Polymer);
-
-(function(scope) {
-
-  /*
-
-    Elements are added to a registration queue so that they register in 
-    the proper order at the appropriate time. We do this for a few reasons:
-
-    * to enable elements to load resources (like stylesheets) 
-    asynchronously. We need to do this until the platform provides an efficient
-    alternative. One issue is that remote @import stylesheets are 
-    re-fetched whenever stamped into a shadowRoot.
-
-    * to ensure elements loaded 'at the same time' (e.g. via some set of
-    imports) are registered as a batch. This allows elements to be enured from
-    upgrade ordering as long as they query the dom tree 1 task after
-    upgrade (aka domReady). This is a performance tradeoff. On the one hand,
-    elements that could register while imports are loading are prevented from 
-    doing so. On the other, grouping upgrades into a single task means less
-    incremental work (for example style recalcs),  Also, we can ensure the 
-    document is in a known state at the single quantum of time when 
-    elements upgrade.
-
-  */
-  var queue = {
-
-    // tell the queue to wait for an element to be ready
-    wait: function(element) {
-      if (!element.__queue) {
-        element.__queue = {};
-        elements.push(element);
-      }
-    },
-
-    // enqueue an element to the next spot in the queue.
-    enqueue: function(element, check, go) {
-      var shouldAdd = element.__queue && !element.__queue.check;
-      if (shouldAdd) {
-        queueForElement(element).push(element);
-        element.__queue.check = check;
-        element.__queue.go = go;
-      }
-      return (this.indexOf(element) !== 0);
-    },
-
-    indexOf: function(element) {
-      var i = queueForElement(element).indexOf(element);
-      if (i >= 0 && document.contains(element)) {
-        i += (HTMLImports.useNative || HTMLImports.ready) ? 
-          importQueue.length : 1e9;
-      }
-      return i;  
-    },
-
-    // tell the queue an element is ready to be registered
-    go: function(element) {
-      var readied = this.remove(element);
-      if (readied) {
-        element.__queue.flushable = true;
-        this.addToFlushQueue(readied);
-        this.check();
-      }
-    },
-
-    remove: function(element) {
-      var i = this.indexOf(element);
-      if (i !== 0) {
-        //console.warn('queue order wrong', i);
-        return;
-      }
-      return queueForElement(element).shift();
-    },
-
-    check: function() {
-      // next
-      var element = this.nextElement();
-      if (element) {
-        element.__queue.check.call(element);
-      }
-      if (this.canReady()) {
-        this.ready();
-        return true;
-      }
-    },
-
-    nextElement: function() {
-      return nextQueued();
-    },
-
-    canReady: function() {
-      return !this.waitToReady && this.isEmpty();
-    },
-
-    isEmpty: function() {
-      for (var i=0, l=elements.length, e; (i<l) && 
-          (e=elements[i]); i++) {
-        if (e.__queue && !e.__queue.flushable) {
-          return;
-        }
-      }
-      return true;
-    },
-
-    addToFlushQueue: function(element) {
-      flushQueue.push(element);  
-    },
-
-    flush: function() {
-      // prevent re-entrance
-      if (this.flushing) {
-        return;
-      }
-      this.flushing = true;
-      var element;
-      while (flushQueue.length) {
-        element = flushQueue.shift();
-        element.__queue.go.call(element);
-        element.__queue = null;
-      }
-      this.flushing = false;
-    },
-
-    ready: function() {
-      // TODO(sorvell): As an optimization, turn off CE polyfill upgrading
-      // while registering. This way we avoid having to upgrade each document
-      // piecemeal per registration and can instead register all elements
-      // and upgrade once in a batch. Without this optimization, upgrade time
-      // degrades significantly when SD polyfill is used. This is mainly because
-      // querying the document tree for elements is slow under the SD polyfill.
-      var polyfillWasReady = CustomElements.ready;
-      CustomElements.ready = false;
-      this.flush();
-      if (!CustomElements.useNative) {
-        CustomElements.upgradeDocumentTree(document);
-      }
-      CustomElements.ready = polyfillWasReady;
-      Polymer.flush();
-      requestAnimationFrame(this.flushReadyCallbacks);
-    },
-
-    addReadyCallback: function(callback) {
-      if (callback) {
-        readyCallbacks.push(callback);
-      }
-    },
-
-    flushReadyCallbacks: function() {
-      if (readyCallbacks) {
-        var fn;
-        while (readyCallbacks.length) {
-          fn = readyCallbacks.shift();
-          fn();
-        }
-      }
-    },
-  
-    /**
-    Returns a list of elements that have had polymer-elements created but 
-    are not yet ready to register. The list is an array of element definitions.
-    */
-    waitingFor: function() {
-      var e$ = [];
-      for (var i=0, l=elements.length, e; (i<l) && 
-          (e=elements[i]); i++) {
-        if (e.__queue && !e.__queue.flushable) {
-          e$.push(e);
-        }
-      }
-      return e$;
-    },
-
-    waitToReady: true
-
-  };
-
-  var elements = [];
-  var flushQueue = [];
-  var importQueue = [];
-  var mainQueue = [];
-  var readyCallbacks = [];
-
-  function queueForElement(element) {
-    return document.contains(element) ? mainQueue : importQueue;
-  }
-
-  function nextQueued() {
-    return importQueue.length ? importQueue[0] : mainQueue[0];
-  }
-
-  function whenReady(callback) {
-    queue.waitToReady = true;
-    Polymer.endOfMicrotask(function() {
-      HTMLImports.whenReady(function() {
-        queue.addReadyCallback(callback);
-        queue.waitToReady = false;
-        queue.check();
-    });
-    });
-  }
-
-  /**
-    Forces polymer to register any pending elements. Can be used to abort
-    waiting for elements that are partially defined.
-    @param timeout {Integer} Optional timeout in milliseconds
-  */
-  function forceReady(timeout) {
-    if (timeout === undefined) {
-      queue.ready();
-      return;
-    }
-    var handle = setTimeout(function() {
-      queue.ready();
-    }, timeout);
-    Polymer.whenReady(function() {
-      clearTimeout(handle);
-    });
-  }
-
-  // exports
-  scope.elements = elements;
-  scope.waitingFor = queue.waitingFor.bind(queue);
-  scope.forceReady = forceReady;
-  scope.queue = queue;
-  scope.whenReady = scope.whenPolymerReady = whenReady;
-})(Polymer);
-
-(function(scope) {
-
-  // imports
-
-  var extend = scope.extend;
-  var api = scope.api;
-  var queue = scope.queue;
-  var whenReady = scope.whenReady;
-  var getRegisteredPrototype = scope.getRegisteredPrototype;
-  var waitingForPrototype = scope.waitingForPrototype;
-
-  // declarative implementation: <polymer-element>
-
-  var prototype = extend(Object.create(HTMLElement.prototype), {
-
-    createdCallback: function() {
-      if (this.getAttribute('name')) {
-        this.init();
-      }
-    },
-
-    init: function() {
-      // fetch declared values
-      this.name = this.getAttribute('name');
-      this.extends = this.getAttribute('extends');
-      queue.wait(this);
-      // initiate any async resource fetches
-      this.loadResources();
-      // register when all constraints are met
-      this.registerWhenReady();
-    },
-
-    // TODO(sorvell): we currently queue in the order the prototypes are 
-    // registered, but we should queue in the order that polymer-elements
-    // are registered. We are currently blocked from doing this based on 
-    // crbug.com/395686.
-    registerWhenReady: function() {
-     if (this.registered
-       || this.waitingForPrototype(this.name)
-       || this.waitingForQueue()
-       || this.waitingForResources()) {
-          return;
-      }
-      queue.go(this);
-    },
-
-    _register: function() {
-      //console.log('registering', this.name);
-      // warn if extending from a custom element not registered via Polymer
-      if (isCustomTag(this.extends) && !isRegistered(this.extends)) {
-        console.warn('%s is attempting to extend %s, an unregistered element ' +
-            'or one that was not registered with Polymer.', this.name,
-            this.extends);
-      }
-      this.register(this.name, this.extends);
-      this.registered = true;
-    },
-
-    waitingForPrototype: function(name) {
-      if (!getRegisteredPrototype(name)) {
-        // then wait for a prototype
-        waitingForPrototype(name, this);
-        // emulate script if user is not supplying one
-        this.handleNoScript(name);
-        // prototype not ready yet
-        return true;
-      }
-    },
-
-    handleNoScript: function(name) {
-      // if explicitly marked as 'noscript'
-      if (this.hasAttribute('noscript') && !this.noscript) {
-        this.noscript = true;
-        // imperative element registration
-        Polymer(name);
-      }
-    },
-
-    waitingForResources: function() {
-      return this._needsResources;
-    },
-
-    // NOTE: Elements must be queued in proper order for inheritance/composition
-    // dependency resolution. Previously this was enforced for inheritance,
-    // and by rule for composition. It's now entirely by rule.
-    waitingForQueue: function() {
-      return queue.enqueue(this, this.registerWhenReady, this._register);
-    },
-
-    loadResources: function() {
-      this._needsResources = true;
-      this.loadStyles(function() {
-        this._needsResources = false;
-        this.registerWhenReady();
-      }.bind(this));
-    }
-
-  });
-
-  // semi-pluggable APIs 
-
-  // TODO(sjmiles): should be fully pluggable (aka decoupled, currently
-  // the various plugins are allowed to depend on each other directly)
-  api.publish(api.declaration, prototype);
-
-  // utility and bookkeeping
-
-  function isRegistered(name) {
-    return Boolean(HTMLElement.getPrototypeForTag(name));
-  }
-
-  function isCustomTag(name) {
-    return (name && name.indexOf('-') >= 0);
-  }
-
-  // boot tasks
-
-  whenReady(function() {
-    document.body.removeAttribute('unresolved');
-    document.dispatchEvent(
-      new CustomEvent('polymer-ready', {bubbles: true})
-    );
-  });
-
-  // register polymer-element with document
-
-  document.registerElement('polymer-element', {prototype: prototype});
-
-})(Polymer);
-
-(function(scope) {
-
-/**
- * @class Polymer
- */
-
-var whenReady = scope.whenReady;
-
-/**
- * Loads the set of HTMLImports contained in `node`. Notifies when all
- * the imports have loaded by calling the `callback` function argument.
- * This method can be used to lazily load imports. For example, given a 
- * template:
- *     
- *     <template>
- *       <link rel="import" href="my-import1.html">
- *       <link rel="import" href="my-import2.html">
- *     </template>
- *
- *     Polymer.importElements(template.content, function() {
- *       console.log('imports lazily loaded'); 
- *     });
- * 
- * @method importElements
- * @param {Node} node Node containing the HTMLImports to load.
- * @param {Function} callback Callback called when all imports have loaded.
- */
-function importElements(node, callback) {
-  if (node) {
-    document.head.appendChild(node);
-    whenReady(callback);
-  } else if (callback) {
-    callback();
-  }
-}
-
-/**
- * Loads an HTMLImport for each url specified in the `urls` array.
- * Notifies when all the imports have loaded by calling the `callback` 
- * function argument. This method can be used to lazily load imports. 
- * For example,
- *
- *     Polymer.import(['my-import1.html', 'my-import2.html'], function() {
- *       console.log('imports lazily loaded'); 
- *     });
- * 
- * @method import
- * @param {Array} urls Array of urls to load as HTMLImports.
- * @param {Function} callback Callback called when all imports have loaded.
- */
-function _import(urls, callback) {
-  if (urls && urls.length) {
-      var frag = document.createDocumentFragment();
-      for (var i=0, l=urls.length, url, link; (i<l) && (url=urls[i]); i++) {
-        link = document.createElement('link');
-        link.rel = 'import';
-        link.href = url;
-        frag.appendChild(link);
-      }
-      importElements(frag, callback);
-  } else if (callback) {
-    callback();
-  }
-}
-
-// exports
-scope.import = _import;
-scope.importElements = importElements;
-
-})(Polymer);
-
-/**
- * The `auto-binding` element extends the template element. It provides a quick 
- * and easy way to do data binding without the need to setup a model. 
- * The `auto-binding` element itself serves as the model and controller for the 
- * elements it contains. Both data and event handlers can be bound. 
- *
- * The `auto-binding` element acts just like a template that is bound to 
- * a model. It stamps its content in the dom adjacent to itself. When the 
- * content is stamped, the `template-bound` event is fired.
- *
- * Example:
- *
- *     <template is="auto-binding">
- *       <div>Say something: <input value="{{value}}"></div>
- *       <div>You said: {{value}}</div>
- *       <button on-tap="{{buttonTap}}">Tap me!</button>
- *     </template>
- *     <script>
- *       var template = document.querySelector('template');
- *       template.value = 'something';
- *       template.buttonTap = function() {
- *         console.log('tap!');
- *       };
- *     </script>
- *
- * @module Polymer
- * @status stable
-*/
-
-(function() {
-
-  var element = document.createElement('polymer-element');
-  element.setAttribute('name', 'auto-binding');
-  element.setAttribute('extends', 'template');
-  element.init();
-
-  Polymer('auto-binding', {
-
-    createdCallback: function() {
-      this.syntax = this.bindingDelegate = this.makeSyntax();
-      // delay stamping until polymer-ready so that auto-binding is not
-      // required to load last.
-      Polymer.whenPolymerReady(function() {
-        this.model = this;
-        this.setAttribute('bind', '');
-        // we don't bother with an explicit signal here, we could ust a MO
-        // if necessary
-        this.async(function() {
-          // note: this will marshall *all* the elements in the parentNode
-          // rather than just stamped ones. We'd need to use createInstance
-          // to fix this or something else fancier.
-          this.marshalNodeReferences(this.parentNode);
-          // template stamping is asynchronous so stamping isn't complete
-          // by polymer-ready; fire an event so users can use stamped elements
-          this.fire('template-bound');
-        });
-      }.bind(this));
-    },
-
-    makeSyntax: function() {
-      var events = Object.create(Polymer.api.declaration.events);
-      var self = this;
-      events.findController = function() { return self.model; };
-
-      var syntax = new PolymerExpressions();
-      var prepareBinding = syntax.prepareBinding;  
-      syntax.prepareBinding = function(pathString, name, node) {
-        return events.prepareEventBinding(pathString, name, node) ||
-               prepareBinding.call(syntax, pathString, name, node);
-      };
-      return syntax;
-    }
-
-  });
-
-})();
diff --git a/packages/polymer_interop/lib/src/js/polymer.min.js b/packages/polymer_interop/lib/src/js/polymer.min.js
deleted file mode 100644
index dcd0bd6..0000000
--- a/packages/polymer_interop/lib/src/js/polymer.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * @license
- * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
- */
-// @version 0.5.5
-window.PolymerGestures={},function(a){var b=!1,c=document.createElement("meta");if(c.createShadowRoot){var d=c.createShadowRoot(),e=document.createElement("span");d.appendChild(e),c.addEventListener("testpath",function(a){a.path&&(b=a.path[0]===e),a.stopPropagation()});var f=new CustomEvent("testpath",{bubbles:!0});document.head.appendChild(c),e.dispatchEvent(f),c.parentNode.removeChild(c),d=e=null}c=null;var g={shadow:function(a){return a?a.shadowRoot||a.webkitShadowRoot:void 0},canTarget:function(a){return a&&Boolean(a.elementFromPoint)},targetingShadow:function(a){var b=this.shadow(a);return this.canTarget(b)?b:void 0},olderShadow:function(a){var b=a.olderShadowRoot;if(!b){var c=a.querySelector("shadow");c&&(b=c.olderShadowRoot)}return b},allShadows:function(a){for(var b=[],c=this.shadow(a);c;)b.push(c),c=this.olderShadow(c);return b},searchRoot:function(a,b,c){var d,e;return a?(d=a.elementFromPoint(b,c),d?e=this.targetingShadow(d):a!==document&&(e=this.olderShadow(a)),this.searchRoot(e,b,c)||d):void 0},owner:function(a){if(!a)return document;for(var b=a;b.parentNode;)b=b.parentNode;return b.nodeType!=Node.DOCUMENT_NODE&&b.nodeType!=Node.DOCUMENT_FRAGMENT_NODE&&(b=document),b},findTarget:function(a){if(b&&a.path&&a.path.length)return a.path[0];var c=a.clientX,d=a.clientY,e=this.owner(a.target);return e.elementFromPoint(c,d)||(e=document),this.searchRoot(e,c,d)},findTouchAction:function(a){var c;if(b&&a.path&&a.path.length){for(var d=a.path,e=0;e<d.length;e++)if(c=d[e],c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action")}else for(c=a.target;c;){if(c.nodeType===Node.ELEMENT_NODE&&c.hasAttribute("touch-action"))return c.getAttribute("touch-action");c=c.parentNode||c.host}return"auto"},LCA:function(a,b){if(a===b)return a;if(a&&!b)return a;if(b&&!a)return b;if(!b&&!a)return document;if(a.contains&&a.contains(b))return a;if(b.contains&&b.contains(a))return b;var c=this.depth(a),d=this.depth(b),e=c-d;for(e>=0?a=this.walk(a,e):b=this.walk(b,-e);a&&b&&a!==b;)a=a.parentNode||a.host,b=b.parentNode||b.host;return a},walk:function(a,b){for(var c=0;a&&b>c;c++)a=a.parentNode||a.host;return a},depth:function(a){for(var b=0;a;)b++,a=a.parentNode||a.host;return b},deepContains:function(a,b){var c=this.LCA(a,b);return c===a},insideNode:function(a,b,c){var d=a.getBoundingClientRect();return d.left<=b&&b<=d.right&&d.top<=c&&c<=d.bottom},path:function(a){var c;if(b&&a.path&&a.path.length)c=a.path;else{c=[];for(var d=this.findTarget(a);d;)c.push(d),d=d.parentNode||d.host}return c}};a.targetFinding=g,a.findTarget=g.findTarget.bind(g),a.deepContains=g.deepContains.bind(g),a.insideNode=g.insideNode}(window.PolymerGestures),function(){function a(a){return"html /deep/ "+b(a)}function b(a){return'[touch-action="'+a+'"]'}function c(a){return"{ -ms-touch-action: "+a+"; touch-action: "+a+";}"}var d=["none","auto","pan-x","pan-y",{rule:"pan-x pan-y",selectors:["pan-x pan-y","pan-y pan-x"]},"manipulation"],e="",f="string"==typeof document.head.style.touchAction,g=!window.ShadowDOMPolyfill&&document.head.createShadowRoot;if(f){d.forEach(function(d){String(d)===d?(e+=b(d)+c(d)+"\n",g&&(e+=a(d)+c(d)+"\n")):(e+=d.selectors.map(b)+c(d.rule)+"\n",g&&(e+=d.selectors.map(a)+c(d.rule)+"\n"))});var h=document.createElement("style");h.textContent=e,document.head.appendChild(h)}}(),function(a){var b=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pageX","pageY"],c=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0],d=function(){return function(){}},e={preventTap:d,makeBaseEvent:function(a,b){var c=document.createEvent("Event");return c.initEvent(a,b.bubbles||!1,b.cancelable||!1),c.preventTap=e.preventTap(c),c},makeGestureEvent:function(a,b){b=b||Object.create(null);for(var c,d=this.makeBaseEvent(a,b),e=0,f=Object.keys(b);e<f.length;e++)c=f[e],"bubbles"!==c&&"cancelable"!==c&&(d[c]=b[c]);return d},makePointerEvent:function(a,d){d=d||Object.create(null);for(var e,f=this.makeBaseEvent(a,d),g=2;g<b.length;g++)e=b[g],f[e]=d[e]||c[g];f.buttons=d.buttons||0;var h=0;return h=d.pressure?d.pressure:f.buttons?.5:0,f.x=f.clientX,f.y=f.clientY,f.pointerId=d.pointerId||0,f.width=d.width||0,f.height=d.height||0,f.pressure=h,f.tiltX=d.tiltX||0,f.tiltY=d.tiltY||0,f.pointerType=d.pointerType||"",f.hwTimestamp=d.hwTimestamp||0,f.isPrimary=d.isPrimary||!1,f._source=d._source||"",f}};a.eventFactory=e}(window.PolymerGestures),function(a){function b(){if(c){var a=new Map;return a.pointers=d,a}this.keys=[],this.values=[]}var c=window.Map&&window.Map.prototype.forEach,d=function(){return this.size};b.prototype={set:function(a,b){var c=this.keys.indexOf(a);c>-1?this.values[c]=b:(this.keys.push(a),this.values.push(b))},has:function(a){return this.keys.indexOf(a)>-1},"delete":function(a){var b=this.keys.indexOf(a);b>-1&&(this.keys.splice(b,1),this.values.splice(b,1))},get:function(a){var b=this.keys.indexOf(a);return this.values[b]},clear:function(){this.keys.length=0,this.values.length=0},forEach:function(a,b){this.values.forEach(function(c,d){a.call(b,c,this.keys[d],this)},this)},pointers:function(){return this.keys.length}},a.PointerMap=b}(window.PolymerGestures),function(a){var b,c=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","buttons","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","type","target","currentTarget","which","pageX","pageY","timeStamp","preventTap","tapPrevented","_source"],d=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,"",null,null,0,0,0,0,function(){},!1],e="undefined"!=typeof SVGElementInstance,f=a.eventFactory,g={IS_IOS:!1,pointermap:new a.PointerMap,requiredGestures:new a.PointerMap,eventMap:Object.create(null),eventSources:Object.create(null),eventSourceList:[],gestures:[],dependencyMap:{down:{listeners:0,index:-1},up:{listeners:0,index:-1}},gestureQueue:[],registerSource:function(a,b){var c=b,d=c.events;d&&(d.forEach(function(a){c[a]&&(this.eventMap[a]=c[a].bind(c))},this),this.eventSources[a]=c,this.eventSourceList.push(c))},registerGesture:function(a,b){var c=Object.create(null);c.listeners=0,c.index=this.gestures.length;for(var d,e=0;e<b.exposes.length;e++)d=b.exposes[e].toLowerCase(),this.dependencyMap[d]=c;this.gestures.push(b)},register:function(a,b){for(var c,d=this.eventSourceList.length,e=0;d>e&&(c=this.eventSourceList[e]);e++)c.register.call(c,a,b)},unregister:function(a){for(var b,c=this.eventSourceList.length,d=0;c>d&&(b=this.eventSourceList[d]);d++)b.unregister.call(b,a)},down:function(a){this.requiredGestures.set(a.pointerId,b),this.fireEvent("down",a)},move:function(a){a.type="move",this.fillGestureQueue(a)},up:function(a){this.fireEvent("up",a),this.requiredGestures["delete"](a.pointerId)},cancel:function(a){a.tapPrevented=!0,this.fireEvent("up",a),this.requiredGestures["delete"](a.pointerId)},addGestureDependency:function(a,b){var c=a._pgEvents;if(c&&b)for(var d,e,f,g=Object.keys(c),h=0;h<g.length;h++)f=g[h],c[f]>0&&(d=this.dependencyMap[f],e=d?d.index:-1,b[e]=!0)},eventHandler:function(c){var d=c.type;if("touchstart"===d||"mousedown"===d||"pointerdown"===d||"MSPointerDown"===d)if(c._handledByPG||(b={}),this.IS_IOS){var e=c;if("touchstart"===d){var f=c.changedTouches[0];e={target:c.target,clientX:f.clientX,clientY:f.clientY,path:c.path}}for(var g,h=c.path||a.targetFinding.path(e),i=0;i<h.length;i++)g=h[i],this.addGestureDependency(g,b)}else this.addGestureDependency(c.currentTarget,b);if(!c._handledByPG){var j=this.eventMap&&this.eventMap[d];j&&j(c),c._handledByPG=!0}},listen:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.addEvent(a,c)},unlisten:function(a,b){for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.removeEvent(a,c)},addEvent:function(a,b){a.addEventListener(b,this.boundHandler)},removeEvent:function(a,b){a.removeEventListener(b,this.boundHandler)},makeEvent:function(a,b){var c=f.makePointerEvent(a,b);return c.preventDefault=b.preventDefault,c.tapPrevented=b.tapPrevented,c._target=c._target||b.target,c},fireEvent:function(a,b){var c=this.makeEvent(a,b);return this.dispatchEvent(c)},cloneEvent:function(a){for(var b,f=Object.create(null),g=0;g<c.length;g++)b=c[g],f[b]=a[b]||d[g],("target"===b||"relatedTarget"===b)&&e&&f[b]instanceof SVGElementInstance&&(f[b]=f[b].correspondingUseElement);return f.preventDefault=function(){a.preventDefault()},f},dispatchEvent:function(a){var b=a._target;if(b){b.dispatchEvent(a);var c=this.cloneEvent(a);c.target=b,this.fillGestureQueue(c)}},gestureTrigger:function(){for(var a,b,c=0;c<this.gestureQueue.length;c++)if(a=this.gestureQueue[c],b=a._requiredGestures)for(var d,e,f=0;f<this.gestures.length;f++)b[f]&&(d=this.gestures[f],e=d[a.type],e&&e.call(d,a));this.gestureQueue.length=0},fillGestureQueue:function(a){this.gestureQueue.length||requestAnimationFrame(this.boundGestureTrigger),a._requiredGestures=this.requiredGestures.get(a.pointerId),this.gestureQueue.push(a)}};g.boundHandler=g.eventHandler.bind(g),g.boundGestureTrigger=g.gestureTrigger.bind(g),a.dispatcher=g,a.activateGesture=function(a,b){var c=b.toLowerCase(),d=g.dependencyMap[c];if(d){var e=g.gestures[d.index];if(a._pgListeners||(g.register(a),a._pgListeners=0),e){var f,h=e.defaultActions&&e.defaultActions[c];switch(a.nodeType){case Node.ELEMENT_NODE:f=a;break;case Node.DOCUMENT_FRAGMENT_NODE:f=a.host;break;default:f=null}h&&f&&!f.hasAttribute("touch-action")&&f.setAttribute("touch-action",h)}a._pgEvents||(a._pgEvents={}),a._pgEvents[c]=(a._pgEvents[c]||0)+1,a._pgListeners++}return Boolean(d)},a.addEventListener=function(b,c,d,e){d&&(a.activateGesture(b,c),b.addEventListener(c,d,e))},a.deactivateGesture=function(a,b){var c=b.toLowerCase(),d=g.dependencyMap[c];return d&&(a._pgListeners>0&&a._pgListeners--,0===a._pgListeners&&g.unregister(a),a._pgEvents&&(a._pgEvents[c]>0?a._pgEvents[c]--:a._pgEvents[c]=0)),Boolean(d)},a.removeEventListener=function(b,c,d,e){d&&(a.deactivateGesture(b,c),b.removeEventListener(c,d,e))}}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d=25,e=[0,1,4,2],f=0,g=/Linux.*Firefox\//i,h=function(){if(g.test(navigator.userAgent))return!1;try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(a){return!1}}(),i={POINTER_ID:1,POINTER_TYPE:"mouse",events:["mousedown","mousemove","mouseup"],exposes:["down","up","move"],register:function(a){b.listen(a,this.events)},unregister:function(a){a.nodeType!==Node.DOCUMENT_NODE&&b.unlisten(a,this.events)},lastTouches:[],isEventSimulatedFromTouch:function(a){for(var b,c=this.lastTouches,e=a.clientX,f=a.clientY,g=0,h=c.length;h>g&&(b=c[g]);g++){var i=Math.abs(e-b.x),j=Math.abs(f-b.y);if(d>=i&&d>=j)return!0}},prepareEvent:function(a){var c=b.cloneEvent(a);if(c.pointerId=this.POINTER_ID,c.isPrimary=!0,c.pointerType=this.POINTER_TYPE,c._source="mouse",!h){var d=a.type,g=e[a.which]||0;"mousedown"===d?f|=g:"mouseup"===d&&(f&=~g),c.buttons=f}return c},mousedown:function(d){if(!this.isEventSimulatedFromTouch(d)){var e=(c.has(this.POINTER_ID),this.prepareEvent(d));e.target=a.findTarget(d),c.set(this.POINTER_ID,e.target),b.down(e)}},mousemove:function(a){if(!this.isEventSimulatedFromTouch(a)){var d=c.get(this.POINTER_ID);if(d){var e=this.prepareEvent(a);e.target=d,0===(h?e.buttons:e.which)?(h||(f=e.buttons=0),b.cancel(e),this.cleanupMouse(e.buttons)):b.move(e)}}},mouseup:function(d){if(!this.isEventSimulatedFromTouch(d)){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(this.POINTER_ID),b.up(e),this.cleanupMouse(e.buttons)}},cleanupMouse:function(a){0===a&&c["delete"](this.POINTER_ID)}};a.mouseEvents=i}(window.PolymerGestures),function(a){var b=a.dispatcher,c=(a.targetFinding.allShadows.bind(a.targetFinding),b.pointermap),d=(Array.prototype.map.call.bind(Array.prototype.map),2500),e=25,f=200,g=20,h=!1,i={IS_IOS:!1,events:["touchstart","touchmove","touchend","touchcancel"],exposes:["down","up","move"],register:function(a,c){(this.IS_IOS?c:!c)&&b.listen(a,this.events)},unregister:function(a){this.IS_IOS||b.unlisten(a,this.events)},scrollTypes:{EMITTER:"none",XSCROLLER:"pan-x",YSCROLLER:"pan-y"},touchActionToScrollType:function(a){var b=a,c=this.scrollTypes;return b===c.EMITTER?"none":b===c.XSCROLLER?"X":b===c.YSCROLLER?"Y":"XY"},POINTER_TYPE:"touch",firstTouch:null,isPrimaryTouch:function(a){return this.firstTouch===a.identifier},setPrimaryTouch:function(a){(0===c.pointers()||1===c.pointers()&&c.has(1))&&(this.firstTouch=a.identifier,this.firstXY={X:a.clientX,Y:a.clientY},this.firstTarget=a.target,this.scrolling=null,this.cancelResetClickCount())},removePrimaryPointer:function(a){a.isPrimary&&(this.firstTouch=null,this.firstXY=null,this.resetClickCount())},clickCount:0,resetId:null,resetClickCount:function(){var a=function(){this.clickCount=0,this.resetId=null}.bind(this);this.resetId=setTimeout(a,f)},cancelResetClickCount:function(){this.resetId&&clearTimeout(this.resetId)},typeToButtons:function(a){var b=0;return("touchstart"===a||"touchmove"===a)&&(b=1),b},findTarget:function(b,d){if("touchstart"===this.currentTouchEvent.type){if(this.isPrimaryTouch(b)){var e={clientX:b.clientX,clientY:b.clientY,path:this.currentTouchEvent.path,target:this.currentTouchEvent.target};return a.findTarget(e)}return a.findTarget(b)}return c.get(d)},touchToPointer:function(a){var c=this.currentTouchEvent,d=b.cloneEvent(a),e=d.pointerId=a.identifier+2;d.target=this.findTarget(a,e),d.bubbles=!0,d.cancelable=!0,d.detail=this.clickCount,d.buttons=this.typeToButtons(c.type),d.width=a.webkitRadiusX||a.radiusX||0,d.height=a.webkitRadiusY||a.radiusY||0,d.pressure=a.webkitForce||a.force||.5,d.isPrimary=this.isPrimaryTouch(a),d.pointerType=this.POINTER_TYPE,d._source="touch";var f=this;return d.preventDefault=function(){f.scrolling=!1,f.firstXY=null,c.preventDefault()},d},processTouches:function(a,b){var d=a.changedTouches;this.currentTouchEvent=a;for(var e,f,g=0;g<d.length;g++)e=d[g],f=this.touchToPointer(e),"touchstart"===a.type&&c.set(f.pointerId,f.target),c.has(f.pointerId)&&b.call(this,f),("touchend"===a.type||a._cancel)&&this.cleanUpPointer(f)},shouldScroll:function(b){if(this.firstXY){var c,d=a.targetFinding.findTouchAction(b),e=this.touchActionToScrollType(d);if("none"===e)c=!1;else if("XY"===e)c=!0;else{var f=b.changedTouches[0],g=e,h="Y"===e?"X":"Y",i=Math.abs(f["client"+g]-this.firstXY[g]),j=Math.abs(f["client"+h]-this.firstXY[h]);c=i>=j}return c}},findTouch:function(a,b){for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)if(c.identifier===b)return!0},vacuumTouches:function(a){var b=a.touches;if(c.pointers()>=b.length){var d=[];c.forEach(function(a,c){if(1!==c&&!this.findTouch(b,c-2)){var e=a;d.push(e)}},this),d.forEach(function(a){this.cancel(a),c["delete"](a.pointerId)},this)}},touchstart:function(a){this.vacuumTouches(a),this.setPrimaryTouch(a.changedTouches[0]),this.dedupSynthMouse(a),this.scrolling||(this.clickCount++,this.processTouches(a,this.down))},down:function(a){b.down(a)},touchmove:function(a){if(h)a.cancelable&&this.processTouches(a,this.move);else if(this.scrolling){if(this.firstXY){var b=a.changedTouches[0],c=b.clientX-this.firstXY.X,d=b.clientY-this.firstXY.Y,e=Math.sqrt(c*c+d*d);e>=g&&(this.touchcancel(a),this.scrolling=!0,this.firstXY=null)}}else null===this.scrolling&&this.shouldScroll(a)?this.scrolling=!0:(this.scrolling=!1,a.preventDefault(),this.processTouches(a,this.move))},move:function(a){b.move(a)},touchend:function(a){this.dedupSynthMouse(a),this.processTouches(a,this.up)},up:function(c){c.relatedTarget=a.findTarget(c),b.up(c)},cancel:function(a){b.cancel(a)},touchcancel:function(a){a._cancel=!0,this.processTouches(a,this.cancel)},cleanUpPointer:function(a){c["delete"](a.pointerId),this.removePrimaryPointer(a)},dedupSynthMouse:function(b){var c=a.mouseEvents.lastTouches,e=b.changedTouches[0];if(this.isPrimaryTouch(e)){var f={x:e.clientX,y:e.clientY};c.push(f);var g=function(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}.bind(null,c,f);setTimeout(g,d)}}},j=Event.prototype.stopImmediatePropagation||Event.prototype.stopPropagation;document.addEventListener("click",function(b){var c=b.clientX,d=b.clientY,f=function(a){var b=Math.abs(c-a.x),f=Math.abs(d-a.y);return e>=b&&e>=f},g=a.mouseEvents.lastTouches.some(f),h=a.targetFinding.path(b);if(g){for(var k=0;k<h.length;k++)if(h[k]===i.firstTarget)return;b.preventDefault(),j.call(b)}},!0),a.touchEvents=i}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d=window.MSPointerEvent&&"number"==typeof window.MSPointerEvent.MSPOINTER_TYPE_MOUSE,e={events:["MSPointerDown","MSPointerMove","MSPointerUp","MSPointerCancel"],register:function(a){b.listen(a,this.events)},unregister:function(a){a.nodeType!==Node.DOCUMENT_NODE&&b.unlisten(a,this.events)},POINTER_TYPES:["","unavailable","touch","pen","mouse"],prepareEvent:function(a){var c=a;return c=b.cloneEvent(a),d&&(c.pointerType=this.POINTER_TYPES[a.pointerType]),c._source="ms",c},cleanup:function(a){c["delete"](a)},MSPointerDown:function(d){var e=this.prepareEvent(d);e.target=a.findTarget(d),c.set(d.pointerId,e.target),b.down(e)},MSPointerMove:function(a){var d=c.get(a.pointerId);if(d){var e=this.prepareEvent(a);e.target=d,b.move(e)}},MSPointerUp:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.up(e),this.cleanup(d.pointerId)},MSPointerCancel:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.cancel(e),this.cleanup(d.pointerId)}};a.msEvents=e}(window.PolymerGestures),function(a){var b=a.dispatcher,c=b.pointermap,d={events:["pointerdown","pointermove","pointerup","pointercancel"],prepareEvent:function(a){var c=b.cloneEvent(a);return c._source="pointer",c},register:function(a){b.listen(a,this.events)},unregister:function(a){a.nodeType!==Node.DOCUMENT_NODE&&b.unlisten(a,this.events)},cleanup:function(a){c["delete"](a)},pointerdown:function(d){var e=this.prepareEvent(d);e.target=a.findTarget(d),c.set(e.pointerId,e.target),b.down(e)},pointermove:function(a){var d=c.get(a.pointerId);if(d){var e=this.prepareEvent(a);e.target=d,b.move(e)}},pointerup:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.up(e),this.cleanup(d.pointerId)},pointercancel:function(d){var e=this.prepareEvent(d);e.relatedTarget=a.findTarget(d),e.target=c.get(e.pointerId),b.cancel(e),this.cleanup(d.pointerId)}};a.pointerEvents=d}(window.PolymerGestures),function(a){var b=a.dispatcher,c=window.navigator;window.PointerEvent?b.registerSource("pointer",a.pointerEvents):c.msPointerEnabled?b.registerSource("ms",a.msEvents):(b.registerSource("mouse",a.mouseEvents),void 0!==window.ontouchstart&&b.registerSource("touch",a.touchEvents));var d=navigator.userAgent,e=d.match(/iPad|iPhone|iPod/)&&"ontouchstart"in window;b.IS_IOS=e,a.touchEvents.IS_IOS=e,b.register(document,!0)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e={events:["down","move","up"],exposes:["trackstart","track","trackx","tracky","trackend"],defaultActions:{track:"none",trackx:"pan-y",tracky:"pan-x"},WIGGLE_THRESHOLD:4,clampDir:function(a){return a>0?1:-1},calcPositionDelta:function(a,b){var c=0,d=0;return a&&b&&(c=b.pageX-a.pageX,d=b.pageY-a.pageY),{x:c,y:d}},fireTrack:function(a,b,d){var e=d,f=this.calcPositionDelta(e.downEvent,b),g=this.calcPositionDelta(e.lastMoveEvent,b);if(g.x)e.xDirection=this.clampDir(g.x);else if("trackx"===a)return;if(g.y)e.yDirection=this.clampDir(g.y);else if("tracky"===a)return;var h={bubbles:!0,cancelable:!0,trackInfo:e.trackInfo,relatedTarget:b.relatedTarget,pointerType:b.pointerType,pointerId:b.pointerId,_source:"track"};"tracky"!==a&&(h.x=b.x,h.dx=f.x,h.ddx=g.x,h.clientX=b.clientX,h.pageX=b.pageX,h.screenX=b.screenX,h.xDirection=e.xDirection),"trackx"!==a&&(h.dy=f.y,h.ddy=g.y,h.y=b.y,h.clientY=b.clientY,h.pageY=b.pageY,h.screenY=b.screenY,h.yDirection=e.yDirection);var i=c.makeGestureEvent(a,h);e.downTarget.dispatchEvent(i)},down:function(a){if(a.isPrimary&&("mouse"===a.pointerType?1===a.buttons:!0)){var b={downEvent:a,downTarget:a.target,trackInfo:{},lastMoveEvent:null,xDirection:0,yDirection:0,tracking:!1};d.set(a.pointerId,b)}},move:function(a){var b=d.get(a.pointerId);if(b){if(!b.tracking){var c=this.calcPositionDelta(b.downEvent,a),e=c.x*c.x+c.y*c.y;e>this.WIGGLE_THRESHOLD&&(b.tracking=!0,b.lastMoveEvent=b.downEvent,this.fireTrack("trackstart",a,b))}b.tracking&&(this.fireTrack("track",a,b),this.fireTrack("trackx",a,b),this.fireTrack("tracky",a,b)),b.lastMoveEvent=a}},up:function(a){var b=d.get(a.pointerId);b&&(b.tracking&&this.fireTrack("trackend",a,b),d["delete"](a.pointerId))}};b.registerGesture("track",e)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d={HOLD_DELAY:200,WIGGLE_THRESHOLD:16,events:["down","move","up"],exposes:["hold","holdpulse","release"],heldPointer:null,holdJob:null,pulse:function(){var a=Date.now()-this.heldPointer.timeStamp,b=this.held?"holdpulse":"hold";this.fireHold(b,a),this.held=!0},cancel:function(){clearInterval(this.holdJob),this.held&&this.fireHold("release"),this.held=!1,this.heldPointer=null,this.target=null,this.holdJob=null},down:function(a){a.isPrimary&&!this.heldPointer&&(this.heldPointer=a,this.target=a.target,this.holdJob=setInterval(this.pulse.bind(this),this.HOLD_DELAY))},up:function(a){this.heldPointer&&this.heldPointer.pointerId===a.pointerId&&this.cancel()},move:function(a){if(this.heldPointer&&this.heldPointer.pointerId===a.pointerId){var b=a.clientX-this.heldPointer.clientX,c=a.clientY-this.heldPointer.clientY;b*b+c*c>this.WIGGLE_THRESHOLD&&this.cancel()}},fireHold:function(a,b){var d={bubbles:!0,cancelable:!0,pointerType:this.heldPointer.pointerType,pointerId:this.heldPointer.pointerId,x:this.heldPointer.clientX,y:this.heldPointer.clientY,_source:"hold"};b&&(d.holdTime=b);var e=c.makeGestureEvent(a,d);this.target.dispatchEvent(e)}};b.registerGesture("hold",d)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e={events:["down","up"],exposes:["tap"],down:function(a){a.isPrimary&&!a.tapPrevented&&d.set(a.pointerId,{target:a.target,buttons:a.buttons,x:a.clientX,y:a.clientY})},shouldTap:function(a,b){var c=!0;return"mouse"===a.pointerType&&(c=1^a.buttons&&1&b.buttons),c&&!a.tapPrevented},up:function(b){var e=d.get(b.pointerId);if(e&&this.shouldTap(b,e)){var f=a.targetFinding.LCA(e.target,b.relatedTarget);if(f){var g=c.makeGestureEvent("tap",{bubbles:!0,cancelable:!0,x:b.clientX,y:b.clientY,detail:b.detail,pointerType:b.pointerType,pointerId:b.pointerId,altKey:b.altKey,ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey,_source:"tap"});f.dispatchEvent(g)}}d["delete"](b.pointerId)}};c.preventTap=function(a){return function(){a.tapPrevented=!0,d["delete"](a.pointerId)}},b.registerGesture("tap",e)}(window.PolymerGestures),function(a){var b=a.dispatcher,c=a.eventFactory,d=new a.PointerMap,e=180/Math.PI,f={events:["down","up","move","cancel"],exposes:["pinchstart","pinch","pinchend","rotate"],defaultActions:{pinch:"none",rotate:"none"},reference:{},down:function(b){if(d.set(b.pointerId,b),2==d.pointers()){var c=this.calcChord(),e=this.calcAngle(c);this.reference={angle:e,diameter:c.diameter,target:a.targetFinding.LCA(c.a.target,c.b.target)},this.firePinch("pinchstart",c.diameter,c)}},up:function(a){var b=d.get(a.pointerId),c=d.pointers();if(b){if(2===c){var e=this.calcChord();this.firePinch("pinchend",e.diameter,e)}d["delete"](a.pointerId)}},move:function(a){d.has(a.pointerId)&&(d.set(a.pointerId,a),d.pointers()>1&&this.calcPinchRotate())},cancel:function(a){this.up(a)},firePinch:function(a,b,d){var e=b/this.reference.diameter,f=c.makeGestureEvent(a,{bubbles:!0,cancelable:!0,scale:e,centerX:d.center.x,centerY:d.center.y,_source:"pinch"});this.reference.target.dispatchEvent(f)},fireRotate:function(a,b){var d=Math.round((a-this.reference.angle)%360),e=c.makeGestureEvent("rotate",{bubbles:!0,cancelable:!0,angle:d,centerX:b.center.x,centerY:b.center.y,_source:"pinch"});this.reference.target.dispatchEvent(e)},calcPinchRotate:function(){var a=this.calcChord(),b=a.diameter,c=this.calcAngle(a);b!=this.reference.diameter&&this.firePinch("pinch",b,a),c!=this.reference.angle&&this.fireRotate(c,a)},calcChord:function(){var a=[];d.forEach(function(b){a.push(b)});for(var b,c,e,f=0,g={a:a[0],b:a[1]},h=0;h<a.length;h++)for(var i=a[h],j=h+1;j<a.length;j++){var k=a[j];b=Math.abs(i.clientX-k.clientX),c=Math.abs(i.clientY-k.clientY),e=b+c,e>f&&(f=e,g={a:i,b:k})}return b=Math.abs(g.a.clientX+g.b.clientX)/2,c=Math.abs(g.a.clientY+g.b.clientY)/2,g.center={x:b,y:c},g.diameter=f,g},calcAngle:function(a){var b=a.a.clientX-a.b.clientX,c=a.a.clientY-a.b.clientY;return(360+Math.atan2(c,b)*e)%360}};b.registerGesture("pinch",f)}(window.PolymerGestures),function(a){"use strict";function b(a,b){if(!a)throw new Error("ASSERT: "+b)}function c(a){return a>=48&&57>=a}function d(a){return 32===a||9===a||11===a||12===a||160===a||a>=5760&&" ᠎              ".indexOf(String.fromCharCode(a))>0}function e(a){return 10===a||13===a||8232===a||8233===a}function f(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a}function g(a){return 36===a||95===a||a>=65&&90>=a||a>=97&&122>=a||a>=48&&57>=a}function h(a){return"this"===a}function i(){for(;Y>X&&d(W.charCodeAt(X));)++X}function j(){var a,b;for(a=X++;Y>X&&(b=W.charCodeAt(X),g(b));)++X;return W.slice(a,X)}function k(){var a,b,c;return a=X,b=j(),c=1===b.length?S.Identifier:h(b)?S.Keyword:"null"===b?S.NullLiteral:"true"===b||"false"===b?S.BooleanLiteral:S.Identifier,{type:c,value:b,range:[a,X]}}function l(){var a,b,c=X,d=W.charCodeAt(X),e=W[X];switch(d){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:return++X,{type:S.Punctuator,value:String.fromCharCode(d),range:[c,X]};default:if(a=W.charCodeAt(X+1),61===a)switch(d){case 37:case 38:case 42:case 43:case 45:case 47:case 60:case 62:case 124:return X+=2,{type:S.Punctuator,value:String.fromCharCode(d)+String.fromCharCode(a),range:[c,X]};case 33:case 61:return X+=2,61===W.charCodeAt(X)&&++X,{type:S.Punctuator,value:W.slice(c,X),range:[c,X]}}}return b=W[X+1],e===b&&"&|".indexOf(e)>=0?(X+=2,{type:S.Punctuator,value:e+b,range:[c,X]}):"<>=!+-*%&|^/".indexOf(e)>=0?(++X,{type:S.Punctuator,value:e,range:[c,X]}):void s({},V.UnexpectedToken,"ILLEGAL")}function m(){var a,d,e;if(e=W[X],b(c(e.charCodeAt(0))||"."===e,"Numeric literal must start with a decimal digit or a decimal point"),d=X,a="","."!==e){for(a=W[X++],e=W[X],"0"===a&&e&&c(e.charCodeAt(0))&&s({},V.UnexpectedToken,"ILLEGAL");c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("."===e){for(a+=W[X++];c(W.charCodeAt(X));)a+=W[X++];e=W[X]}if("e"===e||"E"===e)if(a+=W[X++],e=W[X],("+"===e||"-"===e)&&(a+=W[X++]),c(W.charCodeAt(X)))for(;c(W.charCodeAt(X));)a+=W[X++];else s({},V.UnexpectedToken,"ILLEGAL");return f(W.charCodeAt(X))&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.NumericLiteral,value:parseFloat(a),range:[d,X]}}function n(){var a,c,d,f="",g=!1;for(a=W[X],b("'"===a||'"'===a,"String literal must starts with a quote"),c=X,++X;Y>X;){if(d=W[X++],d===a){a="";break}if("\\"===d)if(d=W[X++],d&&e(d.charCodeAt(0)))"\r"===d&&"\n"===W[X]&&++X;else switch(d){case"n":f+="\n";break;case"r":f+="\r";break;case"t":f+="	";break;case"b":f+="\b";break;case"f":f+="\f";break;case"v":f+="";break;default:f+=d}else{if(e(d.charCodeAt(0)))break;f+=d}}return""!==a&&s({},V.UnexpectedToken,"ILLEGAL"),{type:S.StringLiteral,value:f,octal:g,range:[c,X]}}function o(a){return a.type===S.Identifier||a.type===S.Keyword||a.type===S.BooleanLiteral||a.type===S.NullLiteral}function p(){var a;return i(),X>=Y?{type:S.EOF,range:[X,X]}:(a=W.charCodeAt(X),40===a||41===a||58===a?l():39===a||34===a?n():f(a)?k():46===a?c(W.charCodeAt(X+1))?m():l():c(a)?m():l())}function q(){var a;return a=$,X=a.range[1],$=p(),X=a.range[1],a}function r(){var a;a=X,$=p(),X=a}function s(a,c){var d,e=Array.prototype.slice.call(arguments,2),f=c.replace(/%(\d)/g,function(a,c){return b(c<e.length,"Message reference must be in range"),e[c]});throw d=new Error(f),d.index=X,d.description=f,d}function t(a){s(a,V.UnexpectedToken,a.value)}function u(a){var b=q();(b.type!==S.Punctuator||b.value!==a)&&t(b)}function v(a){return $.type===S.Punctuator&&$.value===a}function w(a){return $.type===S.Keyword&&$.value===a}function x(){var a=[];for(u("[");!v("]");)v(",")?(q(),a.push(null)):(a.push(bb()),v("]")||u(","));return u("]"),Z.createArrayExpression(a)}function y(){var a;return i(),a=q(),a.type===S.StringLiteral||a.type===S.NumericLiteral?Z.createLiteral(a):Z.createIdentifier(a.value)}function z(){var a,b;return a=$,i(),(a.type===S.EOF||a.type===S.Punctuator)&&t(a),b=y(),u(":"),Z.createProperty("init",b,bb())}function A(){var a=[];for(u("{");!v("}");)a.push(z()),v("}")||u(",");return u("}"),Z.createObjectExpression(a)}function B(){var a;return u("("),a=bb(),u(")"),a}function C(){var a,b,c;return v("(")?B():(a=$.type,a===S.Identifier?c=Z.createIdentifier(q().value):a===S.StringLiteral||a===S.NumericLiteral?c=Z.createLiteral(q()):a===S.Keyword?w("this")&&(q(),c=Z.createThisExpression()):a===S.BooleanLiteral?(b=q(),b.value="true"===b.value,c=Z.createLiteral(b)):a===S.NullLiteral?(b=q(),b.value=null,c=Z.createLiteral(b)):v("[")?c=x():v("{")&&(c=A()),c?c:void t(q()))}function D(){var a=[];if(u("("),!v(")"))for(;Y>X&&(a.push(bb()),!v(")"));)u(",");return u(")"),a}function E(){var a;return a=q(),o(a)||t(a),Z.createIdentifier(a.value)}function F(){return u("."),E()}function G(){var a;return u("["),a=bb(),u("]"),a}function H(){var a,b,c;for(a=C();;)if(v("["))c=G(),a=Z.createMemberExpression("[",a,c);else if(v("."))c=F(),a=Z.createMemberExpression(".",a,c);else{if(!v("("))break;b=D(),a=Z.createCallExpression(a,b)}return a}function I(){var a,b;return $.type!==S.Punctuator&&$.type!==S.Keyword?b=ab():v("+")||v("-")||v("!")?(a=q(),b=I(),b=Z.createUnaryExpression(a.value,b)):w("delete")||w("void")||w("typeof")?s({},V.UnexpectedToken):b=ab(),b}function J(a){var b=0;if(a.type!==S.Punctuator&&a.type!==S.Keyword)return 0;switch(a.value){case"||":b=1;break;case"&&":b=2;break;case"==":case"!=":case"===":case"!==":b=6;break;case"<":case">":case"<=":case">=":case"instanceof":b=7;break;case"in":b=7;break;case"+":case"-":b=9;break;case"*":case"/":case"%":b=11}return b}function K(){var a,b,c,d,e,f,g,h;if(g=I(),b=$,c=J(b),0===c)return g;for(b.prec=c,q(),e=I(),d=[g,b,e];(c=J($))>0;){for(;d.length>2&&c<=d[d.length-2].prec;)e=d.pop(),f=d.pop().value,g=d.pop(),a=Z.createBinaryExpression(f,g,e),d.push(a);b=q(),b.prec=c,d.push(b),a=I(),d.push(a)}for(h=d.length-1,a=d[h];h>1;)a=Z.createBinaryExpression(d[h-1].value,d[h-2],a),h-=2;return a}function L(){var a,b,c;return a=K(),v("?")&&(q(),b=L(),u(":"),c=L(),a=Z.createConditionalExpression(a,b,c)),a}function M(){var a,b;return a=q(),a.type!==S.Identifier&&t(a),b=v("(")?D():[],Z.createFilter(a.value,b)}function N(){for(;v("|");)q(),M()}function O(){i(),r();var a=bb();a&&(","===$.value||"in"==$.value&&a.type===U.Identifier?Q(a):(N(),"as"===$.value?P(a):Z.createTopLevel(a))),$.type!==S.EOF&&t($)}function P(a){q();var b=q().value;Z.createAsExpression(a,b)}function Q(a){var b;","===$.value&&(q(),$.type!==S.Identifier&&t($),b=q().value),q();var c=bb();N(),Z.createInExpression(a.name,b,c)}function R(a,b){return Z=b,W=a,X=0,Y=W.length,$=null,_={labelSet:{}},O()}var S,T,U,V,W,X,Y,Z,$,_;S={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},T={},T[S.BooleanLiteral]="Boolean",T[S.EOF]="<end>",T[S.Identifier]="Identifier",T[S.Keyword]="Keyword",T[S.NullLiteral]="Null",T[S.NumericLiteral]="Numeric",T[S.Punctuator]="Punctuator",T[S.StringLiteral]="String",U={ArrayExpression:"ArrayExpression",BinaryExpression:"BinaryExpression",CallExpression:"CallExpression",ConditionalExpression:"ConditionalExpression",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",Identifier:"Identifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ThisExpression:"ThisExpression",UnaryExpression:"UnaryExpression"},V={UnexpectedToken:"Unexpected token %0",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared"};
-var ab=H,bb=L;a.esprima={parse:R}}(this),function(a){"use strict";function b(a,b,d,e){var f;try{if(f=c(a),f.scopeIdent&&(d.nodeType!==Node.ELEMENT_NODE||"TEMPLATE"!==d.tagName||"bind"!==b&&"repeat"!==b))throw Error("as and in can only be used within <template bind/repeat>")}catch(g){return void console.error("Invalid expression syntax: "+a,g)}return function(a,b,c){var d=f.getBinding(a,e,c);return f.scopeIdent&&d&&(b.polymerExpressionScopeIdent_=f.scopeIdent,f.indexIdent&&(b.polymerExpressionIndexIdent_=f.indexIdent)),d}}function c(a){var b=q[a];if(!b){var c=new j;esprima.parse(a,c),b=new l(c),q[a]=b}return b}function d(a){this.value=a,this.valueFn_=void 0}function e(a){this.name=a,this.path=Path.get(a)}function f(a,b,c){this.computed="["==c,this.dynamicDeps="function"==typeof a||a.dynamicDeps||this.computed&&!(b instanceof d),this.simplePath=!this.dynamicDeps&&(b instanceof e||b instanceof d)&&(a instanceof f||a instanceof e),this.object=this.simplePath?a:i(a),this.property=!this.computed||this.simplePath?b:i(b)}function g(a,b){this.name=a,this.args=[];for(var c=0;c<b.length;c++)this.args[c]=i(b[c])}function h(){throw Error("Not Implemented")}function i(a){return"function"==typeof a?a:a.valueFn()}function j(){this.expression=null,this.filters=[],this.deps={},this.currentPath=void 0,this.scopeIdent=void 0,this.indexIdent=void 0,this.dynamicDeps=!1}function k(a){this.value_=a}function l(a){if(this.scopeIdent=a.scopeIdent,this.indexIdent=a.indexIdent,!a.expression)throw Error("No expression found.");this.expression=a.expression,i(this.expression),this.filters=a.filters,this.dynamicDeps=a.dynamicDeps}function m(a){return String(a).replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}function n(a,b){for(;a[t]&&!Object.prototype.hasOwnProperty.call(a,b);)a=a[t];return a}function o(a){switch(a){case"":return!1;case"false":case"null":case"true":return!0}return isNaN(Number(a))?!1:!0}function p(){}var q=Object.create(null);d.prototype={valueFn:function(){if(!this.valueFn_){var a=this.value;this.valueFn_=function(){return a}}return this.valueFn_}},e.prototype={valueFn:function(){if(!this.valueFn_){var a=(this.name,this.path);this.valueFn_=function(b,c){return c&&c.addPath(b,a),a.getValueFrom(b)}}return this.valueFn_},setValue:function(a,b){return 1==this.path.length&&(a=n(a,this.path[0])),this.path.setValueFrom(a,b)}},f.prototype={get fullPath(){if(!this.fullPath_){var a=this.object instanceof f?this.object.fullPath.slice():[this.object.name];a.push(this.property instanceof e?this.property.name:this.property.value),this.fullPath_=Path.get(a)}return this.fullPath_},valueFn:function(){if(!this.valueFn_){var a=this.object;if(this.simplePath){var b=this.fullPath;this.valueFn_=function(a,c){return c&&c.addPath(a,b),b.getValueFrom(a)}}else if(this.computed){var c=this.property;this.valueFn_=function(b,d,e){var f=a(b,d,e),g=c(b,d,e);return d&&d.addPath(f,[g]),f?f[g]:void 0}}else{var b=Path.get(this.property.name);this.valueFn_=function(c,d,e){var f=a(c,d,e);return d&&d.addPath(f,b),b.getValueFrom(f)}}}return this.valueFn_},setValue:function(a,b){if(this.simplePath)return this.fullPath.setValueFrom(a,b),b;var c=this.object(a),d=this.property instanceof e?this.property.name:this.property(a);return c[d]=b}},g.prototype={transform:function(a,b,c,d,e){var f=a,g=f[this.name];if(!g&&(g=c[this.name],!g))return void console.error("Cannot find function or filter: "+this.name);if(d?g=g.toModel:"function"==typeof g.toDOM&&(g=g.toDOM),"function"!=typeof g)return void console.error("Cannot find function or filter: "+this.name);for(var h=e||[],j=0;j<this.args.length;j++)h.push(i(this.args[j])(a,b,c));return g.apply(f,h)}};var r={"+":function(a){return+a},"-":function(a){return-a},"!":function(a){return!a}},s={"+":function(a,b){return a+b},"-":function(a,b){return a-b},"*":function(a,b){return a*b},"/":function(a,b){return a/b},"%":function(a,b){return a%b},"<":function(a,b){return b>a},">":function(a,b){return a>b},"<=":function(a,b){return b>=a},">=":function(a,b){return a>=b},"==":function(a,b){return a==b},"!=":function(a,b){return a!=b},"===":function(a,b){return a===b},"!==":function(a,b){return a!==b},"&&":function(a,b){return a&&b},"||":function(a,b){return a||b}};j.prototype={createUnaryExpression:function(a,b){if(!r[a])throw Error("Disallowed operator: "+a);return b=i(b),function(c,d,e){return r[a](b(c,d,e))}},createBinaryExpression:function(a,b,c){if(!s[a])throw Error("Disallowed operator: "+a);switch(b=i(b),c=i(c),a){case"||":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)||c(a,d,e)};case"&&":return this.dynamicDeps=!0,function(a,d,e){return b(a,d,e)&&c(a,d,e)}}return function(d,e,f){return s[a](b(d,e,f),c(d,e,f))}},createConditionalExpression:function(a,b,c){return a=i(a),b=i(b),c=i(c),this.dynamicDeps=!0,function(d,e,f){return a(d,e,f)?b(d,e,f):c(d,e,f)}},createIdentifier:function(a){var b=new e(a);return b.type="Identifier",b},createMemberExpression:function(a,b,c){var d=new f(b,c,a);return d.dynamicDeps&&(this.dynamicDeps=!0),d},createCallExpression:function(a,b){if(!(a instanceof e))throw Error("Only identifier function invocations are allowed");var c=new g(a.name,b);return function(a,b,d){return c.transform(a,b,d,!1)}},createLiteral:function(a){return new d(a.value)},createArrayExpression:function(a){for(var b=0;b<a.length;b++)a[b]=i(a[b]);return function(b,c,d){for(var e=[],f=0;f<a.length;f++)e.push(a[f](b,c,d));return e}},createProperty:function(a,b,c){return{key:b instanceof e?b.name:b.value,value:c}},createObjectExpression:function(a){for(var b=0;b<a.length;b++)a[b].value=i(a[b].value);return function(b,c,d){for(var e={},f=0;f<a.length;f++)e[a[f].key]=a[f].value(b,c,d);return e}},createFilter:function(a,b){this.filters.push(new g(a,b))},createAsExpression:function(a,b){this.expression=a,this.scopeIdent=b},createInExpression:function(a,b,c){this.expression=c,this.scopeIdent=a,this.indexIdent=b},createTopLevel:function(a){this.expression=a},createThisExpression:h},k.prototype={open:function(){return this.value_},discardChanges:function(){return this.value_},deliver:function(){},close:function(){}},l.prototype={getBinding:function(a,b,c){function d(){if(h)return h=!1,g;i.dynamicDeps&&f.startReset();var c=i.getValue(a,i.dynamicDeps?f:void 0,b);return i.dynamicDeps&&f.finishReset(),c}function e(c){return i.setValue(a,c,b),c}if(c)return this.getValue(a,void 0,b);var f=new CompoundObserver,g=this.getValue(a,f,b),h=!0,i=this;return new ObserverTransform(f,d,e,!0)},getValue:function(a,b,c){for(var d=i(this.expression)(a,b,c),e=0;e<this.filters.length;e++)d=this.filters[e].transform(a,b,c,!1,[d]);return d},setValue:function(a,b,c){for(var d=this.filters?this.filters.length:0;d-->0;)b=this.filters[d].transform(a,void 0,c,!0,[b]);return this.expression.setValue?this.expression.setValue(a,b):void 0}};var t="@"+Math.random().toString(36).slice(2);p.prototype={styleObject:function(a){var b=[];for(var c in a)b.push(m(c)+": "+a[c]);return b.join("; ")},tokenList:function(a){var b=[];for(var c in a)a[c]&&b.push(c);return b.join(" ")},prepareInstancePositionChanged:function(a){var b=a.polymerExpressionIndexIdent_;if(b)return function(a,c){a.model[b]=c}},prepareBinding:function(a,c,d){var e=Path.get(a);{if(o(a)||!e.valid)return b(a,c,d,this);if(1==e.length)return function(a,b,c){if(c)return e.getValueFrom(a);var d=n(a,e[0]);return new PathObserver(d,e)}}},prepareInstanceModel:function(a){var b=a.polymerExpressionScopeIdent_;if(b){var c=a.templateInstance?a.templateInstance.model:a.model,d=a.polymerExpressionIndexIdent_;return function(a){return u(c,a,b,d)}}}};var u="__proto__"in{}?function(a,b,c,d){var e={};return e[c]=b,e[d]=void 0,e[t]=a,e.__proto__=a,e}:function(a,b,c,d){var e=Object.create(a);return Object.defineProperty(e,c,{value:b,configurable:!0,writable:!0}),Object.defineProperty(e,d,{value:void 0,configurable:!0,writable:!0}),Object.defineProperty(e,t,{value:a,configurable:!0,writable:!0}),e};a.PolymerExpressions=p,p.getExpression=c}(this),Polymer={version:"0.5.5"},"function"==typeof window.Polymer&&(Polymer={}),function(a){function b(a,b){return b=b||[],b.map||(b=[b]),a.apply(this,b.map(d))}function c(a,c,d){var e;switch(arguments.length){case 0:return;case 1:e=null;break;case 2:e=c.apply(this);break;default:e=b(d,c)}f[a]=e}function d(a){return f[a]}function e(a,c){HTMLImports.whenImportsReady(function(){b(c,a)})}var f={};a.marshal=d,a.modularize=c,a.using=e}(window),window.WebComponents||(window.WebComponents||(WebComponents={flush:function(){},flags:{log:{}}},Platform=WebComponents,CustomElements={useNative:!0,ready:!0,takeRecords:function(){},"instanceof":function(a,b){return a instanceof b}},HTMLImports={useNative:!0},addEventListener("HTMLImportsLoaded",function(){document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}),ShadowDOMPolyfill=null,wrap=unwrap=function(a){return a}),window.HTMLImports=window.HTMLImports||{flags:{}},function(a){function b(a,b){b=b||o,d(function(){f(a,b)},b)}function c(a){return"complete"===a.readyState||a.readyState===r}function d(a,b){if(c(b))a&&a();else{var e=function(){("complete"===b.readyState||b.readyState===r)&&(b.removeEventListener(s,e),d(a,b))};b.addEventListener(s,e)}}function e(a){a.target.__loaded=!0}function f(a,b){function c(){h==i&&a&&a()}function d(a){e(a),h++,c()}var f=b.querySelectorAll("link[rel=import]"),h=0,i=f.length;if(i)for(var j,k=0;i>k&&(j=f[k]);k++)g(j)?d.call(j,{target:j}):(j.addEventListener("load",d),j.addEventListener("error",d));else c()}function g(a){return l?a.__loaded||a["import"]&&"loading"!==a["import"].readyState:a.__importParsed}function h(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)i(b)&&j(b)}function i(a){return"link"===a.localName&&"import"===a.rel}function j(a){var b=a["import"];b?e({target:a}):(a.addEventListener("load",e),a.addEventListener("error",e))}var k="import",l=Boolean(k in document.createElement("link")),m=Boolean(window.ShadowDOMPolyfill),n=function(a){return m?ShadowDOMPolyfill.wrapIfNeeded(a):a},o=n(document),p={get:function(){var a=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return n(a)},configurable:!0};Object.defineProperty(document,"_currentScript",p),Object.defineProperty(o,"_currentScript",p);var q=/Trident/.test(navigator.userAgent),r=q?"complete":"interactive",s="readystatechange";l&&(new MutationObserver(function(a){for(var b,c=0,d=a.length;d>c&&(b=a[c]);c++)b.addedNodes&&h(b.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var a,b=document.querySelectorAll("link[rel=import]"),c=0,d=b.length;d>c&&(a=b[c]);c++)j(a)}()),b(function(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),o.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}),a.IMPORT_LINK_TYPE=k,a.useNative=l,a.rootDocument=o,a.whenReady=b,a.isIE=q}(HTMLImports),function(){var a=document.createElement("style");a.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; } \n";var b=document.querySelector("head");b.insertBefore(a,b.firstChild)}(Platform)),function(a){"use strict";function b(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={},d=[];return Object.observe(c,a),Array.observe(d,a),c.id=1,c.id=2,delete c.id,d.push(1,2),d.length=0,Object.deliverChangeRecords(a),5!==b.length?!1:"add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type||"splice"!=b[3].type||"splice"!=b[4].type?!1:(Object.unobserve(c,a),Array.unobserve(d,a),!0)}function c(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if("undefined"!=typeof navigator&&navigator.getDeviceStorage)return!1;try{var a=new Function("","return true;");return a()}catch(b){return!1}}function d(a){return+a===a>>>0&&""!==a}function e(a){return+a}function f(a){return a===Object(a)}function g(a,b){return a===b?0!==a||1/a===1/b:R(a)&&R(b)?!0:a!==a&&b!==b}function h(a){if(void 0===a)return"eof";var b=a.charCodeAt(0);switch(b){case 91:case 93:case 46:case 34:case 39:case 48:return a;case 95:case 36:return"ident";case 32:case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"ws"}return b>=97&&122>=b||b>=65&&90>=b?"ident":b>=49&&57>=b?"number":"else"}function i(){}function j(a){function b(){if(!(m>=a.length)){var b=a[m+1];return"inSingleQuote"==n&&"'"==b||"inDoubleQuote"==n&&'"'==b?(m++,d=b,o.append(),!0):void 0}}for(var c,d,e,f,g,j,k,l=[],m=-1,n="beforePath",o={push:function(){void 0!==e&&(l.push(e),e=void 0)},append:function(){void 0===e?e=d:e+=d}};n;)if(m++,c=a[m],"\\"!=c||!b(n)){if(f=h(c),k=W[n],g=k[f]||k["else"]||"error","error"==g)return;if(n=g[0],j=o[g[1]]||i,d=void 0===g[2]?c:g[2],j(),"afterPath"===n)return l}}function k(a){return V.test(a)}function l(a,b){if(b!==X)throw Error("Use Path.get to retrieve path objects");for(var c=0;c<a.length;c++)this.push(String(a[c]));Q&&this.length&&(this.getValueFrom=this.compiledGetValueFromFn())}function m(a){if(a instanceof l)return a;if((null==a||0==a.length)&&(a=""),"string"!=typeof a){if(d(a.length))return new l(a,X);a=String(a)}var b=Y[a];if(b)return b;var c=j(a);if(!c)return Z;var b=new l(c,X);return Y[a]=b,b}function n(a){return d(a)?"["+a+"]":'["'+a.replace(/"/g,'\\"')+'"]'}function o(b){for(var c=0;_>c&&b.check_();)c++;return O&&(a.dirtyCheckCycleCount=c),c>0}function p(a){for(var b in a)return!1;return!0}function q(a){return p(a.added)&&p(a.removed)&&p(a.changed)}function r(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function s(){if(!ab.length)return!1;for(var a=0;a<ab.length;a++)ab[a]();return ab.length=0,!0}function t(){function a(a){b&&b.state_===fb&&!d&&b.check_(a)}var b,c,d=!1,e=!0;return{open:function(c){if(b)throw Error("ObservedObject in use");e||Object.deliverChangeRecords(a),b=c,e=!1},observe:function(b,d){c=b,d?Array.observe(c,a):Object.observe(c,a)},deliver:function(b){d=b,Object.deliverChangeRecords(a),d=!1},close:function(){b=void 0,Object.unobserve(c,a),cb.push(this)}}}function u(a,b,c){var d=cb.pop()||t();return d.open(a),d.observe(b,c),d}function v(){function a(b,f){b&&(b===d&&(e[f]=!0),h.indexOf(b)<0&&(h.push(b),Object.observe(b,c)),a(Object.getPrototypeOf(b),f))}function b(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.object!==d||e[c.name]||"setPrototype"===c.type)return!1}return!0}function c(c){if(!b(c)){for(var d,e=0;e<g.length;e++)d=g[e],d.state_==fb&&d.iterateObjects_(a);for(var e=0;e<g.length;e++)d=g[e],d.state_==fb&&d.check_()}}var d,e,f=0,g=[],h=[],i={objects:h,get rootObject(){return d},set rootObject(a){d=a,e={}},open:function(b){g.push(b),f++,b.iterateObjects_(a)},close:function(){if(f--,!(f>0)){for(var a=0;a<h.length;a++)Object.unobserve(h[a],c),x.unobservedCount++;g.length=0,h.length=0,d=void 0,e=void 0,db.push(this),$===this&&($=null)}}};return i}function w(a,b){return $&&$.rootObject===b||($=db.pop()||v(),$.rootObject=b),$.open(a,b),$}function x(){this.state_=eb,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=ib++}function y(a){x._allObserversCount++,kb&&jb.push(a)}function z(){x._allObserversCount--}function A(a){x.call(this),this.value_=a,this.oldObject_=void 0}function B(a){if(!Array.isArray(a))throw Error("Provided object is not an Array");A.call(this,a)}function C(a,b){x.call(this),this.object_=a,this.path_=m(b),this.directObserver_=void 0}function D(a){x.call(this),this.reportChangesOnOpen_=a,this.value_=[],this.directObserver_=void 0,this.observed_=[]}function E(a){return a}function F(a,b,c,d){this.callback_=void 0,this.target_=void 0,this.value_=void 0,this.observable_=a,this.getValueFn_=b||E,this.setValueFn_=c||E,this.dontPassThroughSet_=d}function G(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];nb[g.type]?(g.name in c||(c[g.name]=g.oldValue),"update"!=g.type&&("add"!=g.type?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}function H(a,b,c){return{index:a,removed:b,addedCount:c}}function I(){}function J(a,b,c,d,e,f){return sb.calcSplices(a,b,c,d,e,f)}function K(a,b,c,d){return c>b||a>d?-1:b==c||d==a?0:c>a?d>b?b-c:d-c:b>d?d-a:b-a}function L(a,b,c,d){for(var e=H(b,c,d),f=!1,g=0,h=0;h<a.length;h++){var i=a[h];if(i.index+=g,!f){var j=K(e.index,e.index+e.removed.length,i.index,i.index+i.addedCount);if(j>=0){a.splice(h,1),h--,g-=i.addedCount-i.removed.length,e.addedCount+=i.addedCount-j;var k=e.removed.length+i.removed.length-j;if(e.addedCount||k){var c=i.removed;if(e.index<i.index){var l=e.removed.slice(0,i.index-e.index);Array.prototype.push.apply(l,c),c=l}if(e.index+e.removed.length>i.index+i.addedCount){var m=e.removed.slice(i.index+i.addedCount-e.index);Array.prototype.push.apply(c,m)}e.removed=c,i.index<e.index&&(e.index=i.index)}else f=!0}else if(e.index<i.index){f=!0,a.splice(h,0,e),h++;var n=e.addedCount-e.removed.length;i.index+=n,g+=n}}}f||a.push(e)}function M(a,b){for(var c=[],f=0;f<b.length;f++){var g=b[f];switch(g.type){case"splice":L(c,g.index,g.removed.slice(),g.addedCount);break;case"add":case"update":case"delete":if(!d(g.name))continue;var h=e(g.name);if(0>h)continue;L(c,h,[g.oldValue],1);break;default:console.error("Unexpected record type: "+JSON.stringify(g))}}return c}function N(a,b){var c=[];return M(a,b).forEach(function(b){return 1==b.addedCount&&1==b.removed.length?void(b.removed[0]!==a[b.index]&&c.push(b)):void(c=c.concat(J(a,b.index,b.index+b.addedCount,b.removed,0,b.removed.length)))}),c}var O=a.testingExposeCycleCount,P=b(),Q=c(),R=a.Number.isNaN||function(b){return"number"==typeof b&&a.isNaN(b)},S="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},T="[$_a-zA-Z]",U="[$_a-zA-Z0-9]",V=new RegExp("^"+T+"+"+U+"*$"),W={beforePath:{ws:["beforePath"],ident:["inIdent","append"],"[":["beforeElement"],eof:["afterPath"]},inPath:{ws:["inPath"],".":["beforeIdent"],"[":["beforeElement"],eof:["afterPath"]},beforeIdent:{ws:["beforeIdent"],ident:["inIdent","append"]},inIdent:{ident:["inIdent","append"],0:["inIdent","append"],number:["inIdent","append"],ws:["inPath","push"],".":["beforeIdent","push"],"[":["beforeElement","push"],eof:["afterPath","push"]},beforeElement:{ws:["beforeElement"],0:["afterZero","append"],number:["inIndex","append"],"'":["inSingleQuote","append",""],'"':["inDoubleQuote","append",""]},afterZero:{ws:["afterElement","push"],"]":["inPath","push"]},inIndex:{0:["inIndex","append"],number:["inIndex","append"],ws:["afterElement"],"]":["inPath","push"]},inSingleQuote:{"'":["afterElement"],eof:["error"],"else":["inSingleQuote","append"]},inDoubleQuote:{'"':["afterElement"],eof:["error"],"else":["inDoubleQuote","append"]},afterElement:{ws:["afterElement"],"]":["inPath","push"]}},X={},Y={};l.get=m,l.prototype=S({__proto__:[],valid:!0,toString:function(){for(var a="",b=0;b<this.length;b++){var c=this[b];a+=k(c)?b?"."+c:c:n(c)}return a},getValueFrom:function(a){for(var b=0;b<this.length;b++){if(null==a)return;a=a[this[b]]}return a},iterateObjects:function(a,b){for(var c=0;c<this.length;c++){if(c&&(a=a[this[c-1]]),!f(a))return;b(a,this[c])}},compiledGetValueFromFn:function(){var a="",b="obj";a+="if (obj != null";for(var c,d=0;d<this.length-1;d++)c=this[d],b+=k(c)?"."+c:n(c),a+=" &&\n     "+b+" != null";a+=")\n";var c=this[d];return b+=k(c)?"."+c:n(c),a+="  return "+b+";\nelse\n  return undefined;",new Function("obj",a)},setValueFrom:function(a,b){if(!this.length)return!1;for(var c=0;c<this.length-1;c++){if(!f(a))return!1;a=a[this[c]]}return f(a)?(a[this[c]]=b,!0):!1}});var Z=new l("",X);Z.valid=!1,Z.getValueFrom=Z.setValueFrom=function(){};var $,_=1e3,ab=[],bb=P?function(){return function(a){return Promise.resolve().then(a)}}():function(){return function(a){ab.push(a)}}(),cb=[],db=[],eb=0,fb=1,gb=2,hb=3,ib=1;x.prototype={open:function(a,b){if(this.state_!=eb)throw Error("Observer has already been opened.");return y(this),this.callback_=a,this.target_=b,this.connect_(),this.state_=fb,this.value_},close:function(){this.state_==fb&&(z(this),this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0,this.state_=gb)},deliver:function(){this.state_==fb&&o(this)},report_:function(a){try{this.callback_.apply(this.target_,a)}catch(b){x._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var jb,kb=!P;x._allObserversCount=0,kb&&(jb=[]);var lb=!1;a.Platform=a.Platform||{},a.Platform.performMicrotaskCheckpoint=function(){if(!lb&&kb){lb=!0;var b,c,d=0;do{d++,c=jb,jb=[],b=!1;for(var e=0;e<c.length;e++){var f=c[e];f.state_==fb&&(f.check_()&&(b=!0),jb.push(f))}s()&&(b=!0)}while(_>d&&b);O&&(a.dirtyCheckCycleCount=d),lb=!1}},kb&&(a.Platform.clearObservers=function(){jb=[]}),A.prototype=S({__proto__:x.prototype,arrayObserve:!1,connect_:function(){P?this.directObserver_=u(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(a){var b=Array.isArray(a)?[]:{};for(var c in a)b[c]=a[c];return Array.isArray(a)&&(b.length=a.length),b},check_:function(a){var b,c;if(P){if(!a)return!1;c={},b=G(this.value_,a,c)}else c=this.oldObject_,b=r(this.value_,this.oldObject_);return q(b)?!1:(P||(this.oldObject_=this.copyObject(this.value_)),this.report_([b.added||{},b.removed||{},b.changed||{},function(a){return c[a]}]),!0)},disconnect_:function(){P?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==fb&&(P?this.directObserver_.deliver(!1):o(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}}),B.prototype=S({__proto__:A.prototype,arrayObserve:!0,copyObject:function(a){return a.slice()},check_:function(a){var b;if(P){if(!a)return!1;b=N(this.value_,a)}else b=J(this.value_,0,this.value_.length,this.oldObject_,0,this.oldObject_.length);return b&&b.length?(P||(this.oldObject_=this.copyObject(this.value_)),this.report_([b]),!0):!1}}),B.applySplices=function(a,b,c){c.forEach(function(c){for(var d=[c.index,c.removed.length],e=c.index;e<c.index+c.addedCount;)d.push(b[e]),e++;Array.prototype.splice.apply(a,d)})},C.prototype=S({__proto__:x.prototype,get path(){return this.path_},connect_:function(){P&&(this.directObserver_=w(this,this.object_)),this.check_(void 0,!0)},disconnect_:function(){this.value_=void 0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},iterateObjects_:function(a){this.path_.iterateObjects(this.object_,a)},check_:function(a,b){var c=this.value_;return this.value_=this.path_.getValueFrom(this.object_),b||g(this.value_,c)?!1:(this.report_([this.value_,c,this]),!0)},setValue:function(a){this.path_&&this.path_.setValueFrom(this.object_,a)}});var mb={};D.prototype=S({__proto__:x.prototype,connect_:function(){if(P){for(var a,b=!1,c=0;c<this.observed_.length;c+=2)if(a=this.observed_[c],a!==mb){b=!0;break}b&&(this.directObserver_=w(this,a))}this.check_(void 0,!this.reportChangesOnOpen_)},disconnect_:function(){for(var a=0;a<this.observed_.length;a+=2)this.observed_[a]===mb&&this.observed_[a+1].close();this.observed_.length=0,this.value_.length=0,this.directObserver_&&(this.directObserver_.close(this),this.directObserver_=void 0)},addPath:function(a,b){if(this.state_!=eb&&this.state_!=hb)throw Error("Cannot add paths once started.");var b=m(b);if(this.observed_.push(a,b),this.reportChangesOnOpen_){var c=this.observed_.length/2-1;this.value_[c]=b.getValueFrom(a)}},addObserver:function(a){if(this.state_!=eb&&this.state_!=hb)throw Error("Cannot add observers once started.");if(this.observed_.push(mb,a),this.reportChangesOnOpen_){var b=this.observed_.length/2-1;this.value_[b]=a.open(this.deliver,this)}},startReset:function(){if(this.state_!=fb)throw Error("Can only reset while open");this.state_=hb,this.disconnect_()},finishReset:function(){if(this.state_!=hb)throw Error("Can only finishReset after startReset");return this.state_=fb,this.connect_(),this.value_},iterateObjects_:function(a){for(var b,c=0;c<this.observed_.length;c+=2)b=this.observed_[c],b!==mb&&this.observed_[c+1].iterateObjects(b,a)},check_:function(a,b){for(var c,d=0;d<this.observed_.length;d+=2){var e,f=this.observed_[d],h=this.observed_[d+1];if(f===mb){var i=h;e=this.state_===eb?i.open(this.deliver,this):i.discardChanges()}else e=h.getValueFrom(f);b?this.value_[d/2]=e:g(e,this.value_[d/2])||(c=c||[],c[d/2]=this.value_[d/2],this.value_[d/2]=e)}return c?(this.report_([this.value_,c,this.observed_]),!0):!1}}),F.prototype={open:function(a,b){return this.callback_=a,this.target_=b,this.value_=this.getValueFn_(this.observable_.open(this.observedCallback_,this)),this.value_},observedCallback_:function(a){if(a=this.getValueFn_(a),!g(a,this.value_)){var b=this.value_;this.value_=a,this.callback_.call(this.target_,this.value_,b)}},discardChanges:function(){return this.value_=this.getValueFn_(this.observable_.discardChanges()),this.value_},deliver:function(){return this.observable_.deliver()},setValue:function(a){return a=this.setValueFn_(a),!this.dontPassThroughSet_&&this.observable_.setValue?this.observable_.setValue(a):void 0},close:function(){this.observable_&&this.observable_.close(),this.callback_=void 0,this.target_=void 0,this.observable_=void 0,this.value_=void 0,this.getValueFn_=void 0,this.setValueFn_=void 0}};var nb={add:!0,update:!0,"delete":!0},ob=0,pb=1,qb=2,rb=3;I.prototype={calcEditDistances:function(a,b,c,d,e,f){for(var g=f-e+1,h=c-b+1,i=new Array(g),j=0;g>j;j++)i[j]=new Array(h),i[j][0]=j;for(var k=0;h>k;k++)i[0][k]=k;for(var j=1;g>j;j++)for(var k=1;h>k;k++)if(this.equals(a[b+k-1],d[e+j-1]))i[j][k]=i[j-1][k-1];else{var l=i[j-1][k]+1,m=i[j][k-1]+1;i[j][k]=m>l?l:m}return i},spliceOperationsFromEditDistances:function(a){for(var b=a.length-1,c=a[0].length-1,d=a[b][c],e=[];b>0||c>0;)if(0!=b)if(0!=c){var f,g=a[b-1][c-1],h=a[b-1][c],i=a[b][c-1];f=i>h?g>h?h:g:g>i?i:g,f==g?(g==d?e.push(ob):(e.push(pb),d=g),b--,c--):f==h?(e.push(rb),b--,d=h):(e.push(qb),c--,d=i)}else e.push(rb),b--;else e.push(qb),c--;return e.reverse(),e},calcSplices:function(a,b,c,d,e,f){var g=0,h=0,i=Math.min(c-b,f-e);if(0==b&&0==e&&(g=this.sharedPrefix(a,d,i)),c==a.length&&f==d.length&&(h=this.sharedSuffix(a,d,i-g)),b+=g,e+=g,c-=h,f-=h,c-b==0&&f-e==0)return[];if(b==c){for(var j=H(b,[],0);f>e;)j.removed.push(d[e++]);return[j]}if(e==f)return[H(b,[],c-b)];for(var k=this.spliceOperationsFromEditDistances(this.calcEditDistances(a,b,c,d,e,f)),j=void 0,l=[],m=b,n=e,o=0;o<k.length;o++)switch(k[o]){case ob:j&&(l.push(j),j=void 0),m++,n++;break;case pb:j||(j=H(m,[],0)),j.addedCount++,m++,j.removed.push(d[n]),n++;break;case qb:j||(j=H(m,[],0)),j.addedCount++,m++;break;case rb:j||(j=H(m,[],0)),j.removed.push(d[n]),n++}return j&&l.push(j),l},sharedPrefix:function(a,b,c){for(var d=0;c>d;d++)if(!this.equals(a[d],b[d]))return d;return c},sharedSuffix:function(a,b,c){for(var d=a.length,e=b.length,f=0;c>f&&this.equals(a[--d],b[--e]);)f++;return f},calculateSplices:function(a,b){return this.calcSplices(a,0,a.length,b,0,b.length)},equals:function(a,b){return a===b}};var sb=new I,tb=a;"undefined"==typeof exports||exports.nodeType||("undefined"!=typeof module&&module.exports&&(exports=module.exports),tb=exports),tb.Observer=x,tb.Observer.runEOM_=bb,tb.Observer.observerSentinel_=mb,tb.Observer.hasObjectObserve=P,tb.ArrayObserver=B,tb.ArrayObserver.calculateSplices=function(a,b){return sb.calculateSplices(a,b)},tb.ArraySplice=I,tb.ObjectObserver=A,tb.PathObserver=C,tb.CompoundObserver=D,tb.Path=l,tb.ObserverTransform=F}("undefined"!=typeof global&&global&&"undefined"!=typeof module&&module?global:this||window),function(){"use strict";function a(a){for(;a.parentNode;)a=a.parentNode;return"function"==typeof a.getElementById?a:null}function b(a,b,c){var d=a.bindings_;return d||(d=a.bindings_={}),d[b]&&c[b].close(),d[b]=c}function c(a,b,c){return c}function d(a){return null==a?"":a}function e(a,b){a.data=d(b)}function f(a){return function(b){return e(a,b)}}function g(a,b,c,e){return c?void(e?a.setAttribute(b,""):a.removeAttribute(b)):void a.setAttribute(b,d(e))}function h(a,b,c){return function(d){g(a,b,c,d)}}function i(a){switch(a.type){case"checkbox":return u;case"radio":case"select-multiple":case"select-one":return"change";case"range":if(/Trident|MSIE/.test(navigator.userAgent))return"change";default:return"input"}}function j(a,b,c,e){a[b]=(e||d)(c)}function k(a,b,c){return function(d){return j(a,b,d,c)}}function l(){}function m(a,b,c,d){function e(){var e="value"==b&&"number"==a.type;c.setValue(e?a.valueAsNumber:a[b]),c.discardChanges(),(d||l)(a),Platform.performMicrotaskCheckpoint()}var f=i(a);return a.addEventListener(f,e),{close:function(){a.removeEventListener(f,e),c.close()},observable_:c}}function n(a){return Boolean(a)}function o(b){if(b.form)return s(b.form.elements,function(a){return a!=b&&"INPUT"==a.tagName&&"radio"==a.type&&a.name==b.name});var c=a(b);if(!c)return[];var d=c.querySelectorAll('input[type="radio"][name="'+b.name+'"]');return s(d,function(a){return a!=b&&!a.form})}function p(a){"INPUT"===a.tagName&&"radio"===a.type&&o(a).forEach(function(a){var b=a.bindings_.checked;b&&b.observable_.setValue(!1)})}function q(a,b){var c,e,f,g=a.parentNode;g instanceof HTMLSelectElement&&g.bindings_&&g.bindings_.value&&(c=g,e=c.bindings_.value,f=c.value),a.value=d(b),c&&c.value!=f&&(e.observable_.setValue(c.value),e.observable_.discardChanges(),Platform.performMicrotaskCheckpoint())}function r(a){return function(b){q(a,b)}}var s=Array.prototype.filter.call.bind(Array.prototype.filter);Node.prototype.bind=function(a,b){console.error("Unhandled binding to Node: ",this,a,b)},Node.prototype.bindFinished=function(){};var t=c;Object.defineProperty(Platform,"enableBindingsReflection",{get:function(){return t===b},set:function(a){return t=a?b:c,a},configurable:!0}),Text.prototype.bind=function(a,b,c){if("textContent"!==a)return Node.prototype.bind.call(this,a,b,c);if(c)return e(this,b);var d=b;return e(this,d.open(f(this))),t(this,a,d)},Element.prototype.bind=function(a,b,c){var d="?"==a[a.length-1];if(d&&(this.removeAttribute(a),a=a.slice(0,-1)),c)return g(this,a,d,b);var e=b;return g(this,a,d,e.open(h(this,a,d))),t(this,a,e)};var u;!function(){var a=document.createElement("div"),b=a.appendChild(document.createElement("input"));b.setAttribute("type","checkbox");var c,d=0;b.addEventListener("click",function(){d++,c=c||"click"}),b.addEventListener("change",function(){d++,c=c||"change"});var e=document.createEvent("MouseEvent");e.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),b.dispatchEvent(e),u=1==d?"change":c}(),HTMLInputElement.prototype.bind=function(a,c,e){if("value"!==a&&"checked"!==a)return HTMLElement.prototype.bind.call(this,a,c,e);this.removeAttribute(a);var f="checked"==a?n:d,g="checked"==a?p:l;if(e)return j(this,a,c,f);var h=c,i=m(this,a,h,g);return j(this,a,h.open(k(this,a,f)),f),b(this,a,i)},HTMLTextAreaElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return j(this,"value",b);var e=b,f=m(this,"value",e);return j(this,"value",e.open(k(this,"value",d))),t(this,a,f)},HTMLOptionElement.prototype.bind=function(a,b,c){if("value"!==a)return HTMLElement.prototype.bind.call(this,a,b,c);if(this.removeAttribute("value"),c)return q(this,b);var d=b,e=m(this,"value",d);
-return q(this,d.open(r(this))),t(this,a,e)},HTMLSelectElement.prototype.bind=function(a,c,d){if("selectedindex"===a&&(a="selectedIndex"),"selectedIndex"!==a&&"value"!==a)return HTMLElement.prototype.bind.call(this,a,c,d);if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(this,a,e.open(k(this,a))),b(this,a,f)}}(this),function(a){"use strict";function b(a){if(!a)throw new Error("Assertion failed")}function c(a){for(var b;b=a.parentNode;)a=b;return a}function d(a,b){if(b){for(var d,e="#"+b;!d&&(a=c(a),a.protoContent_?d=a.protoContent_.querySelector(e):a.getElementById&&(d=a.getElementById(b)),!d&&a.templateCreator_);)a=a.templateCreator_;return d}}function e(a){return"template"==a.tagName&&"http://www.w3.org/2000/svg"==a.namespaceURI}function f(a){return"TEMPLATE"==a.tagName&&"http://www.w3.org/1999/xhtml"==a.namespaceURI}function g(a){return Boolean(L[a.tagName]&&a.hasAttribute("template"))}function h(a){return void 0===a.isTemplate_&&(a.isTemplate_="TEMPLATE"==a.tagName||g(a)),a.isTemplate_}function i(a,b){var c=a.querySelectorAll(N);h(a)&&b(a),G(c,b)}function j(a){function b(a){HTMLTemplateElement.decorate(a)||j(a.content)}i(a,b)}function k(a,b){Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}function l(a){var b=a.ownerDocument;if(!b.defaultView)return b;var c=b.templateContentsOwner_;if(!c){for(c=b.implementation.createHTMLDocument("");c.lastChild;)c.removeChild(c.lastChild);b.templateContentsOwner_=c}return c}function m(a){if(!a.stagingDocument_){var b=a.ownerDocument;if(!b.stagingDocument_){b.stagingDocument_=b.implementation.createHTMLDocument(""),b.stagingDocument_.isStagingDocument=!0;var c=b.stagingDocument_.createElement("base");c.href=document.baseURI,b.stagingDocument_.head.appendChild(c),b.stagingDocument_.stagingDocument_=b.stagingDocument_}a.stagingDocument_=b.stagingDocument_}return a.stagingDocument_}function n(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];K[e.name]&&("template"!==e.name&&b.setAttribute(e.name,e.value),a.removeAttribute(e.name))}return b}function o(a){var b=a.ownerDocument.createElement("template");a.parentNode.insertBefore(b,a);for(var c=a.attributes,d=c.length;d-->0;){var e=c[d];b.setAttribute(e.name,e.value),a.removeAttribute(e.name)}return a.parentNode.removeChild(a),b}function p(a,b,c){var d=a.content;if(c)return void d.appendChild(b);for(var e;e=b.firstChild;)d.appendChild(e)}function q(a){P?a.__proto__=HTMLTemplateElement.prototype:k(a,HTMLTemplateElement.prototype)}function r(a){a.setModelFn_||(a.setModelFn_=function(){a.setModelFnScheduled_=!1;var b=z(a,a.delegate_&&a.delegate_.prepareBinding);w(a,b,a.model_)}),a.setModelFnScheduled_||(a.setModelFnScheduled_=!0,Observer.runEOM_(a.setModelFn_))}function s(a,b,c,d){if(a&&a.length){for(var e,f=a.length,g=0,h=0,i=0,j=!0;f>h;){var g=a.indexOf("{{",h),k=a.indexOf("[[",h),l=!1,m="}}";if(k>=0&&(0>g||g>k)&&(g=k,l=!0,m="]]"),i=0>g?-1:a.indexOf(m,g+2),0>i){if(!e)return;e.push(a.slice(h));break}e=e||[],e.push(a.slice(h,g));var n=a.slice(g+2,i).trim();e.push(l),j=j&&l;var o=d&&d(n,b,c);e.push(null==o?Path.get(n):null),e.push(o),h=i+2}return h===f&&e.push(""),e.hasOnePath=5===e.length,e.isSimplePath=e.hasOnePath&&""==e[0]&&""==e[4],e.onlyOneTime=j,e.combinator=function(a){for(var b=e[0],c=1;c<e.length;c+=4){var d=e.hasOnePath?a:a[(c-1)/4];void 0!==d&&(b+=d),b+=e[c+3]}return b},e}}function t(a,b,c,d){if(b.hasOnePath){var e=b[3],f=e?e(d,c,!0):b[2].getValueFrom(d);return b.isSimplePath?f:b.combinator(f)}for(var g=[],h=1;h<b.length;h+=4){var e=b[h+2];g[(h-1)/4]=e?e(d,c):b[h+1].getValueFrom(d)}return b.combinator(g)}function u(a,b,c,d){var e=b[3],f=e?e(d,c,!1):new PathObserver(d,b[2]);return b.isSimplePath?f:new ObserverTransform(f,b.combinator)}function v(a,b,c,d){if(b.onlyOneTime)return t(a,b,c,d);if(b.hasOnePath)return u(a,b,c,d);for(var e=new CompoundObserver,f=1;f<b.length;f+=4){var g=b[f],h=b[f+2];if(h){var i=h(d,c,g);g?e.addPath(i):e.addObserver(i)}else{var j=b[f+1];g?e.addPath(j.getValueFrom(d)):e.addPath(d,j)}}return new ObserverTransform(e,b.combinator)}function w(a,b,c,d){for(var e=0;e<b.length;e+=2){var f=b[e],g=b[e+1],h=v(f,g,a,c),i=a.bind(f,h,g.onlyOneTime);i&&d&&d.push(i)}if(a.bindFinished(),b.isTemplate){a.model_=c;var j=a.processBindingDirectives_(b);d&&j&&d.push(j)}}function x(a,b,c){var d=a.getAttribute(b);return s(""==d?"{{}}":d,b,a,c)}function y(a,c){b(a);for(var d=[],e=0;e<a.attributes.length;e++){for(var f=a.attributes[e],g=f.name,i=f.value;"_"===g[0];)g=g.substring(1);if(!h(a)||g!==J&&g!==H&&g!==I){var j=s(i,g,a,c);j&&d.push(g,j)}}return h(a)&&(d.isTemplate=!0,d["if"]=x(a,J,c),d.bind=x(a,H,c),d.repeat=x(a,I,c),!d["if"]||d.bind||d.repeat||(d.bind=s("{{}}",H,a,c))),d}function z(a,b){if(a.nodeType===Node.ELEMENT_NODE)return y(a,b);if(a.nodeType===Node.TEXT_NODE){var c=s(a.data,"textContent",a,b);if(c)return["textContent",c]}return[]}function A(a,b,c,d,e,f,g){for(var h=b.appendChild(c.importNode(a,!1)),i=0,j=a.firstChild;j;j=j.nextSibling)A(j,h,c,d.children[i++],e,f,g);return d.isTemplate&&(HTMLTemplateElement.decorate(h,a),f&&h.setDelegate_(f)),w(h,d,e,g),h}function B(a,b){var c=z(a,b);c.children={};for(var d=0,e=a.firstChild;e;e=e.nextSibling)c.children[d++]=B(e,b);return c}function C(a){var b=a.id_;return b||(b=a.id_=S++),b}function D(a,b){var c=C(a);if(b){var d=b.bindingMaps[c];return d||(d=b.bindingMaps[c]=B(a,b.prepareBinding)||[]),d}var d=a.bindingMap_;return d||(d=a.bindingMap_=B(a,void 0)||[]),d}function E(a){this.closed=!1,this.templateElement_=a,this.instances=[],this.deps=void 0,this.iteratedValue=[],this.presentValue=void 0,this.arrayObserver=void 0}var F,G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.Map&&"function"==typeof a.Map.prototype.forEach?F=a.Map:(F=function(){this.keys=[],this.values=[]},F.prototype={set:function(a,b){var c=this.keys.indexOf(a);0>c?(this.keys.push(a),this.values.push(b)):this.values[c]=b},get:function(a){var b=this.keys.indexOf(a);if(!(0>b))return this.values[b]},"delete":function(a){var b=this.keys.indexOf(a);return 0>b?!1:(this.keys.splice(b,1),this.values.splice(b,1),!0)},forEach:function(a,b){for(var c=0;c<this.keys.length;c++)a.call(b||this,this.values[c],this.keys[c],this)}});"function"!=typeof document.contains&&(Document.prototype.contains=function(a){return a===this||a.parentNode===this?!0:this.documentElement.contains(a)});var H="bind",I="repeat",J="if",K={template:!0,repeat:!0,bind:!0,ref:!0,"if":!0},L={THEAD:!0,TBODY:!0,TFOOT:!0,TH:!0,TR:!0,TD:!0,COLGROUP:!0,COL:!0,CAPTION:!0,OPTION:!0,OPTGROUP:!0},M="undefined"!=typeof HTMLTemplateElement;M&&!function(){var a=document.createElement("template"),b=a.content.ownerDocument,c=b.appendChild(b.createElement("html")),d=c.appendChild(b.createElement("head")),e=b.createElement("base");e.href=document.baseURI,d.appendChild(e)}();var N="template, "+Object.keys(L).map(function(a){return a.toLowerCase()+"[template]"}).join(", ");document.addEventListener("DOMContentLoaded",function(){j(document),Platform.performMicrotaskCheckpoint()},!1),M||(a.HTMLTemplateElement=function(){throw TypeError("Illegal constructor")});var O,P="__proto__"in{};"function"==typeof MutationObserver&&(O=new MutationObserver(function(a){for(var b=0;b<a.length;b++)a[b].target.refChanged_()})),HTMLTemplateElement.decorate=function(a,c){if(a.templateIsDecorated_)return!1;var d=a;d.templateIsDecorated_=!0;var h=f(d)&&M,i=h,k=!h,m=!1;if(h||(g(d)?(b(!c),d=n(a),d.templateIsDecorated_=!0,h=M,m=!0):e(d)&&(d=o(a),d.templateIsDecorated_=!0,h=M)),!h){q(d);var r=l(d);d.content_=r.createDocumentFragment()}return c?d.instanceRef_=c:k?p(d,a,m):i&&j(d.content),!0},HTMLTemplateElement.bootstrap=j;var Q=a.HTMLUnknownElement||HTMLElement,R={get:function(){return this.content_},enumerable:!0,configurable:!0};M||(HTMLTemplateElement.prototype=Object.create(Q.prototype),Object.defineProperty(HTMLTemplateElement.prototype,"content",R)),k(HTMLTemplateElement.prototype,{bind:function(a,b,c){if("ref"!=a)return Element.prototype.bind.call(this,a,b,c);var d=this,e=c?b:b.open(function(a){d.setAttribute("ref",a),d.refChanged_()});return this.setAttribute("ref",e),this.refChanged_(),c?void 0:(this.bindings_?this.bindings_.ref=b:this.bindings_={ref:b},b)},processBindingDirectives_:function(a){return this.iterator_&&this.iterator_.closeDeps(),a["if"]||a.bind||a.repeat?(this.iterator_||(this.iterator_=new E(this)),this.iterator_.updateDependencies(a,this.model_),O&&O.observe(this,{attributes:!0,attributeFilter:["ref"]}),this.iterator_):void(this.iterator_&&(this.iterator_.close(),this.iterator_=void 0))},createInstance:function(a,b,c){b?c=this.newDelegate_(b):c||(c=this.delegate_),this.refContent_||(this.refContent_=this.ref_.content);var d=this.refContent_;if(null===d.firstChild)return T;var e=D(d,c),f=m(this),g=f.createDocumentFragment();g.templateCreator_=this,g.protoContent_=d,g.bindings_=[],g.terminator_=null;for(var h=g.templateInstance_={firstNode:null,lastNode:null,model:a},i=0,j=!1,k=d.firstChild;k;k=k.nextSibling){null===k.nextSibling&&(j=!0);var l=A(k,g,f,e.children[i++],a,c,g.bindings_);l.templateInstance_=h,j&&(g.terminator_=l)}return h.firstNode=g.firstChild,h.lastNode=g.lastChild,g.templateCreator_=void 0,g.protoContent_=void 0,g},get model(){return this.model_},set model(a){this.model_=a,r(this)},get bindingDelegate(){return this.delegate_&&this.delegate_.raw},refChanged_:function(){this.iterator_&&this.refContent_!==this.ref_.content&&(this.refContent_=void 0,this.iterator_.valueChanged(),this.iterator_.updateIteratedValue(this.iterator_.getUpdatedValue()))},clear:function(){this.model_=void 0,this.delegate_=void 0,this.bindings_&&this.bindings_.ref&&this.bindings_.ref.close(),this.refContent_=void 0,this.iterator_&&(this.iterator_.valueChanged(),this.iterator_.close(),this.iterator_=void 0)},setDelegate_:function(a){this.delegate_=a,this.bindingMap_=void 0,this.iterator_&&(this.iterator_.instancePositionChangedFn_=void 0,this.iterator_.instanceModelFn_=void 0)},newDelegate_:function(a){function b(b){var c=a&&a[b];if("function"==typeof c)return function(){return c.apply(a,arguments)}}if(a)return{bindingMaps:{},raw:a,prepareBinding:b("prepareBinding"),prepareInstanceModel:b("prepareInstanceModel"),prepareInstancePositionChanged:b("prepareInstancePositionChanged")}},set bindingDelegate(a){if(this.delegate_)throw Error("Template must be cleared before a new bindingDelegate can be assigned");this.setDelegate_(this.newDelegate_(a))},get ref_(){var a=d(this,this.getAttribute("ref"));if(a||(a=this.instanceRef_),!a)return this;var b=a.ref_;return b?b:a}});var S=1;Object.defineProperty(Node.prototype,"templateInstance",{get:function(){var a=this.templateInstance_;return a?a:this.parentNode?this.parentNode.templateInstance:void 0}});var T=document.createDocumentFragment();T.bindings_=[],T.terminator_=null,E.prototype={closeDeps:function(){var a=this.deps;a&&(a.ifOneTime===!1&&a.ifValue.close(),a.oneTime===!1&&a.value.close())},updateDependencies:function(a,b){this.closeDeps();var c=this.deps={},d=this.templateElement_,e=!0;if(a["if"]){if(c.hasIf=!0,c.ifOneTime=a["if"].onlyOneTime,c.ifValue=v(J,a["if"],d,b),e=c.ifValue,c.ifOneTime&&!e)return void this.valueChanged();c.ifOneTime||(e=e.open(this.updateIfValue,this))}a.repeat?(c.repeat=!0,c.oneTime=a.repeat.onlyOneTime,c.value=v(I,a.repeat,d,b)):(c.repeat=!1,c.oneTime=a.bind.onlyOneTime,c.value=v(H,a.bind,d,b));var f=c.value;return c.oneTime||(f=f.open(this.updateIteratedValue,this)),e?void this.updateValue(f):void this.valueChanged()},getUpdatedValue:function(){var a=this.deps.value;return this.deps.oneTime||(a=a.discardChanges()),a},updateIfValue:function(a){return a?void this.updateValue(this.getUpdatedValue()):void this.valueChanged()},updateIteratedValue:function(a){if(this.deps.hasIf){var b=this.deps.ifValue;if(this.deps.ifOneTime||(b=b.discardChanges()),!b)return void this.valueChanged()}this.updateValue(a)},updateValue:function(a){this.deps.repeat||(a=[a]);var b=this.deps.repeat&&!this.deps.oneTime&&Array.isArray(a);this.valueChanged(a,b)},valueChanged:function(a,b){Array.isArray(a)||(a=[]),a!==this.iteratedValue&&(this.unobserve(),this.presentValue=a,b&&(this.arrayObserver=new ArrayObserver(this.presentValue),this.arrayObserver.open(this.handleSplices,this)),this.handleSplices(ArrayObserver.calculateSplices(this.presentValue,this.iteratedValue)))},getLastInstanceNode:function(a){if(-1==a)return this.templateElement_;var b=this.instances[a],c=b.terminator_;if(!c)return this.getLastInstanceNode(a-1);if(c.nodeType!==Node.ELEMENT_NODE||this.templateElement_===c)return c;var d=c.iterator_;return d?d.getLastTemplateNode():c},getLastTemplateNode:function(){return this.getLastInstanceNode(this.instances.length-1)},insertInstanceAt:function(a,b){var c=this.getLastInstanceNode(a-1),d=this.templateElement_.parentNode;this.instances.splice(a,0,b),d.insertBefore(b,c.nextSibling)},extractInstanceAt:function(a){for(var b=this.getLastInstanceNode(a-1),c=this.getLastInstanceNode(a),d=this.templateElement_.parentNode,e=this.instances.splice(a,1)[0];c!==b;){var f=b.nextSibling;f==c&&(c=b),e.appendChild(d.removeChild(f))}return e},getDelegateFn:function(a){return a=a&&a(this.templateElement_),"function"==typeof a?a:null},handleSplices:function(a){if(!this.closed&&a.length){var b=this.templateElement_;if(!b.parentNode)return void this.close();ArrayObserver.applySplices(this.iteratedValue,this.presentValue,a);var c=b.delegate_;void 0===this.instanceModelFn_&&(this.instanceModelFn_=this.getDelegateFn(c&&c.prepareInstanceModel)),void 0===this.instancePositionChangedFn_&&(this.instancePositionChangedFn_=this.getDelegateFn(c&&c.prepareInstancePositionChanged));for(var d=new F,e=0,f=0;f<a.length;f++){for(var g=a[f],h=g.removed,i=0;i<h.length;i++){var j=h[i],k=this.extractInstanceAt(g.index+e);k!==T&&d.set(j,k)}e-=g.addedCount}for(var f=0;f<a.length;f++)for(var g=a[f],l=g.index;l<g.index+g.addedCount;l++){var j=this.iteratedValue[l],k=d.get(j);k?d["delete"](j):(this.instanceModelFn_&&(j=this.instanceModelFn_(j)),k=void 0===j?T:b.createInstance(j,void 0,c)),this.insertInstanceAt(l,k)}d.forEach(function(a){this.closeInstanceBindings(a)},this),this.instancePositionChangedFn_&&this.reportInstancesMoved(a)}},reportInstanceMoved:function(a){var b=this.instances[a];b!==T&&this.instancePositionChangedFn_(b.templateInstance_,a)},reportInstancesMoved:function(a){for(var b=0,c=0,d=0;d<a.length;d++){var e=a[d];if(0!=c)for(;b<e.index;)this.reportInstanceMoved(b),b++;else b=e.index;for(;b<e.index+e.addedCount;)this.reportInstanceMoved(b),b++;c+=e.addedCount-e.removed.length}if(0!=c)for(var f=this.instances.length;f>b;)this.reportInstanceMoved(b),b++},closeInstanceBindings:function(a){for(var b=a.bindings_,c=0;c<b.length;c++)b[c].close()},unobserve:function(){this.arrayObserver&&(this.arrayObserver.close(),this.arrayObserver=void 0)},close:function(){if(!this.closed){this.unobserve();for(var a=0;a<this.instances.length;a++)this.closeInstanceBindings(this.instances[a]);this.instances.length=0,this.closeDeps(),this.templateElement_.iterator_=void 0,this.closed=!0}}},HTMLTemplateElement.forAllTemplatesFrom_=i}(this),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&"	"!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x<l.length;x++){var y=l[x];if("	"!=y&&"\n"!=y&&"\r"!=y)if(":"!=y||null!==this._password){var z=e(y);null!==this._password?this._password+=z:this._username+=z}else this._password="";else i("Invalid whitespace in authority.")}l=""}else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){k-=l.length,l="",j="host";continue}l+=u}break;case"file host":if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){2!=l.length||!p.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?j="relative path start":(this._host=d.call(this,l),l="",j="relative path start"):j="relative path";continue}"	"==u||"\n"==u||"\r"==u?i("Invalid whitespace in file host."):l+=u;break;case"host":case"hostname":if(":"!=u||s){if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){if(this._host=d.call(this,l),l="",j="relative path start",g)break a;continue}"	"!=u&&"\n"!=u&&"\r"!=u?("["==u?s=!0:"]"==u&&(s=!1),l+=u):i("Invalid code point in host/hostname: "+u)}else if(this._host=d.call(this,l),l="",j="port","hostname"==g)break a;break;case"port":if(/[0-9]/.test(u))l+=u;else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u||g){if(""!=l){var A=parseInt(l,10);A!=m[this._scheme]&&(this._port=A+""),l=""}if(g)break a;j="relative path start";continue}"	"==u||"\n"==u||"\r"==u?i("Invalid code point in port: "+u):c.call(this)}break;case"relative path start":if("\\"==u&&i("'\\' not allowed in path."),j="relative path","/"!=u&&"\\"!=u)continue;break;case"relative path":if(o!=u&&"/"!=u&&"\\"!=u&&(g||"?"!=u&&"#"!=u))"	"!=u&&"\n"!=u&&"\r"!=u&&(l+=e(u));else{"\\"==u&&i("\\ not allowed in relative path.");var B;(B=n[l.toLowerCase()])&&(l=B),".."==l?(this._path.pop(),"/"!=u&&"\\"!=u&&this._path.push("")):"."==l&&"/"!=u&&"\\"!=u?this._path.push(""):"."!=l&&("file"==this._scheme&&0==this._path.length&&2==l.length&&p.test(l[0])&&"|"==l[1]&&(l=l[0]+":"),this._path.push(l)),l="","?"==u?(this._query="?",j="query"):"#"==u&&(this._fragment="#",j="fragment")}break;case"query":g||"#"!=u?o!=u&&"	"!=u&&"\n"!=u&&"\r"!=u&&(this._query+=f(u)):(this._fragment="#",j="fragment");break;case"fragment":o!=u&&"	"!=u&&"\n"!=u&&"\r"!=u&&(this._fragment+=u)}k++}}function h(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function i(a,b){void 0===b||b instanceof i||(b=new i(String(b))),this._url=a,h.call(this);var c=a.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");g.call(this,c,null,b)}var j=!1;if(!a.forceJURL)try{var k=new URL("b","http://a");k.pathname="c%20d",j="http://a/c%20d"===k.href}catch(l){}if(!j){var m=Object.create(null);m.ftp=21,m.file=0,m.gopher=70,m.http=80,m.https=443,m.ws=80,m.wss=443;var n=Object.create(null);n["%2e"]=".",n[".%2e"]="..",n["%2e."]="..",n["%2e%2e"]="..";var o=void 0,p=/[a-zA-Z]/,q=/[a-zA-Z0-9\+\-\.]/;i.prototype={get href(){if(this._isInvalid)return this._url;var a="";return(""!=this._username||null!=this._password)&&(a=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+a+this.host:"")+this.pathname+this._query+this._fragment},set href(a){h.call(this),g.call(this,a)},get protocol(){return this._scheme+":"},set protocol(a){this._isInvalid||g.call(this,a+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"host")},get hostname(){return this._host},set hostname(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"hostname")},get port(){return this._port},set port(a){!this._isInvalid&&this._isRelative&&g.call(this,a,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(a){!this._isInvalid&&this._isRelative&&(this._path=[],g.call(this,a,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(a){!this._isInvalid&&this._isRelative&&(this._query="?","?"==a[0]&&(a=a.slice(1)),g.call(this,a,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(a){this._isInvalid||(this._fragment="#","#"==a[0]&&(a=a.slice(1)),g.call(this,a,"fragment"))},get origin(){var a;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return a=this.host,a?this._scheme+"://"+a:""}};var r=a.URL;r&&(i.createObjectURL=function(){return r.createObjectURL.apply(r,arguments)},i.revokeObjectURL=function(a){r.revokeObjectURL(a)}),a.URL=i}}(this),function(a){function b(a){f.textContent=d++,e.push(a)}function c(){for(;e.length;)e.shift()()}var d=0,e=[],f=document.createTextNode("");new(window.MutationObserver||JsMutationObserver)(c).observe(f,{characterData:!0}),a.endOfMicrotask=b,Platform.endOfMicrotask=b}(Polymer),function(a){function b(){g||(g=!0,c(function(){g=!1,d.data&&console.group("flush"),Platform.performMicrotaskCheckpoint(),d.data&&console.groupEnd()}))}var c=a.endOfMicrotask,d=window.WebComponents?WebComponents.flags.log:{},e=document.createElement("style");e.textContent="template {display: none !important;} /* injected by platform.js */";var f=document.querySelector("head");f.insertBefore(e,f.firstChild);var g;if(Observer.hasObjectObserve)b=function(){};else{var h=125;window.addEventListener("WebComponentsReady",function(){b();var c=function(){"hidden"===document.visibilityState?a.flushPoll&&clearInterval(a.flushPoll):a.flushPoll=setInterval(b,h)};"string"==typeof document.visibilityState&&document.addEventListener("visibilitychange",c),c()})}if(window.CustomElements&&!CustomElements.useNative){var i=Document.prototype.importNode;Document.prototype.importNode=function(a,b){var c=i.call(this,a,b);return CustomElements.upgradeAll(c),c}}a.flush=b,Platform.flush=b}(window.Polymer),function(a){function b(a){var b=new URL(a.ownerDocument.baseURI);return b.search="",b.hash="",b}function c(a,b,c,e){return a.replace(e,function(a,e,f,g){var h=f.replace(/["']/g,"");return h=d(b,h,c),e+"'"+h+"'"+g})}function d(a,b,c){if(b&&"/"===b[0])return b;if(b&&"#"===b[0])return b;var d=new URL(b,a);return c?d.href:e(d.href)}function e(a){var c=b(document.documentElement),d=new URL(a,c);return d.host===c.host&&d.port===c.port&&d.protocol===c.protocol?f(c,d):a}function f(a,b){for(var c=a.pathname,d=b.pathname,e=c.split("/"),f=d.split("/");e.length&&e[0]===f[0];)e.shift(),f.shift();for(var g=0,h=e.length-1;h>g;g++)f.unshift("..");var i=b.href.slice(-1)===m?m:b.hash;return f.join("/")+b.search+i}var g={resolveDom:function(a,c){c=c||b(a),this.resolveAttributes(a,c),this.resolveStyles(a,c);var d=a.querySelectorAll("template");if(d)for(var e,f=0,g=d.length;g>f&&(e=d[f]);f++)e.content&&this.resolveDom(e.content,c)},resolveTemplate:function(a){this.resolveDom(a.content,b(a))},resolveStyles:function(a,b){var c=a.querySelectorAll("style");if(c)for(var d,e=0,f=c.length;f>e&&(d=c[e]);e++)this.resolveStyle(d,b)},resolveStyle:function(a,c){c=c||b(a),a.textContent=this.resolveCssText(a.textContent,c)},resolveCssText:function(a,b,d){return a=c(a,b,d,h),c(a,b,d,i)},resolveAttributes:function(a,b){a.hasAttributes&&a.hasAttributes()&&this.resolveElementAttributes(a,b);var c=a&&a.querySelectorAll(k);if(c)for(var d,e=0,f=c.length;f>e&&(d=c[e]);e++)this.resolveElementAttributes(d,b)},resolveElementAttributes:function(a,e){e=e||b(a),j.forEach(function(b){var f,g=a.attributes[b],i=g&&g.value;i&&i.search(l)<0&&(f="style"===b?c(i,e,!1,h):d(e,i),g.value=f)})}},h=/(url\()([^)]*)(\))/g,i=/(@import[\s]+(?!url\())([^;]*)(;)/g,j=["href","src","action","style","url"],k="["+j.join("],[")+"]",l="{{.*}}",m="#";a.urlResolver=g}(Polymer),function(a){function b(a){this.cache=Object.create(null),this.map=Object.create(null),this.requests=0,this.regex=a}var c=Polymer.endOfMicrotask;b.prototype={extractUrls:function(a,b){for(var c,d,e=[];c=this.regex.exec(a);)d=new URL(c[1],b),e.push({matched:c[0],url:d.href});return e},process:function(a,b,c){var d=this.extractUrls(a,b),e=c.bind(null,this.map);this.fetch(d,e)},fetch:function(a,b){var c=a.length;if(!c)return b();for(var d,e,f,g=function(){0===--c&&b()},h=0;c>h;h++)d=a[h],f=d.url,e=this.cache[f],e||(e=this.xhr(f),e.match=d,this.cache[f]=e),e.wait(g)},handleXhr:function(a){var b=a.match,c=b.url,d=a.response||a.responseText||"";this.map[c]=d,this.fetch(this.extractUrls(d,c),a.resolve)},xhr:function(a){this.requests++;var b=new XMLHttpRequest;return b.open("GET",a,!0),b.send(),b.onerror=b.onload=this.handleXhr.bind(this,b),b.pending=[],b.resolve=function(){for(var a=b.pending,c=0;c<a.length;c++)a[c]();b.pending=null},b.wait=function(a){b.pending?b.pending.push(a):c(a)},b}},a.Loader=b}(Polymer),function(a){function b(){this.loader=new d(this.regex)}var c=a.urlResolver,d=a.Loader;b.prototype={regex:/@import\s+(?:url)?["'\(]*([^'"\)]*)['"\)]*;/g,resolve:function(a,b,c){var d=function(d){c(this.flatten(a,b,d))}.bind(this);this.loader.process(a,b,d)},resolveNode:function(a,b,c){var d=a.textContent,e=function(b){a.textContent=b,c(a)};this.resolve(d,b,e)},flatten:function(a,b,d){for(var e,f,g,h=this.loader.extractUrls(a,b),i=0;i<h.length;i++)e=h[i],f=e.url,g=c.resolveCssText(d[f],f,!0),g=this.flatten(g,b,d),a=a.replace(e.matched,g);return a},loadStyles:function(a,b,c){function d(){f++,f===g&&c&&c()}for(var e,f=0,g=a.length,h=0;g>h&&(e=a[h]);h++)this.resolveNode(e,b,d)}};var e=new b;a.styleResolver=e}(Polymer),function(a){function b(a,b){return a&&b&&Object.getOwnPropertyNames(b).forEach(function(c){var d=Object.getOwnPropertyDescriptor(b,c);d&&(Object.defineProperty(a,c,d),"function"==typeof d.value&&(d.value.nom=c))}),a}function c(a){for(var b=a||{},c=1;c<arguments.length;c++){var e=arguments[c];try{for(var f in e)d(f,e,b)}catch(g){}}return b}function d(a,b,c){var d=e(b,a);Object.defineProperty(c,a,d)}function e(a,b){if(a){var c=Object.getOwnPropertyDescriptor(a,b);return c||e(Object.getPrototypeOf(a),b)}}a.extend=b,a.mixin=c,Platform.mixin=c}(Polymer),function(a){function b(a,b,d){return a?a.stop():a=new c(this),a.go(b,d),a}var c=function(a){this.context=a,this.boundComplete=this.complete.bind(this)};c.prototype={go:function(a,b){this.callback=a;var c;b?(c=setTimeout(this.boundComplete,b),this.handle=function(){clearTimeout(c)}):(c=requestAnimationFrame(this.boundComplete),this.handle=function(){cancelAnimationFrame(c)})},stop:function(){this.handle&&(this.handle(),this.handle=null)},complete:function(){this.handle&&(this.stop(),this.callback.call(this.context))}},a.job=b}(Polymer),function(a){function b(a,b,c){var d="string"==typeof a?document.createElement(a):a.cloneNode(!0);if(d.innerHTML=b,c)for(var e in c)d.setAttribute(e,c[e]);return d}var c={};HTMLElement.register=function(a,b){c[a]=b},HTMLElement.getPrototypeForTag=function(a){var b=a?c[a]:HTMLElement.prototype;return b||Object.getPrototypeOf(document.createElement(a))};var d=Event.prototype.stopPropagation;Event.prototype.stopPropagation=function(){this.cancelBubble=!0,d.apply(this,arguments)};var e=DOMTokenList.prototype.add,f=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){for(var a=0;a<arguments.length;a++)e.call(this,arguments[a])},DOMTokenList.prototype.remove=function(){for(var a=0;a<arguments.length;a++)f.call(this,arguments[a])},DOMTokenList.prototype.toggle=function(a,b){1==arguments.length&&(b=!this.contains(a)),b?this.add(a):this.remove(a)},DOMTokenList.prototype["switch"]=function(a,b){a&&this.remove(a),b&&this.add(b)};var g=function(){return Array.prototype.slice.call(this)},h=window.NamedNodeMap||window.MozNamedAttrMap||{};NodeList.prototype.array=g,h.prototype.array=g,HTMLCollection.prototype.array=g,a.createDOM=b}(Polymer),function(a){function b(a){var e=b.caller,g=e.nom,h=e._super;h||(g||(g=e.nom=c.call(this,e)),g||console.warn("called super() on a method not installed declaratively (has no .nom property)"),h=d(e,g,f(this)));var i=h[g];return i?(i._super||d(i,g,h),i.apply(this,a||[])):void 0}function c(a){for(var b=this.__proto__;b&&b!==HTMLElement.prototype;){for(var c,d=Object.getOwnPropertyNames(b),e=0,f=d.length;f>e&&(c=d[e]);e++){var g=Object.getOwnPropertyDescriptor(b,c);if("function"==typeof g.value&&g.value===a)return c}b=b.__proto__}}function d(a,b,c){var d=e(c,b,a);return d[b]&&(d[b].nom=b),a._super=d}function e(a,b,c){for(;a;){if(a[b]!==c&&a[b])return a;a=f(a)}return Object}function f(a){return a.__proto__}a["super"]=b}(Polymer),function(a){function b(a){return a}function c(a,b){var c=typeof b;return b instanceof Date&&(c="date"),d[c](a,b)}var d={string:b,undefined:b,date:function(a){return new Date(Date.parse(a)||Date.now())},"boolean":function(a){return""===a?!0:"false"===a?!1:!!a},number:function(a){var b=parseFloat(a);return 0===b&&(b=parseInt(a)),isNaN(b)?a:b},object:function(a,b){if(null===b)return a;try{return JSON.parse(a.replace(/'/g,'"'))}catch(c){return a}},"function":function(a,b){return b}};a.deserializeValue=c}(Polymer),function(a){var b=a.extend,c={};c.declaration={},c.instance={},c.publish=function(a,c){for(var d in a)b(c,a[d])},a.api=c}(Polymer),function(a){var b={async:function(a,b,c){Polymer.flush(),b=b&&b.length?b:[b];var d=function(){(this[a]||a).apply(this,b)}.bind(this),e=c?setTimeout(d,c):requestAnimationFrame(d);return c?e:~e},cancelAsync:function(a){0>a?cancelAnimationFrame(~a):clearTimeout(a)},fire:function(a,b,c,d,e){var f=c||this,b=null===b||void 0===b?{}:b,g=new CustomEvent(a,{bubbles:void 0!==d?d:!0,cancelable:void 0!==e?e:!0,detail:b});return f.dispatchEvent(g),g},asyncFire:function(){this.async("fire",arguments)},classFollows:function(a,b,c){b&&b.classList.remove(c),a&&a.classList.add(c)},injectBoundHTML:function(a,b){var c=document.createElement("template");c.innerHTML=a;var d=this.instanceTemplate(c);return b&&(b.textContent="",b.appendChild(d)),d}},c=function(){},d={};b.asyncMethod=b.async,a.api.instance.utils=b,a.nop=c,a.nob=d}(Polymer),function(a){var b=window.WebComponents?WebComponents.flags.log:{},c="on-",d={EVENT_PREFIX:c,addHostListeners:function(){var a=this.eventDelegates;
-b.events&&Object.keys(a).length>0&&console.log("[%s] addHostListeners:",this.localName,a);for(var c in a){var d=a[c];PolymerGestures.addEventListener(this,c,this.element.getEventHandler(this,this,d))}},dispatchMethod:function(a,c,d){if(a){b.events&&console.group("[%s] dispatch [%s]",a.localName,c);var e="function"==typeof c?c:a[c];e&&e[d?"apply":"call"](a,d),b.events&&console.groupEnd(),Polymer.flush()}}};a.api.instance.events=d,a.addEventListener=function(a,b,c,d){PolymerGestures.addEventListener(wrap(a),b,c,d)},a.removeEventListener=function(a,b,c,d){PolymerGestures.removeEventListener(wrap(a),b,c,d)}}(Polymer),function(a){var b={copyInstanceAttributes:function(){var a=this._instanceAttributes;for(var b in a)this.hasAttribute(b)||this.setAttribute(b,a[b])},takeAttributes:function(){if(this._publishLC)for(var a,b=0,c=this.attributes,d=c.length;(a=c[b])&&d>b;b++)this.attributeToProperty(a.name,a.value)},attributeToProperty:function(b,c){var b=this.propertyForAttribute(b);if(b){if(c&&c.search(a.bindPattern)>=0)return;var d=this[b],c=this.deserializeValue(c,d);c!==d&&(this[b]=c)}},propertyForAttribute:function(a){var b=this._publishLC&&this._publishLC[a];return b},deserializeValue:function(b,c){return a.deserializeValue(b,c)},serializeValue:function(a,b){return"boolean"===b?a?"":void 0:"object"!==b&&"function"!==b&&void 0!==a?a:void 0},reflectPropertyToAttribute:function(a){var b=typeof this[a],c=this.serializeValue(this[a],b);void 0!==c?this.setAttribute(a,c):"boolean"===b&&this.removeAttribute(a)}};a.api.instance.attributes=b}(Polymer),function(a){function b(a,b){return a===b?0!==a||1/a===1/b:f(a)&&f(b)?!0:a!==a&&b!==b}function c(a,b){return void 0===b&&null===a?b:null===b||void 0===b?a:b}var d=window.WebComponents?WebComponents.flags.log:{},e={object:void 0,type:"update",name:void 0,oldValue:void 0},f=Number.isNaN||function(a){return"number"==typeof a&&isNaN(a)},g={createPropertyObserver:function(){var a=this._observeNames;if(a&&a.length){var b=this._propertyObserver=new CompoundObserver(!0);this.registerObserver(b);for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)b.addPath(this,c),this.observeArrayValue(c,this[c],null)}},openPropertyObserver:function(){this._propertyObserver&&this._propertyObserver.open(this.notifyPropertyChanges,this)},notifyPropertyChanges:function(a,b,c){var d,e,f={};for(var g in b)if(d=c[2*g+1],e=this.observe[d]){var h=b[g],i=a[g];this.observeArrayValue(d,i,h),f[e]||(void 0!==h&&null!==h||void 0!==i&&null!==i)&&(f[e]=!0,this.invokeMethod(e,[h,i,arguments]))}},invokeMethod:function(a,b){var c=this[a]||a;"function"==typeof c&&c.apply(this,b)},deliverChanges:function(){this._propertyObserver&&this._propertyObserver.deliver()},observeArrayValue:function(a,b,c){var e=this.observe[a];if(e&&(Array.isArray(c)&&(d.observe&&console.log("[%s] observeArrayValue: unregister observer [%s]",this.localName,a),this.closeNamedObserver(a+"__array")),Array.isArray(b))){d.observe&&console.log("[%s] observeArrayValue: register observer [%s]",this.localName,a,b);var f=new ArrayObserver(b);f.open(function(a){this.invokeMethod(e,[a])},this),this.registerNamedObserver(a+"__array",f)}},emitPropertyChangeRecord:function(a,c,d){if(!b(c,d)&&(this._propertyChanged(a,c,d),Observer.hasObjectObserve)){var f=this._objectNotifier;f||(f=this._objectNotifier=Object.getNotifier(this)),e.object=this,e.name=a,e.oldValue=d,f.notify(e)}},_propertyChanged:function(a){this.reflect[a]&&this.reflectPropertyToAttribute(a)},bindProperty:function(a,b,d){if(d)return void(this[a]=b);var e=this.element.prototype.computed;if(e&&e[a]){var f=a+"ComputedBoundObservable_";return void(this[f]=b)}return this.bindToAccessor(a,b,c)},bindToAccessor:function(a,c,d){function e(b,c){j[f]=b;var d=j[h];d&&"function"==typeof d.setValue&&d.setValue(b),j.emitPropertyChangeRecord(a,b,c)}var f=a+"_",g=a+"Observable_",h=a+"ComputedBoundObservable_";this[g]=c;var i=this[f],j=this,k=c.open(e);if(d&&!b(i,k)){var l=d(i,k);b(k,l)||(k=l,c.setValue&&c.setValue(k))}e(k,i);var m={close:function(){c.close(),j[g]=void 0,j[h]=void 0}};return this.registerObserver(m),m},createComputedProperties:function(){if(this._computedNames)for(var a=0;a<this._computedNames.length;a++){var b=this._computedNames[a],c=this.computed[b];try{var d=PolymerExpressions.getExpression(c),e=d.getBinding(this,this.element.syntax);this.bindToAccessor(b,e)}catch(f){console.error("Failed to create computed property",f)}}},registerObserver:function(a){return this._observers?void this._observers.push(a):void(this._observers=[a])},closeObservers:function(){if(this._observers){for(var a=this._observers,b=0;b<a.length;b++){var c=a[b];c&&"function"==typeof c.close&&c.close()}this._observers=[]}},registerNamedObserver:function(a,b){var c=this._namedObservers||(this._namedObservers={});c[a]=b},closeNamedObserver:function(a){var b=this._namedObservers;return b&&b[a]?(b[a].close(),b[a]=null,!0):void 0},closeNamedObservers:function(){if(this._namedObservers){for(var a in this._namedObservers)this.closeNamedObserver(a);this._namedObservers={}}}};a.api.instance.properties=g}(Polymer),function(a){var b=window.WebComponents?WebComponents.flags.log:{},c={instanceTemplate:function(a){HTMLTemplateElement.decorate(a);for(var b=this.syntax||!a.bindingDelegate&&this.element.syntax,c=a.createInstance(this,b),d=c.bindings_,e=0;e<d.length;e++)this.registerObserver(d[e]);return c},bind:function(a,b,c){var d=this.propertyForAttribute(a);if(d){var e=this.bindProperty(d,b,c);return Platform.enableBindingsReflection&&e&&(e.path=b.path_,this._recordBinding(d,e)),this.reflect[d]&&this.reflectPropertyToAttribute(d),e}return this.mixinSuper(arguments)},_recordBinding:function(a,b){this.bindings_=this.bindings_||{},this.bindings_[a]=b},bindFinished:function(){this.makeElementReady()},asyncUnbindAll:function(){this._unbound||(b.unbind&&console.log("[%s] asyncUnbindAll",this.localName),this._unbindAllJob=this.job(this._unbindAllJob,this.unbindAll,0))},unbindAll:function(){this._unbound||(this.closeObservers(),this.closeNamedObservers(),this._unbound=!0)},cancelUnbindAll:function(){return this._unbound?void(b.unbind&&console.warn("[%s] already unbound, cannot cancel unbindAll",this.localName)):(b.unbind&&console.log("[%s] cancelUnbindAll",this.localName),void(this._unbindAllJob&&(this._unbindAllJob=this._unbindAllJob.stop())))}},d=/\{\{([^{}]*)}}/;a.bindPattern=d,a.api.instance.mdv=c}(Polymer),function(a){function b(a){return a.hasOwnProperty("PolymerBase")}function c(){}var d={PolymerBase:!0,job:function(a,b,c){if("string"!=typeof a)return Polymer.job.call(this,a,b,c);var d="___"+a;this[d]=Polymer.job.call(this,this[d],b,c)},"super":Polymer["super"],created:function(){},ready:function(){},createdCallback:function(){this.templateInstance&&this.templateInstance.model&&console.warn("Attributes on "+this.localName+" were data bound prior to Polymer upgrading the element. This may result in incorrect binding types."),this.created(),this.prepareElement(),this.ownerDocument.isStagingDocument||this.makeElementReady()},prepareElement:function(){return this._elementPrepared?void console.warn("Element already prepared",this.localName):(this._elementPrepared=!0,this.shadowRoots={},this.createPropertyObserver(),this.openPropertyObserver(),this.copyInstanceAttributes(),this.takeAttributes(),void this.addHostListeners())},makeElementReady:function(){this._readied||(this._readied=!0,this.createComputedProperties(),this.parseDeclarations(this.__proto__),this.removeAttribute("unresolved"),this.ready())},attributeChangedCallback:function(a){"class"!==a&&"style"!==a&&this.attributeToProperty(a,this.getAttribute(a)),this.attributeChanged&&this.attributeChanged.apply(this,arguments)},attachedCallback:function(){this.cancelUnbindAll(),this.attached&&this.attached(),this.hasBeenAttached||(this.hasBeenAttached=!0,this.domReady&&this.async("domReady"))},detachedCallback:function(){this.preventDispose||this.asyncUnbindAll(),this.detached&&this.detached(),this.leftView&&this.leftView()},parseDeclarations:function(a){a&&a.element&&(this.parseDeclarations(a.__proto__),a.parseDeclaration.call(this,a.element))},parseDeclaration:function(a){var b=this.fetchTemplate(a);if(b){var c=this.shadowFromTemplate(b);this.shadowRoots[a.name]=c}},fetchTemplate:function(a){return a.querySelector("template")},shadowFromTemplate:function(a){if(a){var b=this.createShadowRoot(),c=this.instanceTemplate(a);return b.appendChild(c),this.shadowRootReady(b,a),b}},lightFromTemplate:function(a,b){if(a){this.eventController=this;var c=this.instanceTemplate(a);return b?this.insertBefore(c,b):this.appendChild(c),this.shadowRootReady(this),c}},shadowRootReady:function(a){this.marshalNodeReferences(a)},marshalNodeReferences:function(a){var b=this.$=this.$||{};if(a)for(var c,d=a.querySelectorAll("[id]"),e=0,f=d.length;f>e&&(c=d[e]);e++)b[c.id]=c},onMutation:function(a,b){var c=new MutationObserver(function(a){b.call(this,c,a),c.disconnect()}.bind(this));c.observe(a,{childList:!0,subtree:!0})}};c.prototype=d,d.constructor=c,a.Base=c,a.isBase=b,a.api.instance.base=d}(Polymer),function(a){function b(a){return a.__proto__}function c(a,b){var c="",d=!1;b&&(c=b.localName,d=b.hasAttribute("is"));var e=WebComponents.ShadowCSS.makeScopeSelector(c,d);return WebComponents.ShadowCSS.shimCssText(a,e)}var d=(window.WebComponents?WebComponents.flags.log:{},window.ShadowDOMPolyfill),e="element",f="controller",g={STYLE_SCOPE_ATTRIBUTE:e,installControllerStyles:function(){var a=this.findStyleScope();if(a&&!this.scopeHasNamedStyle(a,this.localName)){for(var c=b(this),d="";c&&c.element;)d+=c.element.cssTextForScope(f),c=b(c);d&&this.installScopeCssText(d,a)}},installScopeStyle:function(a,b,c){var c=c||this.findStyleScope(),b=b||"";if(c&&!this.scopeHasNamedStyle(c,this.localName+b)){var d="";if(a instanceof Array)for(var e,f=0,g=a.length;g>f&&(e=a[f]);f++)d+=e.textContent+"\n\n";else d=a.textContent;this.installScopeCssText(d,c,b)}},installScopeCssText:function(a,b,e){if(b=b||this.findStyleScope(),e=e||"",b){d&&(a=c(a,b.host));var g=this.element.cssTextToScopeStyle(a,f);Polymer.applyStyleToScope(g,b),this.styleCacheForScope(b)[this.localName+e]=!0}},findStyleScope:function(a){for(var b=a||this;b.parentNode;)b=b.parentNode;return b},scopeHasNamedStyle:function(a,b){var c=this.styleCacheForScope(a);return c[b]},styleCacheForScope:function(a){if(d){var b=a.host?a.host.localName:a.localName;return h[b]||(h[b]={})}return a._scopeStyles=a._scopeStyles||{}}},h={};a.api.instance.styles=g}(Polymer),function(a){function b(a,b){if("string"!=typeof a){var c=b||document._currentScript;if(b=a,a=c&&c.parentNode&&c.parentNode.getAttribute?c.parentNode.getAttribute("name"):"",!a)throw"Element name could not be inferred."}if(f(a))throw"Already registered (Polymer) prototype for element "+a;e(a,b),d(a)}function c(a,b){i[a]=b}function d(a){i[a]&&(i[a].registerWhenReady(),delete i[a])}function e(a,b){return j[a]=b||{}}function f(a){return j[a]}function g(a,b){if("string"!=typeof b)return!1;var c=HTMLElement.getPrototypeForTag(b),d=c&&c.constructor;return d?CustomElements["instanceof"]?CustomElements["instanceof"](a,d):a instanceof d:!1}var h=a.extend,i=(a.api,{}),j={};a.getRegisteredPrototype=f,a.waitingForPrototype=c,a.instanceOfType=g,window.Polymer=b,h(Polymer,a),WebComponents.consumeDeclarations&&WebComponents.consumeDeclarations(function(a){if(a)for(var c,d=0,e=a.length;e>d&&(c=a[d]);d++)b.apply(null,c)})}(Polymer),function(a){var b={resolveElementPaths:function(a){Polymer.urlResolver.resolveDom(a)},addResolvePathApi:function(){var a=this.getAttribute("assetpath")||"",b=new URL(a,this.ownerDocument.baseURI);this.prototype.resolvePath=function(a,c){var d=new URL(a,c||b);return d.href}}};a.api.declaration.path=b}(Polymer),function(a){function b(a,b){var c=new URL(a.getAttribute("href"),b).href;return"@import '"+c+"';"}function c(a,b){if(a){b===document&&(b=document.head),i&&(b=document.head);var c=d(a.textContent),e=a.getAttribute(h);e&&c.setAttribute(h,e);var f=b.firstElementChild;if(b===document.head){var g="style["+h+"]",j=document.head.querySelectorAll(g);j.length&&(f=j[j.length-1].nextElementSibling)}b.insertBefore(c,f)}}function d(a,b){b=b||document,b=b.createElement?b:b.ownerDocument;var c=b.createElement("style");return c.textContent=a,c}function e(a){return a&&a.__resource||""}function f(a,b){return q?q.call(a,b):void 0}var g=(window.WebComponents?WebComponents.flags.log:{},a.api.instance.styles),h=g.STYLE_SCOPE_ATTRIBUTE,i=window.ShadowDOMPolyfill,j="style",k="@import",l="link[rel=stylesheet]",m="global",n="polymer-scope",o={loadStyles:function(a){var b=this.fetchTemplate(),c=b&&this.templateContent();if(c){this.convertSheetsToStyles(c);var d=this.findLoadableStyles(c);if(d.length){var e=b.ownerDocument.baseURI;return Polymer.styleResolver.loadStyles(d,e,a)}}a&&a()},convertSheetsToStyles:function(a){for(var c,e,f=a.querySelectorAll(l),g=0,h=f.length;h>g&&(c=f[g]);g++)e=d(b(c,this.ownerDocument.baseURI),this.ownerDocument),this.copySheetAttributes(e,c),c.parentNode.replaceChild(e,c)},copySheetAttributes:function(a,b){for(var c,d=0,e=b.attributes,f=e.length;(c=e[d])&&f>d;d++)"rel"!==c.name&&"href"!==c.name&&a.setAttribute(c.name,c.value)},findLoadableStyles:function(a){var b=[];if(a)for(var c,d=a.querySelectorAll(j),e=0,f=d.length;f>e&&(c=d[e]);e++)c.textContent.match(k)&&b.push(c);return b},installSheets:function(){this.cacheSheets(),this.cacheStyles(),this.installLocalSheets(),this.installGlobalStyles()},cacheSheets:function(){this.sheets=this.findNodes(l),this.sheets.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},cacheStyles:function(){this.styles=this.findNodes(j+"["+n+"]"),this.styles.forEach(function(a){a.parentNode&&a.parentNode.removeChild(a)})},installLocalSheets:function(){var a=this.sheets.filter(function(a){return!a.hasAttribute(n)}),b=this.templateContent();if(b){var c="";if(a.forEach(function(a){c+=e(a)+"\n"}),c){var f=d(c,this.ownerDocument);b.insertBefore(f,b.firstChild)}}},findNodes:function(a,b){var c=this.querySelectorAll(a).array(),d=this.templateContent();if(d){var e=d.querySelectorAll(a).array();c=c.concat(e)}return b?c.filter(b):c},installGlobalStyles:function(){var a=this.styleForScope(m);c(a,document.head)},cssTextForScope:function(a){var b="",c="["+n+"="+a+"]",d=function(a){return f(a,c)},g=this.sheets.filter(d);g.forEach(function(a){b+=e(a)+"\n\n"});var h=this.styles.filter(d);return h.forEach(function(a){b+=a.textContent+"\n\n"}),b},styleForScope:function(a){var b=this.cssTextForScope(a);return this.cssTextToScopeStyle(b,a)},cssTextToScopeStyle:function(a,b){if(a){var c=d(a);return c.setAttribute(h,this.getAttribute("name")+"-"+b),c}}},p=HTMLElement.prototype,q=p.matches||p.matchesSelector||p.webkitMatchesSelector||p.mozMatchesSelector;a.api.declaration.styles=o,a.applyStyleToScope=c}(Polymer),function(a){var b=(window.WebComponents?WebComponents.flags.log:{},a.api.instance.events),c=b.EVENT_PREFIX,d={};["webkitAnimationStart","webkitAnimationEnd","webkitTransitionEnd","DOMFocusOut","DOMFocusIn","DOMMouseScroll"].forEach(function(a){d[a.toLowerCase()]=a});var e={parseHostEvents:function(){var a=this.prototype.eventDelegates;this.addAttributeDelegates(a)},addAttributeDelegates:function(a){for(var b,c=0;b=this.attributes[c];c++)this.hasEventPrefix(b.name)&&(a[this.removeEventPrefix(b.name)]=b.value.replace("{{","").replace("}}","").trim())},hasEventPrefix:function(a){return a&&"o"===a[0]&&"n"===a[1]&&"-"===a[2]},removeEventPrefix:function(a){return a.slice(f)},findController:function(a){for(;a.parentNode;){if(a.eventController)return a.eventController;a=a.parentNode}return a.host},getEventHandler:function(a,b,c){var d=this;return function(e){a&&a.PolymerBase||(a=d.findController(b));var f=[e,e.detail,e.currentTarget];a.dispatchMethod(a,c,f)}},prepareEventBinding:function(a,b){if(this.hasEventPrefix(b)){var c=this.removeEventPrefix(b);c=d[c]||c;var e=this;return function(b,d,f){function g(){return"{{ "+a+" }}"}var h=e.getEventHandler(void 0,d,a);return PolymerGestures.addEventListener(d,c,h),f?void 0:{open:g,discardChanges:g,close:function(){PolymerGestures.removeEventListener(d,c,h)}}}}}},f=c.length;a.api.declaration.events=e}(Polymer),function(a){var b=["attribute"],c={inferObservers:function(a){var b,c=a.observe;for(var d in a)"Changed"===d.slice(-7)&&(b=d.slice(0,-7),this.canObserveProperty(b)&&(c||(c=a.observe={}),c[b]=c[b]||d))},canObserveProperty:function(a){return b.indexOf(a)<0},explodeObservers:function(a){var b=a.observe;if(b){var c={};for(var d in b)for(var e,f=d.split(" "),g=0;e=f[g];g++)c[e]=b[d];a.observe=c}},optimizePropertyMaps:function(a){if(a.observe){var b=a._observeNames=[];for(var c in a.observe)for(var d,e=c.split(" "),f=0;d=e[f];f++)b.push(d)}if(a.publish){var b=a._publishNames=[];for(var c in a.publish)b.push(c)}if(a.computed){var b=a._computedNames=[];for(var c in a.computed)b.push(c)}},publishProperties:function(a,b){var c=a.publish;c&&(this.requireProperties(c,a,b),this.filterInvalidAccessorNames(c),a._publishLC=this.lowerCaseMap(c));var d=a.computed;d&&this.filterInvalidAccessorNames(d)},filterInvalidAccessorNames:function(a){for(var b in a)this.propertyNameBlacklist[b]&&(console.warn('Cannot define property "'+b+'" for element "'+this.name+'" because it has the same name as an HTMLElement property, and not all browsers support overriding that. Consider giving it a different name.'),delete a[b])},requireProperties:function(a,b){b.reflect=b.reflect||{};for(var c in a){var d=a[c];d&&void 0!==d.reflect&&(b.reflect[c]=Boolean(d.reflect),d=d.value),void 0!==d&&(b[c]=d)}},lowerCaseMap:function(a){var b={};for(var c in a)b[c.toLowerCase()]=c;return b},createPropertyAccessor:function(a,b){var c=this.prototype,d=a+"_",e=a+"Observable_";c[d]=c[a],Object.defineProperty(c,a,{get:function(){var a=this[e];return a&&a.deliver(),this[d]},set:function(c){if(b)return this[d];var f=this[e];if(f)return void f.setValue(c);var g=this[d];return this[d]=c,this.emitPropertyChangeRecord(a,c,g),c},configurable:!0})},createPropertyAccessors:function(a){var b=a._computedNames;if(b&&b.length)for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)this.createPropertyAccessor(c,!0);var b=a._publishNames;if(b&&b.length)for(var c,d=0,e=b.length;e>d&&(c=b[d]);d++)a.computed&&a.computed[c]||this.createPropertyAccessor(c)},propertyNameBlacklist:{children:1,"class":1,id:1,hidden:1,style:1,title:1}};a.api.declaration.properties=c}(Polymer),function(a){var b="attributes",c=/\s|,/,d={inheritAttributesObjects:function(a){this.inheritObject(a,"publishLC"),this.inheritObject(a,"_instanceAttributes")},publishAttributes:function(a){var d=this.getAttribute(b);if(d)for(var e,f=a.publish||(a.publish={}),g=d.split(c),h=0,i=g.length;i>h;h++)e=g[h].trim(),e&&void 0===f[e]&&(f[e]=void 0)},accumulateInstanceAttributes:function(){for(var a,b=this.prototype._instanceAttributes,c=this.attributes,d=0,e=c.length;e>d&&(a=c[d]);d++)this.isInstanceAttribute(a.name)&&(b[a.name]=a.value)},isInstanceAttribute:function(a){return!this.blackList[a]&&"on-"!==a.slice(0,3)},blackList:{name:1,"extends":1,constructor:1,noscript:1,assetpath:1,"cache-csstext":1}};d.blackList[b]=1,a.api.declaration.attributes=d}(Polymer),function(a){var b=a.api.declaration.events,c=new PolymerExpressions,d=c.prepareBinding;c.prepareBinding=function(a,e,f){return b.prepareEventBinding(a,e,f)||d.call(c,a,e,f)};var e={syntax:c,fetchTemplate:function(){return this.querySelector("template")},templateContent:function(){var a=this.fetchTemplate();return a&&a.content},installBindingDelegate:function(a){a&&(a.bindingDelegate=this.syntax)}};a.api.declaration.mdv=e}(Polymer),function(a){function b(a){if(!Object.__proto__){var b=Object.getPrototypeOf(a);a.__proto__=b,d(b)&&(b.__proto__=Object.getPrototypeOf(b))}}var c=a.api,d=a.isBase,e=a.extend,f=window.ShadowDOMPolyfill,g={register:function(a,b){this.buildPrototype(a,b),this.registerPrototype(a,b),this.publishConstructor()},buildPrototype:function(b,c){var d=a.getRegisteredPrototype(b),e=this.generateBasePrototype(c);this.desugarBeforeChaining(d,e),this.prototype=this.chainPrototypes(d,e),this.desugarAfterChaining(b,c)},desugarBeforeChaining:function(a,b){a.element=this,this.publishAttributes(a,b),this.publishProperties(a,b),this.inferObservers(a),this.explodeObservers(a)},chainPrototypes:function(a,c){this.inheritMetaData(a,c);var d=this.chainObject(a,c);return b(d),d},inheritMetaData:function(a,b){this.inheritObject("observe",a,b),this.inheritObject("publish",a,b),this.inheritObject("reflect",a,b),this.inheritObject("_publishLC",a,b),this.inheritObject("_instanceAttributes",a,b),this.inheritObject("eventDelegates",a,b)},desugarAfterChaining:function(a,b){this.optimizePropertyMaps(this.prototype),this.createPropertyAccessors(this.prototype),this.installBindingDelegate(this.fetchTemplate()),this.installSheets(),this.resolveElementPaths(this),this.accumulateInstanceAttributes(),this.parseHostEvents(),this.addResolvePathApi(),f&&WebComponents.ShadowCSS.shimStyling(this.templateContent(),a,b),this.prototype.registerCallback&&this.prototype.registerCallback(this)},publishConstructor:function(){var a=this.getAttribute("constructor");a&&(window[a]=this.ctor)},generateBasePrototype:function(a){var b=this.findBasePrototype(a);if(!b){var b=HTMLElement.getPrototypeForTag(a);b=this.ensureBaseApi(b),h[a]=b}return b},findBasePrototype:function(a){return h[a]},ensureBaseApi:function(a){if(a.PolymerBase)return a;var b=Object.create(a);return c.publish(c.instance,b),this.mixinMethod(b,a,c.instance.mdv,"bind"),b},mixinMethod:function(a,b,c,d){var e=function(a){return b[d].apply(this,a)};a[d]=function(){return this.mixinSuper=e,c[d].apply(this,arguments)}},inheritObject:function(a,b,c){var d=b[a]||{};b[a]=this.chainObject(d,c[a])},registerPrototype:function(a,b){var c={prototype:this.prototype},d=this.findTypeExtension(b);d&&(c["extends"]=d),HTMLElement.register(a,this.prototype),this.ctor=document.registerElement(a,c)},findTypeExtension:function(a){if(a&&a.indexOf("-")<0)return a;var b=this.findBasePrototype(a);return b.element?this.findTypeExtension(b.element["extends"]):void 0}},h={};g.chainObject=Object.__proto__?function(a,b){return a&&b&&a!==b&&(a.__proto__=b),a}:function(a,b){if(a&&b&&a!==b){var c=Object.create(b);a=e(c,a)}return a},c.declaration.prototype=g}(Polymer),function(a){function b(a){return document.contains(a)?j:i}function c(){return i.length?i[0]:j[0]}function d(a){f.waitToReady=!0,Polymer.endOfMicrotask(function(){HTMLImports.whenReady(function(){f.addReadyCallback(a),f.waitToReady=!1,f.check()})})}function e(a){if(void 0===a)return void f.ready();var b=setTimeout(function(){f.ready()},a);Polymer.whenReady(function(){clearTimeout(b)})}var f={wait:function(a){a.__queue||(a.__queue={},g.push(a))},enqueue:function(a,c,d){var e=a.__queue&&!a.__queue.check;return e&&(b(a).push(a),a.__queue.check=c,a.__queue.go=d),0!==this.indexOf(a)},indexOf:function(a){var c=b(a).indexOf(a);return c>=0&&document.contains(a)&&(c+=HTMLImports.useNative||HTMLImports.ready?i.length:1e9),c},go:function(a){var b=this.remove(a);b&&(a.__queue.flushable=!0,this.addToFlushQueue(b),this.check())},remove:function(a){var c=this.indexOf(a);if(0===c)return b(a).shift()},check:function(){var a=this.nextElement();return a&&a.__queue.check.call(a),this.canReady()?(this.ready(),!0):void 0},nextElement:function(){return c()},canReady:function(){return!this.waitToReady&&this.isEmpty()},isEmpty:function(){for(var a,b=0,c=g.length;c>b&&(a=g[b]);b++)if(a.__queue&&!a.__queue.flushable)return;return!0},addToFlushQueue:function(a){h.push(a)},flush:function(){if(!this.flushing){this.flushing=!0;for(var a;h.length;)a=h.shift(),a.__queue.go.call(a),a.__queue=null;this.flushing=!1}},ready:function(){var a=CustomElements.ready;CustomElements.ready=!1,this.flush(),CustomElements.useNative||CustomElements.upgradeDocumentTree(document),CustomElements.ready=a,Polymer.flush(),requestAnimationFrame(this.flushReadyCallbacks)},addReadyCallback:function(a){a&&k.push(a)},flushReadyCallbacks:function(){if(k)for(var a;k.length;)(a=k.shift())()},waitingFor:function(){for(var a,b=[],c=0,d=g.length;d>c&&(a=g[c]);c++)a.__queue&&!a.__queue.flushable&&b.push(a);return b},waitToReady:!0},g=[],h=[],i=[],j=[],k=[];a.elements=g,a.waitingFor=f.waitingFor.bind(f),a.forceReady=e,a.queue=f,a.whenReady=a.whenPolymerReady=d}(Polymer),function(a){function b(a){return Boolean(HTMLElement.getPrototypeForTag(a))}function c(a){return a&&a.indexOf("-")>=0}var d=a.extend,e=a.api,f=a.queue,g=a.whenReady,h=a.getRegisteredPrototype,i=a.waitingForPrototype,j=d(Object.create(HTMLElement.prototype),{createdCallback:function(){this.getAttribute("name")&&this.init()},init:function(){this.name=this.getAttribute("name"),this["extends"]=this.getAttribute("extends"),f.wait(this),this.loadResources(),this.registerWhenReady()},registerWhenReady:function(){this.registered||this.waitingForPrototype(this.name)||this.waitingForQueue()||this.waitingForResources()||f.go(this)},_register:function(){c(this["extends"])&&!b(this["extends"])&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this["extends"]),this.register(this.name,this["extends"]),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(a){function b(a,b){a?(document.head.appendChild(a),d(b)):b&&b()}function c(a,c){if(a&&a.length){for(var d,e,f=document.createDocumentFragment(),g=0,h=a.length;h>g&&(d=a[g]);g++)e=document.createElement("link"),e.rel="import",e.href=d,f.appendChild(e);b(f,c)}else c&&c()}var d=a.whenReady;a["import"]=c,a.importElements=b}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}();
\ No newline at end of file
diff --git a/packages/polymer_interop/lib/src/polymer_proxy_mixin.dart b/packages/polymer_interop/lib/src/polymer_proxy_mixin.dart
deleted file mode 100644
index cd9f0f8..0000000
--- a/packages/polymer_interop/lib/src/polymer_proxy_mixin.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library polymer_interop.src.js_element_proxy;
-
-import 'dart:html' show Element, DocumentFragment;
-import 'dart:js' as js;
-import 'package:web_components/web_components.dart'
-    show CustomElementProxyMixin;
-
-/// A mixin to make it easier to interoperate with Polymer JS elements. This
-/// exposes only a subset of the public api that is most useful from external
-/// elements.
-///
-/// Since mixins can't mixin or extend other mixins, you must also
-/// mixin the [CustomElementProxyMixin] class from `web_components`. The
-/// implements statement here enforces that.
-abstract class PolymerProxyMixin implements CustomElementProxyMixin {
-  /// The underlying Js Element's `$` property.
-  js.JsObject get $ => jsElement[r'$'];
-
-  /// By default the data bindings will be cleaned up when this custom element
-  /// is detached from the document. Overriding this to return `true` will
-  /// prevent that from happening.
-  bool get preventDispose => jsElement['preventDispose'];
-  set preventDispose(bool newValue) => jsElement['preventDispose'] = newValue;
-
-  /// Force any pending property changes to synchronously deliver to handlers
-  /// specified in the `observe` object. Note, normally changes are processed at
-  /// microtask time.
-  ///
-  // Dart note: renamed to `deliverPropertyChanges` to be more consistent with
-  // other polymer.dart elements.
-  void deliverPropertyChanges() {
-    jsElement.callMethod('deliverChanges', []);
-  }
-
-  /// Inject HTML which contains markup bound to this element into a target
-  /// element (replacing target element content).
-  DocumentFragment injectBoundHTML(String html, [Element element]) =>
-      jsElement.callMethod('injectBoundHTML', [html, element]);
-
-  /// Creates dom cloned from the given template, instantiating bindings with
-  /// this element as the template model and `PolymerExpressions` as the binding
-  /// delegate.
-  DocumentFragment instanceTemplate(Element template) =>
-      jsElement.callMethod('instanceTemplate', [template]);
-
-  /// This method should rarely be used and only if `cancelUnbindAll` has been
-  /// called to prevent element unbinding. In this case, the element's bindings
-  /// will not be automatically cleaned up and it cannot be garbage collected by
-  /// by the system. If memory pressure is a concern or a large amount of
-  /// elements need to be managed in this way, `unbindAll` can be called to
-  /// deactivate the element's bindings and allow its memory to be reclaimed.
-  void unbindAll() => jsElement.callMethod('unbindAll', []);
-
-  /// Call in `detached` to prevent the element from unbinding when it is
-  /// detached from the dom. The element is unbound as a cleanup step that
-  /// allows its memory to be reclaimed. If `cancelUnbindAll` is used, consider
-  ///calling `unbindAll` when the element is no longer needed. This will allow
-  ///its memory to be reclaimed.
-  void cancelUnbindAll() => jsElement.callMethod('cancelUnbindAll', []);
-}
diff --git a/packages/polymer_interop/pubspec.yaml b/packages/polymer_interop/pubspec.yaml
deleted file mode 100644
index 58e50e7..0000000
--- a/packages/polymer_interop/pubspec.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: polymer_interop
-version: 0.1.1
-author: Polymer.dart Authors <web-ui-dev@dartlang.org>
-description: Common package containing the original polymer js sources
-homepage: https://github.com/dart-lang/polymer_interop
-dependencies:
-  barback: '>=0.14.2 <0.16.0'
-  code_transformers: '>=0.2.2 <0.3.0'
-  web_components: '>=0.11.2 <0.12.0'
-environment:
-  sdk: ">=1.9.0 <2.0.0"
-transformers:
-- polymer_interop/src/build/replace_polymer_js:
-    $include:
-      - lib/src/js/polymer.html
-- code_transformers/src/delete_file:
-    $include:
-      - lib/src/js/polymer.js
diff --git a/packages/web_components/.gitignore b/packages/web_components/.gitignore
index 6e8cd5c..18fee07 100644
--- a/packages/web_components/.gitignore
+++ b/packages/web_components/.gitignore
@@ -2,6 +2,7 @@
 .pub
 /build/
 packages
+.packages
 
 # Or the files created by dart2js.
 *.dart.js
diff --git a/packages/web_components/.status b/packages/web_components/.status
deleted file mode 100644
index 36c7e43..0000000
--- a/packages/web_components/.status
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Don't run any test-like files that show up in packages directories. It
-# shouldn't be necessary to run "pub install" in these packages, but if you do
-# it shouldn't break the tests.
-*/packages/*/*: SkipByDesign
-*/*/packages/*/*: SkipByDesign
-*/*/*/packages/*/*: SkipByDesign
-*/*/*/*/packages/*/*: SkipByDesign
-*/*/*/*/*/packages/*/*: SkipByDesign
-
-# We need a hook in package-bots to invoke pub-build in nested folders before we
-# can run these tests:
-e2e_test/*: Skip
-build/e2e_test/*: Skip
-
-# Invalid once built, tests pre-build behavior.
-build/test/html_import_annotation_test: SkipByDesign
-
-[ $compiler == none && ($runtime == dartium || $runtime == ContentShellOnAndroid) ]
-test/interop_test: Pass, RuntimeError # Issue 18931
-
-[ $compiler == dart2js && $csp && $runtime == drt ]
-build/test/interop_test: Fail # Issue 19329
-
-[ $runtime == vm || $runtime == d8 || $runtime == jsshell ]
-test/*: SkipByDesign # uses dart:html
-build/test/*: SkipByDesign # uses dart:html
-e2e_test/html_imports/test/*: SkipByDesign # uses dart:html
-build/e2e_test/html_imports/test/*: SkipByDesign # uses dart:html
-
-[ $compiler == dart2js ]
-test/*: SkipByDesign # use pub-build to run tests (they need the companion .html file)
-
-[ $browser ]
-test/build/*: SkipByDesign # vm only tests
-build/test/build/*: SkipByDesign # vm only tests
diff --git a/packages/web_components/.test_config b/packages/web_components/.test_config
new file mode 100644
index 0000000..7531964
--- /dev/null
+++ b/packages/web_components/.test_config
@@ -0,0 +1,5 @@
+{
+  "test_package": {
+    "platforms": ["vm", "dartium"]
+  }
+}
diff --git a/packages/web_components/CHANGELOG.md b/packages/web_components/CHANGELOG.md
index b42c844..865b0b2 100644
--- a/packages/web_components/CHANGELOG.md
+++ b/packages/web_components/CHANGELOG.md
@@ -1,3 +1,47 @@
+#### 0.12.3
+  * Update to JS version
+    [0.7.21](https://github.com/webcomponents/webcomponentsjs/tree/v0.7.21).
+
+#### 0.12.2+2
+
+* Update to transformer_test `0.2.x`.
+
+#### 0.12.2+2
+
+* Add support for code_transformers `0.4.x`.
+
+#### 0.12.2+1
+  * Allow periods in package names (but can't end or begin with one).
+
+#### 0.12.2
+  * Update to JS version
+    [0.7.20](https://github.com/webcomponents/webcomponentsjs/tree/v0.7.20).
+
+#### 0.12.1
+  * Update analyzer to `^0.27.0` and update to the test package.
+
+#### 0.12.0+4
+  * The transformer will now give an informative error on package names with
+    hyphens.
+
+#### 0.12.0+3
+  * Update analyzer dependency to `<0.27.0` and fix up some tests.
+
+#### 0.12.0+2
+  * Don't create new resolvers each time the transformer runs on a file.
+
+#### 0.12.0+1
+  * Fix hang on reload with the `web_components` transformer in pub serve,
+    [27](https://github.com/dart-lang/web-components/issues/27).
+
+#### 0.12.0
+  * Update to js version
+    [0.7.3](https://github.com/webcomponents/webcomponentsjs/tree/v0.7.3).
+  * Some release notes
+    (here)[http://webcomponents.org/articles/polyfills-0-6-0/].
+  * Also added all the individual polyfills as well as the
+    `webcomponents-lite.js` version, which does not include shadow dom.
+
 #### 0.11.4+2
   * Don't inline type="css" imports.
 
@@ -128,8 +172,8 @@
     *Note*: Html imports included this way cannot contain dart script tags. The
     mirror based implementation injects the imports dynamically and dart script
     tags are not allowed to be injected in that way.
-    
-    *Note*:  Relative urls cannot be used in inlined script tags. Either move 
+
+    *Note*:  Relative urls cannot be used in inlined script tags. Either move
     the script code to a Dart file, use a `package:` url, or use a normal HTML
     import. See https://github.com/dart-lang/web-components/issues/6.
 
@@ -143,7 +187,7 @@
         - web_components:
             entry_points:
               - web/index.html
-    
+
     If no `entry_points` option is supplied then any html file under `web` or
     `test` will be treated as an entry point.
 
@@ -176,7 +220,7 @@
     providing Dart APIs for js custom elements.
 
 #### 0.8.0
-  * Re-apply changes from 0.7.1+1 and also cherry pick 
+  * Re-apply changes from 0.7.1+1 and also cherry pick
     [efdbbc](https://github.com/polymer/CustomElements/commit/efdbbc) to fix
     the customElementsTakeRecords function.
   * **Breaking Change** The customElementsTakeRecords function now has an
@@ -204,7 +248,7 @@
   * Updated to 0.4.0-5a7353d release, with same cherry pick as 0.6.0+1.
   * Many features were moved into the polymer package, this package is now
     purely focused on polyfills.
-  * Change Platform.deliverDeclarations to 
+  * Change Platform.deliverDeclarations to
     Platform.consumeDeclarations(callback).
   * Cherry pick https://github.com/Polymer/ShadowDOM/pull/505 to fix mem leak.
 
@@ -217,7 +261,7 @@
     This is more recent than the 0.3.5 release as there were multiple breakages
     that required updating past that.
   * There is a bug in this version where selecting non-rendered elements doesn't
-    work, but it shouldn't affect most people. See 
+    work, but it shouldn't affect most people. See
     https://github.com/Polymer/ShadowDOM/issues/495.
 
 #### 0.5.0+1
diff --git a/packages/web_components/e2e_test/html_imports/pubspec.yaml b/packages/web_components/e2e_test/html_imports/pubspec.yaml
index 996c03b..c7afae9 100644
--- a/packages/web_components/e2e_test/html_imports/pubspec.yaml
+++ b/packages/web_components/e2e_test/html_imports/pubspec.yaml
@@ -1,11 +1,10 @@
 name: html_imports
 dependencies:
-  browser: '^0.10.0'
   initialize: any
   web_components:
     path: '../../'
 dev_dependencies:
-  unittest: '^0.11.0'
+  test: '^0.12.0'
 transformers:
 - web_components:
     $include: '**/*_test.html'
diff --git a/packages/web_components/e2e_test/html_imports/test/basic_test.dart b/packages/web_components/e2e_test/html_imports/test/basic_test.dart
index 0f1aee8..c03e79d 100644
--- a/packages/web_components/e2e_test/html_imports/test/basic_test.dart
+++ b/packages/web_components/e2e_test/html_imports/test/basic_test.dart
@@ -1,24 +1,22 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('browser')
 @HtmlImport('packages/html_imports/theme.html')
 library e2e_test.html_imports.basic_test;
 
 import 'dart:html';
 import 'package:initialize/initialize.dart' as init;
 import 'package:web_components/html_import_annotation.dart';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
-main() {
-  useHtmlConfiguration();
-
+main() async {
   // Waits until all html imports are loaded.
-  init.run().then((_) {
-    test('text is red', () {
-      var p = document.createElement('p');
-      document.body.append(p);
-      expect(p.getComputedStyle().color, 'rgb(255, 0, 0)');
-    });
+  await init.run();
+
+  test('text is red', () {
+    var p = document.createElement('p');
+    document.body.append(p);
+    expect(p.getComputedStyle().color, 'rgb(255, 0, 0)');
   });
 }
diff --git a/packages/web_components/e2e_test/html_imports/test/basic_test.html b/packages/web_components/e2e_test/html_imports/test/basic_test.html
index e899e5d..c1d95f6 100644
--- a/packages/web_components/e2e_test/html_imports/test/basic_test.html
+++ b/packages/web_components/e2e_test/html_imports/test/basic_test.html
@@ -4,9 +4,7 @@
     <meta name="dart.unittest" content="full-stack-traces">
   </head>
   <body>
-    <script type="text/javascript"
-            src="/root_dart/tools/testing/dart/test_controller.js"></script>
-    <script type="application/dart" src="basic_test.dart"></script>
-    <script src="packages/browser/dart.js"></script>
+    <link rel="x-dart-test" href="basic_test.dart">
+    <script src="packages/test/dart.js"></script>
   </body>
 </html>
diff --git a/packages/web_components/lib/CustomElements.js b/packages/web_components/lib/CustomElements.js
new file mode 100644
index 0000000..85cc7e2
--- /dev/null
+++ b/packages/web_components/lib/CustomElements.js
@@ -0,0 +1,1041 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+if (typeof WeakMap === "undefined") {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var counter = Date.now() % 1e9;
+    var WeakMap = function() {
+      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
+    };
+    WeakMap.prototype = {
+      set: function(key, value) {
+        var entry = key[this.name];
+        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
+          value: [ key, value ],
+          writable: true
+        });
+        return this;
+      },
+      get: function(key) {
+        var entry;
+        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
+      },
+      "delete": function(key) {
+        var entry = key[this.name];
+        if (!entry || entry[0] !== key) return false;
+        entry[0] = entry[1] = undefined;
+        return true;
+      },
+      has: function(key) {
+        var entry = key[this.name];
+        if (!entry) return false;
+        return entry[0] === key;
+      }
+    };
+    window.WeakMap = WeakMap;
+  })();
+}
+
+(function(global) {
+  if (global.JsMutationObserver) {
+    return;
+  }
+  var registrationsTable = new WeakMap();
+  var setImmediate;
+  if (/Trident|Edge/.test(navigator.userAgent)) {
+    setImmediate = setTimeout;
+  } else if (window.setImmediate) {
+    setImmediate = window.setImmediate;
+  } else {
+    var setImmediateQueue = [];
+    var sentinel = String(Math.random());
+    window.addEventListener("message", function(e) {
+      if (e.data === sentinel) {
+        var queue = setImmediateQueue;
+        setImmediateQueue = [];
+        queue.forEach(function(func) {
+          func();
+        });
+      }
+    });
+    setImmediate = function(func) {
+      setImmediateQueue.push(func);
+      window.postMessage(sentinel, "*");
+    };
+  }
+  var isScheduled = false;
+  var scheduledObservers = [];
+  function scheduleCallback(observer) {
+    scheduledObservers.push(observer);
+    if (!isScheduled) {
+      isScheduled = true;
+      setImmediate(dispatchCallbacks);
+    }
+  }
+  function wrapIfNeeded(node) {
+    return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
+  }
+  function dispatchCallbacks() {
+    isScheduled = false;
+    var observers = scheduledObservers;
+    scheduledObservers = [];
+    observers.sort(function(o1, o2) {
+      return o1.uid_ - o2.uid_;
+    });
+    var anyNonEmpty = false;
+    observers.forEach(function(observer) {
+      var queue = observer.takeRecords();
+      removeTransientObserversFor(observer);
+      if (queue.length) {
+        observer.callback_(queue, observer);
+        anyNonEmpty = true;
+      }
+    });
+    if (anyNonEmpty) dispatchCallbacks();
+  }
+  function removeTransientObserversFor(observer) {
+    observer.nodes_.forEach(function(node) {
+      var registrations = registrationsTable.get(node);
+      if (!registrations) return;
+      registrations.forEach(function(registration) {
+        if (registration.observer === observer) registration.removeTransientObservers();
+      });
+    });
+  }
+  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
+    for (var node = target; node; node = node.parentNode) {
+      var registrations = registrationsTable.get(node);
+      if (registrations) {
+        for (var j = 0; j < registrations.length; j++) {
+          var registration = registrations[j];
+          var options = registration.options;
+          if (node !== target && !options.subtree) continue;
+          var record = callback(options);
+          if (record) registration.enqueue(record);
+        }
+      }
+    }
+  }
+  var uidCounter = 0;
+  function JsMutationObserver(callback) {
+    this.callback_ = callback;
+    this.nodes_ = [];
+    this.records_ = [];
+    this.uid_ = ++uidCounter;
+  }
+  JsMutationObserver.prototype = {
+    observe: function(target, options) {
+      target = wrapIfNeeded(target);
+      if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
+        throw new SyntaxError();
+      }
+      var registrations = registrationsTable.get(target);
+      if (!registrations) registrationsTable.set(target, registrations = []);
+      var registration;
+      for (var i = 0; i < registrations.length; i++) {
+        if (registrations[i].observer === this) {
+          registration = registrations[i];
+          registration.removeListeners();
+          registration.options = options;
+          break;
+        }
+      }
+      if (!registration) {
+        registration = new Registration(this, target, options);
+        registrations.push(registration);
+        this.nodes_.push(target);
+      }
+      registration.addListeners();
+    },
+    disconnect: function() {
+      this.nodes_.forEach(function(node) {
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          var registration = registrations[i];
+          if (registration.observer === this) {
+            registration.removeListeners();
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+      this.records_ = [];
+    },
+    takeRecords: function() {
+      var copyOfRecords = this.records_;
+      this.records_ = [];
+      return copyOfRecords;
+    }
+  };
+  function MutationRecord(type, target) {
+    this.type = type;
+    this.target = target;
+    this.addedNodes = [];
+    this.removedNodes = [];
+    this.previousSibling = null;
+    this.nextSibling = null;
+    this.attributeName = null;
+    this.attributeNamespace = null;
+    this.oldValue = null;
+  }
+  function copyMutationRecord(original) {
+    var record = new MutationRecord(original.type, original.target);
+    record.addedNodes = original.addedNodes.slice();
+    record.removedNodes = original.removedNodes.slice();
+    record.previousSibling = original.previousSibling;
+    record.nextSibling = original.nextSibling;
+    record.attributeName = original.attributeName;
+    record.attributeNamespace = original.attributeNamespace;
+    record.oldValue = original.oldValue;
+    return record;
+  }
+  var currentRecord, recordWithOldValue;
+  function getRecord(type, target) {
+    return currentRecord = new MutationRecord(type, target);
+  }
+  function getRecordWithOldValue(oldValue) {
+    if (recordWithOldValue) return recordWithOldValue;
+    recordWithOldValue = copyMutationRecord(currentRecord);
+    recordWithOldValue.oldValue = oldValue;
+    return recordWithOldValue;
+  }
+  function clearRecords() {
+    currentRecord = recordWithOldValue = undefined;
+  }
+  function recordRepresentsCurrentMutation(record) {
+    return record === recordWithOldValue || record === currentRecord;
+  }
+  function selectRecord(lastRecord, newRecord) {
+    if (lastRecord === newRecord) return lastRecord;
+    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
+    return null;
+  }
+  function Registration(observer, target, options) {
+    this.observer = observer;
+    this.target = target;
+    this.options = options;
+    this.transientObservedNodes = [];
+  }
+  Registration.prototype = {
+    enqueue: function(record) {
+      var records = this.observer.records_;
+      var length = records.length;
+      if (records.length > 0) {
+        var lastRecord = records[length - 1];
+        var recordToReplaceLast = selectRecord(lastRecord, record);
+        if (recordToReplaceLast) {
+          records[length - 1] = recordToReplaceLast;
+          return;
+        }
+      } else {
+        scheduleCallback(this.observer);
+      }
+      records[length] = record;
+    },
+    addListeners: function() {
+      this.addListeners_(this.target);
+    },
+    addListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
+    },
+    removeListeners: function() {
+      this.removeListeners_(this.target);
+    },
+    removeListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
+    },
+    addTransientObserver: function(node) {
+      if (node === this.target) return;
+      this.addListeners_(node);
+      this.transientObservedNodes.push(node);
+      var registrations = registrationsTable.get(node);
+      if (!registrations) registrationsTable.set(node, registrations = []);
+      registrations.push(this);
+    },
+    removeTransientObservers: function() {
+      var transientObservedNodes = this.transientObservedNodes;
+      this.transientObservedNodes = [];
+      transientObservedNodes.forEach(function(node) {
+        this.removeListeners_(node);
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          if (registrations[i] === this) {
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+    },
+    handleEvent: function(e) {
+      e.stopImmediatePropagation();
+      switch (e.type) {
+       case "DOMAttrModified":
+        var name = e.attrName;
+        var namespace = e.relatedNode.namespaceURI;
+        var target = e.target;
+        var record = new getRecord("attributes", target);
+        record.attributeName = name;
+        record.attributeNamespace = namespace;
+        var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.attributes) return;
+          if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
+            return;
+          }
+          if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMCharacterDataModified":
+        var target = e.target;
+        var record = getRecord("characterData", target);
+        var oldValue = e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.characterData) return;
+          if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMNodeRemoved":
+        this.addTransientObserver(e.target);
+
+       case "DOMNodeInserted":
+        var changedNode = e.target;
+        var addedNodes, removedNodes;
+        if (e.type === "DOMNodeInserted") {
+          addedNodes = [ changedNode ];
+          removedNodes = [];
+        } else {
+          addedNodes = [];
+          removedNodes = [ changedNode ];
+        }
+        var previousSibling = changedNode.previousSibling;
+        var nextSibling = changedNode.nextSibling;
+        var record = getRecord("childList", e.target.parentNode);
+        record.addedNodes = addedNodes;
+        record.removedNodes = removedNodes;
+        record.previousSibling = previousSibling;
+        record.nextSibling = nextSibling;
+        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
+          if (!options.childList) return;
+          return record;
+        });
+      }
+      clearRecords();
+    }
+  };
+  global.JsMutationObserver = JsMutationObserver;
+  if (!global.MutationObserver) {
+    global.MutationObserver = JsMutationObserver;
+    JsMutationObserver._isPolyfilled = true;
+  }
+})(self);
+
+(function(scope) {
+  "use strict";
+  if (!window.performance) {
+    var start = Date.now();
+    window.performance = {
+      now: function() {
+        return Date.now() - start;
+      }
+    };
+  }
+  if (!window.requestAnimationFrame) {
+    window.requestAnimationFrame = function() {
+      var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
+      return nativeRaf ? function(callback) {
+        return nativeRaf(function() {
+          callback(performance.now());
+        });
+      } : function(callback) {
+        return window.setTimeout(callback, 1e3 / 60);
+      };
+    }();
+  }
+  if (!window.cancelAnimationFrame) {
+    window.cancelAnimationFrame = function() {
+      return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
+        clearTimeout(id);
+      };
+    }();
+  }
+  var workingDefaultPrevented = function() {
+    var e = document.createEvent("Event");
+    e.initEvent("foo", true, true);
+    e.preventDefault();
+    return e.defaultPrevented;
+  }();
+  if (!workingDefaultPrevented) {
+    var origPreventDefault = Event.prototype.preventDefault;
+    Event.prototype.preventDefault = function() {
+      if (!this.cancelable) {
+        return;
+      }
+      origPreventDefault.call(this);
+      Object.defineProperty(this, "defaultPrevented", {
+        get: function() {
+          return true;
+        },
+        configurable: true
+      });
+    };
+  }
+  var isIE = /Trident/.test(navigator.userAgent);
+  if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
+    window.CustomEvent = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("CustomEvent");
+      e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
+      return e;
+    };
+    window.CustomEvent.prototype = window.Event.prototype;
+  }
+  if (!window.Event || isIE && typeof window.Event !== "function") {
+    var origEvent = window.Event;
+    window.Event = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("Event");
+      e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
+      return e;
+    };
+    window.Event.prototype = origEvent.prototype;
+  }
+})(window.WebComponents);
+
+window.CustomElements = window.CustomElements || {
+  flags: {}
+};
+
+(function(scope) {
+  var flags = scope.flags;
+  var modules = [];
+  var addModule = function(module) {
+    modules.push(module);
+  };
+  var initializeModules = function() {
+    modules.forEach(function(module) {
+      module(scope);
+    });
+  };
+  scope.addModule = addModule;
+  scope.initializeModules = initializeModules;
+  scope.hasNative = Boolean(document.registerElement);
+  scope.isIE = /Trident/.test(navigator.userAgent);
+  scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
+})(window.CustomElements);
+
+window.CustomElements.addModule(function(scope) {
+  var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
+  function forSubtree(node, cb) {
+    findAllElements(node, function(e) {
+      if (cb(e)) {
+        return true;
+      }
+      forRoots(e, cb);
+    });
+    forRoots(node, cb);
+  }
+  function findAllElements(node, find, data) {
+    var e = node.firstElementChild;
+    if (!e) {
+      e = node.firstChild;
+      while (e && e.nodeType !== Node.ELEMENT_NODE) {
+        e = e.nextSibling;
+      }
+    }
+    while (e) {
+      if (find(e, data) !== true) {
+        findAllElements(e, find, data);
+      }
+      e = e.nextElementSibling;
+    }
+    return null;
+  }
+  function forRoots(node, cb) {
+    var root = node.shadowRoot;
+    while (root) {
+      forSubtree(root, cb);
+      root = root.olderShadowRoot;
+    }
+  }
+  function forDocumentTree(doc, cb) {
+    _forDocumentTree(doc, cb, []);
+  }
+  function _forDocumentTree(doc, cb, processingDocuments) {
+    doc = window.wrap(doc);
+    if (processingDocuments.indexOf(doc) >= 0) {
+      return;
+    }
+    processingDocuments.push(doc);
+    var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
+    for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
+      if (n.import) {
+        _forDocumentTree(n.import, cb, processingDocuments);
+      }
+    }
+    cb(doc);
+  }
+  scope.forDocumentTree = forDocumentTree;
+  scope.forSubtree = forSubtree;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var flags = scope.flags;
+  var forSubtree = scope.forSubtree;
+  var forDocumentTree = scope.forDocumentTree;
+  function addedNode(node, isAttached) {
+    return added(node, isAttached) || addedSubtree(node, isAttached);
+  }
+  function added(node, isAttached) {
+    if (scope.upgrade(node, isAttached)) {
+      return true;
+    }
+    if (isAttached) {
+      attached(node);
+    }
+  }
+  function addedSubtree(node, isAttached) {
+    forSubtree(node, function(e) {
+      if (added(e, isAttached)) {
+        return true;
+      }
+    });
+  }
+  var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
+  scope.hasPolyfillMutations = hasThrottledAttached;
+  scope.hasThrottledAttached = hasThrottledAttached;
+  var isPendingMutations = false;
+  var pendingMutations = [];
+  function deferMutation(fn) {
+    pendingMutations.push(fn);
+    if (!isPendingMutations) {
+      isPendingMutations = true;
+      setTimeout(takeMutations);
+    }
+  }
+  function takeMutations() {
+    isPendingMutations = false;
+    var $p = pendingMutations;
+    for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
+      p();
+    }
+    pendingMutations = [];
+  }
+  function attached(element) {
+    if (hasThrottledAttached) {
+      deferMutation(function() {
+        _attached(element);
+      });
+    } else {
+      _attached(element);
+    }
+  }
+  function _attached(element) {
+    if (element.__upgraded__ && !element.__attached) {
+      element.__attached = true;
+      if (element.attachedCallback) {
+        element.attachedCallback();
+      }
+    }
+  }
+  function detachedNode(node) {
+    detached(node);
+    forSubtree(node, function(e) {
+      detached(e);
+    });
+  }
+  function detached(element) {
+    if (hasThrottledAttached) {
+      deferMutation(function() {
+        _detached(element);
+      });
+    } else {
+      _detached(element);
+    }
+  }
+  function _detached(element) {
+    if (element.__upgraded__ && element.__attached) {
+      element.__attached = false;
+      if (element.detachedCallback) {
+        element.detachedCallback();
+      }
+    }
+  }
+  function inDocument(element) {
+    var p = element;
+    var doc = window.wrap(document);
+    while (p) {
+      if (p == doc) {
+        return true;
+      }
+      p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
+    }
+  }
+  function watchShadow(node) {
+    if (node.shadowRoot && !node.shadowRoot.__watched) {
+      flags.dom && console.log("watching shadow-root for: ", node.localName);
+      var root = node.shadowRoot;
+      while (root) {
+        observe(root);
+        root = root.olderShadowRoot;
+      }
+    }
+  }
+  function handler(root, mutations) {
+    if (flags.dom) {
+      var mx = mutations[0];
+      if (mx && mx.type === "childList" && mx.addedNodes) {
+        if (mx.addedNodes) {
+          var d = mx.addedNodes[0];
+          while (d && d !== document && !d.host) {
+            d = d.parentNode;
+          }
+          var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
+          u = u.split("/?").shift().split("/").pop();
+        }
+      }
+      console.group("mutations (%d) [%s]", mutations.length, u || "");
+    }
+    var isAttached = inDocument(root);
+    mutations.forEach(function(mx) {
+      if (mx.type === "childList") {
+        forEach(mx.addedNodes, function(n) {
+          if (!n.localName) {
+            return;
+          }
+          addedNode(n, isAttached);
+        });
+        forEach(mx.removedNodes, function(n) {
+          if (!n.localName) {
+            return;
+          }
+          detachedNode(n);
+        });
+      }
+    });
+    flags.dom && console.groupEnd();
+  }
+  function takeRecords(node) {
+    node = window.wrap(node);
+    if (!node) {
+      node = window.wrap(document);
+    }
+    while (node.parentNode) {
+      node = node.parentNode;
+    }
+    var observer = node.__observer;
+    if (observer) {
+      handler(node, observer.takeRecords());
+      takeMutations();
+    }
+  }
+  var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
+  function observe(inRoot) {
+    if (inRoot.__observer) {
+      return;
+    }
+    var observer = new MutationObserver(handler.bind(this, inRoot));
+    observer.observe(inRoot, {
+      childList: true,
+      subtree: true
+    });
+    inRoot.__observer = observer;
+  }
+  function upgradeDocument(doc) {
+    doc = window.wrap(doc);
+    flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
+    var isMainDocument = doc === window.wrap(document);
+    addedNode(doc, isMainDocument);
+    observe(doc);
+    flags.dom && console.groupEnd();
+  }
+  function upgradeDocumentTree(doc) {
+    forDocumentTree(doc, upgradeDocument);
+  }
+  var originalCreateShadowRoot = Element.prototype.createShadowRoot;
+  if (originalCreateShadowRoot) {
+    Element.prototype.createShadowRoot = function() {
+      var root = originalCreateShadowRoot.call(this);
+      window.CustomElements.watchShadow(this);
+      return root;
+    };
+  }
+  scope.watchShadow = watchShadow;
+  scope.upgradeDocumentTree = upgradeDocumentTree;
+  scope.upgradeDocument = upgradeDocument;
+  scope.upgradeSubtree = addedSubtree;
+  scope.upgradeAll = addedNode;
+  scope.attached = attached;
+  scope.takeRecords = takeRecords;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var flags = scope.flags;
+  function upgrade(node, isAttached) {
+    if (node.localName === "template") {
+      if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
+        HTMLTemplateElement.decorate(node);
+      }
+    }
+    if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
+      var is = node.getAttribute("is");
+      var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
+      if (definition) {
+        if (is && definition.tag == node.localName || !is && !definition.extends) {
+          return upgradeWithDefinition(node, definition, isAttached);
+        }
+      }
+    }
+  }
+  function upgradeWithDefinition(element, definition, isAttached) {
+    flags.upgrade && console.group("upgrade:", element.localName);
+    if (definition.is) {
+      element.setAttribute("is", definition.is);
+    }
+    implementPrototype(element, definition);
+    element.__upgraded__ = true;
+    created(element);
+    if (isAttached) {
+      scope.attached(element);
+    }
+    scope.upgradeSubtree(element, isAttached);
+    flags.upgrade && console.groupEnd();
+    return element;
+  }
+  function implementPrototype(element, definition) {
+    if (Object.__proto__) {
+      element.__proto__ = definition.prototype;
+    } else {
+      customMixin(element, definition.prototype, definition.native);
+      element.__proto__ = definition.prototype;
+    }
+  }
+  function customMixin(inTarget, inSrc, inNative) {
+    var used = {};
+    var p = inSrc;
+    while (p !== inNative && p !== HTMLElement.prototype) {
+      var keys = Object.getOwnPropertyNames(p);
+      for (var i = 0, k; k = keys[i]; i++) {
+        if (!used[k]) {
+          Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
+          used[k] = 1;
+        }
+      }
+      p = Object.getPrototypeOf(p);
+    }
+  }
+  function created(element) {
+    if (element.createdCallback) {
+      element.createdCallback();
+    }
+  }
+  scope.upgrade = upgrade;
+  scope.upgradeWithDefinition = upgradeWithDefinition;
+  scope.implementPrototype = implementPrototype;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var isIE = scope.isIE;
+  var upgradeDocumentTree = scope.upgradeDocumentTree;
+  var upgradeAll = scope.upgradeAll;
+  var upgradeWithDefinition = scope.upgradeWithDefinition;
+  var implementPrototype = scope.implementPrototype;
+  var useNative = scope.useNative;
+  function register(name, options) {
+    var definition = options || {};
+    if (!name) {
+      throw new Error("document.registerElement: first argument `name` must not be empty");
+    }
+    if (name.indexOf("-") < 0) {
+      throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
+    }
+    if (isReservedTag(name)) {
+      throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
+    }
+    if (getRegisteredDefinition(name)) {
+      throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
+    }
+    if (!definition.prototype) {
+      definition.prototype = Object.create(HTMLElement.prototype);
+    }
+    definition.__name = name.toLowerCase();
+    definition.lifecycle = definition.lifecycle || {};
+    definition.ancestry = ancestry(definition.extends);
+    resolveTagName(definition);
+    resolvePrototypeChain(definition);
+    overrideAttributeApi(definition.prototype);
+    registerDefinition(definition.__name, definition);
+    definition.ctor = generateConstructor(definition);
+    definition.ctor.prototype = definition.prototype;
+    definition.prototype.constructor = definition.ctor;
+    if (scope.ready) {
+      upgradeDocumentTree(document);
+    }
+    return definition.ctor;
+  }
+  function overrideAttributeApi(prototype) {
+    if (prototype.setAttribute._polyfilled) {
+      return;
+    }
+    var setAttribute = prototype.setAttribute;
+    prototype.setAttribute = function(name, value) {
+      changeAttribute.call(this, name, value, setAttribute);
+    };
+    var removeAttribute = prototype.removeAttribute;
+    prototype.removeAttribute = function(name) {
+      changeAttribute.call(this, name, null, removeAttribute);
+    };
+    prototype.setAttribute._polyfilled = true;
+  }
+  function changeAttribute(name, value, operation) {
+    name = name.toLowerCase();
+    var oldValue = this.getAttribute(name);
+    operation.apply(this, arguments);
+    var newValue = this.getAttribute(name);
+    if (this.attributeChangedCallback && newValue !== oldValue) {
+      this.attributeChangedCallback(name, oldValue, newValue);
+    }
+  }
+  function isReservedTag(name) {
+    for (var i = 0; i < reservedTagList.length; i++) {
+      if (name === reservedTagList[i]) {
+        return true;
+      }
+    }
+  }
+  var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
+  function ancestry(extnds) {
+    var extendee = getRegisteredDefinition(extnds);
+    if (extendee) {
+      return ancestry(extendee.extends).concat([ extendee ]);
+    }
+    return [];
+  }
+  function resolveTagName(definition) {
+    var baseTag = definition.extends;
+    for (var i = 0, a; a = definition.ancestry[i]; i++) {
+      baseTag = a.is && a.tag;
+    }
+    definition.tag = baseTag || definition.__name;
+    if (baseTag) {
+      definition.is = definition.__name;
+    }
+  }
+  function resolvePrototypeChain(definition) {
+    if (!Object.__proto__) {
+      var nativePrototype = HTMLElement.prototype;
+      if (definition.is) {
+        var inst = document.createElement(definition.tag);
+        nativePrototype = Object.getPrototypeOf(inst);
+      }
+      var proto = definition.prototype, ancestor;
+      var foundPrototype = false;
+      while (proto) {
+        if (proto == nativePrototype) {
+          foundPrototype = true;
+        }
+        ancestor = Object.getPrototypeOf(proto);
+        if (ancestor) {
+          proto.__proto__ = ancestor;
+        }
+        proto = ancestor;
+      }
+      if (!foundPrototype) {
+        console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);
+      }
+      definition.native = nativePrototype;
+    }
+  }
+  function instantiate(definition) {
+    return upgradeWithDefinition(domCreateElement(definition.tag), definition);
+  }
+  var registry = {};
+  function getRegisteredDefinition(name) {
+    if (name) {
+      return registry[name.toLowerCase()];
+    }
+  }
+  function registerDefinition(name, definition) {
+    registry[name] = definition;
+  }
+  function generateConstructor(definition) {
+    return function() {
+      return instantiate(definition);
+    };
+  }
+  var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+  function createElementNS(namespace, tag, typeExtension) {
+    if (namespace === HTML_NAMESPACE) {
+      return createElement(tag, typeExtension);
+    } else {
+      return domCreateElementNS(namespace, tag);
+    }
+  }
+  function createElement(tag, typeExtension) {
+    if (tag) {
+      tag = tag.toLowerCase();
+    }
+    if (typeExtension) {
+      typeExtension = typeExtension.toLowerCase();
+    }
+    var definition = getRegisteredDefinition(typeExtension || tag);
+    if (definition) {
+      if (tag == definition.tag && typeExtension == definition.is) {
+        return new definition.ctor();
+      }
+      if (!typeExtension && !definition.is) {
+        return new definition.ctor();
+      }
+    }
+    var element;
+    if (typeExtension) {
+      element = createElement(tag);
+      element.setAttribute("is", typeExtension);
+      return element;
+    }
+    element = domCreateElement(tag);
+    if (tag.indexOf("-") >= 0) {
+      implementPrototype(element, HTMLElement);
+    }
+    return element;
+  }
+  var domCreateElement = document.createElement.bind(document);
+  var domCreateElementNS = document.createElementNS.bind(document);
+  var isInstance;
+  if (!Object.__proto__ && !useNative) {
+    isInstance = function(obj, ctor) {
+      if (obj instanceof ctor) {
+        return true;
+      }
+      var p = obj;
+      while (p) {
+        if (p === ctor.prototype) {
+          return true;
+        }
+        p = p.__proto__;
+      }
+      return false;
+    };
+  } else {
+    isInstance = function(obj, base) {
+      return obj instanceof base;
+    };
+  }
+  function wrapDomMethodToForceUpgrade(obj, methodName) {
+    var orig = obj[methodName];
+    obj[methodName] = function() {
+      var n = orig.apply(this, arguments);
+      upgradeAll(n);
+      return n;
+    };
+  }
+  wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
+  wrapDomMethodToForceUpgrade(document, "importNode");
+  if (isIE) {
+    (function() {
+      var importNode = document.importNode;
+      document.importNode = function() {
+        var n = importNode.apply(document, arguments);
+        if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+          var f = document.createDocumentFragment();
+          f.appendChild(n);
+          return f;
+        } else {
+          return n;
+        }
+      };
+    })();
+  }
+  document.registerElement = register;
+  document.createElement = createElement;
+  document.createElementNS = createElementNS;
+  scope.registry = registry;
+  scope.instanceof = isInstance;
+  scope.reservedTagList = reservedTagList;
+  scope.getRegisteredDefinition = getRegisteredDefinition;
+  document.register = document.registerElement;
+});
+
+(function(scope) {
+  var useNative = scope.useNative;
+  var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
+  if (useNative) {
+    var nop = function() {};
+    scope.watchShadow = nop;
+    scope.upgrade = nop;
+    scope.upgradeAll = nop;
+    scope.upgradeDocumentTree = nop;
+    scope.upgradeSubtree = nop;
+    scope.takeRecords = nop;
+    scope.instanceof = function(obj, base) {
+      return obj instanceof base;
+    };
+  } else {
+    initializeModules();
+  }
+  var upgradeDocumentTree = scope.upgradeDocumentTree;
+  var upgradeDocument = scope.upgradeDocument;
+  if (!window.wrap) {
+    if (window.ShadowDOMPolyfill) {
+      window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
+      window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
+    } else {
+      window.wrap = window.unwrap = function(node) {
+        return node;
+      };
+    }
+  }
+  if (window.HTMLImports) {
+    window.HTMLImports.__importsParsingHook = function(elt) {
+      if (elt.import) {
+        upgradeDocument(wrap(elt.import));
+      }
+    };
+  }
+  function bootstrap() {
+    upgradeDocumentTree(window.wrap(document));
+    window.CustomElements.ready = true;
+    var requestAnimationFrame = window.requestAnimationFrame || function(f) {
+      setTimeout(f, 16);
+    };
+    requestAnimationFrame(function() {
+      setTimeout(function() {
+        window.CustomElements.readyTime = Date.now();
+        if (window.HTMLImports) {
+          window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
+        }
+        document.dispatchEvent(new CustomEvent("WebComponentsReady", {
+          bubbles: true
+        }));
+      });
+    });
+  }
+  if (document.readyState === "complete" || scope.flags.eager) {
+    bootstrap();
+  } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
+    bootstrap();
+  } else {
+    var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
+    window.addEventListener(loadEvent, bootstrap);
+  }
+})(window.CustomElements);
\ No newline at end of file
diff --git a/packages/web_components/lib/CustomElements.min.js b/packages/web_components/lib/CustomElements.min.js
new file mode 100644
index 0000000..192d493
--- /dev/null
+++ b/packages/web_components/lib/CustomElements.min.js
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){E.push(e),b||(b=!0,w(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){b=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var d=t(a);d&&i.enqueue(d)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++_}function d(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function s(e){var t=new d(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return y=new d(e,t)}function c(e){return N?N:(N=s(y),N.oldValue=e,N)}function l(){y=N=void 0}function f(e){return e===N||e===y}function m(e,t){return e===t?e:N&&f(e)?N:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var w,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))w=setTimeout;else if(window.setImmediate)w=window.setImmediate;else{var h=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=h;h=[],t.forEach(function(e){e()})}}),w=function(e){h.push(e),window.postMessage(g,"*")}}var b=!1,E=[],_=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e);o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i],r.removeListeners(),r.options=t;break}r||(r=new p(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,N;p.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1],i=m(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new u("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?c(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=u("characterData",o),a=e.prevValue;i(o,function(e){return e.characterData?e.characterDataOldValue?c(a):r:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var d,s,f=e.target;"DOMNodeInserted"===e.type?(d=[f],s=[]):(d=[],s=[f]);var m=f.previousSibling,p=f.nextSibling,r=u("childList",e.target.parentNode);r.addedNodes=d,r.removedNodes=s,r.previousSibling=m,r.nextSibling=p,i(e.relatedNode,function(e){return e.childList?r:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),d=0,s=r.length;s>d&&(o=r[d]);d++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||o(e,t)}function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}function o(e,t){b(e,function(e){return n(e,t)?!0:void 0})}function r(e){N.push(e),y||(y=!0,setTimeout(i))}function i(){y=!1;for(var e,t=N,n=0,o=t.length;o>n&&(e=t[n]);n++)e();N=[]}function a(e){_?r(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function s(e){u(e),b(e,function(e){u(e)})}function u(e){_?r(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function m(e,n){if(g.dom){var o=n[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var r=o.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(M(e.addedNodes,function(e){e.localName&&t(e,a)}),M(e.removedNodes,function(e){e.localName&&s(e)}))}),g.dom&&console.groupEnd()}function p(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(e,t.takeRecords()),i())}function w(e){if(!e.__observer){var t=new MutationObserver(m.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),w(e),g.dom&&console.groupEnd()}function h(e){E(e,v)}var g=e.flags,b=e.forSubtree,E=e.forDocumentTree,_=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=_,e.hasThrottledAttached=_;var y=!1,N=[],M=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;O&&(Element.prototype.createShadowRoot=function(){var e=O.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=f,e.upgradeDocumentTree=h,e.upgradeDocument=v,e.upgradeSubtree=o,e.upgradeAll=t,e.attached=a,e.takeRecords=p}),window.CustomElements.addModule(function(e){function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(i&&(r&&i.tag==t.localName||!r&&!i["extends"]))return n(t,i,o)}}function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),r&&e.attached(t),e.upgradeSubtree(t,r),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),d=0;i=a[d];d++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var s=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(u(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return s.prototype||(s.prototype=Object.create(HTMLElement.prototype)),s.__name=t.toLowerCase(),s.lifecycle=s.lifecycle||{},s.ancestry=i(s["extends"]),a(s),d(s),n(s.prototype),c(s.__name,s),s.ctor=l(s),s.ctor.prototype=s.prototype,s.prototype.constructor=s.ctor,e.ready&&h(document),s.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t<y.length;t++)if(e===y[t])return!0}function i(e){var t=u(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function d(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,r=e.prototype,i=!1;r;)r==t&&(i=!0),o=Object.getPrototypeOf(r),o&&(r.__proto__=o),r=o;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function s(e){return b(O(e.tag),e)}function u(e){return e?N[e.toLowerCase()]:void 0}function c(e,t){N[e]=t}function l(e){return function(){return s(e)}}function f(e,t,n){return e===M?m(t,n):D(e,t)}function m(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=u(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=m(e),o.setAttribute("is",t),o):(o=O(e),e.indexOf("-")>=0&&E(o,HTMLElement),o)}function p(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var w,v=e.isIE,h=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,E=e.implementPrototype,_=e.useNative,y=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],N={},M="http://www.w3.org/1999/xhtml",O=document.createElement.bind(document),D=document.createElementNS.bind(document);w=Object.__proto__||_?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=m,document.createElementNS=f,e.registry=N,e["instanceof"]=w,e.reservedTagList=y,e.getRegisteredDefinition=u,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,o=e.initializeModules;e.isIE;if(n){var r=function(){};e.watchShadow=r,e.upgrade=r,e.upgradeAll=r,e.upgradeDocumentTree=r,e.upgradeSubtree=r,e.takeRecords=r,e["instanceof"]=function(e,t){return e instanceof t}}else o();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var d=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(d,t)}else t()}(window.CustomElements);
\ No newline at end of file
diff --git a/packages/web_components/lib/HTMLImports.js b/packages/web_components/lib/HTMLImports.js
new file mode 100644
index 0000000..047e5ac
--- /dev/null
+++ b/packages/web_components/lib/HTMLImports.js
@@ -0,0 +1,1157 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+if (typeof WeakMap === "undefined") {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var counter = Date.now() % 1e9;
+    var WeakMap = function() {
+      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
+    };
+    WeakMap.prototype = {
+      set: function(key, value) {
+        var entry = key[this.name];
+        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
+          value: [ key, value ],
+          writable: true
+        });
+        return this;
+      },
+      get: function(key) {
+        var entry;
+        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
+      },
+      "delete": function(key) {
+        var entry = key[this.name];
+        if (!entry || entry[0] !== key) return false;
+        entry[0] = entry[1] = undefined;
+        return true;
+      },
+      has: function(key) {
+        var entry = key[this.name];
+        if (!entry) return false;
+        return entry[0] === key;
+      }
+    };
+    window.WeakMap = WeakMap;
+  })();
+}
+
+(function(global) {
+  if (global.JsMutationObserver) {
+    return;
+  }
+  var registrationsTable = new WeakMap();
+  var setImmediate;
+  if (/Trident|Edge/.test(navigator.userAgent)) {
+    setImmediate = setTimeout;
+  } else if (window.setImmediate) {
+    setImmediate = window.setImmediate;
+  } else {
+    var setImmediateQueue = [];
+    var sentinel = String(Math.random());
+    window.addEventListener("message", function(e) {
+      if (e.data === sentinel) {
+        var queue = setImmediateQueue;
+        setImmediateQueue = [];
+        queue.forEach(function(func) {
+          func();
+        });
+      }
+    });
+    setImmediate = function(func) {
+      setImmediateQueue.push(func);
+      window.postMessage(sentinel, "*");
+    };
+  }
+  var isScheduled = false;
+  var scheduledObservers = [];
+  function scheduleCallback(observer) {
+    scheduledObservers.push(observer);
+    if (!isScheduled) {
+      isScheduled = true;
+      setImmediate(dispatchCallbacks);
+    }
+  }
+  function wrapIfNeeded(node) {
+    return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
+  }
+  function dispatchCallbacks() {
+    isScheduled = false;
+    var observers = scheduledObservers;
+    scheduledObservers = [];
+    observers.sort(function(o1, o2) {
+      return o1.uid_ - o2.uid_;
+    });
+    var anyNonEmpty = false;
+    observers.forEach(function(observer) {
+      var queue = observer.takeRecords();
+      removeTransientObserversFor(observer);
+      if (queue.length) {
+        observer.callback_(queue, observer);
+        anyNonEmpty = true;
+      }
+    });
+    if (anyNonEmpty) dispatchCallbacks();
+  }
+  function removeTransientObserversFor(observer) {
+    observer.nodes_.forEach(function(node) {
+      var registrations = registrationsTable.get(node);
+      if (!registrations) return;
+      registrations.forEach(function(registration) {
+        if (registration.observer === observer) registration.removeTransientObservers();
+      });
+    });
+  }
+  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
+    for (var node = target; node; node = node.parentNode) {
+      var registrations = registrationsTable.get(node);
+      if (registrations) {
+        for (var j = 0; j < registrations.length; j++) {
+          var registration = registrations[j];
+          var options = registration.options;
+          if (node !== target && !options.subtree) continue;
+          var record = callback(options);
+          if (record) registration.enqueue(record);
+        }
+      }
+    }
+  }
+  var uidCounter = 0;
+  function JsMutationObserver(callback) {
+    this.callback_ = callback;
+    this.nodes_ = [];
+    this.records_ = [];
+    this.uid_ = ++uidCounter;
+  }
+  JsMutationObserver.prototype = {
+    observe: function(target, options) {
+      target = wrapIfNeeded(target);
+      if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
+        throw new SyntaxError();
+      }
+      var registrations = registrationsTable.get(target);
+      if (!registrations) registrationsTable.set(target, registrations = []);
+      var registration;
+      for (var i = 0; i < registrations.length; i++) {
+        if (registrations[i].observer === this) {
+          registration = registrations[i];
+          registration.removeListeners();
+          registration.options = options;
+          break;
+        }
+      }
+      if (!registration) {
+        registration = new Registration(this, target, options);
+        registrations.push(registration);
+        this.nodes_.push(target);
+      }
+      registration.addListeners();
+    },
+    disconnect: function() {
+      this.nodes_.forEach(function(node) {
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          var registration = registrations[i];
+          if (registration.observer === this) {
+            registration.removeListeners();
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+      this.records_ = [];
+    },
+    takeRecords: function() {
+      var copyOfRecords = this.records_;
+      this.records_ = [];
+      return copyOfRecords;
+    }
+  };
+  function MutationRecord(type, target) {
+    this.type = type;
+    this.target = target;
+    this.addedNodes = [];
+    this.removedNodes = [];
+    this.previousSibling = null;
+    this.nextSibling = null;
+    this.attributeName = null;
+    this.attributeNamespace = null;
+    this.oldValue = null;
+  }
+  function copyMutationRecord(original) {
+    var record = new MutationRecord(original.type, original.target);
+    record.addedNodes = original.addedNodes.slice();
+    record.removedNodes = original.removedNodes.slice();
+    record.previousSibling = original.previousSibling;
+    record.nextSibling = original.nextSibling;
+    record.attributeName = original.attributeName;
+    record.attributeNamespace = original.attributeNamespace;
+    record.oldValue = original.oldValue;
+    return record;
+  }
+  var currentRecord, recordWithOldValue;
+  function getRecord(type, target) {
+    return currentRecord = new MutationRecord(type, target);
+  }
+  function getRecordWithOldValue(oldValue) {
+    if (recordWithOldValue) return recordWithOldValue;
+    recordWithOldValue = copyMutationRecord(currentRecord);
+    recordWithOldValue.oldValue = oldValue;
+    return recordWithOldValue;
+  }
+  function clearRecords() {
+    currentRecord = recordWithOldValue = undefined;
+  }
+  function recordRepresentsCurrentMutation(record) {
+    return record === recordWithOldValue || record === currentRecord;
+  }
+  function selectRecord(lastRecord, newRecord) {
+    if (lastRecord === newRecord) return lastRecord;
+    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
+    return null;
+  }
+  function Registration(observer, target, options) {
+    this.observer = observer;
+    this.target = target;
+    this.options = options;
+    this.transientObservedNodes = [];
+  }
+  Registration.prototype = {
+    enqueue: function(record) {
+      var records = this.observer.records_;
+      var length = records.length;
+      if (records.length > 0) {
+        var lastRecord = records[length - 1];
+        var recordToReplaceLast = selectRecord(lastRecord, record);
+        if (recordToReplaceLast) {
+          records[length - 1] = recordToReplaceLast;
+          return;
+        }
+      } else {
+        scheduleCallback(this.observer);
+      }
+      records[length] = record;
+    },
+    addListeners: function() {
+      this.addListeners_(this.target);
+    },
+    addListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
+    },
+    removeListeners: function() {
+      this.removeListeners_(this.target);
+    },
+    removeListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
+    },
+    addTransientObserver: function(node) {
+      if (node === this.target) return;
+      this.addListeners_(node);
+      this.transientObservedNodes.push(node);
+      var registrations = registrationsTable.get(node);
+      if (!registrations) registrationsTable.set(node, registrations = []);
+      registrations.push(this);
+    },
+    removeTransientObservers: function() {
+      var transientObservedNodes = this.transientObservedNodes;
+      this.transientObservedNodes = [];
+      transientObservedNodes.forEach(function(node) {
+        this.removeListeners_(node);
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          if (registrations[i] === this) {
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+    },
+    handleEvent: function(e) {
+      e.stopImmediatePropagation();
+      switch (e.type) {
+       case "DOMAttrModified":
+        var name = e.attrName;
+        var namespace = e.relatedNode.namespaceURI;
+        var target = e.target;
+        var record = new getRecord("attributes", target);
+        record.attributeName = name;
+        record.attributeNamespace = namespace;
+        var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.attributes) return;
+          if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
+            return;
+          }
+          if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMCharacterDataModified":
+        var target = e.target;
+        var record = getRecord("characterData", target);
+        var oldValue = e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.characterData) return;
+          if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMNodeRemoved":
+        this.addTransientObserver(e.target);
+
+       case "DOMNodeInserted":
+        var changedNode = e.target;
+        var addedNodes, removedNodes;
+        if (e.type === "DOMNodeInserted") {
+          addedNodes = [ changedNode ];
+          removedNodes = [];
+        } else {
+          addedNodes = [];
+          removedNodes = [ changedNode ];
+        }
+        var previousSibling = changedNode.previousSibling;
+        var nextSibling = changedNode.nextSibling;
+        var record = getRecord("childList", e.target.parentNode);
+        record.addedNodes = addedNodes;
+        record.removedNodes = removedNodes;
+        record.previousSibling = previousSibling;
+        record.nextSibling = nextSibling;
+        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
+          if (!options.childList) return;
+          return record;
+        });
+      }
+      clearRecords();
+    }
+  };
+  global.JsMutationObserver = JsMutationObserver;
+  if (!global.MutationObserver) {
+    global.MutationObserver = JsMutationObserver;
+    JsMutationObserver._isPolyfilled = true;
+  }
+})(self);
+
+(function(scope) {
+  "use strict";
+  if (!window.performance) {
+    var start = Date.now();
+    window.performance = {
+      now: function() {
+        return Date.now() - start;
+      }
+    };
+  }
+  if (!window.requestAnimationFrame) {
+    window.requestAnimationFrame = function() {
+      var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
+      return nativeRaf ? function(callback) {
+        return nativeRaf(function() {
+          callback(performance.now());
+        });
+      } : function(callback) {
+        return window.setTimeout(callback, 1e3 / 60);
+      };
+    }();
+  }
+  if (!window.cancelAnimationFrame) {
+    window.cancelAnimationFrame = function() {
+      return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
+        clearTimeout(id);
+      };
+    }();
+  }
+  var workingDefaultPrevented = function() {
+    var e = document.createEvent("Event");
+    e.initEvent("foo", true, true);
+    e.preventDefault();
+    return e.defaultPrevented;
+  }();
+  if (!workingDefaultPrevented) {
+    var origPreventDefault = Event.prototype.preventDefault;
+    Event.prototype.preventDefault = function() {
+      if (!this.cancelable) {
+        return;
+      }
+      origPreventDefault.call(this);
+      Object.defineProperty(this, "defaultPrevented", {
+        get: function() {
+          return true;
+        },
+        configurable: true
+      });
+    };
+  }
+  var isIE = /Trident/.test(navigator.userAgent);
+  if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
+    window.CustomEvent = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("CustomEvent");
+      e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
+      return e;
+    };
+    window.CustomEvent.prototype = window.Event.prototype;
+  }
+  if (!window.Event || isIE && typeof window.Event !== "function") {
+    var origEvent = window.Event;
+    window.Event = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("Event");
+      e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
+      return e;
+    };
+    window.Event.prototype = origEvent.prototype;
+  }
+})(window.WebComponents);
+
+window.HTMLImports = window.HTMLImports || {
+  flags: {}
+};
+
+(function(scope) {
+  var IMPORT_LINK_TYPE = "import";
+  var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
+  var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
+  var wrap = function(node) {
+    return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
+  };
+  var rootDocument = wrap(document);
+  var currentScriptDescriptor = {
+    get: function() {
+      var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
+      return wrap(script);
+    },
+    configurable: true
+  };
+  Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
+  Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
+  var isIE = /Trident/.test(navigator.userAgent);
+  function whenReady(callback, doc) {
+    doc = doc || rootDocument;
+    whenDocumentReady(function() {
+      watchImportsLoad(callback, doc);
+    }, doc);
+  }
+  var requiredReadyState = isIE ? "complete" : "interactive";
+  var READY_EVENT = "readystatechange";
+  function isDocumentReady(doc) {
+    return doc.readyState === "complete" || doc.readyState === requiredReadyState;
+  }
+  function whenDocumentReady(callback, doc) {
+    if (!isDocumentReady(doc)) {
+      var checkReady = function() {
+        if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
+          doc.removeEventListener(READY_EVENT, checkReady);
+          whenDocumentReady(callback, doc);
+        }
+      };
+      doc.addEventListener(READY_EVENT, checkReady);
+    } else if (callback) {
+      callback();
+    }
+  }
+  function markTargetLoaded(event) {
+    event.target.__loaded = true;
+  }
+  function watchImportsLoad(callback, doc) {
+    var imports = doc.querySelectorAll("link[rel=import]");
+    var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
+    function checkDone() {
+      if (parsedCount == importCount && callback) {
+        callback({
+          allImports: imports,
+          loadedImports: newImports,
+          errorImports: errorImports
+        });
+      }
+    }
+    function loadedImport(e) {
+      markTargetLoaded(e);
+      newImports.push(this);
+      parsedCount++;
+      checkDone();
+    }
+    function errorLoadingImport(e) {
+      errorImports.push(this);
+      parsedCount++;
+      checkDone();
+    }
+    if (importCount) {
+      for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
+        if (isImportLoaded(imp)) {
+          newImports.push(this);
+          parsedCount++;
+          checkDone();
+        } else {
+          imp.addEventListener("load", loadedImport);
+          imp.addEventListener("error", errorLoadingImport);
+        }
+      }
+    } else {
+      checkDone();
+    }
+  }
+  function isImportLoaded(link) {
+    return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
+  }
+  if (useNative) {
+    new MutationObserver(function(mxns) {
+      for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
+        if (m.addedNodes) {
+          handleImports(m.addedNodes);
+        }
+      }
+    }).observe(document.head, {
+      childList: true
+    });
+    function handleImports(nodes) {
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        if (isImport(n)) {
+          handleImport(n);
+        }
+      }
+    }
+    function isImport(element) {
+      return element.localName === "link" && element.rel === "import";
+    }
+    function handleImport(element) {
+      var loaded = element.import;
+      if (loaded) {
+        markTargetLoaded({
+          target: element
+        });
+      } else {
+        element.addEventListener("load", markTargetLoaded);
+        element.addEventListener("error", markTargetLoaded);
+      }
+    }
+    (function() {
+      if (document.readyState === "loading") {
+        var imports = document.querySelectorAll("link[rel=import]");
+        for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
+          handleImport(imp);
+        }
+      }
+    })();
+  }
+  whenReady(function(detail) {
+    window.HTMLImports.ready = true;
+    window.HTMLImports.readyTime = new Date().getTime();
+    var evt = rootDocument.createEvent("CustomEvent");
+    evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
+    rootDocument.dispatchEvent(evt);
+  });
+  scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
+  scope.useNative = useNative;
+  scope.rootDocument = rootDocument;
+  scope.whenReady = whenReady;
+  scope.isIE = isIE;
+})(window.HTMLImports);
+
+(function(scope) {
+  var modules = [];
+  var addModule = function(module) {
+    modules.push(module);
+  };
+  var initializeModules = function() {
+    modules.forEach(function(module) {
+      module(scope);
+    });
+  };
+  scope.addModule = addModule;
+  scope.initializeModules = initializeModules;
+})(window.HTMLImports);
+
+window.HTMLImports.addModule(function(scope) {
+  var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
+  var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
+  var path = {
+    resolveUrlsInStyle: function(style, linkUrl) {
+      var doc = style.ownerDocument;
+      var resolver = doc.createElement("a");
+      style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
+      return style;
+    },
+    resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
+      var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
+      r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
+      return r;
+    },
+    replaceUrls: function(text, urlObj, linkUrl, regexp) {
+      return text.replace(regexp, function(m, pre, url, post) {
+        var urlPath = url.replace(/["']/g, "");
+        if (linkUrl) {
+          urlPath = new URL(urlPath, linkUrl).href;
+        }
+        urlObj.href = urlPath;
+        urlPath = urlObj.href;
+        return pre + "'" + urlPath + "'" + post;
+      });
+    }
+  };
+  scope.path = path;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var xhr = {
+    async: true,
+    ok: function(request) {
+      return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
+    },
+    load: function(url, next, nextContext) {
+      var request = new XMLHttpRequest();
+      if (scope.flags.debug || scope.flags.bust) {
+        url += "?" + Math.random();
+      }
+      request.open("GET", url, xhr.async);
+      request.addEventListener("readystatechange", function(e) {
+        if (request.readyState === 4) {
+          var redirectedUrl = null;
+          try {
+            var locationHeader = request.getResponseHeader("Location");
+            if (locationHeader) {
+              redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+            }
+          } catch (e) {
+            console.error(e.message);
+          }
+          next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
+        }
+      });
+      request.send();
+      return request;
+    },
+    loadDocument: function(url, next, nextContext) {
+      this.load(url, next, nextContext).responseType = "document";
+    }
+  };
+  scope.xhr = xhr;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var xhr = scope.xhr;
+  var flags = scope.flags;
+  var Loader = function(onLoad, onComplete) {
+    this.cache = {};
+    this.onload = onLoad;
+    this.oncomplete = onComplete;
+    this.inflight = 0;
+    this.pending = {};
+  };
+  Loader.prototype = {
+    addNodes: function(nodes) {
+      this.inflight += nodes.length;
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        this.require(n);
+      }
+      this.checkDone();
+    },
+    addNode: function(node) {
+      this.inflight++;
+      this.require(node);
+      this.checkDone();
+    },
+    require: function(elt) {
+      var url = elt.src || elt.href;
+      elt.__nodeUrl = url;
+      if (!this.dedupe(url, elt)) {
+        this.fetch(url, elt);
+      }
+    },
+    dedupe: function(url, elt) {
+      if (this.pending[url]) {
+        this.pending[url].push(elt);
+        return true;
+      }
+      var resource;
+      if (this.cache[url]) {
+        this.onload(url, elt, this.cache[url]);
+        this.tail();
+        return true;
+      }
+      this.pending[url] = [ elt ];
+      return false;
+    },
+    fetch: function(url, elt) {
+      flags.load && console.log("fetch", url, elt);
+      if (!url) {
+        setTimeout(function() {
+          this.receive(url, elt, {
+            error: "href must be specified"
+          }, null);
+        }.bind(this), 0);
+      } else if (url.match(/^data:/)) {
+        var pieces = url.split(",");
+        var header = pieces[0];
+        var body = pieces[1];
+        if (header.indexOf(";base64") > -1) {
+          body = atob(body);
+        } else {
+          body = decodeURIComponent(body);
+        }
+        setTimeout(function() {
+          this.receive(url, elt, null, body);
+        }.bind(this), 0);
+      } else {
+        var receiveXhr = function(err, resource, redirectedUrl) {
+          this.receive(url, elt, err, resource, redirectedUrl);
+        }.bind(this);
+        xhr.load(url, receiveXhr);
+      }
+    },
+    receive: function(url, elt, err, resource, redirectedUrl) {
+      this.cache[url] = resource;
+      var $p = this.pending[url];
+      for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
+        this.onload(url, p, resource, err, redirectedUrl);
+        this.tail();
+      }
+      this.pending[url] = null;
+    },
+    tail: function() {
+      --this.inflight;
+      this.checkDone();
+    },
+    checkDone: function() {
+      if (!this.inflight) {
+        this.oncomplete();
+      }
+    }
+  };
+  scope.Loader = Loader;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var Observer = function(addCallback) {
+    this.addCallback = addCallback;
+    this.mo = new MutationObserver(this.handler.bind(this));
+  };
+  Observer.prototype = {
+    handler: function(mutations) {
+      for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
+        if (m.type === "childList" && m.addedNodes.length) {
+          this.addedNodes(m.addedNodes);
+        }
+      }
+    },
+    addedNodes: function(nodes) {
+      if (this.addCallback) {
+        this.addCallback(nodes);
+      }
+      for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
+        if (n.children && n.children.length) {
+          this.addedNodes(n.children);
+        }
+      }
+    },
+    observe: function(root) {
+      this.mo.observe(root, {
+        childList: true,
+        subtree: true
+      });
+    }
+  };
+  scope.Observer = Observer;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var path = scope.path;
+  var rootDocument = scope.rootDocument;
+  var flags = scope.flags;
+  var isIE = scope.isIE;
+  var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
+  var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
+  var importParser = {
+    documentSelectors: IMPORT_SELECTOR,
+    importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
+    map: {
+      link: "parseLink",
+      script: "parseScript",
+      style: "parseStyle"
+    },
+    dynamicElements: [],
+    parseNext: function() {
+      var next = this.nextToParse();
+      if (next) {
+        this.parse(next);
+      }
+    },
+    parse: function(elt) {
+      if (this.isParsed(elt)) {
+        flags.parse && console.log("[%s] is already parsed", elt.localName);
+        return;
+      }
+      var fn = this[this.map[elt.localName]];
+      if (fn) {
+        this.markParsing(elt);
+        fn.call(this, elt);
+      }
+    },
+    parseDynamic: function(elt, quiet) {
+      this.dynamicElements.push(elt);
+      if (!quiet) {
+        this.parseNext();
+      }
+    },
+    markParsing: function(elt) {
+      flags.parse && console.log("parsing", elt);
+      this.parsingElement = elt;
+    },
+    markParsingComplete: function(elt) {
+      elt.__importParsed = true;
+      this.markDynamicParsingComplete(elt);
+      if (elt.__importElement) {
+        elt.__importElement.__importParsed = true;
+        this.markDynamicParsingComplete(elt.__importElement);
+      }
+      this.parsingElement = null;
+      flags.parse && console.log("completed", elt);
+    },
+    markDynamicParsingComplete: function(elt) {
+      var i = this.dynamicElements.indexOf(elt);
+      if (i >= 0) {
+        this.dynamicElements.splice(i, 1);
+      }
+    },
+    parseImport: function(elt) {
+      elt.import = elt.__doc;
+      if (window.HTMLImports.__importsParsingHook) {
+        window.HTMLImports.__importsParsingHook(elt);
+      }
+      if (elt.import) {
+        elt.import.__importParsed = true;
+      }
+      this.markParsingComplete(elt);
+      if (elt.__resource && !elt.__error) {
+        elt.dispatchEvent(new CustomEvent("load", {
+          bubbles: false
+        }));
+      } else {
+        elt.dispatchEvent(new CustomEvent("error", {
+          bubbles: false
+        }));
+      }
+      if (elt.__pending) {
+        var fn;
+        while (elt.__pending.length) {
+          fn = elt.__pending.shift();
+          if (fn) {
+            fn({
+              target: elt
+            });
+          }
+        }
+      }
+      this.parseNext();
+    },
+    parseLink: function(linkElt) {
+      if (nodeIsImport(linkElt)) {
+        this.parseImport(linkElt);
+      } else {
+        linkElt.href = linkElt.href;
+        this.parseGeneric(linkElt);
+      }
+    },
+    parseStyle: function(elt) {
+      var src = elt;
+      elt = cloneStyle(elt);
+      src.__appliedElement = elt;
+      elt.__importElement = src;
+      this.parseGeneric(elt);
+    },
+    parseGeneric: function(elt) {
+      this.trackElement(elt);
+      this.addElementToDocument(elt);
+    },
+    rootImportForElement: function(elt) {
+      var n = elt;
+      while (n.ownerDocument.__importLink) {
+        n = n.ownerDocument.__importLink;
+      }
+      return n;
+    },
+    addElementToDocument: function(elt) {
+      var port = this.rootImportForElement(elt.__importElement || elt);
+      port.parentNode.insertBefore(elt, port);
+    },
+    trackElement: function(elt, callback) {
+      var self = this;
+      var done = function(e) {
+        elt.removeEventListener("load", done);
+        elt.removeEventListener("error", done);
+        if (callback) {
+          callback(e);
+        }
+        self.markParsingComplete(elt);
+        self.parseNext();
+      };
+      elt.addEventListener("load", done);
+      elt.addEventListener("error", done);
+      if (isIE && elt.localName === "style") {
+        var fakeLoad = false;
+        if (elt.textContent.indexOf("@import") == -1) {
+          fakeLoad = true;
+        } else if (elt.sheet) {
+          fakeLoad = true;
+          var csr = elt.sheet.cssRules;
+          var len = csr ? csr.length : 0;
+          for (var i = 0, r; i < len && (r = csr[i]); i++) {
+            if (r.type === CSSRule.IMPORT_RULE) {
+              fakeLoad = fakeLoad && Boolean(r.styleSheet);
+            }
+          }
+        }
+        if (fakeLoad) {
+          setTimeout(function() {
+            elt.dispatchEvent(new CustomEvent("load", {
+              bubbles: false
+            }));
+          });
+        }
+      }
+    },
+    parseScript: function(scriptElt) {
+      var script = document.createElement("script");
+      script.__importElement = scriptElt;
+      script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
+      scope.currentScript = scriptElt;
+      this.trackElement(script, function(e) {
+        if (script.parentNode) {
+          script.parentNode.removeChild(script);
+        }
+        scope.currentScript = null;
+      });
+      this.addElementToDocument(script);
+    },
+    nextToParse: function() {
+      this._mayParse = [];
+      return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
+    },
+    nextToParseInDoc: function(doc, link) {
+      if (doc && this._mayParse.indexOf(doc) < 0) {
+        this._mayParse.push(doc);
+        var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
+        for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+          if (!this.isParsed(n)) {
+            if (this.hasResource(n)) {
+              return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
+            } else {
+              return;
+            }
+          }
+        }
+      }
+      return link;
+    },
+    nextToParseDynamic: function() {
+      return this.dynamicElements[0];
+    },
+    parseSelectorsForNode: function(node) {
+      var doc = node.ownerDocument || node;
+      return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
+    },
+    isParsed: function(node) {
+      return node.__importParsed;
+    },
+    needsDynamicParsing: function(elt) {
+      return this.dynamicElements.indexOf(elt) >= 0;
+    },
+    hasResource: function(node) {
+      if (nodeIsImport(node) && node.__doc === undefined) {
+        return false;
+      }
+      return true;
+    }
+  };
+  function nodeIsImport(elt) {
+    return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
+  }
+  function generateScriptDataUrl(script) {
+    var scriptContent = generateScriptContent(script);
+    return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
+  }
+  function generateScriptContent(script) {
+    return script.textContent + generateSourceMapHint(script);
+  }
+  function generateSourceMapHint(script) {
+    var owner = script.ownerDocument;
+    owner.__importedScripts = owner.__importedScripts || 0;
+    var moniker = script.ownerDocument.baseURI;
+    var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
+    owner.__importedScripts++;
+    return "\n//# sourceURL=" + moniker + num + ".js\n";
+  }
+  function cloneStyle(style) {
+    var clone = style.ownerDocument.createElement("style");
+    clone.textContent = style.textContent;
+    path.resolveUrlsInStyle(clone);
+    return clone;
+  }
+  scope.parser = importParser;
+  scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var flags = scope.flags;
+  var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
+  var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
+  var rootDocument = scope.rootDocument;
+  var Loader = scope.Loader;
+  var Observer = scope.Observer;
+  var parser = scope.parser;
+  var importer = {
+    documents: {},
+    documentPreloadSelectors: IMPORT_SELECTOR,
+    importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
+    loadNode: function(node) {
+      importLoader.addNode(node);
+    },
+    loadSubtree: function(parent) {
+      var nodes = this.marshalNodes(parent);
+      importLoader.addNodes(nodes);
+    },
+    marshalNodes: function(parent) {
+      return parent.querySelectorAll(this.loadSelectorsForNode(parent));
+    },
+    loadSelectorsForNode: function(node) {
+      var doc = node.ownerDocument || node;
+      return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
+    },
+    loaded: function(url, elt, resource, err, redirectedUrl) {
+      flags.load && console.log("loaded", url, elt);
+      elt.__resource = resource;
+      elt.__error = err;
+      if (isImportLink(elt)) {
+        var doc = this.documents[url];
+        if (doc === undefined) {
+          doc = err ? null : makeDocument(resource, redirectedUrl || url);
+          if (doc) {
+            doc.__importLink = elt;
+            this.bootDocument(doc);
+          }
+          this.documents[url] = doc;
+        }
+        elt.__doc = doc;
+      }
+      parser.parseNext();
+    },
+    bootDocument: function(doc) {
+      this.loadSubtree(doc);
+      this.observer.observe(doc);
+      parser.parseNext();
+    },
+    loadedAll: function() {
+      parser.parseNext();
+    }
+  };
+  var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
+  importer.observer = new Observer();
+  function isImportLink(elt) {
+    return isLinkRel(elt, IMPORT_LINK_TYPE);
+  }
+  function isLinkRel(elt, rel) {
+    return elt.localName === "link" && elt.getAttribute("rel") === rel;
+  }
+  function hasBaseURIAccessor(doc) {
+    return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
+  }
+  function makeDocument(resource, url) {
+    var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
+    doc._URL = url;
+    var base = doc.createElement("base");
+    base.setAttribute("href", url);
+    if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
+      Object.defineProperty(doc, "baseURI", {
+        value: url
+      });
+    }
+    var meta = doc.createElement("meta");
+    meta.setAttribute("charset", "utf-8");
+    doc.head.appendChild(meta);
+    doc.head.appendChild(base);
+    doc.body.innerHTML = resource;
+    if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
+      HTMLTemplateElement.bootstrap(doc);
+    }
+    return doc;
+  }
+  if (!document.baseURI) {
+    var baseURIDescriptor = {
+      get: function() {
+        var base = document.querySelector("base");
+        return base ? base.href : window.location.href;
+      },
+      configurable: true
+    };
+    Object.defineProperty(document, "baseURI", baseURIDescriptor);
+    Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
+  }
+  scope.importer = importer;
+  scope.importLoader = importLoader;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var parser = scope.parser;
+  var importer = scope.importer;
+  var dynamic = {
+    added: function(nodes) {
+      var owner, parsed, loading;
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        if (!owner) {
+          owner = n.ownerDocument;
+          parsed = parser.isParsed(owner);
+        }
+        loading = this.shouldLoadNode(n);
+        if (loading) {
+          importer.loadNode(n);
+        }
+        if (this.shouldParseNode(n) && parsed) {
+          parser.parseDynamic(n, loading);
+        }
+      }
+    },
+    shouldLoadNode: function(node) {
+      return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
+    },
+    shouldParseNode: function(node) {
+      return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
+    }
+  };
+  importer.observer.addCallback = dynamic.added.bind(dynamic);
+  var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
+});
+
+(function(scope) {
+  var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
+  if (scope.useNative) {
+    return;
+  }
+  initializeModules();
+  var rootDocument = scope.rootDocument;
+  function bootstrap() {
+    window.HTMLImports.importer.bootDocument(rootDocument);
+  }
+  if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
+    bootstrap();
+  } else {
+    document.addEventListener("DOMContentLoaded", bootstrap);
+  }
+})(window.HTMLImports);
\ No newline at end of file
diff --git a/packages/web_components/lib/HTMLImports.min.js b/packages/web_components/lib/HTMLImports.min.js
new file mode 100644
index 0000000..c7773e0
--- /dev/null
+++ b/packages/web_components/lib/HTMLImports.min.js
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){E.push(e),g||(g=!0,f(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){g=!1;var e=E;E=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=v.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++_}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function c(e,t){return y=new s(e,t)}function u(e){return L?L:(L=d(y),L.oldValue=e,L)}function l(){y=L=void 0}function h(e){return e===L||e===y}function m(e,t){return e===t?e:L&&h(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var f,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))f=setTimeout;else if(window.setImmediate)f=window.setImmediate;else{var w=[],b=String(Math.random());window.addEventListener("message",function(e){if(e.data===b){var t=w;w=[],t.forEach(function(e){e()})}}),f=function(e){w.push(e),window.postMessage(b,"*")}}var g=!1,E=[],_=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=v.get(e);r||v.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new p(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var y,L;p.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=m(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new c("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=c("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,d,h=e.target;"DOMNodeInserted"===e.type?(s=[h],d=[]):(s=[],d=[h]);var m=h.previousSibling,p=h.nextSibling,o=c("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=d,o.previousSibling=m,o.nextSibling=p,i(e.relatedNode,function(e){return e.childList?o:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===w}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===w)&&(t.removeEventListener(b,o),r(e,t))};t.addEventListener(b,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){d==c&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function r(e){o(e),u.push(this),d++,n()}function i(e){l.push(this),d++,n()}var s=t.querySelectorAll("link[rel=import]"),d=0,c=s.length,u=[],l=[];if(c)for(var h,m=0;c>m&&(h=s[m]);m++)a(h)?(u.push(this),d++,n()):(h.addEventListener("load",r),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),m=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),f={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(p,"_currentScript",f);var v=/Trident/.test(navigator.userAgent),w=v?"complete":"interactive",b="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)c(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),c&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.__doc?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var d=this.documents[e];void 0===d&&(d=a?null:o(r,s||e),d&&(d.__importLink=n,this.bootDocument(d)),this.documents[e]=d),n.__doc=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=h,e.importLoader=m}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,d=e.length;d>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports);
\ No newline at end of file
diff --git a/packages/web_components/lib/MutationObserver.js b/packages/web_components/lib/MutationObserver.js
new file mode 100644
index 0000000..84965e5
--- /dev/null
+++ b/packages/web_components/lib/MutationObserver.js
@@ -0,0 +1,350 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+if (typeof WeakMap === "undefined") {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var counter = Date.now() % 1e9;
+    var WeakMap = function() {
+      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
+    };
+    WeakMap.prototype = {
+      set: function(key, value) {
+        var entry = key[this.name];
+        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
+          value: [ key, value ],
+          writable: true
+        });
+        return this;
+      },
+      get: function(key) {
+        var entry;
+        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
+      },
+      "delete": function(key) {
+        var entry = key[this.name];
+        if (!entry || entry[0] !== key) return false;
+        entry[0] = entry[1] = undefined;
+        return true;
+      },
+      has: function(key) {
+        var entry = key[this.name];
+        if (!entry) return false;
+        return entry[0] === key;
+      }
+    };
+    window.WeakMap = WeakMap;
+  })();
+}
+
+(function(global) {
+  if (global.JsMutationObserver) {
+    return;
+  }
+  var registrationsTable = new WeakMap();
+  var setImmediate;
+  if (/Trident|Edge/.test(navigator.userAgent)) {
+    setImmediate = setTimeout;
+  } else if (window.setImmediate) {
+    setImmediate = window.setImmediate;
+  } else {
+    var setImmediateQueue = [];
+    var sentinel = String(Math.random());
+    window.addEventListener("message", function(e) {
+      if (e.data === sentinel) {
+        var queue = setImmediateQueue;
+        setImmediateQueue = [];
+        queue.forEach(function(func) {
+          func();
+        });
+      }
+    });
+    setImmediate = function(func) {
+      setImmediateQueue.push(func);
+      window.postMessage(sentinel, "*");
+    };
+  }
+  var isScheduled = false;
+  var scheduledObservers = [];
+  function scheduleCallback(observer) {
+    scheduledObservers.push(observer);
+    if (!isScheduled) {
+      isScheduled = true;
+      setImmediate(dispatchCallbacks);
+    }
+  }
+  function wrapIfNeeded(node) {
+    return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
+  }
+  function dispatchCallbacks() {
+    isScheduled = false;
+    var observers = scheduledObservers;
+    scheduledObservers = [];
+    observers.sort(function(o1, o2) {
+      return o1.uid_ - o2.uid_;
+    });
+    var anyNonEmpty = false;
+    observers.forEach(function(observer) {
+      var queue = observer.takeRecords();
+      removeTransientObserversFor(observer);
+      if (queue.length) {
+        observer.callback_(queue, observer);
+        anyNonEmpty = true;
+      }
+    });
+    if (anyNonEmpty) dispatchCallbacks();
+  }
+  function removeTransientObserversFor(observer) {
+    observer.nodes_.forEach(function(node) {
+      var registrations = registrationsTable.get(node);
+      if (!registrations) return;
+      registrations.forEach(function(registration) {
+        if (registration.observer === observer) registration.removeTransientObservers();
+      });
+    });
+  }
+  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
+    for (var node = target; node; node = node.parentNode) {
+      var registrations = registrationsTable.get(node);
+      if (registrations) {
+        for (var j = 0; j < registrations.length; j++) {
+          var registration = registrations[j];
+          var options = registration.options;
+          if (node !== target && !options.subtree) continue;
+          var record = callback(options);
+          if (record) registration.enqueue(record);
+        }
+      }
+    }
+  }
+  var uidCounter = 0;
+  function JsMutationObserver(callback) {
+    this.callback_ = callback;
+    this.nodes_ = [];
+    this.records_ = [];
+    this.uid_ = ++uidCounter;
+  }
+  JsMutationObserver.prototype = {
+    observe: function(target, options) {
+      target = wrapIfNeeded(target);
+      if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
+        throw new SyntaxError();
+      }
+      var registrations = registrationsTable.get(target);
+      if (!registrations) registrationsTable.set(target, registrations = []);
+      var registration;
+      for (var i = 0; i < registrations.length; i++) {
+        if (registrations[i].observer === this) {
+          registration = registrations[i];
+          registration.removeListeners();
+          registration.options = options;
+          break;
+        }
+      }
+      if (!registration) {
+        registration = new Registration(this, target, options);
+        registrations.push(registration);
+        this.nodes_.push(target);
+      }
+      registration.addListeners();
+    },
+    disconnect: function() {
+      this.nodes_.forEach(function(node) {
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          var registration = registrations[i];
+          if (registration.observer === this) {
+            registration.removeListeners();
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+      this.records_ = [];
+    },
+    takeRecords: function() {
+      var copyOfRecords = this.records_;
+      this.records_ = [];
+      return copyOfRecords;
+    }
+  };
+  function MutationRecord(type, target) {
+    this.type = type;
+    this.target = target;
+    this.addedNodes = [];
+    this.removedNodes = [];
+    this.previousSibling = null;
+    this.nextSibling = null;
+    this.attributeName = null;
+    this.attributeNamespace = null;
+    this.oldValue = null;
+  }
+  function copyMutationRecord(original) {
+    var record = new MutationRecord(original.type, original.target);
+    record.addedNodes = original.addedNodes.slice();
+    record.removedNodes = original.removedNodes.slice();
+    record.previousSibling = original.previousSibling;
+    record.nextSibling = original.nextSibling;
+    record.attributeName = original.attributeName;
+    record.attributeNamespace = original.attributeNamespace;
+    record.oldValue = original.oldValue;
+    return record;
+  }
+  var currentRecord, recordWithOldValue;
+  function getRecord(type, target) {
+    return currentRecord = new MutationRecord(type, target);
+  }
+  function getRecordWithOldValue(oldValue) {
+    if (recordWithOldValue) return recordWithOldValue;
+    recordWithOldValue = copyMutationRecord(currentRecord);
+    recordWithOldValue.oldValue = oldValue;
+    return recordWithOldValue;
+  }
+  function clearRecords() {
+    currentRecord = recordWithOldValue = undefined;
+  }
+  function recordRepresentsCurrentMutation(record) {
+    return record === recordWithOldValue || record === currentRecord;
+  }
+  function selectRecord(lastRecord, newRecord) {
+    if (lastRecord === newRecord) return lastRecord;
+    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
+    return null;
+  }
+  function Registration(observer, target, options) {
+    this.observer = observer;
+    this.target = target;
+    this.options = options;
+    this.transientObservedNodes = [];
+  }
+  Registration.prototype = {
+    enqueue: function(record) {
+      var records = this.observer.records_;
+      var length = records.length;
+      if (records.length > 0) {
+        var lastRecord = records[length - 1];
+        var recordToReplaceLast = selectRecord(lastRecord, record);
+        if (recordToReplaceLast) {
+          records[length - 1] = recordToReplaceLast;
+          return;
+        }
+      } else {
+        scheduleCallback(this.observer);
+      }
+      records[length] = record;
+    },
+    addListeners: function() {
+      this.addListeners_(this.target);
+    },
+    addListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
+    },
+    removeListeners: function() {
+      this.removeListeners_(this.target);
+    },
+    removeListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
+    },
+    addTransientObserver: function(node) {
+      if (node === this.target) return;
+      this.addListeners_(node);
+      this.transientObservedNodes.push(node);
+      var registrations = registrationsTable.get(node);
+      if (!registrations) registrationsTable.set(node, registrations = []);
+      registrations.push(this);
+    },
+    removeTransientObservers: function() {
+      var transientObservedNodes = this.transientObservedNodes;
+      this.transientObservedNodes = [];
+      transientObservedNodes.forEach(function(node) {
+        this.removeListeners_(node);
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          if (registrations[i] === this) {
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+    },
+    handleEvent: function(e) {
+      e.stopImmediatePropagation();
+      switch (e.type) {
+       case "DOMAttrModified":
+        var name = e.attrName;
+        var namespace = e.relatedNode.namespaceURI;
+        var target = e.target;
+        var record = new getRecord("attributes", target);
+        record.attributeName = name;
+        record.attributeNamespace = namespace;
+        var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.attributes) return;
+          if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
+            return;
+          }
+          if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMCharacterDataModified":
+        var target = e.target;
+        var record = getRecord("characterData", target);
+        var oldValue = e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.characterData) return;
+          if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMNodeRemoved":
+        this.addTransientObserver(e.target);
+
+       case "DOMNodeInserted":
+        var changedNode = e.target;
+        var addedNodes, removedNodes;
+        if (e.type === "DOMNodeInserted") {
+          addedNodes = [ changedNode ];
+          removedNodes = [];
+        } else {
+          addedNodes = [];
+          removedNodes = [ changedNode ];
+        }
+        var previousSibling = changedNode.previousSibling;
+        var nextSibling = changedNode.nextSibling;
+        var record = getRecord("childList", e.target.parentNode);
+        record.addedNodes = addedNodes;
+        record.removedNodes = removedNodes;
+        record.previousSibling = previousSibling;
+        record.nextSibling = nextSibling;
+        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
+          if (!options.childList) return;
+          return record;
+        });
+      }
+      clearRecords();
+    }
+  };
+  global.JsMutationObserver = JsMutationObserver;
+  if (!global.MutationObserver) {
+    global.MutationObserver = JsMutationObserver;
+    JsMutationObserver._isPolyfilled = true;
+  }
+})(self);
\ No newline at end of file
diff --git a/packages/web_components/lib/MutationObserver.min.js b/packages/web_components/lib/MutationObserver.min.js
new file mode 100644
index 0000000..a50ec72
--- /dev/null
+++ b/packages/web_components/lib/MutationObserver.min.js
@@ -0,0 +1,11 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};r.prototype={set:function(t,r){var i=t[this.name];return i&&i[0]===t?i[1]=r:e(t,this.name,{value:[t,r],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=r}(),function(e){function t(e){N.push(e),O||(O=!0,b(i))}function r(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function i(){O=!1;var e=N;N=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var r=e.takeRecords();n(e),r.length&&(e.callback_(r,e),t=!0)}),t&&i()}function n(e){e.nodes_.forEach(function(t){var r=p.get(t);r&&r.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function a(e,t){for(var r=e;r;r=r.parentNode){var i=p.get(r);if(i)for(var n=0;n<i.length;n++){var a=i[n],s=a.options;if(r===e||s.subtree){var o=t(s);o&&a.enqueue(o)}}}}function s(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++M}function o(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(e){var t=new o(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function u(e,t){return D=new o(e,t)}function h(e){return w?w:(w=d(D),w.oldValue=e,w)}function c(){D=w=void 0}function v(e){return e===w||e===D}function l(e,t){return e===t?e:w&&v(e)?w:null}function f(e,t,r){this.observer=e,this.target=t,this.options=r,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var b,p=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))b=setTimeout;else if(window.setImmediate)b=window.setImmediate;else{var g=[],m=String(Math.random());window.addEventListener("message",function(e){if(e.data===m){var t=g;g=[],t.forEach(function(e){e()})}}),b=function(e){g.push(e),window.postMessage(m,"*")}}var O=!1,N=[],M=0;s.prototype={observe:function(e,t){if(e=r(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var i=p.get(e);i||p.set(e,i=[]);for(var n,a=0;a<i.length;a++)if(i[a].observer===this){n=i[a],n.removeListeners(),n.options=t;break}n||(n=new f(this,e,t),i.push(n),this.nodes_.push(e)),n.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=p.get(e),r=0;r<t.length;r++){var i=t[r];if(i.observer===this){i.removeListeners(),t.splice(r,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var D,w;f.prototype={enqueue:function(e){var r=this.observer.records_,i=r.length;if(r.length>0){var n=r[i-1],a=l(n,e);if(a)return void(r[i-1]=a)}else t(this.observer);r[i]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=p.get(e);t||p.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=p.get(e),r=0;r<t.length;r++)if(t[r]===this){t.splice(r,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,r=e.relatedNode.namespaceURI,i=e.target,n=new u("attributes",i);n.attributeName=t,n.attributeNamespace=r;var s=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;a(i,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(r)?void 0:e.attributeOldValue?h(s):n});break;case"DOMCharacterDataModified":var i=e.target,n=u("characterData",i),s=e.prevValue;a(i,function(e){return e.characterData?e.characterDataOldValue?h(s):n:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var o,d,v=e.target;"DOMNodeInserted"===e.type?(o=[v],d=[]):(o=[],d=[v]);var l=v.previousSibling,f=v.nextSibling,n=u("childList",e.target.parentNode);n.addedNodes=o,n.removedNodes=d,n.previousSibling=l,n.nextSibling=f,a(e.relatedNode,function(e){return e.childList?n:void 0})}c()}},e.JsMutationObserver=s,e.MutationObserver||(e.MutationObserver=s,s._isPolyfilled=!0)}}(self);
\ No newline at end of file
diff --git a/packages/web_components/lib/README.md b/packages/web_components/lib/README.md
new file mode 100644
index 0000000..01774b9
--- /dev/null
+++ b/packages/web_components/lib/README.md
@@ -0,0 +1,155 @@
+webcomponents.js
+================
+
+[![Join the chat at https://gitter.im/webcomponents/webcomponentsjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webcomponents/webcomponentsjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
+
+A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
+
+**Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).
+
+**HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).
+
+**Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).
+
+This also folds in polyfills for `MutationObserver` and `WeakMap`.
+
+
+## Releases
+
+Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/webcomponents/webcomponentsjs/releases) of this repo. There are two variants:
+
+`webcomponents.js` includes all of the polyfills.
+
+`webcomponents-lite.js` includes all polyfills except for shadow DOM.
+
+
+## Browser Support
+
+Our polyfills are intended to work in the latest versions of evergreen browsers. See below
+for our complete browser support matrix:
+
+| Polyfill   | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* |
+| ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|
+| Custom Elements | ~ | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |
+| HTML Imports | ~ | ✓ | ✓ | ✓ | ✓| ✓| ✓ |
+| Shadow DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
+| Templates | ✓ | ✓ | ✓ | ✓| ✓ | ✓ | ✓ |
+
+
+*Indicates the current version of the browser
+
+~Indicates support may be flaky. If using Custom Elements or HTML Imports with Shadow DOM,
+you will get the non-flaky Mutation Observer polyfill that Shadow DOM includes.
+
+The polyfills may work in older browsers, however require additional polyfills (such as classList)
+to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
+
+
+### Manually Building
+
+If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system:
+
+ * install [node.js](http://nodejs.org/) using the instructions on their website
+ * use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
+
+Now you are ready to build the polyfills with:
+
+    # install dependencies
+    npm install
+    # build
+    gulp build
+
+The builds will be placed into the `dist/` directory.
+
+## Contribute
+
+See the [contributing guide](CONTRIBUTING.md)
+
+## License
+
+Everything in this repository is BSD style license unless otherwise specified.
+
+Copyright (c) 2015 The Polymer Authors. All rights reserved.
+
+## Helper utilities
+
+### `WebComponentsReady`
+
+Under native HTML Imports, `<script>` tags in the main document block the loading of such imports. This is to ensure the imports have loaded and any registered elements in them have been upgraded. 
+
+The webcomponents.js and webcomponents-lite.js polyfills parse element definitions and handle their upgrade asynchronously. If prematurely fetching the element from the DOM before it has an opportunity to upgrade, you'll be working with an `HTMLUnknownElement`. 
+
+For these situations (or when you need an approximate replacement for the Polymer 0.5 `polymer-ready` behavior), you can use the `WebComponentsReady` event as a signal before interacting with the element. The criteria for this event to fire is all Custom Elements with definitions registered by the time HTML Imports available at load time have loaded have upgraded.
+
+```js
+window.addEventListener('WebComponentsReady', function(e) {
+  // imports are loaded and elements have been registered
+  console.log('Components are ready');
+});
+```
+
+## Known Issues
+
+  * [Limited CSS encapsulation](#encapsulation)
+  * [Element wrapping / unwrapping limitations](#wrapping)
+  * [Custom element's constructor property is unreliable](#constructor)
+  * [Contenteditable elements do not trigger MutationObserver](#contentedit)
+  * [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)
+  * [ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
+  * [HTML imports: document.currentScript doesn't work as expected](#currentscript)
+  * [execCommand isn't supported under Shadow DOM](#execcommand)
+
+### Limited CSS encapsulation <a id="encapsulation"></a>
+Under native Shadow DOM, CSS selectors cannot cross the shadow boundary. This means document level styles don't apply to shadow roots, and styles defined within a shadow root don't apply outside of that shadow root. [Several selectors](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/) are provided to be able to deal with the shadow boundary.
+
+The Shadow DOM polyfill can't prevent document styles from leaking into shadow roots. It can, however, encapsulate styles within shadow roots to some extent. This behavior isn't automatically emulated by the Shadow DOM polyfill, but it can be achieved by manually using the included ShadowCSS shim:
+
+```
+WebComponents.ShadowCSS.shimStyling( shadowRoot, scope );
+```
+
+... where `shadowRoot` is the shadow root of a DOM element, and `scope` is the name of the scope used to prefix the selectors. This removes all `<style>` elements from the shadow root, rewrites it rules using the given scope and reinserts the style as a document level stylesheet. Note that the `:host` and `:host-context` pseudo classes are also rewritten.
+
+For a full explanation on the implementation and both the possibilities and the limitations of ShadowCSS please view the documentation in the [ShadowCSS source](src/ShadowCSS/ShadowCSS.js).
+
+### Element wrapping / unwrapping limitations <a id="wrapping"></a>
+The Shadow DOM polyfill is implemented by [wrapping](http://webcomponents.org/polyfills/shadow-dom/#wrappers) DOM elements whenever possible. It does this by wrapping methods like `document.querySelector` to return wrapped DOM elements. This has a few caveats:
+   * Not _everything_ can be wrapped. For example, elements like `document`, `window`, `document.body`, `document.fullscreenElement` and others are non-configurable and thus cannot be overridden.
+   * Wrappers don't support [live NodeLists](https://developer.mozilla.org/en-US/docs/Web/API/NodeList#A_sometimes-live_collection) like `HTMLElement.childNodes` and `HTMLFormElement.elements`. All NodeLists are snapshotted upon read. See [#217](https://github.com/webcomponents/webcomponentsjs/issues/217) for an explanation.
+
+In order to work around these limitations the polyfill provides the `ShadowDOMPolyfill.wrap` and `ShadowDOMPolyfill.unwrap` methods to respectively wrap and unwrap DOM elements manually.
+
+### Custom element's constructor property is unreliable <a id="constructor"></a>
+See [#215](https://github.com/webcomponents/webcomponentsjs/issues/215) for background.
+
+In Safari and IE, instances of Custom Elements have a `constructor` property of `HTMLUnknownElementConstructor` and `HTMLUnknownElement`, respectively. It's unsafe to rely on this property for checking element types.
+
+It's worth noting that `customElement.__proto__.__proto__.constructor` is `HTMLElementPrototype` and that the prototype chain isn't modified by the polyfills(onto `ElementPrototype`, etc.)
+
+### Contenteditable elements do not trigger MutationObserver <a id="contentedit"></a>
+Using the MutationObserver polyfill, it isn't possible to monitor mutations of an element marked `contenteditable`.
+See [the mailing list](https://groups.google.com/forum/#!msg/polymer-dev/LHdtRVXXVsA/v1sGoiTYWUkJ)
+
+### ShadowCSS: :host-context(...):host(...) doesn't work <a id="hostcontext"></a>
+See [#16](https://github.com/webcomponents/webcomponentsjs/issues/16) for background.
+
+Under the shadow DOM polyfill, rules like:
+```
+:host-context(.foo):host(.bar) {...}
+```
+don't work, despite working under native Shadow DOM. The solution is to use `polyfill-next-selector` like:
+
+```
+polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }
+```
+
+### ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
+ShadowCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadowCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not. 
+
+### HTML imports: document.currentScript doesn't work as expected <a id="currentscript"></a>
+In native HTML Imports, document.currentScript.ownerDocument references the import document itself. In the polyfill use document._currentScript.ownerDocument (note the underscore).
+
+### execCommand and contenteditable isn't supported under Shadow DOM <a id="execcommand"></a>
+See [#212](https://github.com/webcomponents/webcomponentsjs/issues/212)
+
+`execCommand`, and `contenteditable` aren't supported under the ShadowDOM polyfill, with commands that insert or remove nodes being especially prone to failure.
diff --git a/packages/web_components/lib/ShadowDOM.js b/packages/web_components/lib/ShadowDOM.js
new file mode 100644
index 0000000..14565b2
--- /dev/null
+++ b/packages/web_components/lib/ShadowDOM.js
@@ -0,0 +1,4493 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+if (typeof WeakMap === "undefined") {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var counter = Date.now() % 1e9;
+    var WeakMap = function() {
+      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
+    };
+    WeakMap.prototype = {
+      set: function(key, value) {
+        var entry = key[this.name];
+        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
+          value: [ key, value ],
+          writable: true
+        });
+        return this;
+      },
+      get: function(key) {
+        var entry;
+        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
+      },
+      "delete": function(key) {
+        var entry = key[this.name];
+        if (!entry || entry[0] !== key) return false;
+        entry[0] = entry[1] = undefined;
+        return true;
+      },
+      has: function(key) {
+        var entry = key[this.name];
+        if (!entry) return false;
+        return entry[0] === key;
+      }
+    };
+    window.WeakMap = WeakMap;
+  })();
+}
+
+window.ShadowDOMPolyfill = {};
+
+(function(scope) {
+  "use strict";
+  var constructorTable = new WeakMap();
+  var nativePrototypeTable = new WeakMap();
+  var wrappers = Object.create(null);
+  function detectEval() {
+    if (typeof chrome !== "undefined" && chrome.app && chrome.app.runtime) {
+      return false;
+    }
+    if (navigator.getDeviceStorage) {
+      return false;
+    }
+    try {
+      var f = new Function("return true;");
+      return f();
+    } catch (ex) {
+      return false;
+    }
+  }
+  var hasEval = detectEval();
+  function assert(b) {
+    if (!b) throw new Error("Assertion failed");
+  }
+  var defineProperty = Object.defineProperty;
+  var getOwnPropertyNames = Object.getOwnPropertyNames;
+  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+  function mixin(to, from) {
+    var names = getOwnPropertyNames(from);
+    for (var i = 0; i < names.length; i++) {
+      var name = names[i];
+      defineProperty(to, name, getOwnPropertyDescriptor(from, name));
+    }
+    return to;
+  }
+  function mixinStatics(to, from) {
+    var names = getOwnPropertyNames(from);
+    for (var i = 0; i < names.length; i++) {
+      var name = names[i];
+      switch (name) {
+       case "arguments":
+       case "caller":
+       case "length":
+       case "name":
+       case "prototype":
+       case "toString":
+        continue;
+      }
+      defineProperty(to, name, getOwnPropertyDescriptor(from, name));
+    }
+    return to;
+  }
+  function oneOf(object, propertyNames) {
+    for (var i = 0; i < propertyNames.length; i++) {
+      if (propertyNames[i] in object) return propertyNames[i];
+    }
+  }
+  var nonEnumerableDataDescriptor = {
+    value: undefined,
+    configurable: true,
+    enumerable: false,
+    writable: true
+  };
+  function defineNonEnumerableDataProperty(object, name, value) {
+    nonEnumerableDataDescriptor.value = value;
+    defineProperty(object, name, nonEnumerableDataDescriptor);
+  }
+  getOwnPropertyNames(window);
+  function getWrapperConstructor(node, opt_instance) {
+    var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
+    if (isFirefox) {
+      try {
+        getOwnPropertyNames(nativePrototype);
+      } catch (error) {
+        nativePrototype = nativePrototype.__proto__;
+      }
+    }
+    var wrapperConstructor = constructorTable.get(nativePrototype);
+    if (wrapperConstructor) return wrapperConstructor;
+    var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
+    var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
+    registerInternal(nativePrototype, GeneratedWrapper, opt_instance);
+    return GeneratedWrapper;
+  }
+  function addForwardingProperties(nativePrototype, wrapperPrototype) {
+    installProperty(nativePrototype, wrapperPrototype, true);
+  }
+  function registerInstanceProperties(wrapperPrototype, instanceObject) {
+    installProperty(instanceObject, wrapperPrototype, false);
+  }
+  var isFirefox = /Firefox/.test(navigator.userAgent);
+  var dummyDescriptor = {
+    get: function() {},
+    set: function(v) {},
+    configurable: true,
+    enumerable: true
+  };
+  function isEventHandlerName(name) {
+    return /^on[a-z]+$/.test(name);
+  }
+  function isIdentifierName(name) {
+    return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
+  }
+  function getGetter(name) {
+    return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {
+      return this.__impl4cf1e782hg__[name];
+    };
+  }
+  function getSetter(name) {
+    return hasEval && isIdentifierName(name) ? new Function("v", "this.__impl4cf1e782hg__." + name + " = v") : function(v) {
+      this.__impl4cf1e782hg__[name] = v;
+    };
+  }
+  function getMethod(name) {
+    return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name + ".apply(this.__impl4cf1e782hg__, arguments)") : function() {
+      return this.__impl4cf1e782hg__[name].apply(this.__impl4cf1e782hg__, arguments);
+    };
+  }
+  function getDescriptor(source, name) {
+    try {
+      return Object.getOwnPropertyDescriptor(source, name);
+    } catch (ex) {
+      return dummyDescriptor;
+    }
+  }
+  var isBrokenSafari = function() {
+    var descr = Object.getOwnPropertyDescriptor(Node.prototype, "nodeType");
+    return descr && !descr.get && !descr.set;
+  }();
+  function installProperty(source, target, allowMethod, opt_blacklist) {
+    var names = getOwnPropertyNames(source);
+    for (var i = 0; i < names.length; i++) {
+      var name = names[i];
+      if (name === "polymerBlackList_") continue;
+      if (name in target) continue;
+      if (source.polymerBlackList_ && source.polymerBlackList_[name]) continue;
+      if (isFirefox) {
+        source.__lookupGetter__(name);
+      }
+      var descriptor = getDescriptor(source, name);
+      var getter, setter;
+      if (typeof descriptor.value === "function") {
+        if (allowMethod) {
+          target[name] = getMethod(name);
+        }
+        continue;
+      }
+      var isEvent = isEventHandlerName(name);
+      if (isEvent) getter = scope.getEventHandlerGetter(name); else getter = getGetter(name);
+      if (descriptor.writable || descriptor.set || isBrokenSafari) {
+        if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);
+      }
+      var configurable = isBrokenSafari || descriptor.configurable;
+      defineProperty(target, name, {
+        get: getter,
+        set: setter,
+        configurable: configurable,
+        enumerable: descriptor.enumerable
+      });
+    }
+  }
+  function register(nativeConstructor, wrapperConstructor, opt_instance) {
+    if (nativeConstructor == null) {
+      return;
+    }
+    var nativePrototype = nativeConstructor.prototype;
+    registerInternal(nativePrototype, wrapperConstructor, opt_instance);
+    mixinStatics(wrapperConstructor, nativeConstructor);
+  }
+  function registerInternal(nativePrototype, wrapperConstructor, opt_instance) {
+    var wrapperPrototype = wrapperConstructor.prototype;
+    assert(constructorTable.get(nativePrototype) === undefined);
+    constructorTable.set(nativePrototype, wrapperConstructor);
+    nativePrototypeTable.set(wrapperPrototype, nativePrototype);
+    addForwardingProperties(nativePrototype, wrapperPrototype);
+    if (opt_instance) registerInstanceProperties(wrapperPrototype, opt_instance);
+    defineNonEnumerableDataProperty(wrapperPrototype, "constructor", wrapperConstructor);
+    wrapperConstructor.prototype = wrapperPrototype;
+  }
+  function isWrapperFor(wrapperConstructor, nativeConstructor) {
+    return constructorTable.get(nativeConstructor.prototype) === wrapperConstructor;
+  }
+  function registerObject(object) {
+    var nativePrototype = Object.getPrototypeOf(object);
+    var superWrapperConstructor = getWrapperConstructor(nativePrototype);
+    var GeneratedWrapper = createWrapperConstructor(superWrapperConstructor);
+    registerInternal(nativePrototype, GeneratedWrapper, object);
+    return GeneratedWrapper;
+  }
+  function createWrapperConstructor(superWrapperConstructor) {
+    function GeneratedWrapper(node) {
+      superWrapperConstructor.call(this, node);
+    }
+    var p = Object.create(superWrapperConstructor.prototype);
+    p.constructor = GeneratedWrapper;
+    GeneratedWrapper.prototype = p;
+    return GeneratedWrapper;
+  }
+  function isWrapper(object) {
+    return object && object.__impl4cf1e782hg__;
+  }
+  function isNative(object) {
+    return !isWrapper(object);
+  }
+  function wrap(impl) {
+    if (impl === null) return null;
+    assert(isNative(impl));
+    var wrapper = impl.__wrapper8e3dd93a60__;
+    if (wrapper != null) {
+      return wrapper;
+    }
+    return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);
+  }
+  function unwrap(wrapper) {
+    if (wrapper === null) return null;
+    assert(isWrapper(wrapper));
+    return wrapper.__impl4cf1e782hg__;
+  }
+  function unsafeUnwrap(wrapper) {
+    return wrapper.__impl4cf1e782hg__;
+  }
+  function setWrapper(impl, wrapper) {
+    wrapper.__impl4cf1e782hg__ = impl;
+    impl.__wrapper8e3dd93a60__ = wrapper;
+  }
+  function unwrapIfNeeded(object) {
+    return object && isWrapper(object) ? unwrap(object) : object;
+  }
+  function wrapIfNeeded(object) {
+    return object && !isWrapper(object) ? wrap(object) : object;
+  }
+  function rewrap(node, wrapper) {
+    if (wrapper === null) return;
+    assert(isNative(node));
+    assert(wrapper === undefined || isWrapper(wrapper));
+    node.__wrapper8e3dd93a60__ = wrapper;
+  }
+  var getterDescriptor = {
+    get: undefined,
+    configurable: true,
+    enumerable: true
+  };
+  function defineGetter(constructor, name, getter) {
+    getterDescriptor.get = getter;
+    defineProperty(constructor.prototype, name, getterDescriptor);
+  }
+  function defineWrapGetter(constructor, name) {
+    defineGetter(constructor, name, function() {
+      return wrap(this.__impl4cf1e782hg__[name]);
+    });
+  }
+  function forwardMethodsToWrapper(constructors, names) {
+    constructors.forEach(function(constructor) {
+      names.forEach(function(name) {
+        constructor.prototype[name] = function() {
+          var w = wrapIfNeeded(this);
+          return w[name].apply(w, arguments);
+        };
+      });
+    });
+  }
+  scope.addForwardingProperties = addForwardingProperties;
+  scope.assert = assert;
+  scope.constructorTable = constructorTable;
+  scope.defineGetter = defineGetter;
+  scope.defineWrapGetter = defineWrapGetter;
+  scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
+  scope.isIdentifierName = isIdentifierName;
+  scope.isWrapper = isWrapper;
+  scope.isWrapperFor = isWrapperFor;
+  scope.mixin = mixin;
+  scope.nativePrototypeTable = nativePrototypeTable;
+  scope.oneOf = oneOf;
+  scope.registerObject = registerObject;
+  scope.registerWrapper = register;
+  scope.rewrap = rewrap;
+  scope.setWrapper = setWrapper;
+  scope.unsafeUnwrap = unsafeUnwrap;
+  scope.unwrap = unwrap;
+  scope.unwrapIfNeeded = unwrapIfNeeded;
+  scope.wrap = wrap;
+  scope.wrapIfNeeded = wrapIfNeeded;
+  scope.wrappers = wrappers;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  function newSplice(index, removed, addedCount) {
+    return {
+      index: index,
+      removed: removed,
+      addedCount: addedCount
+    };
+  }
+  var EDIT_LEAVE = 0;
+  var EDIT_UPDATE = 1;
+  var EDIT_ADD = 2;
+  var EDIT_DELETE = 3;
+  function ArraySplice() {}
+  ArraySplice.prototype = {
+    calcEditDistances: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
+      var rowCount = oldEnd - oldStart + 1;
+      var columnCount = currentEnd - currentStart + 1;
+      var distances = new Array(rowCount);
+      for (var i = 0; i < rowCount; i++) {
+        distances[i] = new Array(columnCount);
+        distances[i][0] = i;
+      }
+      for (var j = 0; j < columnCount; j++) distances[0][j] = j;
+      for (var i = 1; i < rowCount; i++) {
+        for (var j = 1; j < columnCount; j++) {
+          if (this.equals(current[currentStart + j - 1], old[oldStart + i - 1])) distances[i][j] = distances[i - 1][j - 1]; else {
+            var north = distances[i - 1][j] + 1;
+            var west = distances[i][j - 1] + 1;
+            distances[i][j] = north < west ? north : west;
+          }
+        }
+      }
+      return distances;
+    },
+    spliceOperationsFromEditDistances: function(distances) {
+      var i = distances.length - 1;
+      var j = distances[0].length - 1;
+      var current = distances[i][j];
+      var edits = [];
+      while (i > 0 || j > 0) {
+        if (i == 0) {
+          edits.push(EDIT_ADD);
+          j--;
+          continue;
+        }
+        if (j == 0) {
+          edits.push(EDIT_DELETE);
+          i--;
+          continue;
+        }
+        var northWest = distances[i - 1][j - 1];
+        var west = distances[i - 1][j];
+        var north = distances[i][j - 1];
+        var min;
+        if (west < north) min = west < northWest ? west : northWest; else min = north < northWest ? north : northWest;
+        if (min == northWest) {
+          if (northWest == current) {
+            edits.push(EDIT_LEAVE);
+          } else {
+            edits.push(EDIT_UPDATE);
+            current = northWest;
+          }
+          i--;
+          j--;
+        } else if (min == west) {
+          edits.push(EDIT_DELETE);
+          i--;
+          current = west;
+        } else {
+          edits.push(EDIT_ADD);
+          j--;
+          current = north;
+        }
+      }
+      edits.reverse();
+      return edits;
+    },
+    calcSplices: function(current, currentStart, currentEnd, old, oldStart, oldEnd) {
+      var prefixCount = 0;
+      var suffixCount = 0;
+      var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);
+      if (currentStart == 0 && oldStart == 0) prefixCount = this.sharedPrefix(current, old, minLength);
+      if (currentEnd == current.length && oldEnd == old.length) suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);
+      currentStart += prefixCount;
+      oldStart += prefixCount;
+      currentEnd -= suffixCount;
+      oldEnd -= suffixCount;
+      if (currentEnd - currentStart == 0 && oldEnd - oldStart == 0) return [];
+      if (currentStart == currentEnd) {
+        var splice = newSplice(currentStart, [], 0);
+        while (oldStart < oldEnd) splice.removed.push(old[oldStart++]);
+        return [ splice ];
+      } else if (oldStart == oldEnd) return [ newSplice(currentStart, [], currentEnd - currentStart) ];
+      var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));
+      var splice = undefined;
+      var splices = [];
+      var index = currentStart;
+      var oldIndex = oldStart;
+      for (var i = 0; i < ops.length; i++) {
+        switch (ops[i]) {
+         case EDIT_LEAVE:
+          if (splice) {
+            splices.push(splice);
+            splice = undefined;
+          }
+          index++;
+          oldIndex++;
+          break;
+
+         case EDIT_UPDATE:
+          if (!splice) splice = newSplice(index, [], 0);
+          splice.addedCount++;
+          index++;
+          splice.removed.push(old[oldIndex]);
+          oldIndex++;
+          break;
+
+         case EDIT_ADD:
+          if (!splice) splice = newSplice(index, [], 0);
+          splice.addedCount++;
+          index++;
+          break;
+
+         case EDIT_DELETE:
+          if (!splice) splice = newSplice(index, [], 0);
+          splice.removed.push(old[oldIndex]);
+          oldIndex++;
+          break;
+        }
+      }
+      if (splice) {
+        splices.push(splice);
+      }
+      return splices;
+    },
+    sharedPrefix: function(current, old, searchLength) {
+      for (var i = 0; i < searchLength; i++) if (!this.equals(current[i], old[i])) return i;
+      return searchLength;
+    },
+    sharedSuffix: function(current, old, searchLength) {
+      var index1 = current.length;
+      var index2 = old.length;
+      var count = 0;
+      while (count < searchLength && this.equals(current[--index1], old[--index2])) count++;
+      return count;
+    },
+    calculateSplices: function(current, previous) {
+      return this.calcSplices(current, 0, current.length, previous, 0, previous.length);
+    },
+    equals: function(currentValue, previousValue) {
+      return currentValue === previousValue;
+    }
+  };
+  scope.ArraySplice = ArraySplice;
+})(window.ShadowDOMPolyfill);
+
+(function(context) {
+  "use strict";
+  var OriginalMutationObserver = window.MutationObserver;
+  var callbacks = [];
+  var pending = false;
+  var timerFunc;
+  function handle() {
+    pending = false;
+    var copies = callbacks.slice(0);
+    callbacks = [];
+    for (var i = 0; i < copies.length; i++) {
+      (0, copies[i])();
+    }
+  }
+  if (OriginalMutationObserver) {
+    var counter = 1;
+    var observer = new OriginalMutationObserver(handle);
+    var textNode = document.createTextNode(counter);
+    observer.observe(textNode, {
+      characterData: true
+    });
+    timerFunc = function() {
+      counter = (counter + 1) % 2;
+      textNode.data = counter;
+    };
+  } else {
+    timerFunc = window.setTimeout;
+  }
+  function setEndOfMicrotask(func) {
+    callbacks.push(func);
+    if (pending) return;
+    pending = true;
+    timerFunc(handle, 0);
+  }
+  context.setEndOfMicrotask = setEndOfMicrotask;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var setEndOfMicrotask = scope.setEndOfMicrotask;
+  var wrapIfNeeded = scope.wrapIfNeeded;
+  var wrappers = scope.wrappers;
+  var registrationsTable = new WeakMap();
+  var globalMutationObservers = [];
+  var isScheduled = false;
+  function scheduleCallback(observer) {
+    if (observer.scheduled_) return;
+    observer.scheduled_ = true;
+    globalMutationObservers.push(observer);
+    if (isScheduled) return;
+    setEndOfMicrotask(notifyObservers);
+    isScheduled = true;
+  }
+  function notifyObservers() {
+    isScheduled = false;
+    while (globalMutationObservers.length) {
+      var notifyList = globalMutationObservers;
+      globalMutationObservers = [];
+      notifyList.sort(function(x, y) {
+        return x.uid_ - y.uid_;
+      });
+      for (var i = 0; i < notifyList.length; i++) {
+        var mo = notifyList[i];
+        mo.scheduled_ = false;
+        var queue = mo.takeRecords();
+        removeTransientObserversFor(mo);
+        if (queue.length) {
+          mo.callback_(queue, mo);
+        }
+      }
+    }
+  }
+  function MutationRecord(type, target) {
+    this.type = type;
+    this.target = target;
+    this.addedNodes = new wrappers.NodeList();
+    this.removedNodes = new wrappers.NodeList();
+    this.previousSibling = null;
+    this.nextSibling = null;
+    this.attributeName = null;
+    this.attributeNamespace = null;
+    this.oldValue = null;
+  }
+  function registerTransientObservers(ancestor, node) {
+    for (;ancestor; ancestor = ancestor.parentNode) {
+      var registrations = registrationsTable.get(ancestor);
+      if (!registrations) continue;
+      for (var i = 0; i < registrations.length; i++) {
+        var registration = registrations[i];
+        if (registration.options.subtree) registration.addTransientObserver(node);
+      }
+    }
+  }
+  function removeTransientObserversFor(observer) {
+    for (var i = 0; i < observer.nodes_.length; i++) {
+      var node = observer.nodes_[i];
+      var registrations = registrationsTable.get(node);
+      if (!registrations) return;
+      for (var j = 0; j < registrations.length; j++) {
+        var registration = registrations[j];
+        if (registration.observer === observer) registration.removeTransientObservers();
+      }
+    }
+  }
+  function enqueueMutation(target, type, data) {
+    var interestedObservers = Object.create(null);
+    var associatedStrings = Object.create(null);
+    for (var node = target; node; node = node.parentNode) {
+      var registrations = registrationsTable.get(node);
+      if (!registrations) continue;
+      for (var j = 0; j < registrations.length; j++) {
+        var registration = registrations[j];
+        var options = registration.options;
+        if (node !== target && !options.subtree) continue;
+        if (type === "attributes" && !options.attributes) continue;
+        if (type === "attributes" && options.attributeFilter && (data.namespace !== null || options.attributeFilter.indexOf(data.name) === -1)) {
+          continue;
+        }
+        if (type === "characterData" && !options.characterData) continue;
+        if (type === "childList" && !options.childList) continue;
+        var observer = registration.observer;
+        interestedObservers[observer.uid_] = observer;
+        if (type === "attributes" && options.attributeOldValue || type === "characterData" && options.characterDataOldValue) {
+          associatedStrings[observer.uid_] = data.oldValue;
+        }
+      }
+    }
+    for (var uid in interestedObservers) {
+      var observer = interestedObservers[uid];
+      var record = new MutationRecord(type, target);
+      if ("name" in data && "namespace" in data) {
+        record.attributeName = data.name;
+        record.attributeNamespace = data.namespace;
+      }
+      if (data.addedNodes) record.addedNodes = data.addedNodes;
+      if (data.removedNodes) record.removedNodes = data.removedNodes;
+      if (data.previousSibling) record.previousSibling = data.previousSibling;
+      if (data.nextSibling) record.nextSibling = data.nextSibling;
+      if (associatedStrings[uid] !== undefined) record.oldValue = associatedStrings[uid];
+      scheduleCallback(observer);
+      observer.records_.push(record);
+    }
+  }
+  var slice = Array.prototype.slice;
+  function MutationObserverOptions(options) {
+    this.childList = !!options.childList;
+    this.subtree = !!options.subtree;
+    if (!("attributes" in options) && ("attributeOldValue" in options || "attributeFilter" in options)) {
+      this.attributes = true;
+    } else {
+      this.attributes = !!options.attributes;
+    }
+    if ("characterDataOldValue" in options && !("characterData" in options)) this.characterData = true; else this.characterData = !!options.characterData;
+    if (!this.attributes && (options.attributeOldValue || "attributeFilter" in options) || !this.characterData && options.characterDataOldValue) {
+      throw new TypeError();
+    }
+    this.characterData = !!options.characterData;
+    this.attributeOldValue = !!options.attributeOldValue;
+    this.characterDataOldValue = !!options.characterDataOldValue;
+    if ("attributeFilter" in options) {
+      if (options.attributeFilter == null || typeof options.attributeFilter !== "object") {
+        throw new TypeError();
+      }
+      this.attributeFilter = slice.call(options.attributeFilter);
+    } else {
+      this.attributeFilter = null;
+    }
+  }
+  var uidCounter = 0;
+  function MutationObserver(callback) {
+    this.callback_ = callback;
+    this.nodes_ = [];
+    this.records_ = [];
+    this.uid_ = ++uidCounter;
+    this.scheduled_ = false;
+  }
+  MutationObserver.prototype = {
+    constructor: MutationObserver,
+    observe: function(target, options) {
+      target = wrapIfNeeded(target);
+      var newOptions = new MutationObserverOptions(options);
+      var registration;
+      var registrations = registrationsTable.get(target);
+      if (!registrations) registrationsTable.set(target, registrations = []);
+      for (var i = 0; i < registrations.length; i++) {
+        if (registrations[i].observer === this) {
+          registration = registrations[i];
+          registration.removeTransientObservers();
+          registration.options = newOptions;
+        }
+      }
+      if (!registration) {
+        registration = new Registration(this, target, newOptions);
+        registrations.push(registration);
+        this.nodes_.push(target);
+      }
+    },
+    disconnect: function() {
+      this.nodes_.forEach(function(node) {
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          var registration = registrations[i];
+          if (registration.observer === this) {
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+      this.records_ = [];
+    },
+    takeRecords: function() {
+      var copyOfRecords = this.records_;
+      this.records_ = [];
+      return copyOfRecords;
+    }
+  };
+  function Registration(observer, target, options) {
+    this.observer = observer;
+    this.target = target;
+    this.options = options;
+    this.transientObservedNodes = [];
+  }
+  Registration.prototype = {
+    addTransientObserver: function(node) {
+      if (node === this.target) return;
+      scheduleCallback(this.observer);
+      this.transientObservedNodes.push(node);
+      var registrations = registrationsTable.get(node);
+      if (!registrations) registrationsTable.set(node, registrations = []);
+      registrations.push(this);
+    },
+    removeTransientObservers: function() {
+      var transientObservedNodes = this.transientObservedNodes;
+      this.transientObservedNodes = [];
+      for (var i = 0; i < transientObservedNodes.length; i++) {
+        var node = transientObservedNodes[i];
+        var registrations = registrationsTable.get(node);
+        for (var j = 0; j < registrations.length; j++) {
+          if (registrations[j] === this) {
+            registrations.splice(j, 1);
+            break;
+          }
+        }
+      }
+    }
+  };
+  scope.enqueueMutation = enqueueMutation;
+  scope.registerTransientObservers = registerTransientObservers;
+  scope.wrappers.MutationObserver = MutationObserver;
+  scope.wrappers.MutationRecord = MutationRecord;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  function TreeScope(root, parent) {
+    this.root = root;
+    this.parent = parent;
+  }
+  TreeScope.prototype = {
+    get renderer() {
+      if (this.root instanceof scope.wrappers.ShadowRoot) {
+        return scope.getRendererForHost(this.root.host);
+      }
+      return null;
+    },
+    contains: function(treeScope) {
+      for (;treeScope; treeScope = treeScope.parent) {
+        if (treeScope === this) return true;
+      }
+      return false;
+    }
+  };
+  function setTreeScope(node, treeScope) {
+    if (node.treeScope_ !== treeScope) {
+      node.treeScope_ = treeScope;
+      for (var sr = node.shadowRoot; sr; sr = sr.olderShadowRoot) {
+        sr.treeScope_.parent = treeScope;
+      }
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        setTreeScope(child, treeScope);
+      }
+    }
+  }
+  function getTreeScope(node) {
+    if (node instanceof scope.wrappers.Window) {
+      debugger;
+    }
+    if (node.treeScope_) return node.treeScope_;
+    var parent = node.parentNode;
+    var treeScope;
+    if (parent) treeScope = getTreeScope(parent); else treeScope = new TreeScope(node, null);
+    return node.treeScope_ = treeScope;
+  }
+  scope.TreeScope = TreeScope;
+  scope.getTreeScope = getTreeScope;
+  scope.setTreeScope = setTreeScope;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
+  var getTreeScope = scope.getTreeScope;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrappers = scope.wrappers;
+  var wrappedFuns = new WeakMap();
+  var listenersTable = new WeakMap();
+  var handledEventsTable = new WeakMap();
+  var currentlyDispatchingEvents = new WeakMap();
+  var targetTable = new WeakMap();
+  var currentTargetTable = new WeakMap();
+  var relatedTargetTable = new WeakMap();
+  var eventPhaseTable = new WeakMap();
+  var stopPropagationTable = new WeakMap();
+  var stopImmediatePropagationTable = new WeakMap();
+  var eventHandlersTable = new WeakMap();
+  var eventPathTable = new WeakMap();
+  function isShadowRoot(node) {
+    return node instanceof wrappers.ShadowRoot;
+  }
+  function rootOfNode(node) {
+    return getTreeScope(node).root;
+  }
+  function getEventPath(node, event) {
+    var path = [];
+    var current = node;
+    path.push(current);
+    while (current) {
+      var destinationInsertionPoints = getDestinationInsertionPoints(current);
+      if (destinationInsertionPoints && destinationInsertionPoints.length > 0) {
+        for (var i = 0; i < destinationInsertionPoints.length; i++) {
+          var insertionPoint = destinationInsertionPoints[i];
+          if (isShadowInsertionPoint(insertionPoint)) {
+            var shadowRoot = rootOfNode(insertionPoint);
+            var olderShadowRoot = shadowRoot.olderShadowRoot;
+            if (olderShadowRoot) path.push(olderShadowRoot);
+          }
+          path.push(insertionPoint);
+        }
+        current = destinationInsertionPoints[destinationInsertionPoints.length - 1];
+      } else {
+        if (isShadowRoot(current)) {
+          if (inSameTree(node, current) && eventMustBeStopped(event)) {
+            break;
+          }
+          current = current.host;
+          path.push(current);
+        } else {
+          current = current.parentNode;
+          if (current) path.push(current);
+        }
+      }
+    }
+    return path;
+  }
+  function eventMustBeStopped(event) {
+    if (!event) return false;
+    switch (event.type) {
+     case "abort":
+     case "error":
+     case "select":
+     case "change":
+     case "load":
+     case "reset":
+     case "resize":
+     case "scroll":
+     case "selectstart":
+      return true;
+    }
+    return false;
+  }
+  function isShadowInsertionPoint(node) {
+    return node instanceof HTMLShadowElement;
+  }
+  function getDestinationInsertionPoints(node) {
+    return scope.getDestinationInsertionPoints(node);
+  }
+  function eventRetargetting(path, currentTarget) {
+    if (path.length === 0) return currentTarget;
+    if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
+    var currentTargetTree = getTreeScope(currentTarget);
+    var originalTarget = path[0];
+    var originalTargetTree = getTreeScope(originalTarget);
+    var relativeTargetTree = lowestCommonInclusiveAncestor(currentTargetTree, originalTargetTree);
+    for (var i = 0; i < path.length; i++) {
+      var node = path[i];
+      if (getTreeScope(node) === relativeTargetTree) return node;
+    }
+    return path[path.length - 1];
+  }
+  function getTreeScopeAncestors(treeScope) {
+    var ancestors = [];
+    for (;treeScope; treeScope = treeScope.parent) {
+      ancestors.push(treeScope);
+    }
+    return ancestors;
+  }
+  function lowestCommonInclusiveAncestor(tsA, tsB) {
+    var ancestorsA = getTreeScopeAncestors(tsA);
+    var ancestorsB = getTreeScopeAncestors(tsB);
+    var result = null;
+    while (ancestorsA.length > 0 && ancestorsB.length > 0) {
+      var a = ancestorsA.pop();
+      var b = ancestorsB.pop();
+      if (a === b) result = a; else break;
+    }
+    return result;
+  }
+  function getTreeScopeRoot(ts) {
+    if (!ts.parent) return ts;
+    return getTreeScopeRoot(ts.parent);
+  }
+  function relatedTargetResolution(event, currentTarget, relatedTarget) {
+    if (currentTarget instanceof wrappers.Window) currentTarget = currentTarget.document;
+    var currentTargetTree = getTreeScope(currentTarget);
+    var relatedTargetTree = getTreeScope(relatedTarget);
+    var relatedTargetEventPath = getEventPath(relatedTarget, event);
+    var lowestCommonAncestorTree;
+    var lowestCommonAncestorTree = lowestCommonInclusiveAncestor(currentTargetTree, relatedTargetTree);
+    if (!lowestCommonAncestorTree) lowestCommonAncestorTree = relatedTargetTree.root;
+    for (var commonAncestorTree = lowestCommonAncestorTree; commonAncestorTree; commonAncestorTree = commonAncestorTree.parent) {
+      var adjustedRelatedTarget;
+      for (var i = 0; i < relatedTargetEventPath.length; i++) {
+        var node = relatedTargetEventPath[i];
+        if (getTreeScope(node) === commonAncestorTree) return node;
+      }
+    }
+    return null;
+  }
+  function inSameTree(a, b) {
+    return getTreeScope(a) === getTreeScope(b);
+  }
+  var NONE = 0;
+  var CAPTURING_PHASE = 1;
+  var AT_TARGET = 2;
+  var BUBBLING_PHASE = 3;
+  var pendingError;
+  function dispatchOriginalEvent(originalEvent) {
+    if (handledEventsTable.get(originalEvent)) return;
+    handledEventsTable.set(originalEvent, true);
+    dispatchEvent(wrap(originalEvent), wrap(originalEvent.target));
+    if (pendingError) {
+      var err = pendingError;
+      pendingError = null;
+      throw err;
+    }
+  }
+  function isLoadLikeEvent(event) {
+    switch (event.type) {
+     case "load":
+     case "beforeunload":
+     case "unload":
+      return true;
+    }
+    return false;
+  }
+  function dispatchEvent(event, originalWrapperTarget) {
+    if (currentlyDispatchingEvents.get(event)) throw new Error("InvalidStateError");
+    currentlyDispatchingEvents.set(event, true);
+    scope.renderAllPending();
+    var eventPath;
+    var overrideTarget;
+    var win;
+    if (isLoadLikeEvent(event) && !event.bubbles) {
+      var doc = originalWrapperTarget;
+      if (doc instanceof wrappers.Document && (win = doc.defaultView)) {
+        overrideTarget = doc;
+        eventPath = [];
+      }
+    }
+    if (!eventPath) {
+      if (originalWrapperTarget instanceof wrappers.Window) {
+        win = originalWrapperTarget;
+        eventPath = [];
+      } else {
+        eventPath = getEventPath(originalWrapperTarget, event);
+        if (!isLoadLikeEvent(event)) {
+          var doc = eventPath[eventPath.length - 1];
+          if (doc instanceof wrappers.Document) win = doc.defaultView;
+        }
+      }
+    }
+    eventPathTable.set(event, eventPath);
+    if (dispatchCapturing(event, eventPath, win, overrideTarget)) {
+      if (dispatchAtTarget(event, eventPath, win, overrideTarget)) {
+        dispatchBubbling(event, eventPath, win, overrideTarget);
+      }
+    }
+    eventPhaseTable.set(event, NONE);
+    currentTargetTable.delete(event, null);
+    currentlyDispatchingEvents.delete(event);
+    return event.defaultPrevented;
+  }
+  function dispatchCapturing(event, eventPath, win, overrideTarget) {
+    var phase = CAPTURING_PHASE;
+    if (win) {
+      if (!invoke(win, event, phase, eventPath, overrideTarget)) return false;
+    }
+    for (var i = eventPath.length - 1; i > 0; i--) {
+      if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return false;
+    }
+    return true;
+  }
+  function dispatchAtTarget(event, eventPath, win, overrideTarget) {
+    var phase = AT_TARGET;
+    var currentTarget = eventPath[0] || win;
+    return invoke(currentTarget, event, phase, eventPath, overrideTarget);
+  }
+  function dispatchBubbling(event, eventPath, win, overrideTarget) {
+    var phase = BUBBLING_PHASE;
+    for (var i = 1; i < eventPath.length; i++) {
+      if (!invoke(eventPath[i], event, phase, eventPath, overrideTarget)) return;
+    }
+    if (win && eventPath.length > 0) {
+      invoke(win, event, phase, eventPath, overrideTarget);
+    }
+  }
+  function invoke(currentTarget, event, phase, eventPath, overrideTarget) {
+    var listeners = listenersTable.get(currentTarget);
+    if (!listeners) return true;
+    var target = overrideTarget || eventRetargetting(eventPath, currentTarget);
+    if (target === currentTarget) {
+      if (phase === CAPTURING_PHASE) return true;
+      if (phase === BUBBLING_PHASE) phase = AT_TARGET;
+    } else if (phase === BUBBLING_PHASE && !event.bubbles) {
+      return true;
+    }
+    if ("relatedTarget" in event) {
+      var originalEvent = unwrap(event);
+      var unwrappedRelatedTarget = originalEvent.relatedTarget;
+      if (unwrappedRelatedTarget) {
+        if (unwrappedRelatedTarget instanceof Object && unwrappedRelatedTarget.addEventListener) {
+          var relatedTarget = wrap(unwrappedRelatedTarget);
+          var adjusted = relatedTargetResolution(event, currentTarget, relatedTarget);
+          if (adjusted === target) return true;
+        } else {
+          adjusted = null;
+        }
+        relatedTargetTable.set(event, adjusted);
+      }
+    }
+    eventPhaseTable.set(event, phase);
+    var type = event.type;
+    var anyRemoved = false;
+    targetTable.set(event, target);
+    currentTargetTable.set(event, currentTarget);
+    listeners.depth++;
+    for (var i = 0, len = listeners.length; i < len; i++) {
+      var listener = listeners[i];
+      if (listener.removed) {
+        anyRemoved = true;
+        continue;
+      }
+      if (listener.type !== type || !listener.capture && phase === CAPTURING_PHASE || listener.capture && phase === BUBBLING_PHASE) {
+        continue;
+      }
+      try {
+        if (typeof listener.handler === "function") listener.handler.call(currentTarget, event); else listener.handler.handleEvent(event);
+        if (stopImmediatePropagationTable.get(event)) return false;
+      } catch (ex) {
+        if (!pendingError) pendingError = ex;
+      }
+    }
+    listeners.depth--;
+    if (anyRemoved && listeners.depth === 0) {
+      var copy = listeners.slice();
+      listeners.length = 0;
+      for (var i = 0; i < copy.length; i++) {
+        if (!copy[i].removed) listeners.push(copy[i]);
+      }
+    }
+    return !stopPropagationTable.get(event);
+  }
+  function Listener(type, handler, capture) {
+    this.type = type;
+    this.handler = handler;
+    this.capture = Boolean(capture);
+  }
+  Listener.prototype = {
+    equals: function(that) {
+      return this.handler === that.handler && this.type === that.type && this.capture === that.capture;
+    },
+    get removed() {
+      return this.handler === null;
+    },
+    remove: function() {
+      this.handler = null;
+    }
+  };
+  var OriginalEvent = window.Event;
+  OriginalEvent.prototype.polymerBlackList_ = {
+    returnValue: true,
+    keyLocation: true
+  };
+  function Event(type, options) {
+    if (type instanceof OriginalEvent) {
+      var impl = type;
+      if (!OriginalBeforeUnloadEvent && impl.type === "beforeunload" && !(this instanceof BeforeUnloadEvent)) {
+        return new BeforeUnloadEvent(impl);
+      }
+      setWrapper(impl, this);
+    } else {
+      return wrap(constructEvent(OriginalEvent, "Event", type, options));
+    }
+  }
+  Event.prototype = {
+    get target() {
+      return targetTable.get(this);
+    },
+    get currentTarget() {
+      return currentTargetTable.get(this);
+    },
+    get eventPhase() {
+      return eventPhaseTable.get(this);
+    },
+    get path() {
+      var eventPath = eventPathTable.get(this);
+      if (!eventPath) return [];
+      return eventPath.slice();
+    },
+    stopPropagation: function() {
+      stopPropagationTable.set(this, true);
+    },
+    stopImmediatePropagation: function() {
+      stopPropagationTable.set(this, true);
+      stopImmediatePropagationTable.set(this, true);
+    }
+  };
+  var supportsDefaultPrevented = function() {
+    var e = document.createEvent("Event");
+    e.initEvent("test", true, true);
+    e.preventDefault();
+    return e.defaultPrevented;
+  }();
+  if (!supportsDefaultPrevented) {
+    Event.prototype.preventDefault = function() {
+      if (!this.cancelable) return;
+      unsafeUnwrap(this).preventDefault();
+      Object.defineProperty(this, "defaultPrevented", {
+        get: function() {
+          return true;
+        },
+        configurable: true
+      });
+    };
+  }
+  registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
+  function unwrapOptions(options) {
+    if (!options || !options.relatedTarget) return options;
+    return Object.create(options, {
+      relatedTarget: {
+        value: unwrap(options.relatedTarget)
+      }
+    });
+  }
+  function registerGenericEvent(name, SuperEvent, prototype) {
+    var OriginalEvent = window[name];
+    var GenericEvent = function(type, options) {
+      if (type instanceof OriginalEvent) setWrapper(type, this); else return wrap(constructEvent(OriginalEvent, name, type, options));
+    };
+    GenericEvent.prototype = Object.create(SuperEvent.prototype);
+    if (prototype) mixin(GenericEvent.prototype, prototype);
+    if (OriginalEvent) {
+      try {
+        registerWrapper(OriginalEvent, GenericEvent, new OriginalEvent("temp"));
+      } catch (ex) {
+        registerWrapper(OriginalEvent, GenericEvent, document.createEvent(name));
+      }
+    }
+    return GenericEvent;
+  }
+  var UIEvent = registerGenericEvent("UIEvent", Event);
+  var CustomEvent = registerGenericEvent("CustomEvent", Event);
+  var relatedTargetProto = {
+    get relatedTarget() {
+      var relatedTarget = relatedTargetTable.get(this);
+      if (relatedTarget !== undefined) return relatedTarget;
+      return wrap(unwrap(this).relatedTarget);
+    }
+  };
+  function getInitFunction(name, relatedTargetIndex) {
+    return function() {
+      arguments[relatedTargetIndex] = unwrap(arguments[relatedTargetIndex]);
+      var impl = unwrap(this);
+      impl[name].apply(impl, arguments);
+    };
+  }
+  var mouseEventProto = mixin({
+    initMouseEvent: getInitFunction("initMouseEvent", 14)
+  }, relatedTargetProto);
+  var focusEventProto = mixin({
+    initFocusEvent: getInitFunction("initFocusEvent", 5)
+  }, relatedTargetProto);
+  var MouseEvent = registerGenericEvent("MouseEvent", UIEvent, mouseEventProto);
+  var FocusEvent = registerGenericEvent("FocusEvent", UIEvent, focusEventProto);
+  var defaultInitDicts = Object.create(null);
+  var supportsEventConstructors = function() {
+    try {
+      new window.FocusEvent("focus");
+    } catch (ex) {
+      return false;
+    }
+    return true;
+  }();
+  function constructEvent(OriginalEvent, name, type, options) {
+    if (supportsEventConstructors) return new OriginalEvent(type, unwrapOptions(options));
+    var event = unwrap(document.createEvent(name));
+    var defaultDict = defaultInitDicts[name];
+    var args = [ type ];
+    Object.keys(defaultDict).forEach(function(key) {
+      var v = options != null && key in options ? options[key] : defaultDict[key];
+      if (key === "relatedTarget") v = unwrap(v);
+      args.push(v);
+    });
+    event["init" + name].apply(event, args);
+    return event;
+  }
+  if (!supportsEventConstructors) {
+    var configureEventConstructor = function(name, initDict, superName) {
+      if (superName) {
+        var superDict = defaultInitDicts[superName];
+        initDict = mixin(mixin({}, superDict), initDict);
+      }
+      defaultInitDicts[name] = initDict;
+    };
+    configureEventConstructor("Event", {
+      bubbles: false,
+      cancelable: false
+    });
+    configureEventConstructor("CustomEvent", {
+      detail: null
+    }, "Event");
+    configureEventConstructor("UIEvent", {
+      view: null,
+      detail: 0
+    }, "Event");
+    configureEventConstructor("MouseEvent", {
+      screenX: 0,
+      screenY: 0,
+      clientX: 0,
+      clientY: 0,
+      ctrlKey: false,
+      altKey: false,
+      shiftKey: false,
+      metaKey: false,
+      button: 0,
+      relatedTarget: null
+    }, "UIEvent");
+    configureEventConstructor("FocusEvent", {
+      relatedTarget: null
+    }, "UIEvent");
+  }
+  var OriginalBeforeUnloadEvent = window.BeforeUnloadEvent;
+  function BeforeUnloadEvent(impl) {
+    Event.call(this, impl);
+  }
+  BeforeUnloadEvent.prototype = Object.create(Event.prototype);
+  mixin(BeforeUnloadEvent.prototype, {
+    get returnValue() {
+      return unsafeUnwrap(this).returnValue;
+    },
+    set returnValue(v) {
+      unsafeUnwrap(this).returnValue = v;
+    }
+  });
+  if (OriginalBeforeUnloadEvent) registerWrapper(OriginalBeforeUnloadEvent, BeforeUnloadEvent);
+  function isValidListener(fun) {
+    if (typeof fun === "function") return true;
+    return fun && fun.handleEvent;
+  }
+  function isMutationEvent(type) {
+    switch (type) {
+     case "DOMAttrModified":
+     case "DOMAttributeNameChanged":
+     case "DOMCharacterDataModified":
+     case "DOMElementNameChanged":
+     case "DOMNodeInserted":
+     case "DOMNodeInsertedIntoDocument":
+     case "DOMNodeRemoved":
+     case "DOMNodeRemovedFromDocument":
+     case "DOMSubtreeModified":
+      return true;
+    }
+    return false;
+  }
+  var OriginalEventTarget = window.EventTarget;
+  function EventTarget(impl) {
+    setWrapper(impl, this);
+  }
+  var methodNames = [ "addEventListener", "removeEventListener", "dispatchEvent" ];
+  [ Node, Window ].forEach(function(constructor) {
+    var p = constructor.prototype;
+    methodNames.forEach(function(name) {
+      Object.defineProperty(p, name + "_", {
+        value: p[name]
+      });
+    });
+  });
+  function getTargetToListenAt(wrapper) {
+    if (wrapper instanceof wrappers.ShadowRoot) wrapper = wrapper.host;
+    return unwrap(wrapper);
+  }
+  EventTarget.prototype = {
+    addEventListener: function(type, fun, capture) {
+      if (!isValidListener(fun) || isMutationEvent(type)) return;
+      var listener = new Listener(type, fun, capture);
+      var listeners = listenersTable.get(this);
+      if (!listeners) {
+        listeners = [];
+        listeners.depth = 0;
+        listenersTable.set(this, listeners);
+      } else {
+        for (var i = 0; i < listeners.length; i++) {
+          if (listener.equals(listeners[i])) return;
+        }
+      }
+      listeners.push(listener);
+      var target = getTargetToListenAt(this);
+      target.addEventListener_(type, dispatchOriginalEvent, true);
+    },
+    removeEventListener: function(type, fun, capture) {
+      capture = Boolean(capture);
+      var listeners = listenersTable.get(this);
+      if (!listeners) return;
+      var count = 0, found = false;
+      for (var i = 0; i < listeners.length; i++) {
+        if (listeners[i].type === type && listeners[i].capture === capture) {
+          count++;
+          if (listeners[i].handler === fun) {
+            found = true;
+            listeners[i].remove();
+          }
+        }
+      }
+      if (found && count === 1) {
+        var target = getTargetToListenAt(this);
+        target.removeEventListener_(type, dispatchOriginalEvent, true);
+      }
+    },
+    dispatchEvent: function(event) {
+      var nativeEvent = unwrap(event);
+      var eventType = nativeEvent.type;
+      handledEventsTable.set(nativeEvent, false);
+      scope.renderAllPending();
+      var tempListener;
+      if (!hasListenerInAncestors(this, eventType)) {
+        tempListener = function() {};
+        this.addEventListener(eventType, tempListener, true);
+      }
+      try {
+        return unwrap(this).dispatchEvent_(nativeEvent);
+      } finally {
+        if (tempListener) this.removeEventListener(eventType, tempListener, true);
+      }
+    }
+  };
+  function hasListener(node, type) {
+    var listeners = listenersTable.get(node);
+    if (listeners) {
+      for (var i = 0; i < listeners.length; i++) {
+        if (!listeners[i].removed && listeners[i].type === type) return true;
+      }
+    }
+    return false;
+  }
+  function hasListenerInAncestors(target, type) {
+    for (var node = unwrap(target); node; node = node.parentNode) {
+      if (hasListener(wrap(node), type)) return true;
+    }
+    return false;
+  }
+  if (OriginalEventTarget) registerWrapper(OriginalEventTarget, EventTarget);
+  function wrapEventTargetMethods(constructors) {
+    forwardMethodsToWrapper(constructors, methodNames);
+  }
+  var originalElementFromPoint = document.elementFromPoint;
+  function elementFromPoint(self, document, x, y) {
+    scope.renderAllPending();
+    var element = wrap(originalElementFromPoint.call(unsafeUnwrap(document), x, y));
+    if (!element) return null;
+    var path = getEventPath(element, null);
+    var idx = path.lastIndexOf(self);
+    if (idx == -1) return null; else path = path.slice(0, idx);
+    return eventRetargetting(path, self);
+  }
+  function getEventHandlerGetter(name) {
+    return function() {
+      var inlineEventHandlers = eventHandlersTable.get(this);
+      return inlineEventHandlers && inlineEventHandlers[name] && inlineEventHandlers[name].value || null;
+    };
+  }
+  function getEventHandlerSetter(name) {
+    var eventType = name.slice(2);
+    return function(value) {
+      var inlineEventHandlers = eventHandlersTable.get(this);
+      if (!inlineEventHandlers) {
+        inlineEventHandlers = Object.create(null);
+        eventHandlersTable.set(this, inlineEventHandlers);
+      }
+      var old = inlineEventHandlers[name];
+      if (old) this.removeEventListener(eventType, old.wrapped, false);
+      if (typeof value === "function") {
+        var wrapped = function(e) {
+          var rv = value.call(this, e);
+          if (rv === false) e.preventDefault(); else if (name === "onbeforeunload" && typeof rv === "string") e.returnValue = rv;
+        };
+        this.addEventListener(eventType, wrapped, false);
+        inlineEventHandlers[name] = {
+          value: value,
+          wrapped: wrapped
+        };
+      }
+    };
+  }
+  scope.elementFromPoint = elementFromPoint;
+  scope.getEventHandlerGetter = getEventHandlerGetter;
+  scope.getEventHandlerSetter = getEventHandlerSetter;
+  scope.wrapEventTargetMethods = wrapEventTargetMethods;
+  scope.wrappers.BeforeUnloadEvent = BeforeUnloadEvent;
+  scope.wrappers.CustomEvent = CustomEvent;
+  scope.wrappers.Event = Event;
+  scope.wrappers.EventTarget = EventTarget;
+  scope.wrappers.FocusEvent = FocusEvent;
+  scope.wrappers.MouseEvent = MouseEvent;
+  scope.wrappers.UIEvent = UIEvent;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var UIEvent = scope.wrappers.UIEvent;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var OriginalTouchEvent = window.TouchEvent;
+  if (!OriginalTouchEvent) return;
+  var nativeEvent;
+  try {
+    nativeEvent = document.createEvent("TouchEvent");
+  } catch (ex) {
+    return;
+  }
+  var nonEnumDescriptor = {
+    enumerable: false
+  };
+  function nonEnum(obj, prop) {
+    Object.defineProperty(obj, prop, nonEnumDescriptor);
+  }
+  function Touch(impl) {
+    setWrapper(impl, this);
+  }
+  Touch.prototype = {
+    get target() {
+      return wrap(unsafeUnwrap(this).target);
+    }
+  };
+  var descr = {
+    configurable: true,
+    enumerable: true,
+    get: null
+  };
+  [ "clientX", "clientY", "screenX", "screenY", "pageX", "pageY", "identifier", "webkitRadiusX", "webkitRadiusY", "webkitRotationAngle", "webkitForce" ].forEach(function(name) {
+    descr.get = function() {
+      return unsafeUnwrap(this)[name];
+    };
+    Object.defineProperty(Touch.prototype, name, descr);
+  });
+  function TouchList() {
+    this.length = 0;
+    nonEnum(this, "length");
+  }
+  TouchList.prototype = {
+    item: function(index) {
+      return this[index];
+    }
+  };
+  function wrapTouchList(nativeTouchList) {
+    var list = new TouchList();
+    for (var i = 0; i < nativeTouchList.length; i++) {
+      list[i] = new Touch(nativeTouchList[i]);
+    }
+    list.length = i;
+    return list;
+  }
+  function TouchEvent(impl) {
+    UIEvent.call(this, impl);
+  }
+  TouchEvent.prototype = Object.create(UIEvent.prototype);
+  mixin(TouchEvent.prototype, {
+    get touches() {
+      return wrapTouchList(unsafeUnwrap(this).touches);
+    },
+    get targetTouches() {
+      return wrapTouchList(unsafeUnwrap(this).targetTouches);
+    },
+    get changedTouches() {
+      return wrapTouchList(unsafeUnwrap(this).changedTouches);
+    },
+    initTouchEvent: function() {
+      throw new Error("Not implemented");
+    }
+  });
+  registerWrapper(OriginalTouchEvent, TouchEvent, nativeEvent);
+  scope.wrappers.Touch = Touch;
+  scope.wrappers.TouchEvent = TouchEvent;
+  scope.wrappers.TouchList = TouchList;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var nonEnumDescriptor = {
+    enumerable: false
+  };
+  function nonEnum(obj, prop) {
+    Object.defineProperty(obj, prop, nonEnumDescriptor);
+  }
+  function NodeList() {
+    this.length = 0;
+    nonEnum(this, "length");
+  }
+  NodeList.prototype = {
+    item: function(index) {
+      return this[index];
+    }
+  };
+  nonEnum(NodeList.prototype, "item");
+  function wrapNodeList(list) {
+    if (list == null) return list;
+    var wrapperList = new NodeList();
+    for (var i = 0, length = list.length; i < length; i++) {
+      wrapperList[i] = wrap(list[i]);
+    }
+    wrapperList.length = length;
+    return wrapperList;
+  }
+  function addWrapNodeListMethod(wrapperConstructor, name) {
+    wrapperConstructor.prototype[name] = function() {
+      return wrapNodeList(unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments));
+    };
+  }
+  scope.wrappers.NodeList = NodeList;
+  scope.addWrapNodeListMethod = addWrapNodeListMethod;
+  scope.wrapNodeList = wrapNodeList;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  scope.wrapHTMLCollection = scope.wrapNodeList;
+  scope.wrappers.HTMLCollection = scope.wrappers.NodeList;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var EventTarget = scope.wrappers.EventTarget;
+  var NodeList = scope.wrappers.NodeList;
+  var TreeScope = scope.TreeScope;
+  var assert = scope.assert;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var enqueueMutation = scope.enqueueMutation;
+  var getTreeScope = scope.getTreeScope;
+  var isWrapper = scope.isWrapper;
+  var mixin = scope.mixin;
+  var registerTransientObservers = scope.registerTransientObservers;
+  var registerWrapper = scope.registerWrapper;
+  var setTreeScope = scope.setTreeScope;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var wrapIfNeeded = scope.wrapIfNeeded;
+  var wrappers = scope.wrappers;
+  function assertIsNodeWrapper(node) {
+    assert(node instanceof Node);
+  }
+  function createOneElementNodeList(node) {
+    var nodes = new NodeList();
+    nodes[0] = node;
+    nodes.length = 1;
+    return nodes;
+  }
+  var surpressMutations = false;
+  function enqueueRemovalForInsertedNodes(node, parent, nodes) {
+    enqueueMutation(parent, "childList", {
+      removedNodes: nodes,
+      previousSibling: node.previousSibling,
+      nextSibling: node.nextSibling
+    });
+  }
+  function enqueueRemovalForInsertedDocumentFragment(df, nodes) {
+    enqueueMutation(df, "childList", {
+      removedNodes: nodes
+    });
+  }
+  function collectNodes(node, parentNode, previousNode, nextNode) {
+    if (node instanceof DocumentFragment) {
+      var nodes = collectNodesForDocumentFragment(node);
+      surpressMutations = true;
+      for (var i = nodes.length - 1; i >= 0; i--) {
+        node.removeChild(nodes[i]);
+        nodes[i].parentNode_ = parentNode;
+      }
+      surpressMutations = false;
+      for (var i = 0; i < nodes.length; i++) {
+        nodes[i].previousSibling_ = nodes[i - 1] || previousNode;
+        nodes[i].nextSibling_ = nodes[i + 1] || nextNode;
+      }
+      if (previousNode) previousNode.nextSibling_ = nodes[0];
+      if (nextNode) nextNode.previousSibling_ = nodes[nodes.length - 1];
+      return nodes;
+    }
+    var nodes = createOneElementNodeList(node);
+    var oldParent = node.parentNode;
+    if (oldParent) {
+      oldParent.removeChild(node);
+    }
+    node.parentNode_ = parentNode;
+    node.previousSibling_ = previousNode;
+    node.nextSibling_ = nextNode;
+    if (previousNode) previousNode.nextSibling_ = node;
+    if (nextNode) nextNode.previousSibling_ = node;
+    return nodes;
+  }
+  function collectNodesNative(node) {
+    if (node instanceof DocumentFragment) return collectNodesForDocumentFragment(node);
+    var nodes = createOneElementNodeList(node);
+    var oldParent = node.parentNode;
+    if (oldParent) enqueueRemovalForInsertedNodes(node, oldParent, nodes);
+    return nodes;
+  }
+  function collectNodesForDocumentFragment(node) {
+    var nodes = new NodeList();
+    var i = 0;
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      nodes[i++] = child;
+    }
+    nodes.length = i;
+    enqueueRemovalForInsertedDocumentFragment(node, nodes);
+    return nodes;
+  }
+  function snapshotNodeList(nodeList) {
+    return nodeList;
+  }
+  function nodeWasAdded(node, treeScope) {
+    setTreeScope(node, treeScope);
+    node.nodeIsInserted_();
+  }
+  function nodesWereAdded(nodes, parent) {
+    var treeScope = getTreeScope(parent);
+    for (var i = 0; i < nodes.length; i++) {
+      nodeWasAdded(nodes[i], treeScope);
+    }
+  }
+  function nodeWasRemoved(node) {
+    setTreeScope(node, new TreeScope(node, null));
+  }
+  function nodesWereRemoved(nodes) {
+    for (var i = 0; i < nodes.length; i++) {
+      nodeWasRemoved(nodes[i]);
+    }
+  }
+  function ensureSameOwnerDocument(parent, child) {
+    var ownerDoc = parent.nodeType === Node.DOCUMENT_NODE ? parent : parent.ownerDocument;
+    if (ownerDoc !== child.ownerDocument) ownerDoc.adoptNode(child);
+  }
+  function adoptNodesIfNeeded(owner, nodes) {
+    if (!nodes.length) return;
+    var ownerDoc = owner.ownerDocument;
+    if (ownerDoc === nodes[0].ownerDocument) return;
+    for (var i = 0; i < nodes.length; i++) {
+      scope.adoptNodeNoRemove(nodes[i], ownerDoc);
+    }
+  }
+  function unwrapNodesForInsertion(owner, nodes) {
+    adoptNodesIfNeeded(owner, nodes);
+    var length = nodes.length;
+    if (length === 1) return unwrap(nodes[0]);
+    var df = unwrap(owner.ownerDocument.createDocumentFragment());
+    for (var i = 0; i < length; i++) {
+      df.appendChild(unwrap(nodes[i]));
+    }
+    return df;
+  }
+  function clearChildNodes(wrapper) {
+    if (wrapper.firstChild_ !== undefined) {
+      var child = wrapper.firstChild_;
+      while (child) {
+        var tmp = child;
+        child = child.nextSibling_;
+        tmp.parentNode_ = tmp.previousSibling_ = tmp.nextSibling_ = undefined;
+      }
+    }
+    wrapper.firstChild_ = wrapper.lastChild_ = undefined;
+  }
+  function removeAllChildNodes(wrapper) {
+    if (wrapper.invalidateShadowRenderer()) {
+      var childWrapper = wrapper.firstChild;
+      while (childWrapper) {
+        assert(childWrapper.parentNode === wrapper);
+        var nextSibling = childWrapper.nextSibling;
+        var childNode = unwrap(childWrapper);
+        var parentNode = childNode.parentNode;
+        if (parentNode) originalRemoveChild.call(parentNode, childNode);
+        childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = null;
+        childWrapper = nextSibling;
+      }
+      wrapper.firstChild_ = wrapper.lastChild_ = null;
+    } else {
+      var node = unwrap(wrapper);
+      var child = node.firstChild;
+      var nextSibling;
+      while (child) {
+        nextSibling = child.nextSibling;
+        originalRemoveChild.call(node, child);
+        child = nextSibling;
+      }
+    }
+  }
+  function invalidateParent(node) {
+    var p = node.parentNode;
+    return p && p.invalidateShadowRenderer();
+  }
+  function cleanupNodes(nodes) {
+    for (var i = 0, n; i < nodes.length; i++) {
+      n = nodes[i];
+      n.parentNode.removeChild(n);
+    }
+  }
+  var originalImportNode = document.importNode;
+  var originalCloneNode = window.Node.prototype.cloneNode;
+  function cloneNode(node, deep, opt_doc) {
+    var clone;
+    if (opt_doc) clone = wrap(originalImportNode.call(opt_doc, unsafeUnwrap(node), false)); else clone = wrap(originalCloneNode.call(unsafeUnwrap(node), false));
+    if (deep) {
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        clone.appendChild(cloneNode(child, true, opt_doc));
+      }
+      if (node instanceof wrappers.HTMLTemplateElement) {
+        var cloneContent = clone.content;
+        for (var child = node.content.firstChild; child; child = child.nextSibling) {
+          cloneContent.appendChild(cloneNode(child, true, opt_doc));
+        }
+      }
+    }
+    return clone;
+  }
+  function contains(self, child) {
+    if (!child || getTreeScope(self) !== getTreeScope(child)) return false;
+    for (var node = child; node; node = node.parentNode) {
+      if (node === self) return true;
+    }
+    return false;
+  }
+  var OriginalNode = window.Node;
+  function Node(original) {
+    assert(original instanceof OriginalNode);
+    EventTarget.call(this, original);
+    this.parentNode_ = undefined;
+    this.firstChild_ = undefined;
+    this.lastChild_ = undefined;
+    this.nextSibling_ = undefined;
+    this.previousSibling_ = undefined;
+    this.treeScope_ = undefined;
+  }
+  var OriginalDocumentFragment = window.DocumentFragment;
+  var originalAppendChild = OriginalNode.prototype.appendChild;
+  var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;
+  var originalIsEqualNode = OriginalNode.prototype.isEqualNode;
+  var originalInsertBefore = OriginalNode.prototype.insertBefore;
+  var originalRemoveChild = OriginalNode.prototype.removeChild;
+  var originalReplaceChild = OriginalNode.prototype.replaceChild;
+  var isIEOrEdge = /Trident|Edge/.test(navigator.userAgent);
+  var removeChildOriginalHelper = isIEOrEdge ? function(parent, child) {
+    try {
+      originalRemoveChild.call(parent, child);
+    } catch (ex) {
+      if (!(parent instanceof OriginalDocumentFragment)) throw ex;
+    }
+  } : function(parent, child) {
+    originalRemoveChild.call(parent, child);
+  };
+  Node.prototype = Object.create(EventTarget.prototype);
+  mixin(Node.prototype, {
+    appendChild: function(childWrapper) {
+      return this.insertBefore(childWrapper, null);
+    },
+    insertBefore: function(childWrapper, refWrapper) {
+      assertIsNodeWrapper(childWrapper);
+      var refNode;
+      if (refWrapper) {
+        if (isWrapper(refWrapper)) {
+          refNode = unwrap(refWrapper);
+        } else {
+          refNode = refWrapper;
+          refWrapper = wrap(refNode);
+        }
+      } else {
+        refWrapper = null;
+        refNode = null;
+      }
+      refWrapper && assert(refWrapper.parentNode === this);
+      var nodes;
+      var previousNode = refWrapper ? refWrapper.previousSibling : this.lastChild;
+      var useNative = !this.invalidateShadowRenderer() && !invalidateParent(childWrapper);
+      if (useNative) nodes = collectNodesNative(childWrapper); else nodes = collectNodes(childWrapper, this, previousNode, refWrapper);
+      if (useNative) {
+        ensureSameOwnerDocument(this, childWrapper);
+        clearChildNodes(this);
+        originalInsertBefore.call(unsafeUnwrap(this), unwrap(childWrapper), refNode);
+      } else {
+        if (!previousNode) this.firstChild_ = nodes[0];
+        if (!refWrapper) {
+          this.lastChild_ = nodes[nodes.length - 1];
+          if (this.firstChild_ === undefined) this.firstChild_ = this.firstChild;
+        }
+        var parentNode = refNode ? refNode.parentNode : unsafeUnwrap(this);
+        if (parentNode) {
+          originalInsertBefore.call(parentNode, unwrapNodesForInsertion(this, nodes), refNode);
+        } else {
+          adoptNodesIfNeeded(this, nodes);
+        }
+      }
+      enqueueMutation(this, "childList", {
+        addedNodes: nodes,
+        nextSibling: refWrapper,
+        previousSibling: previousNode
+      });
+      nodesWereAdded(nodes, this);
+      return childWrapper;
+    },
+    removeChild: function(childWrapper) {
+      assertIsNodeWrapper(childWrapper);
+      if (childWrapper.parentNode !== this) {
+        var found = false;
+        var childNodes = this.childNodes;
+        for (var ieChild = this.firstChild; ieChild; ieChild = ieChild.nextSibling) {
+          if (ieChild === childWrapper) {
+            found = true;
+            break;
+          }
+        }
+        if (!found) {
+          throw new Error("NotFoundError");
+        }
+      }
+      var childNode = unwrap(childWrapper);
+      var childWrapperNextSibling = childWrapper.nextSibling;
+      var childWrapperPreviousSibling = childWrapper.previousSibling;
+      if (this.invalidateShadowRenderer()) {
+        var thisFirstChild = this.firstChild;
+        var thisLastChild = this.lastChild;
+        var parentNode = childNode.parentNode;
+        if (parentNode) removeChildOriginalHelper(parentNode, childNode);
+        if (thisFirstChild === childWrapper) this.firstChild_ = childWrapperNextSibling;
+        if (thisLastChild === childWrapper) this.lastChild_ = childWrapperPreviousSibling;
+        if (childWrapperPreviousSibling) childWrapperPreviousSibling.nextSibling_ = childWrapperNextSibling;
+        if (childWrapperNextSibling) {
+          childWrapperNextSibling.previousSibling_ = childWrapperPreviousSibling;
+        }
+        childWrapper.previousSibling_ = childWrapper.nextSibling_ = childWrapper.parentNode_ = undefined;
+      } else {
+        clearChildNodes(this);
+        removeChildOriginalHelper(unsafeUnwrap(this), childNode);
+      }
+      if (!surpressMutations) {
+        enqueueMutation(this, "childList", {
+          removedNodes: createOneElementNodeList(childWrapper),
+          nextSibling: childWrapperNextSibling,
+          previousSibling: childWrapperPreviousSibling
+        });
+      }
+      registerTransientObservers(this, childWrapper);
+      return childWrapper;
+    },
+    replaceChild: function(newChildWrapper, oldChildWrapper) {
+      assertIsNodeWrapper(newChildWrapper);
+      var oldChildNode;
+      if (isWrapper(oldChildWrapper)) {
+        oldChildNode = unwrap(oldChildWrapper);
+      } else {
+        oldChildNode = oldChildWrapper;
+        oldChildWrapper = wrap(oldChildNode);
+      }
+      if (oldChildWrapper.parentNode !== this) {
+        throw new Error("NotFoundError");
+      }
+      var nextNode = oldChildWrapper.nextSibling;
+      var previousNode = oldChildWrapper.previousSibling;
+      var nodes;
+      var useNative = !this.invalidateShadowRenderer() && !invalidateParent(newChildWrapper);
+      if (useNative) {
+        nodes = collectNodesNative(newChildWrapper);
+      } else {
+        if (nextNode === newChildWrapper) nextNode = newChildWrapper.nextSibling;
+        nodes = collectNodes(newChildWrapper, this, previousNode, nextNode);
+      }
+      if (!useNative) {
+        if (this.firstChild === oldChildWrapper) this.firstChild_ = nodes[0];
+        if (this.lastChild === oldChildWrapper) this.lastChild_ = nodes[nodes.length - 1];
+        oldChildWrapper.previousSibling_ = oldChildWrapper.nextSibling_ = oldChildWrapper.parentNode_ = undefined;
+        if (oldChildNode.parentNode) {
+          originalReplaceChild.call(oldChildNode.parentNode, unwrapNodesForInsertion(this, nodes), oldChildNode);
+        }
+      } else {
+        ensureSameOwnerDocument(this, newChildWrapper);
+        clearChildNodes(this);
+        originalReplaceChild.call(unsafeUnwrap(this), unwrap(newChildWrapper), oldChildNode);
+      }
+      enqueueMutation(this, "childList", {
+        addedNodes: nodes,
+        removedNodes: createOneElementNodeList(oldChildWrapper),
+        nextSibling: nextNode,
+        previousSibling: previousNode
+      });
+      nodeWasRemoved(oldChildWrapper);
+      nodesWereAdded(nodes, this);
+      return oldChildWrapper;
+    },
+    nodeIsInserted_: function() {
+      for (var child = this.firstChild; child; child = child.nextSibling) {
+        child.nodeIsInserted_();
+      }
+    },
+    hasChildNodes: function() {
+      return this.firstChild !== null;
+    },
+    get parentNode() {
+      return this.parentNode_ !== undefined ? this.parentNode_ : wrap(unsafeUnwrap(this).parentNode);
+    },
+    get firstChild() {
+      return this.firstChild_ !== undefined ? this.firstChild_ : wrap(unsafeUnwrap(this).firstChild);
+    },
+    get lastChild() {
+      return this.lastChild_ !== undefined ? this.lastChild_ : wrap(unsafeUnwrap(this).lastChild);
+    },
+    get nextSibling() {
+      return this.nextSibling_ !== undefined ? this.nextSibling_ : wrap(unsafeUnwrap(this).nextSibling);
+    },
+    get previousSibling() {
+      return this.previousSibling_ !== undefined ? this.previousSibling_ : wrap(unsafeUnwrap(this).previousSibling);
+    },
+    get parentElement() {
+      var p = this.parentNode;
+      while (p && p.nodeType !== Node.ELEMENT_NODE) {
+        p = p.parentNode;
+      }
+      return p;
+    },
+    get textContent() {
+      var s = "";
+      for (var child = this.firstChild; child; child = child.nextSibling) {
+        if (child.nodeType != Node.COMMENT_NODE) {
+          s += child.textContent;
+        }
+      }
+      return s;
+    },
+    set textContent(textContent) {
+      if (textContent == null) textContent = "";
+      var removedNodes = snapshotNodeList(this.childNodes);
+      if (this.invalidateShadowRenderer()) {
+        removeAllChildNodes(this);
+        if (textContent !== "") {
+          var textNode = unsafeUnwrap(this).ownerDocument.createTextNode(textContent);
+          this.appendChild(textNode);
+        }
+      } else {
+        clearChildNodes(this);
+        unsafeUnwrap(this).textContent = textContent;
+      }
+      var addedNodes = snapshotNodeList(this.childNodes);
+      enqueueMutation(this, "childList", {
+        addedNodes: addedNodes,
+        removedNodes: removedNodes
+      });
+      nodesWereRemoved(removedNodes);
+      nodesWereAdded(addedNodes, this);
+    },
+    get childNodes() {
+      var wrapperList = new NodeList();
+      var i = 0;
+      for (var child = this.firstChild; child; child = child.nextSibling) {
+        wrapperList[i++] = child;
+      }
+      wrapperList.length = i;
+      return wrapperList;
+    },
+    cloneNode: function(deep) {
+      return cloneNode(this, deep);
+    },
+    contains: function(child) {
+      return contains(this, wrapIfNeeded(child));
+    },
+    compareDocumentPosition: function(otherNode) {
+      return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
+    },
+    isEqualNode: function(otherNode) {
+      return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
+    },
+    normalize: function() {
+      var nodes = snapshotNodeList(this.childNodes);
+      var remNodes = [];
+      var s = "";
+      var modNode;
+      for (var i = 0, n; i < nodes.length; i++) {
+        n = nodes[i];
+        if (n.nodeType === Node.TEXT_NODE) {
+          if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {
+            s += n.data;
+            remNodes.push(n);
+          }
+        } else {
+          if (modNode && remNodes.length) {
+            modNode.data += s;
+            cleanupNodes(remNodes);
+          }
+          remNodes = [];
+          s = "";
+          modNode = null;
+          if (n.childNodes.length) n.normalize();
+        }
+      }
+      if (modNode && remNodes.length) {
+        modNode.data += s;
+        cleanupNodes(remNodes);
+      }
+    }
+  });
+  defineWrapGetter(Node, "ownerDocument");
+  registerWrapper(OriginalNode, Node, document.createDocumentFragment());
+  delete Node.prototype.querySelector;
+  delete Node.prototype.querySelectorAll;
+  Node.prototype = mixin(Object.create(EventTarget.prototype), Node.prototype);
+  scope.cloneNode = cloneNode;
+  scope.nodeWasAdded = nodeWasAdded;
+  scope.nodeWasRemoved = nodeWasRemoved;
+  scope.nodesWereAdded = nodesWereAdded;
+  scope.nodesWereRemoved = nodesWereRemoved;
+  scope.originalInsertBefore = originalInsertBefore;
+  scope.originalRemoveChild = originalRemoveChild;
+  scope.snapshotNodeList = snapshotNodeList;
+  scope.wrappers.Node = Node;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLCollection = scope.wrappers.HTMLCollection;
+  var NodeList = scope.wrappers.NodeList;
+  var getTreeScope = scope.getTreeScope;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var originalDocumentQuerySelector = document.querySelector;
+  var originalElementQuerySelector = document.documentElement.querySelector;
+  var originalDocumentQuerySelectorAll = document.querySelectorAll;
+  var originalElementQuerySelectorAll = document.documentElement.querySelectorAll;
+  var originalDocumentGetElementsByTagName = document.getElementsByTagName;
+  var originalElementGetElementsByTagName = document.documentElement.getElementsByTagName;
+  var originalDocumentGetElementsByTagNameNS = document.getElementsByTagNameNS;
+  var originalElementGetElementsByTagNameNS = document.documentElement.getElementsByTagNameNS;
+  var OriginalElement = window.Element;
+  var OriginalDocument = window.HTMLDocument || window.Document;
+  function filterNodeList(list, index, result, deep) {
+    var wrappedItem = null;
+    var root = null;
+    for (var i = 0, length = list.length; i < length; i++) {
+      wrappedItem = wrap(list[i]);
+      if (!deep && (root = getTreeScope(wrappedItem).root)) {
+        if (root instanceof scope.wrappers.ShadowRoot) {
+          continue;
+        }
+      }
+      result[index++] = wrappedItem;
+    }
+    return index;
+  }
+  function shimSelector(selector) {
+    return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");
+  }
+  function shimMatchesSelector(selector) {
+    return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");
+  }
+  function findOne(node, selector) {
+    var m, el = node.firstElementChild;
+    while (el) {
+      if (el.matches(selector)) return el;
+      m = findOne(el, selector);
+      if (m) return m;
+      el = el.nextElementSibling;
+    }
+    return null;
+  }
+  function matchesSelector(el, selector) {
+    return el.matches(selector);
+  }
+  var XHTML_NS = "http://www.w3.org/1999/xhtml";
+  function matchesTagName(el, localName, localNameLowerCase) {
+    var ln = el.localName;
+    return ln === localName || ln === localNameLowerCase && el.namespaceURI === XHTML_NS;
+  }
+  function matchesEveryThing() {
+    return true;
+  }
+  function matchesLocalNameOnly(el, ns, localName) {
+    return el.localName === localName;
+  }
+  function matchesNameSpace(el, ns) {
+    return el.namespaceURI === ns;
+  }
+  function matchesLocalNameNS(el, ns, localName) {
+    return el.namespaceURI === ns && el.localName === localName;
+  }
+  function findElements(node, index, result, p, arg0, arg1) {
+    var el = node.firstElementChild;
+    while (el) {
+      if (p(el, arg0, arg1)) result[index++] = el;
+      index = findElements(el, index, result, p, arg0, arg1);
+      el = el.nextElementSibling;
+    }
+    return index;
+  }
+  function querySelectorAllFiltered(p, index, result, selector, deep) {
+    var target = unsafeUnwrap(this);
+    var list;
+    var root = getTreeScope(this).root;
+    if (root instanceof scope.wrappers.ShadowRoot) {
+      return findElements(this, index, result, p, selector, null);
+    } else if (target instanceof OriginalElement) {
+      list = originalElementQuerySelectorAll.call(target, selector);
+    } else if (target instanceof OriginalDocument) {
+      list = originalDocumentQuerySelectorAll.call(target, selector);
+    } else {
+      return findElements(this, index, result, p, selector, null);
+    }
+    return filterNodeList(list, index, result, deep);
+  }
+  var SelectorsInterface = {
+    querySelector: function(selector) {
+      var shimmed = shimSelector(selector);
+      var deep = shimmed !== selector;
+      selector = shimmed;
+      var target = unsafeUnwrap(this);
+      var wrappedItem;
+      var root = getTreeScope(this).root;
+      if (root instanceof scope.wrappers.ShadowRoot) {
+        return findOne(this, selector);
+      } else if (target instanceof OriginalElement) {
+        wrappedItem = wrap(originalElementQuerySelector.call(target, selector));
+      } else if (target instanceof OriginalDocument) {
+        wrappedItem = wrap(originalDocumentQuerySelector.call(target, selector));
+      } else {
+        return findOne(this, selector);
+      }
+      if (!wrappedItem) {
+        return wrappedItem;
+      } else if (!deep && (root = getTreeScope(wrappedItem).root)) {
+        if (root instanceof scope.wrappers.ShadowRoot) {
+          return findOne(this, selector);
+        }
+      }
+      return wrappedItem;
+    },
+    querySelectorAll: function(selector) {
+      var shimmed = shimSelector(selector);
+      var deep = shimmed !== selector;
+      selector = shimmed;
+      var result = new NodeList();
+      result.length = querySelectorAllFiltered.call(this, matchesSelector, 0, result, selector, deep);
+      return result;
+    }
+  };
+  var MatchesInterface = {
+    matches: function(selector) {
+      selector = shimMatchesSelector(selector);
+      return scope.originalMatches.call(unsafeUnwrap(this), selector);
+    }
+  };
+  function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {
+    var target = unsafeUnwrap(this);
+    var list;
+    var root = getTreeScope(this).root;
+    if (root instanceof scope.wrappers.ShadowRoot) {
+      return findElements(this, index, result, p, localName, lowercase);
+    } else if (target instanceof OriginalElement) {
+      list = originalElementGetElementsByTagName.call(target, localName, lowercase);
+    } else if (target instanceof OriginalDocument) {
+      list = originalDocumentGetElementsByTagName.call(target, localName, lowercase);
+    } else {
+      return findElements(this, index, result, p, localName, lowercase);
+    }
+    return filterNodeList(list, index, result, false);
+  }
+  function getElementsByTagNameNSFiltered(p, index, result, ns, localName) {
+    var target = unsafeUnwrap(this);
+    var list;
+    var root = getTreeScope(this).root;
+    if (root instanceof scope.wrappers.ShadowRoot) {
+      return findElements(this, index, result, p, ns, localName);
+    } else if (target instanceof OriginalElement) {
+      list = originalElementGetElementsByTagNameNS.call(target, ns, localName);
+    } else if (target instanceof OriginalDocument) {
+      list = originalDocumentGetElementsByTagNameNS.call(target, ns, localName);
+    } else {
+      return findElements(this, index, result, p, ns, localName);
+    }
+    return filterNodeList(list, index, result, false);
+  }
+  var GetElementsByInterface = {
+    getElementsByTagName: function(localName) {
+      var result = new HTMLCollection();
+      var match = localName === "*" ? matchesEveryThing : matchesTagName;
+      result.length = getElementsByTagNameFiltered.call(this, match, 0, result, localName, localName.toLowerCase());
+      return result;
+    },
+    getElementsByClassName: function(className) {
+      return this.querySelectorAll("." + className);
+    },
+    getElementsByTagNameNS: function(ns, localName) {
+      var result = new HTMLCollection();
+      var match = null;
+      if (ns === "*") {
+        match = localName === "*" ? matchesEveryThing : matchesLocalNameOnly;
+      } else {
+        match = localName === "*" ? matchesNameSpace : matchesLocalNameNS;
+      }
+      result.length = getElementsByTagNameNSFiltered.call(this, match, 0, result, ns || null, localName);
+      return result;
+    }
+  };
+  scope.GetElementsByInterface = GetElementsByInterface;
+  scope.SelectorsInterface = SelectorsInterface;
+  scope.MatchesInterface = MatchesInterface;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var NodeList = scope.wrappers.NodeList;
+  function forwardElement(node) {
+    while (node && node.nodeType !== Node.ELEMENT_NODE) {
+      node = node.nextSibling;
+    }
+    return node;
+  }
+  function backwardsElement(node) {
+    while (node && node.nodeType !== Node.ELEMENT_NODE) {
+      node = node.previousSibling;
+    }
+    return node;
+  }
+  var ParentNodeInterface = {
+    get firstElementChild() {
+      return forwardElement(this.firstChild);
+    },
+    get lastElementChild() {
+      return backwardsElement(this.lastChild);
+    },
+    get childElementCount() {
+      var count = 0;
+      for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
+        count++;
+      }
+      return count;
+    },
+    get children() {
+      var wrapperList = new NodeList();
+      var i = 0;
+      for (var child = this.firstElementChild; child; child = child.nextElementSibling) {
+        wrapperList[i++] = child;
+      }
+      wrapperList.length = i;
+      return wrapperList;
+    },
+    remove: function() {
+      var p = this.parentNode;
+      if (p) p.removeChild(this);
+    }
+  };
+  var ChildNodeInterface = {
+    get nextElementSibling() {
+      return forwardElement(this.nextSibling);
+    },
+    get previousElementSibling() {
+      return backwardsElement(this.previousSibling);
+    }
+  };
+  var NonElementParentNodeInterface = {
+    getElementById: function(id) {
+      if (/[ \t\n\r\f]/.test(id)) return null;
+      return this.querySelector('[id="' + id + '"]');
+    }
+  };
+  scope.ChildNodeInterface = ChildNodeInterface;
+  scope.NonElementParentNodeInterface = NonElementParentNodeInterface;
+  scope.ParentNodeInterface = ParentNodeInterface;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var ChildNodeInterface = scope.ChildNodeInterface;
+  var Node = scope.wrappers.Node;
+  var enqueueMutation = scope.enqueueMutation;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var OriginalCharacterData = window.CharacterData;
+  function CharacterData(node) {
+    Node.call(this, node);
+  }
+  CharacterData.prototype = Object.create(Node.prototype);
+  mixin(CharacterData.prototype, {
+    get nodeValue() {
+      return this.data;
+    },
+    set nodeValue(data) {
+      this.data = data;
+    },
+    get textContent() {
+      return this.data;
+    },
+    set textContent(value) {
+      this.data = value;
+    },
+    get data() {
+      return unsafeUnwrap(this).data;
+    },
+    set data(value) {
+      var oldValue = unsafeUnwrap(this).data;
+      enqueueMutation(this, "characterData", {
+        oldValue: oldValue
+      });
+      unsafeUnwrap(this).data = value;
+    }
+  });
+  mixin(CharacterData.prototype, ChildNodeInterface);
+  registerWrapper(OriginalCharacterData, CharacterData, document.createTextNode(""));
+  scope.wrappers.CharacterData = CharacterData;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var CharacterData = scope.wrappers.CharacterData;
+  var enqueueMutation = scope.enqueueMutation;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  function toUInt32(x) {
+    return x >>> 0;
+  }
+  var OriginalText = window.Text;
+  function Text(node) {
+    CharacterData.call(this, node);
+  }
+  Text.prototype = Object.create(CharacterData.prototype);
+  mixin(Text.prototype, {
+    splitText: function(offset) {
+      offset = toUInt32(offset);
+      var s = this.data;
+      if (offset > s.length) throw new Error("IndexSizeError");
+      var head = s.slice(0, offset);
+      var tail = s.slice(offset);
+      this.data = head;
+      var newTextNode = this.ownerDocument.createTextNode(tail);
+      if (this.parentNode) this.parentNode.insertBefore(newTextNode, this.nextSibling);
+      return newTextNode;
+    }
+  });
+  registerWrapper(OriginalText, Text, document.createTextNode(""));
+  scope.wrappers.Text = Text;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  if (!window.DOMTokenList) {
+    console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");
+    return;
+  }
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var enqueueMutation = scope.enqueueMutation;
+  function getClass(el) {
+    return unsafeUnwrap(el).getAttribute("class");
+  }
+  function enqueueClassAttributeChange(el, oldValue) {
+    enqueueMutation(el, "attributes", {
+      name: "class",
+      namespace: null,
+      oldValue: oldValue
+    });
+  }
+  function invalidateClass(el) {
+    scope.invalidateRendererBasedOnAttribute(el, "class");
+  }
+  function changeClass(tokenList, method, args) {
+    var ownerElement = tokenList.ownerElement_;
+    if (ownerElement == null) {
+      return method.apply(tokenList, args);
+    }
+    var oldValue = getClass(ownerElement);
+    var retv = method.apply(tokenList, args);
+    if (getClass(ownerElement) !== oldValue) {
+      enqueueClassAttributeChange(ownerElement, oldValue);
+      invalidateClass(ownerElement);
+    }
+    return retv;
+  }
+  var oldAdd = DOMTokenList.prototype.add;
+  DOMTokenList.prototype.add = function() {
+    changeClass(this, oldAdd, arguments);
+  };
+  var oldRemove = DOMTokenList.prototype.remove;
+  DOMTokenList.prototype.remove = function() {
+    changeClass(this, oldRemove, arguments);
+  };
+  var oldToggle = DOMTokenList.prototype.toggle;
+  DOMTokenList.prototype.toggle = function() {
+    return changeClass(this, oldToggle, arguments);
+  };
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var ChildNodeInterface = scope.ChildNodeInterface;
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var Node = scope.wrappers.Node;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var MatchesInterface = scope.MatchesInterface;
+  var addWrapNodeListMethod = scope.addWrapNodeListMethod;
+  var enqueueMutation = scope.enqueueMutation;
+  var mixin = scope.mixin;
+  var oneOf = scope.oneOf;
+  var registerWrapper = scope.registerWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrappers = scope.wrappers;
+  var OriginalElement = window.Element;
+  var matchesNames = [ "matches", "mozMatchesSelector", "msMatchesSelector", "webkitMatchesSelector" ].filter(function(name) {
+    return OriginalElement.prototype[name];
+  });
+  var matchesName = matchesNames[0];
+  var originalMatches = OriginalElement.prototype[matchesName];
+  function invalidateRendererBasedOnAttribute(element, name) {
+    var p = element.parentNode;
+    if (!p || !p.shadowRoot) return;
+    var renderer = scope.getRendererForHost(p);
+    if (renderer.dependsOnAttribute(name)) renderer.invalidate();
+  }
+  function enqueAttributeChange(element, name, oldValue) {
+    enqueueMutation(element, "attributes", {
+      name: name,
+      namespace: null,
+      oldValue: oldValue
+    });
+  }
+  var classListTable = new WeakMap();
+  function Element(node) {
+    Node.call(this, node);
+  }
+  Element.prototype = Object.create(Node.prototype);
+  mixin(Element.prototype, {
+    createShadowRoot: function() {
+      var newShadowRoot = new wrappers.ShadowRoot(this);
+      unsafeUnwrap(this).polymerShadowRoot_ = newShadowRoot;
+      var renderer = scope.getRendererForHost(this);
+      renderer.invalidate();
+      return newShadowRoot;
+    },
+    get shadowRoot() {
+      return unsafeUnwrap(this).polymerShadowRoot_ || null;
+    },
+    setAttribute: function(name, value) {
+      var oldValue = unsafeUnwrap(this).getAttribute(name);
+      unsafeUnwrap(this).setAttribute(name, value);
+      enqueAttributeChange(this, name, oldValue);
+      invalidateRendererBasedOnAttribute(this, name);
+    },
+    removeAttribute: function(name) {
+      var oldValue = unsafeUnwrap(this).getAttribute(name);
+      unsafeUnwrap(this).removeAttribute(name);
+      enqueAttributeChange(this, name, oldValue);
+      invalidateRendererBasedOnAttribute(this, name);
+    },
+    get classList() {
+      var list = classListTable.get(this);
+      if (!list) {
+        list = unsafeUnwrap(this).classList;
+        if (!list) return;
+        list.ownerElement_ = this;
+        classListTable.set(this, list);
+      }
+      return list;
+    },
+    get className() {
+      return unsafeUnwrap(this).className;
+    },
+    set className(v) {
+      this.setAttribute("class", v);
+    },
+    get id() {
+      return unsafeUnwrap(this).id;
+    },
+    set id(v) {
+      this.setAttribute("id", v);
+    }
+  });
+  matchesNames.forEach(function(name) {
+    if (name !== "matches") {
+      Element.prototype[name] = function(selector) {
+        return this.matches(selector);
+      };
+    }
+  });
+  if (OriginalElement.prototype.webkitCreateShadowRoot) {
+    Element.prototype.webkitCreateShadowRoot = Element.prototype.createShadowRoot;
+  }
+  mixin(Element.prototype, ChildNodeInterface);
+  mixin(Element.prototype, GetElementsByInterface);
+  mixin(Element.prototype, ParentNodeInterface);
+  mixin(Element.prototype, SelectorsInterface);
+  mixin(Element.prototype, MatchesInterface);
+  registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));
+  scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;
+  scope.matchesNames = matchesNames;
+  scope.originalMatches = originalMatches;
+  scope.wrappers.Element = Element;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var Element = scope.wrappers.Element;
+  var defineGetter = scope.defineGetter;
+  var enqueueMutation = scope.enqueueMutation;
+  var mixin = scope.mixin;
+  var nodesWereAdded = scope.nodesWereAdded;
+  var nodesWereRemoved = scope.nodesWereRemoved;
+  var registerWrapper = scope.registerWrapper;
+  var snapshotNodeList = scope.snapshotNodeList;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrappers = scope.wrappers;
+  var escapeAttrRegExp = /[&\u00A0"]/g;
+  var escapeDataRegExp = /[&\u00A0<>]/g;
+  function escapeReplace(c) {
+    switch (c) {
+     case "&":
+      return "&amp;";
+
+     case "<":
+      return "&lt;";
+
+     case ">":
+      return "&gt;";
+
+     case '"':
+      return "&quot;";
+
+     case " ":
+      return "&nbsp;";
+    }
+  }
+  function escapeAttr(s) {
+    return s.replace(escapeAttrRegExp, escapeReplace);
+  }
+  function escapeData(s) {
+    return s.replace(escapeDataRegExp, escapeReplace);
+  }
+  function makeSet(arr) {
+    var set = {};
+    for (var i = 0; i < arr.length; i++) {
+      set[arr[i]] = true;
+    }
+    return set;
+  }
+  var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);
+  var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);
+  var XHTML_NS = "http://www.w3.org/1999/xhtml";
+  function needsSelfClosingSlash(node) {
+    if (node.namespaceURI !== XHTML_NS) return true;
+    var doctype = node.ownerDocument.doctype;
+    return doctype && doctype.publicId && doctype.systemId;
+  }
+  function getOuterHTML(node, parentNode) {
+    switch (node.nodeType) {
+     case Node.ELEMENT_NODE:
+      var tagName = node.tagName.toLowerCase();
+      var s = "<" + tagName;
+      var attrs = node.attributes;
+      for (var i = 0, attr; attr = attrs[i]; i++) {
+        s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';
+      }
+      if (voidElements[tagName]) {
+        if (needsSelfClosingSlash(node)) s += "/";
+        return s + ">";
+      }
+      return s + ">" + getInnerHTML(node) + "</" + tagName + ">";
+
+     case Node.TEXT_NODE:
+      var data = node.data;
+      if (parentNode && plaintextParents[parentNode.localName]) return data;
+      return escapeData(data);
+
+     case Node.COMMENT_NODE:
+      return "<!--" + node.data + "-->";
+
+     default:
+      console.error(node);
+      throw new Error("not implemented");
+    }
+  }
+  function getInnerHTML(node) {
+    if (node instanceof wrappers.HTMLTemplateElement) node = node.content;
+    var s = "";
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      s += getOuterHTML(child, node);
+    }
+    return s;
+  }
+  function setInnerHTML(node, value, opt_tagName) {
+    var tagName = opt_tagName || "div";
+    node.textContent = "";
+    var tempElement = unwrap(node.ownerDocument.createElement(tagName));
+    tempElement.innerHTML = value;
+    var firstChild;
+    while (firstChild = tempElement.firstChild) {
+      node.appendChild(wrap(firstChild));
+    }
+  }
+  var oldIe = /MSIE/.test(navigator.userAgent);
+  var OriginalHTMLElement = window.HTMLElement;
+  var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
+  function HTMLElement(node) {
+    Element.call(this, node);
+  }
+  HTMLElement.prototype = Object.create(Element.prototype);
+  mixin(HTMLElement.prototype, {
+    get innerHTML() {
+      return getInnerHTML(this);
+    },
+    set innerHTML(value) {
+      if (oldIe && plaintextParents[this.localName]) {
+        this.textContent = value;
+        return;
+      }
+      var removedNodes = snapshotNodeList(this.childNodes);
+      if (this.invalidateShadowRenderer()) {
+        if (this instanceof wrappers.HTMLTemplateElement) setInnerHTML(this.content, value); else setInnerHTML(this, value, this.tagName);
+      } else if (!OriginalHTMLTemplateElement && this instanceof wrappers.HTMLTemplateElement) {
+        setInnerHTML(this.content, value);
+      } else {
+        unsafeUnwrap(this).innerHTML = value;
+      }
+      var addedNodes = snapshotNodeList(this.childNodes);
+      enqueueMutation(this, "childList", {
+        addedNodes: addedNodes,
+        removedNodes: removedNodes
+      });
+      nodesWereRemoved(removedNodes);
+      nodesWereAdded(addedNodes, this);
+    },
+    get outerHTML() {
+      return getOuterHTML(this, this.parentNode);
+    },
+    set outerHTML(value) {
+      var p = this.parentNode;
+      if (p) {
+        p.invalidateShadowRenderer();
+        var df = frag(p, value);
+        p.replaceChild(df, this);
+      }
+    },
+    insertAdjacentHTML: function(position, text) {
+      var contextElement, refNode;
+      switch (String(position).toLowerCase()) {
+       case "beforebegin":
+        contextElement = this.parentNode;
+        refNode = this;
+        break;
+
+       case "afterend":
+        contextElement = this.parentNode;
+        refNode = this.nextSibling;
+        break;
+
+       case "afterbegin":
+        contextElement = this;
+        refNode = this.firstChild;
+        break;
+
+       case "beforeend":
+        contextElement = this;
+        refNode = null;
+        break;
+
+       default:
+        return;
+      }
+      var df = frag(contextElement, text);
+      contextElement.insertBefore(df, refNode);
+    },
+    get hidden() {
+      return this.hasAttribute("hidden");
+    },
+    set hidden(v) {
+      if (v) {
+        this.setAttribute("hidden", "");
+      } else {
+        this.removeAttribute("hidden");
+      }
+    }
+  });
+  function frag(contextElement, html) {
+    var p = unwrap(contextElement.cloneNode(false));
+    p.innerHTML = html;
+    var df = unwrap(document.createDocumentFragment());
+    var c;
+    while (c = p.firstChild) {
+      df.appendChild(c);
+    }
+    return wrap(df);
+  }
+  function getter(name) {
+    return function() {
+      scope.renderAllPending();
+      return unsafeUnwrap(this)[name];
+    };
+  }
+  function getterRequiresRendering(name) {
+    defineGetter(HTMLElement, name, getter(name));
+  }
+  [ "clientHeight", "clientLeft", "clientTop", "clientWidth", "offsetHeight", "offsetLeft", "offsetTop", "offsetWidth", "scrollHeight", "scrollWidth" ].forEach(getterRequiresRendering);
+  function getterAndSetterRequiresRendering(name) {
+    Object.defineProperty(HTMLElement.prototype, name, {
+      get: getter(name),
+      set: function(v) {
+        scope.renderAllPending();
+        unsafeUnwrap(this)[name] = v;
+      },
+      configurable: true,
+      enumerable: true
+    });
+  }
+  [ "scrollLeft", "scrollTop" ].forEach(getterAndSetterRequiresRendering);
+  function methodRequiresRendering(name) {
+    Object.defineProperty(HTMLElement.prototype, name, {
+      value: function() {
+        scope.renderAllPending();
+        return unsafeUnwrap(this)[name].apply(unsafeUnwrap(this), arguments);
+      },
+      configurable: true,
+      enumerable: true
+    });
+  }
+  [ "focus", "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
+  registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));
+  scope.wrappers.HTMLElement = HTMLElement;
+  scope.getInnerHTML = getInnerHTML;
+  scope.setInnerHTML = setInnerHTML;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var OriginalHTMLCanvasElement = window.HTMLCanvasElement;
+  function HTMLCanvasElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLCanvasElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLCanvasElement.prototype, {
+    getContext: function() {
+      var context = unsafeUnwrap(this).getContext.apply(unsafeUnwrap(this), arguments);
+      return context && wrap(context);
+    }
+  });
+  registerWrapper(OriginalHTMLCanvasElement, HTMLCanvasElement, document.createElement("canvas"));
+  scope.wrappers.HTMLCanvasElement = HTMLCanvasElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var OriginalHTMLContentElement = window.HTMLContentElement;
+  function HTMLContentElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLContentElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLContentElement.prototype, {
+    constructor: HTMLContentElement,
+    get select() {
+      return this.getAttribute("select");
+    },
+    set select(value) {
+      this.setAttribute("select", value);
+    },
+    setAttribute: function(n, v) {
+      HTMLElement.prototype.setAttribute.call(this, n, v);
+      if (String(n).toLowerCase() === "select") this.invalidateShadowRenderer(true);
+    }
+  });
+  if (OriginalHTMLContentElement) registerWrapper(OriginalHTMLContentElement, HTMLContentElement);
+  scope.wrappers.HTMLContentElement = HTMLContentElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var wrapHTMLCollection = scope.wrapHTMLCollection;
+  var unwrap = scope.unwrap;
+  var OriginalHTMLFormElement = window.HTMLFormElement;
+  function HTMLFormElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLFormElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLFormElement.prototype, {
+    get elements() {
+      return wrapHTMLCollection(unwrap(this).elements);
+    }
+  });
+  registerWrapper(OriginalHTMLFormElement, HTMLFormElement, document.createElement("form"));
+  scope.wrappers.HTMLFormElement = HTMLFormElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var rewrap = scope.rewrap;
+  var OriginalHTMLImageElement = window.HTMLImageElement;
+  function HTMLImageElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLImageElement.prototype = Object.create(HTMLElement.prototype);
+  registerWrapper(OriginalHTMLImageElement, HTMLImageElement, document.createElement("img"));
+  function Image(width, height) {
+    if (!(this instanceof Image)) {
+      throw new TypeError("DOM object constructor cannot be called as a function.");
+    }
+    var node = unwrap(document.createElement("img"));
+    HTMLElement.call(this, node);
+    rewrap(node, this);
+    if (width !== undefined) node.width = width;
+    if (height !== undefined) node.height = height;
+  }
+  Image.prototype = HTMLImageElement.prototype;
+  scope.wrappers.HTMLImageElement = HTMLImageElement;
+  scope.wrappers.Image = Image;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var NodeList = scope.wrappers.NodeList;
+  var registerWrapper = scope.registerWrapper;
+  var OriginalHTMLShadowElement = window.HTMLShadowElement;
+  function HTMLShadowElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLShadowElement.prototype = Object.create(HTMLElement.prototype);
+  HTMLShadowElement.prototype.constructor = HTMLShadowElement;
+  if (OriginalHTMLShadowElement) registerWrapper(OriginalHTMLShadowElement, HTMLShadowElement);
+  scope.wrappers.HTMLShadowElement = HTMLShadowElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var contentTable = new WeakMap();
+  var templateContentsOwnerTable = new WeakMap();
+  function getTemplateContentsOwner(doc) {
+    if (!doc.defaultView) return doc;
+    var d = templateContentsOwnerTable.get(doc);
+    if (!d) {
+      d = doc.implementation.createHTMLDocument("");
+      while (d.lastChild) {
+        d.removeChild(d.lastChild);
+      }
+      templateContentsOwnerTable.set(doc, d);
+    }
+    return d;
+  }
+  function extractContent(templateElement) {
+    var doc = getTemplateContentsOwner(templateElement.ownerDocument);
+    var df = unwrap(doc.createDocumentFragment());
+    var child;
+    while (child = templateElement.firstChild) {
+      df.appendChild(child);
+    }
+    return df;
+  }
+  var OriginalHTMLTemplateElement = window.HTMLTemplateElement;
+  function HTMLTemplateElement(node) {
+    HTMLElement.call(this, node);
+    if (!OriginalHTMLTemplateElement) {
+      var content = extractContent(node);
+      contentTable.set(this, wrap(content));
+    }
+  }
+  HTMLTemplateElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLTemplateElement.prototype, {
+    constructor: HTMLTemplateElement,
+    get content() {
+      if (OriginalHTMLTemplateElement) return wrap(unsafeUnwrap(this).content);
+      return contentTable.get(this);
+    }
+  });
+  if (OriginalHTMLTemplateElement) registerWrapper(OriginalHTMLTemplateElement, HTMLTemplateElement);
+  scope.wrappers.HTMLTemplateElement = HTMLTemplateElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var registerWrapper = scope.registerWrapper;
+  var OriginalHTMLMediaElement = window.HTMLMediaElement;
+  if (!OriginalHTMLMediaElement) return;
+  function HTMLMediaElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLMediaElement.prototype = Object.create(HTMLElement.prototype);
+  registerWrapper(OriginalHTMLMediaElement, HTMLMediaElement, document.createElement("audio"));
+  scope.wrappers.HTMLMediaElement = HTMLMediaElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLMediaElement = scope.wrappers.HTMLMediaElement;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var rewrap = scope.rewrap;
+  var OriginalHTMLAudioElement = window.HTMLAudioElement;
+  if (!OriginalHTMLAudioElement) return;
+  function HTMLAudioElement(node) {
+    HTMLMediaElement.call(this, node);
+  }
+  HTMLAudioElement.prototype = Object.create(HTMLMediaElement.prototype);
+  registerWrapper(OriginalHTMLAudioElement, HTMLAudioElement, document.createElement("audio"));
+  function Audio(src) {
+    if (!(this instanceof Audio)) {
+      throw new TypeError("DOM object constructor cannot be called as a function.");
+    }
+    var node = unwrap(document.createElement("audio"));
+    HTMLMediaElement.call(this, node);
+    rewrap(node, this);
+    node.setAttribute("preload", "auto");
+    if (src !== undefined) node.setAttribute("src", src);
+  }
+  Audio.prototype = HTMLAudioElement.prototype;
+  scope.wrappers.HTMLAudioElement = HTMLAudioElement;
+  scope.wrappers.Audio = Audio;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var rewrap = scope.rewrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var OriginalHTMLOptionElement = window.HTMLOptionElement;
+  function trimText(s) {
+    return s.replace(/\s+/g, " ").trim();
+  }
+  function HTMLOptionElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLOptionElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLOptionElement.prototype, {
+    get text() {
+      return trimText(this.textContent);
+    },
+    set text(value) {
+      this.textContent = trimText(String(value));
+    },
+    get form() {
+      return wrap(unwrap(this).form);
+    }
+  });
+  registerWrapper(OriginalHTMLOptionElement, HTMLOptionElement, document.createElement("option"));
+  function Option(text, value, defaultSelected, selected) {
+    if (!(this instanceof Option)) {
+      throw new TypeError("DOM object constructor cannot be called as a function.");
+    }
+    var node = unwrap(document.createElement("option"));
+    HTMLElement.call(this, node);
+    rewrap(node, this);
+    if (text !== undefined) node.text = text;
+    if (value !== undefined) node.setAttribute("value", value);
+    if (defaultSelected === true) node.setAttribute("selected", "");
+    node.selected = selected === true;
+  }
+  Option.prototype = HTMLOptionElement.prototype;
+  scope.wrappers.HTMLOptionElement = HTMLOptionElement;
+  scope.wrappers.Option = Option;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var OriginalHTMLSelectElement = window.HTMLSelectElement;
+  function HTMLSelectElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLSelectElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLSelectElement.prototype, {
+    add: function(element, before) {
+      if (typeof before === "object") before = unwrap(before);
+      unwrap(this).add(unwrap(element), before);
+    },
+    remove: function(indexOrNode) {
+      if (indexOrNode === undefined) {
+        HTMLElement.prototype.remove.call(this);
+        return;
+      }
+      if (typeof indexOrNode === "object") indexOrNode = unwrap(indexOrNode);
+      unwrap(this).remove(indexOrNode);
+    },
+    get form() {
+      return wrap(unwrap(this).form);
+    }
+  });
+  registerWrapper(OriginalHTMLSelectElement, HTMLSelectElement, document.createElement("select"));
+  scope.wrappers.HTMLSelectElement = HTMLSelectElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrapHTMLCollection = scope.wrapHTMLCollection;
+  var OriginalHTMLTableElement = window.HTMLTableElement;
+  function HTMLTableElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLTableElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLTableElement.prototype, {
+    get caption() {
+      return wrap(unwrap(this).caption);
+    },
+    createCaption: function() {
+      return wrap(unwrap(this).createCaption());
+    },
+    get tHead() {
+      return wrap(unwrap(this).tHead);
+    },
+    createTHead: function() {
+      return wrap(unwrap(this).createTHead());
+    },
+    createTFoot: function() {
+      return wrap(unwrap(this).createTFoot());
+    },
+    get tFoot() {
+      return wrap(unwrap(this).tFoot);
+    },
+    get tBodies() {
+      return wrapHTMLCollection(unwrap(this).tBodies);
+    },
+    createTBody: function() {
+      return wrap(unwrap(this).createTBody());
+    },
+    get rows() {
+      return wrapHTMLCollection(unwrap(this).rows);
+    },
+    insertRow: function(index) {
+      return wrap(unwrap(this).insertRow(index));
+    }
+  });
+  registerWrapper(OriginalHTMLTableElement, HTMLTableElement, document.createElement("table"));
+  scope.wrappers.HTMLTableElement = HTMLTableElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var wrapHTMLCollection = scope.wrapHTMLCollection;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var OriginalHTMLTableSectionElement = window.HTMLTableSectionElement;
+  function HTMLTableSectionElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLTableSectionElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLTableSectionElement.prototype, {
+    constructor: HTMLTableSectionElement,
+    get rows() {
+      return wrapHTMLCollection(unwrap(this).rows);
+    },
+    insertRow: function(index) {
+      return wrap(unwrap(this).insertRow(index));
+    }
+  });
+  registerWrapper(OriginalHTMLTableSectionElement, HTMLTableSectionElement, document.createElement("thead"));
+  scope.wrappers.HTMLTableSectionElement = HTMLTableSectionElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var wrapHTMLCollection = scope.wrapHTMLCollection;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var OriginalHTMLTableRowElement = window.HTMLTableRowElement;
+  function HTMLTableRowElement(node) {
+    HTMLElement.call(this, node);
+  }
+  HTMLTableRowElement.prototype = Object.create(HTMLElement.prototype);
+  mixin(HTMLTableRowElement.prototype, {
+    get cells() {
+      return wrapHTMLCollection(unwrap(this).cells);
+    },
+    insertCell: function(index) {
+      return wrap(unwrap(this).insertCell(index));
+    }
+  });
+  registerWrapper(OriginalHTMLTableRowElement, HTMLTableRowElement, document.createElement("tr"));
+  scope.wrappers.HTMLTableRowElement = HTMLTableRowElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLContentElement = scope.wrappers.HTMLContentElement;
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
+  var HTMLTemplateElement = scope.wrappers.HTMLTemplateElement;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var OriginalHTMLUnknownElement = window.HTMLUnknownElement;
+  function HTMLUnknownElement(node) {
+    switch (node.localName) {
+     case "content":
+      return new HTMLContentElement(node);
+
+     case "shadow":
+      return new HTMLShadowElement(node);
+
+     case "template":
+      return new HTMLTemplateElement(node);
+    }
+    HTMLElement.call(this, node);
+  }
+  HTMLUnknownElement.prototype = Object.create(HTMLElement.prototype);
+  registerWrapper(OriginalHTMLUnknownElement, HTMLUnknownElement);
+  scope.wrappers.HTMLUnknownElement = HTMLUnknownElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var Element = scope.wrappers.Element;
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var registerWrapper = scope.registerWrapper;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var mixin = scope.mixin;
+  var SVG_NS = "http://www.w3.org/2000/svg";
+  var OriginalSVGElement = window.SVGElement;
+  var svgTitleElement = document.createElementNS(SVG_NS, "title");
+  if (!("classList" in svgTitleElement)) {
+    var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
+    Object.defineProperty(HTMLElement.prototype, "classList", descr);
+    delete Element.prototype.classList;
+  }
+  function SVGElement(node) {
+    Element.call(this, node);
+  }
+  SVGElement.prototype = Object.create(Element.prototype);
+  mixin(SVGElement.prototype, {
+    get ownerSVGElement() {
+      return wrap(unsafeUnwrap(this).ownerSVGElement);
+    }
+  });
+  registerWrapper(OriginalSVGElement, SVGElement, document.createElementNS(SVG_NS, "title"));
+  scope.wrappers.SVGElement = SVGElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var OriginalSVGUseElement = window.SVGUseElement;
+  var SVG_NS = "http://www.w3.org/2000/svg";
+  var gWrapper = wrap(document.createElementNS(SVG_NS, "g"));
+  var useElement = document.createElementNS(SVG_NS, "use");
+  var SVGGElement = gWrapper.constructor;
+  var parentInterfacePrototype = Object.getPrototypeOf(SVGGElement.prototype);
+  var parentInterface = parentInterfacePrototype.constructor;
+  function SVGUseElement(impl) {
+    parentInterface.call(this, impl);
+  }
+  SVGUseElement.prototype = Object.create(parentInterfacePrototype);
+  if ("instanceRoot" in useElement) {
+    mixin(SVGUseElement.prototype, {
+      get instanceRoot() {
+        return wrap(unwrap(this).instanceRoot);
+      },
+      get animatedInstanceRoot() {
+        return wrap(unwrap(this).animatedInstanceRoot);
+      }
+    });
+  }
+  registerWrapper(OriginalSVGUseElement, SVGUseElement, useElement);
+  scope.wrappers.SVGUseElement = SVGUseElement;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var EventTarget = scope.wrappers.EventTarget;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var wrap = scope.wrap;
+  var OriginalSVGElementInstance = window.SVGElementInstance;
+  if (!OriginalSVGElementInstance) return;
+  function SVGElementInstance(impl) {
+    EventTarget.call(this, impl);
+  }
+  SVGElementInstance.prototype = Object.create(EventTarget.prototype);
+  mixin(SVGElementInstance.prototype, {
+    get correspondingElement() {
+      return wrap(unsafeUnwrap(this).correspondingElement);
+    },
+    get correspondingUseElement() {
+      return wrap(unsafeUnwrap(this).correspondingUseElement);
+    },
+    get parentNode() {
+      return wrap(unsafeUnwrap(this).parentNode);
+    },
+    get childNodes() {
+      throw new Error("Not implemented");
+    },
+    get firstChild() {
+      return wrap(unsafeUnwrap(this).firstChild);
+    },
+    get lastChild() {
+      return wrap(unsafeUnwrap(this).lastChild);
+    },
+    get previousSibling() {
+      return wrap(unsafeUnwrap(this).previousSibling);
+    },
+    get nextSibling() {
+      return wrap(unsafeUnwrap(this).nextSibling);
+    }
+  });
+  registerWrapper(OriginalSVGElementInstance, SVGElementInstance);
+  scope.wrappers.SVGElementInstance = SVGElementInstance;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var OriginalCanvasRenderingContext2D = window.CanvasRenderingContext2D;
+  function CanvasRenderingContext2D(impl) {
+    setWrapper(impl, this);
+  }
+  mixin(CanvasRenderingContext2D.prototype, {
+    get canvas() {
+      return wrap(unsafeUnwrap(this).canvas);
+    },
+    drawImage: function() {
+      arguments[0] = unwrapIfNeeded(arguments[0]);
+      unsafeUnwrap(this).drawImage.apply(unsafeUnwrap(this), arguments);
+    },
+    createPattern: function() {
+      arguments[0] = unwrap(arguments[0]);
+      return unsafeUnwrap(this).createPattern.apply(unsafeUnwrap(this), arguments);
+    }
+  });
+  registerWrapper(OriginalCanvasRenderingContext2D, CanvasRenderingContext2D, document.createElement("canvas").getContext("2d"));
+  scope.wrappers.CanvasRenderingContext2D = CanvasRenderingContext2D;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var addForwardingProperties = scope.addForwardingProperties;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var OriginalWebGLRenderingContext = window.WebGLRenderingContext;
+  if (!OriginalWebGLRenderingContext) return;
+  function WebGLRenderingContext(impl) {
+    setWrapper(impl, this);
+  }
+  mixin(WebGLRenderingContext.prototype, {
+    get canvas() {
+      return wrap(unsafeUnwrap(this).canvas);
+    },
+    texImage2D: function() {
+      arguments[5] = unwrapIfNeeded(arguments[5]);
+      unsafeUnwrap(this).texImage2D.apply(unsafeUnwrap(this), arguments);
+    },
+    texSubImage2D: function() {
+      arguments[6] = unwrapIfNeeded(arguments[6]);
+      unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);
+    }
+  });
+  var OriginalWebGLRenderingContextBase = Object.getPrototypeOf(OriginalWebGLRenderingContext.prototype);
+  if (OriginalWebGLRenderingContextBase !== Object.prototype) {
+    addForwardingProperties(OriginalWebGLRenderingContextBase, WebGLRenderingContext.prototype);
+  }
+  var instanceProperties = /WebKit/.test(navigator.userAgent) ? {
+    drawingBufferHeight: null,
+    drawingBufferWidth: null
+  } : {};
+  registerWrapper(OriginalWebGLRenderingContext, WebGLRenderingContext, instanceProperties);
+  scope.wrappers.WebGLRenderingContext = WebGLRenderingContext;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var Node = scope.wrappers.Node;
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var mixin = scope.mixin;
+  var registerObject = scope.registerObject;
+  var registerWrapper = scope.registerWrapper;
+  var OriginalDocumentFragment = window.DocumentFragment;
+  function DocumentFragment(node) {
+    Node.call(this, node);
+  }
+  DocumentFragment.prototype = Object.create(Node.prototype);
+  mixin(DocumentFragment.prototype, ParentNodeInterface);
+  mixin(DocumentFragment.prototype, SelectorsInterface);
+  mixin(DocumentFragment.prototype, GetElementsByInterface);
+  mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
+  registerWrapper(OriginalDocumentFragment, DocumentFragment, document.createDocumentFragment());
+  scope.wrappers.DocumentFragment = DocumentFragment;
+  var Comment = registerObject(document.createComment(""));
+  scope.wrappers.Comment = Comment;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var DocumentFragment = scope.wrappers.DocumentFragment;
+  var TreeScope = scope.TreeScope;
+  var elementFromPoint = scope.elementFromPoint;
+  var getInnerHTML = scope.getInnerHTML;
+  var getTreeScope = scope.getTreeScope;
+  var mixin = scope.mixin;
+  var rewrap = scope.rewrap;
+  var setInnerHTML = scope.setInnerHTML;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var shadowHostTable = new WeakMap();
+  var nextOlderShadowTreeTable = new WeakMap();
+  function ShadowRoot(hostWrapper) {
+    var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
+    DocumentFragment.call(this, node);
+    rewrap(node, this);
+    var oldShadowRoot = hostWrapper.shadowRoot;
+    nextOlderShadowTreeTable.set(this, oldShadowRoot);
+    this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
+    shadowHostTable.set(this, hostWrapper);
+  }
+  ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
+  mixin(ShadowRoot.prototype, {
+    constructor: ShadowRoot,
+    get innerHTML() {
+      return getInnerHTML(this);
+    },
+    set innerHTML(value) {
+      setInnerHTML(this, value);
+      this.invalidateShadowRenderer();
+    },
+    get olderShadowRoot() {
+      return nextOlderShadowTreeTable.get(this) || null;
+    },
+    get host() {
+      return shadowHostTable.get(this) || null;
+    },
+    invalidateShadowRenderer: function() {
+      return shadowHostTable.get(this).invalidateShadowRenderer();
+    },
+    elementFromPoint: function(x, y) {
+      return elementFromPoint(this, this.ownerDocument, x, y);
+    },
+    getSelection: function() {
+      return document.getSelection();
+    },
+    get activeElement() {
+      var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement;
+      if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
+      var activeElement = wrap(unwrappedActiveElement);
+      while (!this.contains(activeElement)) {
+        while (activeElement.parentNode) {
+          activeElement = activeElement.parentNode;
+        }
+        if (activeElement.host) {
+          activeElement = activeElement.host;
+        } else {
+          return null;
+        }
+      }
+      return activeElement;
+    }
+  });
+  scope.wrappers.ShadowRoot = ShadowRoot;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var getTreeScope = scope.getTreeScope;
+  var OriginalRange = window.Range;
+  var ShadowRoot = scope.wrappers.ShadowRoot;
+  function getHost(node) {
+    var root = getTreeScope(node).root;
+    if (root instanceof ShadowRoot) {
+      return root.host;
+    }
+    return null;
+  }
+  function hostNodeToShadowNode(refNode, offset) {
+    if (refNode.shadowRoot) {
+      offset = Math.min(refNode.childNodes.length - 1, offset);
+      var child = refNode.childNodes[offset];
+      if (child) {
+        var insertionPoint = scope.getDestinationInsertionPoints(child);
+        if (insertionPoint.length > 0) {
+          var parentNode = insertionPoint[0].parentNode;
+          if (parentNode.nodeType == Node.ELEMENT_NODE) {
+            refNode = parentNode;
+          }
+        }
+      }
+    }
+    return refNode;
+  }
+  function shadowNodeToHostNode(node) {
+    node = wrap(node);
+    return getHost(node) || node;
+  }
+  function Range(impl) {
+    setWrapper(impl, this);
+  }
+  Range.prototype = {
+    get startContainer() {
+      return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);
+    },
+    get endContainer() {
+      return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);
+    },
+    get commonAncestorContainer() {
+      return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);
+    },
+    setStart: function(refNode, offset) {
+      refNode = hostNodeToShadowNode(refNode, offset);
+      unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);
+    },
+    setEnd: function(refNode, offset) {
+      refNode = hostNodeToShadowNode(refNode, offset);
+      unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);
+    },
+    setStartBefore: function(refNode) {
+      unsafeUnwrap(this).setStartBefore(unwrapIfNeeded(refNode));
+    },
+    setStartAfter: function(refNode) {
+      unsafeUnwrap(this).setStartAfter(unwrapIfNeeded(refNode));
+    },
+    setEndBefore: function(refNode) {
+      unsafeUnwrap(this).setEndBefore(unwrapIfNeeded(refNode));
+    },
+    setEndAfter: function(refNode) {
+      unsafeUnwrap(this).setEndAfter(unwrapIfNeeded(refNode));
+    },
+    selectNode: function(refNode) {
+      unsafeUnwrap(this).selectNode(unwrapIfNeeded(refNode));
+    },
+    selectNodeContents: function(refNode) {
+      unsafeUnwrap(this).selectNodeContents(unwrapIfNeeded(refNode));
+    },
+    compareBoundaryPoints: function(how, sourceRange) {
+      return unsafeUnwrap(this).compareBoundaryPoints(how, unwrap(sourceRange));
+    },
+    extractContents: function() {
+      return wrap(unsafeUnwrap(this).extractContents());
+    },
+    cloneContents: function() {
+      return wrap(unsafeUnwrap(this).cloneContents());
+    },
+    insertNode: function(node) {
+      unsafeUnwrap(this).insertNode(unwrapIfNeeded(node));
+    },
+    surroundContents: function(newParent) {
+      unsafeUnwrap(this).surroundContents(unwrapIfNeeded(newParent));
+    },
+    cloneRange: function() {
+      return wrap(unsafeUnwrap(this).cloneRange());
+    },
+    isPointInRange: function(node, offset) {
+      return unsafeUnwrap(this).isPointInRange(unwrapIfNeeded(node), offset);
+    },
+    comparePoint: function(node, offset) {
+      return unsafeUnwrap(this).comparePoint(unwrapIfNeeded(node), offset);
+    },
+    intersectsNode: function(node) {
+      return unsafeUnwrap(this).intersectsNode(unwrapIfNeeded(node));
+    },
+    toString: function() {
+      return unsafeUnwrap(this).toString();
+    }
+  };
+  if (OriginalRange.prototype.createContextualFragment) {
+    Range.prototype.createContextualFragment = function(html) {
+      return wrap(unsafeUnwrap(this).createContextualFragment(html));
+    };
+  }
+  registerWrapper(window.Range, Range, document.createRange());
+  scope.wrappers.Range = Range;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var Element = scope.wrappers.Element;
+  var HTMLContentElement = scope.wrappers.HTMLContentElement;
+  var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
+  var Node = scope.wrappers.Node;
+  var ShadowRoot = scope.wrappers.ShadowRoot;
+  var assert = scope.assert;
+  var getTreeScope = scope.getTreeScope;
+  var mixin = scope.mixin;
+  var oneOf = scope.oneOf;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var ArraySplice = scope.ArraySplice;
+  function updateWrapperUpAndSideways(wrapper) {
+    wrapper.previousSibling_ = wrapper.previousSibling;
+    wrapper.nextSibling_ = wrapper.nextSibling;
+    wrapper.parentNode_ = wrapper.parentNode;
+  }
+  function updateWrapperDown(wrapper) {
+    wrapper.firstChild_ = wrapper.firstChild;
+    wrapper.lastChild_ = wrapper.lastChild;
+  }
+  function updateAllChildNodes(parentNodeWrapper) {
+    assert(parentNodeWrapper instanceof Node);
+    for (var childWrapper = parentNodeWrapper.firstChild; childWrapper; childWrapper = childWrapper.nextSibling) {
+      updateWrapperUpAndSideways(childWrapper);
+    }
+    updateWrapperDown(parentNodeWrapper);
+  }
+  function insertBefore(parentNodeWrapper, newChildWrapper, refChildWrapper) {
+    var parentNode = unwrap(parentNodeWrapper);
+    var newChild = unwrap(newChildWrapper);
+    var refChild = refChildWrapper ? unwrap(refChildWrapper) : null;
+    remove(newChildWrapper);
+    updateWrapperUpAndSideways(newChildWrapper);
+    if (!refChildWrapper) {
+      parentNodeWrapper.lastChild_ = parentNodeWrapper.lastChild;
+      if (parentNodeWrapper.lastChild === parentNodeWrapper.firstChild) parentNodeWrapper.firstChild_ = parentNodeWrapper.firstChild;
+      var lastChildWrapper = wrap(parentNode.lastChild);
+      if (lastChildWrapper) lastChildWrapper.nextSibling_ = lastChildWrapper.nextSibling;
+    } else {
+      if (parentNodeWrapper.firstChild === refChildWrapper) parentNodeWrapper.firstChild_ = refChildWrapper;
+      refChildWrapper.previousSibling_ = refChildWrapper.previousSibling;
+    }
+    scope.originalInsertBefore.call(parentNode, newChild, refChild);
+  }
+  function remove(nodeWrapper) {
+    var node = unwrap(nodeWrapper);
+    var parentNode = node.parentNode;
+    if (!parentNode) return;
+    var parentNodeWrapper = wrap(parentNode);
+    updateWrapperUpAndSideways(nodeWrapper);
+    if (nodeWrapper.previousSibling) nodeWrapper.previousSibling.nextSibling_ = nodeWrapper;
+    if (nodeWrapper.nextSibling) nodeWrapper.nextSibling.previousSibling_ = nodeWrapper;
+    if (parentNodeWrapper.lastChild === nodeWrapper) parentNodeWrapper.lastChild_ = nodeWrapper;
+    if (parentNodeWrapper.firstChild === nodeWrapper) parentNodeWrapper.firstChild_ = nodeWrapper;
+    scope.originalRemoveChild.call(parentNode, node);
+  }
+  var distributedNodesTable = new WeakMap();
+  var destinationInsertionPointsTable = new WeakMap();
+  var rendererForHostTable = new WeakMap();
+  function resetDistributedNodes(insertionPoint) {
+    distributedNodesTable.set(insertionPoint, []);
+  }
+  function getDistributedNodes(insertionPoint) {
+    var rv = distributedNodesTable.get(insertionPoint);
+    if (!rv) distributedNodesTable.set(insertionPoint, rv = []);
+    return rv;
+  }
+  function getChildNodesSnapshot(node) {
+    var result = [], i = 0;
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      result[i++] = child;
+    }
+    return result;
+  }
+  var request = oneOf(window, [ "requestAnimationFrame", "mozRequestAnimationFrame", "webkitRequestAnimationFrame", "setTimeout" ]);
+  var pendingDirtyRenderers = [];
+  var renderTimer;
+  function renderAllPending() {
+    for (var i = 0; i < pendingDirtyRenderers.length; i++) {
+      var renderer = pendingDirtyRenderers[i];
+      var parentRenderer = renderer.parentRenderer;
+      if (parentRenderer && parentRenderer.dirty) continue;
+      renderer.render();
+    }
+    pendingDirtyRenderers = [];
+  }
+  function handleRequestAnimationFrame() {
+    renderTimer = null;
+    renderAllPending();
+  }
+  function getRendererForHost(host) {
+    var renderer = rendererForHostTable.get(host);
+    if (!renderer) {
+      renderer = new ShadowRenderer(host);
+      rendererForHostTable.set(host, renderer);
+    }
+    return renderer;
+  }
+  function getShadowRootAncestor(node) {
+    var root = getTreeScope(node).root;
+    if (root instanceof ShadowRoot) return root;
+    return null;
+  }
+  function getRendererForShadowRoot(shadowRoot) {
+    return getRendererForHost(shadowRoot.host);
+  }
+  var spliceDiff = new ArraySplice();
+  spliceDiff.equals = function(renderNode, rawNode) {
+    return unwrap(renderNode.node) === rawNode;
+  };
+  function RenderNode(node) {
+    this.skip = false;
+    this.node = node;
+    this.childNodes = [];
+  }
+  RenderNode.prototype = {
+    append: function(node) {
+      var rv = new RenderNode(node);
+      this.childNodes.push(rv);
+      return rv;
+    },
+    sync: function(opt_added) {
+      if (this.skip) return;
+      var nodeWrapper = this.node;
+      var newChildren = this.childNodes;
+      var oldChildren = getChildNodesSnapshot(unwrap(nodeWrapper));
+      var added = opt_added || new WeakMap();
+      var splices = spliceDiff.calculateSplices(newChildren, oldChildren);
+      var newIndex = 0, oldIndex = 0;
+      var lastIndex = 0;
+      for (var i = 0; i < splices.length; i++) {
+        var splice = splices[i];
+        for (;lastIndex < splice.index; lastIndex++) {
+          oldIndex++;
+          newChildren[newIndex++].sync(added);
+        }
+        var removedCount = splice.removed.length;
+        for (var j = 0; j < removedCount; j++) {
+          var wrapper = wrap(oldChildren[oldIndex++]);
+          if (!added.get(wrapper)) remove(wrapper);
+        }
+        var addedCount = splice.addedCount;
+        var refNode = oldChildren[oldIndex] && wrap(oldChildren[oldIndex]);
+        for (var j = 0; j < addedCount; j++) {
+          var newChildRenderNode = newChildren[newIndex++];
+          var newChildWrapper = newChildRenderNode.node;
+          insertBefore(nodeWrapper, newChildWrapper, refNode);
+          added.set(newChildWrapper, true);
+          newChildRenderNode.sync(added);
+        }
+        lastIndex += addedCount;
+      }
+      for (var i = lastIndex; i < newChildren.length; i++) {
+        newChildren[i].sync(added);
+      }
+    }
+  };
+  function ShadowRenderer(host) {
+    this.host = host;
+    this.dirty = false;
+    this.invalidateAttributes();
+    this.associateNode(host);
+  }
+  ShadowRenderer.prototype = {
+    render: function(opt_renderNode) {
+      if (!this.dirty) return;
+      this.invalidateAttributes();
+      var host = this.host;
+      this.distribution(host);
+      var renderNode = opt_renderNode || new RenderNode(host);
+      this.buildRenderTree(renderNode, host);
+      var topMostRenderer = !opt_renderNode;
+      if (topMostRenderer) renderNode.sync();
+      this.dirty = false;
+    },
+    get parentRenderer() {
+      return getTreeScope(this.host).renderer;
+    },
+    invalidate: function() {
+      if (!this.dirty) {
+        this.dirty = true;
+        var parentRenderer = this.parentRenderer;
+        if (parentRenderer) parentRenderer.invalidate();
+        pendingDirtyRenderers.push(this);
+        if (renderTimer) return;
+        renderTimer = window[request](handleRequestAnimationFrame, 0);
+      }
+    },
+    distribution: function(root) {
+      this.resetAllSubtrees(root);
+      this.distributionResolution(root);
+    },
+    resetAll: function(node) {
+      if (isInsertionPoint(node)) resetDistributedNodes(node); else resetDestinationInsertionPoints(node);
+      this.resetAllSubtrees(node);
+    },
+    resetAllSubtrees: function(node) {
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        this.resetAll(child);
+      }
+      if (node.shadowRoot) this.resetAll(node.shadowRoot);
+      if (node.olderShadowRoot) this.resetAll(node.olderShadowRoot);
+    },
+    distributionResolution: function(node) {
+      if (isShadowHost(node)) {
+        var shadowHost = node;
+        var pool = poolPopulation(shadowHost);
+        var shadowTrees = getShadowTrees(shadowHost);
+        for (var i = 0; i < shadowTrees.length; i++) {
+          this.poolDistribution(shadowTrees[i], pool);
+        }
+        for (var i = shadowTrees.length - 1; i >= 0; i--) {
+          var shadowTree = shadowTrees[i];
+          var shadow = getShadowInsertionPoint(shadowTree);
+          if (shadow) {
+            var olderShadowRoot = shadowTree.olderShadowRoot;
+            if (olderShadowRoot) {
+              pool = poolPopulation(olderShadowRoot);
+            }
+            for (var j = 0; j < pool.length; j++) {
+              destributeNodeInto(pool[j], shadow);
+            }
+          }
+          this.distributionResolution(shadowTree);
+        }
+      }
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        this.distributionResolution(child);
+      }
+    },
+    poolDistribution: function(node, pool) {
+      if (node instanceof HTMLShadowElement) return;
+      if (node instanceof HTMLContentElement) {
+        var content = node;
+        this.updateDependentAttributes(content.getAttribute("select"));
+        var anyDistributed = false;
+        for (var i = 0; i < pool.length; i++) {
+          var node = pool[i];
+          if (!node) continue;
+          if (matches(node, content)) {
+            destributeNodeInto(node, content);
+            pool[i] = undefined;
+            anyDistributed = true;
+          }
+        }
+        if (!anyDistributed) {
+          for (var child = content.firstChild; child; child = child.nextSibling) {
+            destributeNodeInto(child, content);
+          }
+        }
+        return;
+      }
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        this.poolDistribution(child, pool);
+      }
+    },
+    buildRenderTree: function(renderNode, node) {
+      var children = this.compose(node);
+      for (var i = 0; i < children.length; i++) {
+        var child = children[i];
+        var childRenderNode = renderNode.append(child);
+        this.buildRenderTree(childRenderNode, child);
+      }
+      if (isShadowHost(node)) {
+        var renderer = getRendererForHost(node);
+        renderer.dirty = false;
+      }
+    },
+    compose: function(node) {
+      var children = [];
+      var p = node.shadowRoot || node;
+      for (var child = p.firstChild; child; child = child.nextSibling) {
+        if (isInsertionPoint(child)) {
+          this.associateNode(p);
+          var distributedNodes = getDistributedNodes(child);
+          for (var j = 0; j < distributedNodes.length; j++) {
+            var distributedNode = distributedNodes[j];
+            if (isFinalDestination(child, distributedNode)) children.push(distributedNode);
+          }
+        } else {
+          children.push(child);
+        }
+      }
+      return children;
+    },
+    invalidateAttributes: function() {
+      this.attributes = Object.create(null);
+    },
+    updateDependentAttributes: function(selector) {
+      if (!selector) return;
+      var attributes = this.attributes;
+      if (/\.\w+/.test(selector)) attributes["class"] = true;
+      if (/#\w+/.test(selector)) attributes["id"] = true;
+      selector.replace(/\[\s*([^\s=\|~\]]+)/g, function(_, name) {
+        attributes[name] = true;
+      });
+    },
+    dependsOnAttribute: function(name) {
+      return this.attributes[name];
+    },
+    associateNode: function(node) {
+      unsafeUnwrap(node).polymerShadowRenderer_ = this;
+    }
+  };
+  function poolPopulation(node) {
+    var pool = [];
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      if (isInsertionPoint(child)) {
+        pool.push.apply(pool, getDistributedNodes(child));
+      } else {
+        pool.push(child);
+      }
+    }
+    return pool;
+  }
+  function getShadowInsertionPoint(node) {
+    if (node instanceof HTMLShadowElement) return node;
+    if (node instanceof HTMLContentElement) return null;
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      var res = getShadowInsertionPoint(child);
+      if (res) return res;
+    }
+    return null;
+  }
+  function destributeNodeInto(child, insertionPoint) {
+    getDistributedNodes(insertionPoint).push(child);
+    var points = destinationInsertionPointsTable.get(child);
+    if (!points) destinationInsertionPointsTable.set(child, [ insertionPoint ]); else points.push(insertionPoint);
+  }
+  function getDestinationInsertionPoints(node) {
+    return destinationInsertionPointsTable.get(node);
+  }
+  function resetDestinationInsertionPoints(node) {
+    destinationInsertionPointsTable.set(node, undefined);
+  }
+  var selectorStartCharRe = /^(:not\()?[*.#[a-zA-Z_|]/;
+  function matches(node, contentElement) {
+    var select = contentElement.getAttribute("select");
+    if (!select) return true;
+    select = select.trim();
+    if (!select) return true;
+    if (!(node instanceof Element)) return false;
+    if (!selectorStartCharRe.test(select)) return false;
+    try {
+      return node.matches(select);
+    } catch (ex) {
+      return false;
+    }
+  }
+  function isFinalDestination(insertionPoint, node) {
+    var points = getDestinationInsertionPoints(node);
+    return points && points[points.length - 1] === insertionPoint;
+  }
+  function isInsertionPoint(node) {
+    return node instanceof HTMLContentElement || node instanceof HTMLShadowElement;
+  }
+  function isShadowHost(shadowHost) {
+    return shadowHost.shadowRoot;
+  }
+  function getShadowTrees(host) {
+    var trees = [];
+    for (var tree = host.shadowRoot; tree; tree = tree.olderShadowRoot) {
+      trees.push(tree);
+    }
+    return trees;
+  }
+  function render(host) {
+    new ShadowRenderer(host).render();
+  }
+  Node.prototype.invalidateShadowRenderer = function(force) {
+    var renderer = unsafeUnwrap(this).polymerShadowRenderer_;
+    if (renderer) {
+      renderer.invalidate();
+      return true;
+    }
+    return false;
+  };
+  HTMLContentElement.prototype.getDistributedNodes = HTMLShadowElement.prototype.getDistributedNodes = function() {
+    renderAllPending();
+    return getDistributedNodes(this);
+  };
+  Element.prototype.getDestinationInsertionPoints = function() {
+    renderAllPending();
+    return getDestinationInsertionPoints(this) || [];
+  };
+  HTMLContentElement.prototype.nodeIsInserted_ = HTMLShadowElement.prototype.nodeIsInserted_ = function() {
+    this.invalidateShadowRenderer();
+    var shadowRoot = getShadowRootAncestor(this);
+    var renderer;
+    if (shadowRoot) renderer = getRendererForShadowRoot(shadowRoot);
+    unsafeUnwrap(this).polymerShadowRenderer_ = renderer;
+    if (renderer) renderer.invalidate();
+  };
+  scope.getRendererForHost = getRendererForHost;
+  scope.getShadowTrees = getShadowTrees;
+  scope.renderAllPending = renderAllPending;
+  scope.getDestinationInsertionPoints = getDestinationInsertionPoints;
+  scope.visual = {
+    insertBefore: insertBefore,
+    remove: remove
+  };
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var HTMLElement = scope.wrappers.HTMLElement;
+  var assert = scope.assert;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var elementsWithFormProperty = [ "HTMLButtonElement", "HTMLFieldSetElement", "HTMLInputElement", "HTMLKeygenElement", "HTMLLabelElement", "HTMLLegendElement", "HTMLObjectElement", "HTMLOutputElement", "HTMLTextAreaElement" ];
+  function createWrapperConstructor(name) {
+    if (!window[name]) return;
+    assert(!scope.wrappers[name]);
+    var GeneratedWrapper = function(node) {
+      HTMLElement.call(this, node);
+    };
+    GeneratedWrapper.prototype = Object.create(HTMLElement.prototype);
+    mixin(GeneratedWrapper.prototype, {
+      get form() {
+        return wrap(unwrap(this).form);
+      }
+    });
+    registerWrapper(window[name], GeneratedWrapper, document.createElement(name.slice(4, -7)));
+    scope.wrappers[name] = GeneratedWrapper;
+  }
+  elementsWithFormProperty.forEach(createWrapperConstructor);
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var OriginalSelection = window.Selection;
+  function Selection(impl) {
+    setWrapper(impl, this);
+  }
+  Selection.prototype = {
+    get anchorNode() {
+      return wrap(unsafeUnwrap(this).anchorNode);
+    },
+    get focusNode() {
+      return wrap(unsafeUnwrap(this).focusNode);
+    },
+    addRange: function(range) {
+      unsafeUnwrap(this).addRange(unwrapIfNeeded(range));
+    },
+    collapse: function(node, index) {
+      unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);
+    },
+    containsNode: function(node, allowPartial) {
+      return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);
+    },
+    getRangeAt: function(index) {
+      return wrap(unsafeUnwrap(this).getRangeAt(index));
+    },
+    removeRange: function(range) {
+      unsafeUnwrap(this).removeRange(unwrap(range));
+    },
+    selectAllChildren: function(node) {
+      unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));
+    },
+    toString: function() {
+      return unsafeUnwrap(this).toString();
+    }
+  };
+  if (OriginalSelection.prototype.extend) {
+    Selection.prototype.extend = function(node, offset) {
+      unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
+    };
+  }
+  registerWrapper(window.Selection, Selection, window.getSelection());
+  scope.wrappers.Selection = Selection;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var OriginalTreeWalker = window.TreeWalker;
+  function TreeWalker(impl) {
+    setWrapper(impl, this);
+  }
+  TreeWalker.prototype = {
+    get root() {
+      return wrap(unsafeUnwrap(this).root);
+    },
+    get currentNode() {
+      return wrap(unsafeUnwrap(this).currentNode);
+    },
+    set currentNode(node) {
+      unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);
+    },
+    get filter() {
+      return unsafeUnwrap(this).filter;
+    },
+    parentNode: function() {
+      return wrap(unsafeUnwrap(this).parentNode());
+    },
+    firstChild: function() {
+      return wrap(unsafeUnwrap(this).firstChild());
+    },
+    lastChild: function() {
+      return wrap(unsafeUnwrap(this).lastChild());
+    },
+    previousSibling: function() {
+      return wrap(unsafeUnwrap(this).previousSibling());
+    },
+    previousNode: function() {
+      return wrap(unsafeUnwrap(this).previousNode());
+    },
+    nextNode: function() {
+      return wrap(unsafeUnwrap(this).nextNode());
+    }
+  };
+  registerWrapper(OriginalTreeWalker, TreeWalker);
+  scope.wrappers.TreeWalker = TreeWalker;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var GetElementsByInterface = scope.GetElementsByInterface;
+  var Node = scope.wrappers.Node;
+  var ParentNodeInterface = scope.ParentNodeInterface;
+  var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
+  var Selection = scope.wrappers.Selection;
+  var SelectorsInterface = scope.SelectorsInterface;
+  var ShadowRoot = scope.wrappers.ShadowRoot;
+  var TreeScope = scope.TreeScope;
+  var cloneNode = scope.cloneNode;
+  var defineGetter = scope.defineGetter;
+  var defineWrapGetter = scope.defineWrapGetter;
+  var elementFromPoint = scope.elementFromPoint;
+  var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
+  var matchesNames = scope.matchesNames;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var renderAllPending = scope.renderAllPending;
+  var rewrap = scope.rewrap;
+  var setWrapper = scope.setWrapper;
+  var unsafeUnwrap = scope.unsafeUnwrap;
+  var unwrap = scope.unwrap;
+  var wrap = scope.wrap;
+  var wrapEventTargetMethods = scope.wrapEventTargetMethods;
+  var wrapNodeList = scope.wrapNodeList;
+  var implementationTable = new WeakMap();
+  function Document(node) {
+    Node.call(this, node);
+    this.treeScope_ = new TreeScope(this, null);
+  }
+  Document.prototype = Object.create(Node.prototype);
+  defineWrapGetter(Document, "documentElement");
+  defineWrapGetter(Document, "body");
+  defineWrapGetter(Document, "head");
+  defineGetter(Document, "activeElement", function() {
+    var unwrappedActiveElement = unwrap(this).activeElement;
+    if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
+    var activeElement = wrap(unwrappedActiveElement);
+    while (!this.contains(activeElement)) {
+      while (activeElement.parentNode) {
+        activeElement = activeElement.parentNode;
+      }
+      if (activeElement.host) {
+        activeElement = activeElement.host;
+      } else {
+        return null;
+      }
+    }
+    return activeElement;
+  });
+  function wrapMethod(name) {
+    var original = document[name];
+    Document.prototype[name] = function() {
+      return wrap(original.apply(unsafeUnwrap(this), arguments));
+    };
+  }
+  [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod);
+  var originalAdoptNode = document.adoptNode;
+  function adoptNodeNoRemove(node, doc) {
+    originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));
+    adoptSubtree(node, doc);
+  }
+  function adoptSubtree(node, doc) {
+    if (node.shadowRoot) doc.adoptNode(node.shadowRoot);
+    if (node instanceof ShadowRoot) adoptOlderShadowRoots(node, doc);
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      adoptSubtree(child, doc);
+    }
+  }
+  function adoptOlderShadowRoots(shadowRoot, doc) {
+    var oldShadowRoot = shadowRoot.olderShadowRoot;
+    if (oldShadowRoot) doc.adoptNode(oldShadowRoot);
+  }
+  var originalGetSelection = document.getSelection;
+  mixin(Document.prototype, {
+    adoptNode: function(node) {
+      if (node.parentNode) node.parentNode.removeChild(node);
+      adoptNodeNoRemove(node, this);
+      return node;
+    },
+    elementFromPoint: function(x, y) {
+      return elementFromPoint(this, this, x, y);
+    },
+    importNode: function(node, deep) {
+      return cloneNode(node, deep, unsafeUnwrap(this));
+    },
+    getSelection: function() {
+      renderAllPending();
+      return new Selection(originalGetSelection.call(unwrap(this)));
+    },
+    getElementsByName: function(name) {
+      return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");
+    }
+  });
+  var originalCreateTreeWalker = document.createTreeWalker;
+  var TreeWalkerWrapper = scope.wrappers.TreeWalker;
+  Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {
+    var newFilter = null;
+    if (filter) {
+      if (filter.acceptNode && typeof filter.acceptNode === "function") {
+        newFilter = {
+          acceptNode: function(node) {
+            return filter.acceptNode(wrap(node));
+          }
+        };
+      } else if (typeof filter === "function") {
+        newFilter = function(node) {
+          return filter(wrap(node));
+        };
+      }
+    }
+    return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));
+  };
+  if (document.registerElement) {
+    var originalRegisterElement = document.registerElement;
+    Document.prototype.registerElement = function(tagName, object) {
+      var prototype, extendsOption;
+      if (object !== undefined) {
+        prototype = object.prototype;
+        extendsOption = object.extends;
+      }
+      if (!prototype) prototype = Object.create(HTMLElement.prototype);
+      if (scope.nativePrototypeTable.get(prototype)) {
+        throw new Error("NotSupportedError");
+      }
+      var proto = Object.getPrototypeOf(prototype);
+      var nativePrototype;
+      var prototypes = [];
+      while (proto) {
+        nativePrototype = scope.nativePrototypeTable.get(proto);
+        if (nativePrototype) break;
+        prototypes.push(proto);
+        proto = Object.getPrototypeOf(proto);
+      }
+      if (!nativePrototype) {
+        throw new Error("NotSupportedError");
+      }
+      var newPrototype = Object.create(nativePrototype);
+      for (var i = prototypes.length - 1; i >= 0; i--) {
+        newPrototype = Object.create(newPrototype);
+      }
+      [ "createdCallback", "attachedCallback", "detachedCallback", "attributeChangedCallback" ].forEach(function(name) {
+        var f = prototype[name];
+        if (!f) return;
+        newPrototype[name] = function() {
+          if (!(wrap(this) instanceof CustomElementConstructor)) {
+            rewrap(this);
+          }
+          f.apply(wrap(this), arguments);
+        };
+      });
+      var p = {
+        prototype: newPrototype
+      };
+      if (extendsOption) p.extends = extendsOption;
+      function CustomElementConstructor(node) {
+        if (!node) {
+          if (extendsOption) {
+            return document.createElement(extendsOption, tagName);
+          } else {
+            return document.createElement(tagName);
+          }
+        }
+        setWrapper(node, this);
+      }
+      CustomElementConstructor.prototype = prototype;
+      CustomElementConstructor.prototype.constructor = CustomElementConstructor;
+      scope.constructorTable.set(newPrototype, CustomElementConstructor);
+      scope.nativePrototypeTable.set(prototype, newPrototype);
+      var nativeConstructor = originalRegisterElement.call(unwrap(this), tagName, p);
+      return CustomElementConstructor;
+    };
+    forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);
+  }
+  forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);
+  forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);
+  forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
+  mixin(Document.prototype, GetElementsByInterface);
+  mixin(Document.prototype, ParentNodeInterface);
+  mixin(Document.prototype, SelectorsInterface);
+  mixin(Document.prototype, NonElementParentNodeInterface);
+  mixin(Document.prototype, {
+    get implementation() {
+      var implementation = implementationTable.get(this);
+      if (implementation) return implementation;
+      implementation = new DOMImplementation(unwrap(this).implementation);
+      implementationTable.set(this, implementation);
+      return implementation;
+    },
+    get defaultView() {
+      return wrap(unwrap(this).defaultView);
+    }
+  });
+  registerWrapper(window.Document, Document, document.implementation.createHTMLDocument(""));
+  if (window.HTMLDocument) registerWrapper(window.HTMLDocument, Document);
+  wrapEventTargetMethods([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement ]);
+  function DOMImplementation(impl) {
+    setWrapper(impl, this);
+  }
+  var originalCreateDocument = document.implementation.createDocument;
+  DOMImplementation.prototype.createDocument = function() {
+    arguments[2] = unwrap(arguments[2]);
+    return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments));
+  };
+  function wrapImplMethod(constructor, name) {
+    var original = document.implementation[name];
+    constructor.prototype[name] = function() {
+      return wrap(original.apply(unsafeUnwrap(this), arguments));
+    };
+  }
+  function forwardImplMethod(constructor, name) {
+    var original = document.implementation[name];
+    constructor.prototype[name] = function() {
+      return original.apply(unsafeUnwrap(this), arguments);
+    };
+  }
+  wrapImplMethod(DOMImplementation, "createDocumentType");
+  wrapImplMethod(DOMImplementation, "createHTMLDocument");
+  forwardImplMethod(DOMImplementation, "hasFeature");
+  registerWrapper(window.DOMImplementation, DOMImplementation);
+  forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]);
+  scope.adoptNodeNoRemove = adoptNodeNoRemove;
+  scope.wrappers.DOMImplementation = DOMImplementation;
+  scope.wrappers.Document = Document;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var EventTarget = scope.wrappers.EventTarget;
+  var Selection = scope.wrappers.Selection;
+  var mixin = scope.mixin;
+  var registerWrapper = scope.registerWrapper;
+  var renderAllPending = scope.renderAllPending;
+  var unwrap = scope.unwrap;
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var wrap = scope.wrap;
+  var OriginalWindow = window.Window;
+  var originalGetComputedStyle = window.getComputedStyle;
+  var originalGetDefaultComputedStyle = window.getDefaultComputedStyle;
+  var originalGetSelection = window.getSelection;
+  function Window(impl) {
+    EventTarget.call(this, impl);
+  }
+  Window.prototype = Object.create(EventTarget.prototype);
+  OriginalWindow.prototype.getComputedStyle = function(el, pseudo) {
+    return wrap(this || window).getComputedStyle(unwrapIfNeeded(el), pseudo);
+  };
+  if (originalGetDefaultComputedStyle) {
+    OriginalWindow.prototype.getDefaultComputedStyle = function(el, pseudo) {
+      return wrap(this || window).getDefaultComputedStyle(unwrapIfNeeded(el), pseudo);
+    };
+  }
+  OriginalWindow.prototype.getSelection = function() {
+    return wrap(this || window).getSelection();
+  };
+  delete window.getComputedStyle;
+  delete window.getDefaultComputedStyle;
+  delete window.getSelection;
+  [ "addEventListener", "removeEventListener", "dispatchEvent" ].forEach(function(name) {
+    OriginalWindow.prototype[name] = function() {
+      var w = wrap(this || window);
+      return w[name].apply(w, arguments);
+    };
+    delete window[name];
+  });
+  mixin(Window.prototype, {
+    getComputedStyle: function(el, pseudo) {
+      renderAllPending();
+      return originalGetComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
+    },
+    getSelection: function() {
+      renderAllPending();
+      return new Selection(originalGetSelection.call(unwrap(this)));
+    },
+    get document() {
+      return wrap(unwrap(this).document);
+    }
+  });
+  if (originalGetDefaultComputedStyle) {
+    Window.prototype.getDefaultComputedStyle = function(el, pseudo) {
+      renderAllPending();
+      return originalGetDefaultComputedStyle.call(unwrap(this), unwrapIfNeeded(el), pseudo);
+    };
+  }
+  registerWrapper(OriginalWindow, Window, window);
+  scope.wrappers.Window = Window;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var unwrap = scope.unwrap;
+  var OriginalDataTransfer = window.DataTransfer || window.Clipboard;
+  var OriginalDataTransferSetDragImage = OriginalDataTransfer.prototype.setDragImage;
+  if (OriginalDataTransferSetDragImage) {
+    OriginalDataTransfer.prototype.setDragImage = function(image, x, y) {
+      OriginalDataTransferSetDragImage.call(this, unwrap(image), x, y);
+    };
+  }
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var registerWrapper = scope.registerWrapper;
+  var setWrapper = scope.setWrapper;
+  var unwrap = scope.unwrap;
+  var OriginalFormData = window.FormData;
+  if (!OriginalFormData) return;
+  function FormData(formElement) {
+    var impl;
+    if (formElement instanceof OriginalFormData) {
+      impl = formElement;
+    } else {
+      impl = new OriginalFormData(formElement && unwrap(formElement));
+    }
+    setWrapper(impl, this);
+  }
+  registerWrapper(OriginalFormData, FormData, new OriginalFormData());
+  scope.wrappers.FormData = FormData;
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var unwrapIfNeeded = scope.unwrapIfNeeded;
+  var originalSend = XMLHttpRequest.prototype.send;
+  XMLHttpRequest.prototype.send = function(obj) {
+    return originalSend.call(this, unwrapIfNeeded(obj));
+  };
+})(window.ShadowDOMPolyfill);
+
+(function(scope) {
+  "use strict";
+  var isWrapperFor = scope.isWrapperFor;
+  var elements = {
+    a: "HTMLAnchorElement",
+    area: "HTMLAreaElement",
+    audio: "HTMLAudioElement",
+    base: "HTMLBaseElement",
+    body: "HTMLBodyElement",
+    br: "HTMLBRElement",
+    button: "HTMLButtonElement",
+    canvas: "HTMLCanvasElement",
+    caption: "HTMLTableCaptionElement",
+    col: "HTMLTableColElement",
+    content: "HTMLContentElement",
+    data: "HTMLDataElement",
+    datalist: "HTMLDataListElement",
+    del: "HTMLModElement",
+    dir: "HTMLDirectoryElement",
+    div: "HTMLDivElement",
+    dl: "HTMLDListElement",
+    embed: "HTMLEmbedElement",
+    fieldset: "HTMLFieldSetElement",
+    font: "HTMLFontElement",
+    form: "HTMLFormElement",
+    frame: "HTMLFrameElement",
+    frameset: "HTMLFrameSetElement",
+    h1: "HTMLHeadingElement",
+    head: "HTMLHeadElement",
+    hr: "HTMLHRElement",
+    html: "HTMLHtmlElement",
+    iframe: "HTMLIFrameElement",
+    img: "HTMLImageElement",
+    input: "HTMLInputElement",
+    keygen: "HTMLKeygenElement",
+    label: "HTMLLabelElement",
+    legend: "HTMLLegendElement",
+    li: "HTMLLIElement",
+    link: "HTMLLinkElement",
+    map: "HTMLMapElement",
+    marquee: "HTMLMarqueeElement",
+    menu: "HTMLMenuElement",
+    menuitem: "HTMLMenuItemElement",
+    meta: "HTMLMetaElement",
+    meter: "HTMLMeterElement",
+    object: "HTMLObjectElement",
+    ol: "HTMLOListElement",
+    optgroup: "HTMLOptGroupElement",
+    option: "HTMLOptionElement",
+    output: "HTMLOutputElement",
+    p: "HTMLParagraphElement",
+    param: "HTMLParamElement",
+    pre: "HTMLPreElement",
+    progress: "HTMLProgressElement",
+    q: "HTMLQuoteElement",
+    script: "HTMLScriptElement",
+    select: "HTMLSelectElement",
+    shadow: "HTMLShadowElement",
+    source: "HTMLSourceElement",
+    span: "HTMLSpanElement",
+    style: "HTMLStyleElement",
+    table: "HTMLTableElement",
+    tbody: "HTMLTableSectionElement",
+    template: "HTMLTemplateElement",
+    textarea: "HTMLTextAreaElement",
+    thead: "HTMLTableSectionElement",
+    time: "HTMLTimeElement",
+    title: "HTMLTitleElement",
+    tr: "HTMLTableRowElement",
+    track: "HTMLTrackElement",
+    ul: "HTMLUListElement",
+    video: "HTMLVideoElement"
+  };
+  function overrideConstructor(tagName) {
+    var nativeConstructorName = elements[tagName];
+    var nativeConstructor = window[nativeConstructorName];
+    if (!nativeConstructor) return;
+    var element = document.createElement(tagName);
+    var wrapperConstructor = element.constructor;
+    window[nativeConstructorName] = wrapperConstructor;
+  }
+  Object.keys(elements).forEach(overrideConstructor);
+  Object.getOwnPropertyNames(scope.wrappers).forEach(function(name) {
+    window[name] = scope.wrappers[name];
+  });
+})(window.ShadowDOMPolyfill);
\ No newline at end of file
diff --git a/packages/web_components/lib/ShadowDOM.min.js b/packages/web_components/lib/ShadowDOM.min.js
new file mode 100644
index 0000000..5b3ca6a
--- /dev/null
+++ b/packages/web_components/lib/ShadowDOM.min.js
@@ -0,0 +1,13 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=k(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){B.value=n,A(e,t,B)}function s(e,t){var n=e.__proto__||Object.getPrototypeOf(e);if(U)try{k(n)}catch(r){n=n.__proto__}var o=R.get(n);if(o)return o;var i=s(n),a=E(i);return v(n,a,t),a}function c(e,t){m(e,t,!0)}function u(e,t){m(t,e,!1)}function l(e){return/^on[a-z]+$/.test(e)}function p(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function d(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return I&&p(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function h(e){return I&&p(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function w(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function m(t,n,r,o){for(var i=k(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){U&&t.__lookupGetter__(s);var c,u,p=w(t,s);if("function"!=typeof p.value){var m=l(s);c=m?e.getEventHandlerGetter(s):d(s),(p.writable||p.set||V)&&(u=m?e.getEventHandlerSetter(s):f(s));var g=V||p.configurable;A(n,s,{get:c,set:u,configurable:g,enumerable:p.enumerable})}else r&&(n[s]=h(s))}}}function g(e,t,n){if(null!=e){var r=e.prototype;v(r,t,n),o(t,e)}}function v(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&u(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return v(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}function M(e){return!S(e)}function T(e){if(null===e)return null;n(M(e));var t=e.__wrapper8e3dd93a60__;return null!=t?t:e.__wrapper8e3dd93a60__=new(s(e,e))(e)}function O(e){return null===e?null:(n(S(e)),e.__impl4cf1e782hg__)}function N(e){return e.__impl4cf1e782hg__}function j(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function L(e){return e&&S(e)?O(e):e}function _(e){return e&&!S(e)?T(e):e}function D(e,t){null!==t&&(n(M(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function C(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){C(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=_(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,P=new WeakMap,W=Object.create(null),I=t(),A=Object.defineProperty,k=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,B={value:void 0,configurable:!0,enumerable:!1,writable:!0};k(window);var U=/Firefox/.test(navigator.userAgent),q={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.addForwardingProperties=c,e.assert=n,e.constructorTable=R,e.defineGetter=C,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=p,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.oneOf=i,e.registerObject=y,e.registerWrapper=g,e.rewrap=D,e.setWrapper=j,e.unsafeUnwrap=N,e.unwrap=O,e.unwrapIfNeeded=L,e.wrap=T,e.wrapIfNeeded=_,e.wrappers=W}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),u=0;a>u;u++)c[u]=new Array(s),c[u][0]=u;for(var l=0;s>l;l++)c[0][l]=l;for(var u=1;a>u;u++)for(var l=1;s>l;l++)if(this.equals(e[t+l-1],r[o+u-1]))c[u][l]=c[u-1][l-1];else{var p=c[u-1][l]+1,d=c[u][l-1]+1;c[u][l]=d>p?p:d}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var u,l=e[t-1][n-1],p=e[t-1][n],d=e[t][n-1];u=d>p?l>p?p:l:l>d?d:l,u==l?(l==s?c.push(r):(c.push(o),s=l),t--,n--):u==p?(c.push(a),t--,s=p):(c.push(i),n--,s=d)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,u,l){var p=0,d=0,f=Math.min(s-n,l-u);if(0==n&&0==u&&(p=this.sharedPrefix(e,c,f)),s==e.length&&l==c.length&&(d=this.sharedSuffix(e,c,f-p)),n+=p,u+=p,s-=d,l-=d,s-n==0&&l-u==0)return[];if(n==s){for(var h=t(n,[],0);l>u;)h.removed.push(c[u++]);return[h]}if(u==l)return[t(n,[],s-n)];for(var w=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,u,l)),h=void 0,m=[],g=n,v=u,b=0;b<w.length;b++)switch(w[b]){case r:h&&(m.push(h),h=void 0),g++,v++;break;case o:h||(h=t(g,[],0)),h.addedCount++,g++,h.removed.push(c[v]),v++;break;case i:h||(h=t(g,[],0)),h.addedCount++,g++;break;case a:h||(h=t(g,[],0)),h.removed.push(c[v]),v++}return h&&m.push(h),m},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)(0,e[t])()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),u=document.createTextNode(s);c.observe(u,{characterData:!0}),r=function(){s=(s+1)%2,u.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),w||(l(n),w=!0))}function n(){for(w=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new d.NodeList,this.removedNodes=new d.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var u=0;u<c.length;u++){var l=c[u],p=l.options;if((s===e||p.subtree)&&("attributes"!==n||p.attributes)&&("attributes"!==n||!p.attributeFilter||null===o.namespace&&-1!==p.attributeFilter.indexOf(o.name))&&("characterData"!==n||p.characterData)&&("childList"!==n||p.childList)){var d=l.observer;i[d.uid_]=d,("attributes"===n&&p.attributeOldValue||"characterData"===n&&p.characterDataOldValue)&&(a[d.uid_]=o.oldValue)}}}for(var h in i){var d=i[h],w=new r(n,e);"name"in o&&"namespace"in o&&(w.attributeName=o.name,w.attributeNamespace=o.namespace),o.addedNodes&&(w.addedNodes=o.addedNodes),o.removedNodes&&(w.removedNodes=o.removedNodes),o.previousSibling&&(w.previousSibling=o.previousSibling),o.nextSibling&&(w.nextSibling=o.nextSibling),void 0!==a[h]&&(w.oldValue=a[h]),t(d),d.records_.push(w)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,"attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?this.attributes=!!e.attributes:this.attributes=!0,"characterDataOldValue"in e&&!("characterData"in e)?this.characterData=!0:this.characterData=!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=m.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++g,this.scheduled_=!1}function u(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var l=e.setEndOfMicrotask,p=e.wrapIfNeeded,d=e.wrappers,f=new WeakMap,h=[],w=!1,m=Array.prototype.slice,g=0;c.prototype={constructor:c,observe:function(e,t){e=p(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new u(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},u.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var u=a(c);if(u&&u.length>0){for(var l=0;l<u.length;l++){var d=u[l];if(i(d)){var f=n(d),h=f.olderShadowRoot;h&&s.push(h)}s.push(d)}c=u[u.length-1]}else if(t(c)){if(p(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=u(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function u(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function l(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=u(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var l=0;l<s.length;l++){var p=s[l];if(A(p)===c)return p}return null}function p(e,t){return A(e)===A(t)}function d(e){if(!X.get(e)&&(X.set(e,!0),h(V(e),V(e.target)),W)){var t=W;throw W=null,t}}function f(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function h(t,n){if(K.get(t))throw new Error("InvalidStateError");K.set(t,!0),e.renderAllPending();var o,i,a;if(f(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),w(t,o,a,i)&&m(t,o,a,i)&&g(t,o,a,i),J.set(t,re),$["delete"](t,null),K["delete"](t),t.defaultPrevented}function w(e,t,n,r){var o=oe;if(n&&!v(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!v(t[i],e,o,t,r))return!1;return!0}function m(e,t,n,r){var o=ie,i=t[0]||n;return v(i,e,o,t,r)}function g(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!v(t[i],e,o,t,r))return;n&&t.length>0&&v(n,e,o,t,r)}function v(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),u=c.relatedTarget;if(u){if(u instanceof Object&&u.addEventListener){var p=V(u),d=l(t,e,p);if(d===a)return!0}else d=null;Z.set(t,d)}}J.set(t,n);var f=t.type,h=!1;Y.set(t,a),$.set(t,e),i.depth++;for(var w=0,m=i.length;m>w;w++){var g=i[w];if(g.removed)h=!0;else if(!(g.type!==f||!g.capture&&n===oe||g.capture&&n===ae))try{if("function"==typeof g.handler?g.handler.call(e,t):g.handler.handleEvent(t),ee.get(t))return!1}catch(v){W||(W=v)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var w=0;w<b.length;w++)b[w].removed||i.push(b[w])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return be||"beforeunload"!==n.type||this instanceof O?void B(n,this):new O(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}function S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void B(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&k(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function M(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(ge)return new e(n,E(r));var o=q(document.createEvent(t)),i=me[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t].apply(o,a),o}function O(e){y.call(this,e)}function N(e){return"function"==typeof e?!0:e&&e.handleEvent}function j(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function L(e){B(e,this)}function _(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e)}function D(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function C(e,t){for(var n=q(e);n;n=n.parentNode)if(D(V(n),t))return!0;return!1}function H(e){I(e,Ee)}function x(t,n,o,i){e.renderAllPending();var a=V(Se.call(U(n),o,i));if(!a)return null;var c=r(a,null),u=c.lastIndexOf(t);return-1==u?null:(c=c.slice(0,u),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var W,I=e.forwardMethodsToWrapper,A=e.getTreeScope,k=e.mixin,F=e.registerWrapper,B=e.setWrapper,U=e.unsafeUnwrap,q=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),X=new WeakMap,K=new WeakMap,Y=new WeakMap,$=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return Y.get(this)},get currentTarget(){return $.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}};var ce=function(){var e=document.createEvent("Event");return e.initEvent("test",!0,!0),e.preventDefault(),e.defaultPrevented}();ce||(y.prototype.preventDefault=function(){this.cancelable&&(U(this).preventDefault(),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}),F(se,y,document.createEvent("Event"));var ue=S("UIEvent",y),le=S("CustomEvent",y),pe={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},de=k({initMouseEvent:M("initMouseEvent",14)},pe),fe=k({initFocusEvent:M("initFocusEvent",5)},pe),he=S("MouseEvent",ue,de),we=S("FocusEvent",ue,fe),me=Object.create(null),ge=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!ge){var ve=function(e,t,n){if(n){var r=me[n];t=k(k({},r),t)}me[e]=t};ve("Event",{bubbles:!1,cancelable:!1}),ve("CustomEvent",{detail:null},"Event"),ve("UIEvent",{view:null,detail:0},"Event"),ve("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ve("FocusEvent",{relatedTarget:null},"UIEvent")}var be=window.BeforeUnloadEvent;O.prototype=Object.create(y.prototype),k(O.prototype,{get returnValue(){return U(this).returnValue},set returnValue(e){U(this).returnValue=e}}),be&&F(be,O);var ye=window.EventTarget,Ee=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;Ee.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),L.prototype={addEventListener:function(e,t,n){if(N(t)&&!j(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=_(this);a.addEventListener_(e,d,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=_(this);s.removeEventListener_(e,d,!0)}}},dispatchEvent:function(t){var n=q(t),r=n.type;X.set(n,!1),e.renderAllPending();var o;C(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},ye&&F(ye,L);var Se=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=O,e.wrappers.CustomEvent=le,e.wrappers.Event=y,e.wrappers.EventTarget=L,e.wrappers.FocusEvent=we,e.wrappers.MouseEvent=he,e.wrappers.UIEvent=ue}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,w)}function n(e){u(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,u=e.setWrapper,l=e.unsafeUnwrap,p=e.wrap,d=window.TouchEvent;if(d){var f;try{f=document.createEvent("TouchEvent")}catch(h){return}var w={enumerable:!1};n.prototype={get target(){return p(l(this).target)}};var m={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){m.get=function(){return l(this)[e]},Object.defineProperty(n.prototype,e,m)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(l(this).touches)},get targetTouches(){return o(l(this).targetTouches)},get changedTouches(){return o(l(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(d,i,f),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){N(e instanceof S)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){L(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){L(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);B=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;B=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function u(e,t){R(e,t),e.nodeIsInserted_()}function l(e,t){for(var n=_(t),r=0;r<e.length;r++)u(e[r],n)}function p(e){R(e,new O(e,null))}function d(e){for(var t=0;t<e.length;t++)p(e[t])}function f(e,t){var n=e.nodeType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function w(e,t){h(e,t);var n=t.length;if(1===n)return W(t[0]);for(var r=W(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(W(t[o]));return r}function m(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function g(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){N(t.parentNode===e);var n=t.nextSibling,r=W(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=W(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function v(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?U.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||_(e)!==_(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function S(e){N(e instanceof V),M.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var M=e.wrappers.EventTarget,T=e.wrappers.NodeList,O=e.TreeScope,N=e.assert,j=e.defineWrapGetter,L=e.enqueueMutation,_=e.getTreeScope,D=e.isWrapper,C=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,W=e.unwrap,I=e.unwrapIfNeeded,A=e.wrap,k=e.wrapIfNeeded,F=e.wrappers,B=!1,U=document.importNode,q=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),X=V.prototype.isEqualNode,K=V.prototype.insertBefore,Y=V.prototype.removeChild,$=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{Y.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){Y.call(e,t)};S.prototype=Object.create(M.prototype),C(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?D(n)?r=W(n):(r=n,n=A(r)):(n=null,r=null),n&&N(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!v(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),m(this),K.call(P(this),W(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var u=r?r.parentNode:P(this);u?K.call(u,w(this,o),r):h(this,o)}return L(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),l(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=W(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,u=this.lastChild,l=i.parentNode;l&&J(l,i),c===e&&(this.firstChild_=a),u===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else m(this),J(P(this),i);return B||L(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(D(r)?o=W(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,u=r.previousSibling,d=!this.invalidateShadowRenderer()&&!v(e);return d?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,u,c)),d?(f(this,e),m(this),$.call(P(this),W(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&$.call(o.parentNode,w(this,s),o)),L(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:u}),p(r),l(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(P(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(P(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(P(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(P(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(P(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(g(this),""!==e){var n=P(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else m(this),P(this).textContent=e;var r=c(this.childNodes);L(this,"childList",{addedNodes:r,removedNodes:t}),d(t),l(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,k(e))},compareDocumentPosition:function(e){return z.call(P(this),I(e))},isEqualNode:function(e){return X.call(P(this),I(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),j(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S.prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=C(Object.create(M.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=u,e.nodeWasRemoved=p,e.nodesWereAdded=l,e.nodesWereRemoved=d,e.originalInsertBefore=K,e.originalRemoveChild=Y,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=b(t[s]),!o&&(a=g(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===D}function s(){return!0}function c(e,t,n){return e.localName===n}function u(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function p(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=p(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,null);if(c instanceof L)s=M.call(c,i);else{if(!(c instanceof _))return p(this,r,o,n,i,null);s=S.call(c,i)}return t(s,r,o,a)}function f(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function h(n,r,o,i,a){var s,c=v(this),u=g(this).root;if(u instanceof e.wrappers.ShadowRoot)return p(this,r,o,n,i,a);if(c instanceof L)s=j.call(c,i,a);else{if(!(c instanceof _))return p(this,r,o,n,i,a);s=N.call(c,i,a)}return t(s,r,o,!1)}var w=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,g=e.getTreeScope,v=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,S=document.querySelectorAll,M=document.documentElement.querySelectorAll,T=document.getElementsByTagName,O=document.documentElement.getElementsByTagName,N=document.getElementsByTagNameNS,j=document.documentElement.getElementsByTagNameNS,L=window.Element,_=window.HTMLDocument||window.Document,D="http://www.w3.org/1999/xhtml",C={querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=v(this),c=g(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof L)a=b(E.call(s,t));else{if(!(s instanceof _))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=g(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new m;return o.length=d.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(v(this),t)}},x={getElementsByTagName:function(e){var t=new w,n="*"===e?s:a;return t.length=f.call(this,n,0,t,e,e.toLowerCase()),
+t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new w,r=null;return r="*"===e?"*"===t?s:c:"*"===t?u:l,n.length=h.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=C,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,u,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){l(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,u=e.MatchesInterface,l=(e.addWrapNodeListMethod,e.enqueueMutation),p=e.mixin,d=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,w=window.Element,m=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return w.prototype[e]}),g=m[0],v=w.prototype[g],b=new WeakMap;r.prototype=Object.create(a.prototype),p(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=f(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),m.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),w.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),p(r.prototype,o),p(r.prototype,i),p(r.prototype,s),p(r.prototype,c),p(r.prototype,u),d(w,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=m,e.originalMatches=v,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(j,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e){if(e.namespaceURI!==C)return!0;var t=e.ownerDocument.doctype;return t&&t.publicId&&t.systemId}function a(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,a=e.tagName.toLowerCase(),c="<"+a,u=e.attributes,l=0;o=u[l];l++)c+=" "+o.name+'="'+n(o.value)+'"';return _[a]?(i(e)&&(c+="/"),c+">"):c+">"+s(e)+"</"+a+">";case Node.TEXT_NODE:var p=e.data;return t&&D[t.localName]?p:r(p);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof N.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(O(i))}function u(e){w.call(this,e)}function l(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return O(o)}function p(t){return function(){return e.renderAllPending(),M(this)[t]}}function d(e){m(u,e,p(e))}function f(t){Object.defineProperty(u.prototype,t,{get:p(t),set:function(n){e.renderAllPending(),M(this)[t]=n},configurable:!0,enumerable:!0})}function h(t){Object.defineProperty(u.prototype,t,{value:function(){return e.renderAllPending(),M(this)[t].apply(M(this),arguments)},configurable:!0,enumerable:!0})}var w=e.wrappers.Element,m=e.defineGetter,g=e.enqueueMutation,v=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,S=e.snapshotNodeList,M=e.unsafeUnwrap,T=e.unwrap,O=e.wrap,N=e.wrappers,j=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,_=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),D=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),C="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;u.prototype=Object.create(w.prototype),v(u.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&D[this.localName])return void(this.textContent=e);var t=S(this.childNodes);this.invalidateShadowRenderer()?this instanceof N.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof N.HTMLTemplateElement?c(this.content,e):M(this).innerHTML=e;var n=S(this.childNodes);g(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(f),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(h),E(x,u,document.createElement("b")),e.wrappers.HTMLElement=u,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=p.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);p.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!d){var t=n(e);l.set(this,u(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.wrap,l=new WeakMap,p=new WeakMap,d=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return d?u(s(this).content):l.get(this)}}),d&&a(d,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,u=e.wrap,l=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return u(c(this).form)}}),a(l,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Element,r=e.wrappers.HTMLElement,o=e.registerWrapper,i=(e.defineWrapGetter,e.unsafeUnwrap),a=e.wrap,s=e.mixin,c="http://www.w3.org/2000/svg",u=window.SVGElement,l=document.createElementNS(c,"title");if(!("classList"in l)){var p=Object.getOwnPropertyDescriptor(n.prototype,"classList");Object.defineProperty(r.prototype,"classList",p),delete n.prototype.classList}t.prototype=Object.create(n.prototype),s(t.prototype,{get ownerSVGElement(){return a(i(this).ownerSVGElement)}}),o(u,t,document.createElementNS(c,"title")),e.wrappers.SVGElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){d.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),u=document.createElementNS(s,"use"),l=c.constructor,p=Object.getPrototypeOf(l.prototype),d=p.constructor;t.prototype=Object.create(p),"instanceRoot"in u&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,u),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(u,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){i(e,this)}var n=e.addForwardingProperties,r=e.mixin,o=e.registerWrapper,i=e.setWrapper,a=e.unsafeUnwrap,s=e.unwrapIfNeeded,c=e.wrap,u=window.WebGLRenderingContext;if(u){r(t.prototype,{get canvas(){return c(a(this).canvas)},texImage2D:function(){arguments[5]=s(arguments[5]),a(this).texImage2D.apply(a(this),arguments)},texSubImage2D:function(){arguments[6]=s(arguments[6]),a(this).texSubImage2D.apply(a(this),arguments)}});var l=Object.getPrototypeOf(u.prototype);l!==Object.prototype&&n(l,t.prototype);var p=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};o(u,t,p),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Node,r=e.GetElementsByInterface,o=e.NonElementParentNodeInterface,i=e.ParentNodeInterface,a=e.SelectorsInterface,s=e.mixin,c=e.registerObject,u=e.registerWrapper,l=window.DocumentFragment;t.prototype=Object.create(n.prototype),s(t.prototype,i),s(t.prototype,a),s(t.prototype,r),s(t.prototype,o),u(l,t,document.createDocumentFragment()),e.wrappers.DocumentFragment=t;var p=c(document.createComment(""));e.wrappers.Comment=p}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(l(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;h.set(this,o),this.treeScope_=new r(this,a(o||e)),f.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,u=e.setInnerHTML,l=e.unsafeUnwrap,p=e.unwrap,d=e.wrap,f=new WeakMap,h=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){u(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return h.get(this)||null},get host(){return f.get(this)||null},invalidateShadowRenderer:function(){return f.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getSelection:function(){return document.getSelection()},get activeElement(){var e=p(this).ownerDocument.activeElement;if(!e||!e.nodeType)return null;for(var t=d(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=p(e).root;return t instanceof f?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=l(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,u=e.unwrapIfNeeded,l=e.wrap,p=e.getTreeScope,d=window.Range,f=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(u(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(u(e),t)},setStartBefore:function(e){s(this).setStartBefore(u(e))},setStartAfter:function(e){s(this).setStartAfter(u(e))},setEndBefore:function(e){s(this).setEndBefore(u(e))},setEndAfter:function(e){s(this).setEndAfter(u(e))},selectNode:function(e){s(this).selectNode(u(e))},selectNodeContents:function(e){s(this).selectNodeContents(u(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return l(s(this).extractContents())},cloneContents:function(){return l(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(u(e))},surroundContents:function(e){s(this).surroundContents(u(e))},cloneRange:function(){return l(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(u(e),t)},comparePoint:function(e,t){return s(this).comparePoint(u(e),t)},intersectsNode:function(e){return s(this).intersectsNode(u(e))},toString:function(){return s(this).toString()}},d.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return l(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var u=R(a.lastChild);u&&(u.nextSibling_=u.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){W.set(e,[])}function i(e){var t=W.get(e);return t||W.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function u(e){var t=A.get(e);return t||(t=new f(e),A.set(e,t)),t}function l(e){var t=D(e).root;return t instanceof _?t:null}function p(e){return u(e.host)}function d(e){this.skip=!1,this.node=e,this.childNodes=[]}function f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function w(e){if(e instanceof j)return e;if(e instanceof N)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=w(t);if(n)return n}return null}function m(e,t){i(t).push(e);var n=I.get(e);n?n.push(t):I.set(e,[t])}function g(e){return I.get(e)}function v(e){I.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof O))return!1;if(!U.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=g(t);return n&&n[n.length-1]===e}function E(e){return e instanceof N||e instanceof j}function S(e){return e.shadowRoot}function M(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,O=e.wrappers.Element,N=e.wrappers.HTMLContentElement,j=e.wrappers.HTMLShadowElement,L=e.wrappers.Node,_=e.wrappers.ShadowRoot,D=(e.assert,e.getTreeScope),C=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,W=new WeakMap,I=new WeakMap,A=new WeakMap,k=C(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],B=new P;B.equals=function(e,t){return x(e.node)===t},d.prototype={append:function(e){var t=new d(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=B.calculateSplices(o,i),u=0,l=0,p=0,d=0;d<c.length;d++){for(var f=c[d];p<f.index;p++)l++,o[u++].sync(s);for(var h=f.removed.length,w=0;h>w;w++){var m=R(i[l++]);s.get(m)||r(m)}for(var g=f.addedCount,v=i[l]&&R(i[l]),w=0;g>w;w++){var b=o[u++],y=b.node;n(t,y,v),s.set(y,!0),b.sync(s)}p+=g}for(var d=p;d<o.length;d++)o[d].sync(s)}}},f.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new d(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return D(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[k](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):v(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(S(e)){for(var t=e,n=h(t),r=M(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=w(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)m(n[c],a)}this.distributionResolution(i)}}for(var u=e.firstChild;u;u=u.nextSibling)this.distributionResolution(u)},poolDistribution:function(e,t){if(!(e instanceof j))if(e instanceof N){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(m(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)m(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(S(t)){var a=u(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var U=/^(:not\()?[*.#[a-zA-Z_|]/;L.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return t?(t.invalidate(),!0):!1},N.prototype.getDistributedNodes=j.prototype.getDistributedNodes=function(){return s(),i(this)},O.prototype.getDestinationInsertionPoints=function(){return s(),g(this)||[]},N.prototype.nodeIsInserted_=j.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=l(this);t&&(e=p(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=u,e.getShadowTrees=M,e.renderAllPending=s,e.getDestinationInsertionPoints=g,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(e instanceof ShadowRoot?o(e.host):a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){l.call(this,e),this.treeScope_=new m(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return D(n.apply(L(this),arguments))}}function r(e,t){x.call(L(t),_(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof w&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){j(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return D(n.apply(L(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(L(this),arguments)}}var u=e.GetElementsByInterface,l=e.wrappers.Node,p=e.ParentNodeInterface,d=e.NonElementParentNodeInterface,f=e.wrappers.Selection,h=e.SelectorsInterface,w=e.wrappers.ShadowRoot,m=e.TreeScope,g=e.cloneNode,v=e.defineGetter,b=e.defineWrapGetter,y=e.elementFromPoint,E=e.forwardMethodsToWrapper,S=e.matchesNames,M=e.mixin,T=e.registerWrapper,O=e.renderAllPending,N=e.rewrap,j=e.setWrapper,L=e.unsafeUnwrap,_=e.unwrap,D=e.wrap,C=e.wrapEventTargetMethods,H=(e.wrapNodeList,
+new WeakMap);t.prototype=Object.create(l.prototype),b(t,"documentElement"),b(t,"body"),b(t,"head"),v(t,"activeElement",function(){var e=_(this).activeElement;if(!e||!e.nodeType)return null;for(var t=D(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var x=document.adoptNode,R=document.getSelection;M(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return y(this,this,e,t)},importNode:function(e,t){return g(e,t,L(this))},getSelection:function(){return O(),new f(R.call(_(this)))},getElementsByName:function(e){return h.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var P=document.createTreeWalker,W=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(D(e))}}:"function"==typeof n&&(o=function(e){return n(D(e))})),new W(P.call(_(this),_(e),t,o,r))},document.registerElement){var I=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void j(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var u=Object.create(a),l=c.length-1;l>=0;l--)u=Object.create(u);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(u[e]=function(){D(this)instanceof r||N(this),t.apply(D(this),arguments)})});var p={prototype:u};i&&(p["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(u,r),e.nativePrototypeTable.set(o,u);I.call(_(this),t,p);return r},E([window.HTMLDocument||window.Document],["registerElement"])}E([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),E([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],S),E([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),M(t.prototype,u),M(t.prototype,p),M(t.prototype,h),M(t.prototype,d),M(t.prototype,{get implementation(){var e=H.get(this);return e?e:(e=new a(_(this).implementation),H.set(this,e),e)},get defaultView(){return D(_(this).defaultView)}}),T(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&T(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var A=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=_(arguments[2]),D(A.apply(L(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),T(window.DOMImplementation,a),E([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,u=e.wrap,l=window.Window,p=window.getComputedStyle,d=window.getDefaultComputedStyle,f=window.getSelection;t.prototype=Object.create(n.prototype),l.prototype.getComputedStyle=function(e,t){return u(this||window).getComputedStyle(c(e),t)},d&&(l.prototype.getDefaultComputedStyle=function(e,t){return u(this||window).getDefaultComputedStyle(c(e),t)}),l.prototype.getSelection=function(){return u(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){l.prototype[e]=function(){var t=u(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),p.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call(s(this)))},get document(){return u(s(this).document)}}),d&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),d.call(s(this),c(e),t)}),i(l,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill);
\ No newline at end of file
diff --git a/packages/web_components/lib/bower.json b/packages/web_components/lib/bower.json
new file mode 100644
index 0000000..7603c35
--- /dev/null
+++ b/packages/web_components/lib/bower.json
@@ -0,0 +1,21 @@
+{
+  "name": "webcomponentsjs",
+  "main": "webcomponents.js",
+  "version": "0.7.21",
+  "homepage": "http://webcomponents.org",
+  "authors": [
+    "The Polymer Authors"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/webcomponents/webcomponentsjs.git"
+  },
+  "keywords": [
+    "webcomponents"
+  ],
+  "license": "BSD",
+  "ignore": [],
+  "devDependencies": {
+    "web-component-tester": "^4.0.1"
+  }
+}
diff --git a/packages/web_components/lib/build.log b/packages/web_components/lib/build.log
index d640c60..5929e73 100644
--- a/packages/web_components/lib/build.log
+++ b/packages/web_components/lib/build.log
@@ -1,47 +1,448 @@
 BUILD LOG
 ---------
-Build Time: 2014-10-07T18:03:14
+Build Time: 2016-02-18T16:57:00-0800
 
 NODEJS INFORMATION
 ==================
-nodejs: v0.10.21
-chai: 1.9.0
-grunt: 0.4.2
-grunt-audit: 0.0.2
-grunt-concat-sourcemap: 0.4.1
-grunt-contrib-concat: 0.3.0
-grunt-contrib-uglify: 0.3.2
-grunt-contrib-yuidoc: 0.5.1
-grunt-karma: 0.6.2
-karma: 0.10.9
-karma-chrome-launcher: 0.1.2
-karma-coffee-preprocessor: 0.1.3
-karma-crbot-reporter: 0.0.4
-karma-firefox-launcher: 0.1.3
-karma-html2js-preprocessor: 0.1.0
-karma-ie-launcher: 0.1.1
-karma-jasmine: 0.1.5
-karma-mocha: 0.1.1
-karma-phantomjs-launcher: 0.1.2
-karma-requirejs: 0.2.1
-karma-safari-launcher: 0.1.1
-karma-script-launcher: 0.1.0
-mocha: 1.17.1
-requirejs: 2.1.11
+nodejs: v5.6.0
+accepts: 1.2.13
+accessibility-developer-tools: 2.10.0
+after: 0.8.1
+adm-zip: 0.4.7
+ansi-regex: 2.0.0
+align-text: 0.1.4
+ansi-styles: 2.1.0
+append-field: 0.1.0
+archiver: 0.14.4
+archy: 1.0.0
+array-differ: 1.0.0
+array-find-index: 1.0.1
+array-flatten: 1.1.1
+array-uniq: 1.0.2
+arraybuffer.slice: 0.0.6
+asap: 2.0.3
+asn1: 0.1.11
+assert-plus: 0.1.5
+async: 0.9.2
+assertion-error: 1.0.1
+aws-sign2: 0.5.0
+aws4: 1.2.1
+backo2: 1.0.2
+backoff: 2.4.1
+balanced-match: 0.3.0
+base64-arraybuffer: 0.1.2
+base64-js: 0.0.8
+base64id: 0.1.0
+beeper: 1.1.0
+benchmark: 1.0.0
+better-assert: 1.0.2
+binary: 0.3.0
+blob: 0.0.4
+bl: 0.9.5
+bluebird: 2.10.2
+body-parser: 1.15.0
+boom: 0.4.2
+brace-expansion: 1.1.3
+buffer-crc32: 0.2.5
+browserstack: 1.3.1
+builtin-modules: 1.1.1
+buffers: 0.1.1
+bunyan: 1.6.0
+busboy: 0.2.12
+bytes: 2.2.0
+camelcase: 2.1.0
+callsite: 1.0.0
+camelcase-keys: 2.0.0
+center-align: 0.1.3
+capture-stack-trace: 1.0.0
+caseless: 0.8.0
+chai: 3.5.0
+chainsaw: 0.1.0
+chalk: 1.1.1
+cleankill: 1.0.2
+cliui: 2.1.0
+clone: 1.0.2
+clone-stats: 0.0.1
+commander: 2.3.0
+combined-stream: 0.0.7
+component-bind: 1.0.0
+component-inherit: 0.0.3
+component-emitter: 1.1.2
+concat-map: 0.0.1
+compress-commons: 0.2.9
+concat-stream: 1.5.1
+concat-with-sourcemaps: 1.0.4
+content-disposition: 0.5.1
+configstore: 1.4.0
+content-type: 1.0.1
+cookie: 0.1.5
+core-util-is: 1.0.2
+cookie-signature: 1.0.6
+crc: 3.2.1
+crc32-stream: 0.3.4
+create-error-class: 2.0.1
+cryptiles: 0.2.2
+csv: 0.4.6
+csv-parse: 1.0.1
+csv-generate: 0.0.6
+csv-stringify: 0.0.8
+dashdash: 1.13.0
+ctype: 0.5.3
+dateformat: 1.0.12
+debug: 2.2.0
+deap: 1.0.0
+debuglog: 1.0.1
+decamelize: 1.1.2
+deep-extend: 0.4.1
+deep-eql: 0.1.3
+defaults: 1.0.3
+deprecated: 0.0.1
+depd: 1.1.0
+delayed-stream: 0.0.5
+destroy: 1.0.4
+dezalgo: 1.0.3
+dicer: 0.2.5
+diff: 1.4.0
+dtrace-provider: 0.6.0
+duplexer2: 0.0.2
+ecc-jsbn: 0.1.1
+ee-first: 1.1.1
+end-of-stream: 0.1.5
+engine.io: 1.6.8
+engine.io-client: 1.6.8
+engine.io-parser: 1.2.4
+error-ex: 1.3.0
+escape-html: 1.0.3
+escape-regexp-component: 1.0.2
+escape-string-regexp: 1.0.4
+express: 4.13.4
+etag: 1.7.0
+extend: 2.0.1
+extsprintf: 1.2.0
+fancy-log: 1.2.0
+finalhandler: 0.4.1
+find-up: 1.1.0
+findup-sync: 0.3.0
+find-index: 0.1.1
+flagged-respawn: 0.3.1
+first-chunk-stream: 1.0.0
+formatio: 1.1.1
+form-data: 0.2.0
+forever-agent: 0.5.2
+formidable: 1.0.17
+freeport: 1.0.5
+fresh: 0.3.0
+forwarded: 0.1.0
+fstream: 0.1.31
+gaze: 0.5.2
+generate-function: 2.0.0
+generate-object-property: 1.2.0
+get-stdin: 4.0.1
+github-url-from-username-repo: 1.0.2
+glob: 5.0.15
+github-url-from-git: 1.4.0
+glob-watcher: 0.0.6
+glob-stream: 3.1.18
+glob2base: 0.0.12
+globule: 0.1.0
+glogg: 1.0.0
+got: 5.4.1
+graceful-fs: 4.1.3
+graceful-readlink: 1.0.1
+gulp: 3.9.1
+growl: 1.8.1
+gulp-audit: 1.0.0
+gulp-uglify: 1.5.2
+gulp-concat: 2.6.0
+gulp-util: 3.0.7
+gulp-header: 1.7.1
+gulplog: 1.0.0
+has-ansi: 2.0.0
+has-color: 0.1.7
+har-validator: 2.0.6
+has-binary: 0.1.7
+has-gulplog: 0.1.0
+has-cors: 1.1.0
+hoek: 0.9.1
+hawk: 1.1.1
+hosted-git-info: 2.1.4
+http-errors: 1.4.0
+iconv-lite: 0.4.13
+http-signature: 0.11.0
+indent-string: 2.1.0
+imurmurhash: 0.1.4
+inflight: 1.0.4
+indexof: 0.0.1
+inherits: 2.0.1
+ini: 1.3.4
+interpret: 1.0.0
+ipaddr.js: 1.0.5
+is-absolute: 0.1.7
+is-buffer: 1.1.2
+is-arrayish: 0.2.1
+is-builtin-module: 1.0.0
+is-my-json-valid: 2.13.0
+is-finite: 1.0.1
+is-npm: 1.0.0
+is-plain-obj: 1.1.0
+is-property: 1.0.2
+is-relative: 0.1.3
+is-redirect: 1.0.0
+is-retry-allowed: 1.0.0
+is-stream: 1.0.1
+is-typedarray: 1.0.0
+isexe: 1.1.2
+is-utf8: 0.2.1
+isarray: 0.0.1
+isobject: 2.0.0
+isstream: 0.1.2
+jade: 0.26.3
+jju: 1.2.1
+jodid25519: 1.0.2
+jsbn: 0.1.0
+json-schema: 0.2.2
+json-stringify-safe: 5.0.1
+json-parse-helpfulerror: 1.0.3
+json3: 3.2.6
+jsonpointer: 2.0.0
+jsprim: 1.2.2
+kind-of: 3.0.2
+keep-alive-agent: 0.0.1
+launchpad: 0.5.1
+latest-version: 2.0.0
+lazy-cache: 1.0.3
+liftoff: 2.2.0
+lazystream: 0.1.0
+load-json-file: 1.1.0
+lodash._basecopy: 3.0.1
+lodash: 1.0.2
+lodash._basetostring: 3.0.1
+lodash._basevalues: 3.0.0
+lodash._getnative: 3.9.1
+lodash._isiterateecall: 3.0.9
+lodash._reescape: 3.0.0
+lodash._reinterpolate: 3.0.0
+lodash._root: 3.0.1
+lodash._reevaluate: 3.0.0
+lodash.isarguments: 3.0.7
+lodash.escape: 3.2.0
+lodash.keys: 3.1.2
+lodash.isarray: 3.0.4
+lodash.restparam: 3.6.1
+lodash.template: 3.6.2
+lodash.templatesettings: 3.1.1
+longest: 1.0.1
+lolex: 1.3.2
+lowercase-keys: 1.0.0
+loud-rejection: 1.3.0
+lru-cache: 2.7.3
+map-obj: 1.0.1
+media-typer: 0.3.0
+match-stream: 0.0.2
+meow: 3.7.0
+methods: 1.1.2
+merge-descriptors: 1.0.1
+mime: 1.3.4
+mime-types: 2.1.10
+mime-db: 1.22.0
+minimatch: 3.0.0
+minimist: 1.2.0
+mkdirp: 0.5.1
+mocha: 2.4.5
+moment: 2.11.2
+ms: 0.7.1
+multer: 1.1.0
+multipipe: 0.1.2
+mv: 2.1.1
+nan: 2.2.0
+ncp: 2.0.0
+negotiator: 0.5.3
+node-int64: 0.3.3
+node-uuid: 1.4.7
+node-status-codes: 1.0.0
+nomnom: 1.8.1
+normalize-package-data: 2.3.5
+number-is-nan: 1.0.0
+oauth-sign: 0.5.0
+object-assign: 3.0.0
+on-finished: 2.3.0
+object-component: 0.0.3
+once: 1.3.3
+options: 0.0.6
+orchestrator: 0.3.7
+os-homedir: 1.0.1
+ordered-read-streams: 0.1.0
+osenv: 0.1.3
+over: 0.0.5
+os-tmpdir: 1.0.1
+package-json: 2.3.1
+parse-json: 2.2.0
+parseqs: 0.0.2
+parsejson: 0.0.1
+parseuri: 0.0.4
+path-exists: 2.1.0
+parseurl: 1.3.1
+path-to-regexp: 0.1.7
+path-is-absolute: 1.0.0
+path-type: 1.1.0
+pify: 2.3.0
+pinkie: 2.0.4
+plist: 1.2.0
+pinkie-promise: 2.0.0
+precond: 0.2.3
+prepend-http: 1.0.3
+pretty-hrtime: 1.0.2
+progress: 1.1.8
+process-nextick-args: 1.0.6
+proxy-addr: 1.0.10
+pullstream: 0.4.1
+qs: 6.1.0
+range-parser: 1.0.3
+q: 1.4.1
+raw-body: 2.1.5
+read-all-stream: 3.1.0
+rc: 1.1.6
+read-package-json: 1.3.3
+read-installed: 3.1.5
+read-pkg: 1.1.0
+read-pkg-up: 1.0.1
+readable-stream: 1.1.13
+rechoir: 0.6.2
+readdir-scoped-modules: 1.0.2
+redent: 1.0.0
+registry-url: 3.0.3
+repeat-string: 1.5.2
+request: 2.51.0
+repeating: 2.0.0
+replace-ext: 0.0.1
+resolve: 1.1.7
+restify: 4.0.4
+rimraf: 2.4.5
+right-align: 0.1.3
+safe-json-stringify: 1.0.3
+run-sequence: 1.1.5
+sauce-connect-launcher: 0.14.0
+send: 0.11.1
+samsam: 1.1.2
+selenium-standalone: 4.9.0
+semver: 4.3.6
+semver-diff: 2.1.0
+serve-static: 1.10.2
+server-destroy: 1.0.1
+sequencify: 0.0.7
+serve-waterfall: 1.1.1
+setimmediate: 1.0.4
+sigmund: 1.0.1
+signal-exit: 2.1.2
+sinon: 1.17.3
+sinon-chai: 2.8.0
+slice-stream: 1.0.0
+slide: 1.1.6
+sntp: 0.2.4
+socket.io: 1.4.5
+socket.io-adapter: 0.4.0
+socket.io-client: 1.4.5
+socket.io-parser: 2.2.6
+source-map: 0.5.3
+sparkles: 1.0.0
+spdx-correct: 1.0.2
+spdx-expression-parse: 1.0.2
+spdx-exceptions: 1.0.4
+spdx-license-ids: 1.2.0
+spdy: 1.32.5
+sshpk: 1.7.4
+stacky: 1.3.1
+statuses: 1.2.1
+stream-consume: 0.1.0
+stream-transform: 0.1.1
+streamsearch: 0.1.2
+string-length: 1.0.1
+string_decoder: 0.10.31
+stringstream: 0.0.5
+strip-ansi: 3.0.0
+strip-bom: 2.0.0
+strip-indent: 1.0.1
+strip-json-comments: 1.0.4
+supports-color: 2.0.0
+tar-stream: 1.1.5
+temp: 0.8.3
+through2: 2.0.1
+test-fixture: 1.1.0
+tildify: 1.1.2
+time-stamp: 1.0.0
+to-array: 0.1.4
+timed-out: 2.0.0
+tough-cookie: 2.2.1
+traverse: 0.3.9
+trim-newlines: 1.0.0
+tunnel-agent: 0.4.2
+tweetnacl: 0.13.3
+type-detect: 1.0.0
+type-is: 1.6.11
+typedarray: 0.0.6
+uglify-save-license: 0.4.1
+uglify-js: 2.6.1
+uglify-to-browserify: 1.0.2
+ultron: 1.0.2
+underscore: 1.6.0
+underscore.string: 3.0.3
+unique-stream: 1.0.0
+unpipe: 1.0.0
+unzip: 0.1.11
+unzip-response: 1.0.0
+update-notifier: 0.6.0
+urijs: 1.16.1
+url-parse-lax: 1.0.0
+user-home: 1.1.1
+utf8: 2.1.0
+util-deprecate: 1.0.2
+util: 0.10.3
+util-extend: 1.0.3
+utils-merge: 1.0.0
+validate-npm-package-license: 3.0.1
+uuid: 2.0.1
+v8flags: 2.0.11
+vary: 1.0.1
+verror: 1.6.1
+vargs: 0.1.0
+vasync: 1.6.3
+vinyl-fs: 0.3.14
+vinyl-sourcemaps-apply: 0.2.1
+vinyl: 0.5.3
+wct-local: 2.0.1
+wct-sauce: 1.8.3
+web-component-tester: 4.2.0
+window-size: 0.1.0
+wd: 0.3.12
+which: 1.2.4
+wordwrap: 0.0.2
+wrappy: 1.0.1
+write-file-atomic: 1.1.4
+ws: 1.0.1
+xmlbuilder: 4.0.0
+xmldom: 0.1.22
+xdg-basedir: 2.0.0
+xmlhttprequest-ssl: 1.5.1
+xtend: 4.0.1
+yargs: 3.10.0
+yeast: 0.1.2
+zip-stream: 0.5.2
 
 REPO REVISIONS
 ==============
-WeakMap: 56eebff250e6cf82dfd767b7703599e047d8b10f
-observe-js: fa70c37099026225876f7c7a26bdee7c48129f1c
-
-ShadowDOM: c524de1304cc5a8863326ceeedb325cda43cd42f
-  + cherry pick pull request #515
-  (local hash: 14a48768d21603c7fc54dcef392b48dce0baa33f)
-URL: cf5d82e444d2a029834365a8b9d185fd792227f0
-MutationObservers: b1039ace292dec90b246317db28ff91d653375e7
-HTMLImports: 6dea2dd969dc4dfb594ae33d4b072130c4890da5
-CustomElements: 321f5428f0c0486d45dd6b384aea9d07021e431d
+webcomponentsjs: b76bfaa6b1b2d691745b8d38b3f242e8f17490d5
 
 BUILD HASHES
 ============
-build/platform.js: 5b8a1707ff61149f8d491be777e197aeaae5da41
+CustomElements.js: 031b018d6bbebd32ae1b3edaa04927ce5cd40dd2
+CustomElements.min.js: 14f6fd8f3a3219470eec480e8918cd8749bf792d
+HTMLImports.js: 64f26245ac687f3d1a931bb99120238716219db4
+HTMLImports.min.js: 2ec6d3c8160ae77e52e2fc48db59e6ae5f3e3f19
+MutationObserver.js: aa0881cf576808bff95dfe5195727e839d8339f8
+MutationObserver.min.js: 1eebd7ec07b9e25b345ee553395c12c040bf9535
+ShadowDOM.js: 2095e8e2c18ab30417ea6bf42bcd7550a9870e7c
+ShadowDOM.min.js: ceba42773f616863115e13a884f1b7eee344ad74
+webcomponents-lite.js: b57a7c1b0d5d01cbefef3f1938c07138045bd82e
+webcomponents-lite.min.js: 2a31c424558c9f74f708ea32098f89baf2a4dd86
+webcomponents.js: 50f3c0c3fbdb74c44d5457f9d0c82d38038d379f
+webcomponents.min.js: 7127c614ab7e4e320bfc250549af7057f804a97c
\ No newline at end of file
diff --git a/packages/web_components/lib/build/html_import_annotation_recorder.dart b/packages/web_components/lib/build/html_import_annotation_recorder.dart
index ba5d2ab..5f2a320 100644
--- a/packages/web_components/lib/build/html_import_annotation_recorder.dart
+++ b/packages/web_components/lib/build/html_import_annotation_recorder.dart
@@ -3,10 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 library web_components.build.html_import_recorder_inliner;
 
-import 'package:analyzer/analyzer.dart';
-import 'package:analyzer/src/generated/ast.dart';
 import 'package:analyzer/src/generated/element.dart';
-import 'package:barback/barback.dart';
 import 'package:initialize/transformer.dart';
 import 'package:path/path.dart' as path;
 import '../src/normalize_path.dart';
@@ -21,8 +18,6 @@
   /// All the normalized import paths that were seen.
   final Set<String> importPaths = new Set<String>();
 
-  TransformLogger _logger;
-
   HtmlImportAnnotationRecorder();
 
   /// Applies to anything named `HtmlImport` which annotates a library.
@@ -35,8 +30,11 @@
     } else if (annotationElement is PropertyAccessorElement) {
       type = annotationElement.variable.propagatedType;
       if (type == null) {
-        type = pluginData.resolver.evaluateConstant(annotationElement.library,
-            pluginData.initializer.annotationNode.name).value.type;
+        type = pluginData.resolver
+            .evaluateConstant(annotationElement.library,
+                pluginData.initializer.annotationNode.name)
+            .value
+            .type;
       }
     } else {
       logger.error('Unsupported annotation type. Only constructors and '
@@ -60,18 +58,21 @@
     var annotationElement = pluginData.initializer.annotationElement;
     var element = pluginData.initializer.targetElement as LibraryElement;
     var resolver = pluginData.resolver;
-    var libraryDirective =
-        pluginData.initializer.targetNode.parent.parent as LibraryDirective;
 
     var originalImportPath;
     if (annotationElement.element is PropertyAccessorElement) {
-      originalImportPath = resolver.evaluateConstant(
-              element.library, annotation.name).value.fields[
-          'filePath'].stringValue;
+      originalImportPath = resolver
+          .evaluateConstant(element.library, annotation.name)
+          .value
+          .fields['filePath']
+          .toStringValue();
     } else {
       assert(annotationElement.element is ConstructorElement);
-      originalImportPath = resolver.evaluateConstant(element.library,
-          annotation.arguments.arguments.first).value.stringValue;
+      originalImportPath = resolver
+          .evaluateConstant(
+              element.library, annotation.arguments.arguments.first)
+          .value
+          .toStringValue();
     }
 
     var libPath;
diff --git a/packages/web_components/lib/build/import_inliner.dart b/packages/web_components/lib/build/import_inliner.dart
index 1f562a7..a603dda 100644
--- a/packages/web_components/lib/build/import_inliner.dart
+++ b/packages/web_components/lib/build/import_inliner.dart
@@ -38,7 +38,8 @@
   apply(Transform transform) {
     var logger = new BuildLogger(transform, convertErrorsToWarnings: true);
     return new ImportInliner(transform, transform.primaryInput.id, logger,
-        bindingStartDelimiters: bindingStartDelimiters).run();
+            bindingStartDelimiters: bindingStartDelimiters)
+        .run();
   }
 }
 
@@ -71,8 +72,10 @@
       if (imports.length > 1) {
         _inlineImports(primaryDocument, imports);
       } else if (!changed &&
-          primaryDocument.querySelectorAll('link[rel="import"]').where(
-                  (import) => import.attributes['type'] != 'css').length ==
+          primaryDocument
+                  .querySelectorAll('link[rel="import"]')
+                  .where((import) => import.attributes['type'] != 'css')
+                  .length ==
               0) {
         // If there were no url changes and no imports, then we are done.
         return;
@@ -173,9 +176,6 @@
   /// Asset where the original content (and original url) was found.
   final AssetId sourceId;
 
-  /// Counter used to ensure that every library name we inject is unique.
-  int _count = 0;
-
   /// Path to the top level folder relative to the transform primaryInput.
   /// This should just be some arbitrary # of ../'s.
   final String topLevelPath;
@@ -303,7 +303,8 @@
 
     if (primaryInput.package != id.package) {
       // Technically we shouldn't get there
-      logger.error(internalErrorDontKnowHowToImport
+      logger.error(
+          internalErrorDontKnowHowToImport
               .create({'target': id, 'source': primaryInput, 'extra': ''}),
           span: span);
       return href;
diff --git a/packages/web_components/lib/build/messages.dart b/packages/web_components/lib/build/messages.dart
index 87f3fa3..8cf11d6 100644
--- a/packages/web_components/lib/build/messages.dart
+++ b/packages/web_components/lib/build/messages.dart
@@ -8,8 +8,10 @@
 import 'package:code_transformers/messages/messages.dart';
 
 const scriptFileNotFound = const MessageTemplate(
-    const MessageId('web_components', 0), 'Script file at "%-url-%" not found.',
-    'URL to a script file might be incorrect', '''
+    const MessageId('web_components', 0),
+    'Script file at "%-url-%" not found.',
+    'URL to a script file might be incorrect',
+    '''
 An error occurred trying to read a script tag on a given URL. This is often the
 result of a broken URL in a `<script src="...">`.
 ''');
@@ -17,7 +19,8 @@
 const scriptIncludedMoreThanOnce = const MessageTemplate(
     const MessageId('web_components', 1),
     'The `%-url-%` script was included more than once.',
-    'Dart script file included more than once.', '''
+    'Dart script file included more than once.',
+    '''
 Duplicate dart scripts often happen if you have multiple html imports that
 include the same script. The simplest workaround for this is to move your dart
 script to its own html file, and import that instead of the script (html imports
@@ -46,7 +49,8 @@
 const internalErrorDontKnowHowToImport = const MessageTemplate(
     const MessageId('web_components', 3),
     "internal error: don't know how to include %-target-% from"
-    " %-source-%.%-extra-%", "Internal error: don't know how to include a URL",
+    " %-source-%.%-extra-%",
+    "Internal error: don't know how to include a URL",
     '''
 Sorry, you just ran into a bug in the web_components transformer code. Please
 file a bug at <https://github.com/dart-lang/web-components/issues/new>
@@ -56,7 +60,8 @@
 
 const inlineImportFail = const MessageTemplate(
     const MessageId('web_components', 4),
-    'Failed to inline HTML import: %-error-%', 'Error while inlining an import',
+    'Failed to inline HTML import: %-error-%',
+    'Error while inlining an import',
     '''
 An error occurred while inlining an import in the web_components build. This is
 often the result of a broken HTML import.
diff --git a/packages/web_components/lib/build/script_compactor.dart b/packages/web_components/lib/build/script_compactor.dart
index 12655b3..c3b0001 100644
--- a/packages/web_components/lib/build/script_compactor.dart
+++ b/packages/web_components/lib/build/script_compactor.dart
@@ -108,7 +108,7 @@
         primaryInput.path.replaceFirst('.html', '.bootstrap.dart'));
 
     var buffer = new StringBuffer();
-    buffer.writeln('library ${_libraryNameFor(bootstrapId)};');
+    buffer.writeln('library ${_libraryNameFor(bootstrapId, logger)};');
     buffer.writeln();
     var i = 0;
     for (var script in importScripts) {
@@ -133,7 +133,6 @@
   Future _extractInlineScripts(AssetId asset, dom.Document doc) {
     var scripts = doc.querySelectorAll('script[type="$dartType"]');
     return Future.forEach(scripts, (script) {
-      var type = script.attributes['type'];
       var src = script.attributes['src'];
 
       if (src != null) {
@@ -147,7 +146,7 @@
       // TODO(sigmund): ensure this path is unique (dartbug.com/12618).
       var newId = primaryInput.addExtension('.$count.dart');
       if (!_hasLibraryDirective(code)) {
-        var libName = _libraryNameFor(primaryInput, count);
+        var libName = _libraryNameFor(primaryInput, logger, count);
         code = "library $libName;\n$code";
       }
 
@@ -162,8 +161,8 @@
         // the new source file.
         if (primaryInput == asset) {
           script.text = '';
-          script.attributes['src'] = path.url.relative(newId.path,
-              from: path.url.dirname(primaryInput.path));
+          script.attributes['src'] = path.url
+              .relative(newId.path, from: path.url.dirname(primaryInput.path));
         }
       });
     });
@@ -174,7 +173,6 @@
     var unit = parseDirectives(code, suppressErrors: true);
     var file = new SourceFile(code, url: spanUrlFor(from, to, logger));
     var output = new TextEditTransaction(code, file);
-    var foundLibraryDirective = false;
     for (Directive directive in unit.directives) {
       if (directive is UriBasedDirective) {
         var uri = directive.uri.stringValue;
@@ -188,8 +186,6 @@
         if (newUri != uri) {
           output.edit(span.start.offset, span.end.offset, "'$newUri'");
         }
-      } else if (directive is LibraryDirective) {
-        foundLibraryDirective = true;
       }
     }
 
@@ -228,22 +224,29 @@
 }
 
 /// Generate a library name for an asset.
-String _libraryNameFor(AssetId id, [int suffix]) {
+String _libraryNameFor(AssetId id, BuildLogger logger, [int suffix]) {
+  if (_isInvalidPackageName(id.package)) {
+    logger.error('Invalid package name `${id.package}`. Package names should '
+        'be valid dart identifiers, as indicated at '
+        'https://www.dartlang.org/tools/pub/pubspec.html#name.');
+  }
   var name = '${path.withoutExtension(id.path)}_'
       '${path.extension(id.path).substring(1)}';
   if (name.startsWith('lib/')) name = name.substring(4);
-  name = name.split('/').map((part) {
-    part = part.replaceAll(_invalidLibCharsRegex, '_');
-    if (part.startsWith(_numRegex)) part = '_${part}';
-    return part;
-  }).join(".");
+  validLibName(String name) {
+    name = name.replaceAll(_invalidLibCharsRegex, '_');
+    if (name.startsWith(_numRegex)) name = '_${name}';
+    return name;
+  }
+  name = name.split('/').map(validLibName).join(".");
   var suffixString = suffix != null ? '_$suffix' : '';
   return '${id.package}.${name}$suffixString';
 }
 
 /// Parse [code] and determine whether it has a library directive.
 bool _hasLibraryDirective(String code) =>
-    parseDirectives(code, suppressErrors: true).directives
+    parseDirectives(code, suppressErrors: true)
+        .directives
         .any((d) => d is LibraryDirective);
 
 /// Returns the dart import path to reach [id] relative to [primaryInput].
@@ -256,6 +259,12 @@
   return path.url.relative(id.path, from: path.url.dirname(primaryInput.path));
 }
 
+bool _isInvalidPackageName(String name) {
+  return name.split('.').any((part) {
+    return part.isEmpty || part.contains(_invalidLibCharsRegex);
+  });
+}
+
 // Constant and final variables
 final _invalidLibCharsRegex = new RegExp('[^a-z0-9_]');
 final _numRegex = new RegExp('[0-9]');
diff --git a/packages/web_components/lib/build/web_components.dart b/packages/web_components/lib/build/web_components.dart
index 4a71606..c7b6eb0 100644
--- a/packages/web_components/lib/build/web_components.dart
+++ b/packages/web_components/lib/build/web_components.dart
@@ -59,7 +59,6 @@
     if (options.entryPoints != null) {
       return options.entryPoints.contains(id.path);
     }
-    if (id.path == 'web/index.bootstrap.dart') return true;
     // If no entry point is supplied, then any html file under web/ or test/ is
     // an entry point.
     return (id.path.startsWith('web/') || id.path.startsWith('test/')) &&
@@ -91,6 +90,7 @@
         transform
             .addOutput(new Asset.fromString(primaryInput.id, doc.outerHtml));
         transform.addOutput(bootstrap);
+        resolver.release();
       });
     });
   }
diff --git a/packages/web_components/lib/package.json b/packages/web_components/lib/package.json
new file mode 100644
index 0000000..a670976
--- /dev/null
+++ b/packages/web_components/lib/package.json
@@ -0,0 +1,31 @@
+{
+  "name": "webcomponents.js",
+  "version": "0.7.21",
+  "description": "webcomponents.js",
+  "main": "webcomponents.js",
+  "directories": {
+    "test": "tests"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/webcomponents/webcomponentsjs.git"
+  },
+  "author": "The Polymer Authors",
+  "license": "BSD-3-Clause",
+  "bugs": {
+    "url": "https://github.com/webcomponents/webcomponentsjs/issues"
+  },
+  "scripts": {
+    "test": "wct"
+  },
+  "homepage": "http://webcomponents.org",
+  "devDependencies": {
+    "gulp": "^3.8.8",
+    "gulp-audit": "^1.0.0",
+    "gulp-concat": "^2.4.1",
+    "gulp-header": "^1.1.1",
+    "gulp-uglify": "^1.0.1",
+    "run-sequence": "^1.0.1",
+    "web-component-tester": "^4.0.1"
+  }
+}
diff --git a/packages/web_components/lib/polyfill.dart b/packages/web_components/lib/polyfill.dart
index 6e7bbd9..e225e22 100644
--- a/packages/web_components/lib/polyfill.dart
+++ b/packages/web_components/lib/polyfill.dart
@@ -38,7 +38,7 @@
   if (customElements == null) {
     // Return true if native document.register, otherwise false.
     // (Maybe the polyfill isn't loaded yet. Wait for it.)
-    return document.supportsRegister;
+    return document.supportsRegisterElement;
   }
 
   return customElements['ready'] == true;
diff --git a/packages/web_components/lib/src/init.dart b/packages/web_components/lib/src/init.dart
index d2906ef..ba33239 100644
--- a/packages/web_components/lib/src/init.dart
+++ b/packages/web_components/lib/src/init.dart
@@ -18,7 +18,9 @@
 ///
 /// If a [typeFilter] or [customFilter] are supplied, only one phase is ran
 /// with the supplied filters.
-Future initWebComponents({List<Type> typeFilter, InitializerFilter customFilter,
+Future initWebComponents(
+    {List<Type> typeFilter,
+    InitializerFilter customFilter,
     bool initAll: true}) {
   if (typeFilter != null || customFilter != null) {
     return init.run(typeFilter: typeFilter, customFilter: customFilter);
diff --git a/packages/web_components/lib/webcomponents-lite.js b/packages/web_components/lib/webcomponents-lite.js
new file mode 100644
index 0000000..1fdb2d3
--- /dev/null
+++ b/packages/web_components/lib/webcomponents-lite.js
@@ -0,0 +1,2501 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+(function() {
+  window.WebComponents = window.WebComponents || {
+    flags: {}
+  };
+  var file = "webcomponents-lite.js";
+  var script = document.querySelector('script[src*="' + file + '"]');
+  var flags = {};
+  if (!flags.noOpts) {
+    location.search.slice(1).split("&").forEach(function(option) {
+      var parts = option.split("=");
+      var match;
+      if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {
+        flags[match[1]] = parts[1] || true;
+      }
+    });
+    if (script) {
+      for (var i = 0, a; a = script.attributes[i]; i++) {
+        if (a.name !== "src") {
+          flags[a.name] = a.value || true;
+        }
+      }
+    }
+    if (flags.log && flags.log.split) {
+      var parts = flags.log.split(",");
+      flags.log = {};
+      parts.forEach(function(f) {
+        flags.log[f] = true;
+      });
+    } else {
+      flags.log = {};
+    }
+  }
+  if (flags.register) {
+    window.CustomElements = window.CustomElements || {
+      flags: {}
+    };
+    window.CustomElements.flags.register = flags.register;
+  }
+  WebComponents.flags = flags;
+})();
+
+(function(scope) {
+  "use strict";
+  var hasWorkingUrl = false;
+  if (!scope.forceJURL) {
+    try {
+      var u = new URL("b", "http://a");
+      u.pathname = "c%20d";
+      hasWorkingUrl = u.href === "http://a/c%20d";
+    } catch (e) {}
+  }
+  if (hasWorkingUrl) return;
+  var relative = Object.create(null);
+  relative["ftp"] = 21;
+  relative["file"] = 0;
+  relative["gopher"] = 70;
+  relative["http"] = 80;
+  relative["https"] = 443;
+  relative["ws"] = 80;
+  relative["wss"] = 443;
+  var relativePathDotMapping = Object.create(null);
+  relativePathDotMapping["%2e"] = ".";
+  relativePathDotMapping[".%2e"] = "..";
+  relativePathDotMapping["%2e."] = "..";
+  relativePathDotMapping["%2e%2e"] = "..";
+  function isRelativeScheme(scheme) {
+    return relative[scheme] !== undefined;
+  }
+  function invalid() {
+    clear.call(this);
+    this._isInvalid = true;
+  }
+  function IDNAToASCII(h) {
+    if ("" == h) {
+      invalid.call(this);
+    }
+    return h.toLowerCase();
+  }
+  function percentEscape(c) {
+    var unicode = c.charCodeAt(0);
+    if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
+      return c;
+    }
+    return encodeURIComponent(c);
+  }
+  function percentEscapeQuery(c) {
+    var unicode = c.charCodeAt(0);
+    if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
+      return c;
+    }
+    return encodeURIComponent(c);
+  }
+  var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
+  function parse(input, stateOverride, base) {
+    function err(message) {
+      errors.push(message);
+    }
+    var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
+    loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
+      var c = input[cursor];
+      switch (state) {
+       case "scheme start":
+        if (c && ALPHA.test(c)) {
+          buffer += c.toLowerCase();
+          state = "scheme";
+        } else if (!stateOverride) {
+          buffer = "";
+          state = "no scheme";
+          continue;
+        } else {
+          err("Invalid scheme.");
+          break loop;
+        }
+        break;
+
+       case "scheme":
+        if (c && ALPHANUMERIC.test(c)) {
+          buffer += c.toLowerCase();
+        } else if (":" == c) {
+          this._scheme = buffer;
+          buffer = "";
+          if (stateOverride) {
+            break loop;
+          }
+          if (isRelativeScheme(this._scheme)) {
+            this._isRelative = true;
+          }
+          if ("file" == this._scheme) {
+            state = "relative";
+          } else if (this._isRelative && base && base._scheme == this._scheme) {
+            state = "relative or authority";
+          } else if (this._isRelative) {
+            state = "authority first slash";
+          } else {
+            state = "scheme data";
+          }
+        } else if (!stateOverride) {
+          buffer = "";
+          cursor = 0;
+          state = "no scheme";
+          continue;
+        } else if (EOF == c) {
+          break loop;
+        } else {
+          err("Code point not allowed in scheme: " + c);
+          break loop;
+        }
+        break;
+
+       case "scheme data":
+        if ("?" == c) {
+          this._query = "?";
+          state = "query";
+        } else if ("#" == c) {
+          this._fragment = "#";
+          state = "fragment";
+        } else {
+          if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+            this._schemeData += percentEscape(c);
+          }
+        }
+        break;
+
+       case "no scheme":
+        if (!base || !isRelativeScheme(base._scheme)) {
+          err("Missing scheme.");
+          invalid.call(this);
+        } else {
+          state = "relative";
+          continue;
+        }
+        break;
+
+       case "relative or authority":
+        if ("/" == c && "/" == input[cursor + 1]) {
+          state = "authority ignore slashes";
+        } else {
+          err("Expected /, got: " + c);
+          state = "relative";
+          continue;
+        }
+        break;
+
+       case "relative":
+        this._isRelative = true;
+        if ("file" != this._scheme) this._scheme = base._scheme;
+        if (EOF == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = base._query;
+          this._username = base._username;
+          this._password = base._password;
+          break loop;
+        } else if ("/" == c || "\\" == c) {
+          if ("\\" == c) err("\\ is an invalid code point.");
+          state = "relative slash";
+        } else if ("?" == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = "?";
+          this._username = base._username;
+          this._password = base._password;
+          state = "query";
+        } else if ("#" == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = base._query;
+          this._fragment = "#";
+          this._username = base._username;
+          this._password = base._password;
+          state = "fragment";
+        } else {
+          var nextC = input[cursor + 1];
+          var nextNextC = input[cursor + 2];
+          if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
+            this._host = base._host;
+            this._port = base._port;
+            this._username = base._username;
+            this._password = base._password;
+            this._path = base._path.slice();
+            this._path.pop();
+          }
+          state = "relative path";
+          continue;
+        }
+        break;
+
+       case "relative slash":
+        if ("/" == c || "\\" == c) {
+          if ("\\" == c) {
+            err("\\ is an invalid code point.");
+          }
+          if ("file" == this._scheme) {
+            state = "file host";
+          } else {
+            state = "authority ignore slashes";
+          }
+        } else {
+          if ("file" != this._scheme) {
+            this._host = base._host;
+            this._port = base._port;
+            this._username = base._username;
+            this._password = base._password;
+          }
+          state = "relative path";
+          continue;
+        }
+        break;
+
+       case "authority first slash":
+        if ("/" == c) {
+          state = "authority second slash";
+        } else {
+          err("Expected '/', got: " + c);
+          state = "authority ignore slashes";
+          continue;
+        }
+        break;
+
+       case "authority second slash":
+        state = "authority ignore slashes";
+        if ("/" != c) {
+          err("Expected '/', got: " + c);
+          continue;
+        }
+        break;
+
+       case "authority ignore slashes":
+        if ("/" != c && "\\" != c) {
+          state = "authority";
+          continue;
+        } else {
+          err("Expected authority, got: " + c);
+        }
+        break;
+
+       case "authority":
+        if ("@" == c) {
+          if (seenAt) {
+            err("@ already seen.");
+            buffer += "%40";
+          }
+          seenAt = true;
+          for (var i = 0; i < buffer.length; i++) {
+            var cp = buffer[i];
+            if ("	" == cp || "\n" == cp || "\r" == cp) {
+              err("Invalid whitespace in authority.");
+              continue;
+            }
+            if (":" == cp && null === this._password) {
+              this._password = "";
+              continue;
+            }
+            var tempC = percentEscape(cp);
+            null !== this._password ? this._password += tempC : this._username += tempC;
+          }
+          buffer = "";
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          cursor -= buffer.length;
+          buffer = "";
+          state = "host";
+          continue;
+        } else {
+          buffer += c;
+        }
+        break;
+
+       case "file host":
+        if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
+            state = "relative path";
+          } else if (buffer.length == 0) {
+            state = "relative path start";
+          } else {
+            this._host = IDNAToASCII.call(this, buffer);
+            buffer = "";
+            state = "relative path start";
+          }
+          continue;
+        } else if ("	" == c || "\n" == c || "\r" == c) {
+          err("Invalid whitespace in file host.");
+        } else {
+          buffer += c;
+        }
+        break;
+
+       case "host":
+       case "hostname":
+        if (":" == c && !seenBracket) {
+          this._host = IDNAToASCII.call(this, buffer);
+          buffer = "";
+          state = "port";
+          if ("hostname" == stateOverride) {
+            break loop;
+          }
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          this._host = IDNAToASCII.call(this, buffer);
+          buffer = "";
+          state = "relative path start";
+          if (stateOverride) {
+            break loop;
+          }
+          continue;
+        } else if ("	" != c && "\n" != c && "\r" != c) {
+          if ("[" == c) {
+            seenBracket = true;
+          } else if ("]" == c) {
+            seenBracket = false;
+          }
+          buffer += c;
+        } else {
+          err("Invalid code point in host/hostname: " + c);
+        }
+        break;
+
+       case "port":
+        if (/[0-9]/.test(c)) {
+          buffer += c;
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
+          if ("" != buffer) {
+            var temp = parseInt(buffer, 10);
+            if (temp != relative[this._scheme]) {
+              this._port = temp + "";
+            }
+            buffer = "";
+          }
+          if (stateOverride) {
+            break loop;
+          }
+          state = "relative path start";
+          continue;
+        } else if ("	" == c || "\n" == c || "\r" == c) {
+          err("Invalid code point in port: " + c);
+        } else {
+          invalid.call(this);
+        }
+        break;
+
+       case "relative path start":
+        if ("\\" == c) err("'\\' not allowed in path.");
+        state = "relative path";
+        if ("/" != c && "\\" != c) {
+          continue;
+        }
+        break;
+
+       case "relative path":
+        if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
+          if ("\\" == c) {
+            err("\\ not allowed in relative path.");
+          }
+          var tmp;
+          if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
+            buffer = tmp;
+          }
+          if (".." == buffer) {
+            this._path.pop();
+            if ("/" != c && "\\" != c) {
+              this._path.push("");
+            }
+          } else if ("." == buffer && "/" != c && "\\" != c) {
+            this._path.push("");
+          } else if ("." != buffer) {
+            if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
+              buffer = buffer[0] + ":";
+            }
+            this._path.push(buffer);
+          }
+          buffer = "";
+          if ("?" == c) {
+            this._query = "?";
+            state = "query";
+          } else if ("#" == c) {
+            this._fragment = "#";
+            state = "fragment";
+          }
+        } else if ("	" != c && "\n" != c && "\r" != c) {
+          buffer += percentEscape(c);
+        }
+        break;
+
+       case "query":
+        if (!stateOverride && "#" == c) {
+          this._fragment = "#";
+          state = "fragment";
+        } else if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+          this._query += percentEscapeQuery(c);
+        }
+        break;
+
+       case "fragment":
+        if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+          this._fragment += c;
+        }
+        break;
+      }
+      cursor++;
+    }
+  }
+  function clear() {
+    this._scheme = "";
+    this._schemeData = "";
+    this._username = "";
+    this._password = null;
+    this._host = "";
+    this._port = "";
+    this._path = [];
+    this._query = "";
+    this._fragment = "";
+    this._isInvalid = false;
+    this._isRelative = false;
+  }
+  function jURL(url, base) {
+    if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
+    this._url = url;
+    clear.call(this);
+    var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
+    parse.call(this, input, null, base);
+  }
+  jURL.prototype = {
+    toString: function() {
+      return this.href;
+    },
+    get href() {
+      if (this._isInvalid) return this._url;
+      var authority = "";
+      if ("" != this._username || null != this._password) {
+        authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
+      }
+      return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
+    },
+    set href(href) {
+      clear.call(this);
+      parse.call(this, href);
+    },
+    get protocol() {
+      return this._scheme + ":";
+    },
+    set protocol(protocol) {
+      if (this._isInvalid) return;
+      parse.call(this, protocol + ":", "scheme start");
+    },
+    get host() {
+      return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
+    },
+    set host(host) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, host, "host");
+    },
+    get hostname() {
+      return this._host;
+    },
+    set hostname(hostname) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, hostname, "hostname");
+    },
+    get port() {
+      return this._port;
+    },
+    set port(port) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, port, "port");
+    },
+    get pathname() {
+      return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
+    },
+    set pathname(pathname) {
+      if (this._isInvalid || !this._isRelative) return;
+      this._path = [];
+      parse.call(this, pathname, "relative path start");
+    },
+    get search() {
+      return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
+    },
+    set search(search) {
+      if (this._isInvalid || !this._isRelative) return;
+      this._query = "?";
+      if ("?" == search[0]) search = search.slice(1);
+      parse.call(this, search, "query");
+    },
+    get hash() {
+      return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
+    },
+    set hash(hash) {
+      if (this._isInvalid) return;
+      this._fragment = "#";
+      if ("#" == hash[0]) hash = hash.slice(1);
+      parse.call(this, hash, "fragment");
+    },
+    get origin() {
+      var host;
+      if (this._isInvalid || !this._scheme) {
+        return "";
+      }
+      switch (this._scheme) {
+       case "data":
+       case "file":
+       case "javascript":
+       case "mailto":
+        return "null";
+      }
+      host = this.host;
+      if (!host) {
+        return "";
+      }
+      return this._scheme + "://" + host;
+    }
+  };
+  var OriginalURL = scope.URL;
+  if (OriginalURL) {
+    jURL.createObjectURL = function(blob) {
+      return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
+    };
+    jURL.revokeObjectURL = function(url) {
+      OriginalURL.revokeObjectURL(url);
+    };
+  }
+  scope.URL = jURL;
+})(self);
+
+if (typeof WeakMap === "undefined") {
+  (function() {
+    var defineProperty = Object.defineProperty;
+    var counter = Date.now() % 1e9;
+    var WeakMap = function() {
+      this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
+    };
+    WeakMap.prototype = {
+      set: function(key, value) {
+        var entry = key[this.name];
+        if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, {
+          value: [ key, value ],
+          writable: true
+        });
+        return this;
+      },
+      get: function(key) {
+        var entry;
+        return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined;
+      },
+      "delete": function(key) {
+        var entry = key[this.name];
+        if (!entry || entry[0] !== key) return false;
+        entry[0] = entry[1] = undefined;
+        return true;
+      },
+      has: function(key) {
+        var entry = key[this.name];
+        if (!entry) return false;
+        return entry[0] === key;
+      }
+    };
+    window.WeakMap = WeakMap;
+  })();
+}
+
+(function(global) {
+  if (global.JsMutationObserver) {
+    return;
+  }
+  var registrationsTable = new WeakMap();
+  var setImmediate;
+  if (/Trident|Edge/.test(navigator.userAgent)) {
+    setImmediate = setTimeout;
+  } else if (window.setImmediate) {
+    setImmediate = window.setImmediate;
+  } else {
+    var setImmediateQueue = [];
+    var sentinel = String(Math.random());
+    window.addEventListener("message", function(e) {
+      if (e.data === sentinel) {
+        var queue = setImmediateQueue;
+        setImmediateQueue = [];
+        queue.forEach(function(func) {
+          func();
+        });
+      }
+    });
+    setImmediate = function(func) {
+      setImmediateQueue.push(func);
+      window.postMessage(sentinel, "*");
+    };
+  }
+  var isScheduled = false;
+  var scheduledObservers = [];
+  function scheduleCallback(observer) {
+    scheduledObservers.push(observer);
+    if (!isScheduled) {
+      isScheduled = true;
+      setImmediate(dispatchCallbacks);
+    }
+  }
+  function wrapIfNeeded(node) {
+    return window.ShadowDOMPolyfill && window.ShadowDOMPolyfill.wrapIfNeeded(node) || node;
+  }
+  function dispatchCallbacks() {
+    isScheduled = false;
+    var observers = scheduledObservers;
+    scheduledObservers = [];
+    observers.sort(function(o1, o2) {
+      return o1.uid_ - o2.uid_;
+    });
+    var anyNonEmpty = false;
+    observers.forEach(function(observer) {
+      var queue = observer.takeRecords();
+      removeTransientObserversFor(observer);
+      if (queue.length) {
+        observer.callback_(queue, observer);
+        anyNonEmpty = true;
+      }
+    });
+    if (anyNonEmpty) dispatchCallbacks();
+  }
+  function removeTransientObserversFor(observer) {
+    observer.nodes_.forEach(function(node) {
+      var registrations = registrationsTable.get(node);
+      if (!registrations) return;
+      registrations.forEach(function(registration) {
+        if (registration.observer === observer) registration.removeTransientObservers();
+      });
+    });
+  }
+  function forEachAncestorAndObserverEnqueueRecord(target, callback) {
+    for (var node = target; node; node = node.parentNode) {
+      var registrations = registrationsTable.get(node);
+      if (registrations) {
+        for (var j = 0; j < registrations.length; j++) {
+          var registration = registrations[j];
+          var options = registration.options;
+          if (node !== target && !options.subtree) continue;
+          var record = callback(options);
+          if (record) registration.enqueue(record);
+        }
+      }
+    }
+  }
+  var uidCounter = 0;
+  function JsMutationObserver(callback) {
+    this.callback_ = callback;
+    this.nodes_ = [];
+    this.records_ = [];
+    this.uid_ = ++uidCounter;
+  }
+  JsMutationObserver.prototype = {
+    observe: function(target, options) {
+      target = wrapIfNeeded(target);
+      if (!options.childList && !options.attributes && !options.characterData || options.attributeOldValue && !options.attributes || options.attributeFilter && options.attributeFilter.length && !options.attributes || options.characterDataOldValue && !options.characterData) {
+        throw new SyntaxError();
+      }
+      var registrations = registrationsTable.get(target);
+      if (!registrations) registrationsTable.set(target, registrations = []);
+      var registration;
+      for (var i = 0; i < registrations.length; i++) {
+        if (registrations[i].observer === this) {
+          registration = registrations[i];
+          registration.removeListeners();
+          registration.options = options;
+          break;
+        }
+      }
+      if (!registration) {
+        registration = new Registration(this, target, options);
+        registrations.push(registration);
+        this.nodes_.push(target);
+      }
+      registration.addListeners();
+    },
+    disconnect: function() {
+      this.nodes_.forEach(function(node) {
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          var registration = registrations[i];
+          if (registration.observer === this) {
+            registration.removeListeners();
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+      this.records_ = [];
+    },
+    takeRecords: function() {
+      var copyOfRecords = this.records_;
+      this.records_ = [];
+      return copyOfRecords;
+    }
+  };
+  function MutationRecord(type, target) {
+    this.type = type;
+    this.target = target;
+    this.addedNodes = [];
+    this.removedNodes = [];
+    this.previousSibling = null;
+    this.nextSibling = null;
+    this.attributeName = null;
+    this.attributeNamespace = null;
+    this.oldValue = null;
+  }
+  function copyMutationRecord(original) {
+    var record = new MutationRecord(original.type, original.target);
+    record.addedNodes = original.addedNodes.slice();
+    record.removedNodes = original.removedNodes.slice();
+    record.previousSibling = original.previousSibling;
+    record.nextSibling = original.nextSibling;
+    record.attributeName = original.attributeName;
+    record.attributeNamespace = original.attributeNamespace;
+    record.oldValue = original.oldValue;
+    return record;
+  }
+  var currentRecord, recordWithOldValue;
+  function getRecord(type, target) {
+    return currentRecord = new MutationRecord(type, target);
+  }
+  function getRecordWithOldValue(oldValue) {
+    if (recordWithOldValue) return recordWithOldValue;
+    recordWithOldValue = copyMutationRecord(currentRecord);
+    recordWithOldValue.oldValue = oldValue;
+    return recordWithOldValue;
+  }
+  function clearRecords() {
+    currentRecord = recordWithOldValue = undefined;
+  }
+  function recordRepresentsCurrentMutation(record) {
+    return record === recordWithOldValue || record === currentRecord;
+  }
+  function selectRecord(lastRecord, newRecord) {
+    if (lastRecord === newRecord) return lastRecord;
+    if (recordWithOldValue && recordRepresentsCurrentMutation(lastRecord)) return recordWithOldValue;
+    return null;
+  }
+  function Registration(observer, target, options) {
+    this.observer = observer;
+    this.target = target;
+    this.options = options;
+    this.transientObservedNodes = [];
+  }
+  Registration.prototype = {
+    enqueue: function(record) {
+      var records = this.observer.records_;
+      var length = records.length;
+      if (records.length > 0) {
+        var lastRecord = records[length - 1];
+        var recordToReplaceLast = selectRecord(lastRecord, record);
+        if (recordToReplaceLast) {
+          records[length - 1] = recordToReplaceLast;
+          return;
+        }
+      } else {
+        scheduleCallback(this.observer);
+      }
+      records[length] = record;
+    },
+    addListeners: function() {
+      this.addListeners_(this.target);
+    },
+    addListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.addEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.addEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.addEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.addEventListener("DOMNodeRemoved", this, true);
+    },
+    removeListeners: function() {
+      this.removeListeners_(this.target);
+    },
+    removeListeners_: function(node) {
+      var options = this.options;
+      if (options.attributes) node.removeEventListener("DOMAttrModified", this, true);
+      if (options.characterData) node.removeEventListener("DOMCharacterDataModified", this, true);
+      if (options.childList) node.removeEventListener("DOMNodeInserted", this, true);
+      if (options.childList || options.subtree) node.removeEventListener("DOMNodeRemoved", this, true);
+    },
+    addTransientObserver: function(node) {
+      if (node === this.target) return;
+      this.addListeners_(node);
+      this.transientObservedNodes.push(node);
+      var registrations = registrationsTable.get(node);
+      if (!registrations) registrationsTable.set(node, registrations = []);
+      registrations.push(this);
+    },
+    removeTransientObservers: function() {
+      var transientObservedNodes = this.transientObservedNodes;
+      this.transientObservedNodes = [];
+      transientObservedNodes.forEach(function(node) {
+        this.removeListeners_(node);
+        var registrations = registrationsTable.get(node);
+        for (var i = 0; i < registrations.length; i++) {
+          if (registrations[i] === this) {
+            registrations.splice(i, 1);
+            break;
+          }
+        }
+      }, this);
+    },
+    handleEvent: function(e) {
+      e.stopImmediatePropagation();
+      switch (e.type) {
+       case "DOMAttrModified":
+        var name = e.attrName;
+        var namespace = e.relatedNode.namespaceURI;
+        var target = e.target;
+        var record = new getRecord("attributes", target);
+        record.attributeName = name;
+        record.attributeNamespace = namespace;
+        var oldValue = e.attrChange === MutationEvent.ADDITION ? null : e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.attributes) return;
+          if (options.attributeFilter && options.attributeFilter.length && options.attributeFilter.indexOf(name) === -1 && options.attributeFilter.indexOf(namespace) === -1) {
+            return;
+          }
+          if (options.attributeOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMCharacterDataModified":
+        var target = e.target;
+        var record = getRecord("characterData", target);
+        var oldValue = e.prevValue;
+        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+          if (!options.characterData) return;
+          if (options.characterDataOldValue) return getRecordWithOldValue(oldValue);
+          return record;
+        });
+        break;
+
+       case "DOMNodeRemoved":
+        this.addTransientObserver(e.target);
+
+       case "DOMNodeInserted":
+        var changedNode = e.target;
+        var addedNodes, removedNodes;
+        if (e.type === "DOMNodeInserted") {
+          addedNodes = [ changedNode ];
+          removedNodes = [];
+        } else {
+          addedNodes = [];
+          removedNodes = [ changedNode ];
+        }
+        var previousSibling = changedNode.previousSibling;
+        var nextSibling = changedNode.nextSibling;
+        var record = getRecord("childList", e.target.parentNode);
+        record.addedNodes = addedNodes;
+        record.removedNodes = removedNodes;
+        record.previousSibling = previousSibling;
+        record.nextSibling = nextSibling;
+        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
+          if (!options.childList) return;
+          return record;
+        });
+      }
+      clearRecords();
+    }
+  };
+  global.JsMutationObserver = JsMutationObserver;
+  if (!global.MutationObserver) {
+    global.MutationObserver = JsMutationObserver;
+    JsMutationObserver._isPolyfilled = true;
+  }
+})(self);
+
+(function() {
+  var needsTemplate = typeof HTMLTemplateElement === "undefined";
+  var needsCloning = function() {
+    if (!needsTemplate) {
+      var frag = document.createDocumentFragment();
+      var t = document.createElement("template");
+      frag.appendChild(t);
+      t.content.appendChild(document.createElement("div"));
+      var clone = frag.cloneNode(true);
+      return clone.firstChild.content.childNodes.length === 0;
+    }
+  }();
+  var TEMPLATE_TAG = "template";
+  var TemplateImpl = function() {};
+  if (needsTemplate) {
+    var contentDoc = document.implementation.createHTMLDocument("template");
+    var canDecorate = true;
+    var templateStyle = document.createElement("style");
+    templateStyle.textContent = TEMPLATE_TAG + "{display:none;}";
+    var head = document.head;
+    head.insertBefore(templateStyle, head.firstElementChild);
+    TemplateImpl.prototype = Object.create(HTMLElement.prototype);
+    TemplateImpl.decorate = function(template) {
+      if (template.content) {
+        return;
+      }
+      template.content = contentDoc.createDocumentFragment();
+      var child;
+      while (child = template.firstChild) {
+        template.content.appendChild(child);
+      }
+      if (canDecorate) {
+        try {
+          Object.defineProperty(template, "innerHTML", {
+            get: function() {
+              var o = "";
+              for (var e = this.content.firstChild; e; e = e.nextSibling) {
+                o += e.outerHTML || escapeData(e.data);
+              }
+              return o;
+            },
+            set: function(text) {
+              contentDoc.body.innerHTML = text;
+              TemplateImpl.bootstrap(contentDoc);
+              while (this.content.firstChild) {
+                this.content.removeChild(this.content.firstChild);
+              }
+              while (contentDoc.body.firstChild) {
+                this.content.appendChild(contentDoc.body.firstChild);
+              }
+            },
+            configurable: true
+          });
+          template.cloneNode = function(deep) {
+            return TemplateImpl.cloneNode(this, deep);
+          };
+        } catch (err) {
+          canDecorate = false;
+        }
+      }
+      TemplateImpl.bootstrap(template.content);
+    };
+    TemplateImpl.bootstrap = function(doc) {
+      var templates = doc.querySelectorAll(TEMPLATE_TAG);
+      for (var i = 0, l = templates.length, t; i < l && (t = templates[i]); i++) {
+        TemplateImpl.decorate(t);
+      }
+    };
+    document.addEventListener("DOMContentLoaded", function() {
+      TemplateImpl.bootstrap(document);
+    });
+    var createElement = document.createElement;
+    document.createElement = function() {
+      "use strict";
+      var el = createElement.apply(document, arguments);
+      if (el.localName == "template") {
+        TemplateImpl.decorate(el);
+      }
+      return el;
+    };
+    var escapeDataRegExp = /[&\u00A0<>]/g;
+    function escapeReplace(c) {
+      switch (c) {
+       case "&":
+        return "&amp;";
+
+       case "<":
+        return "&lt;";
+
+       case ">":
+        return "&gt;";
+
+       case " ":
+        return "&nbsp;";
+      }
+    }
+    function escapeData(s) {
+      return s.replace(escapeDataRegExp, escapeReplace);
+    }
+  }
+  if (needsTemplate || needsCloning) {
+    var nativeCloneNode = Node.prototype.cloneNode;
+    TemplateImpl.cloneNode = function(template, deep) {
+      var clone = nativeCloneNode.call(template);
+      if (this.decorate) {
+        this.decorate(clone);
+      }
+      if (deep) {
+        clone.content.appendChild(nativeCloneNode.call(template.content, true));
+        this.fixClonedDom(clone.content, template.content);
+      }
+      return clone;
+    };
+    TemplateImpl.fixClonedDom = function(clone, source) {
+      var s$ = source.querySelectorAll(TEMPLATE_TAG);
+      var t$ = clone.querySelectorAll(TEMPLATE_TAG);
+      for (var i = 0, l = t$.length, t, s; i < l; i++) {
+        s = s$[i];
+        t = t$[i];
+        if (this.decorate) {
+          this.decorate(s);
+        }
+        t.parentNode.replaceChild(s.cloneNode(true), t);
+      }
+    };
+    var originalImportNode = document.importNode;
+    Node.prototype.cloneNode = function(deep) {
+      var dom = nativeCloneNode.call(this, deep);
+      if (deep) {
+        TemplateImpl.fixClonedDom(dom, this);
+      }
+      return dom;
+    };
+    document.importNode = function(element, deep) {
+      if (element.localName === TEMPLATE_TAG) {
+        return TemplateImpl.cloneNode(element, deep);
+      } else {
+        var dom = originalImportNode.call(document, element, deep);
+        if (deep) {
+          TemplateImpl.fixClonedDom(dom, element);
+        }
+        return dom;
+      }
+    };
+    if (needsCloning) {
+      HTMLTemplateElement.prototype.cloneNode = function(deep) {
+        return TemplateImpl.cloneNode(this, deep);
+      };
+    }
+  }
+  if (needsTemplate) {
+    HTMLTemplateElement = TemplateImpl;
+  }
+})();
+
+(function(scope) {
+  "use strict";
+  if (!window.performance) {
+    var start = Date.now();
+    window.performance = {
+      now: function() {
+        return Date.now() - start;
+      }
+    };
+  }
+  if (!window.requestAnimationFrame) {
+    window.requestAnimationFrame = function() {
+      var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
+      return nativeRaf ? function(callback) {
+        return nativeRaf(function() {
+          callback(performance.now());
+        });
+      } : function(callback) {
+        return window.setTimeout(callback, 1e3 / 60);
+      };
+    }();
+  }
+  if (!window.cancelAnimationFrame) {
+    window.cancelAnimationFrame = function() {
+      return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
+        clearTimeout(id);
+      };
+    }();
+  }
+  var workingDefaultPrevented = function() {
+    var e = document.createEvent("Event");
+    e.initEvent("foo", true, true);
+    e.preventDefault();
+    return e.defaultPrevented;
+  }();
+  if (!workingDefaultPrevented) {
+    var origPreventDefault = Event.prototype.preventDefault;
+    Event.prototype.preventDefault = function() {
+      if (!this.cancelable) {
+        return;
+      }
+      origPreventDefault.call(this);
+      Object.defineProperty(this, "defaultPrevented", {
+        get: function() {
+          return true;
+        },
+        configurable: true
+      });
+    };
+  }
+  var isIE = /Trident/.test(navigator.userAgent);
+  if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
+    window.CustomEvent = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("CustomEvent");
+      e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
+      return e;
+    };
+    window.CustomEvent.prototype = window.Event.prototype;
+  }
+  if (!window.Event || isIE && typeof window.Event !== "function") {
+    var origEvent = window.Event;
+    window.Event = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("Event");
+      e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
+      return e;
+    };
+    window.Event.prototype = origEvent.prototype;
+  }
+})(window.WebComponents);
+
+window.HTMLImports = window.HTMLImports || {
+  flags: {}
+};
+
+(function(scope) {
+  var IMPORT_LINK_TYPE = "import";
+  var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
+  var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
+  var wrap = function(node) {
+    return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
+  };
+  var rootDocument = wrap(document);
+  var currentScriptDescriptor = {
+    get: function() {
+      var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
+      return wrap(script);
+    },
+    configurable: true
+  };
+  Object.defineProperty(document, "_currentScript", currentScriptDescriptor);
+  Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor);
+  var isIE = /Trident/.test(navigator.userAgent);
+  function whenReady(callback, doc) {
+    doc = doc || rootDocument;
+    whenDocumentReady(function() {
+      watchImportsLoad(callback, doc);
+    }, doc);
+  }
+  var requiredReadyState = isIE ? "complete" : "interactive";
+  var READY_EVENT = "readystatechange";
+  function isDocumentReady(doc) {
+    return doc.readyState === "complete" || doc.readyState === requiredReadyState;
+  }
+  function whenDocumentReady(callback, doc) {
+    if (!isDocumentReady(doc)) {
+      var checkReady = function() {
+        if (doc.readyState === "complete" || doc.readyState === requiredReadyState) {
+          doc.removeEventListener(READY_EVENT, checkReady);
+          whenDocumentReady(callback, doc);
+        }
+      };
+      doc.addEventListener(READY_EVENT, checkReady);
+    } else if (callback) {
+      callback();
+    }
+  }
+  function markTargetLoaded(event) {
+    event.target.__loaded = true;
+  }
+  function watchImportsLoad(callback, doc) {
+    var imports = doc.querySelectorAll("link[rel=import]");
+    var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
+    function checkDone() {
+      if (parsedCount == importCount && callback) {
+        callback({
+          allImports: imports,
+          loadedImports: newImports,
+          errorImports: errorImports
+        });
+      }
+    }
+    function loadedImport(e) {
+      markTargetLoaded(e);
+      newImports.push(this);
+      parsedCount++;
+      checkDone();
+    }
+    function errorLoadingImport(e) {
+      errorImports.push(this);
+      parsedCount++;
+      checkDone();
+    }
+    if (importCount) {
+      for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
+        if (isImportLoaded(imp)) {
+          newImports.push(this);
+          parsedCount++;
+          checkDone();
+        } else {
+          imp.addEventListener("load", loadedImport);
+          imp.addEventListener("error", errorLoadingImport);
+        }
+      }
+    } else {
+      checkDone();
+    }
+  }
+  function isImportLoaded(link) {
+    return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed;
+  }
+  if (useNative) {
+    new MutationObserver(function(mxns) {
+      for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) {
+        if (m.addedNodes) {
+          handleImports(m.addedNodes);
+        }
+      }
+    }).observe(document.head, {
+      childList: true
+    });
+    function handleImports(nodes) {
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        if (isImport(n)) {
+          handleImport(n);
+        }
+      }
+    }
+    function isImport(element) {
+      return element.localName === "link" && element.rel === "import";
+    }
+    function handleImport(element) {
+      var loaded = element.import;
+      if (loaded) {
+        markTargetLoaded({
+          target: element
+        });
+      } else {
+        element.addEventListener("load", markTargetLoaded);
+        element.addEventListener("error", markTargetLoaded);
+      }
+    }
+    (function() {
+      if (document.readyState === "loading") {
+        var imports = document.querySelectorAll("link[rel=import]");
+        for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) {
+          handleImport(imp);
+        }
+      }
+    })();
+  }
+  whenReady(function(detail) {
+    window.HTMLImports.ready = true;
+    window.HTMLImports.readyTime = new Date().getTime();
+    var evt = rootDocument.createEvent("CustomEvent");
+    evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
+    rootDocument.dispatchEvent(evt);
+  });
+  scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
+  scope.useNative = useNative;
+  scope.rootDocument = rootDocument;
+  scope.whenReady = whenReady;
+  scope.isIE = isIE;
+})(window.HTMLImports);
+
+(function(scope) {
+  var modules = [];
+  var addModule = function(module) {
+    modules.push(module);
+  };
+  var initializeModules = function() {
+    modules.forEach(function(module) {
+      module(scope);
+    });
+  };
+  scope.addModule = addModule;
+  scope.initializeModules = initializeModules;
+})(window.HTMLImports);
+
+window.HTMLImports.addModule(function(scope) {
+  var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
+  var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
+  var path = {
+    resolveUrlsInStyle: function(style, linkUrl) {
+      var doc = style.ownerDocument;
+      var resolver = doc.createElement("a");
+      style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
+      return style;
+    },
+    resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
+      var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
+      r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
+      return r;
+    },
+    replaceUrls: function(text, urlObj, linkUrl, regexp) {
+      return text.replace(regexp, function(m, pre, url, post) {
+        var urlPath = url.replace(/["']/g, "");
+        if (linkUrl) {
+          urlPath = new URL(urlPath, linkUrl).href;
+        }
+        urlObj.href = urlPath;
+        urlPath = urlObj.href;
+        return pre + "'" + urlPath + "'" + post;
+      });
+    }
+  };
+  scope.path = path;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var xhr = {
+    async: true,
+    ok: function(request) {
+      return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
+    },
+    load: function(url, next, nextContext) {
+      var request = new XMLHttpRequest();
+      if (scope.flags.debug || scope.flags.bust) {
+        url += "?" + Math.random();
+      }
+      request.open("GET", url, xhr.async);
+      request.addEventListener("readystatechange", function(e) {
+        if (request.readyState === 4) {
+          var redirectedUrl = null;
+          try {
+            var locationHeader = request.getResponseHeader("Location");
+            if (locationHeader) {
+              redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+            }
+          } catch (e) {
+            console.error(e.message);
+          }
+          next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
+        }
+      });
+      request.send();
+      return request;
+    },
+    loadDocument: function(url, next, nextContext) {
+      this.load(url, next, nextContext).responseType = "document";
+    }
+  };
+  scope.xhr = xhr;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var xhr = scope.xhr;
+  var flags = scope.flags;
+  var Loader = function(onLoad, onComplete) {
+    this.cache = {};
+    this.onload = onLoad;
+    this.oncomplete = onComplete;
+    this.inflight = 0;
+    this.pending = {};
+  };
+  Loader.prototype = {
+    addNodes: function(nodes) {
+      this.inflight += nodes.length;
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        this.require(n);
+      }
+      this.checkDone();
+    },
+    addNode: function(node) {
+      this.inflight++;
+      this.require(node);
+      this.checkDone();
+    },
+    require: function(elt) {
+      var url = elt.src || elt.href;
+      elt.__nodeUrl = url;
+      if (!this.dedupe(url, elt)) {
+        this.fetch(url, elt);
+      }
+    },
+    dedupe: function(url, elt) {
+      if (this.pending[url]) {
+        this.pending[url].push(elt);
+        return true;
+      }
+      var resource;
+      if (this.cache[url]) {
+        this.onload(url, elt, this.cache[url]);
+        this.tail();
+        return true;
+      }
+      this.pending[url] = [ elt ];
+      return false;
+    },
+    fetch: function(url, elt) {
+      flags.load && console.log("fetch", url, elt);
+      if (!url) {
+        setTimeout(function() {
+          this.receive(url, elt, {
+            error: "href must be specified"
+          }, null);
+        }.bind(this), 0);
+      } else if (url.match(/^data:/)) {
+        var pieces = url.split(",");
+        var header = pieces[0];
+        var body = pieces[1];
+        if (header.indexOf(";base64") > -1) {
+          body = atob(body);
+        } else {
+          body = decodeURIComponent(body);
+        }
+        setTimeout(function() {
+          this.receive(url, elt, null, body);
+        }.bind(this), 0);
+      } else {
+        var receiveXhr = function(err, resource, redirectedUrl) {
+          this.receive(url, elt, err, resource, redirectedUrl);
+        }.bind(this);
+        xhr.load(url, receiveXhr);
+      }
+    },
+    receive: function(url, elt, err, resource, redirectedUrl) {
+      this.cache[url] = resource;
+      var $p = this.pending[url];
+      for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
+        this.onload(url, p, resource, err, redirectedUrl);
+        this.tail();
+      }
+      this.pending[url] = null;
+    },
+    tail: function() {
+      --this.inflight;
+      this.checkDone();
+    },
+    checkDone: function() {
+      if (!this.inflight) {
+        this.oncomplete();
+      }
+    }
+  };
+  scope.Loader = Loader;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var Observer = function(addCallback) {
+    this.addCallback = addCallback;
+    this.mo = new MutationObserver(this.handler.bind(this));
+  };
+  Observer.prototype = {
+    handler: function(mutations) {
+      for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) {
+        if (m.type === "childList" && m.addedNodes.length) {
+          this.addedNodes(m.addedNodes);
+        }
+      }
+    },
+    addedNodes: function(nodes) {
+      if (this.addCallback) {
+        this.addCallback(nodes);
+      }
+      for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) {
+        if (n.children && n.children.length) {
+          this.addedNodes(n.children);
+        }
+      }
+    },
+    observe: function(root) {
+      this.mo.observe(root, {
+        childList: true,
+        subtree: true
+      });
+    }
+  };
+  scope.Observer = Observer;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var path = scope.path;
+  var rootDocument = scope.rootDocument;
+  var flags = scope.flags;
+  var isIE = scope.isIE;
+  var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
+  var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
+  var importParser = {
+    documentSelectors: IMPORT_SELECTOR,
+    importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
+    map: {
+      link: "parseLink",
+      script: "parseScript",
+      style: "parseStyle"
+    },
+    dynamicElements: [],
+    parseNext: function() {
+      var next = this.nextToParse();
+      if (next) {
+        this.parse(next);
+      }
+    },
+    parse: function(elt) {
+      if (this.isParsed(elt)) {
+        flags.parse && console.log("[%s] is already parsed", elt.localName);
+        return;
+      }
+      var fn = this[this.map[elt.localName]];
+      if (fn) {
+        this.markParsing(elt);
+        fn.call(this, elt);
+      }
+    },
+    parseDynamic: function(elt, quiet) {
+      this.dynamicElements.push(elt);
+      if (!quiet) {
+        this.parseNext();
+      }
+    },
+    markParsing: function(elt) {
+      flags.parse && console.log("parsing", elt);
+      this.parsingElement = elt;
+    },
+    markParsingComplete: function(elt) {
+      elt.__importParsed = true;
+      this.markDynamicParsingComplete(elt);
+      if (elt.__importElement) {
+        elt.__importElement.__importParsed = true;
+        this.markDynamicParsingComplete(elt.__importElement);
+      }
+      this.parsingElement = null;
+      flags.parse && console.log("completed", elt);
+    },
+    markDynamicParsingComplete: function(elt) {
+      var i = this.dynamicElements.indexOf(elt);
+      if (i >= 0) {
+        this.dynamicElements.splice(i, 1);
+      }
+    },
+    parseImport: function(elt) {
+      elt.import = elt.__doc;
+      if (window.HTMLImports.__importsParsingHook) {
+        window.HTMLImports.__importsParsingHook(elt);
+      }
+      if (elt.import) {
+        elt.import.__importParsed = true;
+      }
+      this.markParsingComplete(elt);
+      if (elt.__resource && !elt.__error) {
+        elt.dispatchEvent(new CustomEvent("load", {
+          bubbles: false
+        }));
+      } else {
+        elt.dispatchEvent(new CustomEvent("error", {
+          bubbles: false
+        }));
+      }
+      if (elt.__pending) {
+        var fn;
+        while (elt.__pending.length) {
+          fn = elt.__pending.shift();
+          if (fn) {
+            fn({
+              target: elt
+            });
+          }
+        }
+      }
+      this.parseNext();
+    },
+    parseLink: function(linkElt) {
+      if (nodeIsImport(linkElt)) {
+        this.parseImport(linkElt);
+      } else {
+        linkElt.href = linkElt.href;
+        this.parseGeneric(linkElt);
+      }
+    },
+    parseStyle: function(elt) {
+      var src = elt;
+      elt = cloneStyle(elt);
+      src.__appliedElement = elt;
+      elt.__importElement = src;
+      this.parseGeneric(elt);
+    },
+    parseGeneric: function(elt) {
+      this.trackElement(elt);
+      this.addElementToDocument(elt);
+    },
+    rootImportForElement: function(elt) {
+      var n = elt;
+      while (n.ownerDocument.__importLink) {
+        n = n.ownerDocument.__importLink;
+      }
+      return n;
+    },
+    addElementToDocument: function(elt) {
+      var port = this.rootImportForElement(elt.__importElement || elt);
+      port.parentNode.insertBefore(elt, port);
+    },
+    trackElement: function(elt, callback) {
+      var self = this;
+      var done = function(e) {
+        elt.removeEventListener("load", done);
+        elt.removeEventListener("error", done);
+        if (callback) {
+          callback(e);
+        }
+        self.markParsingComplete(elt);
+        self.parseNext();
+      };
+      elt.addEventListener("load", done);
+      elt.addEventListener("error", done);
+      if (isIE && elt.localName === "style") {
+        var fakeLoad = false;
+        if (elt.textContent.indexOf("@import") == -1) {
+          fakeLoad = true;
+        } else if (elt.sheet) {
+          fakeLoad = true;
+          var csr = elt.sheet.cssRules;
+          var len = csr ? csr.length : 0;
+          for (var i = 0, r; i < len && (r = csr[i]); i++) {
+            if (r.type === CSSRule.IMPORT_RULE) {
+              fakeLoad = fakeLoad && Boolean(r.styleSheet);
+            }
+          }
+        }
+        if (fakeLoad) {
+          setTimeout(function() {
+            elt.dispatchEvent(new CustomEvent("load", {
+              bubbles: false
+            }));
+          });
+        }
+      }
+    },
+    parseScript: function(scriptElt) {
+      var script = document.createElement("script");
+      script.__importElement = scriptElt;
+      script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
+      scope.currentScript = scriptElt;
+      this.trackElement(script, function(e) {
+        if (script.parentNode) {
+          script.parentNode.removeChild(script);
+        }
+        scope.currentScript = null;
+      });
+      this.addElementToDocument(script);
+    },
+    nextToParse: function() {
+      this._mayParse = [];
+      return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic());
+    },
+    nextToParseInDoc: function(doc, link) {
+      if (doc && this._mayParse.indexOf(doc) < 0) {
+        this._mayParse.push(doc);
+        var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
+        for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+          if (!this.isParsed(n)) {
+            if (this.hasResource(n)) {
+              return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
+            } else {
+              return;
+            }
+          }
+        }
+      }
+      return link;
+    },
+    nextToParseDynamic: function() {
+      return this.dynamicElements[0];
+    },
+    parseSelectorsForNode: function(node) {
+      var doc = node.ownerDocument || node;
+      return doc === rootDocument ? this.documentSelectors : this.importsSelectors;
+    },
+    isParsed: function(node) {
+      return node.__importParsed;
+    },
+    needsDynamicParsing: function(elt) {
+      return this.dynamicElements.indexOf(elt) >= 0;
+    },
+    hasResource: function(node) {
+      if (nodeIsImport(node) && node.__doc === undefined) {
+        return false;
+      }
+      return true;
+    }
+  };
+  function nodeIsImport(elt) {
+    return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE;
+  }
+  function generateScriptDataUrl(script) {
+    var scriptContent = generateScriptContent(script);
+    return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent);
+  }
+  function generateScriptContent(script) {
+    return script.textContent + generateSourceMapHint(script);
+  }
+  function generateSourceMapHint(script) {
+    var owner = script.ownerDocument;
+    owner.__importedScripts = owner.__importedScripts || 0;
+    var moniker = script.ownerDocument.baseURI;
+    var num = owner.__importedScripts ? "-" + owner.__importedScripts : "";
+    owner.__importedScripts++;
+    return "\n//# sourceURL=" + moniker + num + ".js\n";
+  }
+  function cloneStyle(style) {
+    var clone = style.ownerDocument.createElement("style");
+    clone.textContent = style.textContent;
+    path.resolveUrlsInStyle(clone);
+    return clone;
+  }
+  scope.parser = importParser;
+  scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var flags = scope.flags;
+  var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
+  var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
+  var rootDocument = scope.rootDocument;
+  var Loader = scope.Loader;
+  var Observer = scope.Observer;
+  var parser = scope.parser;
+  var importer = {
+    documents: {},
+    documentPreloadSelectors: IMPORT_SELECTOR,
+    importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","),
+    loadNode: function(node) {
+      importLoader.addNode(node);
+    },
+    loadSubtree: function(parent) {
+      var nodes = this.marshalNodes(parent);
+      importLoader.addNodes(nodes);
+    },
+    marshalNodes: function(parent) {
+      return parent.querySelectorAll(this.loadSelectorsForNode(parent));
+    },
+    loadSelectorsForNode: function(node) {
+      var doc = node.ownerDocument || node;
+      return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors;
+    },
+    loaded: function(url, elt, resource, err, redirectedUrl) {
+      flags.load && console.log("loaded", url, elt);
+      elt.__resource = resource;
+      elt.__error = err;
+      if (isImportLink(elt)) {
+        var doc = this.documents[url];
+        if (doc === undefined) {
+          doc = err ? null : makeDocument(resource, redirectedUrl || url);
+          if (doc) {
+            doc.__importLink = elt;
+            this.bootDocument(doc);
+          }
+          this.documents[url] = doc;
+        }
+        elt.__doc = doc;
+      }
+      parser.parseNext();
+    },
+    bootDocument: function(doc) {
+      this.loadSubtree(doc);
+      this.observer.observe(doc);
+      parser.parseNext();
+    },
+    loadedAll: function() {
+      parser.parseNext();
+    }
+  };
+  var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer));
+  importer.observer = new Observer();
+  function isImportLink(elt) {
+    return isLinkRel(elt, IMPORT_LINK_TYPE);
+  }
+  function isLinkRel(elt, rel) {
+    return elt.localName === "link" && elt.getAttribute("rel") === rel;
+  }
+  function hasBaseURIAccessor(doc) {
+    return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
+  }
+  function makeDocument(resource, url) {
+    var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
+    doc._URL = url;
+    var base = doc.createElement("base");
+    base.setAttribute("href", url);
+    if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
+      Object.defineProperty(doc, "baseURI", {
+        value: url
+      });
+    }
+    var meta = doc.createElement("meta");
+    meta.setAttribute("charset", "utf-8");
+    doc.head.appendChild(meta);
+    doc.head.appendChild(base);
+    doc.body.innerHTML = resource;
+    if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) {
+      HTMLTemplateElement.bootstrap(doc);
+    }
+    return doc;
+  }
+  if (!document.baseURI) {
+    var baseURIDescriptor = {
+      get: function() {
+        var base = document.querySelector("base");
+        return base ? base.href : window.location.href;
+      },
+      configurable: true
+    };
+    Object.defineProperty(document, "baseURI", baseURIDescriptor);
+    Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor);
+  }
+  scope.importer = importer;
+  scope.importLoader = importLoader;
+});
+
+window.HTMLImports.addModule(function(scope) {
+  var parser = scope.parser;
+  var importer = scope.importer;
+  var dynamic = {
+    added: function(nodes) {
+      var owner, parsed, loading;
+      for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
+        if (!owner) {
+          owner = n.ownerDocument;
+          parsed = parser.isParsed(owner);
+        }
+        loading = this.shouldLoadNode(n);
+        if (loading) {
+          importer.loadNode(n);
+        }
+        if (this.shouldParseNode(n) && parsed) {
+          parser.parseDynamic(n, loading);
+        }
+      }
+    },
+    shouldLoadNode: function(node) {
+      return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node));
+    },
+    shouldParseNode: function(node) {
+      return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node));
+    }
+  };
+  importer.observer.addCallback = dynamic.added.bind(dynamic);
+  var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector;
+});
+
+(function(scope) {
+  var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
+  if (scope.useNative) {
+    return;
+  }
+  initializeModules();
+  var rootDocument = scope.rootDocument;
+  function bootstrap() {
+    window.HTMLImports.importer.bootDocument(rootDocument);
+  }
+  if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
+    bootstrap();
+  } else {
+    document.addEventListener("DOMContentLoaded", bootstrap);
+  }
+})(window.HTMLImports);
+
+window.CustomElements = window.CustomElements || {
+  flags: {}
+};
+
+(function(scope) {
+  var flags = scope.flags;
+  var modules = [];
+  var addModule = function(module) {
+    modules.push(module);
+  };
+  var initializeModules = function() {
+    modules.forEach(function(module) {
+      module(scope);
+    });
+  };
+  scope.addModule = addModule;
+  scope.initializeModules = initializeModules;
+  scope.hasNative = Boolean(document.registerElement);
+  scope.isIE = /Trident/.test(navigator.userAgent);
+  scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
+})(window.CustomElements);
+
+window.CustomElements.addModule(function(scope) {
+  var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
+  function forSubtree(node, cb) {
+    findAllElements(node, function(e) {
+      if (cb(e)) {
+        return true;
+      }
+      forRoots(e, cb);
+    });
+    forRoots(node, cb);
+  }
+  function findAllElements(node, find, data) {
+    var e = node.firstElementChild;
+    if (!e) {
+      e = node.firstChild;
+      while (e && e.nodeType !== Node.ELEMENT_NODE) {
+        e = e.nextSibling;
+      }
+    }
+    while (e) {
+      if (find(e, data) !== true) {
+        findAllElements(e, find, data);
+      }
+      e = e.nextElementSibling;
+    }
+    return null;
+  }
+  function forRoots(node, cb) {
+    var root = node.shadowRoot;
+    while (root) {
+      forSubtree(root, cb);
+      root = root.olderShadowRoot;
+    }
+  }
+  function forDocumentTree(doc, cb) {
+    _forDocumentTree(doc, cb, []);
+  }
+  function _forDocumentTree(doc, cb, processingDocuments) {
+    doc = window.wrap(doc);
+    if (processingDocuments.indexOf(doc) >= 0) {
+      return;
+    }
+    processingDocuments.push(doc);
+    var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
+    for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
+      if (n.import) {
+        _forDocumentTree(n.import, cb, processingDocuments);
+      }
+    }
+    cb(doc);
+  }
+  scope.forDocumentTree = forDocumentTree;
+  scope.forSubtree = forSubtree;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var flags = scope.flags;
+  var forSubtree = scope.forSubtree;
+  var forDocumentTree = scope.forDocumentTree;
+  function addedNode(node, isAttached) {
+    return added(node, isAttached) || addedSubtree(node, isAttached);
+  }
+  function added(node, isAttached) {
+    if (scope.upgrade(node, isAttached)) {
+      return true;
+    }
+    if (isAttached) {
+      attached(node);
+    }
+  }
+  function addedSubtree(node, isAttached) {
+    forSubtree(node, function(e) {
+      if (added(e, isAttached)) {
+        return true;
+      }
+    });
+  }
+  var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
+  scope.hasPolyfillMutations = hasThrottledAttached;
+  scope.hasThrottledAttached = hasThrottledAttached;
+  var isPendingMutations = false;
+  var pendingMutations = [];
+  function deferMutation(fn) {
+    pendingMutations.push(fn);
+    if (!isPendingMutations) {
+      isPendingMutations = true;
+      setTimeout(takeMutations);
+    }
+  }
+  function takeMutations() {
+    isPendingMutations = false;
+    var $p = pendingMutations;
+    for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) {
+      p();
+    }
+    pendingMutations = [];
+  }
+  function attached(element) {
+    if (hasThrottledAttached) {
+      deferMutation(function() {
+        _attached(element);
+      });
+    } else {
+      _attached(element);
+    }
+  }
+  function _attached(element) {
+    if (element.__upgraded__ && !element.__attached) {
+      element.__attached = true;
+      if (element.attachedCallback) {
+        element.attachedCallback();
+      }
+    }
+  }
+  function detachedNode(node) {
+    detached(node);
+    forSubtree(node, function(e) {
+      detached(e);
+    });
+  }
+  function detached(element) {
+    if (hasThrottledAttached) {
+      deferMutation(function() {
+        _detached(element);
+      });
+    } else {
+      _detached(element);
+    }
+  }
+  function _detached(element) {
+    if (element.__upgraded__ && element.__attached) {
+      element.__attached = false;
+      if (element.detachedCallback) {
+        element.detachedCallback();
+      }
+    }
+  }
+  function inDocument(element) {
+    var p = element;
+    var doc = window.wrap(document);
+    while (p) {
+      if (p == doc) {
+        return true;
+      }
+      p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
+    }
+  }
+  function watchShadow(node) {
+    if (node.shadowRoot && !node.shadowRoot.__watched) {
+      flags.dom && console.log("watching shadow-root for: ", node.localName);
+      var root = node.shadowRoot;
+      while (root) {
+        observe(root);
+        root = root.olderShadowRoot;
+      }
+    }
+  }
+  function handler(root, mutations) {
+    if (flags.dom) {
+      var mx = mutations[0];
+      if (mx && mx.type === "childList" && mx.addedNodes) {
+        if (mx.addedNodes) {
+          var d = mx.addedNodes[0];
+          while (d && d !== document && !d.host) {
+            d = d.parentNode;
+          }
+          var u = d && (d.URL || d._URL || d.host && d.host.localName) || "";
+          u = u.split("/?").shift().split("/").pop();
+        }
+      }
+      console.group("mutations (%d) [%s]", mutations.length, u || "");
+    }
+    var isAttached = inDocument(root);
+    mutations.forEach(function(mx) {
+      if (mx.type === "childList") {
+        forEach(mx.addedNodes, function(n) {
+          if (!n.localName) {
+            return;
+          }
+          addedNode(n, isAttached);
+        });
+        forEach(mx.removedNodes, function(n) {
+          if (!n.localName) {
+            return;
+          }
+          detachedNode(n);
+        });
+      }
+    });
+    flags.dom && console.groupEnd();
+  }
+  function takeRecords(node) {
+    node = window.wrap(node);
+    if (!node) {
+      node = window.wrap(document);
+    }
+    while (node.parentNode) {
+      node = node.parentNode;
+    }
+    var observer = node.__observer;
+    if (observer) {
+      handler(node, observer.takeRecords());
+      takeMutations();
+    }
+  }
+  var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach);
+  function observe(inRoot) {
+    if (inRoot.__observer) {
+      return;
+    }
+    var observer = new MutationObserver(handler.bind(this, inRoot));
+    observer.observe(inRoot, {
+      childList: true,
+      subtree: true
+    });
+    inRoot.__observer = observer;
+  }
+  function upgradeDocument(doc) {
+    doc = window.wrap(doc);
+    flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
+    var isMainDocument = doc === window.wrap(document);
+    addedNode(doc, isMainDocument);
+    observe(doc);
+    flags.dom && console.groupEnd();
+  }
+  function upgradeDocumentTree(doc) {
+    forDocumentTree(doc, upgradeDocument);
+  }
+  var originalCreateShadowRoot = Element.prototype.createShadowRoot;
+  if (originalCreateShadowRoot) {
+    Element.prototype.createShadowRoot = function() {
+      var root = originalCreateShadowRoot.call(this);
+      window.CustomElements.watchShadow(this);
+      return root;
+    };
+  }
+  scope.watchShadow = watchShadow;
+  scope.upgradeDocumentTree = upgradeDocumentTree;
+  scope.upgradeDocument = upgradeDocument;
+  scope.upgradeSubtree = addedSubtree;
+  scope.upgradeAll = addedNode;
+  scope.attached = attached;
+  scope.takeRecords = takeRecords;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var flags = scope.flags;
+  function upgrade(node, isAttached) {
+    if (node.localName === "template") {
+      if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
+        HTMLTemplateElement.decorate(node);
+      }
+    }
+    if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
+      var is = node.getAttribute("is");
+      var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
+      if (definition) {
+        if (is && definition.tag == node.localName || !is && !definition.extends) {
+          return upgradeWithDefinition(node, definition, isAttached);
+        }
+      }
+    }
+  }
+  function upgradeWithDefinition(element, definition, isAttached) {
+    flags.upgrade && console.group("upgrade:", element.localName);
+    if (definition.is) {
+      element.setAttribute("is", definition.is);
+    }
+    implementPrototype(element, definition);
+    element.__upgraded__ = true;
+    created(element);
+    if (isAttached) {
+      scope.attached(element);
+    }
+    scope.upgradeSubtree(element, isAttached);
+    flags.upgrade && console.groupEnd();
+    return element;
+  }
+  function implementPrototype(element, definition) {
+    if (Object.__proto__) {
+      element.__proto__ = definition.prototype;
+    } else {
+      customMixin(element, definition.prototype, definition.native);
+      element.__proto__ = definition.prototype;
+    }
+  }
+  function customMixin(inTarget, inSrc, inNative) {
+    var used = {};
+    var p = inSrc;
+    while (p !== inNative && p !== HTMLElement.prototype) {
+      var keys = Object.getOwnPropertyNames(p);
+      for (var i = 0, k; k = keys[i]; i++) {
+        if (!used[k]) {
+          Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k));
+          used[k] = 1;
+        }
+      }
+      p = Object.getPrototypeOf(p);
+    }
+  }
+  function created(element) {
+    if (element.createdCallback) {
+      element.createdCallback();
+    }
+  }
+  scope.upgrade = upgrade;
+  scope.upgradeWithDefinition = upgradeWithDefinition;
+  scope.implementPrototype = implementPrototype;
+});
+
+window.CustomElements.addModule(function(scope) {
+  var isIE = scope.isIE;
+  var upgradeDocumentTree = scope.upgradeDocumentTree;
+  var upgradeAll = scope.upgradeAll;
+  var upgradeWithDefinition = scope.upgradeWithDefinition;
+  var implementPrototype = scope.implementPrototype;
+  var useNative = scope.useNative;
+  function register(name, options) {
+    var definition = options || {};
+    if (!name) {
+      throw new Error("document.registerElement: first argument `name` must not be empty");
+    }
+    if (name.indexOf("-") < 0) {
+      throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'.");
+    }
+    if (isReservedTag(name)) {
+      throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid.");
+    }
+    if (getRegisteredDefinition(name)) {
+      throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered");
+    }
+    if (!definition.prototype) {
+      definition.prototype = Object.create(HTMLElement.prototype);
+    }
+    definition.__name = name.toLowerCase();
+    definition.lifecycle = definition.lifecycle || {};
+    definition.ancestry = ancestry(definition.extends);
+    resolveTagName(definition);
+    resolvePrototypeChain(definition);
+    overrideAttributeApi(definition.prototype);
+    registerDefinition(definition.__name, definition);
+    definition.ctor = generateConstructor(definition);
+    definition.ctor.prototype = definition.prototype;
+    definition.prototype.constructor = definition.ctor;
+    if (scope.ready) {
+      upgradeDocumentTree(document);
+    }
+    return definition.ctor;
+  }
+  function overrideAttributeApi(prototype) {
+    if (prototype.setAttribute._polyfilled) {
+      return;
+    }
+    var setAttribute = prototype.setAttribute;
+    prototype.setAttribute = function(name, value) {
+      changeAttribute.call(this, name, value, setAttribute);
+    };
+    var removeAttribute = prototype.removeAttribute;
+    prototype.removeAttribute = function(name) {
+      changeAttribute.call(this, name, null, removeAttribute);
+    };
+    prototype.setAttribute._polyfilled = true;
+  }
+  function changeAttribute(name, value, operation) {
+    name = name.toLowerCase();
+    var oldValue = this.getAttribute(name);
+    operation.apply(this, arguments);
+    var newValue = this.getAttribute(name);
+    if (this.attributeChangedCallback && newValue !== oldValue) {
+      this.attributeChangedCallback(name, oldValue, newValue);
+    }
+  }
+  function isReservedTag(name) {
+    for (var i = 0; i < reservedTagList.length; i++) {
+      if (name === reservedTagList[i]) {
+        return true;
+      }
+    }
+  }
+  var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ];
+  function ancestry(extnds) {
+    var extendee = getRegisteredDefinition(extnds);
+    if (extendee) {
+      return ancestry(extendee.extends).concat([ extendee ]);
+    }
+    return [];
+  }
+  function resolveTagName(definition) {
+    var baseTag = definition.extends;
+    for (var i = 0, a; a = definition.ancestry[i]; i++) {
+      baseTag = a.is && a.tag;
+    }
+    definition.tag = baseTag || definition.__name;
+    if (baseTag) {
+      definition.is = definition.__name;
+    }
+  }
+  function resolvePrototypeChain(definition) {
+    if (!Object.__proto__) {
+      var nativePrototype = HTMLElement.prototype;
+      if (definition.is) {
+        var inst = document.createElement(definition.tag);
+        nativePrototype = Object.getPrototypeOf(inst);
+      }
+      var proto = definition.prototype, ancestor;
+      var foundPrototype = false;
+      while (proto) {
+        if (proto == nativePrototype) {
+          foundPrototype = true;
+        }
+        ancestor = Object.getPrototypeOf(proto);
+        if (ancestor) {
+          proto.__proto__ = ancestor;
+        }
+        proto = ancestor;
+      }
+      if (!foundPrototype) {
+        console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);
+      }
+      definition.native = nativePrototype;
+    }
+  }
+  function instantiate(definition) {
+    return upgradeWithDefinition(domCreateElement(definition.tag), definition);
+  }
+  var registry = {};
+  function getRegisteredDefinition(name) {
+    if (name) {
+      return registry[name.toLowerCase()];
+    }
+  }
+  function registerDefinition(name, definition) {
+    registry[name] = definition;
+  }
+  function generateConstructor(definition) {
+    return function() {
+      return instantiate(definition);
+    };
+  }
+  var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+  function createElementNS(namespace, tag, typeExtension) {
+    if (namespace === HTML_NAMESPACE) {
+      return createElement(tag, typeExtension);
+    } else {
+      return domCreateElementNS(namespace, tag);
+    }
+  }
+  function createElement(tag, typeExtension) {
+    if (tag) {
+      tag = tag.toLowerCase();
+    }
+    if (typeExtension) {
+      typeExtension = typeExtension.toLowerCase();
+    }
+    var definition = getRegisteredDefinition(typeExtension || tag);
+    if (definition) {
+      if (tag == definition.tag && typeExtension == definition.is) {
+        return new definition.ctor();
+      }
+      if (!typeExtension && !definition.is) {
+        return new definition.ctor();
+      }
+    }
+    var element;
+    if (typeExtension) {
+      element = createElement(tag);
+      element.setAttribute("is", typeExtension);
+      return element;
+    }
+    element = domCreateElement(tag);
+    if (tag.indexOf("-") >= 0) {
+      implementPrototype(element, HTMLElement);
+    }
+    return element;
+  }
+  var domCreateElement = document.createElement.bind(document);
+  var domCreateElementNS = document.createElementNS.bind(document);
+  var isInstance;
+  if (!Object.__proto__ && !useNative) {
+    isInstance = function(obj, ctor) {
+      if (obj instanceof ctor) {
+        return true;
+      }
+      var p = obj;
+      while (p) {
+        if (p === ctor.prototype) {
+          return true;
+        }
+        p = p.__proto__;
+      }
+      return false;
+    };
+  } else {
+    isInstance = function(obj, base) {
+      return obj instanceof base;
+    };
+  }
+  function wrapDomMethodToForceUpgrade(obj, methodName) {
+    var orig = obj[methodName];
+    obj[methodName] = function() {
+      var n = orig.apply(this, arguments);
+      upgradeAll(n);
+      return n;
+    };
+  }
+  wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
+  wrapDomMethodToForceUpgrade(document, "importNode");
+  if (isIE) {
+    (function() {
+      var importNode = document.importNode;
+      document.importNode = function() {
+        var n = importNode.apply(document, arguments);
+        if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+          var f = document.createDocumentFragment();
+          f.appendChild(n);
+          return f;
+        } else {
+          return n;
+        }
+      };
+    })();
+  }
+  document.registerElement = register;
+  document.createElement = createElement;
+  document.createElementNS = createElementNS;
+  scope.registry = registry;
+  scope.instanceof = isInstance;
+  scope.reservedTagList = reservedTagList;
+  scope.getRegisteredDefinition = getRegisteredDefinition;
+  document.register = document.registerElement;
+});
+
+(function(scope) {
+  var useNative = scope.useNative;
+  var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
+  if (useNative) {
+    var nop = function() {};
+    scope.watchShadow = nop;
+    scope.upgrade = nop;
+    scope.upgradeAll = nop;
+    scope.upgradeDocumentTree = nop;
+    scope.upgradeSubtree = nop;
+    scope.takeRecords = nop;
+    scope.instanceof = function(obj, base) {
+      return obj instanceof base;
+    };
+  } else {
+    initializeModules();
+  }
+  var upgradeDocumentTree = scope.upgradeDocumentTree;
+  var upgradeDocument = scope.upgradeDocument;
+  if (!window.wrap) {
+    if (window.ShadowDOMPolyfill) {
+      window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
+      window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
+    } else {
+      window.wrap = window.unwrap = function(node) {
+        return node;
+      };
+    }
+  }
+  if (window.HTMLImports) {
+    window.HTMLImports.__importsParsingHook = function(elt) {
+      if (elt.import) {
+        upgradeDocument(wrap(elt.import));
+      }
+    };
+  }
+  function bootstrap() {
+    upgradeDocumentTree(window.wrap(document));
+    window.CustomElements.ready = true;
+    var requestAnimationFrame = window.requestAnimationFrame || function(f) {
+      setTimeout(f, 16);
+    };
+    requestAnimationFrame(function() {
+      setTimeout(function() {
+        window.CustomElements.readyTime = Date.now();
+        if (window.HTMLImports) {
+          window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
+        }
+        document.dispatchEvent(new CustomEvent("WebComponentsReady", {
+          bubbles: true
+        }));
+      });
+    });
+  }
+  if (document.readyState === "complete" || scope.flags.eager) {
+    bootstrap();
+  } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
+    bootstrap();
+  } else {
+    var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
+    window.addEventListener(loadEvent, bootstrap);
+  }
+})(window.CustomElements);
+
+(function(scope) {
+  var style = document.createElement("style");
+  style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
+  var head = document.querySelector("head");
+  head.insertBefore(style, head.firstChild);
+})(window.WebComponents);
\ No newline at end of file
diff --git a/packages/web_components/lib/webcomponents-lite.min.js b/packages/web_components/lib/webcomponents-lite.min.js
new file mode 100644
index 0000000..0741ca5
--- /dev/null
+++ b/packages/web_components/lib/webcomponents-lite.min.js
@@ -0,0 +1,12 @@
+/**
+ * @license
+ * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+ * Code distributed by Google as part of the polymer project is also
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+ */
+// @version 0.7.21
+!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents-lite.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,o=e.split("=");o[0]&&(t=o[0].match(/wc-(.+)/))&&(n[t[1]]=o[1]||!0)}),t)for(var o,r=0;o=t.attributes[r];r++)"src"!==o.name&&(n[o.name]=o.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),function(e){"use strict";function t(e){return void 0!==h[e]}function n(){s.call(this),this._isInvalid=!0}function o(e){return""==e&&n.call(this),e.toLowerCase()}function r(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){g.push(e)}var d=a||"scheme start",u=0,l="",w=!1,_=!1,g=[];e:for(;(e[u-1]!=p||0==u)&&!this._isInvalid;){var b=e[u];switch(d){case"scheme start":if(!b||!m.test(b)){if(a){c("Invalid scheme.");break e}l="",d="no scheme";continue}l+=b.toLowerCase(),d="scheme";break;case"scheme":if(b&&v.test(b))l+=b.toLowerCase();else{if(":"!=b){if(a){if(p==b)break e;c("Code point not allowed in scheme: "+b);break e}l="",u=0,d="no scheme";continue}if(this._scheme=l,l="",a)break e;t(this._scheme)&&(this._isRelative=!0),d="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",d="query"):"#"==b?(this._fragment="#",d="fragment"):p!=b&&"	"!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=r(b));break;case"no scheme":if(s&&t(s._scheme)){d="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=b||"/"!=e[u+1]){c("Expected /, got: "+b),d="relative";continue}d="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),p==b){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==b||"\\"==b)"\\"==b&&c("\\ is an invalid code point."),d="relative slash";else if("?"==b)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,d="query";else{if("#"!=b){var y=e[u+1],E=e[u+2];("file"!=this._scheme||!m.test(b)||":"!=y&&"|"!=y||p!=E&&"/"!=E&&"\\"!=E&&"?"!=E&&"#"!=E)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),d="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,d="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),d="relative path";continue}"\\"==b&&c("\\ is an invalid code point."),d="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){c("Expected '/', got: "+b),d="authority ignore slashes";continue}d="authority second slash";break;case"authority second slash":if(d="authority ignore slashes","/"!=b){c("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){d="authority";continue}c("Expected authority, got: "+b);break;case"authority":if("@"==b){w&&(c("@ already seen."),l+="%40"),w=!0;for(var L=0;L<l.length;L++){var N=l[L];if("	"!=N&&"\n"!=N&&"\r"!=N)if(":"!=N||null!==this._password){var M=r(N);null!==this._password?this._password+=M:this._username+=M}else this._password="";else c("Invalid whitespace in authority.")}l=""}else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){u-=l.length,l="",d="host";continue}l+=b}break;case"file host":if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){2!=l.length||!m.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?d="relative path start":(this._host=o.call(this,l),l="",d="relative path start"):d="relative path";continue}"	"==b||"\n"==b||"\r"==b?c("Invalid whitespace in file host."):l+=b;break;case"host":case"hostname":if(":"!=b||_){if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){if(this._host=o.call(this,l),l="",d="relative path start",a)break e;continue}"	"!=b&&"\n"!=b&&"\r"!=b?("["==b?_=!0:"]"==b&&(_=!1),l+=b):c("Invalid code point in host/hostname: "+b)}else if(this._host=o.call(this,l),l="",d="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(b))l+=b;else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b||a){if(""!=l){var T=parseInt(l,10);T!=h[this._scheme]&&(this._port=T+""),l=""}if(a)break e;d="relative path start";continue}"	"==b||"\n"==b||"\r"==b?c("Invalid code point in port: "+b):n.call(this)}break;case"relative path start":if("\\"==b&&c("'\\' not allowed in path."),d="relative path","/"!=b&&"\\"!=b)continue;break;case"relative path":if(p!=b&&"/"!=b&&"\\"!=b&&(a||"?"!=b&&"#"!=b))"	"!=b&&"\n"!=b&&"\r"!=b&&(l+=r(b));else{"\\"==b&&c("\\ not allowed in relative path.");var O;(O=f[l.toLowerCase()])&&(l=O),".."==l?(this._path.pop(),"/"!=b&&"\\"!=b&&this._path.push("")):"."==l&&"/"!=b&&"\\"!=b?this._path.push(""):"."!=l&&("file"==this._scheme&&0==this._path.length&&2==l.length&&m.test(l[0])&&"|"==l[1]&&(l=l[0]+":"),this._path.push(l)),l="","?"==b?(this._query="?",d="query"):"#"==b&&(this._fragment="#",d="fragment")}break;case"query":a||"#"!=b?p!=b&&"	"!=b&&"\n"!=b&&"\r"!=b&&(this._query+=i(b)):(this._fragment="#",d="fragment");break;case"fragment":p!=b&&"	"!=b&&"\n"!=b&&"\r"!=b&&(this._fragment+=b)}u++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var d=!1;if(!e.forceJURL)try{var u=new URL("b","http://a");u.pathname="c%20d",d="http://a/c%20d"===u.href}catch(l){}if(!d){var h=Object.create(null);h.ftp=21,h.file=0,h.gopher=70,h.http=80,h.https=443,h.ws=80,h.wss=443;var f=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";var p=void 0,m=/[a-zA-Z]/,v=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return(""!=this._username||null!=this._password)&&(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var w=e.URL;w&&(c.createObjectURL=function(e){return w.createObjectURL.apply(w,arguments)},c.revokeObjectURL=function(e){w.revokeObjectURL(e)}),e.URL=c}}(self),"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),function(e){function t(e){b.push(e),g||(g=!0,m(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){g=!1;var e=b;b=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r<o.length;r++){var i=o[r],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++y}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function d(e,t){return E=new s(e,t)}function u(e){return L?L:(L=c(E),L.oldValue=e,L)}function l(){E=L=void 0}function h(e){return e===L||e===E}function f(e,t){return e===t?e:L&&h(e)?L:null}function p(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,v=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var w=[],_=String(Math.random());window.addEventListener("message",function(e){if(e.data===_){var t=w;w=[],t.forEach(function(e){e()})}}),m=function(e){w.push(e),window.postMessage(_,"*")}}var g=!1,b=[],y=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var o=v.get(e);o||v.set(e,o=[]);for(var r,i=0;i<o.length;i++)if(o[i].observer===this){r=o[i],r.removeListeners(),r.options=t;break}r||(r=new p(this,e,t),o.push(r),this.nodes_.push(e)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=v.get(e),n=0;n<t.length;n++){var o=t[n];if(o.observer===this){o.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var E,L;p.prototype={enqueue:function(e){var n=this.observer.records_,o=n.length;if(n.length>0){var r=n[o-1],i=f(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,o=e.target,r=new d("attributes",o);r.attributeName=t,r.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(o,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):r});break;case"DOMCharacterDataModified":var o=e.target,r=d("characterData",o),a=e.prevValue;i(o,function(e){return e.characterData?e.characterDataOldValue?u(a):r:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,h=e.target;"DOMNodeInserted"===e.type?(s=[h],c=[]):(s=[],c=[h]);var f=h.previousSibling,p=h.nextSibling,r=d("childList",e.target.parentNode);r.addedNodes=s,r.removedNodes=c,r.previousSibling=f,r.nextSibling=p,i(e.relatedNode,function(e){return e.childList?r:void 0})}l()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(){function e(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}function t(t){return t.replace(l,e)}var n="undefined"==typeof HTMLTemplateElement,o=function(){if(!n){var e=document.createDocumentFragment(),t=document.createElement("template");e.appendChild(t),t.content.appendChild(document.createElement("div"));var o=e.cloneNode(!0);return 0===o.firstChild.content.childNodes.length}}(),r="template",i=function(){};if(n){var a=document.implementation.createHTMLDocument("template"),s=!0,c=document.createElement("style");c.textContent=r+"{display:none;}";var d=document.head;d.insertBefore(c,d.firstElementChild),i.prototype=Object.create(HTMLElement.prototype),i.decorate=function(e){if(!e.content){e.content=a.createDocumentFragment();for(var n;n=e.firstChild;)e.content.appendChild(n);if(s)try{Object.defineProperty(e,"innerHTML",{get:function(){for(var e="",n=this.content.firstChild;n;n=n.nextSibling)e+=n.outerHTML||t(n.data);return e},set:function(e){for(a.body.innerHTML=e,i.bootstrap(a);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;a.body.firstChild;)this.content.appendChild(a.body.firstChild)},configurable:!0}),e.cloneNode=function(e){return i.cloneNode(this,e)}}catch(o){s=!1}i.bootstrap(e.content)}},i.bootstrap=function(e){for(var t,n=e.querySelectorAll(r),o=0,a=n.length;a>o&&(t=n[o]);o++)i.decorate(t)},document.addEventListener("DOMContentLoaded",function(){i.bootstrap(document)});var u=document.createElement;document.createElement=function(){"use strict";var e=u.apply(document,arguments);return"template"==e.localName&&i.decorate(e),e};var l=/[&\u00A0<>]/g}if(n||o){var h=Node.prototype.cloneNode;i.cloneNode=function(e,t){var n=h.call(e);return this.decorate&&this.decorate(n),t&&(n.content.appendChild(h.call(e.content,!0)),this.fixClonedDom(n.content,e.content)),n},i.fixClonedDom=function(e,t){for(var n,o,i=t.querySelectorAll(r),a=e.querySelectorAll(r),s=0,c=a.length;c>s;s++)o=i[s],n=a[s],this.decorate&&this.decorate(o),n.parentNode.replaceChild(o.cloneNode(!0),n)};var f=document.importNode;Node.prototype.cloneNode=function(e){var t=h.call(this,e);return e&&i.fixClonedDom(t,this),t},document.importNode=function(e,t){if(e.localName===r)return i.cloneNode(e,t);var n=f.call(document,e,t);return t&&i.fixClonedDom(n,e),n},o&&(HTMLTemplateElement.prototype.cloneNode=function(e){return i.cloneNode(this,e)})}n&&(HTMLTemplateElement=i)}(),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var r=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||r&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||r&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,o(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===w}function o(e,t){if(n(t))e&&e();else{var r=function(){("complete"===t.readyState||t.readyState===w)&&(t.removeEventListener(_,r),o(e,t))};t.addEventListener(_,r)}}function r(e){e.target.__loaded=!0}function i(e,t){function n(){c==d&&e&&e({allImports:s,loadedImports:u,errorImports:l})}function o(e){r(e),u.push(this),c++,n()}function i(e){l.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,d=s.length,u=[],l=[];if(d)for(var h,f=0;d>f&&(h=s[f]);f++)a(h)?(u.push(this),c++,n()):(h.addEventListener("load",o),h.addEventListener("error",i));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?r({target:e}):(e.addEventListener("load",r),e.addEventListener("error",r))}var u="import",l=Boolean(u in document.createElement("link")),h=Boolean(window.ShadowDOMPolyfill),f=function(e){return h?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},p=f(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(p,"_currentScript",m);var v=/Trident/.test(navigator.userAgent),w=v?"complete":"interactive",_="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,o=t.length;o>n&&(e=t[n]);n++)d(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=p.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),p.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},o=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=o}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,o={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,o=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,o),e},resolveUrlsInCssText:function(e,o,r){var i=this.replaceUrls(e,r,o,t);return i=this.replaceUrls(i,r,o,n)},replaceUrls:function(e,t,n,o){return e.replace(o,function(e,o,r,i){var a=r.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,o+"'"+a+"'"+i})}};e.path=o}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,o,r){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}o.call(r,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,o=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};o.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,o){if(n.load&&console.log("fetch",e,o),e)if(e.match(/^data:/)){var r=e.split(","),i=r[0],a=r[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,o,null,a)}.bind(this),0)}else{var s=function(t,n,r){this.receive(e,o,t,n,r)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,o,r){this.cache[e]=o;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,o,n,r),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=o}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=o(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function o(e){return e.textContent+r(e)}function r(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,o=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+o+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",h={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,o=function(r){e.removeEventListener("load",o),e.removeEventListener("error",o),t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",o),e.addEventListener("error",o),d&&"style"===e.localName){var r=!1;if(-1==e.textContent.indexOf("@import"))r=!0;else if(e.sheet){r=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(r=r&&Boolean(i.styleSheet))}r&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var o=document.createElement("script");o.__importElement=t,o.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(o,function(t){o.parentNode&&o.parentNode.removeChild(o),e.currentScript=null}),this.addElementToDocument(o)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var o,r=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=r.length;a>i&&(o=r[i]);i++)if(!this.isParsed(o))return this.hasResource(o)?t(o)?this.nextToParseInDoc(o.__doc,o):o:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.__doc?!1:!0}};e.parser=h,e.IMPORT_SELECTOR=l}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function o(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function r(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var r=n.createElement("base");r.setAttribute("href",t),n.baseURI||o(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,u=e.Observer,l=e.parser,h={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){f.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);f.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,o,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=o,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:r(o,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},f=new d(h.loaded.bind(h),h.loadedAll.bind(h));if(h.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(c,"baseURI",p)}e.importer=h,e.importLoader=f}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,o={added:function(e){for(var o,r,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)o||(o=a.ownerDocument,r=t.isParsed(o)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&r&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&r.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&r.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=o.added.bind(o);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(o)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var o,r=e.querySelectorAll("link[rel="+a+"]"),s=0,c=r.length;c>s&&(o=r[s]);s++)o["import"]&&i(o["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||o(e,t)}function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}function o(e,t){g(e,function(e){return n(e,t)?!0:void 0})}function r(e){L.push(e),E||(E=!0,setTimeout(i))}function i(){E=!1;for(var e,t=L,n=0,o=t.length;o>n&&(e=t[n]);n++)e();L=[]}function a(e){y?r(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){d(e),g(e,function(e){d(e)})}function d(e){y?r(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function l(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;
+t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function h(e){if(e.shadowRoot&&!e.shadowRoot.__watched){_.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function f(e,n){if(_.dom){var o=n[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var r=o.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var i=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=l(e);n.forEach(function(e){"childList"===e.type&&(N(e.addedNodes,function(e){e.localName&&t(e,a)}),N(e.removedNodes,function(e){e.localName&&c(e)}))}),_.dom&&console.groupEnd()}function p(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(f(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(f.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=window.wrap(e),_.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),_.dom&&console.groupEnd()}function w(e){b(e,v)}var _=e.flags,g=e.forSubtree,b=e.forDocumentTree,y=window.MutationObserver._isPolyfilled&&_["throttle-attached"];e.hasPolyfillMutations=y,e.hasThrottledAttached=y;var E=!1,L=[],N=Array.prototype.forEach.call.bind(Array.prototype.forEach),M=Element.prototype.createShadowRoot;M&&(Element.prototype.createShadowRoot=function(){var e=M.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=h,e.upgradeDocumentTree=w,e.upgradeDocument=v,e.upgradeSubtree=o,e.upgradeAll=t,e.attached=a,e.takeRecords=p}),window.CustomElements.addModule(function(e){function t(t,o){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(r);if(i&&(r&&i.tag==t.localName||!r&&!i["extends"]))return n(t,i,o)}}function n(t,n,r){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),r&&e.attached(t),e.upgradeSubtree(t,r),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),s=0;i=a[s];s++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),window.CustomElements.addModule(function(e){function t(t,o){var c=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(d(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=l(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&w(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t<E.length;t++)if(e===E[t])return!0}function i(e){var t=d(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],o=0;t=e.ancestry[o];o++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var o,r=e.prototype,i=!1;r;)r==t&&(i=!0),o=Object.getPrototypeOf(r),o&&(r.__proto__=o),r=o;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function c(e){return g(M(e.tag),e)}function d(e){return e?L[e.toLowerCase()]:void 0}function u(e,t){L[e]=t}function l(e){return function(){return c(e)}}function h(e,t,n){return e===N?f(t,n):T(e,t)}function f(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=d(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var o;return t?(o=f(e),o.setAttribute("is",t),o):(o=M(e),e.indexOf("-")>=0&&b(o,HTMLElement),o)}function p(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return _(e),e}}var m,v=e.isIE,w=e.upgradeDocumentTree,_=e.upgradeAll,g=e.upgradeWithDefinition,b=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],L={},N="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),T=document.createElementNS.bind(document);m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),v&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=f,document.createElementNS=h,e.registry=L,e["instanceof"]=m,e.reservedTagList=E,e.getRegisteredDefinition=d,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,o=e.initializeModules;e.isIE;if(n){var r=function(){};e.watchShadow=r,e.upgrade=r,e.upgradeAll=r,e.upgradeDocumentTree=r,e.upgradeSubtree=r,e.takeRecords=r,e["instanceof"]=function(e,t){return e instanceof t}}else o();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents);
\ No newline at end of file
diff --git a/packages/web_components/lib/webcomponents.js b/packages/web_components/lib/webcomponents.js
index 8e6523a..8e9feb2 100644
--- a/packages/web_components/lib/webcomponents.js
+++ b/packages/web_components/lib/webcomponents.js
@@ -7,17 +7,21 @@
  * Code distributed by Google as part of the polymer project is also
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  */
-// @version 0.5.1
-window.WebComponents = window.WebComponents || {};
-
-(function(scope) {
-  var flags = scope.flags || {};
+// @version 0.7.21
+(function() {
+  window.WebComponents = window.WebComponents || {
+    flags: {}
+  };
   var file = "webcomponents.js";
   var script = document.querySelector('script[src*="' + file + '"]');
+  var flags = {};
   if (!flags.noOpts) {
-    location.search.slice(1).split("&").forEach(function(o) {
-      o = o.split("=");
-      o[0] && (flags[o[0]] = o[1] || true);
+    location.search.slice(1).split("&").forEach(function(option) {
+      var parts = option.split("=");
+      var match;
+      if (parts[0] && (match = parts[0].match(/wc-(.+)/))) {
+        flags[match[1]] = parts[1] || true;
+      }
     });
     if (script) {
       for (var i = 0, a; a = script.attributes[i]; i++) {
@@ -26,7 +30,7 @@
         }
       }
     }
-    if (flags.log) {
+    if (flags.log && flags.log.split) {
       var parts = flags.log.split(",");
       flags.log = {};
       parts.forEach(function(f) {
@@ -48,8 +52,8 @@
     };
     window.CustomElements.flags.register = flags.register;
   }
-  scope.flags = flags;
-})(WebComponents);
+  WebComponents.flags = flags;
+})();
 
 if (WebComponents.flags.shadow) {
   if (typeof WeakMap === "undefined") {
@@ -155,13 +159,20 @@
       defineProperty(object, name, nonEnumerableDataDescriptor);
     }
     getOwnPropertyNames(window);
-    function getWrapperConstructor(node) {
+    function getWrapperConstructor(node, opt_instance) {
       var nativePrototype = node.__proto__ || Object.getPrototypeOf(node);
+      if (isFirefox) {
+        try {
+          getOwnPropertyNames(nativePrototype);
+        } catch (error) {
+          nativePrototype = nativePrototype.__proto__;
+        }
+      }
       var wrapperConstructor = constructorTable.get(nativePrototype);
       if (wrapperConstructor) return wrapperConstructor;
       var parentWrapperConstructor = getWrapperConstructor(nativePrototype);
       var GeneratedWrapper = createWrapperConstructor(parentWrapperConstructor);
-      registerInternal(nativePrototype, GeneratedWrapper, node);
+      registerInternal(nativePrototype, GeneratedWrapper, opt_instance);
       return GeneratedWrapper;
     }
     function addForwardingProperties(nativePrototype, wrapperPrototype) {
@@ -181,7 +192,7 @@
       return /^on[a-z]+$/.test(name);
     }
     function isIdentifierName(name) {
-      return /^\w[a-zA-Z_0-9]*$/.test(name);
+      return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
     }
     function getGetter(name) {
       return hasEval && isIdentifierName(name) ? new Function("return this.__impl4cf1e782hg__." + name) : function() {
@@ -221,8 +232,10 @@
         }
         var descriptor = getDescriptor(source, name);
         var getter, setter;
-        if (allowMethod && typeof descriptor.value === "function") {
-          target[name] = getMethod(name);
+        if (typeof descriptor.value === "function") {
+          if (allowMethod) {
+            target[name] = getMethod(name);
+          }
           continue;
         }
         var isEvent = isEventHandlerName(name);
@@ -230,15 +243,19 @@
         if (descriptor.writable || descriptor.set || isBrokenSafari) {
           if (isEvent) setter = scope.getEventHandlerSetter(name); else setter = getSetter(name);
         }
+        var configurable = isBrokenSafari || descriptor.configurable;
         defineProperty(target, name, {
           get: getter,
           set: setter,
-          configurable: descriptor.configurable,
+          configurable: configurable,
           enumerable: descriptor.enumerable
         });
       }
     }
     function register(nativeConstructor, wrapperConstructor, opt_instance) {
+      if (nativeConstructor == null) {
+        return;
+      }
       var nativePrototype = nativeConstructor.prototype;
       registerInternal(nativePrototype, wrapperConstructor, opt_instance);
       mixinStatics(wrapperConstructor, nativeConstructor);
@@ -281,7 +298,11 @@
     function wrap(impl) {
       if (impl === null) return null;
       assert(isNative(impl));
-      return impl.__wrapper8e3dd93a60__ || (impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl))(impl));
+      var wrapper = impl.__wrapper8e3dd93a60__;
+      if (wrapper != null) {
+        return wrapper;
+      }
+      return impl.__wrapper8e3dd93a60__ = new (getWrapperConstructor(impl, impl))(impl);
     }
     function unwrap(wrapper) {
       if (wrapper === null) return null;
@@ -331,11 +352,13 @@
         });
       });
     }
+    scope.addForwardingProperties = addForwardingProperties;
     scope.assert = assert;
     scope.constructorTable = constructorTable;
     scope.defineGetter = defineGetter;
     scope.defineWrapGetter = defineWrapGetter;
     scope.forwardMethodsToWrapper = forwardMethodsToWrapper;
+    scope.isIdentifierName = isIdentifierName;
     scope.isWrapper = isWrapper;
     scope.isWrapperFor = isWrapperFor;
     scope.mixin = mixin;
@@ -1137,6 +1160,24 @@
         stopImmediatePropagationTable.set(this, true);
       }
     };
+    var supportsDefaultPrevented = function() {
+      var e = document.createEvent("Event");
+      e.initEvent("test", true, true);
+      e.preventDefault();
+      return e.defaultPrevented;
+    }();
+    if (!supportsDefaultPrevented) {
+      Event.prototype.preventDefault = function() {
+        if (!this.cancelable) return;
+        unsafeUnwrap(this).preventDefault();
+        Object.defineProperty(this, "defaultPrevented", {
+          get: function() {
+            return true;
+          },
+          configurable: true
+        });
+      };
+    }
     registerWrapper(OriginalEvent, Event, document.createEvent("Event"));
     function unwrapOptions(options) {
       if (!options || !options.relatedTarget) return options;
@@ -1756,11 +1797,12 @@
     var OriginalDocumentFragment = window.DocumentFragment;
     var originalAppendChild = OriginalNode.prototype.appendChild;
     var originalCompareDocumentPosition = OriginalNode.prototype.compareDocumentPosition;
+    var originalIsEqualNode = OriginalNode.prototype.isEqualNode;
     var originalInsertBefore = OriginalNode.prototype.insertBefore;
     var originalRemoveChild = OriginalNode.prototype.removeChild;
     var originalReplaceChild = OriginalNode.prototype.replaceChild;
-    var isIe = /Trident/.test(navigator.userAgent);
-    var removeChildOriginalHelper = isIe ? function(parent, child) {
+    var isIEOrEdge = /Trident|Edge/.test(navigator.userAgent);
+    var removeChildOriginalHelper = isIEOrEdge ? function(parent, child) {
       try {
         originalRemoveChild.call(parent, child);
       } catch (ex) {
@@ -1984,6 +2026,9 @@
       compareDocumentPosition: function(otherNode) {
         return originalCompareDocumentPosition.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
       },
+      isEqualNode: function(otherNode) {
+        return originalIsEqualNode.call(unsafeUnwrap(this), unwrapIfNeeded(otherNode));
+      },
       normalize: function() {
         var nodes = snapshotNodeList(this.childNodes);
         var remNodes = [];
@@ -1992,7 +2037,7 @@
         for (var i = 0, n; i < nodes.length; i++) {
           n = nodes[i];
           if (n.nodeType === Node.TEXT_NODE) {
-            if (!modNode && !n.data.length) this.removeNode(n); else if (!modNode) modNode = n; else {
+            if (!modNode && !n.data.length) this.removeChild(n); else if (!modNode) modNode = n; else {
               s += n.data;
               remNodes.push(n);
             }
@@ -2060,7 +2105,10 @@
       return index;
     }
     function shimSelector(selector) {
-      return String(selector).replace(/\/deep\//g, " ");
+      return String(selector).replace(/\/deep\/|::shadow|>>>/g, " ");
+    }
+    function shimMatchesSelector(selector) {
+      return String(selector).replace(/:host\(([^\s]+)\)/g, "$1").replace(/([^\s]):host/g, "$1").replace(":host", "*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g, " ");
     }
     function findOne(node, selector) {
       var m, el = node.firstElementChild;
@@ -2151,6 +2199,12 @@
         return result;
       }
     };
+    var MatchesInterface = {
+      matches: function(selector) {
+        selector = shimMatchesSelector(selector);
+        return scope.originalMatches.call(unsafeUnwrap(this), selector);
+      }
+    };
     function getElementsByTagNameFiltered(p, index, result, localName, lowercase) {
       var target = unsafeUnwrap(this);
       var list;
@@ -2205,6 +2259,7 @@
     };
     scope.GetElementsByInterface = GetElementsByInterface;
     scope.SelectorsInterface = SelectorsInterface;
+    scope.MatchesInterface = MatchesInterface;
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
@@ -2257,7 +2312,14 @@
         return backwardsElement(this.previousSibling);
       }
     };
+    var NonElementParentNodeInterface = {
+      getElementById: function(id) {
+        if (/[ \t\n\r\f]/.test(id)) return null;
+        return this.querySelector('[id="' + id + '"]');
+      }
+    };
     scope.ChildNodeInterface = ChildNodeInterface;
+    scope.NonElementParentNodeInterface = NonElementParentNodeInterface;
     scope.ParentNodeInterface = ParentNodeInterface;
   })(window.ShadowDOMPolyfill);
   (function(scope) {
@@ -2274,6 +2336,12 @@
     }
     CharacterData.prototype = Object.create(Node.prototype);
     mixin(CharacterData.prototype, {
+      get nodeValue() {
+        return this.data;
+      },
+      set nodeValue(data) {
+        this.data = data;
+      },
       get textContent() {
         return this.data;
       },
@@ -2327,53 +2395,59 @@
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
-    var setWrapper = scope.setWrapper;
+    if (!window.DOMTokenList) {
+      console.warn("Missing DOMTokenList prototype, please include a " + "compatible classList polyfill such as http://goo.gl/uTcepH.");
+      return;
+    }
     var unsafeUnwrap = scope.unsafeUnwrap;
+    var enqueueMutation = scope.enqueueMutation;
+    function getClass(el) {
+      return unsafeUnwrap(el).getAttribute("class");
+    }
+    function enqueueClassAttributeChange(el, oldValue) {
+      enqueueMutation(el, "attributes", {
+        name: "class",
+        namespace: null,
+        oldValue: oldValue
+      });
+    }
     function invalidateClass(el) {
       scope.invalidateRendererBasedOnAttribute(el, "class");
     }
-    function DOMTokenList(impl, ownerElement) {
-      setWrapper(impl, this);
-      this.ownerElement_ = ownerElement;
-    }
-    DOMTokenList.prototype = {
-      constructor: DOMTokenList,
-      get length() {
-        return unsafeUnwrap(this).length;
-      },
-      item: function(index) {
-        return unsafeUnwrap(this).item(index);
-      },
-      contains: function(token) {
-        return unsafeUnwrap(this).contains(token);
-      },
-      add: function() {
-        unsafeUnwrap(this).add.apply(unsafeUnwrap(this), arguments);
-        invalidateClass(this.ownerElement_);
-      },
-      remove: function() {
-        unsafeUnwrap(this).remove.apply(unsafeUnwrap(this), arguments);
-        invalidateClass(this.ownerElement_);
-      },
-      toggle: function(token) {
-        var rv = unsafeUnwrap(this).toggle.apply(unsafeUnwrap(this), arguments);
-        invalidateClass(this.ownerElement_);
-        return rv;
-      },
-      toString: function() {
-        return unsafeUnwrap(this).toString();
+    function changeClass(tokenList, method, args) {
+      var ownerElement = tokenList.ownerElement_;
+      if (ownerElement == null) {
+        return method.apply(tokenList, args);
       }
+      var oldValue = getClass(ownerElement);
+      var retv = method.apply(tokenList, args);
+      if (getClass(ownerElement) !== oldValue) {
+        enqueueClassAttributeChange(ownerElement, oldValue);
+        invalidateClass(ownerElement);
+      }
+      return retv;
+    }
+    var oldAdd = DOMTokenList.prototype.add;
+    DOMTokenList.prototype.add = function() {
+      changeClass(this, oldAdd, arguments);
     };
-    scope.wrappers.DOMTokenList = DOMTokenList;
+    var oldRemove = DOMTokenList.prototype.remove;
+    DOMTokenList.prototype.remove = function() {
+      changeClass(this, oldRemove, arguments);
+    };
+    var oldToggle = DOMTokenList.prototype.toggle;
+    DOMTokenList.prototype.toggle = function() {
+      return changeClass(this, oldToggle, arguments);
+    };
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
     var ChildNodeInterface = scope.ChildNodeInterface;
     var GetElementsByInterface = scope.GetElementsByInterface;
     var Node = scope.wrappers.Node;
-    var DOMTokenList = scope.wrappers.DOMTokenList;
     var ParentNodeInterface = scope.ParentNodeInterface;
     var SelectorsInterface = scope.SelectorsInterface;
+    var MatchesInterface = scope.MatchesInterface;
     var addWrapNodeListMethod = scope.addWrapNodeListMethod;
     var enqueueMutation = scope.enqueueMutation;
     var mixin = scope.mixin;
@@ -2428,13 +2502,13 @@
         enqueAttributeChange(this, name, oldValue);
         invalidateRendererBasedOnAttribute(this, name);
       },
-      matches: function(selector) {
-        return originalMatches.call(unsafeUnwrap(this), selector);
-      },
       get classList() {
         var list = classListTable.get(this);
         if (!list) {
-          classListTable.set(this, list = new DOMTokenList(unsafeUnwrap(this).classList, this));
+          list = unsafeUnwrap(this).classList;
+          if (!list) return;
+          list.ownerElement_ = this;
+          classListTable.set(this, list);
         }
         return list;
       },
@@ -2465,9 +2539,11 @@
     mixin(Element.prototype, GetElementsByInterface);
     mixin(Element.prototype, ParentNodeInterface);
     mixin(Element.prototype, SelectorsInterface);
+    mixin(Element.prototype, MatchesInterface);
     registerWrapper(OriginalElement, Element, document.createElementNS(null, "x"));
     scope.invalidateRendererBasedOnAttribute = invalidateRendererBasedOnAttribute;
     scope.matchesNames = matchesNames;
+    scope.originalMatches = originalMatches;
     scope.wrappers.Element = Element;
   })(window.ShadowDOMPolyfill);
   (function(scope) {
@@ -2519,6 +2595,12 @@
     }
     var voidElements = makeSet([ "area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr" ]);
     var plaintextParents = makeSet([ "style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript" ]);
+    var XHTML_NS = "http://www.w3.org/1999/xhtml";
+    function needsSelfClosingSlash(node) {
+      if (node.namespaceURI !== XHTML_NS) return true;
+      var doctype = node.ownerDocument.doctype;
+      return doctype && doctype.publicId && doctype.systemId;
+    }
     function getOuterHTML(node, parentNode) {
       switch (node.nodeType) {
        case Node.ELEMENT_NODE:
@@ -2528,9 +2610,11 @@
         for (var i = 0, attr; attr = attrs[i]; i++) {
           s += " " + attr.name + '="' + escapeAttr(attr.value) + '"';
         }
-        s += ">";
-        if (voidElements[tagName]) return s;
-        return s + getInnerHTML(node) + "</" + tagName + ">";
+        if (voidElements[tagName]) {
+          if (needsSelfClosingSlash(node)) s += "/";
+          return s + ">";
+        }
+        return s + ">" + getInnerHTML(node) + "</" + tagName + ">";
 
        case Node.TEXT_NODE:
         var data = node.data;
@@ -2688,7 +2772,7 @@
         enumerable: true
       });
     }
-    [ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
+    [ "focus", "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
     registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));
     scope.wrappers.HTMLElement = HTMLElement;
     scope.getInnerHTML = getInnerHTML;
@@ -3095,16 +3179,29 @@
     "use strict";
     var Element = scope.wrappers.Element;
     var HTMLElement = scope.wrappers.HTMLElement;
-    var registerObject = scope.registerObject;
+    var registerWrapper = scope.registerWrapper;
+    var defineWrapGetter = scope.defineWrapGetter;
+    var unsafeUnwrap = scope.unsafeUnwrap;
+    var wrap = scope.wrap;
+    var mixin = scope.mixin;
     var SVG_NS = "http://www.w3.org/2000/svg";
+    var OriginalSVGElement = window.SVGElement;
     var svgTitleElement = document.createElementNS(SVG_NS, "title");
-    var SVGTitleElement = registerObject(svgTitleElement);
-    var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
     if (!("classList" in svgTitleElement)) {
       var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
       Object.defineProperty(HTMLElement.prototype, "classList", descr);
       delete Element.prototype.classList;
     }
+    function SVGElement(node) {
+      Element.call(this, node);
+    }
+    SVGElement.prototype = Object.create(Element.prototype);
+    mixin(SVGElement.prototype, {
+      get ownerSVGElement() {
+        return wrap(unsafeUnwrap(this).ownerSVGElement);
+      }
+    });
+    registerWrapper(OriginalSVGElement, SVGElement, document.createElementNS(SVG_NS, "title"));
     scope.wrappers.SVGElement = SVGElement;
   })(window.ShadowDOMPolyfill);
   (function(scope) {
@@ -3210,6 +3307,7 @@
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
+    var addForwardingProperties = scope.addForwardingProperties;
     var mixin = scope.mixin;
     var registerWrapper = scope.registerWrapper;
     var setWrapper = scope.setWrapper;
@@ -3234,6 +3332,10 @@
         unsafeUnwrap(this).texSubImage2D.apply(unsafeUnwrap(this), arguments);
       }
     });
+    var OriginalWebGLRenderingContextBase = Object.getPrototypeOf(OriginalWebGLRenderingContext.prototype);
+    if (OriginalWebGLRenderingContextBase !== Object.prototype) {
+      addForwardingProperties(OriginalWebGLRenderingContextBase, WebGLRenderingContext.prototype);
+    }
     var instanceProperties = /WebKit/.test(navigator.userAgent) ? {
       drawingBufferHeight: null,
       drawingBufferWidth: null
@@ -3243,30 +3345,153 @@
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
+    var Node = scope.wrappers.Node;
+    var GetElementsByInterface = scope.GetElementsByInterface;
+    var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
+    var ParentNodeInterface = scope.ParentNodeInterface;
+    var SelectorsInterface = scope.SelectorsInterface;
+    var mixin = scope.mixin;
+    var registerObject = scope.registerObject;
+    var registerWrapper = scope.registerWrapper;
+    var OriginalDocumentFragment = window.DocumentFragment;
+    function DocumentFragment(node) {
+      Node.call(this, node);
+    }
+    DocumentFragment.prototype = Object.create(Node.prototype);
+    mixin(DocumentFragment.prototype, ParentNodeInterface);
+    mixin(DocumentFragment.prototype, SelectorsInterface);
+    mixin(DocumentFragment.prototype, GetElementsByInterface);
+    mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
+    registerWrapper(OriginalDocumentFragment, DocumentFragment, document.createDocumentFragment());
+    scope.wrappers.DocumentFragment = DocumentFragment;
+    var Comment = registerObject(document.createComment(""));
+    scope.wrappers.Comment = Comment;
+  })(window.ShadowDOMPolyfill);
+  (function(scope) {
+    "use strict";
+    var DocumentFragment = scope.wrappers.DocumentFragment;
+    var TreeScope = scope.TreeScope;
+    var elementFromPoint = scope.elementFromPoint;
+    var getInnerHTML = scope.getInnerHTML;
+    var getTreeScope = scope.getTreeScope;
+    var mixin = scope.mixin;
+    var rewrap = scope.rewrap;
+    var setInnerHTML = scope.setInnerHTML;
+    var unsafeUnwrap = scope.unsafeUnwrap;
+    var unwrap = scope.unwrap;
+    var wrap = scope.wrap;
+    var shadowHostTable = new WeakMap();
+    var nextOlderShadowTreeTable = new WeakMap();
+    function ShadowRoot(hostWrapper) {
+      var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
+      DocumentFragment.call(this, node);
+      rewrap(node, this);
+      var oldShadowRoot = hostWrapper.shadowRoot;
+      nextOlderShadowTreeTable.set(this, oldShadowRoot);
+      this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
+      shadowHostTable.set(this, hostWrapper);
+    }
+    ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
+    mixin(ShadowRoot.prototype, {
+      constructor: ShadowRoot,
+      get innerHTML() {
+        return getInnerHTML(this);
+      },
+      set innerHTML(value) {
+        setInnerHTML(this, value);
+        this.invalidateShadowRenderer();
+      },
+      get olderShadowRoot() {
+        return nextOlderShadowTreeTable.get(this) || null;
+      },
+      get host() {
+        return shadowHostTable.get(this) || null;
+      },
+      invalidateShadowRenderer: function() {
+        return shadowHostTable.get(this).invalidateShadowRenderer();
+      },
+      elementFromPoint: function(x, y) {
+        return elementFromPoint(this, this.ownerDocument, x, y);
+      },
+      getSelection: function() {
+        return document.getSelection();
+      },
+      get activeElement() {
+        var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement;
+        if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
+        var activeElement = wrap(unwrappedActiveElement);
+        while (!this.contains(activeElement)) {
+          while (activeElement.parentNode) {
+            activeElement = activeElement.parentNode;
+          }
+          if (activeElement.host) {
+            activeElement = activeElement.host;
+          } else {
+            return null;
+          }
+        }
+        return activeElement;
+      }
+    });
+    scope.wrappers.ShadowRoot = ShadowRoot;
+  })(window.ShadowDOMPolyfill);
+  (function(scope) {
+    "use strict";
     var registerWrapper = scope.registerWrapper;
     var setWrapper = scope.setWrapper;
     var unsafeUnwrap = scope.unsafeUnwrap;
     var unwrap = scope.unwrap;
     var unwrapIfNeeded = scope.unwrapIfNeeded;
     var wrap = scope.wrap;
+    var getTreeScope = scope.getTreeScope;
     var OriginalRange = window.Range;
+    var ShadowRoot = scope.wrappers.ShadowRoot;
+    function getHost(node) {
+      var root = getTreeScope(node).root;
+      if (root instanceof ShadowRoot) {
+        return root.host;
+      }
+      return null;
+    }
+    function hostNodeToShadowNode(refNode, offset) {
+      if (refNode.shadowRoot) {
+        offset = Math.min(refNode.childNodes.length - 1, offset);
+        var child = refNode.childNodes[offset];
+        if (child) {
+          var insertionPoint = scope.getDestinationInsertionPoints(child);
+          if (insertionPoint.length > 0) {
+            var parentNode = insertionPoint[0].parentNode;
+            if (parentNode.nodeType == Node.ELEMENT_NODE) {
+              refNode = parentNode;
+            }
+          }
+        }
+      }
+      return refNode;
+    }
+    function shadowNodeToHostNode(node) {
+      node = wrap(node);
+      return getHost(node) || node;
+    }
     function Range(impl) {
       setWrapper(impl, this);
     }
     Range.prototype = {
       get startContainer() {
-        return wrap(unsafeUnwrap(this).startContainer);
+        return shadowNodeToHostNode(unsafeUnwrap(this).startContainer);
       },
       get endContainer() {
-        return wrap(unsafeUnwrap(this).endContainer);
+        return shadowNodeToHostNode(unsafeUnwrap(this).endContainer);
       },
       get commonAncestorContainer() {
-        return wrap(unsafeUnwrap(this).commonAncestorContainer);
+        return shadowNodeToHostNode(unsafeUnwrap(this).commonAncestorContainer);
       },
       setStart: function(refNode, offset) {
+        refNode = hostNodeToShadowNode(refNode, offset);
         unsafeUnwrap(this).setStart(unwrapIfNeeded(refNode), offset);
       },
       setEnd: function(refNode, offset) {
+        refNode = hostNodeToShadowNode(refNode, offset);
         unsafeUnwrap(this).setEnd(unwrapIfNeeded(refNode), offset);
       },
       setStartBefore: function(refNode) {
@@ -3328,74 +3553,6 @@
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
-    var GetElementsByInterface = scope.GetElementsByInterface;
-    var ParentNodeInterface = scope.ParentNodeInterface;
-    var SelectorsInterface = scope.SelectorsInterface;
-    var mixin = scope.mixin;
-    var registerObject = scope.registerObject;
-    var DocumentFragment = registerObject(document.createDocumentFragment());
-    mixin(DocumentFragment.prototype, ParentNodeInterface);
-    mixin(DocumentFragment.prototype, SelectorsInterface);
-    mixin(DocumentFragment.prototype, GetElementsByInterface);
-    var Comment = registerObject(document.createComment(""));
-    scope.wrappers.Comment = Comment;
-    scope.wrappers.DocumentFragment = DocumentFragment;
-  })(window.ShadowDOMPolyfill);
-  (function(scope) {
-    "use strict";
-    var DocumentFragment = scope.wrappers.DocumentFragment;
-    var TreeScope = scope.TreeScope;
-    var elementFromPoint = scope.elementFromPoint;
-    var getInnerHTML = scope.getInnerHTML;
-    var getTreeScope = scope.getTreeScope;
-    var mixin = scope.mixin;
-    var rewrap = scope.rewrap;
-    var setInnerHTML = scope.setInnerHTML;
-    var unsafeUnwrap = scope.unsafeUnwrap;
-    var unwrap = scope.unwrap;
-    var shadowHostTable = new WeakMap();
-    var nextOlderShadowTreeTable = new WeakMap();
-    var spaceCharRe = /[ \t\n\r\f]/;
-    function ShadowRoot(hostWrapper) {
-      var node = unwrap(unsafeUnwrap(hostWrapper).ownerDocument.createDocumentFragment());
-      DocumentFragment.call(this, node);
-      rewrap(node, this);
-      var oldShadowRoot = hostWrapper.shadowRoot;
-      nextOlderShadowTreeTable.set(this, oldShadowRoot);
-      this.treeScope_ = new TreeScope(this, getTreeScope(oldShadowRoot || hostWrapper));
-      shadowHostTable.set(this, hostWrapper);
-    }
-    ShadowRoot.prototype = Object.create(DocumentFragment.prototype);
-    mixin(ShadowRoot.prototype, {
-      constructor: ShadowRoot,
-      get innerHTML() {
-        return getInnerHTML(this);
-      },
-      set innerHTML(value) {
-        setInnerHTML(this, value);
-        this.invalidateShadowRenderer();
-      },
-      get olderShadowRoot() {
-        return nextOlderShadowTreeTable.get(this) || null;
-      },
-      get host() {
-        return shadowHostTable.get(this) || null;
-      },
-      invalidateShadowRenderer: function() {
-        return shadowHostTable.get(this).invalidateShadowRenderer();
-      },
-      elementFromPoint: function(x, y) {
-        return elementFromPoint(this, this.ownerDocument, x, y);
-      },
-      getElementById: function(id) {
-        if (spaceCharRe.test(id)) return null;
-        return this.querySelector('[id="' + id + '"]');
-      }
-    });
-    scope.wrappers.ShadowRoot = ShadowRoot;
-  })(window.ShadowDOMPolyfill);
-  (function(scope) {
-    "use strict";
     var Element = scope.wrappers.Element;
     var HTMLContentElement = scope.wrappers.HTMLContentElement;
     var HTMLShadowElement = scope.wrappers.HTMLShadowElement;
@@ -3846,7 +4003,7 @@
         return wrap(unsafeUnwrap(this).focusNode);
       },
       addRange: function(range) {
-        unsafeUnwrap(this).addRange(unwrap(range));
+        unsafeUnwrap(this).addRange(unwrapIfNeeded(range));
       },
       collapse: function(node, index) {
         unsafeUnwrap(this).collapse(unwrapIfNeeded(node), index);
@@ -3854,9 +4011,6 @@
       containsNode: function(node, allowPartial) {
         return unsafeUnwrap(this).containsNode(unwrapIfNeeded(node), allowPartial);
       },
-      extend: function(node, offset) {
-        unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
-      },
       getRangeAt: function(index) {
         return wrap(unsafeUnwrap(this).getRangeAt(index));
       },
@@ -3864,25 +4018,78 @@
         unsafeUnwrap(this).removeRange(unwrap(range));
       },
       selectAllChildren: function(node) {
-        unsafeUnwrap(this).selectAllChildren(unwrapIfNeeded(node));
+        unsafeUnwrap(this).selectAllChildren(node instanceof ShadowRoot ? unsafeUnwrap(node.host) : unwrapIfNeeded(node));
       },
       toString: function() {
         return unsafeUnwrap(this).toString();
       }
     };
+    if (OriginalSelection.prototype.extend) {
+      Selection.prototype.extend = function(node, offset) {
+        unsafeUnwrap(this).extend(unwrapIfNeeded(node), offset);
+      };
+    }
     registerWrapper(window.Selection, Selection, window.getSelection());
     scope.wrappers.Selection = Selection;
   })(window.ShadowDOMPolyfill);
   (function(scope) {
     "use strict";
+    var registerWrapper = scope.registerWrapper;
+    var setWrapper = scope.setWrapper;
+    var unsafeUnwrap = scope.unsafeUnwrap;
+    var unwrapIfNeeded = scope.unwrapIfNeeded;
+    var wrap = scope.wrap;
+    var OriginalTreeWalker = window.TreeWalker;
+    function TreeWalker(impl) {
+      setWrapper(impl, this);
+    }
+    TreeWalker.prototype = {
+      get root() {
+        return wrap(unsafeUnwrap(this).root);
+      },
+      get currentNode() {
+        return wrap(unsafeUnwrap(this).currentNode);
+      },
+      set currentNode(node) {
+        unsafeUnwrap(this).currentNode = unwrapIfNeeded(node);
+      },
+      get filter() {
+        return unsafeUnwrap(this).filter;
+      },
+      parentNode: function() {
+        return wrap(unsafeUnwrap(this).parentNode());
+      },
+      firstChild: function() {
+        return wrap(unsafeUnwrap(this).firstChild());
+      },
+      lastChild: function() {
+        return wrap(unsafeUnwrap(this).lastChild());
+      },
+      previousSibling: function() {
+        return wrap(unsafeUnwrap(this).previousSibling());
+      },
+      previousNode: function() {
+        return wrap(unsafeUnwrap(this).previousNode());
+      },
+      nextNode: function() {
+        return wrap(unsafeUnwrap(this).nextNode());
+      }
+    };
+    registerWrapper(OriginalTreeWalker, TreeWalker);
+    scope.wrappers.TreeWalker = TreeWalker;
+  })(window.ShadowDOMPolyfill);
+  (function(scope) {
+    "use strict";
     var GetElementsByInterface = scope.GetElementsByInterface;
     var Node = scope.wrappers.Node;
     var ParentNodeInterface = scope.ParentNodeInterface;
+    var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
     var Selection = scope.wrappers.Selection;
     var SelectorsInterface = scope.SelectorsInterface;
     var ShadowRoot = scope.wrappers.ShadowRoot;
     var TreeScope = scope.TreeScope;
     var cloneNode = scope.cloneNode;
+    var defineGetter = scope.defineGetter;
     var defineWrapGetter = scope.defineWrapGetter;
     var elementFromPoint = scope.elementFromPoint;
     var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
@@ -3906,13 +4113,29 @@
     defineWrapGetter(Document, "documentElement");
     defineWrapGetter(Document, "body");
     defineWrapGetter(Document, "head");
+    defineGetter(Document, "activeElement", function() {
+      var unwrappedActiveElement = unwrap(this).activeElement;
+      if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
+      var activeElement = wrap(unwrappedActiveElement);
+      while (!this.contains(activeElement)) {
+        while (activeElement.parentNode) {
+          activeElement = activeElement.parentNode;
+        }
+        if (activeElement.host) {
+          activeElement = activeElement.host;
+        } else {
+          return null;
+        }
+      }
+      return activeElement;
+    });
     function wrapMethod(name) {
       var original = document[name];
       Document.prototype[name] = function() {
         return wrap(original.apply(unsafeUnwrap(this), arguments));
       };
     }
-    [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "getElementById" ].forEach(wrapMethod);
+    [ "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode" ].forEach(wrapMethod);
     var originalAdoptNode = document.adoptNode;
     function adoptNodeNoRemove(node, doc) {
       originalAdoptNode.call(unsafeUnwrap(doc), unwrap(node));
@@ -3950,6 +4173,25 @@
         return SelectorsInterface.querySelectorAll.call(this, "[name=" + JSON.stringify(String(name)) + "]");
       }
     });
+    var originalCreateTreeWalker = document.createTreeWalker;
+    var TreeWalkerWrapper = scope.wrappers.TreeWalker;
+    Document.prototype.createTreeWalker = function(root, whatToShow, filter, expandEntityReferences) {
+      var newFilter = null;
+      if (filter) {
+        if (filter.acceptNode && typeof filter.acceptNode === "function") {
+          newFilter = {
+            acceptNode: function(node) {
+              return filter.acceptNode(wrap(node));
+            }
+          };
+        } else if (typeof filter === "function") {
+          newFilter = function(node) {
+            return filter(wrap(node));
+          };
+        }
+      }
+      return new TreeWalkerWrapper(originalCreateTreeWalker.call(unwrap(this), unwrap(root), whatToShow, newFilter, expandEntityReferences));
+    };
     if (document.registerElement) {
       var originalRegisterElement = document.registerElement;
       Document.prototype.registerElement = function(tagName, object) {
@@ -4011,11 +4253,13 @@
       };
       forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "registerElement" ]);
     }
-    forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ].concat(matchesNames));
-    forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
+    forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLDocument || window.Document, window.HTMLHeadElement, window.HTMLHtmlElement ], [ "appendChild", "compareDocumentPosition", "contains", "getElementsByClassName", "getElementsByTagName", "getElementsByTagNameNS", "insertBefore", "querySelector", "querySelectorAll", "removeChild", "replaceChild" ]);
+    forwardMethodsToWrapper([ window.HTMLBodyElement, window.HTMLHeadElement, window.HTMLHtmlElement ], matchesNames);
+    forwardMethodsToWrapper([ window.HTMLDocument || window.Document ], [ "adoptNode", "importNode", "contains", "createComment", "createDocumentFragment", "createElement", "createElementNS", "createEvent", "createEventNS", "createRange", "createTextNode", "createTreeWalker", "elementFromPoint", "getElementById", "getElementsByName", "getSelection" ]);
     mixin(Document.prototype, GetElementsByInterface);
     mixin(Document.prototype, ParentNodeInterface);
     mixin(Document.prototype, SelectorsInterface);
+    mixin(Document.prototype, NonElementParentNodeInterface);
     mixin(Document.prototype, {
       get implementation() {
         var implementation = implementationTable.get(this);
@@ -4034,6 +4278,11 @@
     function DOMImplementation(impl) {
       setWrapper(impl, this);
     }
+    var originalCreateDocument = document.implementation.createDocument;
+    DOMImplementation.prototype.createDocument = function() {
+      arguments[2] = unwrap(arguments[2]);
+      return wrap(originalCreateDocument.apply(unsafeUnwrap(this), arguments));
+    };
     function wrapImplMethod(constructor, name) {
       var original = document.implementation[name];
       constructor.prototype[name] = function() {
@@ -4047,11 +4296,10 @@
       };
     }
     wrapImplMethod(DOMImplementation, "createDocumentType");
-    wrapImplMethod(DOMImplementation, "createDocument");
     wrapImplMethod(DOMImplementation, "createHTMLDocument");
     forwardImplMethod(DOMImplementation, "hasFeature");
     registerWrapper(window.DOMImplementation, DOMImplementation);
-    forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocumentType", "createDocument", "createHTMLDocument", "hasFeature" ]);
+    forwardMethodsToWrapper([ window.DOMImplementation ], [ "createDocument", "createDocumentType", "createHTMLDocument", "hasFeature" ]);
     scope.adoptNodeNoRemove = adoptNodeNoRemove;
     scope.wrappers.DOMImplementation = DOMImplementation;
     scope.wrappers.Document = Document;
@@ -4456,7 +4704,7 @@
         return !selector.match(re);
       },
       makeScopeMatcher: function(scopeSelector) {
-        scopeSelector = scopeSelector.replace(/\[/g, "\\[").replace(/\[/g, "\\]");
+        scopeSelector = scopeSelector.replace(/\[/g, "\\[").replace(/\]/g, "\\]");
         return new RegExp("^(" + scopeSelector + ")" + selectorReSuffix, "m");
       },
       applySelectorScope: function(selector, selectorScope) {
@@ -4526,8 +4774,8 @@
         }
       }
     };
-    var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
-    var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ /\^\^/g, /\^/g, /\/shadow\//g, /\/shadow-deep\//g, /::shadow/g, /\/deep\//g, /::content/g ];
+    var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
+    var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
     function stylesToCssText(styles, preserveComments) {
       var cssText = "";
       Array.prototype.forEach.call(styles, function(s) {
@@ -4649,7 +4897,7 @@
               style = elt.ownerDocument.createElement("style");
               style.textContent = elt.__resource;
             }
-            HTMLImports.path.resolveUrlsInStyle(style);
+            HTMLImports.path.resolveUrlsInStyle(style, elt.href);
             style.textContent = ShadowCSS.shimStyle(style);
             style.removeAttribute(SHIM_ATTRIBUTE, "");
             style.setAttribute(SHIMMED_ATTRIBUTE, "");
@@ -4691,10 +4939,535 @@
   }
 })(window.WebComponents);
 
+(function(scope) {
+  "use strict";
+  var hasWorkingUrl = false;
+  if (!scope.forceJURL) {
+    try {
+      var u = new URL("b", "http://a");
+      u.pathname = "c%20d";
+      hasWorkingUrl = u.href === "http://a/c%20d";
+    } catch (e) {}
+  }
+  if (hasWorkingUrl) return;
+  var relative = Object.create(null);
+  relative["ftp"] = 21;
+  relative["file"] = 0;
+  relative["gopher"] = 70;
+  relative["http"] = 80;
+  relative["https"] = 443;
+  relative["ws"] = 80;
+  relative["wss"] = 443;
+  var relativePathDotMapping = Object.create(null);
+  relativePathDotMapping["%2e"] = ".";
+  relativePathDotMapping[".%2e"] = "..";
+  relativePathDotMapping["%2e."] = "..";
+  relativePathDotMapping["%2e%2e"] = "..";
+  function isRelativeScheme(scheme) {
+    return relative[scheme] !== undefined;
+  }
+  function invalid() {
+    clear.call(this);
+    this._isInvalid = true;
+  }
+  function IDNAToASCII(h) {
+    if ("" == h) {
+      invalid.call(this);
+    }
+    return h.toLowerCase();
+  }
+  function percentEscape(c) {
+    var unicode = c.charCodeAt(0);
+    if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 63, 96 ].indexOf(unicode) == -1) {
+      return c;
+    }
+    return encodeURIComponent(c);
+  }
+  function percentEscapeQuery(c) {
+    var unicode = c.charCodeAt(0);
+    if (unicode > 32 && unicode < 127 && [ 34, 35, 60, 62, 96 ].indexOf(unicode) == -1) {
+      return c;
+    }
+    return encodeURIComponent(c);
+  }
+  var EOF = undefined, ALPHA = /[a-zA-Z]/, ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
+  function parse(input, stateOverride, base) {
+    function err(message) {
+      errors.push(message);
+    }
+    var state = stateOverride || "scheme start", cursor = 0, buffer = "", seenAt = false, seenBracket = false, errors = [];
+    loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {
+      var c = input[cursor];
+      switch (state) {
+       case "scheme start":
+        if (c && ALPHA.test(c)) {
+          buffer += c.toLowerCase();
+          state = "scheme";
+        } else if (!stateOverride) {
+          buffer = "";
+          state = "no scheme";
+          continue;
+        } else {
+          err("Invalid scheme.");
+          break loop;
+        }
+        break;
+
+       case "scheme":
+        if (c && ALPHANUMERIC.test(c)) {
+          buffer += c.toLowerCase();
+        } else if (":" == c) {
+          this._scheme = buffer;
+          buffer = "";
+          if (stateOverride) {
+            break loop;
+          }
+          if (isRelativeScheme(this._scheme)) {
+            this._isRelative = true;
+          }
+          if ("file" == this._scheme) {
+            state = "relative";
+          } else if (this._isRelative && base && base._scheme == this._scheme) {
+            state = "relative or authority";
+          } else if (this._isRelative) {
+            state = "authority first slash";
+          } else {
+            state = "scheme data";
+          }
+        } else if (!stateOverride) {
+          buffer = "";
+          cursor = 0;
+          state = "no scheme";
+          continue;
+        } else if (EOF == c) {
+          break loop;
+        } else {
+          err("Code point not allowed in scheme: " + c);
+          break loop;
+        }
+        break;
+
+       case "scheme data":
+        if ("?" == c) {
+          this._query = "?";
+          state = "query";
+        } else if ("#" == c) {
+          this._fragment = "#";
+          state = "fragment";
+        } else {
+          if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+            this._schemeData += percentEscape(c);
+          }
+        }
+        break;
+
+       case "no scheme":
+        if (!base || !isRelativeScheme(base._scheme)) {
+          err("Missing scheme.");
+          invalid.call(this);
+        } else {
+          state = "relative";
+          continue;
+        }
+        break;
+
+       case "relative or authority":
+        if ("/" == c && "/" == input[cursor + 1]) {
+          state = "authority ignore slashes";
+        } else {
+          err("Expected /, got: " + c);
+          state = "relative";
+          continue;
+        }
+        break;
+
+       case "relative":
+        this._isRelative = true;
+        if ("file" != this._scheme) this._scheme = base._scheme;
+        if (EOF == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = base._query;
+          this._username = base._username;
+          this._password = base._password;
+          break loop;
+        } else if ("/" == c || "\\" == c) {
+          if ("\\" == c) err("\\ is an invalid code point.");
+          state = "relative slash";
+        } else if ("?" == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = "?";
+          this._username = base._username;
+          this._password = base._password;
+          state = "query";
+        } else if ("#" == c) {
+          this._host = base._host;
+          this._port = base._port;
+          this._path = base._path.slice();
+          this._query = base._query;
+          this._fragment = "#";
+          this._username = base._username;
+          this._password = base._password;
+          state = "fragment";
+        } else {
+          var nextC = input[cursor + 1];
+          var nextNextC = input[cursor + 2];
+          if ("file" != this._scheme || !ALPHA.test(c) || nextC != ":" && nextC != "|" || EOF != nextNextC && "/" != nextNextC && "\\" != nextNextC && "?" != nextNextC && "#" != nextNextC) {
+            this._host = base._host;
+            this._port = base._port;
+            this._username = base._username;
+            this._password = base._password;
+            this._path = base._path.slice();
+            this._path.pop();
+          }
+          state = "relative path";
+          continue;
+        }
+        break;
+
+       case "relative slash":
+        if ("/" == c || "\\" == c) {
+          if ("\\" == c) {
+            err("\\ is an invalid code point.");
+          }
+          if ("file" == this._scheme) {
+            state = "file host";
+          } else {
+            state = "authority ignore slashes";
+          }
+        } else {
+          if ("file" != this._scheme) {
+            this._host = base._host;
+            this._port = base._port;
+            this._username = base._username;
+            this._password = base._password;
+          }
+          state = "relative path";
+          continue;
+        }
+        break;
+
+       case "authority first slash":
+        if ("/" == c) {
+          state = "authority second slash";
+        } else {
+          err("Expected '/', got: " + c);
+          state = "authority ignore slashes";
+          continue;
+        }
+        break;
+
+       case "authority second slash":
+        state = "authority ignore slashes";
+        if ("/" != c) {
+          err("Expected '/', got: " + c);
+          continue;
+        }
+        break;
+
+       case "authority ignore slashes":
+        if ("/" != c && "\\" != c) {
+          state = "authority";
+          continue;
+        } else {
+          err("Expected authority, got: " + c);
+        }
+        break;
+
+       case "authority":
+        if ("@" == c) {
+          if (seenAt) {
+            err("@ already seen.");
+            buffer += "%40";
+          }
+          seenAt = true;
+          for (var i = 0; i < buffer.length; i++) {
+            var cp = buffer[i];
+            if ("	" == cp || "\n" == cp || "\r" == cp) {
+              err("Invalid whitespace in authority.");
+              continue;
+            }
+            if (":" == cp && null === this._password) {
+              this._password = "";
+              continue;
+            }
+            var tempC = percentEscape(cp);
+            null !== this._password ? this._password += tempC : this._username += tempC;
+          }
+          buffer = "";
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          cursor -= buffer.length;
+          buffer = "";
+          state = "host";
+          continue;
+        } else {
+          buffer += c;
+        }
+        break;
+
+       case "file host":
+        if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ":" || buffer[1] == "|")) {
+            state = "relative path";
+          } else if (buffer.length == 0) {
+            state = "relative path start";
+          } else {
+            this._host = IDNAToASCII.call(this, buffer);
+            buffer = "";
+            state = "relative path start";
+          }
+          continue;
+        } else if ("	" == c || "\n" == c || "\r" == c) {
+          err("Invalid whitespace in file host.");
+        } else {
+          buffer += c;
+        }
+        break;
+
+       case "host":
+       case "hostname":
+        if (":" == c && !seenBracket) {
+          this._host = IDNAToASCII.call(this, buffer);
+          buffer = "";
+          state = "port";
+          if ("hostname" == stateOverride) {
+            break loop;
+          }
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c) {
+          this._host = IDNAToASCII.call(this, buffer);
+          buffer = "";
+          state = "relative path start";
+          if (stateOverride) {
+            break loop;
+          }
+          continue;
+        } else if ("	" != c && "\n" != c && "\r" != c) {
+          if ("[" == c) {
+            seenBracket = true;
+          } else if ("]" == c) {
+            seenBracket = false;
+          }
+          buffer += c;
+        } else {
+          err("Invalid code point in host/hostname: " + c);
+        }
+        break;
+
+       case "port":
+        if (/[0-9]/.test(c)) {
+          buffer += c;
+        } else if (EOF == c || "/" == c || "\\" == c || "?" == c || "#" == c || stateOverride) {
+          if ("" != buffer) {
+            var temp = parseInt(buffer, 10);
+            if (temp != relative[this._scheme]) {
+              this._port = temp + "";
+            }
+            buffer = "";
+          }
+          if (stateOverride) {
+            break loop;
+          }
+          state = "relative path start";
+          continue;
+        } else if ("	" == c || "\n" == c || "\r" == c) {
+          err("Invalid code point in port: " + c);
+        } else {
+          invalid.call(this);
+        }
+        break;
+
+       case "relative path start":
+        if ("\\" == c) err("'\\' not allowed in path.");
+        state = "relative path";
+        if ("/" != c && "\\" != c) {
+          continue;
+        }
+        break;
+
+       case "relative path":
+        if (EOF == c || "/" == c || "\\" == c || !stateOverride && ("?" == c || "#" == c)) {
+          if ("\\" == c) {
+            err("\\ not allowed in relative path.");
+          }
+          var tmp;
+          if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
+            buffer = tmp;
+          }
+          if (".." == buffer) {
+            this._path.pop();
+            if ("/" != c && "\\" != c) {
+              this._path.push("");
+            }
+          } else if ("." == buffer && "/" != c && "\\" != c) {
+            this._path.push("");
+          } else if ("." != buffer) {
+            if ("file" == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == "|") {
+              buffer = buffer[0] + ":";
+            }
+            this._path.push(buffer);
+          }
+          buffer = "";
+          if ("?" == c) {
+            this._query = "?";
+            state = "query";
+          } else if ("#" == c) {
+            this._fragment = "#";
+            state = "fragment";
+          }
+        } else if ("	" != c && "\n" != c && "\r" != c) {
+          buffer += percentEscape(c);
+        }
+        break;
+
+       case "query":
+        if (!stateOverride && "#" == c) {
+          this._fragment = "#";
+          state = "fragment";
+        } else if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+          this._query += percentEscapeQuery(c);
+        }
+        break;
+
+       case "fragment":
+        if (EOF != c && "	" != c && "\n" != c && "\r" != c) {
+          this._fragment += c;
+        }
+        break;
+      }
+      cursor++;
+    }
+  }
+  function clear() {
+    this._scheme = "";
+    this._schemeData = "";
+    this._username = "";
+    this._password = null;
+    this._host = "";
+    this._port = "";
+    this._path = [];
+    this._query = "";
+    this._fragment = "";
+    this._isInvalid = false;
+    this._isRelative = false;
+  }
+  function jURL(url, base) {
+    if (base !== undefined && !(base instanceof jURL)) base = new jURL(String(base));
+    this._url = url;
+    clear.call(this);
+    var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, "");
+    parse.call(this, input, null, base);
+  }
+  jURL.prototype = {
+    toString: function() {
+      return this.href;
+    },
+    get href() {
+      if (this._isInvalid) return this._url;
+      var authority = "";
+      if ("" != this._username || null != this._password) {
+        authority = this._username + (null != this._password ? ":" + this._password : "") + "@";
+      }
+      return this.protocol + (this._isRelative ? "//" + authority + this.host : "") + this.pathname + this._query + this._fragment;
+    },
+    set href(href) {
+      clear.call(this);
+      parse.call(this, href);
+    },
+    get protocol() {
+      return this._scheme + ":";
+    },
+    set protocol(protocol) {
+      if (this._isInvalid) return;
+      parse.call(this, protocol + ":", "scheme start");
+    },
+    get host() {
+      return this._isInvalid ? "" : this._port ? this._host + ":" + this._port : this._host;
+    },
+    set host(host) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, host, "host");
+    },
+    get hostname() {
+      return this._host;
+    },
+    set hostname(hostname) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, hostname, "hostname");
+    },
+    get port() {
+      return this._port;
+    },
+    set port(port) {
+      if (this._isInvalid || !this._isRelative) return;
+      parse.call(this, port, "port");
+    },
+    get pathname() {
+      return this._isInvalid ? "" : this._isRelative ? "/" + this._path.join("/") : this._schemeData;
+    },
+    set pathname(pathname) {
+      if (this._isInvalid || !this._isRelative) return;
+      this._path = [];
+      parse.call(this, pathname, "relative path start");
+    },
+    get search() {
+      return this._isInvalid || !this._query || "?" == this._query ? "" : this._query;
+    },
+    set search(search) {
+      if (this._isInvalid || !this._isRelative) return;
+      this._query = "?";
+      if ("?" == search[0]) search = search.slice(1);
+      parse.call(this, search, "query");
+    },
+    get hash() {
+      return this._isInvalid || !this._fragment || "#" == this._fragment ? "" : this._fragment;
+    },
+    set hash(hash) {
+      if (this._isInvalid) return;
+      this._fragment = "#";
+      if ("#" == hash[0]) hash = hash.slice(1);
+      parse.call(this, hash, "fragment");
+    },
+    get origin() {
+      var host;
+      if (this._isInvalid || !this._scheme) {
+        return "";
+      }
+      switch (this._scheme) {
+       case "data":
+       case "file":
+       case "javascript":
+       case "mailto":
+        return "null";
+      }
+      host = this.host;
+      if (!host) {
+        return "";
+      }
+      return this._scheme + "://" + host;
+    }
+  };
+  var OriginalURL = scope.URL;
+  if (OriginalURL) {
+    jURL.createObjectURL = function(blob) {
+      return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
+    };
+    jURL.revokeObjectURL = function(url) {
+      OriginalURL.revokeObjectURL(url);
+    };
+  }
+  scope.URL = jURL;
+})(self);
+
 (function(global) {
+  if (global.JsMutationObserver) {
+    return;
+  }
   var registrationsTable = new WeakMap();
   var setImmediate;
-  if (/Trident/.test(navigator.userAgent)) {
+  if (/Trident|Edge/.test(navigator.userAgent)) {
     setImmediate = setTimeout;
   } else if (window.setImmediate) {
     setImmediate = window.setImmediate;
@@ -4962,7 +5735,6 @@
         this.addTransientObserver(e.target);
 
        case "DOMNodeInserted":
-        var target = e.relatedNode;
         var changedNode = e.target;
         var addedNodes, removedNodes;
         if (e.type === "DOMNodeInserted") {
@@ -4974,12 +5746,12 @@
         }
         var previousSibling = changedNode.previousSibling;
         var nextSibling = changedNode.nextSibling;
-        var record = getRecord("childList", target);
+        var record = getRecord("childList", e.target.parentNode);
         record.addedNodes = addedNodes;
         record.removedNodes = removedNodes;
         record.previousSibling = previousSibling;
         record.nextSibling = nextSibling;
-        forEachAncestorAndObserverEnqueueRecord(target, function(options) {
+        forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
           if (!options.childList) return;
           return record;
         });
@@ -4988,8 +5760,83 @@
     }
   };
   global.JsMutationObserver = JsMutationObserver;
-  if (!global.MutationObserver) global.MutationObserver = JsMutationObserver;
-})(this);
+  if (!global.MutationObserver) {
+    global.MutationObserver = JsMutationObserver;
+    JsMutationObserver._isPolyfilled = true;
+  }
+})(self);
+
+(function(scope) {
+  "use strict";
+  if (!window.performance) {
+    var start = Date.now();
+    window.performance = {
+      now: function() {
+        return Date.now() - start;
+      }
+    };
+  }
+  if (!window.requestAnimationFrame) {
+    window.requestAnimationFrame = function() {
+      var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
+      return nativeRaf ? function(callback) {
+        return nativeRaf(function() {
+          callback(performance.now());
+        });
+      } : function(callback) {
+        return window.setTimeout(callback, 1e3 / 60);
+      };
+    }();
+  }
+  if (!window.cancelAnimationFrame) {
+    window.cancelAnimationFrame = function() {
+      return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
+        clearTimeout(id);
+      };
+    }();
+  }
+  var workingDefaultPrevented = function() {
+    var e = document.createEvent("Event");
+    e.initEvent("foo", true, true);
+    e.preventDefault();
+    return e.defaultPrevented;
+  }();
+  if (!workingDefaultPrevented) {
+    var origPreventDefault = Event.prototype.preventDefault;
+    Event.prototype.preventDefault = function() {
+      if (!this.cancelable) {
+        return;
+      }
+      origPreventDefault.call(this);
+      Object.defineProperty(this, "defaultPrevented", {
+        get: function() {
+          return true;
+        },
+        configurable: true
+      });
+    };
+  }
+  var isIE = /Trident/.test(navigator.userAgent);
+  if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
+    window.CustomEvent = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("CustomEvent");
+      e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
+      return e;
+    };
+    window.CustomEvent.prototype = window.Event.prototype;
+  }
+  if (!window.Event || isIE && typeof window.Event !== "function") {
+    var origEvent = window.Event;
+    window.Event = function(inType, params) {
+      params = params || {};
+      var e = document.createEvent("Event");
+      e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
+      return e;
+    };
+    window.Event.prototype = origEvent.prototype;
+  }
+})(window.WebComponents);
 
 window.HTMLImports = window.HTMLImports || {
   flags: {}
@@ -5000,12 +5847,12 @@
   var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link"));
   var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill);
   var wrap = function(node) {
-    return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node;
+    return hasShadowDOMPolyfill ? window.ShadowDOMPolyfill.wrapIfNeeded(node) : node;
   };
   var rootDocument = wrap(document);
   var currentScriptDescriptor = {
     get: function() {
-      var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
+      var script = window.HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null);
       return wrap(script);
     },
     configurable: true
@@ -5042,26 +5889,36 @@
   }
   function watchImportsLoad(callback, doc) {
     var imports = doc.querySelectorAll("link[rel=import]");
-    var loaded = 0, l = imports.length;
-    function checkDone(d) {
-      if (loaded == l && callback) {
-        callback();
+    var parsedCount = 0, importCount = imports.length, newImports = [], errorImports = [];
+    function checkDone() {
+      if (parsedCount == importCount && callback) {
+        callback({
+          allImports: imports,
+          loadedImports: newImports,
+          errorImports: errorImports
+        });
       }
     }
     function loadedImport(e) {
       markTargetLoaded(e);
-      loaded++;
+      newImports.push(this);
+      parsedCount++;
       checkDone();
     }
-    if (l) {
-      for (var i = 0, imp; i < l && (imp = imports[i]); i++) {
+    function errorLoadingImport(e) {
+      errorImports.push(this);
+      parsedCount++;
+      checkDone();
+    }
+    if (importCount) {
+      for (var i = 0, imp; i < importCount && (imp = imports[i]); i++) {
         if (isImportLoaded(imp)) {
-          loadedImport.call(imp, {
-            target: imp
-          });
+          newImports.push(this);
+          parsedCount++;
+          checkDone();
         } else {
           imp.addEventListener("load", loadedImport);
-          imp.addEventListener("error", loadedImport);
+          imp.addEventListener("error", errorLoadingImport);
         }
       }
     } else {
@@ -5111,19 +5968,19 @@
       }
     })();
   }
-  whenReady(function() {
-    HTMLImports.ready = true;
-    HTMLImports.readyTime = new Date().getTime();
-    rootDocument.dispatchEvent(new CustomEvent("HTMLImportsLoaded", {
-      bubbles: true
-    }));
+  whenReady(function(detail) {
+    window.HTMLImports.ready = true;
+    window.HTMLImports.readyTime = new Date().getTime();
+    var evt = rootDocument.createEvent("CustomEvent");
+    evt.initCustomEvent("HTMLImportsLoaded", true, true, detail);
+    rootDocument.dispatchEvent(evt);
   });
   scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE;
   scope.useNative = useNative;
   scope.rootDocument = rootDocument;
   scope.whenReady = whenReady;
   scope.isIE = isIE;
-})(HTMLImports);
+})(window.HTMLImports);
 
 (function(scope) {
   var modules = [];
@@ -5137,26 +5994,29 @@
   };
   scope.addModule = addModule;
   scope.initializeModules = initializeModules;
-})(HTMLImports);
+})(window.HTMLImports);
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g;
   var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g;
   var path = {
-    resolveUrlsInStyle: function(style) {
+    resolveUrlsInStyle: function(style, linkUrl) {
       var doc = style.ownerDocument;
       var resolver = doc.createElement("a");
-      style.textContent = this.resolveUrlsInCssText(style.textContent, resolver);
+      style.textContent = this.resolveUrlsInCssText(style.textContent, linkUrl, resolver);
       return style;
     },
-    resolveUrlsInCssText: function(cssText, urlObj) {
-      var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP);
-      r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP);
+    resolveUrlsInCssText: function(cssText, linkUrl, urlObj) {
+      var r = this.replaceUrls(cssText, urlObj, linkUrl, CSS_URL_REGEXP);
+      r = this.replaceUrls(r, urlObj, linkUrl, CSS_IMPORT_REGEXP);
       return r;
     },
-    replaceUrls: function(text, urlObj, regexp) {
+    replaceUrls: function(text, urlObj, linkUrl, regexp) {
       return text.replace(regexp, function(m, pre, url, post) {
         var urlPath = url.replace(/["']/g, "");
+        if (linkUrl) {
+          urlPath = new URL(urlPath, linkUrl).href;
+        }
         urlObj.href = urlPath;
         urlPath = urlObj.href;
         return pre + "'" + urlPath + "'" + post;
@@ -5166,8 +6026,8 @@
   scope.path = path;
 });
 
-HTMLImports.addModule(function(scope) {
-  xhr = {
+window.HTMLImports.addModule(function(scope) {
+  var xhr = {
     async: true,
     ok: function(request) {
       return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0;
@@ -5180,10 +6040,14 @@
       request.open("GET", url, xhr.async);
       request.addEventListener("readystatechange", function(e) {
         if (request.readyState === 4) {
-          var locationHeader = request.getResponseHeader("Location");
           var redirectedUrl = null;
-          if (locationHeader) {
-            var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+          try {
+            var locationHeader = request.getResponseHeader("Location");
+            if (locationHeader) {
+              redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader;
+            }
+          } catch (e) {
+            console.error(e.message);
           }
           next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl);
         }
@@ -5198,7 +6062,7 @@
   scope.xhr = xhr;
 });
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var xhr = scope.xhr;
   var flags = scope.flags;
   var Loader = function(onLoad, onComplete) {
@@ -5244,7 +6108,13 @@
     },
     fetch: function(url, elt) {
       flags.load && console.log("fetch", url, elt);
-      if (url.match(/^data:/)) {
+      if (!url) {
+        setTimeout(function() {
+          this.receive(url, elt, {
+            error: "href must be specified"
+          }, null);
+        }.bind(this), 0);
+      } else if (url.match(/^data:/)) {
         var pieces = url.split(",");
         var header = pieces[0];
         var body = pieces[1];
@@ -5285,7 +6155,7 @@
   scope.Loader = Loader;
 });
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var Observer = function(addCallback) {
     this.addCallback = addCallback;
     this.mo = new MutationObserver(this.handler.bind(this));
@@ -5318,7 +6188,7 @@
   scope.Observer = Observer;
 });
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var path = scope.path;
   var rootDocument = scope.rootDocument;
   var flags = scope.flags;
@@ -5327,7 +6197,7 @@
   var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]";
   var importParser = {
     documentSelectors: IMPORT_SELECTOR,
-    importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","),
+    importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]:not([type])", "style:not([type])", "script:not([type])", 'script[type="application/javascript"]', 'script[type="text/javascript"]' ].join(","),
     map: {
       link: "parseLink",
       script: "parseScript",
@@ -5378,8 +6248,9 @@
       }
     },
     parseImport: function(elt) {
-      if (HTMLImports.__importsParsingHook) {
-        HTMLImports.__importsParsingHook(elt);
+      elt.import = elt.__doc;
+      if (window.HTMLImports.__importsParsingHook) {
+        window.HTMLImports.__importsParsingHook(elt);
       }
       if (elt.import) {
         elt.import.__importParsed = true;
@@ -5418,6 +6289,7 @@
     parseStyle: function(elt) {
       var src = elt;
       elt = cloneStyle(elt);
+      src.__appliedElement = elt;
       elt.__importElement = src;
       this.parseGeneric(elt);
     },
@@ -5434,16 +6306,13 @@
     },
     addElementToDocument: function(elt) {
       var port = this.rootImportForElement(elt.__importElement || elt);
-      var l = port.__insertedElements = port.__insertedElements || 0;
-      var refNode = port.nextElementSibling;
-      for (var i = 0; i < l; i++) {
-        refNode = refNode && refNode.nextElementSibling;
-      }
-      port.parentNode.insertBefore(elt, refNode);
+      port.parentNode.insertBefore(elt, port);
     },
     trackElement: function(elt, callback) {
       var self = this;
       var done = function(e) {
+        elt.removeEventListener("load", done);
+        elt.removeEventListener("error", done);
         if (callback) {
           callback(e);
         }
@@ -5467,9 +6336,11 @@
           }
         }
         if (fakeLoad) {
-          elt.dispatchEvent(new CustomEvent("load", {
-            bubbles: false
-          }));
+          setTimeout(function() {
+            elt.dispatchEvent(new CustomEvent("load", {
+              bubbles: false
+            }));
+          });
         }
       }
     },
@@ -5479,7 +6350,9 @@
       script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt);
       scope.currentScript = scriptElt;
       this.trackElement(script, function(e) {
-        script.parentNode.removeChild(script);
+        if (script.parentNode) {
+          script.parentNode.removeChild(script);
+        }
         scope.currentScript = null;
       });
       this.addElementToDocument(script);
@@ -5492,10 +6365,10 @@
       if (doc && this._mayParse.indexOf(doc) < 0) {
         this._mayParse.push(doc);
         var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc));
-        for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) {
+        for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
           if (!this.isParsed(n)) {
             if (this.hasResource(n)) {
-              return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n;
+              return nodeIsImport(n) ? this.nextToParseInDoc(n.__doc, n) : n;
             } else {
               return;
             }
@@ -5518,7 +6391,7 @@
       return this.dynamicElements.indexOf(elt) >= 0;
     },
     hasResource: function(node) {
-      if (nodeIsImport(node) && node.import === undefined) {
+      if (nodeIsImport(node) && node.__doc === undefined) {
         return false;
       }
       return true;
@@ -5552,7 +6425,7 @@
   scope.IMPORT_SELECTOR = IMPORT_SELECTOR;
 });
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var flags = scope.flags;
   var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE;
   var IMPORT_SELECTOR = scope.IMPORT_SELECTOR;
@@ -5592,7 +6465,7 @@
           }
           this.documents[url] = doc;
         }
-        elt.import = doc;
+        elt.__doc = doc;
       }
       parser.parseNext();
     },
@@ -5613,13 +6486,18 @@
   function isLinkRel(elt, rel) {
     return elt.localName === "link" && elt.getAttribute("rel") === rel;
   }
+  function hasBaseURIAccessor(doc) {
+    return !!Object.getOwnPropertyDescriptor(doc, "baseURI");
+  }
   function makeDocument(resource, url) {
     var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE);
     doc._URL = url;
     var base = doc.createElement("base");
     base.setAttribute("href", url);
-    if (!doc.baseURI) {
-      doc.baseURI = url;
+    if (!doc.baseURI && !hasBaseURIAccessor(doc)) {
+      Object.defineProperty(doc, "baseURI", {
+        value: url
+      });
     }
     var meta = doc.createElement("meta");
     meta.setAttribute("charset", "utf-8");
@@ -5646,12 +6524,12 @@
   scope.importLoader = importLoader;
 });
 
-HTMLImports.addModule(function(scope) {
+window.HTMLImports.addModule(function(scope) {
   var parser = scope.parser;
   var importer = scope.importer;
   var dynamic = {
     added: function(nodes) {
-      var owner, parsed;
+      var owner, parsed, loading;
       for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) {
         if (!owner) {
           owner = n.ownerDocument;
@@ -5678,28 +6556,22 @@
 });
 
 (function(scope) {
-  initializeModules = scope.initializeModules;
+  var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
   if (scope.useNative) {
     return;
   }
-  if (typeof window.CustomEvent !== "function") {
-    window.CustomEvent = function(inType, dictionary) {
-      var e = document.createEvent("HTMLEvents");
-      e.initEvent(inType, dictionary.bubbles === false ? false : true, dictionary.cancelable === false ? false : true, dictionary.detail);
-      return e;
-    };
-  }
   initializeModules();
   var rootDocument = scope.rootDocument;
   function bootstrap() {
-    HTMLImports.importer.bootDocument(rootDocument);
+    window.HTMLImports.importer.bootDocument(rootDocument);
   }
   if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) {
     bootstrap();
   } else {
     document.addEventListener("DOMContentLoaded", bootstrap);
   }
-})(HTMLImports);
+})(window.HTMLImports);
 
 window.CustomElements = window.CustomElements || {
   flags: {}
@@ -5719,11 +6591,12 @@
   scope.addModule = addModule;
   scope.initializeModules = initializeModules;
   scope.hasNative = Boolean(document.registerElement);
-  scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative);
-})(CustomElements);
+  scope.isIE = /Trident/.test(navigator.userAgent);
+  scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || window.HTMLImports.useNative);
+})(window.CustomElements);
 
-CustomElements.addModule(function(scope) {
-  var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none";
+window.CustomElements.addModule(function(scope) {
+  var IMPORT_LINK_TYPE = window.HTMLImports ? window.HTMLImports.IMPORT_LINK_TYPE : "none";
   function forSubtree(node, cb) {
     findAllElements(node, function(e) {
       if (cb(e)) {
@@ -5756,14 +6629,11 @@
       root = root.olderShadowRoot;
     }
   }
-  var processingDocuments;
   function forDocumentTree(doc, cb) {
-    processingDocuments = [];
-    _forDocumentTree(doc, cb);
-    processingDocuments = null;
+    _forDocumentTree(doc, cb, []);
   }
-  function _forDocumentTree(doc, cb) {
-    doc = wrap(doc);
+  function _forDocumentTree(doc, cb, processingDocuments) {
+    doc = window.wrap(doc);
     if (processingDocuments.indexOf(doc) >= 0) {
       return;
     }
@@ -5771,7 +6641,7 @@
     var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]");
     for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) {
       if (n.import) {
-        _forDocumentTree(n.import, cb);
+        _forDocumentTree(n.import, cb, processingDocuments);
       }
     }
     cb(doc);
@@ -5780,36 +6650,31 @@
   scope.forSubtree = forSubtree;
 });
 
-CustomElements.addModule(function(scope) {
+window.CustomElements.addModule(function(scope) {
   var flags = scope.flags;
   var forSubtree = scope.forSubtree;
   var forDocumentTree = scope.forDocumentTree;
-  function addedNode(node) {
-    return added(node) || addedSubtree(node);
+  function addedNode(node, isAttached) {
+    return added(node, isAttached) || addedSubtree(node, isAttached);
   }
-  function added(node) {
-    if (scope.upgrade(node)) {
+  function added(node, isAttached) {
+    if (scope.upgrade(node, isAttached)) {
       return true;
     }
-    attached(node);
+    if (isAttached) {
+      attached(node);
+    }
   }
-  function addedSubtree(node) {
+  function addedSubtree(node, isAttached) {
     forSubtree(node, function(e) {
-      if (added(e)) {
+      if (added(e, isAttached)) {
         return true;
       }
     });
   }
-  function attachedNode(node) {
-    attached(node);
-    if (inDocument(node)) {
-      forSubtree(node, function(e) {
-        attached(e);
-      });
-    }
-  }
-  var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver;
-  scope.hasPolyfillMutations = hasPolyfillMutations;
+  var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
+  scope.hasPolyfillMutations = hasThrottledAttached;
+  scope.hasThrottledAttached = hasThrottledAttached;
   var isPendingMutations = false;
   var pendingMutations = [];
   function deferMutation(fn) {
@@ -5828,7 +6693,7 @@
     pendingMutations = [];
   }
   function attached(element) {
-    if (hasPolyfillMutations) {
+    if (hasThrottledAttached) {
       deferMutation(function() {
         _attached(element);
       });
@@ -5837,12 +6702,10 @@
     }
   }
   function _attached(element) {
-    if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
-      if (!element.__attached && inDocument(element)) {
-        element.__attached = true;
-        if (element.attachedCallback) {
-          element.attachedCallback();
-        }
+    if (element.__upgraded__ && !element.__attached) {
+      element.__attached = true;
+      if (element.attachedCallback) {
+        element.attachedCallback();
       }
     }
   }
@@ -5853,7 +6716,7 @@
     });
   }
   function detached(element) {
-    if (hasPolyfillMutations) {
+    if (hasThrottledAttached) {
       deferMutation(function() {
         _detached(element);
       });
@@ -5862,23 +6725,21 @@
     }
   }
   function _detached(element) {
-    if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) {
-      if (element.__attached && !inDocument(element)) {
-        element.__attached = false;
-        if (element.detachedCallback) {
-          element.detachedCallback();
-        }
+    if (element.__upgraded__ && element.__attached) {
+      element.__attached = false;
+      if (element.detachedCallback) {
+        element.detachedCallback();
       }
     }
   }
   function inDocument(element) {
     var p = element;
-    var doc = wrap(document);
+    var doc = window.wrap(document);
     while (p) {
       if (p == doc) {
         return true;
       }
-      p = p.parentNode || p.host;
+      p = p.parentNode || p.nodeType === Node.DOCUMENT_FRAGMENT_NODE && p.host;
     }
   }
   function watchShadow(node) {
@@ -5891,7 +6752,7 @@
       }
     }
   }
-  function handler(mutations) {
+  function handler(root, mutations) {
     if (flags.dom) {
       var mx = mutations[0];
       if (mx && mx.type === "childList" && mx.addedNodes) {
@@ -5906,13 +6767,14 @@
       }
       console.group("mutations (%d) [%s]", mutations.length, u || "");
     }
+    var isAttached = inDocument(root);
     mutations.forEach(function(mx) {
       if (mx.type === "childList") {
         forEach(mx.addedNodes, function(n) {
           if (!n.localName) {
             return;
           }
-          addedNode(n);
+          addedNode(n, isAttached);
         });
         forEach(mx.removedNodes, function(n) {
           if (!n.localName) {
@@ -5925,16 +6787,16 @@
     flags.dom && console.groupEnd();
   }
   function takeRecords(node) {
-    node = wrap(node);
+    node = window.wrap(node);
     if (!node) {
-      node = wrap(document);
+      node = window.wrap(document);
     }
     while (node.parentNode) {
       node = node.parentNode;
     }
     var observer = node.__observer;
     if (observer) {
-      handler(observer.takeRecords());
+      handler(node, observer.takeRecords());
       takeMutations();
     }
   }
@@ -5943,7 +6805,7 @@
     if (inRoot.__observer) {
       return;
     }
-    var observer = new MutationObserver(handler);
+    var observer = new MutationObserver(handler.bind(this, inRoot));
     observer.observe(inRoot, {
       childList: true,
       subtree: true
@@ -5951,9 +6813,10 @@
     inRoot.__observer = observer;
   }
   function upgradeDocument(doc) {
-    doc = wrap(doc);
+    doc = window.wrap(doc);
     flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop());
-    addedNode(doc);
+    var isMainDocument = doc === window.wrap(document);
+    addedNode(doc, isMainDocument);
     observe(doc);
     flags.dom && console.groupEnd();
   }
@@ -5961,35 +6824,41 @@
     forDocumentTree(doc, upgradeDocument);
   }
   var originalCreateShadowRoot = Element.prototype.createShadowRoot;
-  Element.prototype.createShadowRoot = function() {
-    var root = originalCreateShadowRoot.call(this);
-    CustomElements.watchShadow(this);
-    return root;
-  };
+  if (originalCreateShadowRoot) {
+    Element.prototype.createShadowRoot = function() {
+      var root = originalCreateShadowRoot.call(this);
+      window.CustomElements.watchShadow(this);
+      return root;
+    };
+  }
   scope.watchShadow = watchShadow;
   scope.upgradeDocumentTree = upgradeDocumentTree;
+  scope.upgradeDocument = upgradeDocument;
   scope.upgradeSubtree = addedSubtree;
   scope.upgradeAll = addedNode;
-  scope.attachedNode = attachedNode;
+  scope.attached = attached;
   scope.takeRecords = takeRecords;
 });
 
-CustomElements.addModule(function(scope) {
+window.CustomElements.addModule(function(scope) {
   var flags = scope.flags;
-  function upgrade(node) {
+  function upgrade(node, isAttached) {
+    if (node.localName === "template") {
+      if (window.HTMLTemplateElement && HTMLTemplateElement.decorate) {
+        HTMLTemplateElement.decorate(node);
+      }
+    }
     if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) {
       var is = node.getAttribute("is");
-      var definition = scope.getRegisteredDefinition(is || node.localName);
+      var definition = scope.getRegisteredDefinition(node.localName) || scope.getRegisteredDefinition(is);
       if (definition) {
-        if (is && definition.tag == node.localName) {
-          return upgradeWithDefinition(node, definition);
-        } else if (!is && !definition.extends) {
-          return upgradeWithDefinition(node, definition);
+        if (is && definition.tag == node.localName || !is && !definition.extends) {
+          return upgradeWithDefinition(node, definition, isAttached);
         }
       }
     }
   }
-  function upgradeWithDefinition(element, definition) {
+  function upgradeWithDefinition(element, definition, isAttached) {
     flags.upgrade && console.group("upgrade:", element.localName);
     if (definition.is) {
       element.setAttribute("is", definition.is);
@@ -5997,8 +6866,10 @@
     implementPrototype(element, definition);
     element.__upgraded__ = true;
     created(element);
-    scope.attachedNode(element);
-    scope.upgradeSubtree(element);
+    if (isAttached) {
+      scope.attached(element);
+    }
+    scope.upgradeSubtree(element, isAttached);
     flags.upgrade && console.groupEnd();
     return element;
   }
@@ -6034,9 +6905,10 @@
   scope.implementPrototype = implementPrototype;
 });
 
-CustomElements.addModule(function(scope) {
+window.CustomElements.addModule(function(scope) {
+  var isIE = scope.isIE;
   var upgradeDocumentTree = scope.upgradeDocumentTree;
-  var upgrade = scope.upgrade;
+  var upgradeAll = scope.upgradeAll;
   var upgradeWithDefinition = scope.upgradeWithDefinition;
   var implementPrototype = scope.implementPrototype;
   var useNative = scope.useNative;
@@ -6125,17 +6997,23 @@
       var nativePrototype = HTMLElement.prototype;
       if (definition.is) {
         var inst = document.createElement(definition.tag);
-        var expectedPrototype = Object.getPrototypeOf(inst);
-        if (expectedPrototype === definition.prototype) {
-          nativePrototype = expectedPrototype;
-        }
+        nativePrototype = Object.getPrototypeOf(inst);
       }
       var proto = definition.prototype, ancestor;
-      while (proto && proto !== nativePrototype) {
+      var foundPrototype = false;
+      while (proto) {
+        if (proto == nativePrototype) {
+          foundPrototype = true;
+        }
         ancestor = Object.getPrototypeOf(proto);
-        proto.__proto__ = ancestor;
+        if (ancestor) {
+          proto.__proto__ = ancestor;
+        }
         proto = ancestor;
       }
+      if (!foundPrototype) {
+        console.warn(definition.tag + " prototype not found in prototype chain for " + definition.is);
+      }
       definition.native = nativePrototype;
     }
   }
@@ -6165,6 +7043,12 @@
     }
   }
   function createElement(tag, typeExtension) {
+    if (tag) {
+      tag = tag.toLowerCase();
+    }
+    if (typeExtension) {
+      typeExtension = typeExtension.toLowerCase();
+    }
     var definition = getRegisteredDefinition(typeExtension || tag);
     if (definition) {
       if (tag == definition.tag && typeExtension == definition.is) {
@@ -6186,17 +7070,14 @@
     }
     return element;
   }
-  function cloneNode(deep) {
-    var n = domCloneNode.call(this, deep);
-    upgrade(n);
-    return n;
-  }
   var domCreateElement = document.createElement.bind(document);
   var domCreateElementNS = document.createElementNS.bind(document);
-  var domCloneNode = Node.prototype.cloneNode;
   var isInstance;
   if (!Object.__proto__ && !useNative) {
     isInstance = function(obj, ctor) {
+      if (obj instanceof ctor) {
+        return true;
+      }
       var p = obj;
       while (p) {
         if (p === ctor.prototype) {
@@ -6211,10 +7092,34 @@
       return obj instanceof base;
     };
   }
+  function wrapDomMethodToForceUpgrade(obj, methodName) {
+    var orig = obj[methodName];
+    obj[methodName] = function() {
+      var n = orig.apply(this, arguments);
+      upgradeAll(n);
+      return n;
+    };
+  }
+  wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
+  wrapDomMethodToForceUpgrade(document, "importNode");
+  if (isIE) {
+    (function() {
+      var importNode = document.importNode;
+      document.importNode = function() {
+        var n = importNode.apply(document, arguments);
+        if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
+          var f = document.createDocumentFragment();
+          f.appendChild(n);
+          return f;
+        } else {
+          return n;
+        }
+      };
+    })();
+  }
   document.registerElement = register;
   document.createElement = createElement;
   document.createElementNS = createElementNS;
-  Node.prototype.cloneNode = cloneNode;
   scope.registry = registry;
   scope.instanceof = isInstance;
   scope.reservedTagList = reservedTagList;
@@ -6225,6 +7130,7 @@
 (function(scope) {
   var useNative = scope.useNative;
   var initializeModules = scope.initializeModules;
+  var isIE = scope.isIE;
   if (useNative) {
     var nop = function() {};
     scope.watchShadow = nop;
@@ -6240,49 +7146,48 @@
     initializeModules();
   }
   var upgradeDocumentTree = scope.upgradeDocumentTree;
+  var upgradeDocument = scope.upgradeDocument;
   if (!window.wrap) {
     if (window.ShadowDOMPolyfill) {
-      window.wrap = ShadowDOMPolyfill.wrapIfNeeded;
-      window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded;
+      window.wrap = window.ShadowDOMPolyfill.wrapIfNeeded;
+      window.unwrap = window.ShadowDOMPolyfill.unwrapIfNeeded;
     } else {
       window.wrap = window.unwrap = function(node) {
         return node;
       };
     }
   }
-  function bootstrap() {
-    upgradeDocumentTree(wrap(document));
-    if (window.HTMLImports) {
-      HTMLImports.__importsParsingHook = function(elt) {
-        upgradeDocumentTree(wrap(elt.import));
-      };
-    }
-    CustomElements.ready = true;
-    setTimeout(function() {
-      CustomElements.readyTime = Date.now();
-      if (window.HTMLImports) {
-        CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime;
+  if (window.HTMLImports) {
+    window.HTMLImports.__importsParsingHook = function(elt) {
+      if (elt.import) {
+        upgradeDocument(wrap(elt.import));
       }
-      document.dispatchEvent(new CustomEvent("WebComponentsReady", {
-        bubbles: true
-      }));
-    });
-  }
-  if (typeof window.CustomEvent !== "function") {
-    window.CustomEvent = function(inType, params) {
-      params = params || {};
-      var e = document.createEvent("CustomEvent");
-      e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail);
-      return e;
     };
-    window.CustomEvent.prototype = window.Event.prototype;
+  }
+  function bootstrap() {
+    upgradeDocumentTree(window.wrap(document));
+    window.CustomElements.ready = true;
+    var requestAnimationFrame = window.requestAnimationFrame || function(f) {
+      setTimeout(f, 16);
+    };
+    requestAnimationFrame(function() {
+      setTimeout(function() {
+        window.CustomElements.readyTime = Date.now();
+        if (window.HTMLImports) {
+          window.CustomElements.elapsed = window.CustomElements.readyTime - window.HTMLImports.readyTime;
+        }
+        document.dispatchEvent(new CustomEvent("WebComponentsReady", {
+          bubbles: true
+        }));
+      });
+    });
   }
   if (document.readyState === "complete" || scope.flags.eager) {
     bootstrap();
   } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) {
     bootstrap();
   } else {
-    var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
+    var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded";
     window.addEventListener(loadEvent, bootstrap);
   }
 })(window.CustomElements);
@@ -6302,66 +7207,6 @@
 })(window.WebComponents);
 
 (function(scope) {
-  "use strict";
-  if (!window.performance) {
-    var start = Date.now();
-    window.performance = {
-      now: function() {
-        return Date.now() - start;
-      }
-    };
-  }
-  if (!window.requestAnimationFrame) {
-    window.requestAnimationFrame = function() {
-      var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
-      return nativeRaf ? function(callback) {
-        return nativeRaf(function() {
-          callback(performance.now());
-        });
-      } : function(callback) {
-        return window.setTimeout(callback, 1e3 / 60);
-      };
-    }();
-  }
-  if (!window.cancelAnimationFrame) {
-    window.cancelAnimationFrame = function() {
-      return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
-        clearTimeout(id);
-      };
-    }();
-  }
-  var elementDeclarations = [];
-  var polymerStub = function(name, dictionary) {
-    if (typeof name !== "string" && arguments.length === 1) {
-      Array.prototype.push.call(arguments, document._currentScript);
-    }
-    elementDeclarations.push(arguments);
-  };
-  window.Polymer = polymerStub;
-  scope.consumeDeclarations = function(callback) {
-    scope.consumeDeclarations = function() {
-      throw "Possible attempt to load Polymer twice";
-    };
-    if (callback) {
-      callback(elementDeclarations);
-    }
-    elementDeclarations = null;
-  };
-  function installPolymerWarning() {
-    if (window.Polymer === polymerStub) {
-      window.Polymer = function() {
-        throw new Error("You tried to use polymer without loading it first. To " + 'load polymer, <link rel="import" href="' + 'components/polymer/polymer.html">');
-      };
-    }
-  }
-  if (HTMLImports.useNative) {
-    installPolymerWarning();
-  } else {
-    addEventListener("DOMContentLoaded", installPolymerWarning);
-  }
-})(window.WebComponents);
-
-(function(scope) {
   var style = document.createElement("style");
   style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
   var head = document.querySelector("head");
@@ -6370,4 +7215,4 @@
 
 (function(scope) {
   window.Platform = scope;
-})(window.WebComponents);
+})(window.WebComponents);
\ No newline at end of file
diff --git a/packages/web_components/lib/webcomponents.min.js b/packages/web_components/lib/webcomponents.min.js
index 9118695..155ba28 100644
--- a/packages/web_components/lib/webcomponents.min.js
+++ b/packages/web_components/lib/webcomponents.min.js
@@ -7,8 +7,8 @@
  * Code distributed by Google as part of the polymer project is also
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
  */
-// @version 0.5.1
-window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",r=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0)}),r)for(var o,i=0;o=r.attributes[i];i++)"src"!==o.name&&(t[o.name]=o.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];k(e,o,F(t,o))}return e}function o(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}k(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){U.value=n,k(e,t,U)}function s(e){var t=e.__proto__||Object.getPrototypeOf(e),n=R.get(t);if(n)return n;var r=s(t),o=E(r);return g(t,o,e),o}function c(e,t){w(e,t,!0)}function l(e,t){w(t,e,!1)}function u(e){return/^on[a-z]+$/.test(e)}function d(e){return/^\w[a-zA-Z_0-9]*$/.test(e)}function p(e){return A&&d(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function f(e){return A&&d(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function h(e){return A&&d(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function m(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return q}}function w(t,n,r){for(var o=W(t),i=0;i<o.length;i++){var a=o[i];if("polymerBlackList_"!==a&&!(a in n||t.polymerBlackList_&&t.polymerBlackList_[a])){B&&t.__lookupGetter__(a);var s,c,l=m(t,a);if(r&&"function"==typeof l.value)n[a]=h(a);else{var d=u(a);s=d?e.getEventHandlerGetter(a):p(a),(l.writable||l.set||V)&&(c=d?e.getEventHandlerSetter(a):f(a)),k(n,a,{get:s,set:c,configurable:l.configurable,enumerable:l.enumerable})}}}}function v(e,t,n){var r=e.prototype;g(r,t,n),o(t,e)}function g(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),P.set(o,e),c(e,o),r&&l(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return g(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function S(e){return e&&e.__impl4cf1e782hg__}function T(e){return!S(e)}function M(e){return null===e?null:(n(T(e)),e.__wrapper8e3dd93a60__||(e.__wrapper8e3dd93a60__=new(s(e))(e)))}function _(e){return null===e?null:(n(S(e)),e.__impl4cf1e782hg__)}function O(e){return e.__impl4cf1e782hg__}function L(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function N(e){return e&&S(e)?_(e):e}function C(e){return e&&!S(e)?M(e):e}function D(e,t){null!==t&&(n(T(e)),n(void 0===t||S(t)),e.__wrapper8e3dd93a60__=t)}function j(e,t,n){G.get=n,k(e.prototype,t,G)}function H(e,t){j(e,t,function(){return M(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=C(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,P=new WeakMap,I=Object.create(null),A=t(),k=Object.defineProperty,W=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,U={value:void 0,configurable:!0,enumerable:!1,writable:!0};W(window);var B=/Firefox/.test(navigator.userAgent),q={get:function(){},set:function(){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.assert=n,e.constructorTable=R,e.defineGetter=j,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isWrapper=S,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=P,e.oneOf=i,e.registerObject=y,e.registerWrapper=v,e.rewrap=D,e.setWrapper=L,e.unsafeUnwrap=O,e.unwrap=_,e.unwrapIfNeeded=N,e.wrap=M,e.wrapIfNeeded=C,e.wrappers=I}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),l=0;a>l;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;s>u;u++)c[0][u]=u;for(var l=1;a>l;l++)for(var u=1;s>u;u++)if(this.equals(e[t+u-1],r[o+l-1]))c[l][u]=c[l-1][u-1];else{var d=c[l-1][u]+1,p=c[l][u-1]+1;c[l][u]=p>d?d:p}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var l,u=e[t-1][n-1],d=e[t-1][n],p=e[t][n-1];l=p>d?u>d?d:u:u>p?p:u,l==u?(u==s?c.push(r):(c.push(o),s=u),t--,n--):l==d?(c.push(a),t--,s=d):(c.push(i),n--,s=p)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,l,u){var d=0,p=0,f=Math.min(s-n,u-l);if(0==n&&0==l&&(d=this.sharedPrefix(e,c,f)),s==e.length&&u==c.length&&(p=this.sharedSuffix(e,c,f-d)),n+=d,l+=d,s-=p,u-=p,s-n==0&&u-l==0)return[];if(n==s){for(var h=t(n,[],0);u>l;)h.removed.push(c[l++]);return[h]}if(l==u)return[t(n,[],s-n)];for(var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,l,u)),h=void 0,w=[],v=n,g=l,b=0;b<m.length;b++)switch(m[b]){case r:h&&(w.push(h),h=void 0),v++,g++;break;case o:h||(h=t(v,[],0)),h.addedCount++,v++,h.removed.push(c[g]),g++;break;case i:h||(h=t(v,[],0)),h.addedCount++,v++;break;case a:h||(h=t(v,[],0)),h.removed.push(c[g]),g++}return h&&w.push(h),w},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)e[t]()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),l=document.createTextNode(s);c.observe(l,{characterData:!0}),r=function(){s=(s+1)%2,l.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,h.push(e),m||(u(n),m=!0))}function n(){for(m=!1;h.length;){var e=h;h=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new p.NodeList,this.removedNodes=new p.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=f.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=f.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=f.get(s);if(c)for(var l=0;l<c.length;l++){var u=c[l],d=u.options;if((s===e||d.subtree)&&!("attributes"===n&&!d.attributes||"attributes"===n&&d.attributeFilter&&(null!==o.namespace||-1===d.attributeFilter.indexOf(o.name))||"characterData"===n&&!d.characterData||"childList"===n&&!d.childList)){var p=u.observer;i[p.uid_]=p,("attributes"===n&&d.attributeOldValue||"characterData"===n&&d.characterDataOldValue)&&(a[p.uid_]=o.oldValue)}}}for(var h in i){var p=i[h],m=new r(n,e);"name"in o&&"namespace"in o&&(m.attributeName=o.name,m.attributeNamespace=o.namespace),o.addedNodes&&(m.addedNodes=o.addedNodes),o.removedNodes&&(m.removedNodes=o.removedNodes),o.previousSibling&&(m.previousSibling=o.previousSibling),o.nextSibling&&(m.nextSibling=o.nextSibling),void 0!==a[h]&&(m.oldValue=a[h]),t(p),p.records_.push(m)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,this.attributes="attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?!!e.attributes:!0,this.characterData="characterDataOldValue"in e&&!("characterData"in e)?!0:!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=w.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++v,this.scheduled_=!1}function l(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var u=e.setEndOfMicrotask,d=e.wrapIfNeeded,p=e.wrappers,f=new WeakMap,h=[],m=!1,w=Array.prototype.slice,v=0;c.prototype={constructor:c,observe:function(e,t){e=d(e);var n,r=new s(t),o=f.get(e);o||f.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new l(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=f.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},l.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=f.get(e);n||f.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=f.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return k(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var l=a(c);if(l&&l.length>0){for(var u=0;u<l.length;u++){var p=l[u];if(i(p)){var f=n(p),h=f.olderShadowRoot;h&&s.push(h)}s.push(p)}c=l[l.length-1]}else if(t(c)){if(d(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=k(t),r=e[0],o=k(r),i=l(n,o),a=0;a<e.length;a++){var s=e[a];if(k(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function l(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function u(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=k(t),a=k(n),s=r(n,e),o=l(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var u=0;u<s.length;u++){var d=s[u];if(k(d)===c)return d}return null}function d(e,t){return k(e)===k(t)}function p(e){if(!K.get(e)&&(K.set(e,!0),h(V(e),V(e.target)),I)){var t=I;throw I=null,t}}function f(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function h(t,n){if(Y.get(t))throw new Error("InvalidStateError");Y.set(t,!0),e.renderAllPending();var o,i,a;if(f(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!f(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return nt.set(t,o),m(t,o,a,i)&&w(t,o,a,i)&&v(t,o,a,i),Z.set(t,rt),$.delete(t,null),Y.delete(t),t.defaultPrevented}function m(e,t,n,r){var o=ot;if(n&&!g(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function w(e,t,n,r){var o=it,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=at,i=1;i<t.length;i++)if(!g(t[i],e,o,t,r))return;n&&t.length>0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===ot)return!0;n===at&&(n=it)}else if(n===at&&!t.bubbles)return!0;if("relatedTarget"in t){var c=q(t),l=c.relatedTarget;if(l){if(l instanceof Object&&l.addEventListener){var d=V(l),p=u(t,e,d);if(p===a)return!0}else p=null;J.set(t,p)}}Z.set(t,n);var f=t.type,h=!1;X.set(t,a),$.set(t,e),i.depth++;for(var m=0,w=i.length;w>m;m++){var v=i[m];if(v.removed)h=!0;else if(!(v.type!==f||!v.capture&&n===ot||v.capture&&n===at))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),et.get(t))return!1}catch(g){I||(I=g)}}if(i.depth--,h&&0===i.depth){var b=i.slice();i.length=0;for(var m=0;m<b.length;m++)b[m].removed||i.push(b[m])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof st))return V(M(st,"Event",e,t));var n=e;return gt||"beforeunload"!==n.type||this instanceof _?void U(n,this):new _(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:q(e.relatedTarget)}}):e}function S(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void U(t,this):V(M(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&W(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function T(e,t){return function(){arguments[t]=q(arguments[t]);var n=q(this);n[e].apply(n,arguments)}}function M(e,t,n,r){if(wt)return new e(n,E(r));var o=q(document.createEvent(t)),i=mt[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=q(t)),a.push(t)}),o["init"+t].apply(o,a),o}function _(e){y.call(this,e)}function O(e){return"function"==typeof e?!0:e&&e.handleEvent}function L(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function N(e){U(e,this)}function C(e){return e instanceof G.ShadowRoot&&(e=e.host),q(e)}function D(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function j(e,t){for(var n=q(e);n;n=n.parentNode)if(D(V(n),t))return!0;return!1}function H(e){A(e,yt)}function x(t,n,o,i){e.renderAllPending();var a=V(Et.call(B(n),o,i));if(!a)return null;var c=r(a,null),l=c.lastIndexOf(t);return-1==l?null:(c=c.slice(0,l),s(c,t))}function R(e){return function(){var t=tt.get(this);return t&&t[e]&&t[e].value||null}}function P(e){var t=e.slice(2);return function(n){var r=tt.get(this);r||(r=Object.create(null),tt.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var I,A=e.forwardMethodsToWrapper,k=e.getTreeScope,W=e.mixin,F=e.registerWrapper,U=e.setWrapper,B=e.unsafeUnwrap,q=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),K=new WeakMap,Y=new WeakMap,X=new WeakMap,$=new WeakMap,J=new WeakMap,Z=new WeakMap,Q=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=0,ot=1,it=2,at=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var st=window.Event;st.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return X.get(this)},get currentTarget(){return $.get(this)},get eventPhase(){return Z.get(this)},get path(){var e=nt.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),et.set(this,!0)}},F(st,y,document.createEvent("Event"));var ct=S("UIEvent",y),lt=S("CustomEvent",y),ut={get relatedTarget(){var e=J.get(this);return void 0!==e?e:V(q(this).relatedTarget)}},dt=W({initMouseEvent:T("initMouseEvent",14)},ut),pt=W({initFocusEvent:T("initFocusEvent",5)},ut),ft=S("MouseEvent",ct,dt),ht=S("FocusEvent",ct,pt),mt=Object.create(null),wt=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!wt){var vt=function(e,t,n){if(n){var r=mt[n];t=W(W({},r),t)}mt[e]=t};vt("Event",{bubbles:!1,cancelable:!1}),vt("CustomEvent",{detail:null},"Event"),vt("UIEvent",{view:null,detail:0},"Event"),vt("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),vt("FocusEvent",{relatedTarget:null},"UIEvent")}var gt=window.BeforeUnloadEvent;_.prototype=Object.create(y.prototype),W(_.prototype,{get returnValue(){return B(this).returnValue},set returnValue(e){B(this).returnValue=e}}),gt&&F(gt,_);var bt=window.EventTarget,yt=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;yt.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),N.prototype={addEventListener:function(e,t,n){if(O(t)&&!L(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=C(this);a.addEventListener_(e,p,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=C(this);s.removeEventListener_(e,p,!0)}}},dispatchEvent:function(t){var n=q(t),r=n.type;K.set(n,!1),e.renderAllPending();var o;j(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return q(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},bt&&F(bt,N);var Et=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=P,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=_,e.wrappers.CustomEvent=lt,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEvent=ht,e.wrappers.MouseEvent=ft,e.wrappers.UIEvent=ct}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,m)}function n(e){l(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,l=e.setWrapper,u=e.unsafeUnwrap,d=e.wrap,p=window.TouchEvent;if(p){var f;try{f=document.createEvent("TouchEvent")}catch(h){return}var m={enumerable:!1};n.prototype={get target(){return d(u(this).target)}};var w={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){w.get=function(){return u(this)[e]},Object.defineProperty(n.prototype,e,w)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(u(this).touches)},get targetTouches(){return o(u(this).targetTouches)},get changedTouches(){return o(u(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(p,i,f),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){O(e instanceof S)}function n(e){var t=new M;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);U=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;U=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new M,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function l(e,t){R(e,t),e.nodeIsInserted_()}function u(e,t){for(var n=C(t),r=0;r<e.length;r++)l(e[r],n)}function d(e){R(e,new _(e,null))}function p(e){for(var t=0;t<e.length;t++)d(e[t])}function f(e,t){var n=e.nodeType===S.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function h(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function m(e,t){h(e,t);var n=t.length;if(1===n)return I(t[0]);for(var r=I(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(I(t[o]));return r}function w(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){O(t.parentNode===e);var n=t.nextSibling,r=I(t),o=r.parentNode;o&&Y.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=I(e),a=i.firstChild;a;)n=a.nextSibling,Y.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=k(n?B.call(n,P(e),!1):q.call(P(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||C(e)!==C(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function S(e){O(e instanceof V),T.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var T=e.wrappers.EventTarget,M=e.wrappers.NodeList,_=e.TreeScope,O=e.assert,L=e.defineWrapGetter,N=e.enqueueMutation,C=e.getTreeScope,D=e.isWrapper,j=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,P=e.unsafeUnwrap,I=e.unwrap,A=e.unwrapIfNeeded,k=e.wrap,W=e.wrapIfNeeded,F=e.wrappers,U=!1,B=document.importNode,q=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),K=V.prototype.insertBefore,Y=V.prototype.removeChild,X=V.prototype.replaceChild,$=/Trident/.test(navigator.userAgent),J=$?function(e,t){try{Y.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){Y.call(e,t)};S.prototype=Object.create(T.prototype),j(S.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?D(n)?r=I(n):(r=n,n=k(r)):(n=null,r=null),n&&O(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!g(e);if(o=c?a(e):i(e,this,s,n),c)f(this,e),w(this),K.call(P(this),I(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var l=r?r.parentNode:P(this);l?K.call(l,m(this,o),r):h(this,o)}return N(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),u(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=I(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,l=this.lastChild,u=i.parentNode;u&&J(u,i),c===e&&(this.firstChild_=a),l===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else w(this),J(P(this),i);return U||N(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(D(r)?o=I(r):(o=r,r=k(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,l=r.previousSibling,p=!this.invalidateShadowRenderer()&&!g(e);return p?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,l,c)),p?(f(this,e),w(this),X.call(P(this),I(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&X.call(o.parentNode,m(this,s),o)),N(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:l}),d(r),u(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:k(P(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:k(P(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:k(P(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:k(P(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:k(P(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==S.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=S.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(v(this),""!==e){var n=P(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else w(this),P(this).textContent=e;var r=c(this.childNodes);N(this,"childList",{addedNodes:r,removedNodes:t}),p(t),u(r,this)},get childNodes(){for(var e=new M,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,W(e))},compareDocumentPosition:function(e){return z.call(P(this),A(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===S.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeNode(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),L(S,"ownerDocument"),x(V,S,document.createDocumentFragment()),delete S.prototype.querySelector,delete S.prototype.querySelectorAll,S.prototype=j(Object.create(T.prototype),S.prototype),e.cloneNode=y,e.nodeWasAdded=l,e.nodeWasRemoved=d,e.nodesWereAdded=u,e.nodesWereRemoved=p,e.originalInsertBefore=K,e.originalRemoveChild=Y,e.snapshotNodeList=c,e.wrappers.Node=S}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=g(t[s]),!o&&(a=w(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\//g," ")}function r(e,t){for(var n,o=e.firstElementChild;o;){if(o.matches(t))return o;if(n=r(o,t))return n;o=o.nextElementSibling}return null}function o(e,t){return e.matches(t)}function i(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===C}function a(){return!0}function s(e,t,n){return e.localName===n}function c(e,t){return e.namespaceURI===t}function l(e,t,n){return e.namespaceURI===t&&e.localName===n}function u(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=u(a,t,n,r,o,i),a=a.nextElementSibling;return t}function d(n,r,o,i,a){var s,c=v(this),l=w(this).root;if(l instanceof e.wrappers.ShadowRoot)return u(this,r,o,n,i,null);if(c instanceof L)s=S.call(c,i);else{if(!(c instanceof N))return u(this,r,o,n,i,null);s=E.call(c,i)}return t(s,r,o,a)}function p(n,r,o,i,a){var s,c=v(this),l=w(this).root;if(l instanceof e.wrappers.ShadowRoot)return u(this,r,o,n,i,a);if(c instanceof L)s=M.call(c,i,a);else{if(!(c instanceof N))return u(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=v(this),l=w(this).root;if(l instanceof e.wrappers.ShadowRoot)return u(this,r,o,n,i,a);if(c instanceof L)s=O.call(c,i,a);else{if(!(c instanceof N))return u(this,r,o,n,i,a);s=_.call(c,i,a)}return t(s,r,o,!1)}var h=e.wrappers.HTMLCollection,m=e.wrappers.NodeList,w=e.getTreeScope,v=e.unsafeUnwrap,g=e.wrap,b=document.querySelector,y=document.documentElement.querySelector,E=document.querySelectorAll,S=document.documentElement.querySelectorAll,T=document.getElementsByTagName,M=document.documentElement.getElementsByTagName,_=document.getElementsByTagNameNS,O=document.documentElement.getElementsByTagNameNS,L=window.Element,N=window.HTMLDocument||window.Document,C="http://www.w3.org/1999/xhtml",D={querySelector:function(t){var o=n(t),i=o!==t;t=o;var a,s=v(this),c=w(this).root;if(c instanceof e.wrappers.ShadowRoot)return r(this,t);if(s instanceof L)a=g(y.call(s,t));else{if(!(s instanceof N))return r(this,t);a=g(b.call(s,t))}return a&&!i&&(c=w(a).root)&&c instanceof e.wrappers.ShadowRoot?r(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var i=new m;return i.length=d.call(this,o,0,i,e,r),i}},j={getElementsByTagName:function(e){var t=new h,n="*"===e?a:i;return t.length=p.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new h,r=null;return r="*"===e?"*"===t?a:s:"*"===t?c:l,n.length=f.call(this,r,0,n,e||null,t),n
-}};e.GetElementsByInterface=j,e.SelectorsInterface=D}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}};e.ChildNodeInterface=i,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){e.invalidateRendererBasedOnAttribute(t,"class")}function n(e,t){r(e,this),this.ownerElement_=t}var r=e.setWrapper,o=e.unsafeUnwrap;n.prototype={constructor:n,get length(){return o(this).length},item:function(e){return o(this).item(e)},contains:function(e){return o(this).contains(e)},add:function(){o(this).add.apply(o(this),arguments),t(this.ownerElement_)},remove:function(){o(this).remove.apply(o(this),arguments),t(this.ownerElement_)},toggle:function(){var e=o(this).toggle.apply(o(this),arguments);return t(this.ownerElement_),e},toString:function(){return o(this).toString()}},e.wrappers.DOMTokenList=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){u(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.wrappers.DOMTokenList,c=e.ParentNodeInterface,l=e.SelectorsInterface,u=(e.addWrapNodeListMethod,e.enqueueMutation),d=e.mixin,p=(e.oneOf,e.registerWrapper),f=e.unsafeUnwrap,h=e.wrappers,m=window.Element,w=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return m.prototype[e]}),v=w[0],g=m.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),d(r.prototype,{createShadowRoot:function(){var t=new h.ShadowRoot(this);f(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return f(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=f(this).getAttribute(e);f(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=f(this).getAttribute(e);f(this).removeAttribute(e),n(this,e,r),t(this,e)},matches:function(e){return g.call(f(this),e)},get classList(){var e=b.get(this);return e||b.set(this,e=new s(f(this).classList,this)),e},get className(){return f(this).className},set className(e){this.setAttribute("class",e)},get id(){return f(this).id},set id(e){this.setAttribute("id",e)}}),w.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),m.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),d(r.prototype,o),d(r.prototype,i),d(r.prototype,c),d(r.prototype,l),p(m,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=w,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(O,t)}function r(e){return e.replace(L,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,i=e.tagName.toLowerCase(),s="<"+i,c=e.attributes,l=0;o=c[l];l++)s+=" "+o.name+'="'+n(o.value)+'"';return s+=">",N[i]?s:s+a(e)+"</"+i+">";case Node.TEXT_NODE:var u=e.data;return t&&C[t.localName]?u:r(u);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function a(e){e instanceof _.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=i(n,e);return t}function s(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(M(i))}function c(e){h.call(this,e)}function l(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return M(o)}function u(t){return function(){return e.renderAllPending(),S(this)[t]}}function d(e){m(c,e,u(e))}function p(t){Object.defineProperty(c.prototype,t,{get:u(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enumerable:!0})}function f(t){Object.defineProperty(c.prototype,t,{value:function(){return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0,enumerable:!0})}var h=e.wrappers.Element,m=e.defineGetter,w=e.enqueueMutation,v=e.mixin,g=e.nodesWereAdded,b=e.nodesWereRemoved,y=e.registerWrapper,E=e.snapshotNodeList,S=e.unsafeUnwrap,T=e.unwrap,M=e.wrap,_=e.wrappers,O=/[&\u00A0"]/g,L=/[&\u00A0<>]/g,N=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),C=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D=/MSIE/.test(navigator.userAgent),j=window.HTMLElement,H=window.HTMLTemplateElement;c.prototype=Object.create(h.prototype),v(c.prototype,{get innerHTML(){return a(this)},set innerHTML(e){if(D&&C[this.localName])return void(this.textContent=e);var t=E(this.childNodes);this.invalidateShadowRenderer()?this instanceof _.HTMLTemplateElement?s(this.content,e):s(this,e,this.tagName):!H&&this instanceof _.HTMLTemplateElement?s(this.content,e):S(this).innerHTML=e;var n=E(this.childNodes);w(this,"childList",{addedNodes:n,removedNodes:t}),b(t),g(n,this)},get outerHTML(){return i(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=l(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=l(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(d),["scrollLeft","scrollTop"].forEach(p),["getBoundingClientRect","getClientRects","scrollIntoView"].forEach(f),y(j,c,document.createElement("b")),e.wrappers.HTMLElement=c,e.getInnerHTML=a,e.setInnerHTML=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!p){var t=n(e);u.set(this,l(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.wrap,u=new WeakMap,d=new WeakMap,p=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return p?l(s(this).content):u.get(this)}}),p&&a(p,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,l=e.wrap,u=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return l(c(this).form)}}),a(u,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.wrappers.Element,n=e.wrappers.HTMLElement,r=e.registerObject,o="http://www.w3.org/2000/svg",i=document.createElementNS(o,"title"),a=r(i),s=Object.getPrototypeOf(a.prototype).constructor;if(!("classList"in i)){var c=Object.getOwnPropertyDescriptor(t.prototype,"classList");Object.defineProperty(n.prototype,"classList",c),delete t.prototype.classList}e.wrappers.SVGElement=s}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){p.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),l=document.createElementNS(s,"use"),u=c.constructor,d=Object.getPrototypeOf(u.prototype),p=d.constructor;t.prototype=Object.create(d),"instanceRoot"in l&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,l),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(l,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.WebGLRenderingContext;if(c){n(t.prototype,{get canvas(){return s(i(this).canvas)},texImage2D:function(){arguments[5]=a(arguments[5]),i(this).texImage2D.apply(i(this),arguments)},texSubImage2D:function(){arguments[6]=a(arguments[6]),i(this).texSubImage2D.apply(i(this),arguments)}});var l=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};r(c,t,l),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Range;t.prototype={get startContainer(){return s(o(this).startContainer)},get endContainer(){return s(o(this).endContainer)},get commonAncestorContainer(){return s(o(this).commonAncestorContainer)},setStart:function(e,t){o(this).setStart(a(e),t)},setEnd:function(e,t){o(this).setEnd(a(e),t)},setStartBefore:function(e){o(this).setStartBefore(a(e))},setStartAfter:function(e){o(this).setStartAfter(a(e))},setEndBefore:function(e){o(this).setEndBefore(a(e))},setEndAfter:function(e){o(this).setEndAfter(a(e))},selectNode:function(e){o(this).selectNode(a(e))},selectNodeContents:function(e){o(this).selectNodeContents(a(e))},compareBoundaryPoints:function(e,t){return o(this).compareBoundaryPoints(e,i(t))},extractContents:function(){return s(o(this).extractContents())},cloneContents:function(){return s(o(this).cloneContents())},insertNode:function(e){o(this).insertNode(a(e))},surroundContents:function(e){o(this).surroundContents(a(e))},cloneRange:function(){return s(o(this).cloneRange())},isPointInRange:function(e,t){return o(this).isPointInRange(a(e),t)},comparePoint:function(e,t){return o(this).comparePoint(a(e),t)},intersectsNode:function(e){return o(this).intersectsNode(a(e))},toString:function(){return o(this).toString()}},c.prototype.createContextualFragment&&(t.prototype.createContextualFragment=function(e){return s(o(this).createContextualFragment(e))}),n(window.Range,t,document.createRange()),e.wrappers.Range=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.GetElementsByInterface,n=e.ParentNodeInterface,r=e.SelectorsInterface,o=e.mixin,i=e.registerObject,a=i(document.createDocumentFragment());o(a.prototype,n),o(a.prototype,r),o(a.prototype,t);var s=i(document.createComment(""));e.wrappers.Comment=s,e.wrappers.DocumentFragment=a}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(u(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),p.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,l=e.setInnerHTML,u=e.unsafeUnwrap,d=e.unwrap,p=new WeakMap,f=new WeakMap,h=/[ \t\n\r\f]/;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return p.get(this)||null},invalidateShadowRenderer:function(){return p.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getElementById:function(e){return h.test(e)?null:this.querySelector('[id="'+e+'"]')}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var l=R(a.lastChild);l&&(l.nextSibling_=l.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){I.set(e,[])}function i(e){var t=I.get(e);return t||I.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){M=null,s()}function l(e){var t=k.get(e);return t||(t=new f(e),k.set(e,t)),t}function u(e){var t=D(e).root;return t instanceof C?t:null}function d(e){return l(e.host)}function p(e){this.skip=!1,this.node=e,this.childNodes=[]}function f(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function h(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function m(e){if(e instanceof L)return e;if(e instanceof O)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=m(t);if(n)return n}return null}function w(e,t){i(t).push(e);var n=A.get(e);n?n.push(t):A.set(e,[t])}function v(e){return A.get(e)}function g(e){A.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof _))return!1;if(!B.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=v(t);return n&&n[n.length-1]===e}function E(e){return e instanceof O||e instanceof L}function S(e){return e.shadowRoot}function T(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var M,_=e.wrappers.Element,O=e.wrappers.HTMLContentElement,L=e.wrappers.HTMLShadowElement,N=e.wrappers.Node,C=e.wrappers.ShadowRoot,D=(e.assert,e.getTreeScope),j=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,P=e.ArraySplice,I=new WeakMap,A=new WeakMap,k=new WeakMap,W=j(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],U=new P;U.equals=function(e,t){return x(e.node)===t},p.prototype={append:function(e){var t=new p(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=U.calculateSplices(o,i),l=0,u=0,d=0,p=0;p<c.length;p++){for(var f=c[p];d<f.index;d++)u++,o[l++].sync(s);for(var h=f.removed.length,m=0;h>m;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=f.addedCount,g=i[u]&&R(i[u]),m=0;v>m;m++){var b=o[l++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}d+=v}for(var p=d;p<o.length;p++)o[p].sync(s)}}},f.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new p(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return D(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),M)return;M=window[W](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):g(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(S(e)){for(var t=e,n=h(t),r=T(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=m(i);if(a){var s=i.olderShadowRoot;s&&(n=h(s));for(var c=0;c<n.length;c++)w(n[c],a)}this.distributionResolution(i)}}for(var l=e.firstChild;l;l=l.nextSibling)this.distributionResolution(l)},poolDistribution:function(e,t){if(!(e instanceof L))if(e instanceof O){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(w(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)w(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(S(t)){var a=l(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var B=/^(:not\()?[*.#[a-zA-Z_|]/;N.prototype.invalidateShadowRenderer=function(){var e=H(this).polymerShadowRenderer_;return e?(e.invalidate(),!0):!1},O.prototype.getDistributedNodes=L.prototype.getDistributedNodes=function(){return s(),i(this)},_.prototype.getDestinationInsertionPoints=function(){return s(),v(this)||[]},O.prototype.nodeIsInserted_=L.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=u(this);t&&(e=d(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=l,e.getShadowTrees=T,e.renderAllPending=s,e.getDestinationInsertionPoints=v,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}{var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap;window.Selection}t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(i(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},extend:function(e,t){o(this).extend(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(a(e))},toString:function(){return o(this).toString()}},n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){u.call(this,e),this.treeScope_=new m(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return N(n.apply(O(this),arguments))}}function r(e,t){j.call(O(t),L(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof h&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){_(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){return N(n.apply(O(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(O(this),arguments)}}var l=e.GetElementsByInterface,u=e.wrappers.Node,d=e.ParentNodeInterface,p=e.wrappers.Selection,f=e.SelectorsInterface,h=e.wrappers.ShadowRoot,m=e.TreeScope,w=e.cloneNode,v=e.defineWrapGetter,g=e.elementFromPoint,b=e.forwardMethodsToWrapper,y=e.matchesNames,E=e.mixin,S=e.registerWrapper,T=e.renderAllPending,M=e.rewrap,_=e.setWrapper,O=e.unsafeUnwrap,L=e.unwrap,N=e.wrap,C=e.wrapEventTargetMethods,D=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(u.prototype),v(t,"documentElement"),v(t,"body"),v(t,"head"),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","getElementById"].forEach(n);var j=document.adoptNode,H=document.getSelection;if(E(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return g(this,this,e,t)},importNode:function(e,t){return w(e,t,O(this))},getSelection:function(){return T(),new p(H.call(L(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}}),document.registerElement){var x=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void _(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n.extends),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var l=Object.create(a),u=c.length-1;u>=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){N(this)instanceof r||M(this),t.apply(N(this),arguments)})});var d={prototype:l};i&&(d.extends=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);x.call(L(this),t,d);return r},b([window.HTMLDocument||window.Document],["registerElement"])}b([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"].concat(y)),b([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","elementFromPoint","getElementById","getElementsByName","getSelection"]),E(t.prototype,l),E(t.prototype,d),E(t.prototype,f),E(t.prototype,{get implementation(){var e=D.get(this);return e?e:(e=new a(L(this).implementation),D.set(this,e),e)},get defaultView(){return N(L(this).defaultView)}}),S(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&S(window.HTMLDocument,t),C([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]),s(a,"createDocumentType"),s(a,"createDocument"),s(a,"createHTMLDocument"),c(a,"hasFeature"),S(window.DOMImplementation,a),b([window.DOMImplementation],["createDocumentType","createDocument","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t
-}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,f=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(f.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&j){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return D||(D=document.createElement("style"),D.setAttribute(x,""),D[x]=!0),D}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(f,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(h,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,S,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;l>c&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t<N.length;t++)e=e.replace(N[t]," ");return e},scopeRules:function(e,t){var n="";return e&&Array.prototype.forEach.call(e,function(e){if(e.selectorText&&e.style&&void 0!==e.style.cssText)n+=this.scopeSelector(e.selectorText,t,this.strictStyling)+" {\n	",n+=this.propertiesFromRule(e)+"\n}\n\n";else if(e.type===CSSRule.MEDIA_RULE)n+="@media "+e.media.mediaText+" {\n",n+=this.scopeRules(e.cssRules,t),n+="\n}\n\n";else try{e.cssText&&(n+=e.cssText+"\n\n")}catch(r){e.type===CSSRule.KEYFRAMES_RULE&&e.cssRules&&(n+=this.ieSafeCssTextFromKeyFrameRule(e))}},this),n},ieSafeCssTextFromKeyFrameRule:function(e){var t="@keyframes "+e.name+" {";return Array.prototype.forEach.call(e.cssRules,function(e){t+=" "+e.keyText+" {"+e.style.cssText+"}"}),t+=" }"},scopeSelector:function(e,t,n){var r=[],o=e.split(",");return o.forEach(function(e){e=e.trim(),this.selectorNeedsScoping(e,t)&&(e=n&&!e.match(O)?this.applyStrictSelectorScope(e,t):this.applySelectorScope(e,t)),r.push(e)},this),r.join(", ")},selectorNeedsScoping:function(e,t){if(Array.isArray(t))return!0;var n=this.makeScopeMatcher(t);return!e.match(n)},makeScopeMatcher:function(e){return e=e.replace(/\[/g,"\\[").replace(/\[/g,"\\]"),new RegExp("^("+e+")"+T,"m")},applySelectorScope:function(e,t){return Array.isArray(t)?this.applySelectorScopeList(e,t):this.applySimpleSelectorScope(e,t)},applySelectorScopeList:function(e,t){for(var n,r=[],o=0;n=t[o];o++)r.push(this.applySimpleSelectorScope(e,n));return r.join(", ")},applySimpleSelectorScope:function(e,t){return e.match(L)?(e=e.replace(O,t),e.replace(L,t+" ")):t+" "+e},applyStrictSelectorScope:function(e,t){t=t.replace(/\[is=([^\]]*)\]/g,"$1");var n=[" ",">","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(_,b).replace(M,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^/*][^*]*\*+)*\/)([^{]*?){/gim,f=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,h=/\/\*\s@polyfill-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),S=new RegExp("("+b+y,"gim"),T="([>\\s~+[.,{:][\\s\\S]*)?$",M=/\:host/gim,_=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/\^\^/g,/\^/g,/\/shadow\//g,/\/shadow-deep\//g,/::shadow/g,/\/deep\//g,/::content/g]),C=document.createElement("iframe");C.style.display="none";var D,j=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var P=ShadowDOMPolyfill.wrap(document),I=P.querySelector("head");I.insertBefore(l(),I.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==I&&(e.parentNode===I?I.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){function t(e){y.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=y;y=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=w.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=w.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function l(e,t){return S=new s(e,t)}function u(e){return T?T:(T=c(S),T.oldValue=e,T)}function d(){S=T=void 0}function p(e){return e===T||e===S}function f(e,t){return e===t?e:T&&p(e)?T:null}function h(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var m,w=new WeakMap;if(/Trident/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=v;v=[],t.forEach(function(e){e()})}}),m=function(e){v.push(e),window.postMessage(g,"*")}}var b=!1,y=[],E=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=w.get(e);r||w.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new h(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=w.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var S,T;h.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=f(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new l("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=l("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,r=e.relatedNode,p=e.target;"DOMNodeInserted"===e.type?(s=[p],c=[]):(s=[],c=[p]);var f=p.previousSibling,h=p.nextSibling,o=l("childList",r);o.addedNodes=s,o.removedNodes=c,o.previousSibling=f,o.nextSibling=h,i(r,function(e){return e.childList?o:void 0})}d()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a)}(this),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||h,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===v}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===v)&&(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){s==c&&e&&e()}function r(e){o(e),s++,n()}var i=t.querySelectorAll("link[rel=import]"),s=0,c=i.length;if(c)for(var l,u=0;c>u&&(l=i[u]);u++)a(l)?r.call(l,{target:l}):(l.addEventListener("load",r),l.addEventListener("error",r));else n()}function a(e){return d?e.__loaded||e.import&&"loading"!==e.import.readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e.import;t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),f=function(e){return p?ShadowDOMPolyfill.wrapIfNeeded(e):e},h=f(document),m={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return f(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(h,"_currentScript",m);var w=/Trident/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)l(e)}()),t(function(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime(),h.dispatchEvent(new CustomEvent("HTMLImportsLoaded",{bubbles:!0}))}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=h,e.whenReady=t,e.isIE=w}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e){var t=e.ownerDocument,n=t.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,n),e},resolveUrlsInCssText:function(e,r){var o=this.replaceUrls(e,r,t);return o=this.replaceUrls(o,r,n)},replaceUrls:function(e,t,n){return e.replace(n,function(e,n,r,o){var i=r.replace(/["']/g,"");return t.href=i,i=t.href,n+"'"+i+"'"+o})}};e.path=r}),HTMLImports.addModule(function(e){xhr={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(t,n,r){var o=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(t+="?"+Math.random()),o.open("GET",t,xhr.async),o.addEventListener("readystatechange",function(){if(4===o.readyState){var e=o.getResponseHeader("Location"),t=null;if(e)var t="/"===e.substr(0,1)?location.origin+e:e;n.call(r,!xhr.ok(o)&&o,o.response||o.responseText,t)}}),o.send(),o},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}},e.xhr=xhr}),HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e.import&&(e.import.__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){for(var t=this.rootImportForElement(e.__importElement||e),n=t.__insertedElements=t.__insertedElements||0,r=t.nextElementSibling,o=0;n>o;o++)r=r&&r.nextElementSibling;t.parentNode.insertBefore(e,r)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.import,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.import?!1:!0}};e.parser=p,e.IMPORT_SELECTOR=d}),HTMLImports.addModule(function(e){function t(e){return n(e,i)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e,t){var n=document.implementation.createHTMLDocument(i);n._URL=t;var r=n.createElement("base");r.setAttribute("href",t),n.baseURI||(n.baseURI=t);var o=n.createElement("meta");return o.setAttribute("charset","utf-8"),n.head.appendChild(o),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var o=e.flags,i=e.IMPORT_LINK_TYPE,a=e.IMPORT_SELECTOR,s=e.rootDocument,c=e.Loader,l=e.Observer,u=e.parser,d={documents:{},documentPreloadSelectors:a,importsPreloadSelectors:[a].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,i,a,s){if(o.load&&console.log("loaded",e,n),n.__resource=i,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:r(i,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.import=c}u.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parseNext()}},p=new c(d.loaded.bind(d),d.loadedAll.bind(d));if(d.observer=new l,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(s,"baseURI",f)}e.importer=d,e.importLoader=p}),HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a=0,s=e.length;s>a&&(i=e[a]);a++)r||(r=i.ownerDocument,o=t.isParsed(r)),loading=this.shouldLoadNode(i),loading&&n.loadNode(i),this.shouldParseNode(i)&&o&&t.parseDynamic(i,loading)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(n)}if(initializeModules=e.initializeModules,!e.useNative){"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){var n=document.createEvent("HTMLEvents");return n.initEvent(e,t.bubbles===!1?!1:!0,t.cancelable===!1?!1:!0,t.detail),n}),initializeModules();var n=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){a=[],i(e,t),a=null}function i(e,t){if(e=wrap(e),!(a.indexOf(e)>=0)){a.push(e);for(var n,r=e.querySelectorAll("link[rel="+s+"]"),o=0,c=r.length;c>o&&(n=r[o]);o++)n.import&&i(n.import,t);t(e)}}var a,s=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return n(e)||r(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function r(e){y(e,function(e){return n(e)?!0:void 0})}function o(e){s(e),p(e)&&y(e,function(e){s(e)})}function i(e){M.push(e),T||(T=!0,setTimeout(a))}function a(){T=!1;for(var e,t=M,n=0,r=t.length;r>n&&(e=t[n]);n++)e();M=[]}function s(e){S?i(function(){c(e)}):c(e)}function c(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&p(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function l(e){u(e),y(e,function(e){u(e)})}function u(e){S?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!p(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function p(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.host}}function f(e){if(e.shadowRoot&&!e.shadowRoot.__watched){b.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)w(t),t=t.olderShadowRoot}}function h(e){if(b.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";
-o=o.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,o||"")}e.forEach(function(e){"childList"===e.type&&(_(e.addedNodes,function(e){e.localName&&t(e)}),_(e.removedNodes,function(e){e.localName&&l(e)}))}),b.dom&&console.groupEnd()}function m(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(h(t.takeRecords()),a())}function w(e){if(!e.__observer){var t=new MutationObserver(h);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function v(e){e=wrap(e),b.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),w(e),b.dom&&console.groupEnd()}function g(e){E(e,v)}var b=e.flags,y=e.forSubtree,E=e.forDocumentTree,S=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=S;var T=!1,M=[],_=Array.prototype.forEach.call.bind(Array.prototype.forEach),O=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var e=O.call(this);return CustomElements.watchShadow(this),e},e.watchShadow=f,e.upgradeDocumentTree=g,e.upgradeSubtree=r,e.upgradeAll=t,e.attachedNode=o,e.takeRecords=m}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var r=t.getAttribute("is"),o=e.getRegisteredDefinition(r||t.localName);if(o){if(r&&o.tag==t.localName)return n(t,o);if(!r&&!o.extends)return n(t,o)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t.native),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c.extends),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&w(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<E.length;t++)if(e===E[t])return!0}function i(e){var t=l(e);return t?i(t.extends).concat([t]):[]}function a(e){for(var t,n=e.extends,r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag),r=Object.getPrototypeOf(n);r===e.prototype&&(t=r)}for(var o,i=e.prototype;i&&i!==t;)o=Object.getPrototypeOf(i),i.__proto__=o,i=o;e.native=t}}function c(e){return g(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?f(t,n):_(e,t)}function f(e,t){var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=f(e),r.setAttribute("is",t),r):(r=M(e),e.indexOf("-")>=0&&b(r,HTMLElement),r)}function h(e){var t=O.call(this,e);return v(t),t}var m,w=e.upgradeDocumentTree,v=e.upgrade,g=e.upgradeWithDefinition,b=e.implementPrototype,y=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],S={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),_=document.createElementNS.bind(document),O=Node.prototype.cloneNode;m=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},document.registerElement=t,document.createElement=f,document.createElementNS=p,Node.prototype.cloneNode=h,e.registry=S,e.instanceof=m,e.reservedTagList=E,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){i(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){i(wrap(e.import))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,r=e.initializeModules;if(n){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e.instanceof=function(e,t){return e instanceof t}}else r();var i=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var a=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(a,t)}else t()}(window.CustomElements),function(){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){"use strict";function t(){window.Polymer===o&&(window.Polymer=function(){throw new Error('You tried to use polymer without loading it first. To load polymer, <link rel="import" href="components/polymer/polymer.html">')})}if(!window.performance){var n=Date.now();window.performance={now:function(){return Date.now()-n}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var r=[],o=function(e){"string"!=typeof e&&1===arguments.length&&Array.prototype.push.call(arguments,document._currentScript),r.push(arguments)};window.Polymer=o,e.consumeDeclarations=function(t){e.consumeDeclarations=function(){throw"Possible attempt to load Polymer twice"},t&&t(r),r=null},HTMLImports.useNative?t():addEventListener("DOMContentLoaded",t)}(window.WebComponents),function(){var e=document.createElement("style");e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var t=document.querySelector("head");t.insertBefore(e,t.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents);
+// @version 0.7.21
+!function(){window.WebComponents=window.WebComponents||{flags:{}};var e="webcomponents.js",t=document.querySelector('script[src*="'+e+'"]'),n={};if(!n.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t,r=e.split("=");r[0]&&(t=r[0].match(/wc-(.+)/))&&(n[t[1]]=r[1]||!0)}),t)for(var r,o=0;r=t.attributes[o];o++)"src"!==r.name&&(n[r.name]=r.value||!0);if(n.log&&n.log.split){var i=n.log.split(",");n.log={},i.forEach(function(e){n.log[e]=!0})}else n.log={}}n.shadow=n.shadow||n.shadowdom||n.polyfill,"native"===n.shadow?n.shadow=!1:n.shadow=n.shadow||!HTMLElement.prototype.createShadowRoot,n.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=n.register),WebComponents.flags=n}(),WebComponents.flags.shadow&&("undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.ShadowDOMPolyfill={},function(e){"use strict";function t(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;if(navigator.getDeviceStorage)return!1;try{var e=new Function("return true;");return e()}catch(t){return!1}}function n(e){if(!e)throw new Error("Assertion failed")}function r(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];A(e,o,F(t,o))}return e}function o(e,t){for(var n=W(t),r=0;r<n.length;r++){var o=n[r];switch(o){case"arguments":case"caller":case"length":case"name":case"prototype":case"toString":continue}A(e,o,F(t,o))}return e}function i(e,t){for(var n=0;n<t.length;n++)if(t[n]in e)return t[n]}function a(e,t,n){U.value=n,A(e,t,U)}function s(e,t){var n=e.__proto__||Object.getPrototypeOf(e);if(q)try{W(n)}catch(r){n=n.__proto__}var o=R.get(n);if(o)return o;var i=s(n),a=E(i);return g(n,a,t),a}function c(e,t){w(e,t,!0)}function l(e,t){w(t,e,!1)}function u(e){return/^on[a-z]+$/.test(e)}function d(e){return/^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(e)}function p(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e):function(){return this.__impl4cf1e782hg__[e]}}function h(e){return k&&d(e)?new Function("v","this.__impl4cf1e782hg__."+e+" = v"):function(t){this.__impl4cf1e782hg__[e]=t}}function f(e){return k&&d(e)?new Function("return this.__impl4cf1e782hg__."+e+".apply(this.__impl4cf1e782hg__, arguments)"):function(){return this.__impl4cf1e782hg__[e].apply(this.__impl4cf1e782hg__,arguments)}}function m(e,t){try{return Object.getOwnPropertyDescriptor(e,t)}catch(n){return B}}function w(t,n,r,o){for(var i=W(t),a=0;a<i.length;a++){var s=i[a];if("polymerBlackList_"!==s&&!(s in n||t.polymerBlackList_&&t.polymerBlackList_[s])){q&&t.__lookupGetter__(s);var c,l,d=m(t,s);if("function"!=typeof d.value){var w=u(s);c=w?e.getEventHandlerGetter(s):p(s),(d.writable||d.set||V)&&(l=w?e.getEventHandlerSetter(s):h(s));var v=V||d.configurable;A(n,s,{get:c,set:l,configurable:v,enumerable:d.enumerable})}else r&&(n[s]=f(s))}}}function v(e,t,n){if(null!=e){var r=e.prototype;g(r,t,n),o(t,e)}}function g(e,t,r){var o=t.prototype;n(void 0===R.get(e)),R.set(e,t),I.set(o,e),c(e,o),r&&l(o,r),a(o,"constructor",t),t.prototype=o}function b(e,t){return R.get(t.prototype)===e}function y(e){var t=Object.getPrototypeOf(e),n=s(t),r=E(n);return g(t,r,e),r}function E(e){function t(t){e.call(this,t)}var n=Object.create(e.prototype);return n.constructor=t,t.prototype=n,t}function _(e){return e&&e.__impl4cf1e782hg__}function S(e){return!_(e)}function T(e){if(null===e)return null;n(S(e));var t=e.__wrapper8e3dd93a60__;return null!=t?t:e.__wrapper8e3dd93a60__=new(s(e,e))(e)}function M(e){return null===e?null:(n(_(e)),e.__impl4cf1e782hg__)}function O(e){return e.__impl4cf1e782hg__}function L(e,t){t.__impl4cf1e782hg__=e,e.__wrapper8e3dd93a60__=t}function N(e){return e&&_(e)?M(e):e}function C(e){return e&&!_(e)?T(e):e}function j(e,t){null!==t&&(n(S(e)),n(void 0===t||_(t)),e.__wrapper8e3dd93a60__=t)}function D(e,t,n){G.get=n,A(e.prototype,t,G)}function H(e,t){D(e,t,function(){return T(this.__impl4cf1e782hg__[t])})}function x(e,t){e.forEach(function(e){t.forEach(function(t){e.prototype[t]=function(){var e=C(this);return e[t].apply(e,arguments)}})})}var R=new WeakMap,I=new WeakMap,P=Object.create(null),k=t(),A=Object.defineProperty,W=Object.getOwnPropertyNames,F=Object.getOwnPropertyDescriptor,U={value:void 0,configurable:!0,enumerable:!1,writable:!0};W(window);var q=/Firefox/.test(navigator.userAgent),B={get:function(){},set:function(e){},configurable:!0,enumerable:!0},V=function(){var e=Object.getOwnPropertyDescriptor(Node.prototype,"nodeType");return e&&!e.get&&!e.set}(),G={get:void 0,configurable:!0,enumerable:!0};e.addForwardingProperties=c,e.assert=n,e.constructorTable=R,e.defineGetter=D,e.defineWrapGetter=H,e.forwardMethodsToWrapper=x,e.isIdentifierName=d,e.isWrapper=_,e.isWrapperFor=b,e.mixin=r,e.nativePrototypeTable=I,e.oneOf=i,e.registerObject=y,e.registerWrapper=v,e.rewrap=j,e.setWrapper=L,e.unsafeUnwrap=O,e.unwrap=M,e.unwrapIfNeeded=N,e.wrap=T,e.wrapIfNeeded=C,e.wrappers=P}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t,n){return{index:e,removed:t,addedCount:n}}function n(){}var r=0,o=1,i=2,a=3;n.prototype={calcEditDistances:function(e,t,n,r,o,i){for(var a=i-o+1,s=n-t+1,c=new Array(a),l=0;a>l;l++)c[l]=new Array(s),c[l][0]=l;for(var u=0;s>u;u++)c[0][u]=u;for(var l=1;a>l;l++)for(var u=1;s>u;u++)if(this.equals(e[t+u-1],r[o+l-1]))c[l][u]=c[l-1][u-1];else{var d=c[l-1][u]+1,p=c[l][u-1]+1;c[l][u]=p>d?d:p}return c},spliceOperationsFromEditDistances:function(e){for(var t=e.length-1,n=e[0].length-1,s=e[t][n],c=[];t>0||n>0;)if(0!=t)if(0!=n){var l,u=e[t-1][n-1],d=e[t-1][n],p=e[t][n-1];l=p>d?u>d?d:u:u>p?p:u,l==u?(u==s?c.push(r):(c.push(o),s=u),t--,n--):l==d?(c.push(a),t--,s=d):(c.push(i),n--,s=p)}else c.push(a),t--;else c.push(i),n--;return c.reverse(),c},calcSplices:function(e,n,s,c,l,u){var d=0,p=0,h=Math.min(s-n,u-l);if(0==n&&0==l&&(d=this.sharedPrefix(e,c,h)),s==e.length&&u==c.length&&(p=this.sharedSuffix(e,c,h-d)),n+=d,l+=d,s-=p,u-=p,s-n==0&&u-l==0)return[];if(n==s){for(var f=t(n,[],0);u>l;)f.removed.push(c[l++]);return[f]}if(l==u)return[t(n,[],s-n)];for(var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,n,s,c,l,u)),f=void 0,w=[],v=n,g=l,b=0;b<m.length;b++)switch(m[b]){case r:f&&(w.push(f),f=void 0),v++,g++;break;case o:f||(f=t(v,[],0)),f.addedCount++,v++,f.removed.push(c[g]),g++;break;case i:f||(f=t(v,[],0)),f.addedCount++,v++;break;case a:f||(f=t(v,[],0)),f.removed.push(c[g]),g++}return f&&w.push(f),w},sharedPrefix:function(e,t,n){for(var r=0;n>r;r++)if(!this.equals(e[r],t[r]))return r;return n},sharedSuffix:function(e,t,n){for(var r=e.length,o=t.length,i=0;n>i&&this.equals(e[--r],t[--o]);)i++;return i},calculateSplices:function(e,t){return this.calcSplices(e,0,e.length,t,0,t.length)},equals:function(e,t){return e===t}},e.ArraySplice=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(){a=!1;var e=i.slice(0);i=[];for(var t=0;t<e.length;t++)(0,e[t])()}function n(e){i.push(e),a||(a=!0,r(t,0))}var r,o=window.MutationObserver,i=[],a=!1;if(o){var s=1,c=new o(t),l=document.createTextNode(s);c.observe(l,{characterData:!0}),r=function(){s=(s+1)%2,l.data=s}}else r=window.setTimeout;e.setEndOfMicrotask=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.scheduled_||(e.scheduled_=!0,f.push(e),m||(u(n),m=!0))}function n(){for(m=!1;f.length;){var e=f;f=[],e.sort(function(e,t){return e.uid_-t.uid_});for(var t=0;t<e.length;t++){var n=e[t];n.scheduled_=!1;var r=n.takeRecords();i(n),r.length&&n.callback_(r,n)}}}function r(e,t){this.type=e,this.target=t,this.addedNodes=new p.NodeList,this.removedNodes=new p.NodeList,this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function o(e,t){for(;e;e=e.parentNode){var n=h.get(e);if(n)for(var r=0;r<n.length;r++){var o=n[r];o.options.subtree&&o.addTransientObserver(t)}}}function i(e){for(var t=0;t<e.nodes_.length;t++){var n=e.nodes_[t],r=h.get(n);if(!r)return;for(var o=0;o<r.length;o++){var i=r[o];i.observer===e&&i.removeTransientObservers()}}}function a(e,n,o){for(var i=Object.create(null),a=Object.create(null),s=e;s;s=s.parentNode){var c=h.get(s);if(c)for(var l=0;l<c.length;l++){var u=c[l],d=u.options;if((s===e||d.subtree)&&("attributes"!==n||d.attributes)&&("attributes"!==n||!d.attributeFilter||null===o.namespace&&-1!==d.attributeFilter.indexOf(o.name))&&("characterData"!==n||d.characterData)&&("childList"!==n||d.childList)){var p=u.observer;i[p.uid_]=p,("attributes"===n&&d.attributeOldValue||"characterData"===n&&d.characterDataOldValue)&&(a[p.uid_]=o.oldValue)}}}for(var f in i){var p=i[f],m=new r(n,e);"name"in o&&"namespace"in o&&(m.attributeName=o.name,m.attributeNamespace=o.namespace),o.addedNodes&&(m.addedNodes=o.addedNodes),o.removedNodes&&(m.removedNodes=o.removedNodes),o.previousSibling&&(m.previousSibling=o.previousSibling),o.nextSibling&&(m.nextSibling=o.nextSibling),void 0!==a[f]&&(m.oldValue=a[f]),t(p),p.records_.push(m)}}function s(e){if(this.childList=!!e.childList,this.subtree=!!e.subtree,"attributes"in e||!("attributeOldValue"in e||"attributeFilter"in e)?this.attributes=!!e.attributes:this.attributes=!0,"characterDataOldValue"in e&&!("characterData"in e)?this.characterData=!0:this.characterData=!!e.characterData,!this.attributes&&(e.attributeOldValue||"attributeFilter"in e)||!this.characterData&&e.characterDataOldValue)throw new TypeError;if(this.characterData=!!e.characterData,this.attributeOldValue=!!e.attributeOldValue,this.characterDataOldValue=!!e.characterDataOldValue,"attributeFilter"in e){if(null==e.attributeFilter||"object"!=typeof e.attributeFilter)throw new TypeError;this.attributeFilter=w.call(e.attributeFilter)}else this.attributeFilter=null}function c(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++v,this.scheduled_=!1}function l(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}var u=e.setEndOfMicrotask,d=e.wrapIfNeeded,p=e.wrappers,h=new WeakMap,f=[],m=!1,w=Array.prototype.slice,v=0;c.prototype={constructor:c,observe:function(e,t){e=d(e);var n,r=new s(t),o=h.get(e);o||h.set(e,o=[]);for(var i=0;i<o.length;i++)o[i].observer===this&&(n=o[i],n.removeTransientObservers(),n.options=r);n||(n=new l(this,e,r),o.push(n),this.nodes_.push(e))},disconnect:function(){this.nodes_.forEach(function(e){for(var t=h.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}},l.prototype={addTransientObserver:function(e){if(e!==this.target){t(this.observer),this.transientObservedNodes.push(e);var n=h.get(e);n||h.set(e,n=[]),n.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[];for(var t=0;t<e.length;t++)for(var n=e[t],r=h.get(n),o=0;o<r.length;o++)if(r[o]===this){r.splice(o,1);break}}},e.enqueueMutation=a,e.registerTransientObservers=o,e.wrappers.MutationObserver=c,e.wrappers.MutationRecord=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){this.root=e,this.parent=t}function n(e,t){if(e.treeScope_!==t){e.treeScope_=t;for(var r=e.shadowRoot;r;r=r.olderShadowRoot)r.treeScope_.parent=t;for(var o=e.firstChild;o;o=o.nextSibling)n(o,t)}}function r(n){if(n instanceof e.wrappers.Window,n.treeScope_)return n.treeScope_;var o,i=n.parentNode;return o=i?r(i):new t(n,null),n.treeScope_=o}t.prototype={get renderer(){return this.root instanceof e.wrappers.ShadowRoot?e.getRendererForHost(this.root.host):null},contains:function(e){for(;e;e=e.parent)if(e===this)return!0;return!1}},e.TreeScope=t,e.getTreeScope=r,e.setTreeScope=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e instanceof G.ShadowRoot}function n(e){return A(e).root}function r(e,r){var s=[],c=e;for(s.push(c);c;){var l=a(c);if(l&&l.length>0){for(var u=0;u<l.length;u++){var p=l[u];if(i(p)){var h=n(p),f=h.olderShadowRoot;f&&s.push(f)}s.push(p)}c=l[l.length-1]}else if(t(c)){if(d(e,c)&&o(r))break;c=c.host,s.push(c)}else c=c.parentNode,c&&s.push(c)}return s}function o(e){if(!e)return!1;switch(e.type){case"abort":case"error":case"select":case"change":case"load":case"reset":case"resize":case"scroll":case"selectstart":return!0}return!1}function i(e){return e instanceof HTMLShadowElement}function a(t){return e.getDestinationInsertionPoints(t)}function s(e,t){if(0===e.length)return t;t instanceof G.Window&&(t=t.document);for(var n=A(t),r=e[0],o=A(r),i=l(n,o),a=0;a<e.length;a++){var s=e[a];if(A(s)===i)return s}return e[e.length-1]}function c(e){for(var t=[];e;e=e.parent)t.push(e);return t}function l(e,t){for(var n=c(e),r=c(t),o=null;n.length>0&&r.length>0;){var i=n.pop(),a=r.pop();if(i!==a)break;o=i}return o}function u(e,t,n){t instanceof G.Window&&(t=t.document);var o,i=A(t),a=A(n),s=r(n,e),o=l(i,a);o||(o=a.root);for(var c=o;c;c=c.parent)for(var u=0;u<s.length;u++){var d=s[u];if(A(d)===c)return d}return null}function d(e,t){return A(e)===A(t)}function p(e){if(!K.get(e)&&(K.set(e,!0),f(V(e),V(e.target)),P)){var t=P;throw P=null,t}}function h(e){switch(e.type){case"load":case"beforeunload":case"unload":return!0}return!1}function f(t,n){if($.get(t))throw new Error("InvalidStateError");$.set(t,!0),e.renderAllPending();var o,i,a;if(h(t)&&!t.bubbles){var s=n;s instanceof G.Document&&(a=s.defaultView)&&(i=s,o=[])}if(!o)if(n instanceof G.Window)a=n,o=[];else if(o=r(n,t),!h(t)){var s=o[o.length-1];s instanceof G.Document&&(a=s.defaultView)}return ne.set(t,o),m(t,o,a,i)&&w(t,o,a,i)&&v(t,o,a,i),J.set(t,re),Y["delete"](t,null),$["delete"](t),t.defaultPrevented}function m(e,t,n,r){var o=oe;if(n&&!g(n,e,o,t,r))return!1;for(var i=t.length-1;i>0;i--)if(!g(t[i],e,o,t,r))return!1;return!0}function w(e,t,n,r){var o=ie,i=t[0]||n;return g(i,e,o,t,r)}function v(e,t,n,r){for(var o=ae,i=1;i<t.length;i++)if(!g(t[i],e,o,t,r))return;n&&t.length>0&&g(n,e,o,t,r)}function g(e,t,n,r,o){var i=z.get(e);if(!i)return!0;var a=o||s(r,e);if(a===e){if(n===oe)return!0;n===ae&&(n=ie)}else if(n===ae&&!t.bubbles)return!0;if("relatedTarget"in t){var c=B(t),l=c.relatedTarget;if(l){if(l instanceof Object&&l.addEventListener){var d=V(l),p=u(t,e,d);if(p===a)return!0}else p=null;Z.set(t,p)}}J.set(t,n);var h=t.type,f=!1;X.set(t,a),Y.set(t,e),i.depth++;for(var m=0,w=i.length;w>m;m++){var v=i[m];if(v.removed)f=!0;else if(!(v.type!==h||!v.capture&&n===oe||v.capture&&n===ae))try{if("function"==typeof v.handler?v.handler.call(e,t):v.handler.handleEvent(t),ee.get(t))return!1}catch(g){P||(P=g)}}if(i.depth--,f&&0===i.depth){var b=i.slice();i.length=0;for(var m=0;m<b.length;m++)b[m].removed||i.push(b[m])}return!Q.get(t)}function b(e,t,n){this.type=e,this.handler=t,this.capture=Boolean(n)}function y(e,t){if(!(e instanceof se))return V(T(se,"Event",e,t));var n=e;return be||"beforeunload"!==n.type||this instanceof M?void U(n,this):new M(n)}function E(e){return e&&e.relatedTarget?Object.create(e,{relatedTarget:{value:B(e.relatedTarget)}}):e}function _(e,t,n){var r=window[e],o=function(t,n){return t instanceof r?void U(t,this):V(T(r,e,t,n))};if(o.prototype=Object.create(t.prototype),n&&W(o.prototype,n),r)try{F(r,o,new r("temp"))}catch(i){F(r,o,document.createEvent(e))}return o}function S(e,t){return function(){arguments[t]=B(arguments[t]);var n=B(this);n[e].apply(n,arguments)}}function T(e,t,n,r){if(ve)return new e(n,E(r));var o=B(document.createEvent(t)),i=we[t],a=[n];return Object.keys(i).forEach(function(e){var t=null!=r&&e in r?r[e]:i[e];"relatedTarget"===e&&(t=B(t)),a.push(t)}),o["init"+t].apply(o,a),o}function M(e){y.call(this,e)}function O(e){return"function"==typeof e?!0:e&&e.handleEvent}function L(e){switch(e){case"DOMAttrModified":case"DOMAttributeNameChanged":case"DOMCharacterDataModified":case"DOMElementNameChanged":case"DOMNodeInserted":case"DOMNodeInsertedIntoDocument":case"DOMNodeRemoved":case"DOMNodeRemovedFromDocument":case"DOMSubtreeModified":return!0}return!1}function N(e){U(e,this)}function C(e){return e instanceof G.ShadowRoot&&(e=e.host),B(e)}function j(e,t){var n=z.get(e);if(n)for(var r=0;r<n.length;r++)if(!n[r].removed&&n[r].type===t)return!0;return!1}function D(e,t){for(var n=B(e);n;n=n.parentNode)if(j(V(n),t))return!0;return!1}function H(e){k(e,Ee)}function x(t,n,o,i){e.renderAllPending();var a=V(_e.call(q(n),o,i));if(!a)return null;var c=r(a,null),l=c.lastIndexOf(t);return-1==l?null:(c=c.slice(0,l),s(c,t))}function R(e){return function(){var t=te.get(this);return t&&t[e]&&t[e].value||null}}function I(e){var t=e.slice(2);return function(n){var r=te.get(this);r||(r=Object.create(null),te.set(this,r));var o=r[e];if(o&&this.removeEventListener(t,o.wrapped,!1),"function"==typeof n){var i=function(t){var r=n.call(this,t);r===!1?t.preventDefault():"onbeforeunload"===e&&"string"==typeof r&&(t.returnValue=r)};this.addEventListener(t,i,!1),r[e]={value:n,wrapped:i}}}}var P,k=e.forwardMethodsToWrapper,A=e.getTreeScope,W=e.mixin,F=e.registerWrapper,U=e.setWrapper,q=e.unsafeUnwrap,B=e.unwrap,V=e.wrap,G=e.wrappers,z=(new WeakMap,new WeakMap),K=new WeakMap,$=new WeakMap,X=new WeakMap,Y=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=0,oe=1,ie=2,ae=3;b.prototype={equals:function(e){return this.handler===e.handler&&this.type===e.type&&this.capture===e.capture},get removed(){return null===this.handler},remove:function(){this.handler=null}};var se=window.Event;se.prototype.polymerBlackList_={returnValue:!0,keyLocation:!0},y.prototype={get target(){return X.get(this)},get currentTarget(){return Y.get(this)},get eventPhase(){return J.get(this)},get path(){var e=ne.get(this);return e?e.slice():[]},stopPropagation:function(){Q.set(this,!0)},stopImmediatePropagation:function(){Q.set(this,!0),ee.set(this,!0)}};var ce=function(){var e=document.createEvent("Event");return e.initEvent("test",!0,!0),e.preventDefault(),e.defaultPrevented}();ce||(y.prototype.preventDefault=function(){this.cancelable&&(q(this).preventDefault(),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}),F(se,y,document.createEvent("Event"));var le=_("UIEvent",y),ue=_("CustomEvent",y),de={get relatedTarget(){var e=Z.get(this);return void 0!==e?e:V(B(this).relatedTarget)}},pe=W({initMouseEvent:S("initMouseEvent",14)},de),he=W({initFocusEvent:S("initFocusEvent",5)},de),fe=_("MouseEvent",le,pe),me=_("FocusEvent",le,he),we=Object.create(null),ve=function(){try{new window.FocusEvent("focus")}catch(e){return!1}return!0}();if(!ve){var ge=function(e,t,n){if(n){var r=we[n];t=W(W({},r),t)}we[e]=t};ge("Event",{bubbles:!1,cancelable:!1}),ge("CustomEvent",{detail:null},"Event"),ge("UIEvent",{view:null,detail:0},"Event"),ge("MouseEvent",{screenX:0,screenY:0,clientX:0,clientY:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null},"UIEvent"),ge("FocusEvent",{relatedTarget:null},"UIEvent")}var be=window.BeforeUnloadEvent;M.prototype=Object.create(y.prototype),W(M.prototype,{get returnValue(){return q(this).returnValue},set returnValue(e){q(this).returnValue=e}}),be&&F(be,M);var ye=window.EventTarget,Ee=["addEventListener","removeEventListener","dispatchEvent"];[Node,Window].forEach(function(e){var t=e.prototype;Ee.forEach(function(e){Object.defineProperty(t,e+"_",{value:t[e]})})}),N.prototype={addEventListener:function(e,t,n){if(O(t)&&!L(e)){var r=new b(e,t,n),o=z.get(this);if(o){for(var i=0;i<o.length;i++)if(r.equals(o[i]))return}else o=[],o.depth=0,z.set(this,o);o.push(r);var a=C(this);a.addEventListener_(e,p,!0)}},removeEventListener:function(e,t,n){n=Boolean(n);var r=z.get(this);if(r){for(var o=0,i=!1,a=0;a<r.length;a++)r[a].type===e&&r[a].capture===n&&(o++,r[a].handler===t&&(i=!0,r[a].remove()));if(i&&1===o){var s=C(this);s.removeEventListener_(e,p,!0)}}},dispatchEvent:function(t){var n=B(t),r=n.type;K.set(n,!1),e.renderAllPending();var o;D(this,r)||(o=function(){},this.addEventListener(r,o,!0));try{return B(this).dispatchEvent_(n)}finally{o&&this.removeEventListener(r,o,!0)}}},ye&&F(ye,N);var _e=document.elementFromPoint;e.elementFromPoint=x,e.getEventHandlerGetter=R,e.getEventHandlerSetter=I,e.wrapEventTargetMethods=H,e.wrappers.BeforeUnloadEvent=M,e.wrappers.CustomEvent=ue,e.wrappers.Event=y,e.wrappers.EventTarget=N,e.wrappers.FocusEvent=me,e.wrappers.MouseEvent=fe,e.wrappers.UIEvent=le}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,m)}function n(e){l(e,this)}function r(){this.length=0,t(this,"length")}function o(e){for(var t=new r,o=0;o<e.length;o++)t[o]=new n(e[o]);return t.length=o,t}function i(e){a.call(this,e)}var a=e.wrappers.UIEvent,s=e.mixin,c=e.registerWrapper,l=e.setWrapper,u=e.unsafeUnwrap,d=e.wrap,p=window.TouchEvent;if(p){var h;try{h=document.createEvent("TouchEvent")}catch(f){return}var m={enumerable:!1};n.prototype={get target(){return d(u(this).target)}};var w={configurable:!0,enumerable:!0,get:null};["clientX","clientY","screenX","screenY","pageX","pageY","identifier","webkitRadiusX","webkitRadiusY","webkitRotationAngle","webkitForce"].forEach(function(e){w.get=function(){return u(this)[e]},Object.defineProperty(n.prototype,e,w)}),r.prototype={item:function(e){return this[e]}},i.prototype=Object.create(a.prototype),s(i.prototype,{get touches(){return o(u(this).touches)},get targetTouches(){return o(u(this).targetTouches)},get changedTouches(){return o(u(this).changedTouches)},initTouchEvent:function(){throw new Error("Not implemented")}}),c(p,i,h),e.wrappers.Touch=n,e.wrappers.TouchEvent=i,e.wrappers.TouchList=r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e,t){Object.defineProperty(e,t,s)}function n(){this.length=0,t(this,"length")}function r(e){if(null==e)return e;for(var t=new n,r=0,o=e.length;o>r;r++)t[r]=a(e[r]);return t.length=o,t}function o(e,t){e.prototype[t]=function(){return r(i(this)[t].apply(i(this),arguments))}}var i=e.unsafeUnwrap,a=e.wrap,s={enumerable:!1};n.prototype={item:function(e){return this[e]}},t(n.prototype,"item"),e.wrappers.NodeList=n,e.addWrapNodeListMethod=o,e.wrapNodeList=r}(window.ShadowDOMPolyfill),function(e){"use strict";e.wrapHTMLCollection=e.wrapNodeList,e.wrappers.HTMLCollection=e.wrappers.NodeList}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){O(e instanceof _)}function n(e){var t=new T;return t[0]=e,t.length=1,t}function r(e,t,n){N(t,"childList",{removedNodes:n,previousSibling:e.previousSibling,nextSibling:e.nextSibling})}function o(e,t){N(e,"childList",{removedNodes:t})}function i(e,t,r,o){if(e instanceof DocumentFragment){var i=s(e);U=!0;for(var a=i.length-1;a>=0;a--)e.removeChild(i[a]),i[a].parentNode_=t;U=!1;for(var a=0;a<i.length;a++)i[a].previousSibling_=i[a-1]||r,i[a].nextSibling_=i[a+1]||o;return r&&(r.nextSibling_=i[0]),o&&(o.previousSibling_=i[i.length-1]),i}var i=n(e),c=e.parentNode;return c&&c.removeChild(e),e.parentNode_=t,e.previousSibling_=r,e.nextSibling_=o,r&&(r.nextSibling_=e),o&&(o.previousSibling_=e),i}function a(e){if(e instanceof DocumentFragment)return s(e);var t=n(e),o=e.parentNode;return o&&r(e,o,t),t}function s(e){for(var t=new T,n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t.length=n,o(e,t),t}function c(e){return e}function l(e,t){R(e,t),e.nodeIsInserted_()}function u(e,t){for(var n=C(t),r=0;r<e.length;r++)l(e[r],n)}function d(e){R(e,new M(e,null))}function p(e){for(var t=0;t<e.length;t++)d(e[t])}function h(e,t){var n=e.nodeType===_.DOCUMENT_NODE?e:e.ownerDocument;n!==t.ownerDocument&&n.adoptNode(t)}function f(t,n){if(n.length){var r=t.ownerDocument;if(r!==n[0].ownerDocument)for(var o=0;o<n.length;o++)e.adoptNodeNoRemove(n[o],r)}}function m(e,t){f(e,t);var n=t.length;if(1===n)return P(t[0]);for(var r=P(e.ownerDocument.createDocumentFragment()),o=0;n>o;o++)r.appendChild(P(t[o]));return r}function w(e){if(void 0!==e.firstChild_)for(var t=e.firstChild_;t;){var n=t;t=t.nextSibling_,n.parentNode_=n.previousSibling_=n.nextSibling_=void 0}e.firstChild_=e.lastChild_=void 0}function v(e){if(e.invalidateShadowRenderer()){for(var t=e.firstChild;t;){O(t.parentNode===e);var n=t.nextSibling,r=P(t),o=r.parentNode;o&&X.call(o,r),t.previousSibling_=t.nextSibling_=t.parentNode_=null,t=n}e.firstChild_=e.lastChild_=null}else for(var n,i=P(e),a=i.firstChild;a;)n=a.nextSibling,X.call(i,a),a=n}function g(e){var t=e.parentNode;return t&&t.invalidateShadowRenderer()}function b(e){for(var t,n=0;n<e.length;n++)t=e[n],t.parentNode.removeChild(t)}function y(e,t,n){var r;if(r=A(n?q.call(n,I(e),!1):B.call(I(e),!1)),t){for(var o=e.firstChild;o;o=o.nextSibling)r.appendChild(y(o,!0,n));if(e instanceof F.HTMLTemplateElement)for(var i=r.content,o=e.content.firstChild;o;o=o.nextSibling)i.appendChild(y(o,!0,n))}return r}function E(e,t){if(!t||C(e)!==C(t))return!1;for(var n=t;n;n=n.parentNode)if(n===e)return!0;return!1}function _(e){O(e instanceof V),S.call(this,e),this.parentNode_=void 0,this.firstChild_=void 0,this.lastChild_=void 0,this.nextSibling_=void 0,this.previousSibling_=void 0,this.treeScope_=void 0}var S=e.wrappers.EventTarget,T=e.wrappers.NodeList,M=e.TreeScope,O=e.assert,L=e.defineWrapGetter,N=e.enqueueMutation,C=e.getTreeScope,j=e.isWrapper,D=e.mixin,H=e.registerTransientObservers,x=e.registerWrapper,R=e.setTreeScope,I=e.unsafeUnwrap,P=e.unwrap,k=e.unwrapIfNeeded,A=e.wrap,W=e.wrapIfNeeded,F=e.wrappers,U=!1,q=document.importNode,B=window.Node.prototype.cloneNode,V=window.Node,G=window.DocumentFragment,z=(V.prototype.appendChild,V.prototype.compareDocumentPosition),K=V.prototype.isEqualNode,$=V.prototype.insertBefore,X=V.prototype.removeChild,Y=V.prototype.replaceChild,Z=/Trident|Edge/.test(navigator.userAgent),J=Z?function(e,t){try{X.call(e,t)}catch(n){if(!(e instanceof G))throw n}}:function(e,t){X.call(e,t)};_.prototype=Object.create(S.prototype),D(_.prototype,{appendChild:function(e){return this.insertBefore(e,null)},insertBefore:function(e,n){t(e);var r;n?j(n)?r=P(n):(r=n,n=A(r)):(n=null,r=null),n&&O(n.parentNode===this);var o,s=n?n.previousSibling:this.lastChild,c=!this.invalidateShadowRenderer()&&!g(e);if(o=c?a(e):i(e,this,s,n),c)h(this,e),w(this),$.call(I(this),P(e),r);else{s||(this.firstChild_=o[0]),n||(this.lastChild_=o[o.length-1],void 0===this.firstChild_&&(this.firstChild_=this.firstChild));var l=r?r.parentNode:I(this);l?$.call(l,m(this,o),r):f(this,o)}return N(this,"childList",{addedNodes:o,nextSibling:n,previousSibling:s}),u(o,this),e},removeChild:function(e){if(t(e),e.parentNode!==this){for(var r=!1,o=(this.childNodes,this.firstChild);o;o=o.nextSibling)if(o===e){r=!0;break}if(!r)throw new Error("NotFoundError")}var i=P(e),a=e.nextSibling,s=e.previousSibling;if(this.invalidateShadowRenderer()){var c=this.firstChild,l=this.lastChild,u=i.parentNode;u&&J(u,i),c===e&&(this.firstChild_=a),l===e&&(this.lastChild_=s),s&&(s.nextSibling_=a),a&&(a.previousSibling_=s),e.previousSibling_=e.nextSibling_=e.parentNode_=void 0}else w(this),J(I(this),i);return U||N(this,"childList",{removedNodes:n(e),nextSibling:a,previousSibling:s}),H(this,e),e},replaceChild:function(e,r){t(e);var o;if(j(r)?o=P(r):(o=r,r=A(o)),r.parentNode!==this)throw new Error("NotFoundError");var s,c=r.nextSibling,l=r.previousSibling,p=!this.invalidateShadowRenderer()&&!g(e);return p?s=a(e):(c===e&&(c=e.nextSibling),s=i(e,this,l,c)),p?(h(this,e),w(this),Y.call(I(this),P(e),o)):(this.firstChild===r&&(this.firstChild_=s[0]),this.lastChild===r&&(this.lastChild_=s[s.length-1]),r.previousSibling_=r.nextSibling_=r.parentNode_=void 0,o.parentNode&&Y.call(o.parentNode,m(this,s),o)),N(this,"childList",{addedNodes:s,removedNodes:n(r),nextSibling:c,previousSibling:l}),d(r),u(s,this),r},nodeIsInserted_:function(){for(var e=this.firstChild;e;e=e.nextSibling)e.nodeIsInserted_()},hasChildNodes:function(){return null!==this.firstChild},get parentNode(){return void 0!==this.parentNode_?this.parentNode_:A(I(this).parentNode)},get firstChild(){return void 0!==this.firstChild_?this.firstChild_:A(I(this).firstChild)},get lastChild(){return void 0!==this.lastChild_?this.lastChild_:A(I(this).lastChild)},get nextSibling(){return void 0!==this.nextSibling_?this.nextSibling_:A(I(this).nextSibling)},get previousSibling(){return void 0!==this.previousSibling_?this.previousSibling_:A(I(this).previousSibling)},get parentElement(){for(var e=this.parentNode;e&&e.nodeType!==_.ELEMENT_NODE;)e=e.parentNode;return e},get textContent(){for(var e="",t=this.firstChild;t;t=t.nextSibling)t.nodeType!=_.COMMENT_NODE&&(e+=t.textContent);return e},set textContent(e){null==e&&(e="");var t=c(this.childNodes);if(this.invalidateShadowRenderer()){if(v(this),""!==e){var n=I(this).ownerDocument.createTextNode(e);this.appendChild(n)}}else w(this),I(this).textContent=e;var r=c(this.childNodes);N(this,"childList",{addedNodes:r,removedNodes:t}),p(t),u(r,this)},get childNodes(){for(var e=new T,t=0,n=this.firstChild;n;n=n.nextSibling)e[t++]=n;return e.length=t,e},cloneNode:function(e){return y(this,e)},contains:function(e){return E(this,W(e))},compareDocumentPosition:function(e){return z.call(I(this),k(e))},isEqualNode:function(e){return K.call(I(this),k(e))},normalize:function(){for(var e,t,n=c(this.childNodes),r=[],o="",i=0;i<n.length;i++)t=n[i],t.nodeType===_.TEXT_NODE?e||t.data.length?e?(o+=t.data,r.push(t)):e=t:this.removeChild(t):(e&&r.length&&(e.data+=o,b(r)),r=[],o="",e=null,t.childNodes.length&&t.normalize());e&&r.length&&(e.data+=o,b(r))}}),L(_,"ownerDocument"),x(V,_,document.createDocumentFragment()),delete _.prototype.querySelector,delete _.prototype.querySelectorAll,_.prototype=D(Object.create(S.prototype),_.prototype),e.cloneNode=y,e.nodeWasAdded=l,e.nodeWasRemoved=d,e.nodesWereAdded=u,e.nodesWereRemoved=p,e.originalInsertBefore=$,e.originalRemoveChild=X,e.snapshotNodeList=c,e.wrappers.Node=_}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n,r,o){for(var i=null,a=null,s=0,c=t.length;c>s;s++)i=b(t[s]),!o&&(a=v(i).root)&&a instanceof e.wrappers.ShadowRoot||(r[n++]=i);return n}function n(e){return String(e).replace(/\/deep\/|::shadow|>>>/g," ")}function r(e){return String(e).replace(/:host\(([^\s]+)\)/g,"$1").replace(/([^\s]):host/g,"$1").replace(":host","*").replace(/\^|\/shadow\/|\/shadow-deep\/|::shadow|\/deep\/|::content|>>>/g," ")}function o(e,t){for(var n,r=e.firstElementChild;r;){if(r.matches(t))return r;if(n=o(r,t))return n;r=r.nextElementSibling}return null}function i(e,t){return e.matches(t)}function a(e,t,n){var r=e.localName;return r===t||r===n&&e.namespaceURI===j}function s(){return!0}function c(e,t,n){return e.localName===n}function l(e,t){return e.namespaceURI===t}function u(e,t,n){return e.namespaceURI===t&&e.localName===n}function d(e,t,n,r,o,i){for(var a=e.firstElementChild;a;)r(a,o,i)&&(n[t++]=a),t=d(a,t,n,r,o,i),a=a.nextElementSibling;return t}function p(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,null);if(c instanceof N)s=S.call(c,i);else{if(!(c instanceof C))return d(this,r,o,n,i,null);s=_.call(c,i)}return t(s,r,o,a)}function h(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=M.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=T.call(c,i,a)}return t(s,r,o,!1)}function f(n,r,o,i,a){var s,c=g(this),l=v(this).root;if(l instanceof e.wrappers.ShadowRoot)return d(this,r,o,n,i,a);if(c instanceof N)s=L.call(c,i,a);else{if(!(c instanceof C))return d(this,r,o,n,i,a);s=O.call(c,i,a)}return t(s,r,o,!1)}var m=e.wrappers.HTMLCollection,w=e.wrappers.NodeList,v=e.getTreeScope,g=e.unsafeUnwrap,b=e.wrap,y=document.querySelector,E=document.documentElement.querySelector,_=document.querySelectorAll,S=document.documentElement.querySelectorAll,T=document.getElementsByTagName,M=document.documentElement.getElementsByTagName,O=document.getElementsByTagNameNS,L=document.documentElement.getElementsByTagNameNS,N=window.Element,C=window.HTMLDocument||window.Document,j="http://www.w3.org/1999/xhtml",D={
+querySelector:function(t){var r=n(t),i=r!==t;t=r;var a,s=g(this),c=v(this).root;if(c instanceof e.wrappers.ShadowRoot)return o(this,t);if(s instanceof N)a=b(E.call(s,t));else{if(!(s instanceof C))return o(this,t);a=b(y.call(s,t))}return a&&!i&&(c=v(a).root)&&c instanceof e.wrappers.ShadowRoot?o(this,t):a},querySelectorAll:function(e){var t=n(e),r=t!==e;e=t;var o=new w;return o.length=p.call(this,i,0,o,e,r),o}},H={matches:function(t){return t=r(t),e.originalMatches.call(g(this),t)}},x={getElementsByTagName:function(e){var t=new m,n="*"===e?s:a;return t.length=h.call(this,n,0,t,e,e.toLowerCase()),t},getElementsByClassName:function(e){return this.querySelectorAll("."+e)},getElementsByTagNameNS:function(e,t){var n=new m,r=null;return r="*"===e?"*"===t?s:c:"*"===t?l:u,n.length=f.call(this,r,0,n,e||null,t),n}};e.GetElementsByInterface=x,e.SelectorsInterface=D,e.MatchesInterface=H}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.nextSibling;return e}function n(e){for(;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.previousSibling;return e}var r=e.wrappers.NodeList,o={get firstElementChild(){return t(this.firstChild)},get lastElementChild(){return n(this.lastChild)},get childElementCount(){for(var e=0,t=this.firstElementChild;t;t=t.nextElementSibling)e++;return e},get children(){for(var e=new r,t=0,n=this.firstElementChild;n;n=n.nextElementSibling)e[t++]=n;return e.length=t,e},remove:function(){var e=this.parentNode;e&&e.removeChild(this)}},i={get nextElementSibling(){return t(this.nextSibling)},get previousElementSibling(){return n(this.previousSibling)}},a={getElementById:function(e){return/[ \t\n\r\f]/.test(e)?null:this.querySelector('[id="'+e+'"]')}};e.ChildNodeInterface=i,e.NonElementParentNodeInterface=a,e.ParentNodeInterface=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}var n=e.ChildNodeInterface,r=e.wrappers.Node,o=e.enqueueMutation,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=window.CharacterData;t.prototype=Object.create(r.prototype),i(t.prototype,{get nodeValue(){return this.data},set nodeValue(e){this.data=e},get textContent(){return this.data},set textContent(e){this.data=e},get data(){return s(this).data},set data(e){var t=s(this).data;o(this,"characterData",{oldValue:t}),s(this).data=e}}),i(t.prototype,n),a(c,t,document.createTextNode("")),e.wrappers.CharacterData=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e>>>0}function n(e){r.call(this,e)}var r=e.wrappers.CharacterData,o=(e.enqueueMutation,e.mixin),i=e.registerWrapper,a=window.Text;n.prototype=Object.create(r.prototype),o(n.prototype,{splitText:function(e){e=t(e);var n=this.data;if(e>n.length)throw new Error("IndexSizeError");var r=n.slice(0,e),o=n.slice(e);this.data=r;var i=this.ownerDocument.createTextNode(o);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}}),i(a,n,document.createTextNode("")),e.wrappers.Text=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return i(e).getAttribute("class")}function n(e,t){a(e,"attributes",{name:"class",namespace:null,oldValue:t})}function r(t){e.invalidateRendererBasedOnAttribute(t,"class")}function o(e,o,i){var a=e.ownerElement_;if(null==a)return o.apply(e,i);var s=t(a),c=o.apply(e,i);return t(a)!==s&&(n(a,s),r(a)),c}if(!window.DOMTokenList)return void console.warn("Missing DOMTokenList prototype, please include a compatible classList polyfill such as http://goo.gl/uTcepH.");var i=e.unsafeUnwrap,a=e.enqueueMutation,s=DOMTokenList.prototype.add;DOMTokenList.prototype.add=function(){o(this,s,arguments)};var c=DOMTokenList.prototype.remove;DOMTokenList.prototype.remove=function(){o(this,c,arguments)};var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(){return o(this,l,arguments)}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t,n){var r=t.parentNode;if(r&&r.shadowRoot){var o=e.getRendererForHost(r);o.dependsOnAttribute(n)&&o.invalidate()}}function n(e,t,n){u(e,"attributes",{name:t,namespace:null,oldValue:n})}function r(e){a.call(this,e)}var o=e.ChildNodeInterface,i=e.GetElementsByInterface,a=e.wrappers.Node,s=e.ParentNodeInterface,c=e.SelectorsInterface,l=e.MatchesInterface,u=(e.addWrapNodeListMethod,e.enqueueMutation),d=e.mixin,p=(e.oneOf,e.registerWrapper),h=e.unsafeUnwrap,f=e.wrappers,m=window.Element,w=["matches","mozMatchesSelector","msMatchesSelector","webkitMatchesSelector"].filter(function(e){return m.prototype[e]}),v=w[0],g=m.prototype[v],b=new WeakMap;r.prototype=Object.create(a.prototype),d(r.prototype,{createShadowRoot:function(){var t=new f.ShadowRoot(this);h(this).polymerShadowRoot_=t;var n=e.getRendererForHost(this);return n.invalidate(),t},get shadowRoot(){return h(this).polymerShadowRoot_||null},setAttribute:function(e,r){var o=h(this).getAttribute(e);h(this).setAttribute(e,r),n(this,e,o),t(this,e)},removeAttribute:function(e){var r=h(this).getAttribute(e);h(this).removeAttribute(e),n(this,e,r),t(this,e)},get classList(){var e=b.get(this);if(!e){if(e=h(this).classList,!e)return;e.ownerElement_=this,b.set(this,e)}return e},get className(){return h(this).className},set className(e){this.setAttribute("class",e)},get id(){return h(this).id},set id(e){this.setAttribute("id",e)}}),w.forEach(function(e){"matches"!==e&&(r.prototype[e]=function(e){return this.matches(e)})}),m.prototype.webkitCreateShadowRoot&&(r.prototype.webkitCreateShadowRoot=r.prototype.createShadowRoot),d(r.prototype,o),d(r.prototype,i),d(r.prototype,s),d(r.prototype,c),d(r.prototype,l),p(m,r,document.createElementNS(null,"x")),e.invalidateRendererBasedOnAttribute=t,e.matchesNames=w,e.originalMatches=g,e.wrappers.Element=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function n(e){return e.replace(L,t)}function r(e){return e.replace(N,t)}function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}function i(e){if(e.namespaceURI!==D)return!0;var t=e.ownerDocument.doctype;return t&&t.publicId&&t.systemId}function a(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:for(var o,a=e.tagName.toLowerCase(),c="<"+a,l=e.attributes,u=0;o=l[u];u++)c+=" "+o.name+'="'+n(o.value)+'"';return C[a]?(i(e)&&(c+="/"),c+">"):c+">"+s(e)+"</"+a+">";case Node.TEXT_NODE:var d=e.data;return t&&j[t.localName]?d:r(d);case Node.COMMENT_NODE:return"<!--"+e.data+"-->";default:throw console.error(e),new Error("not implemented")}}function s(e){e instanceof O.HTMLTemplateElement&&(e=e.content);for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=a(n,e);return t}function c(e,t,n){var r=n||"div";e.textContent="";var o=T(e.ownerDocument.createElement(r));o.innerHTML=t;for(var i;i=o.firstChild;)e.appendChild(M(i))}function l(e){m.call(this,e)}function u(e,t){var n=T(e.cloneNode(!1));n.innerHTML=t;for(var r,o=T(document.createDocumentFragment());r=n.firstChild;)o.appendChild(r);return M(o)}function d(t){return function(){return e.renderAllPending(),S(this)[t]}}function p(e){w(l,e,d(e))}function h(t){Object.defineProperty(l.prototype,t,{get:d(t),set:function(n){e.renderAllPending(),S(this)[t]=n},configurable:!0,enumerable:!0})}function f(t){Object.defineProperty(l.prototype,t,{value:function(){return e.renderAllPending(),S(this)[t].apply(S(this),arguments)},configurable:!0,enumerable:!0})}var m=e.wrappers.Element,w=e.defineGetter,v=e.enqueueMutation,g=e.mixin,b=e.nodesWereAdded,y=e.nodesWereRemoved,E=e.registerWrapper,_=e.snapshotNodeList,S=e.unsafeUnwrap,T=e.unwrap,M=e.wrap,O=e.wrappers,L=/[&\u00A0"]/g,N=/[&\u00A0<>]/g,C=o(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),j=o(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),D="http://www.w3.org/1999/xhtml",H=/MSIE/.test(navigator.userAgent),x=window.HTMLElement,R=window.HTMLTemplateElement;l.prototype=Object.create(m.prototype),g(l.prototype,{get innerHTML(){return s(this)},set innerHTML(e){if(H&&j[this.localName])return void(this.textContent=e);var t=_(this.childNodes);this.invalidateShadowRenderer()?this instanceof O.HTMLTemplateElement?c(this.content,e):c(this,e,this.tagName):!R&&this instanceof O.HTMLTemplateElement?c(this.content,e):S(this).innerHTML=e;var n=_(this.childNodes);v(this,"childList",{addedNodes:n,removedNodes:t}),y(t),b(n,this)},get outerHTML(){return a(this,this.parentNode)},set outerHTML(e){var t=this.parentNode;if(t){t.invalidateShadowRenderer();var n=u(t,e);t.replaceChild(n,this)}},insertAdjacentHTML:function(e,t){var n,r;switch(String(e).toLowerCase()){case"beforebegin":n=this.parentNode,r=this;break;case"afterend":n=this.parentNode,r=this.nextSibling;break;case"afterbegin":n=this,r=this.firstChild;break;case"beforeend":n=this,r=null;break;default:return}var o=u(n,t);n.insertBefore(o,r)},get hidden(){return this.hasAttribute("hidden")},set hidden(e){e?this.setAttribute("hidden",""):this.removeAttribute("hidden")}}),["clientHeight","clientLeft","clientTop","clientWidth","offsetHeight","offsetLeft","offsetTop","offsetWidth","scrollHeight","scrollWidth"].forEach(p),["scrollLeft","scrollTop"].forEach(h),["focus","getBoundingClientRect","getClientRects","scrollIntoView"].forEach(f),E(x,l,document.createElement("b")),e.wrappers.HTMLElement=l,e.getInnerHTML=s,e.setInnerHTML=c}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.HTMLCanvasElement;t.prototype=Object.create(n.prototype),r(t.prototype,{getContext:function(){var e=i(this).getContext.apply(i(this),arguments);return e&&a(e)}}),o(s,t,document.createElement("canvas")),e.wrappers.HTMLCanvasElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=window.HTMLContentElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get select(){return this.getAttribute("select")},set select(e){this.setAttribute("select",e)},setAttribute:function(e,t){n.prototype.setAttribute.call(this,e,t),"select"===String(e).toLowerCase()&&this.invalidateShadowRenderer(!0)}}),i&&o(i,t),e.wrappers.HTMLContentElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=window.HTMLFormElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get elements(){return i(a(this).elements)}}),o(s,t,document.createElement("form")),e.wrappers.HTMLFormElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e,t){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var o=i(document.createElement("img"));r.call(this,o),a(o,this),void 0!==e&&(o.width=e),void 0!==t&&(o.height=t)}var r=e.wrappers.HTMLElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLImageElement;t.prototype=Object.create(r.prototype),o(s,t,document.createElement("img")),n.prototype=t.prototype,e.wrappers.HTMLImageElement=t,e.wrappers.Image=n}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=(e.mixin,e.wrappers.NodeList,e.registerWrapper),o=window.HTMLShadowElement;t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o&&r(o,t),e.wrappers.HTMLShadowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){if(!e.defaultView)return e;var t=d.get(e);if(!t){for(t=e.implementation.createHTMLDocument("");t.lastChild;)t.removeChild(t.lastChild);d.set(e,t)}return t}function n(e){for(var n,r=t(e.ownerDocument),o=c(r.createDocumentFragment());n=e.firstChild;)o.appendChild(n);return o}function r(e){if(o.call(this,e),!p){var t=n(e);u.set(this,l(t))}}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.wrap,u=new WeakMap,d=new WeakMap,p=window.HTMLTemplateElement;r.prototype=Object.create(o.prototype),i(r.prototype,{constructor:r,get content(){return p?l(s(this).content):u.get(this)}}),p&&a(p,r),e.wrappers.HTMLTemplateElement=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.registerWrapper,o=window.HTMLMediaElement;o&&(t.prototype=Object.create(n.prototype),r(o,t,document.createElement("audio")),e.wrappers.HTMLMediaElement=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r.call(this,e)}function n(e){if(!(this instanceof n))throw new TypeError("DOM object constructor cannot be called as a function.");var t=i(document.createElement("audio"));r.call(this,t),a(t,this),t.setAttribute("preload","auto"),void 0!==e&&t.setAttribute("src",e)}var r=e.wrappers.HTMLMediaElement,o=e.registerWrapper,i=e.unwrap,a=e.rewrap,s=window.HTMLAudioElement;s&&(t.prototype=Object.create(r.prototype),o(s,t,document.createElement("audio")),n.prototype=t.prototype,e.wrappers.HTMLAudioElement=t,e.wrappers.Audio=n)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){return e.replace(/\s+/g," ").trim()}function n(e){o.call(this,e)}function r(e,t,n,i){if(!(this instanceof r))throw new TypeError("DOM object constructor cannot be called as a function.");var a=c(document.createElement("option"));o.call(this,a),s(a,this),void 0!==e&&(a.text=e),void 0!==t&&a.setAttribute("value",t),n===!0&&a.setAttribute("selected",""),a.selected=i===!0}var o=e.wrappers.HTMLElement,i=e.mixin,a=e.registerWrapper,s=e.rewrap,c=e.unwrap,l=e.wrap,u=window.HTMLOptionElement;n.prototype=Object.create(o.prototype),i(n.prototype,{get text(){return t(this.textContent)},set text(e){this.textContent=t(String(e))},get form(){return l(c(this).form)}}),a(u,n,document.createElement("option")),r.prototype=n.prototype,e.wrappers.HTMLOptionElement=n,e.wrappers.Option=r}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=window.HTMLSelectElement;t.prototype=Object.create(n.prototype),r(t.prototype,{add:function(e,t){"object"==typeof t&&(t=i(t)),i(this).add(i(e),t)},remove:function(e){return void 0===e?void n.prototype.remove.call(this):("object"==typeof e&&(e=i(e)),void i(this).remove(e))},get form(){return a(i(this).form)}}),o(s,t,document.createElement("select")),e.wrappers.HTMLSelectElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.unwrap,a=e.wrap,s=e.wrapHTMLCollection,c=window.HTMLTableElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get caption(){return a(i(this).caption)},createCaption:function(){return a(i(this).createCaption())},get tHead(){return a(i(this).tHead)},createTHead:function(){return a(i(this).createTHead())},createTFoot:function(){return a(i(this).createTFoot())},get tFoot(){return a(i(this).tFoot)},get tBodies(){return s(i(this).tBodies)},createTBody:function(){return a(i(this).createTBody())},get rows(){return s(i(this).rows)},insertRow:function(e){return a(i(this).insertRow(e))}}),o(c,t,document.createElement("table")),e.wrappers.HTMLTableElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableSectionElement;t.prototype=Object.create(n.prototype),r(t.prototype,{constructor:t,get rows(){return i(a(this).rows)},insertRow:function(e){return s(a(this).insertRow(e))}}),o(c,t,document.createElement("thead")),e.wrappers.HTMLTableSectionElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.HTMLElement,r=e.mixin,o=e.registerWrapper,i=e.wrapHTMLCollection,a=e.unwrap,s=e.wrap,c=window.HTMLTableRowElement;t.prototype=Object.create(n.prototype),r(t.prototype,{get cells(){return i(a(this).cells)},insertCell:function(e){return s(a(this).insertCell(e))}}),o(c,t,document.createElement("tr")),e.wrappers.HTMLTableRowElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){switch(e.localName){case"content":return new n(e);case"shadow":return new o(e);case"template":return new i(e)}r.call(this,e)}var n=e.wrappers.HTMLContentElement,r=e.wrappers.HTMLElement,o=e.wrappers.HTMLShadowElement,i=e.wrappers.HTMLTemplateElement,a=(e.mixin,e.registerWrapper),s=window.HTMLUnknownElement;t.prototype=Object.create(r.prototype),a(s,t),e.wrappers.HTMLUnknownElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Element,r=e.wrappers.HTMLElement,o=e.registerWrapper,i=(e.defineWrapGetter,e.unsafeUnwrap),a=e.wrap,s=e.mixin,c="http://www.w3.org/2000/svg",l=window.SVGElement,u=document.createElementNS(c,"title");if(!("classList"in u)){var d=Object.getOwnPropertyDescriptor(n.prototype,"classList");Object.defineProperty(r.prototype,"classList",d),delete n.prototype.classList}t.prototype=Object.create(n.prototype),s(t.prototype,{get ownerSVGElement(){return a(i(this).ownerSVGElement)}}),o(l,t,document.createElementNS(c,"title")),e.wrappers.SVGElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){p.call(this,e)}var n=e.mixin,r=e.registerWrapper,o=e.unwrap,i=e.wrap,a=window.SVGUseElement,s="http://www.w3.org/2000/svg",c=i(document.createElementNS(s,"g")),l=document.createElementNS(s,"use"),u=c.constructor,d=Object.getPrototypeOf(u.prototype),p=d.constructor;t.prototype=Object.create(d),"instanceRoot"in l&&n(t.prototype,{get instanceRoot(){return i(o(this).instanceRoot)},get animatedInstanceRoot(){return i(o(this).animatedInstanceRoot)}}),r(a,t,l),e.wrappers.SVGUseElement=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.mixin,o=e.registerWrapper,i=e.unsafeUnwrap,a=e.wrap,s=window.SVGElementInstance;s&&(t.prototype=Object.create(n.prototype),r(t.prototype,{get correspondingElement(){return a(i(this).correspondingElement)},get correspondingUseElement(){return a(i(this).correspondingUseElement)},get parentNode(){return a(i(this).parentNode)},get childNodes(){throw new Error("Not implemented")},get firstChild(){return a(i(this).firstChild)},get lastChild(){return a(i(this).lastChild)},get previousSibling(){return a(i(this).previousSibling)},get nextSibling(){return a(i(this).nextSibling)}}),o(s,t),e.wrappers.SVGElementInstance=t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){o(e,this)}var n=e.mixin,r=e.registerWrapper,o=e.setWrapper,i=e.unsafeUnwrap,a=e.unwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.CanvasRenderingContext2D;n(t.prototype,{get canvas(){return c(i(this).canvas)},drawImage:function(){arguments[0]=s(arguments[0]),i(this).drawImage.apply(i(this),arguments)},createPattern:function(){return arguments[0]=a(arguments[0]),i(this).createPattern.apply(i(this),arguments)}}),r(l,t,document.createElement("canvas").getContext("2d")),e.wrappers.CanvasRenderingContext2D=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){i(e,this)}var n=e.addForwardingProperties,r=e.mixin,o=e.registerWrapper,i=e.setWrapper,a=e.unsafeUnwrap,s=e.unwrapIfNeeded,c=e.wrap,l=window.WebGLRenderingContext;if(l){r(t.prototype,{get canvas(){return c(a(this).canvas)},texImage2D:function(){arguments[5]=s(arguments[5]),a(this).texImage2D.apply(a(this),arguments)},texSubImage2D:function(){arguments[6]=s(arguments[6]),a(this).texSubImage2D.apply(a(this),arguments)}});var u=Object.getPrototypeOf(l.prototype);u!==Object.prototype&&n(u,t.prototype);var d=/WebKit/.test(navigator.userAgent)?{drawingBufferHeight:null,drawingBufferWidth:null}:{};o(l,t,d),e.wrappers.WebGLRenderingContext=t}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.Node,r=e.GetElementsByInterface,o=e.NonElementParentNodeInterface,i=e.ParentNodeInterface,a=e.SelectorsInterface,s=e.mixin,c=e.registerObject,l=e.registerWrapper,u=window.DocumentFragment;t.prototype=Object.create(n.prototype),s(t.prototype,i),s(t.prototype,a),s(t.prototype,r),s(t.prototype,o),l(u,t,document.createDocumentFragment()),e.wrappers.DocumentFragment=t;var d=c(document.createComment(""));e.wrappers.Comment=d}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(u(e).ownerDocument.createDocumentFragment());n.call(this,t),c(t,this);var o=e.shadowRoot;f.set(this,o),this.treeScope_=new r(this,a(o||e)),h.set(this,e)}var n=e.wrappers.DocumentFragment,r=e.TreeScope,o=e.elementFromPoint,i=e.getInnerHTML,a=e.getTreeScope,s=e.mixin,c=e.rewrap,l=e.setInnerHTML,u=e.unsafeUnwrap,d=e.unwrap,p=e.wrap,h=new WeakMap,f=new WeakMap;t.prototype=Object.create(n.prototype),s(t.prototype,{constructor:t,get innerHTML(){return i(this)},set innerHTML(e){l(this,e),this.invalidateShadowRenderer()},get olderShadowRoot(){return f.get(this)||null},get host(){return h.get(this)||null},invalidateShadowRenderer:function(){return h.get(this).invalidateShadowRenderer()},elementFromPoint:function(e,t){return o(this,this.ownerDocument,e,t)},getSelection:function(){return document.getSelection()},get activeElement(){var e=d(this).ownerDocument.activeElement;if(!e||!e.nodeType)return null;for(var t=p(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}}),e.wrappers.ShadowRoot=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=d(e).root;return t instanceof h?t.host:null}function n(t,n){if(t.shadowRoot){n=Math.min(t.childNodes.length-1,n);var r=t.childNodes[n];if(r){var o=e.getDestinationInsertionPoints(r);if(o.length>0){var i=o[0].parentNode;i.nodeType==Node.ELEMENT_NODE&&(t=i)}}}return t}function r(e){return e=u(e),t(e)||e}function o(e){a(e,this)}var i=e.registerWrapper,a=e.setWrapper,s=e.unsafeUnwrap,c=e.unwrap,l=e.unwrapIfNeeded,u=e.wrap,d=e.getTreeScope,p=window.Range,h=e.wrappers.ShadowRoot;o.prototype={get startContainer(){return r(s(this).startContainer)},get endContainer(){return r(s(this).endContainer)},get commonAncestorContainer(){return r(s(this).commonAncestorContainer)},setStart:function(e,t){e=n(e,t),s(this).setStart(l(e),t)},setEnd:function(e,t){e=n(e,t),s(this).setEnd(l(e),t)},setStartBefore:function(e){s(this).setStartBefore(l(e))},setStartAfter:function(e){s(this).setStartAfter(l(e))},setEndBefore:function(e){s(this).setEndBefore(l(e))},setEndAfter:function(e){s(this).setEndAfter(l(e))},selectNode:function(e){s(this).selectNode(l(e))},selectNodeContents:function(e){s(this).selectNodeContents(l(e))},compareBoundaryPoints:function(e,t){return s(this).compareBoundaryPoints(e,c(t))},extractContents:function(){return u(s(this).extractContents())},cloneContents:function(){return u(s(this).cloneContents())},insertNode:function(e){s(this).insertNode(l(e))},surroundContents:function(e){s(this).surroundContents(l(e))},cloneRange:function(){return u(s(this).cloneRange())},isPointInRange:function(e,t){return s(this).isPointInRange(l(e),t)},comparePoint:function(e,t){return s(this).comparePoint(l(e),t)},intersectsNode:function(e){return s(this).intersectsNode(l(e))},toString:function(){return s(this).toString()}},p.prototype.createContextualFragment&&(o.prototype.createContextualFragment=function(e){return u(s(this).createContextualFragment(e))}),i(window.Range,o,document.createRange()),e.wrappers.Range=o}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){e.previousSibling_=e.previousSibling,e.nextSibling_=e.nextSibling,e.parentNode_=e.parentNode}function n(n,o,i){var a=x(n),s=x(o),c=i?x(i):null;if(r(o),t(o),i)n.firstChild===i&&(n.firstChild_=i),i.previousSibling_=i.previousSibling;else{n.lastChild_=n.lastChild,n.lastChild===n.firstChild&&(n.firstChild_=n.firstChild);var l=R(a.lastChild);l&&(l.nextSibling_=l.nextSibling)}e.originalInsertBefore.call(a,s,c)}function r(n){var r=x(n),o=r.parentNode;if(o){var i=R(o);t(n),n.previousSibling&&(n.previousSibling.nextSibling_=n),n.nextSibling&&(n.nextSibling.previousSibling_=n),i.lastChild===n&&(i.lastChild_=n),i.firstChild===n&&(i.firstChild_=n),e.originalRemoveChild.call(o,r)}}function o(e){P.set(e,[])}function i(e){var t=P.get(e);return t||P.set(e,t=[]),t}function a(e){for(var t=[],n=0,r=e.firstChild;r;r=r.nextSibling)t[n++]=r;return t}function s(){for(var e=0;e<F.length;e++){var t=F[e],n=t.parentRenderer;n&&n.dirty||t.render()}F=[]}function c(){T=null,s()}function l(e){var t=A.get(e);return t||(t=new h(e),A.set(e,t)),t}function u(e){var t=j(e).root;return t instanceof C?t:null}function d(e){return l(e.host)}function p(e){this.skip=!1,this.node=e,this.childNodes=[]}function h(e){this.host=e,this.dirty=!1,this.invalidateAttributes(),this.associateNode(e)}function f(e){for(var t=[],n=e.firstChild;n;n=n.nextSibling)E(n)?t.push.apply(t,i(n)):t.push(n);return t}function m(e){if(e instanceof L)return e;if(e instanceof O)return null;for(var t=e.firstChild;t;t=t.nextSibling){var n=m(t);if(n)return n}return null}function w(e,t){i(t).push(e);var n=k.get(e);n?n.push(t):k.set(e,[t])}function v(e){return k.get(e)}function g(e){k.set(e,void 0)}function b(e,t){var n=t.getAttribute("select");if(!n)return!0;if(n=n.trim(),!n)return!0;if(!(e instanceof M))return!1;if(!q.test(n))return!1;try{return e.matches(n)}catch(r){return!1}}function y(e,t){var n=v(t);return n&&n[n.length-1]===e}function E(e){return e instanceof O||e instanceof L}function _(e){return e.shadowRoot}function S(e){for(var t=[],n=e.shadowRoot;n;n=n.olderShadowRoot)t.push(n);return t}var T,M=e.wrappers.Element,O=e.wrappers.HTMLContentElement,L=e.wrappers.HTMLShadowElement,N=e.wrappers.Node,C=e.wrappers.ShadowRoot,j=(e.assert,e.getTreeScope),D=(e.mixin,e.oneOf),H=e.unsafeUnwrap,x=e.unwrap,R=e.wrap,I=e.ArraySplice,P=new WeakMap,k=new WeakMap,A=new WeakMap,W=D(window,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","setTimeout"]),F=[],U=new I;U.equals=function(e,t){return x(e.node)===t},p.prototype={append:function(e){var t=new p(e);return this.childNodes.push(t),t},sync:function(e){if(!this.skip){for(var t=this.node,o=this.childNodes,i=a(x(t)),s=e||new WeakMap,c=U.calculateSplices(o,i),l=0,u=0,d=0,p=0;p<c.length;p++){for(var h=c[p];d<h.index;d++)u++,o[l++].sync(s);for(var f=h.removed.length,m=0;f>m;m++){var w=R(i[u++]);s.get(w)||r(w)}for(var v=h.addedCount,g=i[u]&&R(i[u]),m=0;v>m;m++){var b=o[l++],y=b.node;n(t,y,g),s.set(y,!0),b.sync(s)}d+=v}for(var p=d;p<o.length;p++)o[p].sync(s)}}},h.prototype={render:function(e){if(this.dirty){this.invalidateAttributes();var t=this.host;this.distribution(t);var n=e||new p(t);this.buildRenderTree(n,t);var r=!e;r&&n.sync(),this.dirty=!1}},get parentRenderer(){return j(this.host).renderer},invalidate:function(){if(!this.dirty){this.dirty=!0;var e=this.parentRenderer;if(e&&e.invalidate(),F.push(this),T)return;T=window[W](c,0)}},distribution:function(e){this.resetAllSubtrees(e),this.distributionResolution(e)},resetAll:function(e){E(e)?o(e):g(e),this.resetAllSubtrees(e)},resetAllSubtrees:function(e){for(var t=e.firstChild;t;t=t.nextSibling)this.resetAll(t);e.shadowRoot&&this.resetAll(e.shadowRoot),e.olderShadowRoot&&this.resetAll(e.olderShadowRoot)},distributionResolution:function(e){if(_(e)){for(var t=e,n=f(t),r=S(t),o=0;o<r.length;o++)this.poolDistribution(r[o],n);for(var o=r.length-1;o>=0;o--){var i=r[o],a=m(i);if(a){var s=i.olderShadowRoot;s&&(n=f(s));for(var c=0;c<n.length;c++)w(n[c],a)}this.distributionResolution(i)}}for(var l=e.firstChild;l;l=l.nextSibling)this.distributionResolution(l)},poolDistribution:function(e,t){if(!(e instanceof L))if(e instanceof O){var n=e;this.updateDependentAttributes(n.getAttribute("select"));for(var r=!1,o=0;o<t.length;o++){var e=t[o];e&&b(e,n)&&(w(e,n),t[o]=void 0,r=!0)}if(!r)for(var i=n.firstChild;i;i=i.nextSibling)w(i,n)}else for(var i=e.firstChild;i;i=i.nextSibling)this.poolDistribution(i,t)},buildRenderTree:function(e,t){for(var n=this.compose(t),r=0;r<n.length;r++){var o=n[r],i=e.append(o);this.buildRenderTree(i,o)}if(_(t)){var a=l(t);a.dirty=!1}},compose:function(e){for(var t=[],n=e.shadowRoot||e,r=n.firstChild;r;r=r.nextSibling)if(E(r)){this.associateNode(n);for(var o=i(r),a=0;a<o.length;a++){var s=o[a];y(r,s)&&t.push(s)}}else t.push(r);return t},invalidateAttributes:function(){this.attributes=Object.create(null)},updateDependentAttributes:function(e){if(e){var t=this.attributes;/\.\w+/.test(e)&&(t["class"]=!0),/#\w+/.test(e)&&(t.id=!0),e.replace(/\[\s*([^\s=\|~\]]+)/g,function(e,n){t[n]=!0})}},dependsOnAttribute:function(e){return this.attributes[e]},associateNode:function(e){H(e).polymerShadowRenderer_=this}};var q=/^(:not\()?[*.#[a-zA-Z_|]/;N.prototype.invalidateShadowRenderer=function(e){var t=H(this).polymerShadowRenderer_;return t?(t.invalidate(),!0):!1},O.prototype.getDistributedNodes=L.prototype.getDistributedNodes=function(){return s(),i(this)},M.prototype.getDestinationInsertionPoints=function(){return s(),v(this)||[]},O.prototype.nodeIsInserted_=L.prototype.nodeIsInserted_=function(){this.invalidateShadowRenderer();var e,t=u(this);t&&(e=d(t)),H(this).polymerShadowRenderer_=e,e&&e.invalidate()},e.getRendererForHost=l,e.getShadowTrees=S,e.renderAllPending=s,e.getDestinationInsertionPoints=v,e.visual={insertBefore:n,remove:r}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(t){if(window[t]){r(!e.wrappers[t]);var c=function(e){n.call(this,e)};c.prototype=Object.create(n.prototype),o(c.prototype,{get form(){return s(a(this).form)}}),i(window[t],c,document.createElement(t.slice(4,-7))),e.wrappers[t]=c}}var n=e.wrappers.HTMLElement,r=e.assert,o=e.mixin,i=e.registerWrapper,a=e.unwrap,s=e.wrap,c=["HTMLButtonElement","HTMLFieldSetElement","HTMLInputElement","HTMLKeygenElement","HTMLLabelElement","HTMLLegendElement","HTMLObjectElement","HTMLOutputElement","HTMLTextAreaElement"];c.forEach(t)}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrap,a=e.unwrapIfNeeded,s=e.wrap,c=window.Selection;t.prototype={get anchorNode(){return s(o(this).anchorNode)},get focusNode(){return s(o(this).focusNode)},addRange:function(e){o(this).addRange(a(e))},collapse:function(e,t){o(this).collapse(a(e),t)},containsNode:function(e,t){return o(this).containsNode(a(e),t)},getRangeAt:function(e){return s(o(this).getRangeAt(e))},removeRange:function(e){o(this).removeRange(i(e))},selectAllChildren:function(e){o(this).selectAllChildren(e instanceof ShadowRoot?o(e.host):a(e))},toString:function(){return o(this).toString()}},c.prototype.extend&&(t.prototype.extend=function(e,t){o(this).extend(a(e),t)}),n(window.Selection,t,window.getSelection()),e.wrappers.Selection=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){r(e,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unsafeUnwrap,i=e.unwrapIfNeeded,a=e.wrap,s=window.TreeWalker;t.prototype={get root(){return a(o(this).root)},get currentNode(){return a(o(this).currentNode)},set currentNode(e){o(this).currentNode=i(e)},get filter(){return o(this).filter},parentNode:function(){return a(o(this).parentNode())},firstChild:function(){return a(o(this).firstChild())},lastChild:function(){return a(o(this).lastChild())},previousSibling:function(){return a(o(this).previousSibling())},previousNode:function(){return a(o(this).previousNode())},nextNode:function(){return a(o(this).nextNode())}},n(s,t),e.wrappers.TreeWalker=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){u.call(this,e),this.treeScope_=new w(this,null)}function n(e){var n=document[e];t.prototype[e]=function(){return j(n.apply(N(this),arguments))}}function r(e,t){x.call(N(t),C(e)),o(e,t)}function o(e,t){e.shadowRoot&&t.adoptNode(e.shadowRoot),e instanceof m&&i(e,t);for(var n=e.firstChild;n;n=n.nextSibling)o(n,t)}function i(e,t){var n=e.olderShadowRoot;n&&t.adoptNode(n)}function a(e){L(e,this)}function s(e,t){var n=document.implementation[t];e.prototype[t]=function(){
+return j(n.apply(N(this),arguments))}}function c(e,t){var n=document.implementation[t];e.prototype[t]=function(){return n.apply(N(this),arguments)}}var l=e.GetElementsByInterface,u=e.wrappers.Node,d=e.ParentNodeInterface,p=e.NonElementParentNodeInterface,h=e.wrappers.Selection,f=e.SelectorsInterface,m=e.wrappers.ShadowRoot,w=e.TreeScope,v=e.cloneNode,g=e.defineGetter,b=e.defineWrapGetter,y=e.elementFromPoint,E=e.forwardMethodsToWrapper,_=e.matchesNames,S=e.mixin,T=e.registerWrapper,M=e.renderAllPending,O=e.rewrap,L=e.setWrapper,N=e.unsafeUnwrap,C=e.unwrap,j=e.wrap,D=e.wrapEventTargetMethods,H=(e.wrapNodeList,new WeakMap);t.prototype=Object.create(u.prototype),b(t,"documentElement"),b(t,"body"),b(t,"head"),g(t,"activeElement",function(){var e=C(this).activeElement;if(!e||!e.nodeType)return null;for(var t=j(e);!this.contains(t);){for(;t.parentNode;)t=t.parentNode;if(!t.host)return null;t=t.host}return t}),["createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode"].forEach(n);var x=document.adoptNode,R=document.getSelection;S(t.prototype,{adoptNode:function(e){return e.parentNode&&e.parentNode.removeChild(e),r(e,this),e},elementFromPoint:function(e,t){return y(this,this,e,t)},importNode:function(e,t){return v(e,t,N(this))},getSelection:function(){return M(),new h(R.call(C(this)))},getElementsByName:function(e){return f.querySelectorAll.call(this,"[name="+JSON.stringify(String(e))+"]")}});var I=document.createTreeWalker,P=e.wrappers.TreeWalker;if(t.prototype.createTreeWalker=function(e,t,n,r){var o=null;return n&&(n.acceptNode&&"function"==typeof n.acceptNode?o={acceptNode:function(e){return n.acceptNode(j(e))}}:"function"==typeof n&&(o=function(e){return n(j(e))})),new P(I.call(C(this),C(e),t,o,r))},document.registerElement){var k=document.registerElement;t.prototype.registerElement=function(t,n){function r(e){return e?void L(e,this):i?document.createElement(i,t):document.createElement(t)}var o,i;if(void 0!==n&&(o=n.prototype,i=n["extends"]),o||(o=Object.create(HTMLElement.prototype)),e.nativePrototypeTable.get(o))throw new Error("NotSupportedError");for(var a,s=Object.getPrototypeOf(o),c=[];s&&!(a=e.nativePrototypeTable.get(s));)c.push(s),s=Object.getPrototypeOf(s);if(!a)throw new Error("NotSupportedError");for(var l=Object.create(a),u=c.length-1;u>=0;u--)l=Object.create(l);["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"].forEach(function(e){var t=o[e];t&&(l[e]=function(){j(this)instanceof r||O(this),t.apply(j(this),arguments)})});var d={prototype:l};i&&(d["extends"]=i),r.prototype=o,r.prototype.constructor=r,e.constructorTable.set(l,r),e.nativePrototypeTable.set(o,l);k.call(C(this),t,d);return r},E([window.HTMLDocument||window.Document],["registerElement"])}E([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement,window.HTMLHtmlElement],["appendChild","compareDocumentPosition","contains","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS","insertBefore","querySelector","querySelectorAll","removeChild","replaceChild"]),E([window.HTMLBodyElement,window.HTMLHeadElement,window.HTMLHtmlElement],_),E([window.HTMLDocument||window.Document],["adoptNode","importNode","contains","createComment","createDocumentFragment","createElement","createElementNS","createEvent","createEventNS","createRange","createTextNode","createTreeWalker","elementFromPoint","getElementById","getElementsByName","getSelection"]),S(t.prototype,l),S(t.prototype,d),S(t.prototype,f),S(t.prototype,p),S(t.prototype,{get implementation(){var e=H.get(this);return e?e:(e=new a(C(this).implementation),H.set(this,e),e)},get defaultView(){return j(C(this).defaultView)}}),T(window.Document,t,document.implementation.createHTMLDocument("")),window.HTMLDocument&&T(window.HTMLDocument,t),D([window.HTMLBodyElement,window.HTMLDocument||window.Document,window.HTMLHeadElement]);var A=document.implementation.createDocument;a.prototype.createDocument=function(){return arguments[2]=C(arguments[2]),j(A.apply(N(this),arguments))},s(a,"createDocumentType"),s(a,"createHTMLDocument"),c(a,"hasFeature"),T(window.DOMImplementation,a),E([window.DOMImplementation],["createDocument","createDocumentType","createHTMLDocument","hasFeature"]),e.adoptNodeNoRemove=r,e.wrappers.DOMImplementation=a,e.wrappers.Document=t}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){n.call(this,e)}var n=e.wrappers.EventTarget,r=e.wrappers.Selection,o=e.mixin,i=e.registerWrapper,a=e.renderAllPending,s=e.unwrap,c=e.unwrapIfNeeded,l=e.wrap,u=window.Window,d=window.getComputedStyle,p=window.getDefaultComputedStyle,h=window.getSelection;t.prototype=Object.create(n.prototype),u.prototype.getComputedStyle=function(e,t){return l(this||window).getComputedStyle(c(e),t)},p&&(u.prototype.getDefaultComputedStyle=function(e,t){return l(this||window).getDefaultComputedStyle(c(e),t)}),u.prototype.getSelection=function(){return l(this||window).getSelection()},delete window.getComputedStyle,delete window.getDefaultComputedStyle,delete window.getSelection,["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){u.prototype[e]=function(){var t=l(this||window);return t[e].apply(t,arguments)},delete window[e]}),o(t.prototype,{getComputedStyle:function(e,t){return a(),d.call(s(this),c(e),t)},getSelection:function(){return a(),new r(h.call(s(this)))},get document(){return l(s(this).document)}}),p&&(t.prototype.getDefaultComputedStyle=function(e,t){return a(),p.call(s(this),c(e),t)}),i(u,t,window),e.wrappers.Window=t}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrap,n=window.DataTransfer||window.Clipboard,r=n.prototype.setDragImage;r&&(n.prototype.setDragImage=function(e,n,o){r.call(this,t(e),n,o)})}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t;t=e instanceof i?e:new i(e&&o(e)),r(t,this)}var n=e.registerWrapper,r=e.setWrapper,o=e.unwrap,i=window.FormData;i&&(n(i,t,new i),e.wrappers.FormData=t)}(window.ShadowDOMPolyfill),function(e){"use strict";var t=e.unwrapIfNeeded,n=XMLHttpRequest.prototype.send;XMLHttpRequest.prototype.send=function(e){return n.call(this,t(e))}}(window.ShadowDOMPolyfill),function(e){"use strict";function t(e){var t=n[e],r=window[t];if(r){var o=document.createElement(e),i=o.constructor;window[t]=i}}var n=(e.isWrapperFor,{a:"HTMLAnchorElement",area:"HTMLAreaElement",audio:"HTMLAudioElement",base:"HTMLBaseElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",col:"HTMLTableColElement",content:"HTMLContentElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",del:"HTMLModElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",font:"HTMLFontElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",head:"HTMLHeadElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",menuitem:"HTMLMenuItemElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",script:"HTMLScriptElement",select:"HTMLSelectElement",shadow:"HTMLShadowElement",source:"HTMLSourceElement",span:"HTMLSpanElement",style:"HTMLStyleElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",ul:"HTMLUListElement",video:"HTMLVideoElement"});Object.keys(n).forEach(t),Object.getOwnPropertyNames(e.wrappers).forEach(function(t){window[t]=e.wrappers[t]})}(window.ShadowDOMPolyfill),function(e){function t(e,t){var n="";return Array.prototype.forEach.call(e,function(e){n+=e.textContent+"\n\n"}),t||(n=n.replace(d,"")),n}function n(e){var t=document.createElement("style");return t.textContent=e,t}function r(e){var t=n(e);document.head.appendChild(t);var r=[];if(t.sheet)try{r=t.sheet.cssRules}catch(o){}else console.warn("sheet not found",t);return t.parentNode.removeChild(t),r}function o(){C.initialized=!0,document.body.appendChild(C);var e=C.contentDocument,t=e.createElement("base");t.href=document.baseURI,e.head.appendChild(t)}function i(e){C.initialized||o(),document.body.appendChild(C),e(C.contentDocument),document.body.removeChild(C)}function a(e,t){if(t){var o;if(e.match("@import")&&D){var a=n(e);i(function(e){e.head.appendChild(a.impl),o=Array.prototype.slice.call(a.sheet.cssRules,0),t(o)})}else o=r(e),t(o)}}function s(e){e&&l().appendChild(document.createTextNode(e))}function c(e,t){var r=n(e);r.setAttribute(t,""),r.setAttribute(x,""),document.head.appendChild(r)}function l(){return j||(j=document.createElement("style"),j.setAttribute(x,""),j[x]=!0),j}var u={strictStyling:!1,registry:{},shimStyling:function(e,n,r){var o=this.prepareRoot(e,n,r),i=this.isTypeExtension(r),a=this.makeScopeSelector(n,i),s=t(o,!0);s=this.scopeCssText(s,a),e&&(e.shimmedStyle=s),this.addCssToDocument(s,n)},shimStyle:function(e,t){return this.shimCssText(e.textContent,t)},shimCssText:function(e,t){return e=this.insertDirectives(e),this.scopeCssText(e,t)},makeScopeSelector:function(e,t){return e?t?"[is="+e+"]":e:""},isTypeExtension:function(e){return e&&e.indexOf("-")<0},prepareRoot:function(e,t,n){var r=this.registerRoot(e,t,n);return this.replaceTextInStyles(r.rootStyles,this.insertDirectives),this.removeStyles(e,r.rootStyles),this.strictStyling&&this.applyScopeToContent(e,t),r.scopeStyles},removeStyles:function(e,t){for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)n.parentNode.removeChild(n)},registerRoot:function(e,t,n){var r=this.registry[t]={root:e,name:t,extendsName:n},o=this.findStyles(e);r.rootStyles=o,r.scopeStyles=r.rootStyles;var i=this.registry[r.extendsName];return i&&(r.scopeStyles=i.scopeStyles.concat(r.scopeStyles)),r},findStyles:function(e){if(!e)return[];var t=e.querySelectorAll("style");return Array.prototype.filter.call(t,function(e){return!e.hasAttribute(R)})},applyScopeToContent:function(e,t){e&&(Array.prototype.forEach.call(e.querySelectorAll("*"),function(e){e.setAttribute(t,"")}),Array.prototype.forEach.call(e.querySelectorAll("template"),function(e){this.applyScopeToContent(e.content,t)},this))},insertDirectives:function(e){return e=this.insertPolyfillDirectivesInCssText(e),this.insertPolyfillRulesInCssText(e)},insertPolyfillDirectivesInCssText:function(e){return e=e.replace(p,function(e,t){return t.slice(0,-2)+"{"}),e.replace(h,function(e,t){return t+" {"})},insertPolyfillRulesInCssText:function(e){return e=e.replace(f,function(e,t){return t.slice(0,-1)}),e.replace(m,function(e,t,n,r){var o=e.replace(t,"").replace(n,"");return r+o})},scopeCssText:function(e,t){var n=this.extractUnscopedRulesFromCssText(e);if(e=this.insertPolyfillHostInCssText(e),e=this.convertColonHost(e),e=this.convertColonHostContext(e),e=this.convertShadowDOMSelectors(e),t){var e,r=this;a(e,function(n){e=r.scopeRules(n,t)})}return e=e+"\n"+n,e.trim()},extractUnscopedRulesFromCssText:function(e){for(var t,n="";t=w.exec(e);)n+=t[1].slice(0,-1)+"\n\n";for(;t=v.exec(e);)n+=t[0].replace(t[2],"").replace(t[1],t[3])+"\n\n";return n},convertColonHost:function(e){return this.convertColonRule(e,E,this.colonHostPartReplacer)},convertColonHostContext:function(e){return this.convertColonRule(e,_,this.colonHostContextPartReplacer)},convertColonRule:function(e,t,n){return e.replace(t,function(e,t,r,o){if(t=O,r){for(var i,a=r.split(","),s=[],c=0,l=a.length;l>c&&(i=a[c]);c++)i=i.trim(),s.push(n(t,i,o));return s.join(",")}return t+o})},colonHostContextPartReplacer:function(e,t,n){return t.match(g)?this.colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},colonHostPartReplacer:function(e,t,n){return e+t.replace(g,"")+n},convertShadowDOMSelectors:function(e){for(var t=0;t<N.length;t++)e=e.replace(N[t]," ");return e},scopeRules:function(e,t){var n="";return e&&Array.prototype.forEach.call(e,function(e){if(e.selectorText&&e.style&&void 0!==e.style.cssText)n+=this.scopeSelector(e.selectorText,t,this.strictStyling)+" {\n	",n+=this.propertiesFromRule(e)+"\n}\n\n";else if(e.type===CSSRule.MEDIA_RULE)n+="@media "+e.media.mediaText+" {\n",n+=this.scopeRules(e.cssRules,t),n+="\n}\n\n";else try{e.cssText&&(n+=e.cssText+"\n\n")}catch(r){e.type===CSSRule.KEYFRAMES_RULE&&e.cssRules&&(n+=this.ieSafeCssTextFromKeyFrameRule(e))}},this),n},ieSafeCssTextFromKeyFrameRule:function(e){var t="@keyframes "+e.name+" {";return Array.prototype.forEach.call(e.cssRules,function(e){t+=" "+e.keyText+" {"+e.style.cssText+"}"}),t+=" }"},scopeSelector:function(e,t,n){var r=[],o=e.split(",");return o.forEach(function(e){e=e.trim(),this.selectorNeedsScoping(e,t)&&(e=n&&!e.match(O)?this.applyStrictSelectorScope(e,t):this.applySelectorScope(e,t)),r.push(e)},this),r.join(", ")},selectorNeedsScoping:function(e,t){if(Array.isArray(t))return!0;var n=this.makeScopeMatcher(t);return!e.match(n)},makeScopeMatcher:function(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")"+S,"m")},applySelectorScope:function(e,t){return Array.isArray(t)?this.applySelectorScopeList(e,t):this.applySimpleSelectorScope(e,t)},applySelectorScopeList:function(e,t){for(var n,r=[],o=0;n=t[o];o++)r.push(this.applySimpleSelectorScope(e,n));return r.join(", ")},applySimpleSelectorScope:function(e,t){return e.match(L)?(e=e.replace(O,t),e.replace(L,t+" ")):t+" "+e},applyStrictSelectorScope:function(e,t){t=t.replace(/\[is=([^\]]*)\]/g,"$1");var n=[" ",">","+","~"],r=e,o="["+t+"]";return n.forEach(function(e){var t=r.split(e);r=t.map(function(e){var t=e.trim().replace(L,"");return t&&n.indexOf(t)<0&&t.indexOf(o)<0&&(e=t.replace(/([^:]*)(:*)(.*)/,"$1"+o+"$2$3")),e}).join(e)}),r},insertPolyfillHostInCssText:function(e){return e.replace(M,b).replace(T,g)},propertiesFromRule:function(e){var t=e.style.cssText;e.style.content&&!e.style.content.match(/['"]+|attr/)&&(t=t.replace(/content:[^;]*;/g,"content: '"+e.style.content+"';"));var n=e.style;for(var r in n)"initial"===n[r]&&(t+=r+": initial; ");return t},replaceTextInStyles:function(e,t){e&&t&&(e instanceof Array||(e=[e]),Array.prototype.forEach.call(e,function(e){e.textContent=t.call(this,e.textContent)},this))},addCssToDocument:function(e,t){e.match("@import")?c(e,t):s(e)}},d=/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,p=/\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim,h=/polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,f=/\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,m=/(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,w=/\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim,v=/(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,g="-shadowcsshost",b="-shadowcsscontext",y=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",E=new RegExp("("+g+y,"gim"),_=new RegExp("("+b+y,"gim"),S="([>\\s~+[.,{:][\\s\\S]*)?$",T=/\:host/gim,M=/\:host-context/gim,O=g+"-no-combinator",L=new RegExp(g,"gim"),N=(new RegExp(b,"gim"),[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow\//g,/\/shadow-deep\//g,/\^\^/g,/\^/g]),C=document.createElement("iframe");C.style.display="none";var j,D=navigator.userAgent.match("Chrome"),H="shim-shadowdom",x="shim-shadowdom-css",R="no-shim";if(window.ShadowDOMPolyfill){s("style { display: none !important; }\n");var I=ShadowDOMPolyfill.wrap(document),P=I.querySelector("head");P.insertBefore(l(),P.childNodes[0]),document.addEventListener("DOMContentLoaded",function(){e.urlResolver;if(window.HTMLImports&&!HTMLImports.useNative){var t="link[rel=stylesheet]["+H+"]",n="style["+H+"]";HTMLImports.importer.documentPreloadSelectors+=","+t,HTMLImports.importer.importsPreloadSelectors+=","+t,HTMLImports.parser.documentSelectors=[HTMLImports.parser.documentSelectors,t,n].join(",");var r=HTMLImports.parser.parseGeneric;HTMLImports.parser.parseGeneric=function(e){if(!e[x]){var t=e.__importElement||e;if(!t.hasAttribute(H))return void r.call(this,e);e.__resource&&(t=e.ownerDocument.createElement("style"),t.textContent=e.__resource),HTMLImports.path.resolveUrlsInStyle(t,e.href),t.textContent=u.shimStyle(t),t.removeAttribute(H,""),t.setAttribute(x,""),t[x]=!0,t.parentNode!==P&&(e.parentNode===P?P.replaceChild(t,e):this.addElementToDocument(t)),t.__importParsed=!0,this.markParsingComplete(e),this.parseNext()}};var o=HTMLImports.parser.hasResource;HTMLImports.parser.hasResource=function(e){return"link"===e.localName&&"stylesheet"===e.rel&&e.hasAttribute(H)?e.__resource:o.call(this,e)}}})}e.ShadowCSS=u}(window.WebComponents)),function(e){window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}}(window.WebComponents),function(e){"use strict";function t(e){return void 0!==p[e]}function n(){s.call(this),this._isInvalid=!0}function r(e){return""==e&&n.call(this),e.toLowerCase()}function o(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function i(e){var t=e.charCodeAt(0);return t>32&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function a(e,a,s){function c(e){b.push(e)}var l=a||"scheme start",u=0,d="",v=!1,g=!1,b=[];e:for(;(e[u-1]!=f||0==u)&&!this._isInvalid;){var y=e[u];switch(l){case"scheme start":if(!y||!m.test(y)){if(a){c("Invalid scheme.");break e}d="",l="no scheme";continue}d+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&w.test(y))d+=y.toLowerCase();else{if(":"!=y){if(a){if(f==y)break e;c("Code point not allowed in scheme: "+y);break e}d="",u=0,l="no scheme";continue}if(this._scheme=d,d="",a)break e;t(this._scheme)&&(this._isRelative=!0),l="file"==this._scheme?"relative":this._isRelative&&s&&s._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this._query="?",l="query"):"#"==y?(this._fragment="#",l="fragment"):f!=y&&"	"!=y&&"\n"!=y&&"\r"!=y&&(this._schemeData+=o(y));break;case"no scheme":if(s&&t(s._scheme)){l="relative";continue}c("Missing scheme."),n.call(this);break;case"relative or authority":if("/"!=y||"/"!=e[u+1]){c("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=s._scheme),f==y){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"==y||"\\"==y)"\\"==y&&c("\\ is an invalid code point."),l="relative slash";else if("?"==y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,l="query";else{if("#"!=y){var E=e[u+1],_=e[u+2];("file"!=this._scheme||!m.test(y)||":"!=E&&"|"!=E||f!=_&&"/"!=_&&"\\"!=_&&"?"!=_&&"#"!=_)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),l="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),l="relative path";continue}"\\"==y&&c("\\ is an invalid code point."),l="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){c("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){c("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}c("Expected authority, got: "+y);break;case"authority":if("@"==y){v&&(c("@ already seen."),d+="%40"),v=!0;for(var S=0;S<d.length;S++){var T=d[S];if("	"!=T&&"\n"!=T&&"\r"!=T)if(":"!=T||null!==this._password){var M=o(T);null!==this._password?this._password+=M:this._username+=M}else this._password="";else c("Invalid whitespace in authority.")}d=""}else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){u-=d.length,d="",l="host";continue}d+=y}break;case"file host":if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){2!=d.length||!m.test(d[0])||":"!=d[1]&&"|"!=d[1]?0==d.length?l="relative path start":(this._host=r.call(this,d),d="",l="relative path start"):l="relative path";continue}"	"==y||"\n"==y||"\r"==y?c("Invalid whitespace in file host."):d+=y;break;case"host":case"hostname":if(":"!=y||g){if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y){if(this._host=r.call(this,d),d="",l="relative path start",a)break e;continue}"	"!=y&&"\n"!=y&&"\r"!=y?("["==y?g=!0:"]"==y&&(g=!1),d+=y):c("Invalid code point in host/hostname: "+y)}else if(this._host=r.call(this,d),d="",l="port","hostname"==a)break e;break;case"port":if(/[0-9]/.test(y))d+=y;else{if(f==y||"/"==y||"\\"==y||"?"==y||"#"==y||a){if(""!=d){var O=parseInt(d,10);O!=p[this._scheme]&&(this._port=O+""),d=""}if(a)break e;l="relative path start";continue}"	"==y||"\n"==y||"\r"==y?c("Invalid code point in port: "+y):n.call(this)}break;case"relative path start":if("\\"==y&&c("'\\' not allowed in path."),l="relative path","/"!=y&&"\\"!=y)continue;break;case"relative path":if(f!=y&&"/"!=y&&"\\"!=y&&(a||"?"!=y&&"#"!=y))"	"!=y&&"\n"!=y&&"\r"!=y&&(d+=o(y));else{"\\"==y&&c("\\ not allowed in relative path.");var L;(L=h[d.toLowerCase()])&&(d=L),".."==d?(this._path.pop(),"/"!=y&&"\\"!=y&&this._path.push("")):"."==d&&"/"!=y&&"\\"!=y?this._path.push(""):"."!=d&&("file"==this._scheme&&0==this._path.length&&2==d.length&&m.test(d[0])&&"|"==d[1]&&(d=d[0]+":"),this._path.push(d)),d="","?"==y?(this._query="?",l="query"):"#"==y&&(this._fragment="#",l="fragment")}break;case"query":a||"#"!=y?f!=y&&"	"!=y&&"\n"!=y&&"\r"!=y&&(this._query+=i(y)):(this._fragment="#",l="fragment");break;case"fragment":f!=y&&"	"!=y&&"\n"!=y&&"\r"!=y&&(this._fragment+=y)}u++}}function s(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function c(e,t){void 0===t||t instanceof c||(t=new c(String(t))),this._url=e,s.call(this);var n=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");a.call(this,n,null,t)}var l=!1;if(!e.forceJURL)try{var u=new URL("b","http://a");u.pathname="c%20d",l="http://a/c%20d"===u.href}catch(d){}if(!l){var p=Object.create(null);p.ftp=21,p.file=0,p.gopher=70,p.http=80,p.https=443,p.ws=80,p.wss=443;var h=Object.create(null);h["%2e"]=".",h[".%2e"]="..",h["%2e."]="..",h["%2e%2e"]="..";var f=void 0,m=/[a-zA-Z]/,w=/[a-zA-Z0-9\+\-\.]/;c.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return(""!=this._username||null!=this._password)&&(e=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){s.call(this),a.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||a.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&a.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],a.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"==e[0]&&(e=e.slice(1)),a.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"==e[0]&&(e=e.slice(1)),a.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return e=this.host,e?this._scheme+"://"+e:""}};var v=e.URL;v&&(c.createObjectURL=function(e){return v.createObjectURL.apply(v,arguments)},c.revokeObjectURL=function(e){v.revokeObjectURL(e)}),e.URL=c}}(self),function(e){function t(e){y.push(e),b||(b=!0,m(r))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function r(){b=!1;var e=y;y=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();o(e),n.length&&(e.callback_(n,e),t=!0)}),t&&r()}function o(e){e.nodes_.forEach(function(t){var n=w.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var r=w.get(n);if(r)for(var o=0;o<r.length;o++){var i=r[o],a=i.options;if(n===e||a.subtree){var s=t(a);s&&i.enqueue(s)}}}}function a(e){this.callback_=e,this.nodes_=[],this.records_=[],this.uid_=++E}function s(e,t){this.type=e,this.target=t,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function c(e){var t=new s(e.type,e.target);return t.addedNodes=e.addedNodes.slice(),t.removedNodes=e.removedNodes.slice(),t.previousSibling=e.previousSibling,t.nextSibling=e.nextSibling,t.attributeName=e.attributeName,t.attributeNamespace=e.attributeNamespace,t.oldValue=e.oldValue,t}function l(e,t){return _=new s(e,t)}function u(e){return S?S:(S=c(_),S.oldValue=e,S)}function d(){_=S=void 0}function p(e){return e===S||e===_}function h(e,t){return e===t?e:S&&p(e)?S:null}function f(e,t,n){this.observer=e,this.target=t,this.options=n,this.transientObservedNodes=[]}if(!e.JsMutationObserver){var m,w=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var v=[],g=String(Math.random());window.addEventListener("message",function(e){if(e.data===g){var t=v;v=[],t.forEach(function(e){e()})}}),m=function(e){v.push(e),window.postMessage(g,"*")}}var b=!1,y=[],E=0;a.prototype={observe:function(e,t){if(e=n(e),!t.childList&&!t.attributes&&!t.characterData||t.attributeOldValue&&!t.attributes||t.attributeFilter&&t.attributeFilter.length&&!t.attributes||t.characterDataOldValue&&!t.characterData)throw new SyntaxError;var r=w.get(e);r||w.set(e,r=[]);for(var o,i=0;i<r.length;i++)if(r[i].observer===this){o=r[i],o.removeListeners(),o.options=t;break}o||(o=new f(this,e,t),r.push(o),this.nodes_.push(e)),o.addListeners()},disconnect:function(){this.nodes_.forEach(function(e){for(var t=w.get(e),n=0;n<t.length;n++){var r=t[n];if(r.observer===this){r.removeListeners(),t.splice(n,1);break}}},this),this.records_=[]},takeRecords:function(){var e=this.records_;return this.records_=[],e}};var _,S;f.prototype={enqueue:function(e){var n=this.observer.records_,r=n.length;if(n.length>0){var o=n[r-1],i=h(o,e);if(i)return void(n[r-1]=i)}else t(this.observer);n[r]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=w.get(e);t||w.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=w.get(e),n=0;n<t.length;n++)if(t[n]===this){t.splice(n,1);break}},this)},handleEvent:function(e){switch(e.stopImmediatePropagation(),e.type){case"DOMAttrModified":var t=e.attrName,n=e.relatedNode.namespaceURI,r=e.target,o=new l("attributes",r);o.attributeName=t,o.attributeNamespace=n;var a=e.attrChange===MutationEvent.ADDITION?null:e.prevValue;i(r,function(e){return!e.attributes||e.attributeFilter&&e.attributeFilter.length&&-1===e.attributeFilter.indexOf(t)&&-1===e.attributeFilter.indexOf(n)?void 0:e.attributeOldValue?u(a):o});break;case"DOMCharacterDataModified":var r=e.target,o=l("characterData",r),a=e.prevValue;i(r,function(e){return e.characterData?e.characterDataOldValue?u(a):o:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(e.target);case"DOMNodeInserted":var s,c,p=e.target;"DOMNodeInserted"===e.type?(s=[p],c=[]):(s=[],c=[p]);var h=p.previousSibling,f=p.nextSibling,o=l("childList",e.target.parentNode);o.addedNodes=s,o.removedNodes=c,o.previousSibling=h,o.nextSibling=f,i(e.relatedNode,function(e){return e.childList?o:void 0})}d()}},e.JsMutationObserver=a,e.MutationObserver||(e.MutationObserver=a,a._isPolyfilled=!0)}}(self),function(e){"use strict";if(!window.performance){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var e=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return e?function(t){return e(function(){t(performance.now())})}:function(e){return window.setTimeout(e,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}}());var n=function(){var e=document.createEvent("Event");return e.initEvent("foo",!0,!0),e.preventDefault(),e.defaultPrevented}();if(!n){var r=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(r.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var o=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||o&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.Event||o&&"function"!=typeof window.Event){var i=window.Event;window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,Boolean(t.bubbles),Boolean(t.cancelable)),n},window.Event.prototype=i.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||f,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===v}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===v)&&(t.removeEventListener(g,o),r(e,t))};t.addEventListener(g,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){c==l&&e&&e({allImports:s,loadedImports:u,errorImports:d})}function r(e){o(e),u.push(this),c++,n()}function i(e){d.push(this),c++,n()}var s=t.querySelectorAll("link[rel=import]"),c=0,l=s.length,u=[],d=[];
+if(l)for(var p,h=0;l>h&&(p=s[h]);h++)a(p)?(u.push(this),c++,n()):(p.addEventListener("load",r),p.addEventListener("error",i));else n()}function a(e){return d?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&l(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function l(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var u="import",d=Boolean(u in document.createElement("link")),p=Boolean(window.ShadowDOMPolyfill),h=function(e){return p?window.ShadowDOMPolyfill.wrapIfNeeded(e):e},f=h(document),m={get:function(){var e=window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return h(e)},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(f,"_currentScript",m);var w=/Trident/.test(navigator.userAgent),v=w?"complete":"interactive",g="readystatechange";d&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)l(e)}()),t(function(e){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var t=f.createEvent("CustomEvent");t.initCustomEvent("HTMLImportsLoaded",!0,!0,e),f.dispatchEvent(t)}),e.IMPORT_LINK_TYPE=u,e.useNative=d,e.rootDocument=f,e.whenReady=t,e.isIE=w}(window.HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(window.HTMLImports),window.HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e,t){var n=e.ownerDocument,r=n.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,t,r),e},resolveUrlsInCssText:function(e,r,o){var i=this.replaceUrls(e,o,r,t);return i=this.replaceUrls(i,o,r,n)},replaceUrls:function(e,t,n,r){return e.replace(r,function(e,r,o,i){var a=o.replace(/["']/g,"");return n&&(a=new URL(a,n).href),t.href=a,a=t.href,r+"'"+a+"'"+i})}};e.path=r}),window.HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(e){if(4===i.readyState){var n=null;try{var a=i.getResponseHeader("Location");a&&(n="/"===a.substr(0,1)?location.origin+a:a)}catch(e){console.error(e.message)}r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),window.HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),window.HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),window.HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,l=e.isIE,u=e.IMPORT_LINK_TYPE,d="link[rel="+u+"]",p={documentSelectors:d,importsSelectors:[d,"link[rel=stylesheet]:not([type])","style:not([type])","script:not([type])",'script[type="application/javascript"]','script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(e["import"]=e.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.__resource&&!e.__error?e.dispatchEvent(new CustomEvent("load",{bubbles:!1})):e.dispatchEvent(new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),t.__appliedElement=e,e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(o){e.removeEventListener("load",r),e.removeEventListener("error",r),t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),l&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&setTimeout(function(){e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(t){r.parentNode&&r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r.__doc,r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e.__doc?!1:!0}};e.parser=p,e.IMPORT_SELECTOR=d}),window.HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,l=e.Loader,u=e.Observer,d=e.parser,p={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){h.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);h.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n.__doc=c}d.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),d.parseNext()},loadedAll:function(){d.parseNext()}},h=new l(p.loaded.bind(p),p.loadedAll.bind(p));if(p.observer=new u,!document.baseURI){var f={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",f),Object.defineProperty(c,"baseURI",f)}e.importer=p,e.importLoader=h}),window.HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){window.HTMLImports.importer.bootDocument(r)}var n=e.initializeModules;e.isIE;if(!e.useNative){n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],r=function(e){n.push(e)},o=function(){n.forEach(function(t){t(e)})};e.addModule=r,e.initializeModules=o,e.hasNative=Boolean(document.registerElement),e.isIE=/Trident/.test(navigator.userAgent),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void r(e,t)}),r(e,t)}function n(e,t,r){var o=e.firstElementChild;if(!o)for(o=e.firstChild;o&&o.nodeType!==Node.ELEMENT_NODE;)o=o.nextSibling;for(;o;)t(o,r)!==!0&&n(o,t,r),o=o.nextElementSibling;return null}function r(e,n){for(var r=e.shadowRoot;r;)t(r,n),r=r.olderShadowRoot}function o(e,t){i(e,t,[])}function i(e,t,n){if(e=window.wrap(e),!(n.indexOf(e)>=0)){n.push(e);for(var r,o=e.querySelectorAll("link[rel="+a+"]"),s=0,c=o.length;c>s&&(r=o[s]);s++)r["import"]&&i(r["import"],t,n);t(e)}}var a=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=o,e.forSubtree=t}),window.CustomElements.addModule(function(e){function t(e,t){return n(e,t)||r(e,t)}function n(t,n){return e.upgrade(t,n)?!0:void(n&&a(t))}function r(e,t){b(e,function(e){return n(e,t)?!0:void 0})}function o(e){S.push(e),_||(_=!0,setTimeout(i))}function i(){_=!1;for(var e,t=S,n=0,r=t.length;r>n&&(e=t[n]);n++)e();S=[]}function a(e){E?o(function(){s(e)}):s(e)}function s(e){e.__upgraded__&&!e.__attached&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){l(e),b(e,function(e){l(e)})}function l(e){E?o(function(){u(e)}):u(e)}function u(e){e.__upgraded__&&e.__attached&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function d(e){for(var t=e,n=window.wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){g.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)m(t),t=t.olderShadowRoot}}function h(e,n){if(g.dom){var r=n[0];if(r&&"childList"===r.type&&r.addedNodes&&r.addedNodes){for(var o=r.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var i=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";i=i.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",n.length,i||"")}var a=d(e);n.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e,a)}),T(e.removedNodes,function(e){e.localName&&c(e)}))}),g.dom&&console.groupEnd()}function f(e){for(e=window.wrap(e),e||(e=window.wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(h(e,t.takeRecords()),i())}function m(e){if(!e.__observer){var t=new MutationObserver(h.bind(this,e));t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function w(e){e=window.wrap(e),g.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop());var n=e===window.wrap(document);t(e,n),m(e),g.dom&&console.groupEnd()}function v(e){y(e,w)}var g=e.flags,b=e.forSubtree,y=e.forDocumentTree,E=window.MutationObserver._isPolyfilled&&g["throttle-attached"];e.hasPolyfillMutations=E,e.hasThrottledAttached=E;var _=!1,S=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),M=Element.prototype.createShadowRoot;M&&(Element.prototype.createShadowRoot=function(){var e=M.call(this);return window.CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=v,e.upgradeDocument=w,e.upgradeSubtree=r,e.upgradeAll=t,e.attached=a,e.takeRecords=f}),window.CustomElements.addModule(function(e){function t(t,r){if("template"===t.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t),!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),i=e.getRegisteredDefinition(t.localName)||e.getRegisteredDefinition(o);if(i&&(o&&i.tag==t.localName||!o&&!i["extends"]))return n(t,i,r)}}function n(t,n,o){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),r(t,n),t.__upgraded__=!0,i(t),o&&e.attached(t),e.upgradeSubtree(t,o),a.upgrade&&console.groupEnd(),t}function r(e,t){Object.__proto__?e.__proto__=t.prototype:(o(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function o(e,t,n){for(var r={},o=t;o!==n&&o!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(o),s=0;i=a[s];s++)r[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i)),r[i]=1);o=Object.getPrototypeOf(o)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=r}),window.CustomElements.addModule(function(e){function t(t,r){var c=r||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(o(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(l(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return c.prototype||(c.prototype=Object.create(HTMLElement.prototype)),c.__name=t.toLowerCase(),c.lifecycle=c.lifecycle||{},c.ancestry=i(c["extends"]),a(c),s(c),n(c.prototype),u(c.__name,c),c.ctor=d(c),c.ctor.prototype=c.prototype,c.prototype.constructor=c.ctor,e.ready&&v(document),c.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){r.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){r.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function r(e,t,n){e=e.toLowerCase();var r=this.getAttribute(e);n.apply(this,arguments);var o=this.getAttribute(e);this.attributeChangedCallback&&o!==r&&this.attributeChangedCallback(e,r,o)}function o(e){for(var t=0;t<_.length;t++)if(e===_[t])return!0}function i(e){var t=l(e);return t?i(t["extends"]).concat([t]):[]}function a(e){for(var t,n=e["extends"],r=0;t=e.ancestry[r];r++)n=t.is&&t.tag;e.tag=n||e.__name,n&&(e.is=e.__name)}function s(e){if(!Object.__proto__){var t=HTMLElement.prototype;if(e.is){var n=document.createElement(e.tag);t=Object.getPrototypeOf(n)}for(var r,o=e.prototype,i=!1;o;)o==t&&(i=!0),r=Object.getPrototypeOf(o),r&&(o.__proto__=r),o=r;i||console.warn(e.tag+" prototype not found in prototype chain for "+e.is),e["native"]=t}}function c(e){return b(M(e.tag),e)}function l(e){return e?S[e.toLowerCase()]:void 0}function u(e,t){S[e]=t}function d(e){return function(){return c(e)}}function p(e,t,n){return e===T?h(t,n):O(e,t)}function h(e,t){e&&(e=e.toLowerCase()),t&&(t=t.toLowerCase());var n=l(t||e);if(n){if(e==n.tag&&t==n.is)return new n.ctor;if(!t&&!n.is)return new n.ctor}var r;return t?(r=h(e),r.setAttribute("is",t),r):(r=M(e),e.indexOf("-")>=0&&y(r,HTMLElement),r)}function f(e,t){var n=e[t];e[t]=function(){var e=n.apply(this,arguments);return g(e),e}}var m,w=e.isIE,v=e.upgradeDocumentTree,g=e.upgradeAll,b=e.upgradeWithDefinition,y=e.implementPrototype,E=e.useNative,_=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],S={},T="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),O=document.createElementNS.bind(document);m=Object.__proto__||E?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},f(Node.prototype,"cloneNode"),f(document,"importNode"),w&&!function(){var e=document.importNode;document.importNode=function(){var t=e.apply(document,arguments);if(t.nodeType==t.DOCUMENT_FRAGMENT_NODE){var n=document.createDocumentFragment();return n.appendChild(t),n}return t}}(),document.registerElement=t,document.createElement=h,document.createElementNS=p,e.registry=S,e["instanceof"]=m,e.reservedTagList=_,e.getRegisteredDefinition=l,document.register=document.registerElement}),function(e){function t(){i(window.wrap(document)),window.CustomElements.ready=!0;var e=window.requestAnimationFrame||function(e){setTimeout(e,16)};e(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var n=e.useNative,r=e.initializeModules;e.isIE;if(n){var o=function(){};e.watchShadow=o,e.upgrade=o,e.upgradeAll=o,e.upgradeDocumentTree=o,e.upgradeSubtree=o,e.takeRecords=o,e["instanceof"]=function(e,t){return e instanceof t}}else r();var i=e.upgradeDocumentTree,a=e.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(e){e["import"]&&a(wrap(e["import"]))}),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),function(e){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice.call(arguments,1);return function(){var r=n.slice();return r.push.apply(r,arguments),t.apply(e,r)}})}(window.WebComponents),function(e){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var n=document.querySelector("head");n.insertBefore(t,n.firstChild)}(window.WebComponents),function(e){window.Platform=e}(window.WebComponents);
\ No newline at end of file
diff --git a/packages/web_components/pubspec.yaml b/packages/web_components/pubspec.yaml
index 145ea88..c333213 100644
--- a/packages/web_components/pubspec.yaml
+++ b/packages/web_components/pubspec.yaml
@@ -1,7 +1,7 @@
 name: web_components
-version: 0.11.4+2
+version: 0.12.3
 author: Polymer.dart Authors <web-ui-dev@dartlang.org>
-homepage: https://www.dartlang.org/polymer-dart/
+homepage: https://github.com/dart-lang/web-components/
 description: >
   Polyfills for Shadow DOM, Custom Elements, and HTML Imports.
   Custom Elements let authors define their own elements. Authors associate code
@@ -10,14 +10,15 @@
   elements, by hiding DOM subtrees under shadow roots. HTML Imports let authors
   bundle code and HTML as if they were libraries.
 dependencies:
-  analyzer: '>=0.22.4 <0.26.0'
+  analyzer: '^0.27.0'
   barback: '>=0.14.2 <0.16.0'
-  code_transformers: '^0.2.7'
+  code_transformers: '>=0.3.0 <0.5.0'
   html: '^0.12.0'
   initialize: '^0.6.0'
   path: '^1.3.0'
 dev_dependencies:
-  unittest: '^0.11.0'
+  test: '^0.12.0'
+  transformer_test: '^0.2.0'
   browser: '^0.10.0'
 transformers:
 - web_components/build/mirrors_remover:
@@ -29,6 +30,8 @@
       - test/custom_element_proxy_test.html
       - test/html_import_annotation_test.html
       - test/init_web_components_test.html
+- test/pub_serve:
+    $include: test/**_test{.*,}.dart
 
 environment:
   sdk: ">=1.9.0-dev.7.1 <2.0.0"
diff --git a/packages/web_components/test/build/html_import_annotation_recorder_test.dart b/packages/web_components/test/build/html_import_annotation_recorder_test.dart
index a6e832c..341f3a1 100644
--- a/packages/web_components/test/build/html_import_annotation_recorder_test.dart
+++ b/packages/web_components/test/build/html_import_annotation_recorder_test.dart
@@ -1,13 +1,13 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.html_import_annotation_recorder_test;
 
-import 'package:code_transformers/tests.dart' hide testPhases;
+import 'package:transformer_test/utils.dart' hide testPhases;
 import 'package:web_components/build/html_import_annotation_recorder.dart';
 import 'package:initialize/transformer.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'common.dart';
 
 testPhases(String name, Map<String, String> inputs,
@@ -18,7 +18,9 @@
 
   test(name, () {
     // Run the transformer and test the output.
-    return applyTransformers([[transformer]],
+    return applyTransformers([
+      [transformer]
+    ],
         inputs: inputs,
         results: expected,
         formatter: StringFormatter.noNewlinesOrSurroundingWhitespace).then((_) {
@@ -29,8 +31,6 @@
 }
 
 main() {
-  useCompactVMConfiguration();
-
   testPhases('basic', {
     'a|web/index.dart': '''
         @HtmlImport('index.html')
diff --git a/packages/web_components/test/build/import_crawler_test.dart b/packages/web_components/test/build/import_crawler_test.dart
index 50d6d80..b82a2f0 100644
--- a/packages/web_components/test/build/import_crawler_test.dart
+++ b/packages/web_components/test/build/import_crawler_test.dart
@@ -1,16 +1,17 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.import_crawler_test;
 
 import 'dart:async';
 import 'package:barback/barback.dart';
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:code_transformers/messages/build_logger.dart';
 import 'package:html/dom.dart' show Document;
 import 'package:web_components/build/common.dart';
 import 'package:web_components/build/import_crawler.dart';
-import 'package:unittest/compact_vm_config.dart';
+import 'package:test/test.dart';
 
 class _TestTransformer extends Transformer {
   final String _entryPoint;
@@ -48,70 +49,91 @@
 }
 
 main() {
-  useCompactVMConfiguration();
-  runTests([[new _TestTransformer('web/index.html')]]);
+  runTests([
+    [new _TestTransformer('web/index.html')]
+  ]);
   // Test with a preparsed original document as well.
-  runTests([[new _TestTransformer('web/index.html', true)]]);
+  runTests([
+    [new _TestTransformer('web/index.html', true)]
+  ]);
 }
 
 runTests(List<List<Transformer>> phases) {
-  testPhases('basic', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'basic',
+      phases,
+      {
+        'a|web/index.html': '''
       <link rel="import" href="foo.html">
       <link rel="import" href="packages/a/foo.html">
       <link rel="import" href="packages/b/foo.html">
       <link rel="import" href="packages/b/foo/bar.html">
       <div>a|web/index.html</div>
       ''',
-    'a|web/foo.html': '<div>a|web/foo.html</div>',
-    'a|lib/foo.html': '<div>a|lib/foo.html</div>',
-    'b|lib/foo.html': '''
+        'a|web/foo.html': '<div>a|web/foo.html</div>',
+        'a|lib/foo.html': '<div>a|lib/foo.html</div>',
+        'b|lib/foo.html': '''
       <link rel="import" href="foo/bar.html">
       <div>b|lib/foo.html</div>
       ''',
-    'b|lib/foo/bar.html': '<div>b|lib/foo/bar.html</div>',
-  }, {
-    'a|web/result.txt': '''
+        'b|lib/foo/bar.html': '<div>b|lib/foo/bar.html</div>',
+      },
+      {
+        'a|web/result.txt': '''
       (a|web/foo.html, a|lib/foo.html, b|lib/foo/bar.html, b|lib/foo.html, a|web/index.html)
       ''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('cycle', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'cycle',
+      phases,
+      {
+        'a|web/index.html': '''
       <link rel="import" href="packages/a/foo.html">
       <div>a|web/index.html</div>
       ''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
       <link rel="import" href="bar.html">
       <div>a|lib/foo.html</div>''',
-    'a|lib/bar.html': '''
+        'a|lib/bar.html': '''
       <link rel="import" href="foo.html">
       <div>a|lib/bar.html</div>''',
-  }, {
-    'a|web/result.txt': '''
+      },
+      {
+        'a|web/result.txt': '''
       (a|lib/bar.html, a|lib/foo.html, a|web/index.html)
       ''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('deep imports', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'deep imports',
+      phases,
+      {
+        'a|web/index.html': '''
       <link rel="import" href="packages/a/foo.html">
       <div>a|web/index.html</div>
       ''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
       <link rel="import" href="one/bar.html">
       <div>a|lib/foo.html</div>''',
-    'a|lib/one/bar.html': '''
+        'a|lib/one/bar.html': '''
       <link rel="import" href="two/baz.html">
       <div>a|lib/one/bar.html</div>''',
-    'a|lib/one/two/baz.html': '''
+        'a|lib/one/two/baz.html': '''
       <link rel="import" href="three/zap.html">
       <div>a|lib/one/two/baz.html</div>''',
-    'a|lib/one/two/three/zap.html': '''
+        'a|lib/one/two/three/zap.html': '''
       <div>a|lib/one/two/three/zap.html</div>''',
-  }, {
-    'a|web/result.txt':
-        '(a|lib/one/two/three/zap.html, a|lib/one/two/baz.html, '
-        'a|lib/one/bar.html, a|lib/foo.html, a|web/index.html)',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      {
+        'a|web/result.txt':
+            '(a|lib/one/two/three/zap.html, a|lib/one/two/baz.html, '
+            'a|lib/one/bar.html, a|lib/foo.html, a|web/index.html)',
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
diff --git a/packages/web_components/test/build/import_inliner_test.dart b/packages/web_components/test/build/import_inliner_test.dart
index f0dbef6..94eb40f 100644
--- a/packages/web_components/test/build/import_inliner_test.dart
+++ b/packages/web_components/test/build/import_inliner_test.dart
@@ -1,47 +1,58 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.import_inliner_test;
 
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:web_components/build/import_inliner.dart';
 import 'package:web_components/build/messages.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 var transformer = new ImportInlinerTransformer(null, ['{{', '[[']);
-var phases = [[transformer]];
+var phases = [
+  [transformer]
+];
 
 main() {
-  useCompactVMConfiguration();
-
   group('rel=import', importTests);
   group('url attributes', urlAttributeTests);
   group('deep entrypoints', entryPointTests);
+  // group('templates', templateTests);
 }
 
 void importTests() {
-  testPhases('no imports', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'no imports',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head></head><body></body></html>''',
-  }, {
-    'a|web/index.html': '''
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head></head><body></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('one import, removes dart script', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'one import, removes dart script',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head><link rel="import" href="packages/a/foo.html"></head>
           <body></body>
         </html>''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
         <div>hello from foo!</div>
         <script type="application/dart" src="foo.dart"></script>
         ''',
-  }, {
-    'a|web/index.html': '''
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head></head>
@@ -51,22 +62,28 @@
             </div>
           </body>
         </html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('preserves order of scripts', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'preserves order of scripts',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head>
         <script type="text/javascript">/*first*/</script>
         <script src="second.js"></script>
         <link rel="import" href="packages/a/foo.html">
         <script>/*forth*/</script>
         </head></html>''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
         <!DOCTYPE html><html><head><script>/*third*/</script>
         </head><body><polymer-element>2</polymer-element></html>''',
-    'a|web/second.js': '/*second*/'
-  }, {
-    'a|web/index.html': '''
+        'a|web/second.js': '/*second*/'
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head>
         <script type="text/javascript">/*first*/</script>
         <script src="second.js"></script>
@@ -77,10 +94,15 @@
         <script>/*forth*/</script>
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('preserves order of scripts, extract Dart scripts', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'preserves order of scripts, extract Dart scripts',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -90,7 +112,7 @@
             <script type="application/dart">/*fifth*/</script>
           </head>
         </html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -101,9 +123,10 @@
             <polymer-element>2</polymer-element>
           </body>
         </html>''',
-    'a|web/second.js': '/*second*/'
-  }, {
-    'a|web/index.html': '''
+        'a|web/second.js': '/*second*/'
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -118,7 +141,7 @@
             </div>
           </body>
         </html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -129,40 +152,52 @@
             <polymer-element>2</polymer-element>
           </body>
         </html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('no transformation outside web/', phases, {
-    'a|lib/test.html': '''
+  testPhases(
+      'no transformation outside web/',
+      phases,
+      {
+        'a|lib/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test2.html">
         </head></html>''',
-    'a|lib/test2.html': '''
+        'a|lib/test2.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>2</polymer-element></html>''',
-  }, {
-    'a|lib/test.html': '''
+      },
+      {
+        'a|lib/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test2.html">
         </head></html>''',
-    'a|lib/test2.html': '''
+        'a|lib/test2.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>2</polymer-element></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('shallow, elements, many', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'shallow, elements, many',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test2.html">
         <link rel="import" href="test3.html">
         </head></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>2</polymer-element></html>''',
-    'a|web/test3.html': '''
+        'a|web/test3.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>3</polymer-element></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -170,32 +205,38 @@
         <polymer-element>3</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>2</polymer-element></html>''',
-    'a|web/test3.html': '''
+        'a|web/test3.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>3</polymer-element></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('deep, elements, one per file', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'deep, elements, one per file',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test2.html">
         </head></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="assets/b/test3.html">
         </head><body><polymer-element>2</polymer-element></html>''',
-    'b|asset/test3.html': '''
+        'b|asset/test3.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="../../packages/c/test4.html">
         </head><body><polymer-element>3</polymer-element></html>''',
-    'c|lib/test4.html': '''
+        'c|lib/test4.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>4</polymer-element></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -204,7 +245,7 @@
         <polymer-element>2</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -213,45 +254,51 @@
         </div>
         <polymer-element>2</polymer-element>
         </body></html>''',
-    'b|asset/test3.html': '''
+        'b|asset/test3.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="../../packages/c/test4.html">
         </head><body><polymer-element>3</polymer-element></html>''',
-    'c|lib/test4.html': '''
+        'c|lib/test4.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>4</polymer-element></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('deep, elements, many imports', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'deep, elements, many imports',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test2a.html">
         <link rel="import" href="test2b.html">
         </head></html>''',
-    'a|web/test2a.html': '''
+        'a|web/test2a.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test3a.html">
         <link rel="import" href="test3b.html">
         </head><body><polymer-element>2a</polymer-element></body></html>''',
-    'a|web/test2b.html': '''
+        'a|web/test2b.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test4a.html">
         <link rel="import" href="test4b.html">
         </head><body><polymer-element>2b</polymer-element></body></html>''',
-    'a|web/test3a.html': '''
+        'a|web/test3a.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>3a</polymer-element></body></html>''',
-    'a|web/test3b.html': '''
+        'a|web/test3b.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>3b</polymer-element></body></html>''',
-    'a|web/test4a.html': '''
+        'a|web/test4a.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>4a</polymer-element></body></html>''',
-    'a|web/test4b.html': '''
+        'a|web/test4b.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>4b</polymer-element></body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -263,7 +310,7 @@
         <polymer-element>2b</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test2a.html': '''
+        'a|web/test2a.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -272,7 +319,7 @@
         </div>
         <polymer-element>2a</polymer-element>
         </body></html>''',
-    'a|web/test2b.html': '''
+        'a|web/test2b.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -281,43 +328,49 @@
         </div>
         <polymer-element>2b</polymer-element>
         </body></html>''',
-    'a|web/test3a.html': '''
+        'a|web/test3a.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>3a</polymer-element>
         </body></html>''',
-    'a|web/test3b.html': '''
+        'a|web/test3b.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>3b</polymer-element>
         </body></html>''',
-    'a|web/test4a.html': '''
+        'a|web/test4a.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>4a</polymer-element>
         </body></html>''',
-    'a|web/test4b.html': '''
+        'a|web/test4b.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>4b</polymer-element>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports cycle, 1-step lasso', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports cycle, 1-step lasso',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_2.html">
         </head><body><polymer-element>1</polymer-element></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body><polymer-element>2</polymer-element></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -325,39 +378,45 @@
         <polymer-element>1</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
         <polymer-element>2</polymer-element>
         </div>
         <polymer-element>1</polymer-element></body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
         <polymer-element>1</polymer-element>
         </div>
         <polymer-element>2</polymer-element></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports cycle, 1-step lasso, scripts too', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports cycle, 1-step lasso, scripts too',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_2.html">
         </head><body><polymer-element>1</polymer-element>
         <script src="s1"></script></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body><polymer-element>2</polymer-element>
         <script src="s2"></script></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -367,7 +426,7 @@
         <script src="s1"></script>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -376,7 +435,7 @@
         </div>
         <polymer-element>1</polymer-element>
         <script src="s1"></script></body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -385,30 +444,36 @@
         </div>
         <polymer-element>2</polymer-element>
         <script src="s2"></script></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports cycle, 1-step lasso, Dart scripts too', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports cycle, 1-step lasso, Dart scripts too',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_2.html">
         </head><body><polymer-element>1</polymer-element>
         <script type="application/dart" src="s1.dart"></script>
         </html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body><polymer-element>2
         <script type="application/dart" src="s2.dart"></script>
         </polymer-element>
         </html>''',
-    'a|web/s1.dart': '',
-    'a|web/s2.dart': '',
-  }, {
-    'a|web/test.html': '''
+        'a|web/s1.dart': '',
+        'a|web/s2.dart': '',
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -416,7 +481,7 @@
         <polymer-element>1</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -425,7 +490,7 @@
         <polymer-element>1</polymer-element>
         <script type="application/dart" src="s1.dart"></script>
         </body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -435,14 +500,19 @@
         <script type="application/dart" src="s2.dart"></script>
         </polymer-element>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports with Dart script after JS script', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports with Dart script after JS script',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body>
@@ -452,9 +522,10 @@
         <script type="application/dart" src="s1.dart"></script>
         </polymer-element>
         'FOO'</body></html>''',
-    'a|web/s1.dart': '',
-  }, {
-    'a|web/test.html': '''
+        'a|web/s1.dart': '',
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -465,7 +536,7 @@
         'FOO'
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <foo>42</foo><bar-baz></bar-baz>
@@ -474,27 +545,33 @@
         <script type="application/dart" src="s1.dart"></script>
         </polymer-element>
         'FOO'</body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports cycle, 2-step lasso', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports cycle, 2-step lasso',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_2.html">
         </head><body><polymer-element>1</polymer-element></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_3.html">
         </head><body><polymer-element>2</polymer-element></html>''',
-    'a|web/test_3.html': '''
+        'a|web/test_3.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body><polymer-element>3</polymer-element></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -503,7 +580,7 @@
         <polymer-element>1</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -511,7 +588,7 @@
         <polymer-element>2</polymer-element>
         </div>
         <polymer-element>1</polymer-element></body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -519,7 +596,7 @@
         <polymer-element>3</polymer-element>
         </div>
         <polymer-element>2</polymer-element></body></html>''',
-    'a|web/test_3.html': '''
+        'a|web/test_3.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -527,50 +604,62 @@
         <polymer-element>1</polymer-element>
         </div>
         <polymer-element>3</polymer-element></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports cycle, self cycle', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports cycle, self cycle',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         </head><body><polymer-element>1</polymer-element></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
         <polymer-element>1</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>1</polymer-element></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports DAG', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'imports DAG',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_1.html">
         <link rel="import" href="test_2.html">
         </head></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_3.html">
         </head><body><polymer-element>1</polymer-element></body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="test_3.html">
         </head><body><polymer-element>2</polymer-element></body></html>''',
-    'a|web/test_3.html': '''
+        'a|web/test_3.html': '''
         <!DOCTYPE html><html><head>
         </head><body><polymer-element>3</polymer-element></body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
@@ -579,254 +668,390 @@
         <polymer-element>2</polymer-element>
         </div>
         </body></html>''',
-    'a|web/test_1.html': '''
+        'a|web/test_1.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
         <polymer-element>3</polymer-element>
         </div>
         <polymer-element>1</polymer-element></body></html>''',
-    'a|web/test_2.html': '''
+        'a|web/test_2.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <div hidden="">
         <polymer-element>3</polymer-element>
         </div>
         <polymer-element>2</polymer-element></body></html>''',
-    'a|web/test_3.html': '''
+        'a|web/test_3.html': '''
         <!DOCTYPE html><html><head>
         </head><body>
         <polymer-element>3</polymer-element></body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('missing html imports throw errors', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'missing html imports throw errors',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="foo.html">
         </head></html>''',
-  }, {}, [
-    'warning: ${inlineImportFail.create({
+      },
+      {},
+      messages: [
+        'warning: ${inlineImportFail.create({
           'error': 'Could not find asset a|web/foo.html.'
       }).snippet} '
-        '(web/test.html 1 8)',
-  ], StringFormatter.noNewlinesOrSurroundingWhitespace);
+            '(web/test.html 1 8)',
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('absolute uri', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'absolute uri',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="stylesheet" href="/foo.css">
         </head></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
-        <link rel="stylesheet" href="http://example.com/bar.css">
+        <link rel="stylesheet" href="http:example.com/bar.css">
         </head></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="stylesheet" href="/foo.css">
         </head></html>''',
-    'a|web/test2.html': '''
+        'a|web/test2.html': '''
         <!DOCTYPE html><html><head>
-        <link rel="stylesheet" href="http://example.com/bar.css">
+        <link rel="stylesheet" href="http:example.com/bar.css">
         </head></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
 
 void urlAttributeTests() {
-  testPhases('url attributes are normalized', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'url attributes are normalized',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="foo/test_1.html">
         <link rel="import" href="foo/test_2.html">
         </head></html>''',
-    'a|web/foo/test_1.html': '''
+        'a|web/foo/test_1.html': '''
         <script src="baz.jpg"></script>''',
-    'a|web/foo/test_2.html': '''
+        'a|web/foo/test_2.html': '''
         <foo-element src="baz.jpg"></foo-element>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <script src="foo/baz.jpg"></script>
         <foo-element src="baz.jpg"></foo-element>
         </div>
         </body></html>''',
-    'a|web/foo/test_1.html': '''
+        'a|web/foo/test_1.html': '''
         <script src="baz.jpg"></script>''',
-    'a|web/foo/test_2.html': '''
+        'a|web/foo/test_2.html': '''
         <foo-element src="baz.jpg"></foo-element>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('paths with an invalid prefix are not normalized', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'paths with an invalid prefix are not normalized',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="packages/a/test.html">
         </head></html>''',
-    'a|lib/test.html': '''
+        'a|lib/test.html': '''
         <img src="[[bar]]">''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <img src="[[bar]]">
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('relative paths followed by invalid characters are normalized',
-      phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'relative paths followed by invalid characters are normalized',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="foo/test.html">
         </head></html>''',
-    'a|web/foo/test.html': '''
+        'a|web/foo/test.html': '''
         <img src="baz/{{bar}}">
         <img src="./{{bar}}">''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <img src="foo/baz/{{bar}}">
         <img src="foo/{{bar}}">
         </div>
         </body></html>''',
-  }, null, StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('relative paths in _* attributes are normalized', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'relative paths in _* attributes are normalized',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="foo/test.html">
         </head></html>''',
-    'a|web/foo/test.html': '''
+        'a|web/foo/test.html': '''
         <img _src="./{{bar}}">
         <a _href="./{{bar}}">test</a>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <img _src="foo/{{bar}}">
         <a _href="foo/{{bar}}">test</a>
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('paths starting with a binding are treated as absolute', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'paths starting with a binding are treated as absolute',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="packages/a/foo.html">
         </head></html>''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
         <img _src="{{bar}}">
         <img _src="[[bar]]">''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
           <img _src="{{bar}}">
           <img _src="[[bar]]">
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('arbitrary bindings can exist in paths', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'arbitrary bindings can exist in paths',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <img src="./{{(bar[2] + baz[\'foo\']) * 14 / foobar() - 0.5}}.jpg">
         <img src="./[[bar[2]]].jpg">
         </body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <img src="{{(bar[2] + baz[\'foo\']) * 14 / foobar() - 0.5}}.jpg">
         <img src="[[bar[2]]].jpg">
         </body></html>''',
-  }, null, StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('multiple bindings can exist in paths', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'multiple bindings can exist in paths',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <img src="./{{bar[0]}}/{{baz[1]}}.{{extension}}">
         </body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <img src="{{bar[0]}}/{{baz[1]}}.{{extension}}">
         </body></html>''',
-  }, null, StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('relative paths in deep imports', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'relative paths in deep imports',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="foo/foo.html">
         </head></html>''',
-    'a|web/foo/foo.html': '''
+        'a|web/foo/foo.html': '''
         <link rel="import" href="bar.html">''',
-    'a|web/foo/bar.html': '''
+        'a|web/foo/bar.html': '''
         <style rel="stylesheet" href="baz.css"></style>
         <style rel="stylesheet" href="../css/zap.css"></style>''',
-    'a|web/foo/baz.css': '',
-    'a|web/css/zap.css': '',
-  }, {
-    'a|web/test.html': '''
+        'a|web/foo/baz.css': '',
+        'a|web/css/zap.css': '',
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
           <style rel="stylesheet" href="foo/baz.css"></style>
           <style rel="stylesheet" href="css/zap.css"></style>
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
 
 void entryPointTests() {
-  testPhases('one level deep entry points normalize correctly', phases, {
-    'a|web/test/test.html': '''
+  testPhases(
+      'one level deep entry points normalize correctly',
+      phases,
+      {
+        'a|web/test/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="../../packages/a/foo/foo.html">
         </head></html>''',
-    'a|lib/foo/foo.html': '''
+        'a|lib/foo/foo.html': '''
         <script rel="import" href="../../../packages/b/bar/bar.js">
         </script>''',
-    'b|lib/bar/bar.js': '''
+        'b|lib/bar/bar.js': '''
         console.log("here");''',
-  }, {
-    'a|web/test/test.html': '''
+      },
+      {
+        'a|web/test/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <script rel="import" href="../packages/b/bar/bar.js"></script>
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('includes in entry points normalize correctly', phases, {
-    'a|web/test/test.html': '''
+  testPhases(
+      'includes in entry points normalize correctly',
+      phases,
+      {
+        'a|web/test/test.html': '''
         <!DOCTYPE html><html><head>
         <script src="packages/a/foo/bar.js"></script>
         </head></html>''',
-    'a|lib/foo/bar.js': '''
+        'a|lib/foo/bar.js': '''
         console.log("here");''',
-  }, {
-    'a|web/test/test.html': '''
+      },
+      {
+        'a|web/test/test.html': '''
         <!DOCTYPE html><html><head>
         <script src="../packages/a/foo/bar.js"></script>
         </head><body>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('two level deep entry points normalize correctly', phases, {
-    'a|web/test/well/test.html': '''
+  testPhases(
+      'two level deep entry points normalize correctly',
+      phases,
+      {
+        'a|web/test/well/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="../../../packages/a/foo/foo.html">
         </head></html>''',
-    'a|lib/foo/foo.html': '''
+        'a|lib/foo/foo.html': '''
         <script rel="import" href="../../../packages/b/bar/bar.js"></script>''',
-    'b|lib/bar/bar.js': '''
+        'b|lib/bar/bar.js': '''
         console.log("here");''',
-  }, {
-    'a|web/test/well/test.html': '''
+      },
+      {
+        'a|web/test/well/test.html': '''
         <!DOCTYPE html><html><head></head><body>
         <div hidden="">
         <script rel="import" href="../../packages/b/bar/bar.js"></script>
         </div>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
+
+// void templateTests() {
+//   testPhases('allows template inside table', phases, {
+//     'a|web/index.html': '''
+//         <!DOCTYPE html>
+//         <html>
+//           <head><link rel="import" href="packages/a/foo.html"></head>
+//           <body>
+//             <dom-module id="hello-element">
+//               <template>
+//                 <table>
+//                   <thead>
+//                     <tr><th>first</th><th>last</th></tr>
+//                   </thead>
+//                   <tbody>
+//                     <template is="dom-repeat" items="{{data}}">
+//                       <tr>
+//                         <td>{{item.first}}</td>
+//                         <td>{{item.last}}</td>
+//                       </tr>
+//                     </template>
+//                   </tbody>
+//                 </table>
+//               </template>
+//             </dom-module>
+//           </body>
+//         </html>''',
+//     'a|lib/foo.html': '''
+//         <div>hello!</div>
+//         ''',
+//   }, {
+//     'a|web/index.html': '''
+//         <!DOCTYPE html>
+//         <html>
+//           <head></head>
+//           <body>
+//             <div hidden="">
+//               <div>hello!</div>
+//             </div>
+//             <dom-module id="hello-element">
+//               <template>
+//                 <table>
+//                   <thead>
+//                     <tr><th>first</th><th>last</th></tr>
+//                   </thead>
+//                   <tbody>
+//                     <template is="dom-repeat" items="{{data}}">
+//                       <tr>
+//                         <td>{{item.first}}</td>
+//                         <td>{{item.last}}</td>
+//                       </tr>
+//                     </template>
+//                   </tbody>
+//                 </table>
+//               </template>
+//             </dom-module>
+//           </body>
+//         </html>''',
+//   }, messages: [], formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+// }
diff --git a/packages/web_components/test/build/mirrors_remover_test.dart b/packages/web_components/test/build/mirrors_remover_test.dart
index 0d3f2e4..53ae97e 100644
--- a/packages/web_components/test/build/mirrors_remover_test.dart
+++ b/packages/web_components/test/build/mirrors_remover_test.dart
@@ -1,18 +1,18 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.mirrors_remover_test;
 
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:web_components/build/mirrors_remover.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
-  useCompactVMConfiguration();
-
   var transformer = new MirrorsRemoverTransformer();
-  var phases = [[transformer]];
+  var phases = [
+    [transformer]
+  ];
 
   testPhases('basic', phases, {
     'a|lib/src/init.dart': '''
@@ -32,5 +32,5 @@
 
         foo() {}
         ''',
-  }, []);
+  }, messages: []);
 }
diff --git a/packages/web_components/test/build/script_compactor_test.dart b/packages/web_components/test/build/script_compactor_test.dart
index a5b07f6..11c8c96 100644
--- a/packages/web_components/test/build/script_compactor_test.dart
+++ b/packages/web_components/test/build/script_compactor_test.dart
@@ -1,20 +1,20 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.script_compactor_test;
 
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:web_components/build/messages.dart';
 import 'package:web_components/build/script_compactor.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 var transformer = new ScriptCompactorTransformer();
-var phases = [[transformer]];
+var phases = [
+  [transformer]
+];
 
 main() {
-  useCompactVMConfiguration();
-
   group('basic', basicTests);
   group('code extraction tests', codeExtractorTests);
   group('fixes import/export/part URIs', dartUriTests);
@@ -22,32 +22,41 @@
 }
 
 void basicTests() {
-  testPhases('single script', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'single script',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head></head><body>
           <script type="application/dart" src="index.dart"></script>
         </body></html>''',
-    'a|web/index.dart': '''
+        'a|web/index.dart': '''
         library a.index;
         main(){}''',
-  }, {
-    'a|web/index.html': '''
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html><head></head><body>
         <script type="application/dart" src="index.bootstrap.dart"></script>
         </body></html>''',
-    'a|web/index.bootstrap.dart': '''
+        'a|web/index.bootstrap.dart': '''
         library a.web.index_bootstrap_dart;
 
         import 'index.dart' as i0;
 
         main() => i0.main();''',
-    'a|web/index.dart': '''
+        'a|web/index.dart': '''
         library a.index;
         main(){}''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('multiple scripts from nested html import', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'multiple scripts from nested html import',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html>
           <head>
             <link rel="import" href="packages/b/a.html">
@@ -56,20 +65,23 @@
             <script type="application/dart" src="index.dart"></script>
           </body>
         </body></html>''',
-    'a|web/index.dart': '''
+        'a|web/index.dart': '''
         library a.index;
         main(){}''',
-    'b|lib/a.html': '''
+        'b|lib/a.html': '''
         <link rel="import" href="b/b.html">
         <link rel="import" href="../../packages/c/c.html">
         <script type="application/dart" src="a.dart"></script>''',
-    'b|lib/b/b.html': '<script type="application/dart" src="b.dart"></script>',
-    'b|lib/a.dart': 'library b.a;',
-    'b|lib/b/b.dart': 'library b.b.b;',
-    'c|lib/c.html': '<script type="application/dart" src="c.dart"></script>',
-    'c|lib/c.dart': 'library c.c;',
-  }, {
-    'a|web/index.html': '''
+        'b|lib/b/b.html':
+            '<script type="application/dart" src="b.dart"></script>',
+        'b|lib/a.dart': 'library b.a;',
+        'b|lib/b/b.dart': 'library b.b.b;',
+        'c|lib/c.html':
+            '<script type="application/dart" src="c.dart"></script>',
+        'c|lib/c.dart': 'library c.c;',
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html><html>
         <head>
           <link rel="import" href="packages/b/a.html">
@@ -77,7 +89,7 @@
         <body>
           <script type="application/dart" src="index.bootstrap.dart"></script>
         </body></html>''',
-    'a|web/index.bootstrap.dart': '''
+        'a|web/index.bootstrap.dart': '''
         library a.web.index_bootstrap_dart;
 
         import 'package:b/b/b.dart' as i0;
@@ -86,14 +98,19 @@
         import 'index.dart' as i3;
 
         main() => i3.main();''',
-    'b|lib/a.html': '''
+        'b|lib/a.html': '''
         <link rel="import" href="b/b.html">
         <link rel="import" href="../../packages/c/c.html">
         <script type="application/dart" src="a.dart"></script>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('inline scripts', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'inline scripts',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -106,14 +123,15 @@
             </script>
           </body>
         </html>''',
-    'a|lib/foo.html': '''
+        'a|lib/foo.html': '''
         <script type="application/dart">
           library a.foo;
 
           import 'bar.dart';
         </script>''',
-  }, {
-    'a|web/index.html': '''
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -123,154 +141,325 @@
             <script type="application/dart" src="index.bootstrap.dart"></script>
           </body>
         </html>''',
-    'a|web/index.html.1.dart': '''
+        'a|web/index.html.1.dart': '''
         library a.index;
         main(){}''',
-    'a|web/index.html.0.dart': '''
+        'a|web/index.html.0.dart': '''
         library a.foo;
 
         import 'package:a/bar.dart';''',
-    'a|web/index.bootstrap.dart': '''
+        'a|web/index.bootstrap.dart': '''
         library a.web.index_bootstrap_dart;
 
         import 'index.html.0.dart' as i0;
         import 'index.html.1.dart' as i1;
 
         main() => i1.main();''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('Cleans library names generated from file paths.', phases, {
-    'a|web/01_test.html': '''
+  testPhases(
+      'Cleans library names generated from file paths.',
+      phases,
+      {
+        'a|web/01_test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">/*1*/</script>
         </head></html>''',
-    'a|web/foo_02_test.html': '''
+        'a|web/foo_02_test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">/*2*/</script>
         </head></html>''',
-    'a|web/test_03.html': '''
+        'a|web/test_03.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">/*3*/</script>
         </head></html>''',
-    'a|web/*test_%foo_04!.html': '''
+        'a|web/*test_%foo_04!.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">/*4*/</script>
         </head></html>''',
-    'a|web/%05_test.html': '''
+        'a|web/%05_test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">/*5*/</script>
         </head></html>''',
-  }, {
-    // Appends an _ if it starts with a number.
-    'a|web/01_test.html.0.dart': 'library a.web._01_test_html_0;\n/*1*/',
-    // Allows numbers in the middle.
-    'a|web/foo_02_test.html.0.dart': 'library a.web.foo_02_test_html_0;\n/*2*/',
-    // Allows numbers at the end.
-    'a|web/test_03.html.0.dart': 'library a.web.test_03_html_0;\n/*3*/',
-    // Replaces invalid characters with _.
-    'a|web/*test_%foo_04!.html.0.dart':
-        'library a.web._test__foo_04__html_0;\n/*4*/',
-    // Replace invalid character followed by number.
-    'a|web/%05_test.html.0.dart': 'library a.web._05_test_html_0;\n/*5*/',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      {
+        // Appends an _ if it starts with a number.
+        'a|web/01_test.html.0.dart': 'library a.web._01_test_html_0;\n/*1*/',
+        // Allows numbers in the middle.
+        'a|web/foo_02_test.html.0.dart':
+            'library a.web.foo_02_test_html_0;\n/*2*/',
+        // Allows numbers at the end.
+        'a|web/test_03.html.0.dart': 'library a.web.test_03_html_0;\n/*3*/',
+        // Replaces invalid characters with _.
+        'a|web/*test_%foo_04!.html.0.dart':
+            'library a.web._test__foo_04__html_0;\n/*4*/',
+        // Replace invalid character followed by number.
+        'a|web/%05_test.html.0.dart': 'library a.web._05_test_html_0;\n/*5*/',
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'file names with hyphens are ok',
+      phases,
+      {
+        'a|web/a-b.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a-b.dart"></script>
+        </body></html>''',
+        'a|web/a-b.dart': '''
+        library a.a_b;
+        main(){}''',
+      },
+      {
+        'a|web/a-b.html': '''
+        <!DOCTYPE html><html><head></head><body>
+        <script type="application/dart" src="a-b.bootstrap.dart"></script>
+        </body></html>''',
+        'a|web/a-b.bootstrap.dart': '''
+        library a.web.a_b_bootstrap_dart;
+
+        import 'a-b.dart' as i0;
+
+        main() => i0.main();''',
+        'a|web/a-b.dart': '''
+        library a.a_b;
+        main(){}''',
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'package names with hyphens give an error',
+      phases,
+      {
+        'a-b|web/a.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a.dart"></script>
+        </body></html>''',
+        'a-b|web/a.dart': '''
+        library a.a;
+        main(){}''',
+      },
+      {},
+      messages: [
+        'error: Invalid package name `a-b`. Package names should be '
+            'valid dart identifiers, as indicated at '
+            'https://www.dartlang.org/tools/pub/pubspec.html#name.'
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'package names that start with a period are not allowed',
+      phases,
+      {
+        '.a|web/a.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a.dart"></script>
+        </body></html>''',
+        '.a|web/a.dart': '''
+        library a.a;
+        main(){}''',
+      },
+      {},
+      messages: [
+        'error: Invalid package name `.a`. Package names should be '
+            'valid dart identifiers, as indicated at '
+            'https://www.dartlang.org/tools/pub/pubspec.html#name.'
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'package names that end with a period are not allowed',
+      phases,
+      {
+        'a.|web/a.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a.dart"></script>
+        </body></html>''',
+        'a.|web/a.dart': '''
+        library a.a;
+        main(){}''',
+      },
+      {},
+      messages: [
+        'error: Invalid package name `a.`. Package names should be '
+            'valid dart identifiers, as indicated at '
+            'https://www.dartlang.org/tools/pub/pubspec.html#name.'
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'package names with double periods are not allowed',
+      phases,
+      {
+        'a..b|web/a.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a.dart"></script>
+        </body></html>''',
+        'a..b|web/a.dart': '''
+        library a.a;
+        main(){}''',
+      },
+      {},
+      messages: [
+        'error: Invalid package name `a..b`. Package names should be '
+            'valid dart identifiers, as indicated at '
+            'https://www.dartlang.org/tools/pub/pubspec.html#name.'
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
+
+  testPhases(
+      'package names with internal periods are allowed',
+      phases,
+      {
+        'a.b|web/a.html': '''
+        <!DOCTYPE html><html><head></head><body>
+          <script type="application/dart" src="a.dart"></script>
+        </body></html>''',
+        'a.b|web/a.dart': '''
+        library a.b.a;
+        main(){}''',
+      },
+      {
+        'a.b|web/a.bootstrap.dart': '''
+      library a.b.web.a_bootstrap_dart;
+
+      import 'a.dart' as i0;
+
+      main() => i0.main();''',
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
 
 void codeExtractorTests() {
-  testPhases('no dart script', phases, {
-    'a|web/test.html': '<!DOCTYPE html><html></html>',
-  }, {}, [
-    'error: Found either zero or multiple dart scripts in the entry point '
-        '`web/test.html`. Exactly one was expected.',
-  ], StringFormatter.noNewlinesOrSurroundingWhitespace);
+  testPhases('no dart script', phases,
+      {'a|web/test.html': '<!DOCTYPE html><html></html>',}, {},
+      messages: [
+        'error: Found either zero or multiple dart scripts in the entry point '
+            '`web/test.html`. Exactly one was expected.',
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('single script, no library in script', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'single script, no library in script',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">main() { }</script>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <script type="application/dart" src="test.bootstrap.dart">
           </script>
         </head><body></body></html>''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
         main() { }''',
-    'a|web/test.bootstrap.dart': '''
+        'a|web/test.bootstrap.dart': '''
         library a.web.test_bootstrap_dart;
 
         import 'test.html.0.dart' as i0;
 
         main() => i0.main();''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('single script, with library', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'single script, with library',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">
           library f;
           main() { }
         </script>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <script type="application/dart" src="test.bootstrap.dart">
           </script>
         </head><body></body></html>''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library f;
         main() { }''',
-    'a|web/test.bootstrap.dart': '''
+        'a|web/test.bootstrap.dart': '''
         library a.web.test_bootstrap_dart;
 
         import 'test.html.0.dart' as i0;
 
         main() => i0.main();''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('under lib/ directory not transformed', phases, {
-    'a|lib/test.html': '''
+  testPhases(
+      'under lib/ directory not transformed',
+      phases,
+      {
+        'a|lib/test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">
           library f;
           main() { }
         </script>''',
-  }, {
-    'a|lib/test.html': '''
+      },
+      {
+        'a|lib/test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">
           library f;
           main() { }
         </script>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('multiple scripts - error', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'multiple scripts - error',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <script type="application/dart">
             library a1;
             main1() { }
         </script>
         <script type="application/dart">library a2;\nmain2() { }</script>''',
-  }, {}, [
-    'error: Found either zero or multiple dart scripts in the entry point '
-        '`web/test.html`. Exactly one was expected.',
-  ], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      {},
+      messages: [
+        'error: Found either zero or multiple dart scripts in the entry point '
+            '`web/test.html`. Exactly one was expected.',
+      ],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('multiple imported scripts', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'multiple imported scripts',
+      phases,
+      {
+        'a|web/test.html': '''
         <link rel="import" href="test2.html">
         <link rel="import" href="bar/test.html">
         <link rel="import" href="packages/a/foo/test.html">
         <link rel="import" href="packages/b/test.html">
         <script type="application/dart" src="test.dart"></script>''',
-    'a|web/test.dart': 'library a.test;',
-    'a|web/test2.html': '<script type="application/dart">main1() { }',
-    'a|web/bar/test.html': '<script type="application/dart">main2() { }',
-    'a|lib/foo/test.html': '<script type="application/dart">main3() { }',
-    'b|lib/test.html': '<script type="application/dart">main4() { }',
-  }, {
-    'a|web/test.html': '''
+        'a|web/test.dart': 'library a.test;',
+        'a|web/test2.html': '<script type="application/dart">main1() { }',
+        'a|web/bar/test.html': '<script type="application/dart">main2() { }',
+        'a|lib/foo/test.html': '<script type="application/dart">main3() { }',
+        'b|lib/test.html': '<script type="application/dart">main4() { }',
+      },
+      {
+        'a|web/test.html': '''
         <html>
           <head>
             <link rel="import" href="test2.html">
@@ -279,7 +468,7 @@
             <link rel="import" href="packages/b/test.html">
             <script type="application/dart" src="test.bootstrap.dart"></script>
           </head><body></body></html>''',
-    'a|web/test.bootstrap.dart': '''
+        'a|web/test.bootstrap.dart': '''
         library a.web.test_bootstrap_dart;
         import 'test.html.0.dart' as i0;
         import 'test.html.1.dart' as i1;
@@ -289,30 +478,35 @@
 
         main() => i4.main();
         ''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
         main1() { }''',
-    'a|web/test.html.1.dart': '''
+        'a|web/test.html.1.dart': '''
         library a.web.test_html_1;
         main2() { }''',
-    'a|web/test.html.2.dart': '''
+        'a|web/test.html.2.dart': '''
         library a.web.test_html_2;
         main3() { }''',
-    'a|web/test.html.3.dart': '''
+        'a|web/test.html.3.dart': '''
         library a.web.test_html_3;
         main4() { }''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
 
 dartUriTests() {
-  testPhases('from web folder', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'from web folder',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <link rel="import" href="test2/foo.html">
           <script type="application/dart" src="test.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.dart': 'library a.test;',
-    'a|web/test2/foo.html': '''
+        'a|web/test.dart': 'library a.test;',
+        'a|web/test2/foo.html': '''
       <!DOCTYPE html><html><head></head><body>
       <script type="application/dart">
         import 'package:qux/qux.dart';
@@ -321,41 +515,47 @@
         part 'baz.dart';
       </script>
       </body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <link rel="import" href="test2/foo.html">
           <script type="application/dart" src="test.bootstrap.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
 
         import 'package:qux/qux.dart';
         import 'test2/foo.dart';
         export 'test2/bar.dart';
         part 'test2/baz.dart';''',
-    'a|web/test2/foo.html': '''
+        'a|web/test2/foo.html': '''
         <!DOCTYPE html><html><head></head><body>
           <script type="application/dart" src="foo.bootstrap.dart">
           </script>
         </body></html>''',
-    'a|web/test2/foo.html.0.dart': '''
+        'a|web/test2/foo.html.0.dart': '''
         library a.web.test2.foo_html_0;
 
         import 'package:qux/qux.dart';
         import 'foo.dart';
         export 'bar.dart';
         part 'baz.dart';''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('from lib folder', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'from lib folder',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
         <link rel="import" href="packages/a/test2/foo.html">
         <script type="application/dart" src="test.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.dart': 'library a.test;',
-    'a|lib/test2/foo.html': '''
+        'a|web/test.dart': 'library a.test;',
+        'a|lib/test2/foo.html': '''
         <!DOCTYPE html><html><head></head><body>
         <script type="application/dart">
           import 'package:qux/qux.dart';
@@ -364,20 +564,21 @@
           part 'baz.dart';
         </script>
         </body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <link rel="import" href="packages/a/test2/foo.html">
           <script type="application/dart" src="test.bootstrap.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
 
         import 'package:qux/qux.dart';
         import 'package:a/test2/foo.dart';
         export 'package:a/test2/bar.dart';
         part 'package:a/test2/baz.dart';''',
-    'a|lib/test2/foo.html': '''
+        'a|lib/test2/foo.html': '''
         <!DOCTYPE html><html><head></head><body>
         <script type="application/dart">
           import 'package:qux/qux.dart';
@@ -386,16 +587,21 @@
           part 'baz.dart';
         </script>
         </body></html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('from another pkg', phases, {
-    'a|web/test.html': '''
+  testPhases(
+      'from another pkg',
+      phases,
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <link rel="import" href="packages/b/test2/foo.html">
           <script type="application/dart" src="test.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.dart': 'library a.test;',
-    'b|lib/test2/foo.html': '''
+        'a|web/test.dart': 'library a.test;',
+        'b|lib/test2/foo.html': '''
       <!DOCTYPE html><html><head></head><body>
       <script type="application/dart">
       import 'package:qux/qux.dart';
@@ -404,20 +610,23 @@
       part 'baz.dart';
       </script>
       </body></html>''',
-  }, {
-    'a|web/test.html': '''
+      },
+      {
+        'a|web/test.html': '''
         <!DOCTYPE html><html><head>
           <link rel="import" href="packages/b/test2/foo.html">
           <script type="application/dart" src="test.bootstrap.dart"></script>
         </head><body></body></html>''',
-    'a|web/test.html.0.dart': '''
+        'a|web/test.html.0.dart': '''
         library a.web.test_html_0;
 
         import 'package:qux/qux.dart';
         import 'package:b/test2/foo.dart';
         export 'package:b/test2/bar.dart';
         part 'package:b/test2/baz.dart';''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
 
 validateUriTests() {
@@ -426,7 +635,7 @@
         <!DOCTYPE html><html><body>
         <script type="application/dart" src="a.dart"></script>
         </body></html>''',
-  }, {}, [
+  }, {}, messages: [
     'warning: ${scriptFileNotFound.create({'url': 'a|web/a.dart'}).snippet} '
         '(web/test.html 1 8)',
   ]);
diff --git a/packages/web_components/test/build/test_compatibility_test.dart b/packages/web_components/test/build/test_compatibility_test.dart
index 25272ac..37f2012 100644
--- a/packages/web_components/test/build/test_compatibility_test.dart
+++ b/packages/web_components/test/build/test_compatibility_test.dart
@@ -1,21 +1,24 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.test_compatibility_test;
 
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:web_components/build/test_compatibility.dart';
-import 'package:unittest/compact_vm_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 var start = new RewriteXDartTestToScript(null);
 var end = new RewriteScriptToXDartTest(null);
 
 main() {
-  useCompactVMConfiguration();
-
-  testPhases('can rewrite x-dart-test link tags to script tags', [[start]], {
-    'a|test/index.html': '''
+  testPhases(
+      'can rewrite x-dart-test link tags to script tags',
+      [
+        [start]
+      ],
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -23,8 +26,9 @@
           </head>
           <body></body>
         </html>''',
-  }, {
-    'a|test/index.html': '''
+      },
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -33,10 +37,17 @@
           </head>
           <body></body>
         </html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('can rewrite script tags to x-dart-test link tags', [[end]], {
-    'a|test/index.html': '''
+  testPhases(
+      'can rewrite script tags to x-dart-test link tags',
+      [
+        [end]
+      ],
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -45,8 +56,9 @@
           </head>
           <body></body>
         </html>''',
-  }, {
-    'a|test/index.html': '''
+      },
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -54,10 +66,18 @@
           </head>
           <body></body>
         </html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('restores original application at the end', [[start], [end]], {
-    'a|test/index.html': '''
+  testPhases(
+      'restores original application at the end',
+      [
+        [start],
+        [end]
+      ],
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -65,8 +85,9 @@
           </head>
           <body></body>
         </html>''',
-  }, {
-    'a|test/index.html': '''
+      },
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -74,5 +95,7 @@
           </head>
           <body></body>
         </html>''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
diff --git a/packages/web_components/test/build/transformer_test.dart b/packages/web_components/test/build/transformer_test.dart
index 446eced..0e05cf8 100644
--- a/packages/web_components/test/build/transformer_test.dart
+++ b/packages/web_components/test/build/transformer_test.dart
@@ -1,22 +1,26 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('vm')
 library web_components.test.build.transformer_test;
 
-import 'package:code_transformers/tests.dart';
+import 'package:transformer_test/utils.dart';
 import 'package:web_components/transformer.dart';
-import 'package:unittest/compact_vm_config.dart';
+import 'package:test/test.dart';
 import 'common.dart';
 
 var transformer = new WebComponentsTransformerGroup(
     new TransformOptions(['web/index.html', 'test/index.html'], false));
-var phases = [[transformer]];
+var phases = [
+  [transformer]
+];
 
 main() {
-  useCompactVMConfiguration();
-
-  testPhases('full app', phases, {
-    'a|web/index.html': '''
+  testPhases(
+      'full app',
+      phases,
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -27,7 +31,7 @@
           </body>
         </html>
         ''',
-    'a|web/index.dart': '''
+        'a|web/index.dart': '''
         library a;
 
         import 'package:initialize/initialize.dart';
@@ -35,15 +39,15 @@
         @initMethod
         startup() {}
         ''',
-    'b|lib/foo.html': '''
+        'b|lib/foo.html': '''
         <link rel="import" href="bar.html">
         <script type="application/dart" src="foo.dart"></script>
         <div>foo</div>
         ''',
-    'b|lib/foo.dart': '''
+        'b|lib/foo.dart': '''
         library b.foo;
         ''',
-    'b|lib/bar.html': '''
+        'b|lib/bar.html': '''
         <script type="application/dart">
           // Must use package:urls inside inline script tags,
           @HtmlImport('package:b/bar_nodart.html')
@@ -58,13 +62,15 @@
         </script>
         <div>bar</div>
         ''',
-    'b|lib/bar_nodart.html': '''
+        'b|lib/bar_nodart.html': '''
         <div>bar no_dart!</div>
         ''',
-    'initialize|lib/initialize.dart': mockInitialize,
-    'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
-  }, {
-    'a|web/index.html': '''
+        'initialize|lib/initialize.dart': mockInitialize,
+        'web_components|lib/html_import_annotation.dart':
+            mockHtmlImportAnnotation,
+      },
+      {
+        'a|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head></head>
@@ -79,7 +85,7 @@
           </body>
         </html>
         ''',
-    'a|web/index.bootstrap.initialize.dart': '''
+        'a|web/index.bootstrap.initialize.dart': '''
         import 'package:initialize/src/static_loader.dart';
         import 'package:initialize/initialize.dart';
         import 'index.bootstrap.dart' as i0;
@@ -96,7 +102,7 @@
           return i0.main();
         }
         ''',
-    'a|web/index.bootstrap.dart': '''
+        'a|web/index.bootstrap.dart': '''
         library a.web.index_bootstrap_dart;
 
         import 'index.html.0.dart' as i0;
@@ -105,7 +111,7 @@
 
         main() => i2.main();
         ''',
-    'a|web/index.html.0.dart': '''
+        'a|web/index.html.0.dart': '''
         // Must use package:urls inside inline script tags,
         @HtmlImport('package:b/bar_nodart.html')
         library b.bar;
@@ -117,10 +123,15 @@
         @initMethod
         bar() {}
         ''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('imports go above the dart script', phases, {
-    'b|web/index.html': '''
+  testPhases(
+      'imports go above the dart script',
+      phases,
+      {
+        'b|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -132,29 +143,31 @@
           </body>
         </html>
         ''',
-    'b|web/index.dart': '''
+        'b|web/index.dart': '''
         @HtmlImport('package:b/b.html')
         library b;
 
         import 'package:web_components/html_import_annotation.dart';
         import 'package:c/c.dart';
         ''',
-    'b|lib/b.html': '''
+        'b|lib/b.html': '''
         <div>b</div>
         ''',
-    'c|lib/c.dart': '''
+        'c|lib/c.dart': '''
         @HtmlImport('c.html')
         library c;
 
         import 'package:web_components/html_import_annotation.dart';
         ''',
-    'c|lib/c.html': '''
+        'c|lib/c.html': '''
         <div>c</div>
         ''',
-    'initialize|lib/initialize.dart': mockInitialize,
-    'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
-  }, {
-    'b|web/index.html': '''
+        'initialize|lib/initialize.dart': mockInitialize,
+        'web_components|lib/html_import_annotation.dart':
+            mockHtmlImportAnnotation,
+      },
+      {
+        'b|web/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -171,10 +184,15 @@
           </body>
         </html>
         ''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 
-  testPhases('test compatibility', phases, {
-    'a|test/index.html': '''
+  testPhases(
+      'test compatibility',
+      phases,
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -184,15 +202,17 @@
           <body></body>
         </html>
         ''',
-    'a|test/index.dart': '''
+        'a|test/index.dart': '''
         library a;
 
         main() {}
         ''',
-    'initialize|lib/initialize.dart': mockInitialize,
-    'web_components|lib/html_import_annotation.dart': mockHtmlImportAnnotation,
-  }, {
-    'a|test/index.html': '''
+        'initialize|lib/initialize.dart': mockInitialize,
+        'web_components|lib/html_import_annotation.dart':
+            mockHtmlImportAnnotation,
+      },
+      {
+        'a|test/index.html': '''
         <!DOCTYPE html>
         <html>
           <head>
@@ -202,5 +222,7 @@
           <body></body>
         </html>
         ''',
-  }, [], StringFormatter.noNewlinesOrSurroundingWhitespace);
+      },
+      messages: [],
+      formatter: StringFormatter.noNewlinesOrSurroundingWhitespace);
 }
diff --git a/packages/web_components/test/custom_element_proxy_test.dart b/packages/web_components/test/custom_element_proxy_test.dart
index 5fa11e0..d95012e 100644
--- a/packages/web_components/test/custom_element_proxy_test.dart
+++ b/packages/web_components/test/custom_element_proxy_test.dart
@@ -1,13 +1,13 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('browser')
 library custom_element_proxy_test;
 
 import 'dart:async';
 import 'dart:html';
 import 'dart:js';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'package:web_components/web_components.dart';
 
 @CustomElementProxy('basic-element')
@@ -32,8 +32,7 @@
 }
 
 main() {
-  useHtmlConfiguration();
-  initWebComponents().then((_) {
+  return initWebComponents().then((_) {
     var container = querySelector('#container') as DivElement;
 
     tearDown(() {
@@ -42,15 +41,14 @@
 
     test('basic custom element', () {
       container.append(new BasicElement());
-      container.appendHtml('<basic-element></basic_element>');
+      container.appendHtml('<basic-element></basic_element>',
+          treeSanitizer: nullSanitizer);
       // TODO(jakemac): after appendHtml elements are upgraded asynchronously,
       // why? https://github.com/dart-lang/web-components/issues/4
       return new Future(() {}).then((_) {
         var elements = container.querySelectorAll('basic-element');
         expect(elements.length, 2);
         for (BasicElement element in elements) {
-          print(element.outerHtml);
-          print(element.runtimeType);
           expect(element.isBasicElement, isTrue);
         }
       });
@@ -58,7 +56,8 @@
 
     test('extends custom element', () {
       container.append(new ExtendedElement());
-      container.appendHtml('<input is="extended-element" />');
+      container.appendHtml('<input is="extended-element" />',
+          treeSanitizer: nullSanitizer);
       // TODO(jakemac): after appendHtml elements are upgraded asynchronously,
       // why? https://github.com/dart-lang/web-components/issues/4
       return new Future(() {}).then((_) {
@@ -71,3 +70,10 @@
     });
   });
 }
+
+class NullTreeSanitizer implements NodeTreeSanitizer {
+  const NullTreeSanitizer();
+  void sanitizeTree(Node node) {}
+}
+
+final nullSanitizer = const NullTreeSanitizer();
diff --git a/packages/web_components/test/custom_element_proxy_test.html b/packages/web_components/test/custom_element_proxy_test.html
index 87053ed..8ecadeb 100644
--- a/packages/web_components/test/custom_element_proxy_test.html
+++ b/packages/web_components/test/custom_element_proxy_test.html
@@ -10,9 +10,9 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents.js"></script>
-  <script src="/packages/web_components/interop_support.js"></script>
-  <script src="/packages/web_components/dart_support.js"></script>
+  <script src="packages/web_components/webcomponents.js"></script>
+  <script src="packages/web_components/interop_support.js"></script>
+  <script src="packages/web_components/dart_support.js"></script>
 </head>
 <body>
   <h1> Running custom_element_proxy </h1>
@@ -33,9 +33,7 @@
     });
   </script>
 
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="custom_element_proxy_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
+  <link rel="x-dart-test" href="custom_element_proxy_test.dart">
+  <script src="packages/test/dart.js"></script>
 </body>
 </html>
diff --git a/packages/web_components/test/custom_element_test.dart b/packages/web_components/test/custom_element_test.dart
index 641c8c9..b0b8cf8 100644
--- a/packages/web_components/test/custom_element_test.dart
+++ b/packages/web_components/test/custom_element_test.dart
@@ -1,12 +1,12 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('browser')
 library web_components.test.custom_element_test;
 
 import 'dart:async';
 import 'dart:html';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'package:web_components/web_components.dart';
 
 @CustomElement('basic-element')
@@ -32,8 +32,7 @@
 }
 
 main() {
-  useHtmlConfiguration();
-  initWebComponents().then((_) {
+  return initWebComponents().then((_) {
     var container = querySelector('#container') as DivElement;
 
     setUp(() {
@@ -47,9 +46,9 @@
     test('basic custom element', () {
       expect(document.querySelector('basic-element') is BasicElement, isTrue);
       container.append(new BasicElement());
-      container.appendHtml('<basic-element></basic-element>');
-      // TODO(jakemac): after appendHtml elements are upgraded asynchronously,
-      // why? https://github.com/dart-lang/web-components/issues/4
+      container.appendHtml('<basic-element></basic-element>',
+          treeSanitizer: nullSanitizer);
+      // elements are upgraded asynchronously
       return new Future(() {}).then((_) {
         var elements = container.querySelectorAll('basic-element');
         expect(elements.length, 2);
@@ -62,9 +61,9 @@
     test('child custom element', () {
       expect(document.querySelector('child-element') is ChildElement, isTrue);
       container.append(new ChildElement());
-      container.appendHtml('<child-element></child-element>');
-      // TODO(jakemac): after appendHtml elements are upgraded asynchronously,
-      // why? https://github.com/dart-lang/web-components/issues/4
+      container.appendHtml('<child-element></child-element>',
+          treeSanitizer: nullSanitizer);
+      // elements are upgraded asynchronously
       return new Future(() {}).then((_) {
         var elements = container.querySelectorAll('child-element');
         expect(elements.length, 2);
@@ -77,9 +76,9 @@
     test('extends input element', () {
       expect(document.querySelector('input') is ExtendedElement, isTrue);
       container.append(new ExtendedElement());
-      container.appendHtml('<input is="extended-element" />');
-      // TODO(jakemac): after appendHtml elements are upgraded asynchronously,
-      // why? https://github.com/dart-lang/web-components/issues/4
+      container.appendHtml('<input is="extended-element" />',
+          treeSanitizer: nullSanitizer);
+      // elements are upgraded asynchronously
       return new Future(() {}).then((_) {
         var elements = container.querySelectorAll('input');
         expect(elements.length, 2);
@@ -90,3 +89,10 @@
     });
   });
 }
+
+class NullTreeSanitizer implements NodeTreeSanitizer {
+  const NullTreeSanitizer();
+  void sanitizeTree(Node node) {}
+}
+
+final nullSanitizer = const NullTreeSanitizer();
diff --git a/packages/web_components/test/custom_element_test.html b/packages/web_components/test/custom_element_test.html
index a93c32a..08220c2 100644
--- a/packages/web_components/test/custom_element_test.html
+++ b/packages/web_components/test/custom_element_test.html
@@ -22,9 +22,7 @@
   <div id="container">
   </div>
 
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="custom_element_test.dart"></script>
-  <script type="text/javascript" src="packages/browser/dart.js"></script>
+  <link rel="x-dart-test" href="custom_element_test.dart">
+  <script src="packages/test/dart.js"></script>
 </body>
 </html>
diff --git a/packages/web_components/test/html_import_annotation_test.dart b/packages/web_components/test/html_import_annotation_test.dart
index 6b81a58..64b7132 100644
--- a/packages/web_components/test/html_import_annotation_test.dart
+++ b/packages/web_components/test/html_import_annotation_test.dart
@@ -1,34 +1,28 @@
 // Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+@TestOn('browser')
 @HtmlImport(importPath)
-// This one will throw a build time warning, but should still work dynamically.
-@HtmlImport('bad_import.html')
 library web_components.test.html_import_annotation;
 
 import 'dart:html';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'package:web_components/web_components.dart';
-import 'foo/bar.dart';
+import 'foo/bar.dart' as foo_bar;
 
 const String importPath = 'my_import.html';
 
-main() {
-  useHtmlConfiguration();
+/// Uses [foo_bar].
+main() async {
+  await initWebComponents();
 
   test('adds import to head', () {
-    return initWebComponents().then((_) {
-      var my_import = document.head.querySelector('link[href="$importPath"]');
-      expect(my_import, isNotNull);
-      expect(my_import.import.body.text, 'Hello world!\n');
+    var my_import = document.head.querySelector('link[href="$importPath"]');
+    expect(my_import, isNotNull);
+    expect(my_import.import.body.text, 'Hello world!\n');
 
-      var bar = document.head.querySelector('link[href="foo/bar.html"]');
-      expect(bar, isNotNull);
-      expect(bar.import.body.text, 'bar\n');
-
-      var bad = document.head.querySelector('link[href="bad_import.html"]');
-      expect(bad.import, isNull);
-    });
+    var bar = document.head.querySelector('link[href="foo/bar.html"]');
+    expect(bar, isNotNull);
+    expect(bar.import.body.text, 'bar\n');
   });
 }
diff --git a/packages/web_components/test/html_import_annotation_test.html b/packages/web_components/test/html_import_annotation_test.html
index a3455c5..8af5394 100644
--- a/packages/web_components/test/html_import_annotation_test.html
+++ b/packages/web_components/test/html_import_annotation_test.html
@@ -17,9 +17,7 @@
 <body>
   <h1> Running html_import_annotation test </h1>
 
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="html_import_annotation_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
+  <link rel="x-dart-test" href="html_import_annotation_test.dart">
+  <script src="packages/test/dart.js"></script>
 </body>
 </html>
diff --git a/packages/web_components/test/init_web_components_test.dart b/packages/web_components/test/init_web_components_test.dart
index 9b66acf..4633963 100644
--- a/packages/web_components/test/init_web_components_test.dart
+++ b/packages/web_components/test/init_web_components_test.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 @initializeTracker
+@TestOn('browser')
 library web_components.test.init_web_components_test;
 
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'package:initialize/initialize.dart' show LibraryIdentifier;
 import 'package:initialize/src/initialize_tracker.dart';
 import 'package:web_components/web_components.dart';
@@ -13,17 +13,18 @@
 const String importPath = 'my_import.html';
 
 main() {
-  useHtmlConfiguration();
-
   test('can initialize scripts from html imports', () {
     return initWebComponents().then((_) {
       var expectedInitializers = [
         const LibraryIdentifier(
             #web_components.test.deps.b, null, 'deps/b.dart'),
         // This one changes based on deploy mode because its an inline script.
-        const LibraryIdentifier(#web_components.test.deps.c, null, deployMode
-            ? 'init_web_components_test.html.0.dart'
-            : 'deps/c.html'),
+        const LibraryIdentifier(
+            #web_components.test.deps.c,
+            null,
+            deployMode
+                ? 'init_web_components_test.html.0.dart'
+                : 'deps/c.html'),
         const LibraryIdentifier(
             #web_components.test.deps.a, null, 'deps/a.dart'),
         const LibraryIdentifier(#web_components.test.init_web_components_test,
diff --git a/packages/web_components/test/init_web_components_test.html b/packages/web_components/test/init_web_components_test.html
index d418e6e..d8fd3dc 100644
--- a/packages/web_components/test/init_web_components_test.html
+++ b/packages/web_components/test/init_web_components_test.html
@@ -18,9 +18,7 @@
 <body>
   <h1> Running init_web_components test </h1>
 
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="init_web_components_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
+  <link rel="x-dart-test" href="init_web_components_test.dart">
+  <script src="packages/test/dart.js"></script>
 </body>
 </html>
diff --git a/packages/web_components/test/interop_test.dart b/packages/web_components/test/interop_test.dart
index 20cce29..0b7fcc5 100644
--- a/packages/web_components/test/interop_test.dart
+++ b/packages/web_components/test/interop_test.dart
@@ -1,19 +1,16 @@
 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-
+@TestOn('browser')
 library template_wrappers_test;
 
 import 'dart:html';
-import 'dart:async';
 import 'dart:js' show context, JsObject;
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 import 'package:web_components/interop.dart';
 import 'package:web_components/polyfill.dart';
 
 main() {
-  useHtmlConfiguration();
   setUp(() => customElementsReady);
 
   test('interop is supported', () {
@@ -44,13 +41,13 @@
     onlyUpgradeNewElements();
     registerDartType('x-d', XDWrapper); // late on purpose.
 
-    a = document.querySelector('x-a');
+    a = document.querySelector('x-a') as XAWrapper;
     expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement');
     expect(a is XAWrapper, isTrue, reason: 'x-a is upgraded to XAWrapper');
     expect(a.x, 0);
     expect(a.wrapperCount, 0);
 
-    b = document.querySelector('[is=x-b]');
+    b = document.querySelector('[is=x-b]') as XBWrapper;
     expect(b is DivElement, isTrue, reason: 'x-b is DivElement');
     expect(b is XBWrapper, isTrue, reason: 'x-b is upgraded to XBWrapper');
     expect(b.x, 1);
@@ -67,7 +64,7 @@
     expect(c is HtmlElement, isTrue, reason: 'x-c is HtmlElement');
     expect(c is XCWrapper, isFalse, reason: 'x-c should not be upgraded yet');
     expect(_readX(c), null, reason: 'x-c has not been registered in JS yet');
-  });
+  }, skip: 'https://github.com/dart-lang/web-components/issues/38');
 
   test('anything created after registering Dart type is upgraded', () {
     context.callMethod('addA');
@@ -77,7 +74,7 @@
     expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement');
     expect(a is XAWrapper, isTrue, reason: 'x-a is upgraded to XAWrapper');
     expect(a.x, 3);
-    expect(a.wrapperCount, 2);
+    expect((a as XAWrapper).wrapperCount, 2);
 
     context.callMethod('addB');
     list = document.querySelectorAll('[is=x-b]');
@@ -86,7 +83,7 @@
     expect(b is DivElement, isTrue, reason: 'x-b is DivElement');
     expect(b is XBWrapper, isTrue, reason: 'x-b is upgraded to XBWrapper');
     expect(b.x, 4);
-    expect(b.wrapperCount, 3);
+    expect((b as XBWrapper).wrapperCount, 3);
 
     // New instances of x-d should be upgraded regardless.
     context.callMethod('addD');
@@ -96,8 +93,8 @@
     expect(d is HtmlElement, isTrue, reason: 'x-d is HtmlElement');
     expect(d is XDWrapper, isTrue, reason: 'x-d is upgraded to XDWrapper');
     expect(d.x, 5);
-    expect(d.wrapperCount, 4);
-  });
+    expect((d as XDWrapper).wrapperCount, 4);
+  }, skip: 'https://github.com/dart-lang/web-components/issues/38');
 
   test('events seen if Dart type is registered before registerElement', () {
     var c = document.querySelector('x-c');
@@ -108,7 +105,7 @@
     c = document.querySelector('x-c');
     expect(c is XCWrapper, isTrue);
     expect(c.x, 6);
-    expect(c.wrapperCount, 5);
+    expect((c as XCWrapper).wrapperCount, 5);
 
     context.callMethod('addC');
     var list = document.querySelectorAll('x-c');
@@ -118,8 +115,8 @@
     expect(c is HtmlElement, isTrue, reason: 'x-c is HtmlElement');
     expect(c is XCWrapper, isTrue, reason: 'x-c is upgraded to XCWrapper');
     expect(c.x, 7);
-    expect(c.wrapperCount, 6);
-  });
+    expect((c as XCWrapper).wrapperCount, 6);
+  }, skip: 'https://github.com/dart-lang/web-components/issues/38');
 
   test('element can extend another element', () {
     registerDartType('x-e', XEWrapper);
@@ -129,8 +126,9 @@
     expect(e is XEWrapper, isTrue);
     expect(e.x, 8);
     expect(e.y, 9);
-  });
+  }, skip: 'https://github.com/dart-lang/web-components/issues/38');
 }
+
 int _count = 0;
 
 abstract class Wrapper {
diff --git a/packages/web_components/test/interop_test.html b/packages/web_components/test/interop_test.html
index 9b3e5fa..019beab 100644
--- a/packages/web_components/test/interop_test.html
+++ b/packages/web_components/test/interop_test.html
@@ -10,9 +10,9 @@
      .unittest-fail { background: #d55;}
      .unittest-error { background: #a11;}
   </style>
-  <script src="/packages/web_components/webcomponents.js"></script>
-  <script src="/packages/web_components/dart_support.js"></script>
-  <script src="/packages/web_components/interop_support.js"></script>
+  <script src="packages/web_components/webcomponents-lite.js"></script>
+  <script src="packages/web_components/interop_support.js"></script>
+  <script src="packages/web_components/dart_support.js"></script>
 </head>
 <body>
   <h1> Running interop_test </h1>
@@ -76,9 +76,8 @@
   <div is="x-b" id="i2"></div>
   <x-c id="i3"></x-c>
   <x-d id="i4"></x-d>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="interop_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
-</body>
+  <link rel="x-dart-test" href="interop_test.dart">
+  <script src="packages/test/dart.js"></script>
+  <!-- <script type="application/dart" src="interop_test.dart"></script>
+  <script src="packages/browser/dart.js"></script> -->
 </html>
diff --git a/packages/web_components/test/location_wrapper_test.dart b/packages/web_components/test/location_wrapper_test.dart
index a1c531a..6120d03 100644
--- a/packages/web_components/test/location_wrapper_test.dart
+++ b/packages/web_components/test/location_wrapper_test.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+@TestOn('browser')
 library template_wrappers_test;
 
 import 'dart:html';
-import 'package:unittest/html_config.dart';
-import 'package:unittest/unittest.dart';
+import 'package:test/test.dart';
 
 main() {
-  useHtmlConfiguration();
-
   test('OK to access location with platform.js', () {
     expect(window.location.toString(), window.location.href);
   });
diff --git a/packages/web_components/test/location_wrapper_test.html b/packages/web_components/test/location_wrapper_test.html
index 21d59fd..ee18f17 100644
--- a/packages/web_components/test/location_wrapper_test.html
+++ b/packages/web_components/test/location_wrapper_test.html
@@ -15,9 +15,7 @@
 </head>
 <body>
   <h1> Running template_wrappers_test </h1>
-  <script type="text/javascript"
-      src="/root_dart/tools/testing/dart/test_controller.js"></script>
-  <script type="application/dart" src="location_wrapper_test.dart"></script>
-  <script type="text/javascript" src="/packages/browser/dart.js"></script>
+  <link rel="x-dart-test" href="location_wrapper_test.dart">
+  <script src="packages/test/dart.js"></script>
 </body>
 </html>
diff --git a/pubspec.yaml b/pubspec.yaml
index 3f53ff7..23ff55a 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,13 +1,6 @@
 name: observatory
 version: 1.6.0-dev.1
 transformers:
-- polymer:
-    entry_points:
-    - web/index.html
-    inline_stylesheets:
-      lib/src/elements/css/shared.css: false
-      packages/charted/charts/themes/quantum_theme.css: false
-    $exclude: [web/third_party/*.html, web/timeline.html]
 - $dart2js:
     $include: "**/*.polymer.bootstrap.dart"
     suppressWarnings: false
@@ -15,11 +8,9 @@
 dependencies:
   args: any
   charted: ^0.4.0
-  polymer: ^0.16.3
   unittest: < 0.12.0
-  js: ^0.6.0
-  js_util: ^0.2.0
   usage: any
+  web_components: any
 dependency_overrides:
   analyzer: '>=0.26.1 <0.26.1+15'
   dart_style: <0.2.2