Step 1 : Simple Custom Element

This commit is contained in:
Julien Lengrand-Lambert
2017-12-13 13:45:28 +01:00
commit c0850c96e5
77 changed files with 12666 additions and 0 deletions

58
.gitignore vendored Normal file
View File

@@ -0,0 +1,58 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env

9
README.md Normal file
View File

@@ -0,0 +1,9 @@
# Introduction to Web Components
This repo was created to support [a technical workshop](https://www.meetup.com/Coffee-Code-and-Chat/events/245662648/) given in Utrecht in December 2017.
Each index file represents a simple exercise meant to show a given aspect of **[Web Components](https://www.webcomponents.org/)**.
## Slides and Work Material
[Slides are here](https://docs.google.com/presentation/d/1h_wp7a_xbjJxeNLu6_Dd8Q4fBy2zA6jc1AjZrNqSEjo/edit?usp=sharing)

View File

@@ -0,0 +1,35 @@
{
"name": "webcomponentsjs",
"description": "Web components polyfill",
"main": "webcomponents.js",
"homepage": "http://webcomponents.org",
"authors": [
"The Polymer Authors"
],
"repository": {
"type": "git",
"url": "https://github.com/webcomponents/webcomponentsjs.git"
},
"keywords": [
"webcomponents",
"web-components",
"polyfill",
"shim"
],
"license": "BSD-3-Clause",
"ignore": [],
"devDependencies": {
"web-component-tester": "^v6.0.0"
},
"version": "1.0.20",
"_release": "1.0.20",
"_resolution": {
"type": "version",
"tag": "v1.0.20",
"commit": "e83a68eb7d74f7d03e6ed111085730c10cb58507"
},
"_source": "https://github.com/Polymer/webcomponentsjs.git",
"_target": "^1.0.20",
"_originalSource": "webcomponentsjs",
"_direct": true
}

View File

@@ -0,0 +1,11 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
}
}

View File

@@ -0,0 +1,3 @@
/webcomponents*.js binary
/webcomponents*.js.map binary
/webcomponents-loader.js -binary

View File

@@ -0,0 +1,3 @@
node_modules
bower_components
dist

View File

@@ -0,0 +1,25 @@
language: node_js
sudo: required
dist: trusty
node_js: stable
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
script:
- npm install -g bower
- bower install
- wct -l chrome
- wct -l firefox
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'windows 10/microsoftedge@14' -s 'windows 8.1/internet explorer@11' -s 'os x 10.11/safari@10' -s 'os x 10.11/safari@9' -s 'Linux/chrome@41'; fi
env:
global:
- secure: Fpp9LwJSGOdTrSIImQTlbzxozBsqe/2AJN5OfTXSe12FZxqzz50gevdxQcIlLypKaNyCtjb980DJbwdJR2cXUqaunLZAPWxrKa7ZPwamUxW+zVL7EHqy5zuvD+yJ+Vmk3ahs3WBTVyJ8T3XoaSfo9VumDIcKggWGJwgvM3blIMg=
- secure: Bj8MgzUVP0X8MLgK3d9eF48V7x0rPJyrN1IyguzKyJJVC8LV2XZXF+6o/M+zNsVMSsjhgXMkS3RRuaUShxO/OS6gHeG31FWcZqbXfZfgMMyH8a8zDls+r8m2lGEICaZo1OTXR0uiR/VNVt7n2xoBnTmjmRFwkaxAZk4yCjbXYzQ=

View File

@@ -0,0 +1,64 @@
# Contributing
Want to contribute to webcomponents.js? Great!
We are more than happy to accept external contributions to the project in the form of [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
1. Setup Gulp: `sudo npm install -g gulp`
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
1. Test your change results in a working build.
> in the repo you've made changes to, try generating a build:
cd $REPO
npm install
gulp
The builds will be placed into the `dist/` directory if all goes well.
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/webcomponentsjs.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.

View File

@@ -0,0 +1,19 @@
# License
Everything in this repo is BSD style license unless otherwise specified.
Copyright (c) 2015 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.

View File

@@ -0,0 +1,169 @@
webcomponents.js (v1 spec polyfills)
================
[![Build Status](https://travis-ci.org/webcomponents/webcomponentsjs.svg?branch=master)](https://travis-ci.org/webcomponents/webcomponentsjs)
> **Note**. For polyfills that work with the older Custom Elements and Shadow DOM v0 specs, see the [v0 branch](https://github.com/webcomponents/webcomponentsjs/tree/v0).
A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
- **Custom Elements v1**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/customelements)).
- **HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/), [tutorial](https://www.html5rocks.com/en/tutorials/webcomponents/imports/)).
- **Shadow DOM v1**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/), [tutorial](https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom)).
For browsers that need it, there are also some minor polyfills included:
- [`HTMLTemplateElement`](https://github.com/webcomponents/template)
- [`Promise`](https://github.com/stefanpenner/es6-promise)
- `Event`, `CustomEvent`, `MouseEvent` constructors and `Object.assign`, `Array.from` (see [webcomponents-platform](https://github.com/webcomponents/webcomponents-platform))
## How to use
The polyfills are built (concatenated & minified) into several bundles that target
different browsers and spec readiness:
- `webcomponents-hi.js` -- HTML Imports (needed by Safari Tech Preview)
- `webcomponents-hi-ce.js` -- HTML Imports and Custom Elements v1 (needed by Safari 10)
- `webcomponents-hi-sd-ce.js` -- HTML Imports, Custom Elements v1 and Shady DOM/CSS (needed by Safari 9, Firefox, Edge)
- `webcomponents-sd-ce.js` -- Custom Elements and Shady DOM/CSS (no HTML Imports)
- `webcomponents-lite.js` -- all of the polyfills: HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11), and Template (needed by IE 11 and Edge)
If you are only targeting a specific browser, you can just use the bundle that's
needed by it; alternatively, if your server is capable of serving different assets based on user agent, you can send the polyfill bundle that's necessary for the browser making that request.
## `webcomponents-loader.js`
Alternatively, this repo also comes with `webcomponents-loader.js`, a client-side
loader that dynamically loads the minimum polyfill bundle, using feature detection.
Note that because the bundle will be loaded asynchronously, you should wait for the `WebComponentsReady` before you can safely assume that all the polyfills have
loaded and are ready to be used (i.e. if you want to dynamically load other custom
elements, etc.).
Additionally, you can check if `window.WebComponents` exists to know if the `WebComponentsReady` event will fire, and you can check if `window.WebComponents.ready` is true to check if the `WebComponentsReady` event has already fired.
Here's an example:
```html
<!-- Load polyfills; note that "loader" will load these async -->
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<!-- Load a custom element definition via HTMLImports -->
<link rel="import" href="my-element.html">
<!-- Use the custom element -->
<my-element></my-element>
<!-- Interact with the upgraded element -->
<script>
window.addEventListener('WebComponentsReady', function() {
// At this point we are guaranteed that all required polyfills have loaded,
// all HTML imports have loaded, and all defined custom elements have upgraded
let MyElement = customElements.get('my-element');
let element = document.querySelector('my-element');
console.assert(element instanceof MyElement); // 👍
element.someAPI(); // 👍
});
</script>
```
## `custom-elements-es5-adapter.js`
According to the spec, Custom Elements must be ES6 classes (https://html.spec.whatwg.org/multipage/scripting.html#custom-element-conformance). Since most projects need to support a wide range of browsers that don't necessary support ES6, it may make sense to compile your project to ES5. However, ES5-style custom element classes will **not** work with native Custom Elements because ES5-style classes cannot properly extend ES6 classes, like `HTMLElement`.
To work around this, load `custom-elements-es5-adapter.js` before declaring new Custom Elements.
**The adapter must NOT be compiled.**
```html
<!-- Load Custom Elements es5 adapter -->
<script src="bower_components/webcomponentsjs/custom-elements-es5-adapter.js"></script>
<!-- Load polyfills; note that "loader" will load these async -->
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
<!-- Load the es5 compiled custom element definition -->
<link rel="import" href="my-es5-element.html">
<!-- Use the custom element -->
<my-es5-element></my-es5-element>
```
## Browser Support
The polyfills are intended to work in the latest versions of evergreen browsers. See below
for our complete browser support matrix:
| Polyfill | IE11+ | Chrome* | Firefox* | Safari 9+* | Chrome Android* | Mobile Safari* |
| ---------- |:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|
| Custom Elements | ✓ | ✓ | ✓ | ✓ | ✓| ✓ |
| HTML Imports | ✓ | ✓ | ✓ | ✓| ✓| ✓ |
| Shady CSS/DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
\*Indicates the current version of the browser
The polyfills may work in older browsers, however require additional polyfills (such as classList, or other [platform](https://github.com/webcomponents/webcomponents-platform)
polyfills) to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
### Manually Building
If you wish to build the bundles yourself, you'll need `node` and `npm` 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
bower install
# build
gulp
The builds will be placed into the root 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-lite.js` polyfill (as well as the smaller bundles and the loader) 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, 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
* [ShadowDOM CSS is not encapsulated out of the box](#shadycss)
* [Custom element's constructor property is unreliable](#constructor)
* [Contenteditable elements do not trigger MutationObserver](#contentedit)
* [ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
### ShadowDOM CSS is not encapsulated out of the box <a id="shadycss"></a>
The ShadowDOM polyfill is not able to encapsulate CSS in ShadowDOM out of the box. You need to use specific code from the ShadyCSS library, included with the polyfill. See [ShadyCSS instructions](https://github.com/webcomponents/shadycss).
### 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)
### ShadyCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
ShadyCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadyCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.

View File

@@ -0,0 +1,24 @@
{
"name": "webcomponentsjs",
"description": "Web components polyfill",
"main": "webcomponents.js",
"homepage": "http://webcomponents.org",
"authors": [
"The Polymer Authors"
],
"repository": {
"type": "git",
"url": "https://github.com/webcomponents/webcomponentsjs.git"
},
"keywords": [
"webcomponents",
"web-components",
"polyfill",
"shim"
],
"license": "BSD-3-Clause",
"ignore": [],
"devDependencies": {
"web-component-tester": "^v6.0.0"
}
}

View File

@@ -0,0 +1,16 @@
(function () {
'use strict';
(()=>{'use strict';if(!window.customElements)return;const a=window.HTMLElement,b=window.customElements.define,c=window.customElements.get,d=new Map,e=new Map;let f=!1,g=!1;window.HTMLElement=function(){if(!f){const a=d.get(this.constructor),b=c.call(window.customElements,a);g=!0;const e=new b;return e}f=!1;},window.HTMLElement.prototype=a.prototype;Object.defineProperty(window,'customElements',{value:window.customElements,configurable:!0,writable:!0}),Object.defineProperty(window.customElements,'define',{value:(c,h)=>{const i=h.prototype,j=class extends a{constructor(){super(),Object.setPrototypeOf(this,i),g||(f=!0,h.call(this)),g=!1;}},k=j.prototype;j.observedAttributes=h.observedAttributes,k.connectedCallback=i.connectedCallback,k.disconnectedCallback=i.disconnectedCallback,k.attributeChangedCallback=i.attributeChangedCallback,k.adoptedCallback=i.adoptedCallback,d.set(h,c),e.set(c,h),b.call(window.customElements,c,j);},configurable:!0,writable:!0}),Object.defineProperty(window.customElements,'get',{value:(a)=>e.get(a),configurable:!0,writable:!0});})();
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
}());

View File

@@ -0,0 +1,16 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: Custom Elements ES5 Shim
*/
import '../node_modules/@webcomponents/custom-elements/src/native-shim.js';

View File

@@ -0,0 +1,21 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: HTML Imports, Custom Elements
* Used in: Safari 10, Firefox once SD is shipped
*/
import '../node_modules/@webcomponents/html-imports/src/html-imports.js';
import '../node_modules/@webcomponents/custom-elements/src/custom-elements.js';
import '../src/post-polyfill.js';
import '../src/unresolved.js';

View File

@@ -0,0 +1,20 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: HTML Imports
* Used in: Safari Tech Preview
*/
import '../node_modules/@webcomponents/html-imports/src/html-imports.js';
import '../src/post-polyfill.js';
import '../src/unresolved.js';

View File

@@ -0,0 +1,22 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: HTML Imports, Custom Elements, Shady DOM/Shady CSS
* Used in: Safari 9, Firefox, Edge
*/
import '../node_modules/@webcomponents/html-imports/src/html-imports.js';
import '../node_modules/@webcomponents/shadydom/src/shadydom.js';
import '../node_modules/@webcomponents/custom-elements/src/custom-elements.js';
import '../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js';
import '../src/post-polyfill.js';
import '../src/unresolved.js';

View File

@@ -0,0 +1,26 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: HTML Imports, Custom Elements, Shady DOM/Shady CSS, platform polyfills, template
* Used in: IE 11
*/
import '../node_modules/@webcomponents/webcomponents-platform/webcomponents-platform.js';
import '../node_modules/@webcomponents/template/template.js';
import '../src/promise.js';
import '../node_modules/@webcomponents/html-imports/src/html-imports.js';
import '../src/pre-polyfill.js';
import '../node_modules/@webcomponents/shadydom/src/shadydom.js';
import '../node_modules/@webcomponents/custom-elements/src/custom-elements.js';
import '../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js';
import '../src/post-polyfill.js';
import '../src/unresolved.js';

View File

@@ -0,0 +1,42 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/*
* Polyfills loaded: Custom Elements, Shady DOM/Shady CSS
* Used in: Safari 9, Firefox, Edge
*/
import '../node_modules/@webcomponents/shadydom/src/shadydom.js';
import '../node_modules/@webcomponents/custom-elements/src/custom-elements.js';
import '../node_modules/@webcomponents/shadycss/entrypoints/scoping-shim.js';
let document = window.document;
// global for (1) existence means `WebComponentsReady` will file,
// (2) WebComponents.ready == true means event has fired.
window.WebComponents = window.WebComponents || {};
function fire() {
requestAnimationFrame(() => {
window.WebComponents.ready = true;
window.document.dispatchEvent(new CustomEvent('WebComponentsReady', { bubbles: true }));
})
}
function wait() {
fire();
document.removeEventListener('readystatechange', wait);
}
if (document.readyState !== 'loading') {
fire();
} else {
document.addEventListener('readystatechange', wait);
}

View File

@@ -0,0 +1,25 @@
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*
* @fileoverview Symbols needed to compile webcomponents
* @externs
*/
var require;
var global;
var ES6Promise;
var process;
var define;
var module;
var exports;
var ShadyDOM;
var WebComponents;
/** @type !Function */
Promise.cast;

View File

@@ -0,0 +1,176 @@
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
/* eslint-env node */
/* eslint-disable no-console */
const gulp = require('gulp');
const sourcemaps = require('gulp-sourcemaps');
const rename = require('gulp-rename');
const rollup = require('rollup-stream');
const source = require('vinyl-source-stream');
const del = require('del');
const runseq = require('run-sequence');
const closure = require('google-closure-compiler').gulp();
const babel = require('rollup-plugin-babel');
function debugify(sourceName, fileName, extraRollupOptions) {
if (!fileName)
fileName = sourceName;
const options = {
entry: `./entrypoints/${sourceName}-index.js`,
format: 'iife',
moduleName: 'webcomponentsjs'
};
Object.assign(options, extraRollupOptions);
return rollup(options)
.pipe(source(`${sourceName}-index.js`), 'entrypoints')
.pipe(rename(fileName + '.js'))
.pipe(gulp.dest('./'))
}
function closurify(sourceName, fileName) {
if (!fileName) {
fileName = sourceName;
}
const closureOptions = {
new_type_inf: true,
compilation_level: 'ADVANCED',
language_in: 'ES6_STRICT',
language_out: 'ES5_STRICT',
isolation_mode: 'IIFE',
assume_function_wrapper: true,
js_output_file: `${fileName}.js`,
warning_level: 'VERBOSE',
rewrite_polyfills: false,
module_resolution: 'NODE',
entry_point: `entrypoints/${sourceName}-index.js`,
dependency_mode: 'STRICT',
externs: [
'externs/webcomponents.js',
'node_modules/@webcomponents/custom-elements/externs/custom-elements.js',
'node_modules/@webcomponents/html-imports/externs/html-imports.js',
'node_modules/@webcomponents/shadycss/externs/shadycss-externs.js',
'node_modules/@webcomponents/shadydom/externs/shadydom.js'
]
};
return gulp.src([
'entrypoints/*.js',
'src/*.js',
'node_modules/es6-promise/lib/es6-promise/**/*.js',
'node_modules/@webcomponents/**/*.js',
'!node_modules/@webcomponents/*/externs/*.js',
'!node_modules/@webcomponents/*/node_modules/**',
'!**/bower_components/**'
], {base: './', follow: true})
.pipe(sourcemaps.init())
.pipe(closure(closureOptions))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('.'));
}
gulp.task('debugify-hi', () => {
return debugify('webcomponents-hi')
});
gulp.task('debugify-hi-ce', () => {
return debugify('webcomponents-hi-ce')
});
gulp.task('debugify-hi-sd-ce', () => {
return debugify('webcomponents-hi-sd-ce')
});
gulp.task('debugify-hi-sd-ce-pf', () => {
// The es6-promise polyfill needs to set the correct context.
// See https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
const extraOptions = {context: 'window'};
return debugify('webcomponents-hi-sd-ce-pf', 'webcomponents-lite', extraOptions)
});
gulp.task('debugify-sd-ce', () => {
return debugify('webcomponents-sd-ce')
});
gulp.task('closurify-hi', () => {
return closurify('webcomponents-hi')
});
gulp.task('closurify-hi-ce', () => {
return closurify('webcomponents-hi-ce')
});
gulp.task('closurify-hi-sd-ce', () => {
return closurify('webcomponents-hi-sd-ce')
});
gulp.task('closurify-hi-sd-ce-pf', () => {
return closurify('webcomponents-hi-sd-ce-pf', 'webcomponents-lite')
});
gulp.task('closurify-sd-ce', () => {
return closurify('webcomponents-sd-ce')
});
function singleLicenseComment() {
let hasLicense = false;
return (comment) => {
if (hasLicense) {
return false;
}
return hasLicense = /@license/.test(comment);
}
}
const babelOptions = {
presets: 'minify',
shouldPrintComment: singleLicenseComment()
};
gulp.task('debugify-ce-es5-adapter', () => {
return debugify('custom-elements-es5-adapter', '', {plugins: [babel(babelOptions)]});
});
gulp.task('default', ['closure']);
gulp.task('clean-builds', () => {
return del(['custom-elements-es5-adapter.js{,.map}', 'webcomponents*.js{,.map}', '!webcomponents-loader.js']);
});
gulp.task('debug', (cb) => {
const tasks = [
'debugify-hi',
'debugify-hi-ce',
'debugify-hi-sd-ce',
'debugify-hi-sd-ce-pf',
'debugify-sd-ce',
'debugify-ce-es5-adapter'
];
runseq('clean-builds', tasks, cb);
});
gulp.task('closure', (cb) => {
const tasks = [
'closurify-hi',
'closurify-hi-ce',
'closurify-hi-sd-ce',
'closurify-hi-sd-ce-pf',
'closurify-sd-ce',
'debugify-ce-es5-adapter'
];
runseq('clean-builds', ...tasks, cb);
});

9601
bower_components/webcomponentsjs/package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
{
"name": "@webcomponents/webcomponentsjs",
"version": "1.0.20",
"description": "Web Components Polyfills",
"main": "webcomponents-lite.js",
"directories": {
"test": "tests"
},
"keywords": [
"webcomponents",
"web-components",
"polyfill",
"shim"
],
"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": {
"build": "gulp",
"test": "wct"
},
"homepage": "https://webcomponents.org/polyfills",
"devDependencies": {
"@webcomponents/custom-elements": "^1.0.6",
"@webcomponents/html-imports": "^1.0.3",
"@webcomponents/shadycss": "^1.1.0",
"@webcomponents/shadydom": "^1.0.9",
"@webcomponents/template": "^1.2.0",
"@webcomponents/webcomponents-platform": "^1.0.0",
"babel-preset-minify": "^0.2.0",
"del": "^3.0.0",
"es6-promise": "^4.1.1",
"eslint": "^4.12.0",
"google-closure-compiler": "^20171112.0.0",
"gulp": "^3.8.8",
"gulp-add-src": "^0.2.0",
"gulp-header": "^1.8.9",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^2.4.1",
"rollup-plugin-babel": "^2.7.1",
"rollup-stream": "=1.23",
"run-sequence": "^2.0.0",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0",
"web-component-tester": "^6.4.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -0,0 +1,63 @@
/**
* @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
*/
'use strict';
let customElements = window['customElements'];
let HTMLImports = window['HTMLImports'];
let Template = window['HTMLTemplateElement'];
// global for (1) existence means `WebComponentsReady` will file,
// (2) WebComponents.ready == true means event has fired.
window.WebComponents = window.WebComponents || {};
if (customElements && customElements['polyfillWrapFlushCallback']) {
// Here we ensure that the public `HTMLImports.whenReady`
// always comes *after* custom elements have upgraded.
let flushCallback;
let runAndClearCallback = function runAndClearCallback() {
if (flushCallback) {
// make sure to run the HTMLTemplateElement polyfill before custom elements upgrade
if (Template.bootstrap) {
Template.bootstrap(window.document);
}
let cb = flushCallback;
flushCallback = null;
cb();
return true;
}
}
let origWhenReady = HTMLImports['whenReady'];
customElements['polyfillWrapFlushCallback'](function(cb) {
flushCallback = cb;
origWhenReady(runAndClearCallback);
});
HTMLImports['whenReady'] = function(cb) {
origWhenReady(function() {
// custom element code may add dynamic imports
// to match processing of native custom elements before
// domContentLoaded, we wait for these imports to resolve first.
if (runAndClearCallback()) {
HTMLImports['whenReady'](cb);
} else {
cb();
}
});
}
}
HTMLImports['whenReady'](function() {
requestAnimationFrame(function() {
window.WebComponents.ready = true;
document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));
});
});

View File

@@ -0,0 +1,63 @@
/**
* @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
*/
'use strict';
// Establish scope.
window['WebComponents'] = window['WebComponents'] || {'flags':{}};
// loading script
let file = 'webcomponents-lite.js';
let script = document.querySelector('script[src*="' + file + '"]');
let flagMatcher = /wc-(.+)/;
// Flags. Convert url arguments to flags
let flags = {};
if (!flags['noOpts']) {
// from url
location.search.slice(1).split('&').forEach(function(option) {
let parts = option.split('=');
let match;
if (parts[0] && (match = parts[0].match(flagMatcher))) {
flags[match[1]] = parts[1] || true;
}
});
// from script
if (script) {
for (let i=0, a; (a=script.attributes[i]); i++) {
if (a.name !== 'src') {
flags[a.name] = a.value || true;
}
}
}
// log flags
if (flags['log'] && flags['log']['split']) {
let parts = flags['log'].split(',');
flags['log'] = {};
parts.forEach(function(f) {
flags['log'][f] = true;
});
} else {
flags['log'] = {};
}
}
// exports
window['WebComponents']['flags'] = flags;
let forceShady = flags['shadydom'];
if (forceShady) {
window['ShadyDOM'] = window['ShadyDOM'] || {};
window['ShadyDOM']['force'] = forceShady;
}
let forceCE = flags['register'] || flags['ce'];
if (forceCE && window['customElements']) {
window['customElements']['forcePolyfill'] = forceCE;
}

View File

@@ -0,0 +1,26 @@
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';
import ES6Promise from '../node_modules/es6-promise/lib/es6-promise/promise.js';
/*
Assign the ES6 promise polyfill to window ourselves instead of using the "auto" polyfill
to work around https://github.com/webcomponents/webcomponentsjs/issues/837
*/
if (!window.Promise) {
window.Promise = ES6Promise;
// save Promise API
ES6Promise.prototype['catch'] = ES6Promise.prototype.catch;
ES6Promise.prototype['then'] = ES6Promise.prototype.then;
ES6Promise['all'] = ES6Promise.all;
ES6Promise['race'] = ES6Promise.race;
ES6Promise['resolve'] = ES6Promise.resolve;
ES6Promise['reject'] = ES6Promise.reject;
}

View File

@@ -0,0 +1,31 @@
/**
* @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
*/
'use strict';
// 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.
//
// NOTE: position: relative fixes IE's failure to inherit opacity
// when a child is not statically positioned.
let 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'
;
let head = document.querySelector('head');
head.insertBefore(style, head.firstChild);

View File

@@ -0,0 +1,46 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
test('import upgrade async', function(done) {
function testImports() {
// import upgraded
assert.ok(a1);
assert.isTrue(isA1Upgraded);
// order expected
assert.deepEqual(a1DocsList, ['a1-instance.html', 'a1-reference.html']);
// style applied at upgrade time
if (window.HTMLImports) {
assert.isTrue(styleAppliedToDocument);
}
done();
}
// be async
setTimeout(function() {
var l = document.createElement('link');
l.rel = 'import';
l.href = 'imports/a1-import.html';
l.addEventListener('load', testImports);
document.head.appendChild(l);
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/a1-import.html">
</head>
<body>
<script>
test('import upgrade', function() {
// import upgraded
assert.ok(a1);
assert.isTrue(isA1Upgraded);
// order expected
assert.deepEqual(a1DocsList, ['a1-instance.html', 'a1-reference.html']);
assert.isTrue(styleAppliedToDocument);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,38 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<x-foo></x-foo>
<script>
test('ce-import', function(done) {
var xfoo = document.querySelector('x-foo');
assert.isUndefined(xfoo.isCreated);
var link = document.createElement('link');
link.rel = 'import';
link.href = 'imports/element-import.html';
document.head.appendChild(link);
link.addEventListener('load', function() {
assert.isTrue(xfoo.isCreated, 'element in main document, registered in dynamic import is upgraded');
var ix = link.import.querySelector('x-foo');
assert.isTrue(ix.isCreated, 'element in import, registered in dynamic import is upgraded');
done();
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<!doctype html>
<!--
@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
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Custom Element Upgrade Order</title>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/import-upgrade-order.html">
</head>
<body>
<x-foo id="main"></x-foo>
<script>
suite('Custom Element upgrade', function() {
test('upgrade order', function() {
var order = [];
class XFoo extends HTMLElement {
connectedCallback() {
order.push(this.id);
}
}
window.customElements.define('x-foo', XFoo);
assert.deepEqual(order, ['import', 'main'], 'elements are upgraded in imports before main document');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,56 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script>
WCT = {
waitFor: function(cb) {
cb();
}
}
</script>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/element-import-a.html">
</head>
<body>
<x-test></x-test>
<script>
var created = 0;
function register() {
class XTest extends HTMLElement {
connectedCallback() {
created++;
}
}
window.customElements.define('x-test', XTest);
}
test('upgraded document tree', function(done) {
if (CustomElements.useNative || !window.HTMLImports) {
return done();
} else {
window.addEventListener('WebComponentsReady', function() {
CustomElements.ready = false;
register();
assert.equal(created, 0, 'no elements created when ready explicitly set to false');
CustomElements.upgradeDocumentTree(document);
assert.equal(created, 3, 'elements in document tree upgraded via CustomElements.upgradeDocumentTree');
done();
});
}
});
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-lite.js?0.13513513" log="foo,boo" squid="never" spoo></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
suite('Development Loader Swizzeled', function() {
test('loader swizzeled', function() {
assert(window.WebComponents, 'Platform scope missing');
assert.equal(WebComponents.flags.squid, 'never', '"squid" flag missing');
assert(WebComponents.flags.spoo, '"spoo" flag missing');
assert(WebComponents.flags.log, 'flags.log missing');
assert(WebComponents.flags.log.foo, 'flags.log.foo missing');
assert(WebComponents.flags.log.boo, 'flags.log.foo missing');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-lite.js" log="foo,boo" squid="never" spoo></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
suite('Development Loader', function() {
test('loader', function() {
assert(window.WebComponents, 'WebComponents scope missing');
assert.equal(WebComponents.flags.squid, 'never', '"squid" flag missing');
assert(WebComponents.flags.spoo, '"spoo" flag missing');
assert(WebComponents.flags.log, 'flags.log missing');
assert(WebComponents.flags.log.foo, 'flags.log.foo missing');
assert(WebComponents.flags.log.boo, 'flags.log.foo missing');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<!doctype html>
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Force polyfills</title>
<meta charset="UTF-8">
<script>
window.ShadyDOM = {
force: true
};
if (window.customElements) customElements.forcePolyfill = true;
window.webComponentsReadyCount = 0;
window.addEventListener('WebComponentsReady', function() {
window.webComponentsReadyCount++;
});
</script>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
suite('Force polyfill', function() {
test('expected boot', function() {
assert.equal(window.webComponentsReadyCount, 1, 'failed to fire WebComponentsReady');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<!--
@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
-->
<script>
(function() {
window.a1DocsList = [];
class A1 extends HTMLElement {
connectedCallback() {
a1DocsList.push(this.ownerDocument.baseURI.split('/').pop());
this.isA1 = true;
}
}
window.customElements.define('a-1', A1);
class SpecialStyle extends HTMLStyleElement {
connectedCallback() {
window.styleAppliedToDocument = Boolean(this.__appliedElement);
}
}
window.customElements.define('special-style', SpecialStyle);
})();
</script>

View File

@@ -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
-->
<link rel="import" href="a1-define.html">
<link rel="import" href="a1-reference.html">

View File

@@ -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
-->
<a-1></a-1>
<style is="special-style"></style>

View File

@@ -0,0 +1,19 @@
<!--
@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="a1-instance.html">
<a-1></a-1>
<script>
// can reference upgraded instance in previous import when this script runs
var currentScript = document._currentScript || document.currentScript;
var l = currentScript.ownerDocument.querySelector('link');
var a1 = l.import.querySelector('a-1');
window.a1 = a1;
window.isA1Upgraded = a1.isA1;
</script>

View File

@@ -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
-->
<link rel="import" href="csp-import-2.html">
<script src="csp-script-1.js"></script>

View File

@@ -0,0 +1,10 @@
<!--
@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
-->
<script src="csp-script-2.js"></script>

View File

@@ -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
*/
window.externalScriptParsed1 = new Date().getTime();

View File

@@ -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
*/
window.externalScriptParsed2 = new Date().getTime();

View File

@@ -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
*/
remoteCurrentScriptExecuted = window.remoteCurrentScriptExecuted || 0;
remoteCurrentScriptExecuted++;
assert.ok(document._currentScript);

View File

@@ -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
-->
<x-test></x-test>
<link rel="import" href="element-import-b.html">

View File

@@ -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
-->
<x-test></x-test>
<link rel="import" href="element-import-a.html">

View File

@@ -0,0 +1,20 @@
<!--
@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
-->
<x-foo></x-foo>
<script>
(function() {
class XFoo extends HTMLElement {
connectedCallback() {
this.isCreated = true;
}
}
window.customElements.define('x-foo', XFoo);
})();
</script>

View File

@@ -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
-->
<script>
window.importTest = true;
</script>

View File

@@ -0,0 +1,10 @@
<!--
@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
-->
<x-foo id="import"></x-foo>

View File

@@ -0,0 +1,16 @@
<!--
@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
-->
<div>me</div>
<script>
var d = document._currentScript.ownerDocument.querySelector('div');
assert.ok(document._currentScript);
assert.equal(d.innerHTML, 'me', '_currentScript can locate element in import')
</script>
<script src="current-script.js"></script>

View File

@@ -0,0 +1,15 @@
<!--
@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
-->
<div>me2</div>
<script>
var d = document._currentScript.ownerDocument.querySelector('div');
assert.equal(d.innerText, 'me2', '_currentScript can locate element in import')
</script>
<link rel="import" href="script-2.html">

View File

@@ -0,0 +1,54 @@
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script>
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// Kick off shady CSS.
var template = document.createElement('template');
template.innerHTML =
`
<style>:host {color: blue;} .red-text {color: red;} </style>
<p class="red-text">Shadow DOM</p>
<slot id="slot"></slot>
`;
if (template) {
if (window.ShadyCSS) {
window.ShadyCSS.prepareTemplate(template, 'simple-element');
}
}
var SimpleElement = function (_HTMLElement) {
_inherits(SimpleElement, _HTMLElement);
function SimpleElement() {
_classCallCheck(this, SimpleElement);
var _this = _possibleConstructorReturn(this, (SimpleElement.__proto__ || Object.getPrototypeOf(SimpleElement)).call(this));
_this.bestName = 'batman';
if (window.ShadyCSS) {
window.ShadyCSS.styleElement(_this);
}
if (template && !_this.shadowRoot) {
_this.attachShadow({ mode: 'open' });
_this.shadowRoot.appendChild(document.importNode(template.content, true));
}
return _this;
}
return SimpleElement;
}(HTMLElement);
window.customElements.define('simple-element', SimpleElement);
</script>

View File

@@ -0,0 +1,42 @@
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script>
// Kick off shady CSS.
var template = document.createElement('template');
template.innerHTML =
`
<style>:host {color: blue;} .red-text {color: red;} </style>
<p class="red-text">Shadow DOM</p>
<slot id="slot"></slot>
`;
if (template) {
if (window.ShadyCSS) {
window.ShadyCSS.prepareTemplate(template, 'simple-element');
}
}
class SimpleElement extends HTMLElement {
constructor() {
super();
this.bestName = 'batman';
if (window.ShadyCSS) {
window.ShadyCSS.styleElement(this);
}
if (template && !this.shadowRoot) {
this.attachShadow({mode: 'open'});
this.shadowRoot.appendChild(document.importNode(template.content, true));
}
}
}
window.customElements.define('simple-element', SimpleElement);
</script>

View File

@@ -0,0 +1,62 @@
<!doctype html>
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Integration Test</title>
<script src="../custom-elements-es5-adapter.js"></script>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/simple-element-es5.html">
</head>
<body>
<!-- Don't break this into multiple lines or you'll have to count text nodes -->
<simple-element id="basic"><span>Light DOM</span></simple-element>
<script>
suite('integration es5', function() {
var el;
setup(function() {
el = document.querySelector('#basic');
});
test('element is imported & upgraded', function() {
assert.equal(el.bestName, 'batman',
'doesn\'t have property set in constructor');
});
test('element has shadow DOM content', function() {
var shadowRoot = el.shadowRoot;
assert.ok(shadowRoot, 'does not have a shadow root');
assert.equal(shadowRoot.querySelector('p').textContent, 'Shadow DOM',
'does not have <p> in the shadow dom');
assert.equal(getComputedStyle(shadowRoot.querySelector('p')).color, 'rgb(255, 0, 0)',
'does not style <p> in the shadow dom');
});
test('element has distributed content', function() {
var slot = el.shadowRoot.querySelector('slot');
assert.ok(slot, 'does not have a slot');
var distributedNodes = slot.assignedNodes()
assert.equal(distributedNodes.length, 1,
'does not have exactly one element distributed');
assert.equal(distributedNodes[0].textContent, 'Light DOM',
'does not have the right content distributed');
assert.equal(getComputedStyle(distributedNodes[0]).color, 'rgb(0, 0, 255)',
'does not style light dom');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<!doctype html>
<!--
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Integration Test</title>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/simple-element.html">
</head>
<body>
<!-- Don't break this into multiple lines or you'll have to count text nodes -->
<simple-element id="basic"><span>Light DOM</span></simple-element>
<script>
suite('integration', function() {
var el;
setup(function() {
el = document.querySelector('#basic');
});
test('element is imported & upgraded', function() {
assert.equal(el.bestName, 'batman',
'doesn\'t have property set in constructor');
});
test('element has shadow DOM content', function() {
var shadowRoot = el.shadowRoot;
assert.ok(shadowRoot, 'does not have a shadow root');
assert.equal(shadowRoot.querySelector('p').textContent, 'Shadow DOM',
'does not have <p> in the shadow dom');
assert.equal(getComputedStyle(shadowRoot.querySelector('p')).color, 'rgb(255, 0, 0)',
'does not style <p> in the shadow dom');
});
test('element has distributed content', function() {
var slot = el.shadowRoot.querySelector('slot');
assert.ok(slot, 'does not have a slot');
var distributedNodes = slot.assignedNodes()
assert.equal(distributedNodes.length, 1,
'does not have exactly one element distributed');
assert.equal(distributedNodes[0].textContent, 'Light DOM',
'does not have the right content distributed');
assert.equal(getComputedStyle(distributedNodes[0]).color, 'rgb(0, 0, 255)',
'does not style light dom');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,53 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script>
window.addEventListener('HTMLImportsLoaded', function() {
window.importsOk = true;
});
window.webComponentsReadyCount = 0;
document.addEventListener('WebComponentsReady', function() {
window.webComponentsReadyCount++;
});
</script>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<link rel="import" href="imports/import-file.html">
</head>
<body>
<my-element></my-element>
<script>
window.addEventListener('WebComponentsReady', () => {
class MyElement extends HTMLElement {
connectedCallback(){
this.textContent = 'upgraded!';
}
}
customElements.define('my-element', MyElement);
});
suite('Loader', function() {
test('expected boot', function() {
assert.equal(window.webComponentsReadyCount, 1, 'failed to fire WebComponentsReady');
if (window.HTMLImports) {
assert.ok(window.importsOk, 'WebComponentsReady without HTMLImportsLoaded');
}
assert.ok(window.importTest, 'import failed to set global value');
});
test('WebComponentsReady was fired on document and bubbled', function() {
assert.equal(document.querySelector('my-element').textContent, 'upgraded!');
})
});
</script>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!doctype html>
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Test Promise Polyfill</title>
<script>window.Promise = null;</script>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<script>
suite('Promise', () => {
test('Promise exists', () => {
assert(window.Promise);
});
test('resolve', () => {
return Promise.resolve('hi!');
});
test('reject', () => {
return Promise.reject('foo').then(() => {throw 'nope!'}, () => {});
});
test('race', () => {
return Promise.race([Promise.resolve(), Promise.resolve()]);
});
test('all', () => {
return Promise.all([Promise.resolve(), Promise.resolve()]);
});
test('catch', () => {
return Promise.reject('nope!').catch(() => {});
});
test('then', () => {
return Promise.resolve().then(() => {});
});
})
</script>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<!doctype html>
<!--
@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
-->
<title>All WebComponents Tests</title>
<meta charset="utf-8">
<!-- WebComponents -->
<script src="../../web-component-tester/browser.js"></script>
<script>
WCT.loadSuites([
'template-and-CE.html',
// 'template-and-imports.html',
'integration.html',
'integration-es5.html',
'load.html',
'force-polyfills.html',
'dev-loader.html',
'dev-loader-swizzled.html',
// 'smoke.html',
// 'ce-import.html',
// 'ce-upgradedocumenttree.html', // Does not exist in the v1 polyfill
'ce-upgrade-order.html',
// 'ce-import-upgrade.html', // Order of upgrade/import is different in v1
// 'ce-import-upgrade-async.html',
'promise.html'
]);
</script>

View File

@@ -0,0 +1,53 @@
<!doctype html>
<!--
@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
-->
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<x-foo>plain</x-foo>
<script>
test('smoke', function(done) {
class XFoo extends HTMLElement {
connectedCallback() {
this.textContent = 'x-foo!';
}
}
window.customElements.define('x-foo', XFoo);
assert.equal(document.querySelector('x-foo').textContent, 'x-foo!',
'x-foo must have custom text');
class XZot extends HTMLElement {
connectedCallback() {
this.textContent = 'x-zot!';
}
}
window.customElements.define('x-zot', XZot);
var xfoo = document.querySelector('x-foo');
var root = xfoo.attachShadow({mode: 'open'});
var xzot = document.createElement('x-zot');
var handler = function() {
assert.equal(xzot.textContent, 'custom!', 'x-zot in shadow root must have custom text');
done();
}
var ob = new MutationObserver(handler);
ob.observe(root, {childList: true, subtree: true});
root.appendChild(xzot);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,67 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Template with HTMLImports Test</title>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<body>
<template>
<x-child></x-child>
</template>
<template id="before"></template>
<x-after></x-after>
<script>
var created = [];
var attached = [];
var childCreated = false;
var foundTemplate = false;
class XChild extends HTMLElement {
constructor() {
super();
this.custom = true;
childCreated = true;
}
}
class XAfter extends HTMLElement {
constructor() {
super();
this.custom = true;
var template = document.querySelector('#before');
if (template && template.content) {
foundTemplate = true;
}
}
}
window.customElements.define('x-child', XChild);
window.customElements.define('x-after', XAfter);
suite('template and custom elements', function() {
test('elements within templates not upgraded', function() {
assert(!childCreated);
});
test('templates before elements are bootstrapped before createdCallback', function() {
assert(foundTemplate);
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,58 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<title>Template with HTMLImports Test</title>
<script src="../webcomponents-loader.js"></script>
<script src="../../web-component-tester/browser.js"></script>
</head>
<body>
<template id="one">
<link rel="import" href="imports/script-1.html">
</template>
<template id="two">
<link rel="import" href="imports/csp-import-1.html">
</template>
<script>
suite('basic', function() {
var templateOne;
var templateTwo;
setup(function() {
templateOne = document.querySelector('template#one');
templateTwo = document.querySelector('template#two');
});
teardown(function() {
window.remoteCurrentScriptExecuted = undefined;
window.externalScriptParsed1 = undefined;
});
test('links are not imported before stamping', function() {
assert.equal(window.remoteCurrentScriptExecuted, undefined);
assert.equal(window.externalScriptParsed1, undefined);
});
test('links are imported when stamped', function(done) {
document.head.appendChild(document.importNode(templateTwo.content, true));
var imp = document.querySelector('[href="imports/csp-import-1.html"]');
imp.addEventListener('load', function() {
assert.ok(window.externalScriptParsed1);
done();
});
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,6 @@
{
"suites": ["tests/runner.html"],
"clientOptions": {
"environmentImports": []
}
}

View File

@@ -0,0 +1,69 @@
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var d=document.createEvent("CustomEvent");d.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return d}function c(a){if(n)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!k(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not([import-dependency])"),
d=b.length;d?h(b,function(b){return l(b,function(){0===--d&&a()})}):a()}function e(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&a()})})}function l(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var d=function(c){a.removeEventListener(c.type,
d);a.__loaded=!0;b&&b()};a.addEventListener("load",d);H&&"style"===a.localName||a.addEventListener("error",d)}}function k(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function g(){var a=this;this.a={};this.b=0;this.g=new MutationObserver(function(b){return a.L(b)});this.g.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function h(a,b,d){var c=a?a.length:0,e=d?-1:1;for(d=d?c-1:0;d<c&&0<=d;d+=e)b(a[d],d)}var n="import"in document.createElement("link"),
I=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return I||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var ua=/(url\()([^)]*)(\))/g,va=/(@import[\s]+(?!url\())([^;]*)(;)/g,wa=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,r={J:function(a,b){a.href&&a.setAttribute("href",r.j(a.getAttribute("href"),b));a.src&&a.setAttribute("src",r.j(a.getAttribute("src"),b));if("style"===a.localName){var d=
r.D(a.textContent,b,ua);a.textContent=r.D(d,b,va)}},D:function(a,b,d){return a.replace(d,function(a,d,c,e){a=c.replace(/["']/g,"");b&&(a=r.j(a,b));return d+"'"+a+"'"+e})},j:function(a,b){if(void 0===r.l){r.l=!1;try{var d=new URL("b","http://a");d.pathname="c%20d";r.l="http://a/c%20d"===d.href}catch(Qa){}}if(r.l)return(new URL(a,b)).href;d=r.G;d||(d=document.implementation.createHTMLDocument("temp"),r.G=d,d.w=d.createElement("base"),d.head.appendChild(d.w),d.v=d.createElement("a"));d.w.href=b;d.v.href=
a;return d.v.href||a}},U={async:!0,load:function(a,b,d){if(a)if(a.match(/^data:/)){a=a.split(",");var c=a[1];c=-1<a[0].indexOf(";base64")?atob(c):decodeURIComponent(c);b(c)}else{var e=new XMLHttpRequest;e.open("GET",a,U.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var c=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(c,a):d(c)};e.send()}else d("error: href must be specified")}},
H=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);g.prototype.c=function(a){var b=this;h(a.querySelectorAll("link[rel=import]"),function(a){return b.B(a)})};g.prototype.B=function(a){var b=this,d=a.href;if(void 0!==this.a[d]){var c=this.a[d];c&&c.__loaded&&(a.import=c,this.A(a))}else this.b++,this.a[d]="pending",U.load(d,function(a,c){a=b.M(a,c||d);b.a[d]=a;b.b--;b.c(a);b.C()},function(){b.a[d]=null;b.b--;b.C()})};g.prototype.M=function(a,b){if(!a)return document.createDocumentFragment();
H&&(a=a.replace(wa,function(a,b,d){return-1===a.indexOf("type=")?b+" type=import-disable "+d:a}));var d=document.createElement("template");d.innerHTML=a;if(d.content)a=d.content;else for(a=document.createDocumentFragment();d.firstChild;)a.appendChild(d.firstChild);if(d=a.querySelector("base"))b=r.j(d.getAttribute("href"),b),d.removeAttribute("href");var c=0;h(a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]'),
function(a){l(a);r.J(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(c?"-"+c:"")+".js\n"))),a.textContent="",c++)});return a};g.prototype.C=function(){var a=this;if(!this.b){this.g.disconnect();this.flatten(document);var b=!1,d=!1,c=function(){d&&b&&(a.c(document),a.b||(a.g.observe(document.head,{childList:!0,subtree:!0}),a.K()))};this.P(function(){d=
!0;c()});this.N(function(){b=!0;c()})}};g.prototype.flatten=function(a){var b=this;h(a.querySelectorAll("link[rel=import]"),function(a){var d=b.a[a.href];(a.import=d)&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(d),a.appendChild(d))})};g.prototype.N=function(a){function b(e){if(e<c){var f=d[e],k=document.createElement("script");f.removeAttribute("import-dependency");h(f.attributes,function(a){return k.setAttribute(a.name,a.value)});I=k;f.parentNode.replaceChild(k,
f);l(k,function(){I=null;b(e+1)})}else a()}var d=document.querySelectorAll("script[import-dependency]"),c=d.length;b(0)};g.prototype.P=function(a){var b=document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=H&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");h(b,function(b){l(b,function(){b.removeAttribute("import-dependency");0===--d&&a()});if(e&&b.parentNode!==document.head){var f=document.createElement(b.localName);
f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};g.prototype.K=function(){var a=this;h(document.querySelectorAll("link[rel=import]"),function(b){return a.A(b)},!0)};g.prototype.A=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,
cancelable:!1,detail:void 0})))};g.prototype.L=function(a){var b=this;h(a,function(a){return h(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(k(a)?b.B(a):b.c(a))})})};if(n){h(document.querySelectorAll("link[rel=import]"),function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});var V=function(a){a=a.target;k(a)&&(a.__loaded=!0)};document.addEventListener("load",V,!0);document.addEventListener("error",V,!0)}else{var z=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");
Object.defineProperty((!z||z.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=k(this)?this:c(this);return a?a.href:z&&z.get?z.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new g})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=n;a.whenReady=f;a.importForElement=c})(window.HTMLImports=window.HTMLImports||{});var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function m(a){var b=aa.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function p(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}
function q(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
function t(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)t(d,b,c);d=q(a,e);continue}else if("template"===f){d=q(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,b,c)}d=d.firstChild?d.firstChild:q(a,d)}}function u(a,b,c){a[b]=c};function v(){this.a=new Map;this.g=new Map;this.c=[];this.b=!1}function ba(a,b,c){a.a.set(b,c);a.g.set(c.constructor,c)}function w(a,b){a.b=!0;a.c.push(b)}function x(a,b){a.b&&t(b,function(b){return y(a,b)})}function y(a,b){if(a.b&&!b.__CE_patched){b.__CE_patched=!0;for(var c=0;c<a.c.length;c++)a.c[c](b)}}function A(a,b){var c=[];t(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):B(a,d)}}
function C(a,b){var c=[];t(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}}
function D(a,b,c){c=void 0===c?{}:c;var d=c.R||new Set,e=c.F||function(b){return B(a,b)},f=[];t(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);D(a,c,{R:f,F:e})}})}else f.push(b)},d);if(a.b)for(b=
0;b<f.length;b++)y(a,f[b]);for(b=0;b<f.length;b++)e(f[b])}
function B(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructor;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(l){throw b.__CE_state=2,l;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}p(b)&&a.connectedCallback(b)}}}v.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};v.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};
v.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};function E(a){var b=document;this.f=a;this.a=b;this.b=void 0;D(this.f,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.c.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function F(a){a.b&&a.b.disconnect()}E.prototype.c=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||F(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)D(this.f,c[d])};function ca(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function da(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function G(a){this.m=!1;this.f=a;this.u=new Map;this.o=function(a){return a()};this.h=!1;this.s=[];this.H=new E(a)}
G.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!m(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.f.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.m)throw Error("A custom element is already being defined.");this.m=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");
return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var l=d("disconnectedCallback");var k=d("adoptedCallback");var g=d("attributeChangedCallback");var h=b.observedAttributes||[]}catch(n){return}finally{this.m=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:l,adoptedCallback:k,attributeChangedCallback:g,observedAttributes:h,constructionStack:[]};ba(this.f,a,b);this.s.push(b);
this.h||(this.h=!0,this.o(function(){return ea(c)}))};function ea(a){if(!1!==a.h){a.h=!1;for(var b=a.s,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);D(a.f,document,{F:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.f.a.get(e)&&c.push(b)}}});for(e=0;e<c.length;e++)B(a.f,c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var l=0;l<f.length;l++)B(a.f,f[l]);(e=a.u.get(e))&&da(e)}}}G.prototype.get=function(a){if(a=this.f.a.get(a))return a.constructor};
G.prototype.whenDefined=function(a){if(!m(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.u.get(a);if(b)return b.c;b=new ca;this.u.set(a,b);this.f.a.get(a)&&!this.s.some(function(b){return b.localName===a})&&da(b);return b.c};G.prototype.O=function(a){F(this.H);var b=this.o;this.o=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=G;G.prototype.define=G.prototype.define;G.prototype.get=G.prototype.get;
G.prototype.whenDefined=G.prototype.whenDefined;G.prototype.polyfillWrapFlushCallback=G.prototype.O;var J=window.Document.prototype.createElement,fa=window.Document.prototype.createElementNS,ha=window.Document.prototype.importNode,ia=window.Document.prototype.prepend,ja=window.Document.prototype.append,ka=window.DocumentFragment.prototype.prepend,la=window.DocumentFragment.prototype.append,ma=window.Node.prototype.cloneNode,K=window.Node.prototype.appendChild,na=window.Node.prototype.insertBefore,L=window.Node.prototype.removeChild,oa=window.Node.prototype.replaceChild,M=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),pa=window.Element.prototype.attachShadow,N=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),O=window.Element.prototype.getAttribute,qa=window.Element.prototype.setAttribute,ra=window.Element.prototype.removeAttribute,P=window.Element.prototype.getAttributeNS,sa=window.Element.prototype.setAttributeNS,ta=window.Element.prototype.removeAttributeNS,xa=window.Element.prototype.insertAdjacentElement,ya=window.Element.prototype.prepend,za=window.Element.prototype.append,
Q=window.Element.prototype.before,Aa=window.Element.prototype.after,Ba=window.Element.prototype.replaceWith,Ca=window.Element.prototype.remove,Da=window.HTMLElement,R=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Ea=window.HTMLElement.prototype.insertAdjacentElement;var Fa=new function(){};function Ga(){var a=S;window.HTMLElement=function(){function b(){var b=this.constructor,d=a.g.get(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=J.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,y(a,e),e;d=e.length-1;var f=e[d];if(f===Fa)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=Fa;Object.setPrototypeOf(f,b.prototype);y(a,f);return f}b.prototype=Da.prototype;return b}()};function T(a,b,c){function d(b){return function(d){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];e=[];for(var f=[],h=0;h<c.length;h++){var n=c[h];n instanceof Element&&p(n)&&f.push(n);if(n instanceof DocumentFragment)for(n=n.firstChild;n;n=n.nextSibling)e.push(n);else e.push(n)}b.apply(this,c);for(c=0;c<f.length;c++)C(a,f[c]);if(p(this))for(c=0;c<e.length;c++)f=e[c],f instanceof Element&&A(a,f)}}void 0!==c.i&&(b.prepend=d(c.i));void 0!==c.append&&(b.append=d(c.append))};function Ha(){var a=S;u(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.a.get(b);if(c)return new c.constructor}b=J.call(this,b);y(a,b);return b});u(Document.prototype,"importNode",function(b,c){b=ha.call(this,b,c);this.__CE_hasRegistry?D(a,b):x(a,b);return b});u(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.a.get(c);if(d)return new d.constructor}b=fa.call(this,b,c);y(a,b);return b});
T(a,Document.prototype,{i:ia,append:ja})};function Ia(){var a=S;function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,k=e.length;if(0<k&&p(this)){c=Array(k);for(var g=0;g<k;g++)c[g]=e[g]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)C(a,c[b])}}})}u(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);
b=na.call(this,b,d);if(p(this))for(d=0;d<c.length;d++)A(a,c[d]);return b}c=p(b);d=na.call(this,b,d);c&&C(a,b);p(this)&&A(a,b);return d});u(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var d=Array.prototype.slice.apply(b.childNodes);b=K.call(this,b);if(p(this))for(var c=0;c<d.length;c++)A(a,d[c]);return b}d=p(b);c=K.call(this,b);d&&C(a,b);p(this)&&A(a,b);return c});u(Node.prototype,"cloneNode",function(b){b=ma.call(this,b);this.ownerDocument.__CE_hasRegistry?D(a,b):x(a,
b);return b});u(Node.prototype,"removeChild",function(b){var d=p(b),c=L.call(this,b);d&&C(a,b);return c});u(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=oa.call(this,b,d);if(p(this))for(C(a,d),d=0;d<c.length;d++)A(a,c[d]);return b}c=p(b);var f=oa.call(this,b,d),l=p(this);l&&C(a,d);c&&C(a,b);l&&A(a,b);return f});M&&M.get?b(Node.prototype,M):w(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=
[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)L.call(this,this.firstChild);K.call(this,document.createTextNode(a))}})})};function Ja(a){var b=Element.prototype;function c(b){return function(d){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];e=[];for(var k=[],g=0;g<c.length;g++){var h=c[g];h instanceof Element&&p(h)&&k.push(h);if(h instanceof DocumentFragment)for(h=h.firstChild;h;h=h.nextSibling)e.push(h);else e.push(h)}b.apply(this,c);for(c=0;c<k.length;c++)C(a,k[c]);if(p(this))for(c=0;c<e.length;c++)k=e[c],k instanceof Element&&A(a,k)}}void 0!==Q&&(b.before=c(Q));void 0!==Q&&(b.after=c(Aa));void 0!==Ba&&
u(b,"replaceWith",function(b){for(var d=[],c=0;c<arguments.length;++c)d[c-0]=arguments[c];c=[];for(var l=[],k=0;k<d.length;k++){var g=d[k];g instanceof Element&&p(g)&&l.push(g);if(g instanceof DocumentFragment)for(g=g.firstChild;g;g=g.nextSibling)c.push(g);else c.push(g)}k=p(this);Ba.apply(this,d);for(d=0;d<l.length;d++)C(a,l[d]);if(k)for(C(a,this),d=0;d<c.length;d++)l=c[d],l instanceof Element&&A(a,l)});void 0!==Ca&&u(b,"remove",function(){var b=p(this);Ca.call(this);b&&C(a,this)})};function Ka(){var a=S;function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;p(this)&&(e=[],t(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var h=e[f];1===h.__CE_state&&a.disconnectedCallback(h)}this.ownerDocument.__CE_hasRegistry?D(a,this):x(a,this);return b}})}function c(b,c){u(b,"insertAdjacentElement",function(b,d){var e=p(d);b=c.call(this,b,d);e&&C(a,d);p(b)&&A(a,d);
return b})}pa&&u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=pa.call(this,a)});N&&N.get?b(Element.prototype,N):R&&R.get?b(HTMLElement.prototype,R):w(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return ma.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,d=b?this.content:this,c=J.call(document,this.localName);for(c.innerHTML=a;0<d.childNodes.length;)L.call(d,d.childNodes[0]);for(a=b?c.content:c;0<a.childNodes.length;)K.call(d,
a.childNodes[0])}})});u(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return qa.call(this,b,c);var d=O.call(this,b);qa.call(this,b,c);c=O.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});u(Element.prototype,"setAttributeNS",function(b,c,f){if(1!==this.__CE_state)return sa.call(this,b,c,f);var d=P.call(this,b,c);sa.call(this,b,c,f);f=P.call(this,b,c);a.attributeChangedCallback(this,c,d,f,b)});u(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return ra.call(this,
b);var d=O.call(this,b);ra.call(this,b);null!==d&&a.attributeChangedCallback(this,b,d,null,null)});u(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return ta.call(this,b,c);var d=P.call(this,b,c);ta.call(this,b,c);var e=P.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});Ea?c(HTMLElement.prototype,Ea):xa?c(Element.prototype,xa):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");T(a,Element.prototype,{i:ya,append:za});Ja(a)}
;var W=window.customElements;if(!W||W.forcePolyfill||"function"!=typeof W.define||"function"!=typeof W.get){var S=new v;Ga();Ha();T(S,DocumentFragment.prototype,{i:ka,append:la});Ia();Ka();document.__CE_hasRegistry=!0;var customElements=new G(S);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var X=window.customElements,Y=window.HTMLImports,La=window.HTMLTemplateElement;window.WebComponents=window.WebComponents||{};if(X&&X.polyfillWrapFlushCallback){var Z,Ma=function(){if(Z){La.I&&La.I(window.document);var a=Z;Z=null;a();return!0}},Na=Y.whenReady;X.polyfillWrapFlushCallback(function(a){Z=a;Na(Ma)});Y.whenReady=function(a){Na(function(){Ma()?Y.whenReady(a):a()})}}
Y.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var Oa=document.createElement("style");Oa.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Pa=document.querySelector("head");Pa.insertBefore(Oa,Pa.firstChild);/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
}).call(this);
//# sourceMappingURL=webcomponents-hi-ce.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,176 @@
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';var n,p="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(){ba=function(){};p.Symbol||(p.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
function ea(){ba();var a=p.Symbol.iterator;a||(a=p.Symbol.iterator=p.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){ea();a={next:a};a[p.Symbol.iterator]=function(){return this};return a}function ia(a){ea();var b=a[Symbol.iterator];return b?b.call(a):fa(a)}
function ja(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}
(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(m)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!g(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not([import-dependency])"),
c=b.length;c?l(b,function(b){return h(b,function(){0===--c&&a()})}):a()}function e(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&a()})})}function h(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,
c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);Ja&&"style"===a.localName||a.addEventListener("error",c)}}function g(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function k(){var a=this;this.a={};this.b=0;this.f=new MutationObserver(function(b){return a.Ia(b)});this.f.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function l(a,b,c){var d=a?a.length:0,e=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=e)b(a[c],c)}var m="import"in document.createElement("link"),
q=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return q||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var E=/(url\()([^)]*)(\))/g,J=/(@import[\s]+(?!url\())([^;]*)(;)/g,Ld=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,z={Ca:function(a,b){a.href&&a.setAttribute("href",z.R(a.getAttribute("href"),b));a.src&&a.setAttribute("src",z.R(a.getAttribute("src"),b));if("style"===a.localName){var c=
z.ma(a.textContent,b,E);a.textContent=z.ma(c,b,J)}},ma:function(a,b,c){return a.replace(c,function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=z.R(a,b));return c+"'"+a+"'"+e})},R:function(a,b){if(void 0===z.W){z.W=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";z.W="http://a/c%20d"===c.href}catch(Bf){}}if(z.W)return(new URL(a,b)).href;c=z.va;c||(c=document.implementation.createHTMLDocument("temp"),z.va=c,c.fa=c.createElement("base"),c.head.appendChild(c.fa),c.ea=c.createElement("a"));c.fa.href=
b;c.ea.href=a;return c.ea.href||a}},Kb={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var e=new XMLHttpRequest;e.open("GET",a,Kb.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(d,a):c(d)};
e.send()}else c("error: href must be specified")}},Ja=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);k.prototype.c=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){return b.F(a)})};k.prototype.F=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.l(a))}else this.b++,this.a[c]="pending",Kb.load(c,function(a,d){a=b.Ja(a,d||c);b.a[c]=a;b.b--;b.c(a);b.ka()},function(){b.a[c]=null;b.b--;b.ka()})};
k.prototype.Ja=function(a,b){if(!a)return document.createDocumentFragment();Ja&&(a=a.replace(Ld,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=z.R(c.getAttribute("href"),b),c.removeAttribute("href");c=a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]');
var d=0;l(c,function(a){h(a);z.Ca(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};k.prototype.ka=function(){var a=this;if(!this.b){this.f.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.f.observe(document.head,{childList:!0,subtree:!0}),a.Ha()))};
this.Oa(function(){c=!0;d()});this.Ka(function(){b=!0;d()})}};k.prototype.flatten=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};k.prototype.Ka=function(a){function b(e){if(e<d){var f=c[e],g=document.createElement("script");f.removeAttribute("import-dependency");l(f.attributes,function(a){return g.setAttribute(a.name,
a.value)});q=g;f.parentNode.replaceChild(g,f);h(g,function(){q=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};k.prototype.Oa=function(a){var b=document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=Ja&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");l(b,function(b){h(b,function(){b.removeAttribute("import-dependency");0===--d&&a()});if(e&&b.parentNode!==
document.head){var f=document.createElement(b.localName);f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};k.prototype.Ha=function(){var a=this,b=document.querySelectorAll("link[rel=import]");l(b,function(b){return a.l(b)},!0)};k.prototype.l=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState=
"complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};k.prototype.Ia=function(a){var b=this;l(a,function(a){return l(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(g(a)?b.F(a):b.c(a))})})};if(m){var la=document.querySelectorAll("link[rel=import]");l(la,function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});la=function(a){a=a.target;g(a)&&(a.__loaded=!0)};document.addEventListener("load",la,!0);document.addEventListener("error",
la,!0)}else{var ca=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!ca||ca.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=g(this)?this:c(this);return a?a.href:ca&&ca.get?ca.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new k})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=m;a.whenReady=f;a.importForElement=
c})(window.HTMLImports=window.HTMLImports||{});/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var r=window.ShadyDOM||{};r.Ea=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ka=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");r.G=!!(ka&&ka.configurable&&ka.get);r.la=r.force||!r.Ea;function t(a){return a.__shady&&void 0!==a.__shady.firstChild}function u(a){return"ShadyRoot"===a.sa}function ma(a){a=a.getRootNode();if(u(a))return a}var v=Element.prototype,na=v.matches||v.matchesSelector||v.mozMatchesSelector||v.msMatchesSelector||v.oMatchesSelector||v.webkitMatchesSelector;
function oa(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function pa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)oa(a,c[d]);return a}function qa(a,b){for(var c in b)a[c]=b[c]}var ra=document.createTextNode(""),sa=0,ta=[];(new MutationObserver(function(){for(;ta.length;)try{ta.shift()()}catch(a){throw ra.textContent=sa++,a;}})).observe(ra,{characterData:!0});
function ua(a){ta.push(a);ra.textContent=sa++}var va=!!document.contains;function wa(a,b){for(;b;){if(b==a)return!0;b=b.parentNode}return!1};var xa=[],ya;function za(a){ya||(ya=!0,ua(Aa));xa.push(a)}function Aa(){ya=!1;for(var a=!!xa.length;xa.length;)xa.shift()();return a}Aa.list=xa;function Ba(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.N=new Set}function Ca(a){a.a||(a.a=!0,ua(function(){Da(a)}))}function Da(a){if(a.a){a.a=!1;var b=a.takeRecords();b.length&&a.N.forEach(function(a){a(b)})}}Ba.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};
function Ea(a,b){a.__shady=a.__shady||{};a.__shady.H||(a.__shady.H=new Ba);a.__shady.H.N.add(b);var c=a.__shady.H;return{wa:b,w:c,ya:a,takeRecords:function(){return c.takeRecords()}}}function Fa(a){var b=a&&a.w;b&&(b.N.delete(a.wa),b.N.size||(a.ya.__shady.H=null))}
function Ga(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var w={},Ha=Element.prototype.insertBefore,Ia=Element.prototype.removeChild,Ka=Element.prototype.setAttribute,La=Element.prototype.removeAttribute,Ma=Element.prototype.cloneNode,Na=Document.prototype.importNode,Oa=Element.prototype.addEventListener,Pa=Element.prototype.removeEventListener,Qa=Window.prototype.addEventListener,Ra=Window.prototype.removeEventListener,Sa=Element.prototype.dispatchEvent,Ta=Element.prototype.querySelector,Ua=Element.prototype.querySelectorAll,Va=Node.prototype.contains||
HTMLElement.prototype.contains;w.appendChild=Element.prototype.appendChild;w.insertBefore=Ha;w.removeChild=Ia;w.setAttribute=Ka;w.removeAttribute=La;w.cloneNode=Ma;w.importNode=Na;w.addEventListener=Oa;w.removeEventListener=Pa;w.Ta=Qa;w.Ua=Ra;w.dispatchEvent=Sa;w.querySelector=Ta;w.querySelectorAll=Ua;w.contains=Va;var Wa=/[&\u00A0"]/g,Xa=/[&\u00A0<>]/g;function Ya(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Za(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var $a=Za("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),ab=Za("style script xmp iframe noembed noframes plaintext noscript".split(" "));
function bb(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var k=a;var l=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var m=g.localName,q="<"+m,E=g.attributes,J=0;k=E[J];J++)q+=" "+k.name+'="'+k.value.replace(Wa,Ya)+'"';q+=">";g=$a[m]?q:q+bb(g,l)+"</"+m+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&ab[k.localName]?g:g.replace(Xa,Ya);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g),
Error("not implemented");}}c+=g}return c};var x={},y=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),A=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function cb(a){var b=[];y.currentNode=a;for(a=y.firstChild();a;)b.push(a),a=y.nextSibling();return b}x.parentNode=function(a){y.currentNode=a;return y.parentNode()};x.firstChild=function(a){y.currentNode=a;return y.firstChild()};x.lastChild=function(a){y.currentNode=a;return y.lastChild()};x.previousSibling=function(a){y.currentNode=a;return y.previousSibling()};
x.nextSibling=function(a){y.currentNode=a;return y.nextSibling()};x.childNodes=cb;x.parentElement=function(a){A.currentNode=a;return A.parentNode()};x.firstElementChild=function(a){A.currentNode=a;return A.firstChild()};x.lastElementChild=function(a){A.currentNode=a;return A.lastChild()};x.previousElementSibling=function(a){A.currentNode=a;return A.previousSibling()};x.nextElementSibling=function(a){A.currentNode=a;return A.nextSibling()};
x.children=function(a){var b=[];A.currentNode=a;for(a=A.firstChild();a;)b.push(a),a=A.nextSibling();return b};x.innerHTML=function(a){return bb(a,function(a){return cb(a)})};x.textContent=function(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}};var db=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),eb=document.implementation.createHTMLDocument("inert"),fb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),gb={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:x.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;
return void 0!==a?a:x.parentNode(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:x.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:x.previousSibling(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&
void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return x.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return x.previousElementSibling(this)},configurable:!0}},hb={childNodes:{get:function(){if(t(this)){if(!this.__shady.childNodes){this.__shady.childNodes=
[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=x.childNodes(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&this.__shady.firstChild;return void 0!==a?a:x.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:x.lastChild(this)},
configurable:!0},textContent:{get:function(){if(t(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return x.textContent(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&
void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return x.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return x.lastElementChild(this)},configurable:!0},children:{get:function(){var a;t(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===
Node.ELEMENT_NODE}):a=x.children(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return t(this)?bb(a):x.innerHTML(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);var c=this.localName;c&&"template"!==c||(c="div");c=eb.createElement(c);for(db&&db.set?db.set.call(c,a):c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild)},configurable:!0}},
ib={shadowRoot:{get:function(){return this.__shady&&this.__shady.Ma||null},configurable:!0}},jb={activeElement:{get:function(){var a=fb&&fb.get?fb.get.call(document):r.G?void 0:document.activeElement;if(a&&a.nodeType){var b=!!u(this);if(this===document||b&&this.host!==a&&w.contains.call(this.host,a)){for(b=ma(a);b&&b!==this;)a=b.host,b=ma(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}};
function B(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function C(a){B(a,gb);B(a,hb);B(a,jb)}var kb=r.G?function(){}:function(a){a.__shady&&a.__shady.ta||(a.__shady=a.__shady||{},a.__shady.ta=!0,B(a,gb,!0))},lb=r.G?function(){}:function(a){a.__shady&&a.__shady.ra||(a.__shady=a.__shady||{},a.__shady.ra=!0,B(a,hb,!0),B(a,ib,!0))};function mb(a,b,c){kb(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}
function nb(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=x.firstChild(a);a.__shady.lastChild=x.lastChild(a);lb(a);for(var b=a.__shady.childNodes=x.childNodes(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,kb(d)}};function ob(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&x.parentNode(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&pb(b.parentNode,b);d=ma(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:
b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}(f=e)&&d.C.push.apply(d.C,[].concat(f instanceof Array?f:ja(ia(f))));d&&("slot"===a.localName||f)&&D(d);if(t(a)){d=c;lb(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){f=b.childNodes;for(e=0;e<f.length;e++)mb(f[e],a,d);b.__shady=b.__shady||{};d=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=b.__shady.lastChild=d;
b.__shady.childNodes=d}else mb(b,a,d);if(qb(a)){D(a.__shady.root);var h=!0}else a.__shady.root&&(h=!0)}h||(h=u(a)?a.host:a,c?(c=rb(c),w.insertBefore.call(h,b,c)):w.appendChild.call(h,b));sb(a,b);return b}
function pb(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=ma(b);if(t(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=b.__shady.previousSibling);var d=b.__shady.previousSibling,e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=
b.__shady.previousSibling=b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=null);if(qb(a)){D(a.__shady.root);var f=!0}}tb(b);if(c){(d=a&&"slot"===a.localName)&&(f=!0);ub(c);e=c.i;for(var h in e)for(var g=e[h],k=0;k<g.length;k++){var l=g[k];if(wa(b,l)){g.splice(k,1);var m=c.m.indexOf(l);0<=m&&c.m.splice(m,1);k--;if(m=l.__shady.D)for(l=0;l<m.length;l++){var q=m[l],E=x.parentNode(q);E&&w.removeChild.call(E,q)}m=!0}}(m||d)&&D(c)}f||(f=u(a)?a.host:a,(!a.__shady.root&&"slot"!==
b.localName||f===x.parentNode(b))&&w.removeChild.call(f,b));sb(a,null,b);return b}function tb(a){if(a.__shady&&void 0!==a.__shady.da)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)tb(e);a.__shady&&(a.__shady.da=void 0)}function rb(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.D)&&b.length?b[0]:rb(a.nextSibling));return b}function qb(a){return(a=a&&a.__shady&&a.__shady.root)&&vb(a)}
function wb(a,b){if("slot"===b)a=a.parentNode,qb(a)&&D(a.__shady.root);else if("slot"===a.localName&&"name"===b&&(b=ma(a))){var c=a.ua,d=xb(a);if(d!==c){c=b.i[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.i[d]||(b.i[d]=[]);c.push(a);1<c.length&&(b.i[d]=yb(c))}D(b)}}function sb(a,b,c){if(a=a.__shady&&a.__shady.H)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Ca(a)}
function zb(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.da;void 0===b&&(u(a)?b=a:b=(b=a.parentNode)?zb(b):a,w.contains.call(document.documentElement,a)&&(a.__shady.da=b));return b}}function Ab(a,b,c){var d=[];Bb(a.childNodes,b,c,d);return d}function Bb(a,b,c,d){for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++){var g;if(g=h.nodeType===Node.ELEMENT_NODE){g=h;var k=b,l=c,m=d,q=k(g);q&&m.push(g);l&&l(q)?g=q:(Bb(g.childNodes,k,l,m),g=void 0)}if(g)break}}var Cb=null;
function Db(a,b,c){Cb||(Cb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);Cb&&"class"===b?Cb.setElementClass(a,c):(w.setAttribute.call(a,b,c),wb(a,b))}function Eb(a,b){if(a.ownerDocument!==document)return w.importNode.call(document,a,b);var c=w.importNode.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Eb(a[b],!0),c.appendChild(d)}return c};var Fb="__eventWrappers"+Date.now(),Gb={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,
dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0};function Hb(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}
function Ib(a,b){if(!u)return a;a=Hb(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(h=a.indexOf(f),e=f),!u(f)||-1<h)return d}
var Jb={get composed(){!1!==this.isTrusted&&void 0===this.S&&(this.S=Gb[this.type]);return this.S||!1},composedPath:function(){this.ga||(this.ga=Hb(this.__target,this.composed));return this.ga},get target(){return Ib(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.U)return null;this.ha||(this.ha=Hb(this.U,!0));return Ib(this.currentTarget,this.ha)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.T=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);
this.T=this.qa=!0}};function Lb(a){function b(b,d){b=new a(b,d);b.S=d&&!!d.composed;return b}qa(b,a);b.prototype=a.prototype;return b}var Mb={focus:!0,blur:!0};function Nb(a){return a.__target!==a.target||a.U!==a.relatedTarget}function Ob(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Nb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.qa);d++);}
function Pb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Ob(a,d,"capture");if(a.T)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(0===c||f&&f===e)if(Ob(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.T)break}}
function Qb(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],k=g.type,l=g.capture,m=g.once,q=g.passive;if(b===g.node&&c===k&&d===l&&e===m&&f===q)return h}return-1}
function Rb(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.V||this,g=b[Fb];if(g){if(-1<Qb(g,h,a,d,e,f))return}else b[Fb]=[];g=function(d){e&&this.removeEventListener(a,b,c);d.__target||Sb(d);if(h!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget",{get:function(){return h},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(h))if(Nb(d)&&d.target===d.relatedTarget)d.eventPhase===
Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===h||h instanceof Window){var g="object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(h,d);h!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return g}};b[Fb].push({node:this,type:a,capture:d,once:e,passive:f,Va:g});Mb[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?
"capture":"bubble"].push(g)):(this instanceof Window?w.Ta:w.addEventListener).call(this,a,g,c)}}
function Tb(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.V||this,g=void 0;var k=null;try{k=b[Fb]}catch(l){}k&&(e=Qb(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].Va,k.length||(b[Fb]=void 0)));(this instanceof Window?w.Ua:w.removeEventListener).call(this,a,g||b,c);g&&Mb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}}
function Ub(){for(var a in Mb)window.addEventListener(a,function(a){a.__target||(Sb(a),Pb(a))},!0)}function Sb(a){a.__target=a.target;a.U=a.relatedTarget;if(r.G){var b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__patchProto")){var c=Object.create(b);c.Xa=b;oa(c,Jb);b.__patchProto=c}a.__proto__=b.__patchProto}else oa(a,Jb)}var Vb=Lb(window.Event),Wb=Lb(window.CustomEvent),Xb=Lb(window.MouseEvent);function Yb(a,b){return{index:a,I:[],M:b}}
function Zb(a,b,c,d){var e=0,f=0,h=0,g=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(h=0;h<k;h++)if(a[h]!==c[h])break a;h=k}if(b==a.length&&d==c.length){g=a.length;for(var l=c.length,m=0;m<k-h&&$b(a[--g],c[--l]);)m++;g=m}e+=h;f+=h;b-=g;d-=g;if(0==b-e&&0==d-f)return[];if(e==b){for(b=Yb(e,0);f<d;)b.I.push(c[f++]);return[b]}if(f==d)return[Yb(e,b-e)];k=e;h=f;d=d-h+1;g=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(g),b[l][0]=l;for(l=0;l<g;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<g;m++)if(a[k+m-1]===c[h+l-1])b[l][m]=
b[l-1][m-1];else{var q=b[l-1][m]+1,E=b[l][m-1]+1;b[l][m]=q<E?q:E}k=b.length-1;h=b[0].length-1;d=b[k][h];for(a=[];0<k||0<h;)0==k?(a.push(2),h--):0==h?(a.push(3),k--):(g=b[k-1][h-1],l=b[k-1][h],m=b[k][h-1],q=l<m?l<g?l:g:m<g?m:g,q==g?(g==d?a.push(0):(a.push(1),d=g),k--,h--):q==l?(a.push(3),k--,d=l):(a.push(2),h--,d=m));a.reverse();b=void 0;k=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=Yb(e,0));b.M++;e++;b.I.push(c[f]);f++;break;case 2:b||(b=Yb(e,0));
b.M++;e++;break;case 3:b||(b=Yb(e,0)),b.I.push(c[f]),f++}b&&k.push(b);return k}function $b(a,b){return a===b};var ac={};function F(a,b,c){if(a!==ac)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=F.prototype;a.sa="ShadyRoot";nb(b);nb(a);a.host=b;a.a=c&&c.mode;b.__shady=b.__shady||{};b.__shady.root=a;b.__shady.Ma="closed"!==a.a?a:null;a.L=!1;a.m=[];a.i={};a.C=[];c=x.childNodes(b);for(var d=0,e=c.length;d<e;d++)w.removeChild.call(b,c[d]);return a}F.prototype=Object.create(DocumentFragment.prototype);function D(a){a.L||(a.L=!0,za(function(){return bc(a)}))}
function bc(a){for(var b;a;){a.L&&(b=a);a:{var c=a;a=c.host.getRootNode();if(u(a))for(var d=c.host.childNodes,e=0;e<d.length;e++)if(c=d[e],"slot"==c.localName)break a;a=void 0}}b&&b._renderRoot()}
F.prototype._renderRoot=function(){this.L=!1;ub(this);for(var a=0,b;a<this.m.length;a++){b=this.m[a];var c=b.__shady.assignedNodes;b.__shady.assignedNodes=[];b.__shady.D=[];if(b.__shady.ia=c)for(var d=0;d<c.length;d++){var e=c[d];e.__shady.$=e.__shady.assignedSlot;e.__shady.assignedSlot===b&&(e.__shady.assignedSlot=null)}}for(b=this.host.firstChild;b;b=b.nextSibling)cc(this,b);for(a=0;a<this.m.length;a++){b=this.m[a];if(!b.__shady.assignedNodes.length)for(c=b.firstChild;c;c=c.nextSibling)cc(this,
c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&vb(c)&&c._renderRoot();dc(this,b.__shady.D,b.__shady.assignedNodes);if(c=b.__shady.ia){for(d=0;d<c.length;d++)c[d].__shady.$=null;b.__shady.ia=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.ba=!0)}b.__shady.ba&&(b.__shady.ba=!1,ec(this,b))}a=this.m;b=[];for(c=0;c<a.length;c++)d=a[c].parentNode,d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d);for(a=0;a<b.length;a++){c=b[a];d=c===this?this.host:c;e=[];c=c.childNodes;for(var f=0;f<c.length;f++){var h=
c[f];if("slot"==h.localName){h=h.__shady.D;for(var g=0;g<h.length;g++)e.push(h[g])}else e.push(h)}c=void 0;f=x.childNodes(d);h=Zb(e,e.length,f,f.length);for(var k=g=0;g<h.length&&(c=h[g]);g++){for(var l=0,m;l<c.I.length&&(m=c.I[l]);l++)x.parentNode(m)===d&&w.removeChild.call(d,m),f.splice(c.index+k,1);k-=c.M}for(k=0;k<h.length&&(c=h[k]);k++)for(g=f[c.index],l=c.index;l<c.index+c.M;l++)m=e[l],w.insertBefore.call(d,m,g),f.splice(l,0,m)}};
function cc(a,b,c){b.__shady=b.__shady||{};var d=b.__shady.$;b.__shady.$=null;c||(c=(a=a.i[b.slot||"__catchall"])&&a[0]);c?(c.__shady.assignedNodes.push(b),b.__shady.assignedSlot=c):b.__shady.assignedSlot=void 0;d!==b.__shady.assignedSlot&&b.__shady.assignedSlot&&(b.__shady.assignedSlot.__shady.ba=!0)}function dc(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=e.__shady.assignedNodes;f&&f.length&&dc(a,b,f)}else b.push(c[d])}
function ec(a,b){w.dispatchEvent.call(b,new Event("slotchange"));b.__shady.assignedSlot&&ec(a,b.__shady.assignedSlot)}function ub(a){if(a.C.length){for(var b=a.C,c,d=0;d<b.length;d++){var e=b[d];e.__shady=e.__shady||{};nb(e);nb(e.parentNode);var f=xb(e);a.i[f]?(c=c||{},c[f]=!0,a.i[f].push(e)):a.i[f]=[e];a.m.push(e)}if(c)for(var h in c)a.i[h]=yb(a.i[h]);a.C=[]}}function xb(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.ua=b}
function yb(a){return a.sort(function(a,c){a=fc(a);for(var b=fc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})}function fc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function vb(a){ub(a);return!!a.m.length}F.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.V=this;this.host.addEventListener(a,b,c)};
F.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.V=this;this.host.removeEventListener(a,b,c)};F.prototype.getElementById=function(a){return Ab(this,function(b){return b.id==a},function(a){return!!a})[0]||null};var gc=F.prototype;B(gc,hb,!0);B(gc,jb,!0);function hc(a){var b=a.getRootNode();u(b)&&bc(b);return a.__shady&&a.__shady.assignedSlot||null}
var ic={addEventListener:Rb.bind(window),removeEventListener:Tb.bind(window)},jc={addEventListener:Rb,removeEventListener:Tb,appendChild:function(a){return ob(this,a)},insertBefore:function(a,b){return ob(this,a,b)},removeChild:function(a){return pb(this,a)},replaceChild:function(a,b){ob(this,a,b);pb(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=w.cloneNode.call(this,a);else if(b=w.cloneNode.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),
b.appendChild(d)}return b},getRootNode:function(){return zb(this)},contains:function(a){return wa(this,a)},get isConnected(){var a=this.ownerDocument;if(va&&w.contains.call(a,this)||a.documentElement&&w.contains.call(a.documentElement,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof F?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){Aa();return w.dispatchEvent.call(this,a)}},kc={get assignedSlot(){return hc(this)}},lc={querySelector:function(a){return Ab(this,
function(b){return na.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return Ab(this,function(b){return na.call(b,a)})}},mc={assignedNodes:function(a){if("slot"===this.localName){var b=this.getRootNode();u(b)&&bc(b);return this.__shady?(a&&a.flatten?this.__shady.D:this.__shady.assignedNodes)||[]:[]}}},nc=pa({setAttribute:function(a,b){Db(this,a,b)},removeAttribute:function(a){w.removeAttribute.call(this,a);wb(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";
if(!a)throw"Not enough arguments.";return new F(ac,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){Db(this,"slot",a)},get assignedSlot(){return hc(this)}},lc,mc);Object.defineProperties(nc,ib);var oc=pa({importNode:function(a,b){return Eb(a,b)},getElementById:function(a){return Ab(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},lc);Object.defineProperties(oc,{_activeElement:jb.activeElement});
var pc=HTMLElement.prototype.blur,qc=pa({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():pc.call(this)}});function G(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}};if(r.la){var ShadyDOM={inUse:r.la,patch:function(a){return a},isShadyRoot:u,enqueue:za,flush:Aa,settings:r,filterMutations:Ga,observeChildren:Ea,unobserveChildren:Fa,nativeMethods:w,nativeTree:x};window.ShadyDOM=ShadyDOM;window.Event=Vb;window.CustomEvent=Wb;window.MouseEvent=Xb;Ub();var rc=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;G(window.Node.prototype,jc);G(window.Window.prototype,ic);G(window.Text.prototype,kc);G(window.DocumentFragment.prototype,lc);G(window.Element.prototype,
nc);G(window.Document.prototype,oc);window.HTMLSlotElement&&G(window.HTMLSlotElement.prototype,mc);G(rc.prototype,qc);r.G&&(C(window.Node.prototype),C(window.Text.prototype),C(window.DocumentFragment.prototype),C(window.Element.prototype),C(rc.prototype),C(window.Document.prototype),window.HTMLSlotElement&&C(window.HTMLSlotElement.prototype));window.ShadowRoot=F};var sc=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function tc(a){var b=sc.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function H(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}
function uc(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
function I(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)I(d,b,c);d=uc(a,e);continue}else if("template"===f){d=uc(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)I(e,b,c)}d=d.firstChild?d.firstChild:uc(a,d)}}function K(a,b,c){a[b]=c};function vc(){this.a=new Map;this.l=new Map;this.f=[];this.c=!1}function wc(a,b,c){a.a.set(b,c);a.l.set(c.constructor,c)}function xc(a,b){a.c=!0;a.f.push(b)}function yc(a,b){a.c&&I(b,function(b){return a.b(b)})}vc.prototype.b=function(a){if(this.c&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.f.length;b++)this.f[b](a)}};function L(a,b){var c=[];I(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):zc(a,d)}}
function M(a,b){var c=[];I(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}}
function N(a,b,c){c=void 0===c?{}:c;var d=c.Sa||new Set,e=c.oa||function(b){return zc(a,b)},f=[];I(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);N(a,c,{Sa:f,oa:e})}})}else f.push(b)},d);if(a.c)for(b=
0;b<f.length;b++)a.b(f[b]);for(b=0;b<f.length;b++)e(f[b])}
function zc(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructor;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(h){throw b.__CE_state=2,h;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}H(b)&&a.connectedCallback(b)}}}vc.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};vc.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};
vc.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};function Ac(a){var b=document;this.h=a;this.a=b;this.w=void 0;N(this.h,this.a);"loading"===this.a.readyState&&(this.w=new MutationObserver(this.b.bind(this)),this.w.observe(this.a,{childList:!0,subtree:!0}))}function Bc(a){a.w&&a.w.disconnect()}Ac.prototype.b=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||Bc(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)N(this.h,c[d])};function Cc(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Dc(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function O(a){this.X=!1;this.h=a;this.aa=new Map;this.Y=function(a){return a()};this.K=!1;this.Z=[];this.xa=new Ac(a)}
O.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!tc(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.h.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.X)throw Error("A custom element is already being defined.");this.X=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");
return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var h=d("disconnectedCallback");var g=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(m){return}finally{this.X=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:h,adoptedCallback:g,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]};wc(this.h,a,b);this.Z.push(b);
this.K||(this.K=!0,this.Y(function(){return Ec(c)}))};function Ec(a){if(!1!==a.K){a.K=!1;for(var b=a.Z,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);N(a.h,document,{oa:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.h.a.get(e)&&c.push(b)}}});for(e=0;e<c.length;e++)zc(a.h,c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var h=0;h<f.length;h++)zc(a.h,f[h]);(e=a.aa.get(e))&&Dc(e)}}}O.prototype.get=function(a){if(a=this.h.a.get(a))return a.constructor};
O.prototype.whenDefined=function(a){if(!tc(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.aa.get(a);if(b)return b.c;b=new Cc;this.aa.set(a,b);this.h.a.get(a)&&!this.Z.some(function(b){return b.localName===a})&&Dc(b);return b.c};O.prototype.La=function(a){Bc(this.xa);var b=this.Y;this.Y=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=O;O.prototype.define=O.prototype.define;O.prototype.get=O.prototype.get;
O.prototype.whenDefined=O.prototype.whenDefined;O.prototype.polyfillWrapFlushCallback=O.prototype.La;var Fc=window.Document.prototype.createElement,Gc=window.Document.prototype.createElementNS,Hc=window.Document.prototype.importNode,Ic=window.Document.prototype.prepend,Jc=window.Document.prototype.append,Kc=window.DocumentFragment.prototype.prepend,Lc=window.DocumentFragment.prototype.append,Mc=window.Node.prototype.cloneNode,Nc=window.Node.prototype.appendChild,Oc=window.Node.prototype.insertBefore,Pc=window.Node.prototype.removeChild,Qc=window.Node.prototype.replaceChild,Rc=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),Sc=window.Element.prototype.attachShadow,Tc=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Uc=window.Element.prototype.getAttribute,Vc=window.Element.prototype.setAttribute,Wc=window.Element.prototype.removeAttribute,Xc=window.Element.prototype.getAttributeNS,Yc=window.Element.prototype.setAttributeNS,Zc=window.Element.prototype.removeAttributeNS,$c=window.Element.prototype.insertAdjacentElement,ad=window.Element.prototype.prepend,bd=window.Element.prototype.append,
cd=window.Element.prototype.before,dd=window.Element.prototype.after,ed=window.Element.prototype.replaceWith,fd=window.Element.prototype.remove,gd=window.HTMLElement,hd=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),id=window.HTMLElement.prototype.insertAdjacentElement;var jd=new function(){};function kd(){var a=P;window.HTMLElement=function(){function b(){var b=this.constructor,d=a.l.get(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Fc.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.b(e),e;d=e.length-1;var f=e[d];if(f===jd)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=jd;Object.setPrototypeOf(f,b.prototype);a.b(f);return f}b.prototype=gd.prototype;return b}()};function ld(a,b,c){function d(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var f=[],l=0;l<d.length;l++){var m=d[l];m instanceof Element&&H(m)&&f.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)e.push(m);else e.push(m)}b.apply(this,d);for(d=0;d<f.length;d++)M(a,f[d]);if(H(this))for(d=0;d<e.length;d++)f=e[d],f instanceof Element&&L(a,f)}}void 0!==c.P&&(b.prepend=d(c.P));void 0!==c.append&&(b.append=d(c.append))};function md(){var a=P;K(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.a.get(b);if(c)return new c.constructor}b=Fc.call(this,b);a.b(b);return b});K(Document.prototype,"importNode",function(b,c){b=Hc.call(this,b,c);this.__CE_hasRegistry?N(a,b):yc(a,b);return b});K(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.a.get(c);if(d)return new d.constructor}b=Gc.call(this,b,c);a.b(b);return b});
ld(a,Document.prototype,{P:Ic,append:Jc})};function nd(){var a=P;function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,g=e.length;if(0<g&&H(this)){c=Array(g);for(var k=0;k<g;k++)c[k]=e[k]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)M(a,c[b])}}})}K(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);
b=Oc.call(this,b,d);if(H(this))for(d=0;d<c.length;d++)L(a,c[d]);return b}c=H(b);d=Oc.call(this,b,d);c&&M(a,b);H(this)&&L(a,b);return d});K(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Nc.call(this,b);if(H(this))for(var e=0;e<c.length;e++)L(a,c[e]);return b}c=H(b);e=Nc.call(this,b);c&&M(a,b);H(this)&&L(a,b);return e});K(Node.prototype,"cloneNode",function(b){b=Mc.call(this,b);this.ownerDocument.__CE_hasRegistry?N(a,b):
yc(a,b);return b});K(Node.prototype,"removeChild",function(b){var c=H(b),e=Pc.call(this,b);c&&M(a,b);return e});K(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Qc.call(this,b,d);if(H(this))for(M(a,d),d=0;d<c.length;d++)L(a,c[d]);return b}c=H(b);var f=Qc.call(this,b,d),h=H(this);h&&M(a,d);c&&M(a,b);h&&L(a,b);return f});Rc&&Rc.get?b(Node.prototype,Rc):xc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=
[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Pc.call(this,this.firstChild);Nc.call(this,document.createTextNode(a))}})})};function od(a){var b=Element.prototype;function c(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var g=[],k=0;k<d.length;k++){var l=d[k];l instanceof Element&&H(l)&&g.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)e.push(l);else e.push(l)}b.apply(this,d);for(d=0;d<g.length;d++)M(a,g[d]);if(H(this))for(d=0;d<e.length;d++)g=e[d],g instanceof Element&&L(a,g)}}void 0!==cd&&(b.before=c(cd));void 0!==cd&&(b.after=c(dd));void 0!==
ed&&K(b,"replaceWith",function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=[];for(var h=[],g=0;g<c.length;g++){var k=c[g];k instanceof Element&&H(k)&&h.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)d.push(k);else d.push(k)}g=H(this);ed.apply(this,c);for(c=0;c<h.length;c++)M(a,h[c]);if(g)for(M(a,this),c=0;c<d.length;c++)h=d[c],h instanceof Element&&L(a,h)});void 0!==fd&&K(b,"remove",function(){var b=H(this);fd.call(this);b&&M(a,this)})};function pd(){var a=P;function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;H(this)&&(e=[],I(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var l=e[f];1===l.__CE_state&&a.disconnectedCallback(l)}this.ownerDocument.__CE_hasRegistry?N(a,this):yc(a,this);return b}})}function c(b,c){K(b,"insertAdjacentElement",function(b,d){var e=H(d);b=c.call(this,b,d);e&&M(a,d);H(b)&&L(a,d);
return b})}Sc&&K(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=Sc.call(this,a)});Tc&&Tc.get?b(Element.prototype,Tc):hd&&hd.get?b(HTMLElement.prototype,hd):xc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return Mc.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,c=b?this.content:this,d=Fc.call(document,this.localName);for(d.innerHTML=a;0<c.childNodes.length;)Pc.call(c,c.childNodes[0]);for(a=b?d.content:d;0<a.childNodes.length;)Nc.call(c,
a.childNodes[0])}})});K(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return Vc.call(this,b,c);var d=Uc.call(this,b);Vc.call(this,b,c);c=Uc.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});K(Element.prototype,"setAttributeNS",function(b,c,f){if(1!==this.__CE_state)return Yc.call(this,b,c,f);var d=Xc.call(this,b,c);Yc.call(this,b,c,f);f=Xc.call(this,b,c);a.attributeChangedCallback(this,c,d,f,b)});K(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return Wc.call(this,
b);var c=Uc.call(this,b);Wc.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});K(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return Zc.call(this,b,c);var d=Xc.call(this,b,c);Zc.call(this,b,c);var e=Xc.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});id?c(HTMLElement.prototype,id):$c?c(Element.prototype,$c):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");ld(a,Element.prototype,{P:ad,append:bd});od(a)}
;var qd=window.customElements;if(!qd||qd.forcePolyfill||"function"!=typeof qd.define||"function"!=typeof qd.get){var P=new vc;kd();md();ld(P,DocumentFragment.prototype,{P:Kc,append:Lc});nd();pd();document.__CE_hasRegistry=!0;var customElements=new O(P);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by 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 rd(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function sd(a){a=a.replace(td,"").replace(ud,"");var b=vd,c=a,d=new rd;d.start=0;d.end=c.length;for(var e=d,f=0,h=c.length;f<h;f++)if("{"===c[f]){e.rules||(e.rules=[]);var g=e,k=g.rules[g.rules.length-1]||null;e=new rd;e.start=f+1;e.parent=g;e.previous=k;g.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}
function vd(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=wd(c),c=c.replace(xd," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=yd:c.match(zd)&&(a.type=Ad,a.keyframesName=a.selector.split(xd).pop()):a.type=0===c.indexOf("--")?Bd:Cd);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)vd(f,
b);return a}function wd(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}
function Dd(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=Dd(g,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(Ed,"").replace(Fd,""),b=b.replace(Gd,"").replace(Hd,"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
var Cd=1,Ad=7,yd=4,Bd=1E3,td=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,ud=/@import[^;]*;/gim,Ed=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Fd=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,Gd=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,Hd=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,zd=/^@[^\s]*keyframes/,xd=/\s+/g;var Q=!(window.ShadyDOM&&window.ShadyDOM.inUse),Id;function Jd(a){Id=a&&a.shimcssproperties?!1:Q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Id=window.ShadyCSS.nativeCss:window.ShadyCSS?(Jd(window.ShadyCSS),window.ShadyCSS=void 0):Jd(window.WebComponents&&window.WebComponents.flags);var R=Id;var Kd=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Md=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Nd=/(--[\w-]+)\s*([:,;)]|$)/gi,Od=/(animation\s*:)|(animation-name\s*:)/,Pd=/@media\s(.*)/,Qd=/\{[^}]*\}/g;var Rd=new Set;function S(a,b){if(!a)return"";"string"===typeof a&&(a=sd(a));b&&T(a,b);return Dd(a,R)}function Sd(a){!a.__cssRules&&a.textContent&&(a.__cssRules=sd(a.textContent));return a.__cssRules||null}function Td(a){return!!a.parent&&a.parent.type===Ad}function T(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===yd){var h=a.selector.match(Pd);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===Cd?b(a):c&&f===Ad?c(a):f===Bd&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)T(g,b,c,d)}}}
function Ud(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;Vd(e,c,d);return e}var U=null;function Vd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);U?a.compareDocumentPosition(U)===Node.DOCUMENT_POSITION_PRECEDING&&(U=a):U=a}
function Wd(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=Wd(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function Xd(a,b){Q?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function V(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,J:c}};function Yd(){}function Zd(a,b,c){var d=W;a.__styleScoped?a.__styleScoped=null:$d(d,a,b||"",c)}function $d(a,b,c,d){b.nodeType===Node.ELEMENT_NODE&&ae(b,c,d);if(b="template"===b.localName?(b.content||b.Ya).childNodes:b.children||b.childNodes)for(var e=0;e<b.length;e++)$d(a,b[e],c,d)}
function ae(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute(be);c?d&&(b=d.replace("style-scope","").replace(b,""),Xd(a,b)):Xd(a,(d?d+" ":"")+"style-scope "+b)}}function ce(a,b,c){var d=W,e=a.__cssBuild;Q||"shady"===e?b=S(b,c):(a=V(a),b=de(d,b,a.is,a.J,c)+"\n\n");return b.trim()}
function de(a,b,c,d,e){var f=ee(c,d);c=c?fe+c:"";return S(b,function(b){b.c||(b.selector=b.j=ge(a,b,a.b,c,f),b.c=!0);e&&e(b,c,f)})}function ee(a,b){return b?"[is="+a+"]":a}function ge(a,b,c,d,e){var f=b.selector.split(he);if(!Td(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,d,e)}return f.join(he)}function ie(a){return a.replace(je,function(a,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})}
Yd.prototype.b=function(a,b,c){var d=!1;a=a.trim();var e=je.test(a);e&&(a=a.replace(je,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=ie(a));a=a.replace(ke,le+" $1");a=a.replace(me,function(a,e,g){d||(a=ne(g,e,b,c),d=d||a.stop,e=a.Ba,g=a.value);return e+g});e&&(a=ie(a));return a};
function ne(a,b,c,d){var e=a.indexOf(oe);0<=a.indexOf(le)?a=pe(a,d):0!==e&&(a=c?qe(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(re,function(a,b){return" > "+b}))}a=a.replace(se,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,Ba:b,stop:f}}function qe(a,b){a=a.split(te);a[0]+=b;return a.join(te)}
function pe(a,b){var c=a.match(ue);return(c=c&&c[2].trim()||"")?c[0].match(ve)?a.replace(ue,function(a,c,f){return b+f}):c.split(ve)[0]===b?c:we:a.replace(le,b)}function xe(a){a.selector===ye&&(a.selector="html")}Yd.prototype.c=function(a){return a.match(oe)?this.b(a,ze):qe(a.trim(),ze)};p.Object.defineProperties(Yd.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var je=/:(nth[-\w]+)\(([^)]+)\)/,ze=":not(.style-scope)",he=",",me=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,ve=/[[.:#*]/,le=":host",ye=":root",oe="::slotted",ke=new RegExp("^("+oe+")"),ue=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,re=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,se=/(.*):dir\((?:(ltr|rtl))\)/,fe=".",te=":",be="class",we="should_not_match",W=new Yd;function Ae(a,b,c,d){this.u=a||null;this.b=b||null;this.ca=c||[];this.B=null;this.J=d||"";this.a=this.o=this.v=null}function X(a){return a?a.__styleInfo:null}function Be(a,b){return a.__styleInfo=b}Ae.prototype.c=function(){return this.u};Ae.prototype._getStyleRules=Ae.prototype.c;var Ce,De=window.Element.prototype;Ce=De.matches||De.matchesSelector||De.mozMatchesSelector||De.msMatchesSelector||De.oMatchesSelector||De.webkitMatchesSelector;var Ee=navigator.userAgent.match("Trident");function Fe(){}function Ge(a){var b={},c=[],d=0;T(a,function(a){He(a);a.index=d++;a=a.g.cssText;for(var c;c=Nd.exec(a);){var e=c[1];":"!==c[2]&&(b[e]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var e in b)a.push(e);return a}
function He(a){if(!a.g){var b={},c={};Ie(a,c)&&(b.s=c,a.rules=null);b.cssText=a.parsedCssText.replace(Qd,"").replace(Kd,"");a.g=b}}function Ie(a,b){var c=a.g;if(c){if(c.s)return Object.assign(b,c.s),!0}else{c=a.parsedCssText;for(var d;a=Kd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}}
function Je(a,b,c){b&&(b=0<=b.indexOf(";")?Ke(a,b,c):Wd(b,function(b,e,f,h){if(!e)return b+h;(e=Je(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Je(a,c[f]||f,c)||f;return b+(e||"")+h}));return b&&b.trim()||""}
function Ke(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){Md.lastIndex=0;if(f=Md.exec(e))e=Je(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var h=e.substring(f);h=h.trim();h=Je(a,h,c)||h;e=e.substring(0,f)+h}b[d]=e&&e.lastIndexOf(";")===e.length-1?e.slice(0,-1):e||""}return b.join(";")}
function Le(a,b){var c={},d=[];T(a,function(a){a.g||He(a);var e=a.j||a.parsedSelector;b&&a.g.s&&e&&Ce.call(b,e)&&(Ie(a,c),a=a.index,e=parseInt(a/32,10),d[e]=(d[e]||0)|1<<a%32)},null,!0);return{s:c,key:d}}
function Me(a,b,c,d){b.g||He(b);if(b.g.s){var e=V(a);a=e.is;e=e.J;e=a?ee(a,e):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===e+" > *."+e||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(e));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=e,g&&(Q&&!b.j&&(b.j=ge(W,b,W.b,a?fe+a:"",e)),c=b.j||e),d({Pa:c,Ga:g,$a:h})}}
function Ne(a,b){var c={},d={},e=b&&b.__cssBuild;T(b,function(b){Me(a,b,e,function(e){Ce.call(a.Za||a,e.Pa)&&(e.Ga?Ie(b,c):Ie(b,d))})},null,!0);return{Na:d,Fa:c}}
function Oe(a,b,c,d){var e=V(b),f=ee(e.is,e.J),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=X(b).u;var g=Pe(e,d);return ce(b,e,function(b){var e="";b.g||He(b);b.g.cssText&&(e=Ke(a,b.g.cssText,c));b.cssText=e;if(!Q&&!Td(b)&&b.cssText){var k=e=b.cssText;null==b.ja&&(b.ja=Od.test(e));if(b.ja)if(null==b.O){b.O=[];for(var q in g)k=g[q],k=k(e),e!==k&&(e=k,b.O.push(q))}else{for(q=0;q<b.O.length;++q)k=g[b.O[q]],e=k(e);k=e}b.cssText=k;b.j=b.j||b.selector;e="."+d;
q=b.j.split(",");k=0;for(var E=q.length,J;k<E&&(J=q[k]);k++)q[k]=J.match(h)?J.replace(f,e):e+" "+J;b.selector=q.join(",")}})}function Pe(a,b){a=a.b;var c={};if(!Q&&a)for(var d=0,e=a[d];d<a.length;e=a[++d]){var f=e,h=b;f.f=new RegExp(f.keyframesName,"g");f.a=f.keyframesName+"-"+h;f.j=f.j||f.selector;f.selector=f.j.replace(f.keyframesName,f.a);c[e.keyframesName]=Qe(e)}return c}function Qe(a){return function(b){return b.replace(a.f,a.a)}}
function Re(a,b){var c=Se,d=Sd(a);a.textContent=S(d,function(a){var d=a.cssText=a.parsedCssText;a.g&&a.g.cssText&&(d=d.replace(Ed,"").replace(Fd,""),a.cssText=Ke(c,d,b))})}p.Object.defineProperties(Fe.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var Se=new Fe;var Te={},Ue=window.customElements;if(Ue&&!Q){var Ve=Ue.define;Ue.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(U?U.nextSibling:null)||e.firstChild);U=d;Te[a]=d;return Ve.call(Ue,a,b,c)}};function We(){this.cache={}}We.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({s:b,styleElement:c,o:d});100<e.length&&e.shift();this.cache[a]=e};We.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d],f;a:{for(f=0;f<c.length;f++){var h=c[f];if(e.s[h]!==b[h]){f=!1;break a}}f=!0}if(f)return e}};function Xe(){}
function Ye(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var h=e;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(W.a);if((h=-1<g?h[g+1]:"")&&f===e.ownerDocument)Zd(e,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&
(f=f.host))if(f=V(f).is,h===f)for(e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+W.a+")"),f=0;f<e.length;f++)ae(e[f],h);else h&&Zd(e,h,!0),Zd(e,f)}}}}
if(!Q){var Ze=new MutationObserver(Ye),$e=function(a){Ze.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)$e(document);else{var af=function(){$e(document.body)};window.HTMLImports?window.HTMLImports.whenReady(af):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){af();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else af()})}Xe=function(){Ye(Ze.takeRecords())}}
var bf=Xe;var cf={};var df=Promise.resolve();function ef(a){if(a=cf[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function ff(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function gf(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,df.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var hf=null,jf=window.HTMLImports&&window.HTMLImports.whenReady||null,kf;function lf(a){requestAnimationFrame(function(){jf?jf(a):(hf||(hf=new Promise(function(a){kf=a}),"complete"===document.readyState?kf():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&kf()})),hf.then(function(){a&&a()}))})};var mf=new We;function Y(){var a=this;this.F={};this.c=document.documentElement;var b=new rd;b.rules=[];this.f=Be(this.c,new Ae(b));this.l=!1;this.b=this.a=null;lf(function(){nf(a)})}n=Y.prototype;n.pa=function(){bf()};n.Da=function(a){return Sd(a)};n.Ra=function(a){return S(a)};
n.prepareTemplate=function(a,b,c){if(!a.f){a.f=!0;a.name=b;a.extends=c;cf[b]=a;var d=(d=a.content.querySelector("style"))?d.getAttribute("css-build")||"":"";var e=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!Q){var k=g.textContent;Rd.has(k)||(Rd.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else e.push(g.textContent),g.parentNode.removeChild(g)}e=e.join("").trim();c={is:b,extends:c,Wa:d};
Q||Zd(a.content,b);nf(this);f=Md.test(e)||Kd.test(e);Md.lastIndex=0;Kd.lastIndex=0;e=sd(e);f&&R&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.l=d;d=[];R||(d=Ge(a._styleAst));if(!d.length||R)e=Q?a.content:null,b=Te[b],f=ce(c,a._styleAst),b=f.length?Ud(f,c.is,e,b):void 0,a.a=b;a.c=d}};
function of(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.na(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.l)&&a.A()})})}function nf(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=ef);of(a)}
n.A=function(){nf(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(R)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&R&&this.a){var d=Sd(c);nf(this);this.a.transformRules(d);c.textContent=S(d)}}else for(pf(this,this.c,this.f),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&Re(c,this.f.v);this.b.enqueued=!1;this.l&&!R&&this.styleDocument()}}};
n.styleElement=function(a,b){var c=V(a).is,d=X(a);if(!d){var e=V(a);d=e.is;e=e.J;var f=Te[d];d=cf[d];if(d){var h=d._styleAst;var g=d.c}d=Be(a,new Ae(h,f,g,e))}a!==this.c&&(this.l=!0);b&&(d.B=d.B||{},Object.assign(d.B,b));if(R){if(d.B){b=d.B;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=cf[c])||a===this.c)&&k&&k.a&&!ff(k)){if(ff(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)nf(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=ce(a,
d.u),gf(k);Q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=ce(a,d.u));d.u=k._styleAst}}else if(pf(this,a,d),d.ca&&d.ca.length){c=d;k=V(a).is;d=(b=mf.fetch(k,c.v,c.ca))?b.styleElement:null;h=c.o;(g=b&&b.o)||(g=this.F[k]=(this.F[k]||0)+1,g=k+"-"+g);c.o=g;g=c.o;e=Se;e=d?d.textContent||"":Oe(e,a,c.v,g);f=X(a);var l=f.a;l&&!Q&&l!==d&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));Q?f.a?(f.a.textContent=e,d=f.a):e&&(d=Ud(e,g,a.shadowRoot,f.b)):d?d.parentNode||(Ee&&
-1<e.indexOf("@media")&&(d.textContent=e),Vd(d,null,f.b)):e&&(d=Ud(e,g,null,f.b));d&&(d._useCount=d._useCount||0,f.a!=d&&d._useCount++,f.a=d);g=d;Q||(d=c.o,f=e=a.getAttribute("class")||"",h&&(f=e.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+d,e!==f&&Xd(a,f));b||mf.store(k,c.v,g,c.o)}};function qf(a,b){return(b=b.getRootNode().host)?X(b)?b:qf(a,b):a.c}
function pf(a,b,c){a=qf(a,b);var d=X(a);a=Object.create(d.v||null);var e=Ne(b,c.u);b=Le(d.u,b).s;Object.assign(a,e.Fa,b,e.Na);b=c.B;for(var f in b)if((e=b[f])||0===e)a[f]=e;f=Se;b=Object.getOwnPropertyNames(a);for(e=0;e<b.length;e++)d=b[e],a[d]=Je(f,a[d],a);c.v=a}n.styleDocument=function(a){this.styleSubtree(this.c,a)};
n.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};n.na=function(a){var b=this,c=Sd(a);T(c,function(a){if(Q)xe(a);else{var c=W;a.selector=a.parsedSelector;xe(a);a.selector=a.j=ge(c,a,c.c,void 0,void 0)}R&&(nf(b),b.a&&b.a.transformRule(a))});R?a.textContent=S(c):this.f.u.rules.push(c)};
n.getComputedStyleValue=function(a,b){var c;R||(c=(X(a)||X(qf(this,a))).v[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};n.Qa=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===W.a){c=d[e+1];break}}}c&&b.push(W.a,c);R||(c=X(a))&&c.o&&b.push(Se.a,c.o);Xd(a,b.join(" "))};n.za=function(a){return X(a)};Y.prototype.flush=Y.prototype.pa;
Y.prototype.prepareTemplate=Y.prototype.prepareTemplate;Y.prototype.styleElement=Y.prototype.styleElement;Y.prototype.styleDocument=Y.prototype.styleDocument;Y.prototype.styleSubtree=Y.prototype.styleSubtree;Y.prototype.getComputedStyleValue=Y.prototype.getComputedStyleValue;Y.prototype.setElementClass=Y.prototype.Qa;Y.prototype._styleInfoForNode=Y.prototype.za;Y.prototype.transformCustomStyleForDocument=Y.prototype.na;Y.prototype.getStyleAst=Y.prototype.Da;Y.prototype.styleAstToString=Y.prototype.Ra;
Y.prototype.flushCustomStyles=Y.prototype.A;Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return Q}},nativeCss:{get:function(){return R}}});var Z=new Y,rf,sf;window.ShadyCSS&&(rf=window.ShadyCSS.ApplyShim,sf=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.A();Z.prepareTemplate(a,b,c)},styleSubtree:function(a,b){Z.A();Z.styleSubtree(a,b)},styleElement:function(a){Z.A();Z.styleElement(a)},styleDocument:function(a){Z.A();Z.styleDocument(a)},getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:R,nativeShadow:Q};rf&&(window.ShadyCSS.ApplyShim=rf);
sf&&(window.ShadyCSS.CustomStyleInterface=sf);/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var tf=window.customElements,uf=window.HTMLImports,vf=window.HTMLTemplateElement;window.WebComponents=window.WebComponents||{};if(tf&&tf.polyfillWrapFlushCallback){var wf,xf=function(){if(wf){vf.Aa&&vf.Aa(window.document);var a=wf;wf=null;a();return!0}},yf=uf.whenReady;tf.polyfillWrapFlushCallback(function(a){wf=a;yf(xf)});uf.whenReady=function(a){yf(function(){xf()?uf.whenReady(a):a()})}}
uf.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var zf=document.createElement("style");zf.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Af=document.querySelector("head");Af.insertBefore(zf,Af.firstChild);}).call(this);
//# sourceMappingURL=webcomponents-hi-sd-ce.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,44 @@
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';(function(h){function y(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function m(a){if(u)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!p(b)&&(b=b.parentNode););a.__importDoc=b}return b}function I(a){var b=document.querySelectorAll("link[rel=import]:not([import-dependency])"),
c=b.length;c?k(b,function(b){return q(b,function(){0===--c&&a()})}):a()}function z(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function A(a){z(function(){return I(function(){return a&&a()})})}function q(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,
c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);v&&"style"===a.localName||a.addEventListener("error",c)}}function p(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function e(){var a=this;this.a={};this.b=0;this.h=new MutationObserver(function(b){return a.B(b)});this.h.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function k(a,b,c){var d=a?a.length:0,f=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=f)b(a[c],c)}var u="import"in document.createElement("link"),
w=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return w||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var J=/(url\()([^)]*)(\))/g,K=/(@import[\s]+(?!url\())([^;]*)(;)/g,L=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,g={w:function(a,b){a.href&&a.setAttribute("href",g.f(a.getAttribute("href"),b));a.src&&a.setAttribute("src",g.f(a.getAttribute("src"),b));if("style"===a.localName){var c=
g.s(a.textContent,b,J);a.textContent=g.s(c,b,K)}},s:function(a,b,c){return a.replace(c,function(a,c,l,e){a=l.replace(/["']/g,"");b&&(a=g.f(a,b));return c+"'"+a+"'"+e})},f:function(a,b){if(void 0===g.g){g.g=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";g.g="http://a/c%20d"===c.href}catch(d){}}if(g.g)return(new URL(a,b)).href;c=g.u;c||(c=document.implementation.createHTMLDocument("temp"),g.u=c,c.j=c.createElement("base"),c.head.appendChild(c.j),c.i=c.createElement("a"));c.j.href=b;c.i.href=
a;return c.i.href||a}},B={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var f=new XMLHttpRequest;f.open("GET",a,B.async);f.onload=function(){var a=f.responseURL||f.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=f.response||f.responseText;304===f.status||0===f.status||200<=f.status&&300>f.status?b(d,a):c(d)};f.send()}else c("error: href must be specified")}},
v=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);e.prototype.c=function(a){var b=this;k(a.querySelectorAll("link[rel=import]"),function(a){return b.m(a)})};e.prototype.m=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.l(a))}else this.b++,this.a[c]="pending",B.load(c,function(a,d){a=b.C(a,d||c);b.a[c]=a;b.b--;b.c(a);b.o()},function(){b.a[c]=null;b.b--;b.o()})};e.prototype.C=function(a,b){if(!a)return document.createDocumentFragment();
v&&(a=a.replace(L,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=g.f(c.getAttribute("href"),b),c.removeAttribute("href");var d=0;k(a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]'),
function(a){q(a);g.w(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};e.prototype.o=function(){var a=this;if(!this.b){this.h.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.h.observe(document.head,{childList:!0,subtree:!0}),a.A()))};this.F(function(){c=
!0;d()});this.D(function(){b=!0;d()})}};e.prototype.flatten=function(a){var b=this;k(a.querySelectorAll("link[rel=import]"),function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};e.prototype.D=function(a){function b(f){if(f<d){var l=c[f],e=document.createElement("script");l.removeAttribute("import-dependency");k(l.attributes,function(a){return e.setAttribute(a.name,a.value)});w=e;l.parentNode.replaceChild(e,
l);q(e,function(){w=null;b(f+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};e.prototype.F=function(a){var b=document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),c=b.length;if(c){var d=v&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");k(b,function(b){q(b,function(){b.removeAttribute("import-dependency");0===--c&&a()});if(d&&b.parentNode!==document.head){var e=document.createElement(b.localName);
e.__appliedElement=b;e.setAttribute("type","import-placeholder");b.parentNode.insertBefore(e,b.nextSibling);for(e=m(b);e&&m(e);)e=m(e);e.parentNode!==document.head&&(e=null);document.head.insertBefore(b,e);b.removeAttribute("type")}})}else a()};e.prototype.A=function(){var a=this;k(document.querySelectorAll("link[rel=import]"),function(b){return a.l(b)},!0)};e.prototype.l=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState="complete"),a.dispatchEvent(y(a.import?"load":"error",{bubbles:!1,
cancelable:!1,detail:void 0})))};e.prototype.B=function(a){var b=this;k(a,function(a){return k(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(p(a)?b.m(a):b.c(a))})})};if(u){k(document.querySelectorAll("link[rel=import]"),function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});var C=function(a){a=a.target;p(a)&&(a.__loaded=!0)};document.addEventListener("load",C,!0);document.addEventListener("error",C,!0)}else{var n=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");
Object.defineProperty((!n||n.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=p(this)?this:m(this);return a?a.href:n&&n.get?n.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});z(function(){return new e})}A(function(){return document.dispatchEvent(y("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});h.useNative=u;h.whenReady=A;h.importForElement=m})(window.HTMLImports=window.HTMLImports||{});/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var r=window.customElements,t=window.HTMLImports,x=window.HTMLTemplateElement;window.WebComponents=window.WebComponents||{};if(r&&r.polyfillWrapFlushCallback){var D,E=function(){if(D){x.v&&x.v(window.document);var h=D;D=null;h();return!0}},F=t.whenReady;r.polyfillWrapFlushCallback(function(h){D=h;F(E)});t.whenReady=function(h){F(function(){E()?t.whenReady(h):h()})}}
t.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var G=document.createElement("style");G.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var H=document.querySelector("head");H.insertBefore(G,H.firstChild);/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
}).call(this);
//# sourceMappingURL=webcomponents-hi.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,195 @@
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';var p,q="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ca(){ca=function(){};q.Symbol||(q.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
function ea(){ca();var a=q.Symbol.iterator;a||(a=q.Symbol.iterator=q.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&ba(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ha(a){ea();a={next:a};a[q.Symbol.iterator]=function(){return this};return a}function ia(a){ea();var b=a[Symbol.iterator];return b?b.call(a):fa(a)}
function ja(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}
(function(){if(!function(){var a=document.createEvent("Event");a.initEvent("foo",!0,!0);a.preventDefault();return a.defaultPrevented}()){var a=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(a.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var b=/Trident/.test(navigator.userAgent);if(!window.CustomEvent||b&&"function"!==typeof window.CustomEvent)window.CustomEvent=function(a,b){b=b||{};var c=document.createEvent("CustomEvent");
c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c},window.CustomEvent.prototype=window.Event.prototype;if(!window.Event||b&&"function"!==typeof window.Event){var c=window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(c)for(var d in c)window.Event[d]=c[d];window.Event.prototype=c.prototype}if(!window.MouseEvent||b&&"function"!==typeof window.MouseEvent){b=window.MouseEvent;window.MouseEvent=function(a,
b){b=b||{};var c=document.createEvent("MouseEvent");c.initMouseEvent(a,!!b.bubbles,!!b.cancelable,b.view||window,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c};if(b)for(d in b)window.MouseEvent[d]=b[d];window.MouseEvent.prototype=b.prototype}Array.from||(Array.from=function(a){return[].slice.call(a)});Object.assign||(Object.assign=function(a,b){for(var c=[].slice.call(arguments,1),d=0,e;d<c.length;d++)if(e=c[d])for(var f=
a,m=e,n=Object.getOwnPropertyNames(m),w=0;w<n.length;w++)e=n[w],f[e]=m[e];return a})})(window.WebComponents);(function(){function a(){}function b(a,b){switch(a.nodeType){case Node.DOCUMENT_NODE:return w.call(a,b);case Node.DOCUMENT_FRAGMENT_NODE:return I.call(a,b);default:return n.call(a,b)}}var c="undefined"===typeof HTMLTemplateElement,d=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),e=!1;/Trident/.test(navigator.userAgent)&&function(){function a(a,b){if(a instanceof DocumentFragment)for(var d;d=a.firstChild;)c.call(this,d,b);else c.call(this,a,b);return a}e=!0;var b=Node.prototype.cloneNode;
Node.prototype.cloneNode=function(a){a=b.call(this,a);this instanceof DocumentFragment&&(a.__proto__=DocumentFragment.prototype);return a};DocumentFragment.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll;DocumentFragment.prototype.querySelector=HTMLElement.prototype.querySelector;Object.defineProperties(DocumentFragment.prototype,{nodeType:{get:function(){return Node.DOCUMENT_FRAGMENT_NODE},configurable:!0},localName:{get:function(){},configurable:!0},nodeName:{get:function(){return"#document-fragment"},
configurable:!0}});var c=Node.prototype.insertBefore;Node.prototype.insertBefore=a;var d=Node.prototype.appendChild;Node.prototype.appendChild=function(b){b instanceof DocumentFragment?a.call(this,b,null):d.call(this,b);return b};var f=Node.prototype.removeChild,h=Node.prototype.replaceChild;Node.prototype.replaceChild=function(b,c){b instanceof DocumentFragment?(a.call(this,b,c),f.call(this,c)):h.call(this,b,c);return c};Document.prototype.createDocumentFragment=function(){var a=this.createElement("df");
a.__proto__=DocumentFragment.prototype;return a};var g=Document.prototype.importNode;Document.prototype.importNode=function(a,b){b=g.call(this,a,b||!1);a instanceof DocumentFragment&&(b.__proto__=DocumentFragment.prototype);return b}}();var f=Node.prototype.cloneNode,h=Document.prototype.createElement,g=Document.prototype.importNode,k=Node.prototype.removeChild,l=Node.prototype.appendChild,m=Node.prototype.replaceChild,n=Element.prototype.querySelectorAll,w=Document.prototype.querySelectorAll,I=DocumentFragment.prototype.querySelectorAll,
Za=function(){if(!c){var a=document.createElement("template"),b=document.createElement("template");b.content.appendChild(document.createElement("div"));a.content.appendChild(b);a=a.cloneNode(!0);return 0===a.content.childNodes.length||0===a.content.firstChild.content.childNodes.length||d}}();if(c){var t=document.implementation.createHTMLDocument("template"),na=!0,aa=document.createElement("style");aa.textContent="template{display:none;}";var T=document.head;T.insertBefore(aa,T.firstElementChild);
a.prototype=Object.create(HTMLElement.prototype);var U=!document.createElement("div").hasOwnProperty("innerHTML");a.D=function(b){if(!b.content){b.content=t.createDocumentFragment();for(var c;c=b.firstChild;)l.call(b.content,c);if(U)b.__proto__=a.prototype;else if(b.cloneNode=function(b){return a.a(this,b)},na)try{nc(b),oc(b)}catch(Ng){na=!1}a.J(b.content)}};var nc=function(b){Object.defineProperty(b,"innerHTML",{get:function(){for(var a="",b=this.content.firstChild;b;b=b.nextSibling)a+=b.outerHTML||
b.data.replace(Ge,pc);return a},set:function(b){t.body.innerHTML=b;for(a.J(t);this.content.firstChild;)k.call(this.content,this.content.firstChild);for(;t.body.firstChild;)l.call(this.content,t.body.firstChild)},configurable:!0})},oc=function(a){Object.defineProperty(a,"outerHTML",{get:function(){return"<template>"+this.innerHTML+"</template>"},set:function(a){if(this.parentNode){t.body.innerHTML=a;for(a=this.ownerDocument.createDocumentFragment();t.body.firstChild;)l.call(a,t.body.firstChild);m.call(this.parentNode,
a,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};nc(a.prototype);oc(a.prototype);a.J=function(c){c=b(c,"template");for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)a.D(f)};document.addEventListener("DOMContentLoaded",function(){a.J(document)});Document.prototype.createElement=function(){var b=h.apply(this,arguments);"template"===b.localName&&a.D(b);return b};var Ge=/[&\u00A0<>]/g,pc=function(a){switch(a){case "&":return"&amp;";
case "<":return"&lt;";case ">":return"&gt;";case "\u00a0":return"&nbsp;"}}}if(c||Za){a.a=function(a,b){var c=f.call(a,!1);this.D&&this.D(c);b&&(l.call(c.content,f.call(a.content,!0)),$a(c.content,a.content));return c};var $a=function(c,d){if(d.querySelectorAll&&(d=b(d,"template"),0!==d.length)){c=b(c,"template");for(var e=0,f=c.length,h,g;e<f;e++)g=d[e],h=c[e],a&&a.D&&a.D(g),m.call(h.parentNode,He.call(g,!0),h)}},He=Node.prototype.cloneNode=function(b){if(!e&&d&&this instanceof DocumentFragment)if(b)var c=
Ie.call(this.ownerDocument,this,!0);else return this.ownerDocument.createDocumentFragment();else this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName?c=a.a(this,b):c=f.call(this,b);b&&$a(c,this);return c},Ie=Document.prototype.importNode=function(b,c){c=c||!1;if("template"===b.localName)return a.a(b,c);var d=g.call(this,b,c);c&&$a(d,b);return d}}c&&(window.HTMLTemplateElement=a)})();var ka;Array.isArray?ka=Array.isArray:ka=function(a){return"[object Array]"===Object.prototype.toString.call(a)};var la=ka;var ma=0,oa,pa="undefined"!==typeof window?window:void 0,qa=pa||{},ra=qa.MutationObserver||qa.WebKitMutationObserver,sa="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel;function ta(){return"undefined"!==typeof oa?function(){oa(ua)}:va()}function wa(){var a=0,b=new ra(ua),c=document.createTextNode("");b.observe(c,{characterData:!0});return function(){c.data=a=++a%2}}
function xa(){var a=new MessageChannel;a.port1.onmessage=ua;return function(){return a.port2.postMessage(0)}}function va(){var a=setTimeout;return function(){return a(ua,1)}}var ya=Array(1E3);function ua(){for(var a=0;a<ma;a+=2)(0,ya[a])(ya[a+1]),ya[a]=void 0,ya[a+1]=void 0;ma=0}var za,Aa;
if("undefined"===typeof self&&"undefined"!==typeof process&&"[object process]"==={}.toString.call(process))Aa=function(){return process.jb(ua)};else{var Ba;if(ra)Ba=wa();else{var Ca;if(sa)Ca=xa();else{var Da;if(void 0===pa&&"function"===typeof require)try{var Ea=require("vertx");oa=Ea.lb||Ea.kb;Da=ta()}catch(a){Da=va()}else Da=va();Ca=Da}Ba=Ca}Aa=Ba}za=Aa;function Fa(a,b){ya[ma]=a;ya[ma+1]=b;ma+=2;2===ma&&za()};function Ga(a,b){var c=this,d=new this.constructor(Ha);void 0===d[Ia]&&Ja(d);var e=c.g;if(e){var f=arguments[e-1];Fa(function(){return Ka(e,d,f,c.f)})}else La(c,d,a,b);return d};function Ma(a){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(Ha);Na(b,a);return b};var Ia=Math.random().toString(36).substring(16);function Ha(){}var Pa=new Oa;function Qa(a){try{return a.then}catch(b){return Pa.error=b,Pa}}function Ra(a,b,c,d){try{a.call(b,c,d)}catch(e){return e}}function Sa(a,b,c){Fa(function(a){var d=!1,f=Ra(c,b,function(c){d||(d=!0,b!==c?Na(a,c):r(a,c))},function(b){d||(d=!0,u(a,b))});!d&&f&&(d=!0,u(a,f))},a)}function Ta(a,b){1===b.g?r(a,b.f):2===b.g?u(a,b.f):La(b,void 0,function(b){return Na(a,b)},function(b){return u(a,b)})}
function Ua(a,b,c){b.constructor===a.constructor&&c===Ga&&b.constructor.resolve===Ma?Ta(a,b):c===Pa?(u(a,Pa.error),Pa.error=null):void 0===c?r(a,b):"function"===typeof c?Sa(a,b,c):r(a,b)}function Na(a,b){if(a===b)u(a,new TypeError("You cannot resolve a promise with itself"));else{var c=typeof b;null===b||"object"!==c&&"function"!==c?r(a,b):Ua(a,b,Qa(b))}}function Va(a){a.pa&&a.pa(a.f);Wa(a)}function r(a,b){void 0===a.g&&(a.f=b,a.g=1,0!==a.I.length&&Fa(Wa,a))}
function u(a,b){void 0===a.g&&(a.g=2,a.f=b,Fa(Va,a))}function La(a,b,c,d){var e=a.I,f=e.length;a.pa=null;e[f]=b;e[f+1]=c;e[f+2]=d;0===f&&a.g&&Fa(Wa,a)}function Wa(a){var b=a.I,c=a.g;if(0!==b.length){for(var d,e,f=a.f,h=0;h<b.length;h+=3)d=b[h],e=b[h+c],d?Ka(c,d,e,f):e(f);a.I.length=0}}function Oa(){this.error=null}var Xa=new Oa;
function Ka(a,b,c,d){var e="function"===typeof c;if(e){try{var f=c(d)}catch(l){Xa.error=l,f=Xa}if(f===Xa){var h=!0;var g=f.error;f.error=null}else var k=!0;if(b===f){u(b,new TypeError("A promises callback cannot return that same promise."));return}}else f=d,k=!0;void 0===b.g&&(e&&k?Na(b,f):h?u(b,g):1===a?r(b,f):2===a&&u(b,f))}function Ya(a,b){try{b(function(b){Na(a,b)},function(b){u(a,b)})}catch(c){u(a,c)}}var ab=0;function Ja(a){a[Ia]=ab++;a.g=void 0;a.f=void 0;a.I=[]};function bb(a,b){this.Ga=a;this.A=new a(Ha);this.A[Ia]||Ja(this.A);if(la(b))if(this.S=this.length=b.length,this.f=Array(this.length),0===this.length)r(this.A,this.f);else{this.length=this.length||0;for(a=0;void 0===this.g&&a<b.length;a++)cb(this,b[a],a);0===this.S&&r(this.A,this.f)}else u(this.A,Error("Array Methods must be provided an Array"))}
function cb(a,b,c){var d=a.Ga,e=d.resolve;e===Ma?(e=Qa(b),e===Ga&&void 0!==b.g?db(a,b.g,c,b.f):"function"!==typeof e?(a.S--,a.f[c]=b):d===v?(d=new d(Ha),Ua(d,b,e),eb(a,d,c)):eb(a,new d(function(a){return a(b)}),c)):eb(a,e(b),c)}function db(a,b,c,d){var e=a.A;void 0===e.g&&(a.S--,2===b?u(e,d):a.f[c]=d);0===a.S&&r(e,a.f)}function eb(a,b,c){La(b,void 0,function(b){return db(a,1,c,b)},function(b){return db(a,2,c,b)})};function fb(a){return(new bb(this,a)).A};function gb(a){var b=this;return la(a)?new b(function(c,d){for(var e=a.length,f=0;f<e;f++)b.resolve(a[f]).then(c,d)}):new b(function(a,b){return b(new TypeError("You must pass an array to race."))})};function hb(a){var b=new this(Ha);u(b,a);return b};function v(a){this[Ia]=ab++;this.f=this.g=void 0;this.I=[];if(Ha!==a){if("function"!==typeof a)throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(this instanceof v)Ya(this,a);else throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}}v.prototype={constructor:v,then:Ga,a:function(a){return this.then(null,a)}};/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
window.Promise||(window.Promise=v,v.prototype["catch"]=v.prototype.a,v.prototype.then=v.prototype.then,v.all=fb,v.race=gb,v.resolve=Ma,v.reject=hb);(function(a){function b(a,b){if("function"===typeof window.CustomEvent)return new CustomEvent(a,b);var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!!b.bubbles,!!b.cancelable,b.detail);return c}function c(a){if(m)return a.ownerDocument!==document?a.ownerDocument:null;var b=a.__importDoc;if(!b&&a.parentNode){b=a.parentNode;if("function"===typeof b.closest)b=b.closest("link[rel=import]");else for(;!g(b)&&(b=b.parentNode););a.__importDoc=b}return b}function d(a){var b=document.querySelectorAll("link[rel=import]:not([import-dependency])"),
c=b.length;c?l(b,function(b){return h(b,function(){0===--c&&a()})}):a()}function e(a){function b(){"loading"!==document.readyState&&document.body&&(document.removeEventListener("readystatechange",b),a())}document.addEventListener("readystatechange",b);b()}function f(a){e(function(){return d(function(){return a&&a()})})}function h(a,b){if(a.__loaded)b&&b();else if("script"===a.localName&&!a.src||"style"===a.localName&&!a.firstChild)a.__loaded=!0,b&&b();else{var c=function(d){a.removeEventListener(d.type,
c);a.__loaded=!0;b&&b()};a.addEventListener("load",c);aa&&"style"===a.localName||a.addEventListener("error",c)}}function g(a){return a.nodeType===Node.ELEMENT_NODE&&"link"===a.localName&&"import"===a.rel}function k(){var a=this;this.a={};this.b=0;this.h=new MutationObserver(function(b){return a.Qa(b)});this.h.observe(document.head,{childList:!0,subtree:!0});this.c(document)}function l(a,b,c){var d=a?a.length:0,e=c?-1:1;for(c=c?d-1:0;c<d&&0<=c;c+=e)b(a[c],c)}var m="import"in document.createElement("link"),
n=null;!1==="currentScript"in document&&Object.defineProperty(document,"currentScript",{get:function(){return n||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null)},configurable:!0});var w=/(url\()([^)]*)(\))/g,I=/(@import[\s]+(?!url\())([^;]*)(;)/g,Za=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,t={Ka:function(a,b){a.href&&a.setAttribute("href",t.Y(a.getAttribute("href"),b));a.src&&a.setAttribute("src",t.Y(a.getAttribute("src"),b));if("style"===a.localName){var c=
t.ua(a.textContent,b,w);a.textContent=t.ua(c,b,I)}},ua:function(a,b,c){return a.replace(c,function(a,c,d,e){a=d.replace(/["']/g,"");b&&(a=t.Y(a,b));return c+"'"+a+"'"+e})},Y:function(a,b){if(void 0===t.ca){t.ca=!1;try{var c=new URL("b","http://a");c.pathname="c%20d";t.ca="http://a/c%20d"===c.href}catch(pc){}}if(t.ca)return(new URL(a,b)).href;c=t.Da;c||(c=document.implementation.createHTMLDocument("temp"),t.Da=c,c.ma=c.createElement("base"),c.head.appendChild(c.ma),c.la=c.createElement("a"));c.ma.href=
b;c.la.href=a;return c.la.href||a}},na={async:!0,load:function(a,b,c){if(a)if(a.match(/^data:/)){a=a.split(",");var d=a[1];d=-1<a[0].indexOf(";base64")?atob(d):decodeURIComponent(d);b(d)}else{var e=new XMLHttpRequest;e.open("GET",a,na.async);e.onload=function(){var a=e.responseURL||e.getResponseHeader("Location");a&&0===a.indexOf("/")&&(a=(location.origin||location.protocol+"//"+location.host)+a);var d=e.response||e.responseText;304===e.status||0===e.status||200<=e.status&&300>e.status?b(d,a):c(d)};
e.send()}else c("error: href must be specified")}},aa=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent);k.prototype.c=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){return b.L(a)})};k.prototype.L=function(a){var b=this,c=a.href;if(void 0!==this.a[c]){var d=this.a[c];d&&d.__loaded&&(a.import=d,this.o(a))}else this.b++,this.a[c]="pending",na.load(c,function(a,d){a=b.Ra(a,d||c);b.a[c]=a;b.b--;b.c(a);b.sa()},function(){b.a[c]=null;b.b--;b.sa()})};
k.prototype.Ra=function(a,b){if(!a)return document.createDocumentFragment();aa&&(a=a.replace(Za,function(a,b,c){return-1===a.indexOf("type=")?b+" type=import-disable "+c:a}));var c=document.createElement("template");c.innerHTML=a;if(c.content)a=c.content;else for(a=document.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);if(c=a.querySelector("base"))b=t.Y(c.getAttribute("href"),b),c.removeAttribute("href");c=a.querySelectorAll('link[rel=import], link[rel=stylesheet][href][type=import-disable],\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type="application/javascript"],\n script[type="text/javascript"]');
var d=0;l(c,function(a){h(a);t.Ka(a,b);a.setAttribute("import-dependency","");"script"===a.localName&&!a.src&&a.textContent&&(a.setAttribute("src","data:text/javascript;charset=utf-8,"+encodeURIComponent(a.textContent+("\n//# sourceURL="+b+(d?"-"+d:"")+".js\n"))),a.textContent="",d++)});return a};k.prototype.sa=function(){var a=this;if(!this.b){this.h.disconnect();this.flatten(document);var b=!1,c=!1,d=function(){c&&b&&(a.c(document),a.b||(a.h.observe(document.head,{childList:!0,subtree:!0}),a.Pa()))};
this.Wa(function(){c=!0;d()});this.Sa(function(){b=!0;d()})}};k.prototype.flatten=function(a){var b=this;a=a.querySelectorAll("link[rel=import]");l(a,function(a){var c=b.a[a.href];(a.import=c)&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(b.a[a.href]=a,a.readyState="loading",a.import=a,b.flatten(c),a.appendChild(c))})};k.prototype.Sa=function(a){function b(e){if(e<d){var f=c[e],g=document.createElement("script");f.removeAttribute("import-dependency");l(f.attributes,function(a){return g.setAttribute(a.name,
a.value)});n=g;f.parentNode.replaceChild(g,f);h(g,function(){n=null;b(e+1)})}else a()}var c=document.querySelectorAll("script[import-dependency]"),d=c.length;b(0)};k.prototype.Wa=function(a){var b=document.querySelectorAll("style[import-dependency],\n link[rel=stylesheet][import-dependency]"),d=b.length;if(d){var e=aa&&!!document.querySelector("link[rel=stylesheet][href][type=import-disable]");l(b,function(b){h(b,function(){b.removeAttribute("import-dependency");0===--d&&a()});if(e&&b.parentNode!==
document.head){var f=document.createElement(b.localName);f.__appliedElement=b;f.setAttribute("type","import-placeholder");b.parentNode.insertBefore(f,b.nextSibling);for(f=c(b);f&&c(f);)f=c(f);f.parentNode!==document.head&&(f=null);document.head.insertBefore(b,f);b.removeAttribute("type")}})}else a()};k.prototype.Pa=function(){var a=this,b=document.querySelectorAll("link[rel=import]");l(b,function(b){return a.o(b)},!0)};k.prototype.o=function(a){a.__loaded||(a.__loaded=!0,a.import&&(a.import.readyState=
"complete"),a.dispatchEvent(b(a.import?"load":"error",{bubbles:!1,cancelable:!1,detail:void 0})))};k.prototype.Qa=function(a){var b=this;l(a,function(a){return l(a.addedNodes,function(a){a&&a.nodeType===Node.ELEMENT_NODE&&(g(a)?b.L(a):b.c(a))})})};if(m){var T=document.querySelectorAll("link[rel=import]");l(T,function(a){a.import&&"loading"===a.import.readyState||(a.__loaded=!0)});T=function(a){a=a.target;g(a)&&(a.__loaded=!0)};document.addEventListener("load",T,!0);document.addEventListener("error",
T,!0)}else{var U=Object.getOwnPropertyDescriptor(Node.prototype,"baseURI");Object.defineProperty((!U||U.configurable?Node:Element).prototype,"baseURI",{get:function(){var a=g(this)?this:c(this);return a?a.href:U&&U.get?U.get.call(this):(document.querySelector("base")||window.location).href},configurable:!0,enumerable:!0});e(function(){return new k})}f(function(){return document.dispatchEvent(b("HTMLImportsLoaded",{cancelable:!0,bubbles:!0,detail:void 0}))});a.useNative=m;a.whenReady=f;a.importForElement=
c})(window.HTMLImports=window.HTMLImports||{});/*
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
window.WebComponents=window.WebComponents||{flags:{}};var ib=document.querySelector('script[src*="webcomponents-lite.js"]'),jb=/wc-(.+)/,x={};if(!x.noOpts){location.search.slice(1).split("&").forEach(function(a){a=a.split("=");var b;a[0]&&(b=a[0].match(jb))&&(x[b[1]]=a[1]||!0)});if(ib)for(var kb=0,lb;lb=ib.attributes[kb];kb++)"src"!==lb.name&&(x[lb.name]=lb.value||!0);if(x.log&&x.log.split){var mb=x.log.split(",");x.log={};mb.forEach(function(a){x.log[a]=!0})}else x.log={}}
window.WebComponents.flags=x;var nb=x.shadydom;nb&&(window.ShadyDOM=window.ShadyDOM||{},window.ShadyDOM.force=nb);var ob=x.register||x.ce;ob&&window.customElements&&(window.customElements.forcePolyfill=ob);/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var y=window.ShadyDOM||{};y.Ma=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var pb=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");y.M=!!(pb&&pb.configurable&&pb.get);y.ta=y.force||!y.Ma;function qb(a){return a.__shady&&void 0!==a.__shady.firstChild}function z(a){return"ShadyRoot"===a.Aa}function rb(a){a=a.getRootNode();if(z(a))return a}var sb=Element.prototype,tb=sb.matches||sb.matchesSelector||sb.mozMatchesSelector||sb.msMatchesSelector||sb.oMatchesSelector||sb.webkitMatchesSelector;
function ub(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function vb(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)ub(a,c[d]);return a}function wb(a,b){for(var c in b)a[c]=b[c]}var xb=document.createTextNode(""),yb=0,zb=[];(new MutationObserver(function(){for(;zb.length;)try{zb.shift()()}catch(a){throw xb.textContent=yb++,a;}})).observe(xb,{characterData:!0});
function Ab(a){zb.push(a);xb.textContent=yb++}var Bb=!!document.contains;function Cb(a,b){for(;b;){if(b==a)return!0;b=b.parentNode}return!1};var Db=[],Eb;function Fb(a){Eb||(Eb=!0,Ab(Gb));Db.push(a)}function Gb(){Eb=!1;for(var a=!!Db.length;Db.length;)Db.shift()();return a}Gb.list=Db;function Hb(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.V=new Set}function Ib(a){a.a||(a.a=!0,Ab(function(){Jb(a)}))}function Jb(a){if(a.a){a.a=!1;var b=a.takeRecords();b.length&&a.V.forEach(function(a){a(b)})}}Hb.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};
function Kb(a,b){a.__shady=a.__shady||{};a.__shady.N||(a.__shady.N=new Hb);a.__shady.N.V.add(b);var c=a.__shady.N;return{Ea:b,C:c,Ha:a,takeRecords:function(){return c.takeRecords()}}}function Lb(a){var b=a&&a.C;b&&(b.V.delete(a.Ea),b.V.size||(a.Ha.__shady.N=null))}
function Mb(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var A={},Nb=Element.prototype.insertBefore,Ob=Element.prototype.removeChild,Pb=Element.prototype.setAttribute,Qb=Element.prototype.removeAttribute,Rb=Element.prototype.cloneNode,Sb=Document.prototype.importNode,Tb=Element.prototype.addEventListener,Ub=Element.prototype.removeEventListener,Vb=Window.prototype.addEventListener,Wb=Window.prototype.removeEventListener,Xb=Element.prototype.dispatchEvent,Yb=Element.prototype.querySelector,Zb=Element.prototype.querySelectorAll,$b=Node.prototype.contains||
HTMLElement.prototype.contains;A.appendChild=Element.prototype.appendChild;A.insertBefore=Nb;A.removeChild=Ob;A.setAttribute=Pb;A.removeAttribute=Qb;A.cloneNode=Rb;A.importNode=Sb;A.addEventListener=Tb;A.removeEventListener=Ub;A.ab=Vb;A.bb=Wb;A.dispatchEvent=Xb;A.querySelector=Yb;A.querySelectorAll=Zb;A.contains=$b;var ac=/[&\u00A0"]/g,bc=/[&\u00A0<>]/g;function cc(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function dc(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var ec=dc("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),fc=dc("style script xmp iframe noembed noframes plaintext noscript".split(" "));
function gc(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var k=a;var l=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var m=g.localName,n="<"+m,w=g.attributes,I=0;k=w[I];I++)n+=" "+k.name+'="'+k.value.replace(ac,cc)+'"';n+=">";g=ec[m]?n:n+gc(g,l)+"</"+m+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&fc[k.localName]?g:g.replace(bc,cc);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g),
Error("not implemented");}}c+=g}return c};var B={},C=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),D=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function hc(a){var b=[];C.currentNode=a;for(a=C.firstChild();a;)b.push(a),a=C.nextSibling();return b}B.parentNode=function(a){C.currentNode=a;return C.parentNode()};B.firstChild=function(a){C.currentNode=a;return C.firstChild()};B.lastChild=function(a){C.currentNode=a;return C.lastChild()};B.previousSibling=function(a){C.currentNode=a;return C.previousSibling()};
B.nextSibling=function(a){C.currentNode=a;return C.nextSibling()};B.childNodes=hc;B.parentElement=function(a){D.currentNode=a;return D.parentNode()};B.firstElementChild=function(a){D.currentNode=a;return D.firstChild()};B.lastElementChild=function(a){D.currentNode=a;return D.lastChild()};B.previousElementSibling=function(a){D.currentNode=a;return D.previousSibling()};B.nextElementSibling=function(a){D.currentNode=a;return D.nextSibling()};
B.children=function(a){var b=[];D.currentNode=a;for(a=D.firstChild();a;)b.push(a),a=D.nextSibling();return b};B.innerHTML=function(a){return gc(a,function(a){return hc(a)})};B.textContent=function(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}};var ic=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),jc=document.implementation.createHTMLDocument("inert"),kc=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),lc={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:B.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;
return void 0!==a?a:B.parentNode(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:B.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:B.previousSibling(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&
void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return B.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return B.previousElementSibling(this)},configurable:!0}},mc={childNodes:{get:function(){if(qb(this)){if(!this.__shady.childNodes){this.__shady.childNodes=
[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=B.childNodes(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&this.__shady.firstChild;return void 0!==a?a:B.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:B.lastChild(this)},
configurable:!0},textContent:{get:function(){if(qb(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return B.textContent(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&
void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return B.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return B.lastElementChild(this)},configurable:!0},children:{get:function(){var a;qb(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===
Node.ELEMENT_NODE}):a=B.children(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return qb(this)?gc(a):B.innerHTML(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);var c=this.localName;c&&"template"!==c||(c="div");c=jc.createElement(c);for(ic&&ic.set?ic.set.call(c,a):c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild)},configurable:!0}},
qc={shadowRoot:{get:function(){return this.__shady&&this.__shady.Ua||null},configurable:!0}},rc={activeElement:{get:function(){var a=kc&&kc.get?kc.get.call(document):y.M?void 0:document.activeElement;if(a&&a.nodeType){var b=!!z(this);if(this===document||b&&this.host!==a&&A.contains.call(this.host,a)){for(b=rb(a);b&&b!==this;)a=b.host,b=rb(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}};
function E(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function F(a){E(a,lc);E(a,mc);E(a,rc)}var sc=y.M?function(){}:function(a){a.__shady&&a.__shady.Ba||(a.__shady=a.__shady||{},a.__shady.Ba=!0,E(a,lc,!0))},tc=y.M?function(){}:function(a){a.__shady&&a.__shady.za||(a.__shady=a.__shady||{},a.__shady.za=!0,E(a,mc,!0),E(a,qc,!0))};function uc(a,b,c){sc(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}
function vc(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=B.firstChild(a);a.__shady.lastChild=B.lastChild(a);tc(a);for(var b=a.__shady.childNodes=B.childNodes(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,sc(d)}};function wc(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&B.parentNode(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&xc(b.parentNode,b);d=rb(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:
b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}(f=e)&&d.H.push.apply(d.H,[].concat(f instanceof Array?f:ja(ia(f))));d&&("slot"===a.localName||f)&&yc(d);if(qb(a)){d=c;tc(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){f=b.childNodes;for(e=0;e<f.length;e++)uc(f[e],a,d);b.__shady=b.__shady||{};d=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=b.__shady.lastChild=
d;b.__shady.childNodes=d}else uc(b,a,d);if(zc(a)){yc(a.__shady.root);var h=!0}else a.__shady.root&&(h=!0)}h||(h=z(a)?a.host:a,c?(c=Ac(c),A.insertBefore.call(h,b,c)):A.appendChild.call(h,b));Bc(a,b);return b}
function xc(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=rb(b);if(qb(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=b.__shady.previousSibling);var d=b.__shady.previousSibling,e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=
b.__shady.previousSibling=b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=null);if(zc(a)){yc(a.__shady.root);var f=!0}}Cc(b);if(c){(d=a&&"slot"===a.localName)&&(f=!0);Dc(c);e=c.l;for(var h in e)for(var g=e[h],k=0;k<g.length;k++){var l=g[k];if(Cb(b,l)){g.splice(k,1);var m=c.s.indexOf(l);0<=m&&c.s.splice(m,1);k--;if(m=l.__shady.K)for(l=0;l<m.length;l++){var n=m[l],w=B.parentNode(n);w&&A.removeChild.call(w,n)}m=!0}}(m||d)&&yc(c)}f||(f=z(a)?a.host:a,(!a.__shady.root&&
"slot"!==b.localName||f===B.parentNode(b))&&A.removeChild.call(f,b));Bc(a,null,b);return b}function Cc(a){if(a.__shady&&void 0!==a.__shady.ka)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)Cc(e);a.__shady&&(a.__shady.ka=void 0)}function Ac(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.K)&&b.length?b[0]:Ac(a.nextSibling));return b}function zc(a){return(a=a&&a.__shady&&a.__shady.root)&&Ec(a)}
function Fc(a,b){if("slot"===b)a=a.parentNode,zc(a)&&yc(a.__shady.root);else if("slot"===a.localName&&"name"===b&&(b=rb(a))){var c=a.Ca,d=Gc(a);if(d!==c){c=b.l[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.l[d]||(b.l[d]=[]);c.push(a);1<c.length&&(b.l[d]=Hc(c))}yc(b)}}function Bc(a,b,c){if(a=a.__shady&&a.__shady.N)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Ib(a)}
function Ic(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.ka;void 0===b&&(z(a)?b=a:b=(b=a.parentNode)?Ic(b):a,A.contains.call(document.documentElement,a)&&(a.__shady.ka=b));return b}}function Jc(a,b,c){var d=[];Kc(a.childNodes,b,c,d);return d}function Kc(a,b,c,d){for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++){var g;if(g=h.nodeType===Node.ELEMENT_NODE){g=h;var k=b,l=c,m=d,n=k(g);n&&m.push(g);l&&l(n)?g=n:(Kc(g.childNodes,k,l,m),g=void 0)}if(g)break}}var Lc=null;
function Mc(a,b,c){Lc||(Lc=window.ShadyCSS&&window.ShadyCSS.ScopingShim);Lc&&"class"===b?Lc.setElementClass(a,c):(A.setAttribute.call(a,b,c),Fc(a,b))}function Nc(a,b){if(a.ownerDocument!==document)return A.importNode.call(document,a,b);var c=A.importNode.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Nc(a[b],!0),c.appendChild(d)}return c};var Oc="__eventWrappers"+Date.now(),Pc={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,
dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0};function Qc(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}
function Rc(a,b){if(!z)return a;a=Qc(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(h=a.indexOf(f),e=f),!z(f)||-1<h)return d}
var Sc={get composed(){!1!==this.isTrusted&&void 0===this.Z&&(this.Z=Pc[this.type]);return this.Z||!1},composedPath:function(){this.na||(this.na=Qc(this.__target,this.composed));return this.na},get target(){return Rc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.aa)return null;this.oa||(this.oa=Qc(this.aa,!0));return Rc(this.currentTarget,this.oa)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.$=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);
this.$=this.ya=!0}};function Tc(a){function b(b,d){b=new a(b,d);b.Z=d&&!!d.composed;return b}wb(b,a);b.prototype=a.prototype;return b}var Uc={focus:!0,blur:!0};function Vc(a){return a.__target!==a.target||a.aa!==a.relatedTarget}function Wc(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Vc(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.ya);d++);}
function Xc(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Wc(a,d,"capture");if(a.$)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(0===c||f&&f===e)if(Wc(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.$)break}}
function Yc(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],k=g.type,l=g.capture,m=g.once,n=g.passive;if(b===g.node&&c===k&&d===l&&e===m&&f===n)return h}return-1}
function Zc(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.ba||this,g=b[Oc];if(g){if(-1<Yc(g,h,a,d,e,f))return}else b[Oc]=[];g=function(d){e&&this.removeEventListener(a,b,c);d.__target||$c(d);if(h!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget",{get:function(){return h},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(h))if(Vc(d)&&d.target===d.relatedTarget)d.eventPhase===
Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===h||h instanceof Window){var g="object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(h,d);h!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return g}};b[Oc].push({node:this,type:a,capture:d,once:e,passive:f,cb:g});Uc[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?
"capture":"bubble"].push(g)):(this instanceof Window?A.ab:A.addEventListener).call(this,a,g,c)}}
function ad(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.ba||this,g=void 0;var k=null;try{k=b[Oc]}catch(l){}k&&(e=Yc(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].cb,k.length||(b[Oc]=void 0)));(this instanceof Window?A.bb:A.removeEventListener).call(this,a,g||b,c);g&&Uc[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}}
function bd(){for(var a in Uc)window.addEventListener(a,function(a){a.__target||($c(a),Xc(a))},!0)}function $c(a){a.__target=a.target;a.aa=a.relatedTarget;if(y.M){var b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__patchProto")){var c=Object.create(b);c.fb=b;ub(c,Sc);b.__patchProto=c}a.__proto__=b.__patchProto}else ub(a,Sc)}var cd=Tc(window.Event),dd=Tc(window.CustomEvent),ed=Tc(window.MouseEvent);function fd(a,b){return{index:a,O:[],U:b}}
function gd(a,b,c,d){var e=0,f=0,h=0,g=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(h=0;h<k;h++)if(a[h]!==c[h])break a;h=k}if(b==a.length&&d==c.length){g=a.length;for(var l=c.length,m=0;m<k-h&&hd(a[--g],c[--l]);)m++;g=m}e+=h;f+=h;b-=g;d-=g;if(0==b-e&&0==d-f)return[];if(e==b){for(b=fd(e,0);f<d;)b.O.push(c[f++]);return[b]}if(f==d)return[fd(e,b-e)];k=e;h=f;d=d-h+1;g=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(g),b[l][0]=l;for(l=0;l<g;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<g;m++)if(a[k+m-1]===c[h+l-1])b[l][m]=
b[l-1][m-1];else{var n=b[l-1][m]+1,w=b[l][m-1]+1;b[l][m]=n<w?n:w}k=b.length-1;h=b[0].length-1;d=b[k][h];for(a=[];0<k||0<h;)0==k?(a.push(2),h--):0==h?(a.push(3),k--):(g=b[k-1][h-1],l=b[k-1][h],m=b[k][h-1],n=l<m?l<g?l:g:m<g?m:g,n==g?(g==d?a.push(0):(a.push(1),d=g),k--,h--):n==l?(a.push(3),k--,d=l):(a.push(2),h--,d=m));a.reverse();b=void 0;k=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=fd(e,0));b.U++;e++;b.O.push(c[f]);f++;break;case 2:b||(b=fd(e,0));
b.U++;e++;break;case 3:b||(b=fd(e,0)),b.O.push(c[f]),f++}b&&k.push(b);return k}function hd(a,b){return a===b};var id={};function G(a,b,c){if(a!==id)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=G.prototype;a.Aa="ShadyRoot";vc(b);vc(a);a.host=b;a.a=c&&c.mode;b.__shady=b.__shady||{};b.__shady.root=a;b.__shady.Ua="closed"!==a.a?a:null;a.T=!1;a.s=[];a.l={};a.H=[];c=B.childNodes(b);for(var d=0,e=c.length;d<e;d++)A.removeChild.call(b,c[d]);return a}G.prototype=Object.create(DocumentFragment.prototype);function yc(a){a.T||(a.T=!0,Fb(function(){return jd(a)}))}
function jd(a){for(var b;a;){a.T&&(b=a);a:{var c=a;a=c.host.getRootNode();if(z(a))for(var d=c.host.childNodes,e=0;e<d.length;e++)if(c=d[e],"slot"==c.localName)break a;a=void 0}}b&&b._renderRoot()}
G.prototype._renderRoot=function(){this.T=!1;Dc(this);for(var a=0,b;a<this.s.length;a++){b=this.s[a];var c=b.__shady.assignedNodes;b.__shady.assignedNodes=[];b.__shady.K=[];if(b.__shady.qa=c)for(var d=0;d<c.length;d++){var e=c[d];e.__shady.ga=e.__shady.assignedSlot;e.__shady.assignedSlot===b&&(e.__shady.assignedSlot=null)}}for(b=this.host.firstChild;b;b=b.nextSibling)kd(this,b);for(a=0;a<this.s.length;a++){b=this.s[a];if(!b.__shady.assignedNodes.length)for(c=b.firstChild;c;c=c.nextSibling)kd(this,
c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&Ec(c)&&c._renderRoot();ld(this,b.__shady.K,b.__shady.assignedNodes);if(c=b.__shady.qa){for(d=0;d<c.length;d++)c[d].__shady.ga=null;b.__shady.qa=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.ia=!0)}b.__shady.ia&&(b.__shady.ia=!1,md(this,b))}a=this.s;b=[];for(c=0;c<a.length;c++)d=a[c].parentNode,d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d);for(a=0;a<b.length;a++){c=b[a];d=c===this?this.host:c;e=[];c=c.childNodes;for(var f=0;f<
c.length;f++){var h=c[f];if("slot"==h.localName){h=h.__shady.K;for(var g=0;g<h.length;g++)e.push(h[g])}else e.push(h)}c=void 0;f=B.childNodes(d);h=gd(e,e.length,f,f.length);for(var k=g=0;g<h.length&&(c=h[g]);g++){for(var l=0,m;l<c.O.length&&(m=c.O[l]);l++)B.parentNode(m)===d&&A.removeChild.call(d,m),f.splice(c.index+k,1);k-=c.U}for(k=0;k<h.length&&(c=h[k]);k++)for(g=f[c.index],l=c.index;l<c.index+c.U;l++)m=e[l],A.insertBefore.call(d,m,g),f.splice(l,0,m)}};
function kd(a,b,c){b.__shady=b.__shady||{};var d=b.__shady.ga;b.__shady.ga=null;c||(c=(a=a.l[b.slot||"__catchall"])&&a[0]);c?(c.__shady.assignedNodes.push(b),b.__shady.assignedSlot=c):b.__shady.assignedSlot=void 0;d!==b.__shady.assignedSlot&&b.__shady.assignedSlot&&(b.__shady.assignedSlot.__shady.ia=!0)}function ld(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=e.__shady.assignedNodes;f&&f.length&&ld(a,b,f)}else b.push(c[d])}
function md(a,b){A.dispatchEvent.call(b,new Event("slotchange"));b.__shady.assignedSlot&&md(a,b.__shady.assignedSlot)}function Dc(a){if(a.H.length){for(var b=a.H,c,d=0;d<b.length;d++){var e=b[d];e.__shady=e.__shady||{};vc(e);vc(e.parentNode);var f=Gc(e);a.l[f]?(c=c||{},c[f]=!0,a.l[f].push(e)):a.l[f]=[e];a.s.push(e)}if(c)for(var h in c)a.l[h]=Hc(a.l[h]);a.H=[]}}function Gc(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ca=b}
function Hc(a){return a.sort(function(a,c){a=nd(a);for(var b=nd(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})}function nd(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function Ec(a){Dc(a);return!!a.s.length}G.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.ba=this;this.host.addEventListener(a,b,c)};
G.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.ba=this;this.host.removeEventListener(a,b,c)};G.prototype.getElementById=function(a){return Jc(this,function(b){return b.id==a},function(a){return!!a})[0]||null};var od=G.prototype;E(od,mc,!0);E(od,rc,!0);function pd(a){var b=a.getRootNode();z(b)&&jd(b);return a.__shady&&a.__shady.assignedSlot||null}
var qd={addEventListener:Zc.bind(window),removeEventListener:ad.bind(window)},rd={addEventListener:Zc,removeEventListener:ad,appendChild:function(a){return wc(this,a)},insertBefore:function(a,b){return wc(this,a,b)},removeChild:function(a){return xc(this,a)},replaceChild:function(a,b){wc(this,a,b);xc(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=A.cloneNode.call(this,a);else if(b=A.cloneNode.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),
b.appendChild(d)}return b},getRootNode:function(){return Ic(this)},contains:function(a){return Cb(this,a)},get isConnected(){var a=this.ownerDocument;if(Bb&&A.contains.call(a,this)||a.documentElement&&A.contains.call(a.documentElement,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof G?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){Gb();return A.dispatchEvent.call(this,a)}},sd={get assignedSlot(){return pd(this)}},td={querySelector:function(a){return Jc(this,
function(b){return tb.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return Jc(this,function(b){return tb.call(b,a)})}},ud={assignedNodes:function(a){if("slot"===this.localName){var b=this.getRootNode();z(b)&&jd(b);return this.__shady?(a&&a.flatten?this.__shady.K:this.__shady.assignedNodes)||[]:[]}}},vd=vb({setAttribute:function(a,b){Mc(this,a,b)},removeAttribute:function(a){A.removeAttribute.call(this,a);Fc(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";
if(!a)throw"Not enough arguments.";return new G(id,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){Mc(this,"slot",a)},get assignedSlot(){return pd(this)}},td,ud);Object.defineProperties(vd,qc);var wd=vb({importNode:function(a,b){return Nc(a,b)},getElementById:function(a){return Jc(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},td);Object.defineProperties(wd,{_activeElement:rc.activeElement});
var xd=HTMLElement.prototype.blur,yd=vb({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():xd.call(this)}});function H(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}};if(y.ta){var ShadyDOM={inUse:y.ta,patch:function(a){return a},isShadyRoot:z,enqueue:Fb,flush:Gb,settings:y,filterMutations:Mb,observeChildren:Kb,unobserveChildren:Lb,nativeMethods:A,nativeTree:B};window.ShadyDOM=ShadyDOM;window.Event=cd;window.CustomEvent=dd;window.MouseEvent=ed;bd();var zd=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;H(window.Node.prototype,rd);H(window.Window.prototype,qd);H(window.Text.prototype,sd);H(window.DocumentFragment.prototype,td);H(window.Element.prototype,
vd);H(window.Document.prototype,wd);window.HTMLSlotElement&&H(window.HTMLSlotElement.prototype,ud);H(zd.prototype,yd);y.M&&(F(window.Node.prototype),F(window.Text.prototype),F(window.DocumentFragment.prototype),F(window.Element.prototype),F(zd.prototype),F(window.Document.prototype),window.HTMLSlotElement&&F(window.HTMLSlotElement.prototype));window.ShadowRoot=G};var Ad=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function Bd(a){var b=Ad.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function J(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}
function Cd(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
function K(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)K(d,b,c);d=Cd(a,e);continue}else if("template"===f){d=Cd(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)K(e,b,c)}d=d.firstChild?d.firstChild:Cd(a,d)}}function L(a,b,c){a[b]=c};function Dd(){this.a=new Map;this.o=new Map;this.h=[];this.c=!1}function Ed(a,b,c){a.a.set(b,c);a.o.set(c.constructor,c)}function Fd(a,b){a.c=!0;a.h.push(b)}function Gd(a,b){a.c&&K(b,function(b){return a.b(b)})}Dd.prototype.b=function(a){if(this.c&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.h.length;b++)this.h[b](a)}};function M(a,b){var c=[];K(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):Hd(a,d)}}
function N(a,b){var c=[];K(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}}
function O(a,b,c){c=void 0===c?{}:c;var d=c.$a||new Set,e=c.wa||function(b){return Hd(a,b)},f=[];K(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);O(a,c,{$a:f,wa:e})}})}else f.push(b)},d);if(a.c)for(b=
0;b<f.length;b++)a.b(f[b]);for(b=0;b<f.length;b++)e(f[b])}
function Hd(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructor;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(h){throw b.__CE_state=2,h;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}J(b)&&a.connectedCallback(b)}}}Dd.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};Dd.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};
Dd.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};function Id(a){var b=document;this.j=a;this.a=b;this.C=void 0;O(this.j,this.a);"loading"===this.a.readyState&&(this.C=new MutationObserver(this.b.bind(this)),this.C.observe(this.a,{childList:!0,subtree:!0}))}function Jd(a){a.C&&a.C.disconnect()}Id.prototype.b=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||Jd(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)O(this.j,c[d])};function Kd(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}Kd.prototype.resolve=function(a){if(this.a)throw Error("Already resolved.");this.a=a;this.b&&this.b(a)};function P(a){this.da=!1;this.j=a;this.ha=new Map;this.ea=function(a){return a()};this.R=!1;this.fa=[];this.Fa=new Id(a)}
P.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!Bd(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.j.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.da)throw Error("A custom element is already being defined.");this.da=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");
return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var h=d("disconnectedCallback");var g=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(m){return}finally{this.da=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:h,adoptedCallback:g,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]};Ed(this.j,a,b);this.fa.push(b);
this.R||(this.R=!0,this.ea(function(){return Ld(c)}))};function Ld(a){if(!1!==a.R){a.R=!1;for(var b=a.fa,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);O(a.j,document,{wa:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.j.a.get(e)&&c.push(b)}}});for(e=0;e<c.length;e++)Hd(a.j,c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var h=0;h<f.length;h++)Hd(a.j,f[h]);(e=a.ha.get(e))&&e.resolve(void 0)}}}
P.prototype.get=function(a){if(a=this.j.a.get(a))return a.constructor};P.prototype.whenDefined=function(a){if(!Bd(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.ha.get(a);if(b)return b.c;b=new Kd;this.ha.set(a,b);this.j.a.get(a)&&!this.fa.some(function(b){return b.localName===a})&&b.resolve(void 0);return b.c};P.prototype.Ta=function(a){Jd(this.Fa);var b=this.ea;this.ea=function(c){return a(function(){return b(c)})}};
window.CustomElementRegistry=P;P.prototype.define=P.prototype.define;P.prototype.get=P.prototype.get;P.prototype.whenDefined=P.prototype.whenDefined;P.prototype.polyfillWrapFlushCallback=P.prototype.Ta;var Md=window.Document.prototype.createElement,Nd=window.Document.prototype.createElementNS,Od=window.Document.prototype.importNode,Pd=window.Document.prototype.prepend,Qd=window.Document.prototype.append,Rd=window.DocumentFragment.prototype.prepend,Sd=window.DocumentFragment.prototype.append,Td=window.Node.prototype.cloneNode,Ud=window.Node.prototype.appendChild,Vd=window.Node.prototype.insertBefore,Wd=window.Node.prototype.removeChild,Xd=window.Node.prototype.replaceChild,Yd=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),Zd=window.Element.prototype.attachShadow,$d=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),ae=window.Element.prototype.getAttribute,be=window.Element.prototype.setAttribute,ce=window.Element.prototype.removeAttribute,de=window.Element.prototype.getAttributeNS,ee=window.Element.prototype.setAttributeNS,fe=window.Element.prototype.removeAttributeNS,ge=window.Element.prototype.insertAdjacentElement,he=window.Element.prototype.prepend,ie=window.Element.prototype.append,
je=window.Element.prototype.before,ke=window.Element.prototype.after,le=window.Element.prototype.replaceWith,me=window.Element.prototype.remove,ne=window.HTMLElement,oe=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),pe=window.HTMLElement.prototype.insertAdjacentElement;var qe=new function(){};function re(){var a=se;window.HTMLElement=function(){function b(){var b=this.constructor,d=a.o.get(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Md.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.b(e),e;d=e.length-1;var f=e[d];if(f===qe)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=qe;Object.setPrototypeOf(f,b.prototype);a.b(f);return f}b.prototype=ne.prototype;return b}()};function te(a,b,c){function d(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var f=[],l=0;l<d.length;l++){var m=d[l];m instanceof Element&&J(m)&&f.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)e.push(m);else e.push(m)}b.apply(this,d);for(d=0;d<f.length;d++)N(a,f[d]);if(J(this))for(d=0;d<e.length;d++)f=e[d],f instanceof Element&&M(a,f)}}void 0!==c.X&&(b.prepend=d(c.X));void 0!==c.append&&(b.append=d(c.append))};function ue(){var a=se;L(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.a.get(b);if(c)return new c.constructor}b=Md.call(this,b);a.b(b);return b});L(Document.prototype,"importNode",function(b,c){b=Od.call(this,b,c);this.__CE_hasRegistry?O(a,b):Gd(a,b);return b});L(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.a.get(c);if(d)return new d.constructor}b=Nd.call(this,b,c);a.b(b);return b});
te(a,Document.prototype,{X:Pd,append:Qd})};function ve(){var a=se;function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,g=e.length;if(0<g&&J(this)){c=Array(g);for(var k=0;k<g;k++)c[k]=e[k]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)N(a,c[b])}}})}L(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);
b=Vd.call(this,b,d);if(J(this))for(d=0;d<c.length;d++)M(a,c[d]);return b}c=J(b);d=Vd.call(this,b,d);c&&N(a,b);J(this)&&M(a,b);return d});L(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Ud.call(this,b);if(J(this))for(var e=0;e<c.length;e++)M(a,c[e]);return b}c=J(b);e=Ud.call(this,b);c&&N(a,b);J(this)&&M(a,b);return e});L(Node.prototype,"cloneNode",function(b){b=Td.call(this,b);this.ownerDocument.__CE_hasRegistry?O(a,b):
Gd(a,b);return b});L(Node.prototype,"removeChild",function(b){var c=J(b),e=Wd.call(this,b);c&&N(a,b);return e});L(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Xd.call(this,b,d);if(J(this))for(N(a,d),d=0;d<c.length;d++)M(a,c[d]);return b}c=J(b);var f=Xd.call(this,b,d),h=J(this);h&&N(a,d);c&&N(a,b);h&&M(a,b);return f});Yd&&Yd.get?b(Node.prototype,Yd):Fd(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=
[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Wd.call(this,this.firstChild);Ud.call(this,document.createTextNode(a))}})})};function we(a){var b=Element.prototype;function c(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var g=[],k=0;k<d.length;k++){var l=d[k];l instanceof Element&&J(l)&&g.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)e.push(l);else e.push(l)}b.apply(this,d);for(d=0;d<g.length;d++)N(a,g[d]);if(J(this))for(d=0;d<e.length;d++)g=e[d],g instanceof Element&&M(a,g)}}void 0!==je&&(b.before=c(je));void 0!==je&&(b.after=c(ke));void 0!==
le&&L(b,"replaceWith",function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=[];for(var h=[],g=0;g<c.length;g++){var k=c[g];k instanceof Element&&J(k)&&h.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)d.push(k);else d.push(k)}g=J(this);le.apply(this,c);for(c=0;c<h.length;c++)N(a,h[c]);if(g)for(N(a,this),c=0;c<d.length;c++)h=d[c],h instanceof Element&&M(a,h)});void 0!==me&&L(b,"remove",function(){var b=J(this);me.call(this);b&&N(a,this)})};function xe(){var a=se;function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;J(this)&&(e=[],K(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var l=e[f];1===l.__CE_state&&a.disconnectedCallback(l)}this.ownerDocument.__CE_hasRegistry?O(a,this):Gd(a,this);return b}})}function c(b,c){L(b,"insertAdjacentElement",function(b,d){var e=J(d);b=c.call(this,b,d);e&&N(a,d);J(b)&&M(a,d);
return b})}Zd&&L(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=Zd.call(this,a)});$d&&$d.get?b(Element.prototype,$d):oe&&oe.get?b(HTMLElement.prototype,oe):Fd(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return Td.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,c=b?this.content:this,d=Md.call(document,this.localName);for(d.innerHTML=a;0<c.childNodes.length;)Wd.call(c,c.childNodes[0]);for(a=b?d.content:d;0<a.childNodes.length;)Ud.call(c,
a.childNodes[0])}})});L(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return be.call(this,b,c);var d=ae.call(this,b);be.call(this,b,c);c=ae.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});L(Element.prototype,"setAttributeNS",function(b,c,f){if(1!==this.__CE_state)return ee.call(this,b,c,f);var d=de.call(this,b,c);ee.call(this,b,c,f);f=de.call(this,b,c);a.attributeChangedCallback(this,c,d,f,b)});L(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return ce.call(this,
b);var c=ae.call(this,b);ce.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});L(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return fe.call(this,b,c);var d=de.call(this,b,c);fe.call(this,b,c);var e=de.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});pe?c(HTMLElement.prototype,pe):ge?c(Element.prototype,ge):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");te(a,Element.prototype,{X:he,append:ie});we(a)}
;var ye=window.customElements;if(!ye||ye.forcePolyfill||"function"!=typeof ye.define||"function"!=typeof ye.get){var se=new Dd;re();ue();te(se,DocumentFragment.prototype,{X:Rd,append:Sd});ve();xe();document.__CE_hasRegistry=!0;var customElements=new P(se);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};function ze(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function Ae(a){a=a.replace(Be,"").replace(Ce,"");var b=De,c=a,d=new ze;d.start=0;d.end=c.length;for(var e=d,f=0,h=c.length;f<h;f++)if("{"===c[f]){e.rules||(e.rules=[]);var g=e,k=g.rules[g.rules.length-1]||null;e=new ze;e.start=f+1;e.parent=g;e.previous=k;g.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}
function De(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=Ee(c),c=c.replace(Fe," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=Je:c.match(Ke)&&(a.type=Le,a.keyframesName=a.selector.split(Fe).pop()):a.type=0===c.indexOf("--")?Me:Ne);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)De(f,
b);return a}function Ee(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}
function Oe(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=Oe(g,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(Pe,"").replace(Qe,""),b=b.replace(Re,"").replace(Se,"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
var Ne=1,Le=7,Je=4,Me=1E3,Be=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,Ce=/@import[^;]*;/gim,Pe=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Qe=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,Re=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,Se=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Ke=/^@[^\s]*keyframes/,Fe=/\s+/g;var Q=!(window.ShadyDOM&&window.ShadyDOM.inUse),Te;function Ue(a){Te=a&&a.shimcssproperties?!1:Q||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Te=window.ShadyCSS.nativeCss:window.ShadyCSS?(Ue(window.ShadyCSS),window.ShadyCSS=void 0):Ue(window.WebComponents&&window.WebComponents.flags);var R=Te;var Ve=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,We=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Xe=/(--[\w-]+)\s*([:,;)]|$)/gi,Ye=/(animation\s*:)|(animation-name\s*:)/,Ze=/@media\s(.*)/,$e=/\{[^}]*\}/g;var af=new Set;function bf(a,b){if(!a)return"";"string"===typeof a&&(a=Ae(a));b&&cf(a,b);return Oe(a,R)}function df(a){!a.__cssRules&&a.textContent&&(a.__cssRules=Ae(a.textContent));return a.__cssRules||null}function ef(a){return!!a.parent&&a.parent.type===Le}function cf(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===Je){var h=a.selector.match(Ze);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===Ne?b(a):c&&f===Le?c(a):f===Me&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)cf(g,b,c,d)}}}
function ff(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;gf(e,c,d);return e}var S=null;function gf(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);S?a.compareDocumentPosition(S)===Node.DOCUMENT_POSITION_PRECEDING&&(S=a):S=a}
function hf(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=hf(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function jf(a,b){Q?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function V(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,P:c}};function kf(){}function lf(a,b,c){var d=W;a.__styleScoped?a.__styleScoped=null:mf(d,a,b||"",c)}function mf(a,b,c,d){b.nodeType===Node.ELEMENT_NODE&&nf(b,c,d);if(b="template"===b.localName?(b.content||b.gb).childNodes:b.children||b.childNodes)for(var e=0;e<b.length;e++)mf(a,b[e],c,d)}
function nf(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute(of);c?d&&(b=d.replace("style-scope","").replace(b,""),jf(a,b)):jf(a,(d?d+" ":"")+"style-scope "+b)}}function pf(a,b,c){var d=W,e=a.__cssBuild;Q||"shady"===e?b=bf(b,c):(a=V(a),b=qf(d,b,a.is,a.P,c)+"\n\n");return b.trim()}
function qf(a,b,c,d,e){var f=rf(c,d);c=c?sf+c:"";return bf(b,function(b){b.c||(b.selector=b.m=tf(a,b,a.b,c,f),b.c=!0);e&&e(b,c,f)})}function rf(a,b){return b?"[is="+a+"]":a}function tf(a,b,c,d,e){var f=b.selector.split(uf);if(!ef(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,d,e)}return f.join(uf)}function vf(a){return a.replace(wf,function(a,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})}
kf.prototype.b=function(a,b,c){var d=!1;a=a.trim();var e=wf.test(a);e&&(a=a.replace(wf,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=vf(a));a=a.replace(xf,yf+" $1");a=a.replace(zf,function(a,e,g){d||(a=Af(g,e,b,c),d=d||a.stop,e=a.Ja,g=a.value);return e+g});e&&(a=vf(a));return a};
function Af(a,b,c,d){var e=a.indexOf(Bf);0<=a.indexOf(yf)?a=Cf(a,d):0!==e&&(a=c?Df(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Ef,function(a,b){return" > "+b}))}a=a.replace(Ff,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,Ja:b,stop:f}}function Df(a,b){a=a.split(Gf);a[0]+=b;return a.join(Gf)}
function Cf(a,b){var c=a.match(Hf);return(c=c&&c[2].trim()||"")?c[0].match(If)?a.replace(Hf,function(a,c,f){return b+f}):c.split(If)[0]===b?c:Jf:a.replace(yf,b)}function Kf(a){a.selector===Lf&&(a.selector="html")}kf.prototype.c=function(a){return a.match(Bf)?this.b(a,Mf):Df(a.trim(),Mf)};q.Object.defineProperties(kf.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var wf=/:(nth[-\w]+)\(([^)]+)\)/,Mf=":not(.style-scope)",uf=",",zf=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,If=/[[.:#*]/,yf=":host",Lf=":root",Bf="::slotted",xf=new RegExp("^("+Bf+")"),Hf=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ef=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ff=/(.*):dir\((?:(ltr|rtl))\)/,sf=".",Gf=":",of="class",Jf="should_not_match",W=new kf;function Nf(a,b,c,d){this.w=a||null;this.b=b||null;this.ja=c||[];this.G=null;this.P=d||"";this.a=this.u=this.B=null}function X(a){return a?a.__styleInfo:null}function Of(a,b){return a.__styleInfo=b}Nf.prototype.c=function(){return this.w};Nf.prototype._getStyleRules=Nf.prototype.c;var Pf,Qf=window.Element.prototype;Pf=Qf.matches||Qf.matchesSelector||Qf.mozMatchesSelector||Qf.msMatchesSelector||Qf.oMatchesSelector||Qf.webkitMatchesSelector;var Rf=navigator.userAgent.match("Trident");function Sf(){}function Tf(a){var b={},c=[],d=0;cf(a,function(a){Uf(a);a.index=d++;a=a.i.cssText;for(var c;c=Xe.exec(a);){var e=c[1];":"!==c[2]&&(b[e]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var e in b)a.push(e);return a}
function Uf(a){if(!a.i){var b={},c={};Vf(a,c)&&(b.v=c,a.rules=null);b.cssText=a.parsedCssText.replace($e,"").replace(Ve,"");a.i=b}}function Vf(a,b){var c=a.i;if(c){if(c.v)return Object.assign(b,c.v),!0}else{c=a.parsedCssText;for(var d;a=Ve.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}}
function Wf(a,b,c){b&&(b=0<=b.indexOf(";")?Xf(a,b,c):hf(b,function(b,e,f,h){if(!e)return b+h;(e=Wf(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Wf(a,c[f]||f,c)||f;return b+(e||"")+h}));return b&&b.trim()||""}
function Xf(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){We.lastIndex=0;if(f=We.exec(e))e=Wf(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var h=e.substring(f);h=h.trim();h=Wf(a,h,c)||h;e=e.substring(0,f)+h}b[d]=e&&e.lastIndexOf(";")===e.length-1?e.slice(0,-1):e||""}return b.join(";")}
function Yf(a,b){var c={},d=[];cf(a,function(a){a.i||Uf(a);var e=a.m||a.parsedSelector;b&&a.i.v&&e&&Pf.call(b,e)&&(Vf(a,c),a=a.index,e=parseInt(a/32,10),d[e]=(d[e]||0)|1<<a%32)},null,!0);return{v:c,key:d}}
function Zf(a,b,c,d){b.i||Uf(b);if(b.i.v){var e=V(a);a=e.is;e=e.P;e=a?rf(a,e):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===e+" > *."+e||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(e));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=e,g&&(Q&&!b.m&&(b.m=tf(W,b,W.b,a?sf+a:"",e)),c=b.m||e),d({Xa:c,Oa:g,ib:h})}}
function $f(a,b){var c={},d={},e=b&&b.__cssBuild;cf(b,function(b){Zf(a,b,e,function(e){Pf.call(a.hb||a,e.Xa)&&(e.Oa?Vf(b,c):Vf(b,d))})},null,!0);return{Va:d,Na:c}}
function ag(a,b,c,d){var e=V(b),f=rf(e.is,e.P),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=X(b).w;var g=bg(e,d);return pf(b,e,function(b){var e="";b.i||Uf(b);b.i.cssText&&(e=Xf(a,b.i.cssText,c));b.cssText=e;if(!Q&&!ef(b)&&b.cssText){var k=e=b.cssText;null==b.ra&&(b.ra=Ye.test(e));if(b.ra)if(null==b.W){b.W=[];for(var n in g)k=g[n],k=k(e),e!==k&&(e=k,b.W.push(n))}else{for(n=0;n<b.W.length;++n)k=g[b.W[n]],e=k(e);k=e}b.cssText=k;b.m=b.m||b.selector;e="."+d;
n=b.m.split(",");k=0;for(var w=n.length,I;k<w&&(I=n[k]);k++)n[k]=I.match(h)?I.replace(f,e):e+" "+I;b.selector=n.join(",")}})}function bg(a,b){a=a.b;var c={};if(!Q&&a)for(var d=0,e=a[d];d<a.length;e=a[++d]){var f=e,h=b;f.h=new RegExp(f.keyframesName,"g");f.a=f.keyframesName+"-"+h;f.m=f.m||f.selector;f.selector=f.m.replace(f.keyframesName,f.a);c[e.keyframesName]=cg(e)}return c}function cg(a){return function(b){return b.replace(a.h,a.a)}}
function dg(a,b){var c=eg,d=df(a);a.textContent=bf(d,function(a){var d=a.cssText=a.parsedCssText;a.i&&a.i.cssText&&(d=d.replace(Pe,"").replace(Qe,""),a.cssText=Xf(c,d,b))})}q.Object.defineProperties(Sf.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var eg=new Sf;var fg={},gg=window.customElements;if(gg&&!Q){var hg=gg.define;gg.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(S?S.nextSibling:null)||e.firstChild);S=d;fg[a]=d;return hg.call(gg,a,b,c)}};function ig(){this.cache={}}ig.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({v:b,styleElement:c,u:d});100<e.length&&e.shift();this.cache[a]=e};ig.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d],f;a:{for(f=0;f<c.length;f++){var h=c[f];if(e.v[h]!==b[h]){f=!1;break a}}f=!0}if(f)return e}};function jg(){}
function kg(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var h=e;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(W.a);if((h=-1<g?h[g+1]:"")&&f===e.ownerDocument)lf(e,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&
(f=f.host))if(f=V(f).is,h===f)for(e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+W.a+")"),f=0;f<e.length;f++)nf(e[f],h);else h&&lf(e,h,!0),lf(e,f)}}}}
if(!Q){var lg=new MutationObserver(kg),mg=function(a){lg.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)mg(document);else{var ng=function(){mg(document.body)};window.HTMLImports?window.HTMLImports.whenReady(ng):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){ng();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else ng()})}jg=function(){kg(lg.takeRecords())}}
var og=jg;var pg={};var qg=Promise.resolve();function rg(a){if(a=pg[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function sg(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function tg(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,qg.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var ug=null,vg=window.HTMLImports&&window.HTMLImports.whenReady||null,wg;function xg(a){requestAnimationFrame(function(){vg?vg(a):(ug||(ug=new Promise(function(a){wg=a}),"complete"===document.readyState?wg():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&wg()})),ug.then(function(){a&&a()}))})};var yg=new ig;function Y(){var a=this;this.L={};this.c=document.documentElement;var b=new ze;b.rules=[];this.h=Of(this.c,new Nf(b));this.o=!1;this.b=this.a=null;xg(function(){zg(a)})}p=Y.prototype;p.xa=function(){og()};p.La=function(a){return df(a)};p.Za=function(a){return bf(a)};
p.prepareTemplate=function(a,b,c){if(!a.h){a.h=!0;a.name=b;a.extends=c;pg[b]=a;var d=(d=a.content.querySelector("style"))?d.getAttribute("css-build")||"":"";var e=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!Q){var k=g.textContent;af.has(k)||(af.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else e.push(g.textContent),g.parentNode.removeChild(g)}e=e.join("").trim();c={is:b,extends:c,eb:d};
Q||lf(a.content,b);zg(this);f=We.test(e)||Ve.test(e);We.lastIndex=0;Ve.lastIndex=0;e=Ae(e);f&&R&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.o=d;d=[];R||(d=Tf(a._styleAst));if(!d.length||R)e=Q?a.content:null,b=fg[b],f=pf(c,a._styleAst),b=f.length?ff(f,c.is,e,b):void 0,a.a=b;a.c=d}};
function Ag(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.va(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.o)&&a.F()})})}function zg(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=rg);Ag(a)}
p.F=function(){zg(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(R)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&R&&this.a){var d=df(c);zg(this);this.a.transformRules(d);c.textContent=bf(d)}}else for(Bg(this,this.c,this.h),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&dg(c,this.h.B);this.b.enqueued=!1;this.o&&!R&&this.styleDocument()}}};
p.styleElement=function(a,b){var c=V(a).is,d=X(a);if(!d){var e=V(a);d=e.is;e=e.P;var f=fg[d];d=pg[d];if(d){var h=d._styleAst;var g=d.c}d=Of(a,new Nf(h,f,g,e))}a!==this.c&&(this.o=!0);b&&(d.G=d.G||{},Object.assign(d.G,b));if(R){if(d.G){b=d.G;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=pg[c])||a===this.c)&&k&&k.a&&!sg(k)){if(sg(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)zg(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=pf(a,
d.w),tg(k);Q&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=pf(a,d.w));d.w=k._styleAst}}else if(Bg(this,a,d),d.ja&&d.ja.length){c=d;k=V(a).is;d=(b=yg.fetch(k,c.B,c.ja))?b.styleElement:null;h=c.u;(g=b&&b.u)||(g=this.L[k]=(this.L[k]||0)+1,g=k+"-"+g);c.u=g;g=c.u;e=eg;e=d?d.textContent||"":ag(e,a,c.B,g);f=X(a);var l=f.a;l&&!Q&&l!==d&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));Q?f.a?(f.a.textContent=e,d=f.a):e&&(d=ff(e,g,a.shadowRoot,f.b)):d?d.parentNode||(Rf&&
-1<e.indexOf("@media")&&(d.textContent=e),gf(d,null,f.b)):e&&(d=ff(e,g,null,f.b));d&&(d._useCount=d._useCount||0,f.a!=d&&d._useCount++,f.a=d);g=d;Q||(d=c.u,f=e=a.getAttribute("class")||"",h&&(f=e.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+d,e!==f&&jf(a,f));b||yg.store(k,c.B,g,c.u)}};function Cg(a,b){return(b=b.getRootNode().host)?X(b)?b:Cg(a,b):a.c}
function Bg(a,b,c){a=Cg(a,b);var d=X(a);a=Object.create(d.B||null);var e=$f(b,c.w);b=Yf(d.w,b).v;Object.assign(a,e.Na,b,e.Va);b=c.G;for(var f in b)if((e=b[f])||0===e)a[f]=e;f=eg;b=Object.getOwnPropertyNames(a);for(e=0;e<b.length;e++)d=b[e],a[d]=Wf(f,a[d],a);c.B=a}p.styleDocument=function(a){this.styleSubtree(this.c,a)};
p.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};p.va=function(a){var b=this,c=df(a);cf(c,function(a){if(Q)Kf(a);else{var c=W;a.selector=a.parsedSelector;Kf(a);a.selector=a.m=tf(c,a,c.c,void 0,void 0)}R&&(zg(b),b.a&&b.a.transformRule(a))});R?a.textContent=bf(c):this.h.w.rules.push(c)};
p.getComputedStyleValue=function(a,b){var c;R||(c=(X(a)||X(Cg(this,a))).B[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};p.Ya=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===W.a){c=d[e+1];break}}}c&&b.push(W.a,c);R||(c=X(a))&&c.u&&b.push(eg.a,c.u);jf(a,b.join(" "))};p.Ia=function(a){return X(a)};Y.prototype.flush=Y.prototype.xa;
Y.prototype.prepareTemplate=Y.prototype.prepareTemplate;Y.prototype.styleElement=Y.prototype.styleElement;Y.prototype.styleDocument=Y.prototype.styleDocument;Y.prototype.styleSubtree=Y.prototype.styleSubtree;Y.prototype.getComputedStyleValue=Y.prototype.getComputedStyleValue;Y.prototype.setElementClass=Y.prototype.Ya;Y.prototype._styleInfoForNode=Y.prototype.Ia;Y.prototype.transformCustomStyleForDocument=Y.prototype.va;Y.prototype.getStyleAst=Y.prototype.La;Y.prototype.styleAstToString=Y.prototype.Za;
Y.prototype.flushCustomStyles=Y.prototype.F;Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return Q}},nativeCss:{get:function(){return R}}});var Z=new Y,Dg,Eg;window.ShadyCSS&&(Dg=window.ShadyCSS.ApplyShim,Eg=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.F();Z.prepareTemplate(a,b,c)},styleSubtree:function(a,b){Z.F();Z.styleSubtree(a,b)},styleElement:function(a){Z.F();Z.styleElement(a)},styleDocument:function(a){Z.F();Z.styleDocument(a)},getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:R,nativeShadow:Q};Dg&&(window.ShadyCSS.ApplyShim=Dg);
Eg&&(window.ShadyCSS.CustomStyleInterface=Eg);var Fg=window.customElements,Gg=window.HTMLImports,Hg=window.HTMLTemplateElement;window.WebComponents=window.WebComponents||{};if(Fg&&Fg.polyfillWrapFlushCallback){var Ig,Jg=function(){if(Ig){Hg.J&&Hg.J(window.document);var a=Ig;Ig=null;a();return!0}},Kg=Gg.whenReady;Fg.polyfillWrapFlushCallback(function(a){Ig=a;Kg(Jg)});Gg.whenReady=function(a){Kg(function(){Jg()?Gg.whenReady(a):a()})}}
Gg.whenReady(function(){requestAnimationFrame(function(){window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})});var Lg=document.createElement("style");Lg.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var Mg=document.querySelector("head");Mg.insertBefore(Lg,Mg.firstChild);}).call(this);
//# sourceMappingURL=webcomponents-lite.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,74 @@
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by 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() {
'use strict';
// global for (1) existence means `WebComponentsReady` will file,
// (2) WebComponents.ready == true means event has fired.
window.WebComponents = window.WebComponents || {};
var name = 'webcomponents-loader.js';
// Feature detect which polyfill needs to be imported.
var polyfills = [];
if (!('import' in document.createElement('link'))) {
polyfills.push('hi');
}
if (!('attachShadow' in Element.prototype && 'getRootNode' in Element.prototype) ||
(window.ShadyDOM && window.ShadyDOM.force)) {
polyfills.push('sd');
}
if (!window.customElements || window.customElements.forcePolyfill) {
polyfills.push('ce');
}
// NOTE: any browser that does not have template or ES6 features
// must load the full suite (called `lite` for legacy reasons) of polyfills.
if (!('content' in document.createElement('template')) || !window.Promise || !Array.from ||
// Edge has broken fragment cloning which means you cannot clone template.content
!(document.createDocumentFragment().cloneNode() instanceof DocumentFragment)) {
polyfills = ['lite'];
}
if (polyfills.length) {
var script = document.querySelector('script[src*="' + name +'"]');
var newScript = document.createElement('script');
// Load it from the right place.
var replacement = 'webcomponents-' + polyfills.join('-') + '.js';
var url = script.src.replace(name, replacement);
newScript.src = url;
// NOTE: this is required to ensure the polyfills are loaded before
// *native* html imports load on older Chrome versions. This *is* CSP
// compliant since CSP rules must have allowed this script to run.
// In all other cases, this can be async.
if (document.readyState === 'loading' && ('import' in document.createElement('link'))) {
document.write(newScript.outerHTML);
} else {
document.head.appendChild(newScript);
}
} else {
// Ensure `WebComponentsReady` is fired also when there are no polyfills loaded.
// however, we have to wait for the document to be in 'interactive' state,
// otherwise a rAF may fire before scripts in <body>
var fire = function() {
requestAnimationFrame(function() {
window.WebComponents.ready = true;
document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));
});
};
if (document.readyState !== 'loading') {
fire();
} else {
document.addEventListener('readystatechange', function wait() {
fire();
document.removeEventListener('readystatechange', wait);
});
}
}
})();

View File

@@ -0,0 +1,151 @@
(function(){/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
'use strict';var n,p="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(){ba=function(){};p.Symbol||(p.Symbol=ca)}var ca=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
function da(){ba();var a=p.Symbol.iterator;a||(a=p.Symbol.iterator=p.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ea(this)}});da=function(){}}function ea(a){var b=0;return fa(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function fa(a){da();a={next:a};a[p.Symbol.iterator]=function(){return this};return a}function ha(a){da();var b=a[Symbol.iterator];return b?b.call(a):ea(a)}
function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}var r=window.ShadyDOM||{};r.va=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ja=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");r.F=!!(ja&&ja.configurable&&ja.get);r.ga=r.force||!r.va;function t(a){return a.__shady&&void 0!==a.__shady.firstChild}function u(a){return"ShadyRoot"===a.ma}function ka(a){a=a.getRootNode();if(u(a))return a}
var v=Element.prototype,la=v.matches||v.matchesSelector||v.mozMatchesSelector||v.msMatchesSelector||v.oMatchesSelector||v.webkitMatchesSelector;function ma(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function na(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)ma(a,c[d]);return a}function oa(a,b){for(var c in b)a[c]=b[c]}
var pa=document.createTextNode(""),qa=0,ra=[];(new MutationObserver(function(){for(;ra.length;)try{ra.shift()()}catch(a){throw pa.textContent=qa++,a;}})).observe(pa,{characterData:!0});function sa(a){ra.push(a);pa.textContent=qa++}var ta=!!document.contains;function ua(a,b){for(;b;){if(b==a)return!0;b=b.parentNode}return!1};var va=[],wa;function xa(a){wa||(wa=!0,sa(ya));va.push(a)}function ya(){wa=!1;for(var a=!!va.length;va.length;)va.shift()();return a}ya.list=va;function za(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.M=new Set}function Aa(a){a.a||(a.a=!0,sa(function(){Ba(a)}))}function Ba(a){if(a.a){a.a=!1;var b=a.takeRecords();b.length&&a.M.forEach(function(a){a(b)})}}za.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]};
function Ca(a,b){a.__shady=a.__shady||{};a.__shady.G||(a.__shady.G=new za);a.__shady.G.M.add(b);var c=a.__shady.G;return{pa:b,w:c,ra:a,takeRecords:function(){return c.takeRecords()}}}function Da(a){var b=a&&a.w;b&&(b.M.delete(a.pa),b.M.size||(a.ra.__shady.G=null))}
function Ea(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var w={},Fa=Element.prototype.insertBefore,Ga=Element.prototype.removeChild,Ha=Element.prototype.setAttribute,Ia=Element.prototype.removeAttribute,Ja=Element.prototype.cloneNode,Ka=Document.prototype.importNode,La=Element.prototype.addEventListener,Ma=Element.prototype.removeEventListener,Na=Window.prototype.addEventListener,Oa=Window.prototype.removeEventListener,Pa=Element.prototype.dispatchEvent,Qa=Element.prototype.querySelector,Ra=Element.prototype.querySelectorAll,Sa=Node.prototype.contains||
HTMLElement.prototype.contains;w.appendChild=Element.prototype.appendChild;w.insertBefore=Fa;w.removeChild=Ga;w.setAttribute=Ha;w.removeAttribute=Ia;w.cloneNode=Ja;w.importNode=Ka;w.addEventListener=La;w.removeEventListener=Ma;w.Fa=Na;w.Ga=Oa;w.dispatchEvent=Pa;w.querySelector=Qa;w.querySelectorAll=Ra;w.contains=Sa;var Ta=/[&\u00A0"]/g,Ua=/[&\u00A0<>]/g;function Va(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Wa(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var Xa=Wa("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Ya=Wa("style script xmp iframe noembed noframes plaintext noscript".split(" "));
function Za(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,h;e<f&&(h=d[e]);e++){a:{var g=h;var k=a;var l=b;switch(g.nodeType){case Node.ELEMENT_NODE:for(var m=g.localName,q="<"+m,H=g.attributes,N=0;k=H[N];N++)q+=" "+k.name+'="'+k.value.replace(Ta,Va)+'"';q+=">";g=Xa[m]?q:q+Za(g,l)+"</"+m+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&Ya[k.localName]?g:g.replace(Ua,Va);break a;case Node.COMMENT_NODE:g="\x3c!--"+g.data+"--\x3e";break a;default:throw window.console.error(g),
Error("not implemented");}}c+=g}return c};var x={},y=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),z=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function $a(a){var b=[];y.currentNode=a;for(a=y.firstChild();a;)b.push(a),a=y.nextSibling();return b}x.parentNode=function(a){y.currentNode=a;return y.parentNode()};x.firstChild=function(a){y.currentNode=a;return y.firstChild()};x.lastChild=function(a){y.currentNode=a;return y.lastChild()};x.previousSibling=function(a){y.currentNode=a;return y.previousSibling()};
x.nextSibling=function(a){y.currentNode=a;return y.nextSibling()};x.childNodes=$a;x.parentElement=function(a){z.currentNode=a;return z.parentNode()};x.firstElementChild=function(a){z.currentNode=a;return z.firstChild()};x.lastElementChild=function(a){z.currentNode=a;return z.lastChild()};x.previousElementSibling=function(a){z.currentNode=a;return z.previousSibling()};x.nextElementSibling=function(a){z.currentNode=a;return z.nextSibling()};
x.children=function(a){var b=[];z.currentNode=a;for(a=z.firstChild();a;)b.push(a),a=z.nextSibling();return b};x.innerHTML=function(a){return Za(a,function(a){return $a(a)})};x.textContent=function(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}};var ab=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),bb=document.implementation.createHTMLDocument("inert"),cb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),db={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:x.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;
return void 0!==a?a:x.parentNode(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:x.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:x.previousSibling(this)},configurable:!0},className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0},nextElementSibling:{get:function(){if(this.__shady&&
void 0!==this.__shady.nextSibling){for(var a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return x.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(this.__shady&&void 0!==this.__shady.previousSibling){for(var a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return x.previousElementSibling(this)},configurable:!0}},eb={childNodes:{get:function(){if(t(this)){if(!this.__shady.childNodes){this.__shady.childNodes=
[];for(var a=this.firstChild;a;a=a.nextSibling)this.__shady.childNodes.push(a)}var b=this.__shady.childNodes}else b=x.childNodes(this);b.item=function(a){return b[a]};return b},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=this.__shady&&this.__shady.firstChild;return void 0!==a?a:x.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:x.lastChild(this)},
configurable:!0},textContent:{get:function(){if(t(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&&a.push(d.textContent);return a.join("")}return x.textContent(this)},set:function(a){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(;this.firstChild;)this.removeChild(this.firstChild);(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){if(this.__shady&&
void 0!==this.__shady.firstChild){for(var a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return x.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(this.__shady&&void 0!==this.__shady.lastChild){for(var a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return x.lastElementChild(this)},configurable:!0},children:{get:function(){var a;t(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===
Node.ELEMENT_NODE}):a=x.children(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){var a="template"===this.localName?this.content:this;return t(this)?Za(a):x.innerHTML(a)},set:function(a){for(var b="template"===this.localName?this.content:this;b.firstChild;)b.removeChild(b.firstChild);var c=this.localName;c&&"template"!==c||(c="div");c=bb.createElement(c);for(ab&&ab.set?ab.set.call(c,a):c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild)},configurable:!0}},
fb={shadowRoot:{get:function(){return this.__shady&&this.__shady.za||null},configurable:!0}},gb={activeElement:{get:function(){var a=cb&&cb.get?cb.get.call(document):r.F?void 0:document.activeElement;if(a&&a.nodeType){var b=!!u(this);if(this===document||b&&this.host!==a&&w.contains.call(this.host,a)){for(b=ka(a);b&&b!==this;)a=b.host,b=ka(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}};
function A(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function B(a){A(a,db);A(a,eb);A(a,gb)}var hb=r.F?function(){}:function(a){a.__shady&&a.__shady.na||(a.__shady=a.__shady||{},a.__shady.na=!0,A(a,db,!0))},ib=r.F?function(){}:function(a){a.__shady&&a.__shady.la||(a.__shady=a.__shady||{},a.__shady.la=!0,A(a,eb,!0),A(a,fb,!0))};function jb(a,b,c){hb(a);c=c||null;a.__shady=a.__shady||{};b.__shady=b.__shady||{};c&&(c.__shady=c.__shady||{});a.__shady.previousSibling=c?c.__shady.previousSibling:b.lastChild;var d=a.__shady.previousSibling;d&&d.__shady&&(d.__shady.nextSibling=a);(d=a.__shady.nextSibling=c)&&d.__shady&&(d.__shady.previousSibling=a);a.__shady.parentNode=b;c?c===b.__shady.firstChild&&(b.__shady.firstChild=a):(b.__shady.lastChild=a,b.__shady.firstChild||(b.__shady.firstChild=a));b.__shady.childNodes=null}
function kb(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=x.firstChild(a);a.__shady.lastChild=x.lastChild(a);ib(a);for(var b=a.__shady.childNodes=x.childNodes(a),c=0,d;c<b.length&&(d=b[c]);c++)d.__shady=d.__shady||{},d.__shady.parentNode=a,d.__shady.nextSibling=b[c+1]||null,d.__shady.previousSibling=b[c-1]||null,hb(d)}};function lb(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=c.__shady&&c.__shady.parentNode;if(void 0!==d&&d!==a||void 0===d&&x.parentNode(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&mb(b.parentNode,b);d=ka(a);var e;if(e=d)a:{if(!b.__noInsertionPoint){var f;"slot"===b.localName?f=[b]:
b.querySelectorAll&&(f=b.querySelectorAll("slot"));if(f&&f.length){e=f;break a}}e=void 0}(f=e)&&d.C.push.apply(d.C,[].concat(f instanceof Array?f:ia(ha(f))));d&&("slot"===a.localName||f)&&C(d);if(t(a)){d=c;ib(a);a.__shady=a.__shady||{};void 0!==a.__shady.firstChild&&(a.__shady.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){f=b.childNodes;for(e=0;e<f.length;e++)jb(f[e],a,d);b.__shady=b.__shady||{};d=void 0!==b.__shady.firstChild?null:void 0;b.__shady.firstChild=b.__shady.lastChild=d;
b.__shady.childNodes=d}else jb(b,a,d);if(nb(a)){C(a.__shady.root);var h=!0}else a.__shady.root&&(h=!0)}h||(h=u(a)?a.host:a,c?(c=ob(c),w.insertBefore.call(h,b,c)):w.appendChild.call(h,b));pb(a,b);return b}
function mb(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=ka(b);if(t(a)){b.__shady=b.__shady||{};a.__shady=a.__shady||{};b===a.__shady.firstChild&&(a.__shady.firstChild=b.__shady.nextSibling);b===a.__shady.lastChild&&(a.__shady.lastChild=b.__shady.previousSibling);var d=b.__shady.previousSibling,e=b.__shady.nextSibling;d&&(d.__shady=d.__shady||{},d.__shady.nextSibling=e);e&&(e.__shady=e.__shady||{},e.__shady.previousSibling=d);b.__shady.parentNode=
b.__shady.previousSibling=b.__shady.nextSibling=void 0;void 0!==a.__shady.childNodes&&(a.__shady.childNodes=null);if(nb(a)){C(a.__shady.root);var f=!0}}qb(b);if(c){(d=a&&"slot"===a.localName)&&(f=!0);rb(c);e=c.h;for(var h in e)for(var g=e[h],k=0;k<g.length;k++){var l=g[k];if(ua(b,l)){g.splice(k,1);var m=c.l.indexOf(l);0<=m&&c.l.splice(m,1);k--;if(m=l.__shady.D)for(l=0;l<m.length;l++){var q=m[l],H=x.parentNode(q);H&&w.removeChild.call(H,q)}m=!0}}(m||d)&&C(c)}f||(f=u(a)?a.host:a,(!a.__shady.root&&"slot"!==
b.localName||f===x.parentNode(b))&&w.removeChild.call(f,b));pb(a,null,b);return b}function qb(a){if(a.__shady&&void 0!==a.__shady.aa)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)qb(e);a.__shady&&(a.__shady.aa=void 0)}function ob(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.D)&&b.length?b[0]:ob(a.nextSibling));return b}function nb(a){return(a=a&&a.__shady&&a.__shady.root)&&sb(a)}
function tb(a,b){if("slot"===b)a=a.parentNode,nb(a)&&C(a.__shady.root);else if("slot"===a.localName&&"name"===b&&(b=ka(a))){var c=a.oa,d=ub(a);if(d!==c){c=b.h[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.h[d]||(b.h[d]=[]);c.push(a);1<c.length&&(b.h[d]=vb(c))}C(b)}}function pb(a,b,c){if(a=a.__shady&&a.__shady.G)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Aa(a)}
function wb(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.aa;void 0===b&&(u(a)?b=a:b=(b=a.parentNode)?wb(b):a,w.contains.call(document.documentElement,a)&&(a.__shady.aa=b));return b}}function xb(a,b,c){var d=[];yb(a.childNodes,b,c,d);return d}function yb(a,b,c,d){for(var e=0,f=a.length,h;e<f&&(h=a[e]);e++){var g;if(g=h.nodeType===Node.ELEMENT_NODE){g=h;var k=b,l=c,m=d,q=k(g);q&&m.push(g);l&&l(q)?g=q:(yb(g.childNodes,k,l,m),g=void 0)}if(g)break}}var zb=null;
function Ab(a,b,c){zb||(zb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);zb&&"class"===b?zb.setElementClass(a,c):(w.setAttribute.call(a,b,c),tb(a,b))}function Bb(a,b){if(a.ownerDocument!==document)return w.importNode.call(document,a,b);var c=w.importNode.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Bb(a[b],!0),c.appendChild(d)}return c};var Cb="__eventWrappers"+Date.now(),Db={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0,
dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0};function Eb(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c}
function Fb(a,b){if(!u)return a;a=Eb(a,!0);for(var c=0,d,e,f,h;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(h=a.indexOf(f),e=f),!u(f)||-1<h)return d}
var Gb={get composed(){!1!==this.isTrusted&&void 0===this.P&&(this.P=Db[this.type]);return this.P||!1},composedPath:function(){this.ba||(this.ba=Eb(this.__target,this.composed));return this.ba},get target(){return Fb(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.S)return null;this.ca||(this.ca=Eb(this.S,!0));return Fb(this.currentTarget,this.ca)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.R=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);
this.R=this.ka=!0}};function Hb(a){function b(b,d){b=new a(b,d);b.P=d&&!!d.composed;return b}oa(b,a);b.prototype=a.prototype;return b}var Ib={focus:!0,blur:!0};function Jb(a){return a.__target!==a.target||a.S!==a.relatedTarget}function Kb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!Jb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.ka);d++);}
function Lb(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];Kb(a,d,"capture");if(a.R)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=d.__shady&&d.__shady.root;if(0===c||f&&f===e)if(Kb(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.R)break}}
function Mb(a,b,c,d,e,f){for(var h=0;h<a.length;h++){var g=a[h],k=g.type,l=g.capture,m=g.once,q=g.passive;if(b===g.node&&c===k&&d===l&&e===m&&f===q)return h}return-1}
function Nb(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.T||this,g=b[Cb];if(g){if(-1<Mb(g,h,a,d,e,f))return}else b[Cb]=[];g=function(d){e&&this.removeEventListener(a,b,c);d.__target||Ob(d);if(h!==this){var f=Object.getOwnPropertyDescriptor(d,"currentTarget");Object.defineProperty(d,"currentTarget",{get:function(){return h},configurable:!0})}if(d.composed||-1<d.composedPath().indexOf(h))if(Jb(d)&&d.target===d.relatedTarget)d.eventPhase===
Event.BUBBLING_PHASE&&d.stopImmediatePropagation();else if(d.eventPhase===Event.CAPTURING_PHASE||d.bubbles||d.target===h||h instanceof Window){var g="object"===typeof b&&b.handleEvent?b.handleEvent(d):b.call(h,d);h!==this&&(f?(Object.defineProperty(d,"currentTarget",f),f=null):delete d.currentTarget);return g}};b[Cb].push({node:this,type:a,capture:d,once:e,passive:f,Ha:g});Ib[a]?(this.__handlers=this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][d?
"capture":"bubble"].push(g)):(this instanceof Window?w.Fa:w.addEventListener).call(this,a,g,c)}}
function Pb(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var h=c&&c.T||this,g=void 0;var k=null;try{k=b[Cb]}catch(l){}k&&(e=Mb(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].Ha,k.length||(b[Cb]=void 0)));(this instanceof Window?w.Ga:w.removeEventListener).call(this,a,g||b,c);g&&Ib[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}}
function Qb(){for(var a in Ib)window.addEventListener(a,function(a){a.__target||(Ob(a),Lb(a))},!0)}function Ob(a){a.__target=a.target;a.S=a.relatedTarget;if(r.F){var b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__patchProto")){var c=Object.create(b);c.Ja=b;ma(c,Gb);b.__patchProto=c}a.__proto__=b.__patchProto}else ma(a,Gb)}var Rb=Hb(window.Event),Sb=Hb(window.CustomEvent),Tb=Hb(window.MouseEvent);function Ub(a,b){return{index:a,H:[],L:b}}
function Vb(a,b,c,d){var e=0,f=0,h=0,g=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(h=0;h<k;h++)if(a[h]!==c[h])break a;h=k}if(b==a.length&&d==c.length){g=a.length;for(var l=c.length,m=0;m<k-h&&Wb(a[--g],c[--l]);)m++;g=m}e+=h;f+=h;b-=g;d-=g;if(0==b-e&&0==d-f)return[];if(e==b){for(b=Ub(e,0);f<d;)b.H.push(c[f++]);return[b]}if(f==d)return[Ub(e,b-e)];k=e;h=f;d=d-h+1;g=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(g),b[l][0]=l;for(l=0;l<g;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<g;m++)if(a[k+m-1]===c[h+l-1])b[l][m]=
b[l-1][m-1];else{var q=b[l-1][m]+1,H=b[l][m-1]+1;b[l][m]=q<H?q:H}k=b.length-1;h=b[0].length-1;d=b[k][h];for(a=[];0<k||0<h;)0==k?(a.push(2),h--):0==h?(a.push(3),k--):(g=b[k-1][h-1],l=b[k-1][h],m=b[k][h-1],q=l<m?l<g?l:g:m<g?m:g,q==g?(g==d?a.push(0):(a.push(1),d=g),k--,h--):q==l?(a.push(3),k--,d=l):(a.push(2),h--,d=m));a.reverse();b=void 0;k=[];for(h=0;h<a.length;h++)switch(a[h]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=Ub(e,0));b.L++;e++;b.H.push(c[f]);f++;break;case 2:b||(b=Ub(e,0));
b.L++;e++;break;case 3:b||(b=Ub(e,0)),b.H.push(c[f]),f++}b&&k.push(b);return k}function Wb(a,b){return a===b};var Xb={};function D(a,b,c){if(a!==Xb)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=D.prototype;a.ma="ShadyRoot";kb(b);kb(a);a.host=b;a.a=c&&c.mode;b.__shady=b.__shady||{};b.__shady.root=a;b.__shady.za="closed"!==a.a?a:null;a.K=!1;a.l=[];a.h={};a.C=[];c=x.childNodes(b);for(var d=0,e=c.length;d<e;d++)w.removeChild.call(b,c[d]);return a}D.prototype=Object.create(DocumentFragment.prototype);function C(a){a.K||(a.K=!0,xa(function(){return Yb(a)}))}
function Yb(a){for(var b;a;){a.K&&(b=a);a:{var c=a;a=c.host.getRootNode();if(u(a))for(var d=c.host.childNodes,e=0;e<d.length;e++)if(c=d[e],"slot"==c.localName)break a;a=void 0}}b&&b._renderRoot()}
D.prototype._renderRoot=function(){this.K=!1;rb(this);for(var a=0,b;a<this.l.length;a++){b=this.l[a];var c=b.__shady.assignedNodes;b.__shady.assignedNodes=[];b.__shady.D=[];if(b.__shady.da=c)for(var d=0;d<c.length;d++){var e=c[d];e.__shady.X=e.__shady.assignedSlot;e.__shady.assignedSlot===b&&(e.__shady.assignedSlot=null)}}for(b=this.host.firstChild;b;b=b.nextSibling)Zb(this,b);for(a=0;a<this.l.length;a++){b=this.l[a];if(!b.__shady.assignedNodes.length)for(c=b.firstChild;c;c=c.nextSibling)Zb(this,
c,b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&sb(c)&&c._renderRoot();$b(this,b.__shady.D,b.__shady.assignedNodes);if(c=b.__shady.da){for(d=0;d<c.length;d++)c[d].__shady.X=null;b.__shady.da=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.Z=!0)}b.__shady.Z&&(b.__shady.Z=!1,ac(this,b))}a=this.l;b=[];for(c=0;c<a.length;c++)d=a[c].parentNode,d.__shady&&d.__shady.root||!(0>b.indexOf(d))||b.push(d);for(a=0;a<b.length;a++){c=b[a];d=c===this?this.host:c;e=[];c=c.childNodes;for(var f=0;f<c.length;f++){var h=
c[f];if("slot"==h.localName){h=h.__shady.D;for(var g=0;g<h.length;g++)e.push(h[g])}else e.push(h)}c=void 0;f=x.childNodes(d);h=Vb(e,e.length,f,f.length);for(var k=g=0;g<h.length&&(c=h[g]);g++){for(var l=0,m;l<c.H.length&&(m=c.H[l]);l++)x.parentNode(m)===d&&w.removeChild.call(d,m),f.splice(c.index+k,1);k-=c.L}for(k=0;k<h.length&&(c=h[k]);k++)for(g=f[c.index],l=c.index;l<c.index+c.L;l++)m=e[l],w.insertBefore.call(d,m,g),f.splice(l,0,m)}};
function Zb(a,b,c){b.__shady=b.__shady||{};var d=b.__shady.X;b.__shady.X=null;c||(c=(a=a.h[b.slot||"__catchall"])&&a[0]);c?(c.__shady.assignedNodes.push(b),b.__shady.assignedSlot=c):b.__shady.assignedSlot=void 0;d!==b.__shady.assignedSlot&&b.__shady.assignedSlot&&(b.__shady.assignedSlot.__shady.Z=!0)}function $b(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=e.__shady.assignedNodes;f&&f.length&&$b(a,b,f)}else b.push(c[d])}
function ac(a,b){w.dispatchEvent.call(b,new Event("slotchange"));b.__shady.assignedSlot&&ac(a,b.__shady.assignedSlot)}function rb(a){if(a.C.length){for(var b=a.C,c,d=0;d<b.length;d++){var e=b[d];e.__shady=e.__shady||{};kb(e);kb(e.parentNode);var f=ub(e);a.h[f]?(c=c||{},c[f]=!0,a.h[f].push(e)):a.h[f]=[e];a.l.push(e)}if(c)for(var h in c)a.h[h]=vb(a.h[h]);a.C=[]}}function ub(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.oa=b}
function vb(a){return a.sort(function(a,c){a=bc(a);for(var b=bc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})}function bc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function sb(a){rb(a);return!!a.l.length}D.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.T=this;this.host.addEventListener(a,b,c)};
D.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.T=this;this.host.removeEventListener(a,b,c)};D.prototype.getElementById=function(a){return xb(this,function(b){return b.id==a},function(a){return!!a})[0]||null};var cc=D.prototype;A(cc,eb,!0);A(cc,gb,!0);function dc(a){var b=a.getRootNode();u(b)&&Yb(b);return a.__shady&&a.__shady.assignedSlot||null}
var ec={addEventListener:Nb.bind(window),removeEventListener:Pb.bind(window)},fc={addEventListener:Nb,removeEventListener:Pb,appendChild:function(a){return lb(this,a)},insertBefore:function(a,b){return lb(this,a,b)},removeChild:function(a){return mb(this,a)},replaceChild:function(a,b){lb(this,a,b);mb(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=w.cloneNode.call(this,a);else if(b=w.cloneNode.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0),
b.appendChild(d)}return b},getRootNode:function(){return wb(this)},contains:function(a){return ua(this,a)},get isConnected(){var a=this.ownerDocument;if(ta&&w.contains.call(a,this)||a.documentElement&&w.contains.call(a.documentElement,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof D?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){ya();return w.dispatchEvent.call(this,a)}},gc={get assignedSlot(){return dc(this)}},hc={querySelector:function(a){return xb(this,
function(b){return la.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return xb(this,function(b){return la.call(b,a)})}},ic={assignedNodes:function(a){if("slot"===this.localName){var b=this.getRootNode();u(b)&&Yb(b);return this.__shady?(a&&a.flatten?this.__shady.D:this.__shady.assignedNodes)||[]:[]}}},jc=na({setAttribute:function(a,b){Ab(this,a,b)},removeAttribute:function(a){w.removeAttribute.call(this,a);tb(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";
if(!a)throw"Not enough arguments.";return new D(Xb,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){Ab(this,"slot",a)},get assignedSlot(){return dc(this)}},hc,ic);Object.defineProperties(jc,fb);var kc=na({importNode:function(a,b){return Bb(a,b)},getElementById:function(a){return xb(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},hc);Object.defineProperties(kc,{_activeElement:gb.activeElement});
var lc=HTMLElement.prototype.blur,mc=na({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():lc.call(this)}});function E(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}};if(r.ga){var ShadyDOM={inUse:r.ga,patch:function(a){return a},isShadyRoot:u,enqueue:xa,flush:ya,settings:r,filterMutations:Ea,observeChildren:Ca,unobserveChildren:Da,nativeMethods:w,nativeTree:x};window.ShadyDOM=ShadyDOM;window.Event=Rb;window.CustomEvent=Sb;window.MouseEvent=Tb;Qb();var nc=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;E(window.Node.prototype,fc);E(window.Window.prototype,ec);E(window.Text.prototype,gc);E(window.DocumentFragment.prototype,hc);E(window.Element.prototype,
jc);E(window.Document.prototype,kc);window.HTMLSlotElement&&E(window.HTMLSlotElement.prototype,ic);E(nc.prototype,mc);r.F&&(B(window.Node.prototype),B(window.Text.prototype),B(window.DocumentFragment.prototype),B(window.Element.prototype),B(nc.prototype),B(window.Document.prototype),window.HTMLSlotElement&&B(window.HTMLSlotElement.prototype));window.ShadowRoot=D};var oc=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function pc(a){var b=oc.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function F(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))}
function qc(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
function G(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)G(d,b,c);d=qc(a,e);continue}else if("template"===f){d=qc(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)G(e,b,c)}d=d.firstChild?d.firstChild:qc(a,d)}}function I(a,b,c){a[b]=c};function rc(){this.a=new Map;this.u=new Map;this.i=[];this.c=!1}function sc(a,b,c){a.a.set(b,c);a.u.set(c.constructor,c)}function tc(a,b){a.c=!0;a.i.push(b)}function uc(a,b){a.c&&G(b,function(b){return a.b(b)})}rc.prototype.b=function(a){if(this.c&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.i.length;b++)this.i[b](a)}};function J(a,b){var c=[];G(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):vc(a,d)}}
function K(a,b){var c=[];G(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}}
function L(a,b,c){c=void 0===c?{}:c;var d=c.Ea||new Set,e=c.ia||function(b){return vc(a,b)},f=[];G(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);L(a,c,{Ea:f,ia:e})}})}else f.push(b)},d);if(a.c)for(b=
0;b<f.length;b++)a.b(f[b]);for(b=0;b<f.length;b++)e(f[b])}
function vc(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructor;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(h){throw b.__CE_state=2,h;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}F(b)&&a.connectedCallback(b)}}}rc.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};rc.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)};
rc.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};function wc(a){var b=document;this.g=a;this.a=b;this.w=void 0;L(this.g,this.a);"loading"===this.a.readyState&&(this.w=new MutationObserver(this.b.bind(this)),this.w.observe(this.a,{childList:!0,subtree:!0}))}function xc(a){a.w&&a.w.disconnect()}wc.prototype.b=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||xc(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)L(this.g,c[d])};function yc(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function zc(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function M(a){this.U=!1;this.g=a;this.Y=new Map;this.V=function(a){return a()};this.J=!1;this.W=[];this.qa=new wc(a)}
M.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!pc(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.g.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.U)throw Error("A custom element is already being defined.");this.U=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function.");
return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var h=d("disconnectedCallback");var g=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(m){return}finally{this.U=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:h,adoptedCallback:g,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]};sc(this.g,a,b);this.W.push(b);
this.J||(this.J=!0,this.V(function(){return Ac(c)}))};function Ac(a){if(!1!==a.J){a.J=!1;for(var b=a.W,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);L(a.g,document,{ia:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.g.a.get(e)&&c.push(b)}}});for(e=0;e<c.length;e++)vc(a.g,c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var h=0;h<f.length;h++)vc(a.g,f[h]);(e=a.Y.get(e))&&zc(e)}}}M.prototype.get=function(a){if(a=this.g.a.get(a))return a.constructor};
M.prototype.whenDefined=function(a){if(!pc(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.Y.get(a);if(b)return b.c;b=new yc;this.Y.set(a,b);this.g.a.get(a)&&!this.W.some(function(b){return b.localName===a})&&zc(b);return b.c};M.prototype.ya=function(a){xc(this.qa);var b=this.V;this.V=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=M;M.prototype.define=M.prototype.define;M.prototype.get=M.prototype.get;
M.prototype.whenDefined=M.prototype.whenDefined;M.prototype.polyfillWrapFlushCallback=M.prototype.ya;var Bc=window.Document.prototype.createElement,Cc=window.Document.prototype.createElementNS,Dc=window.Document.prototype.importNode,Ec=window.Document.prototype.prepend,Fc=window.Document.prototype.append,Gc=window.DocumentFragment.prototype.prepend,Hc=window.DocumentFragment.prototype.append,Ic=window.Node.prototype.cloneNode,Jc=window.Node.prototype.appendChild,Kc=window.Node.prototype.insertBefore,Lc=window.Node.prototype.removeChild,Mc=window.Node.prototype.replaceChild,Nc=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),Oc=window.Element.prototype.attachShadow,Pc=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Qc=window.Element.prototype.getAttribute,Rc=window.Element.prototype.setAttribute,Sc=window.Element.prototype.removeAttribute,Tc=window.Element.prototype.getAttributeNS,Uc=window.Element.prototype.setAttributeNS,Vc=window.Element.prototype.removeAttributeNS,Wc=window.Element.prototype.insertAdjacentElement,Xc=window.Element.prototype.prepend,Yc=window.Element.prototype.append,
Zc=window.Element.prototype.before,$c=window.Element.prototype.after,ad=window.Element.prototype.replaceWith,bd=window.Element.prototype.remove,cd=window.HTMLElement,dd=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),ed=window.HTMLElement.prototype.insertAdjacentElement;var fd=new function(){};function gd(){var a=O;window.HTMLElement=function(){function b(){var b=this.constructor,d=a.u.get(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Bc.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.b(e),e;d=e.length-1;var f=e[d];if(f===fd)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=fd;Object.setPrototypeOf(f,b.prototype);a.b(f);return f}b.prototype=cd.prototype;return b}()};function hd(a,b,c){function d(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var f=[],l=0;l<d.length;l++){var m=d[l];m instanceof Element&&F(m)&&f.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)e.push(m);else e.push(m)}b.apply(this,d);for(d=0;d<f.length;d++)K(a,f[d]);if(F(this))for(d=0;d<e.length;d++)f=e[d],f instanceof Element&&J(a,f)}}void 0!==c.O&&(b.prepend=d(c.O));void 0!==c.append&&(b.append=d(c.append))};function id(){var a=O;I(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.a.get(b);if(c)return new c.constructor}b=Bc.call(this,b);a.b(b);return b});I(Document.prototype,"importNode",function(b,c){b=Dc.call(this,b,c);this.__CE_hasRegistry?L(a,b):uc(a,b);return b});I(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.a.get(c);if(d)return new d.constructor}b=Cc.call(this,b,c);a.b(b);return b});
hd(a,Document.prototype,{O:Ec,append:Fc})};function jd(){var a=O;function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,g=e.length;if(0<g&&F(this)){c=Array(g);for(var k=0;k<g;k++)c[k]=e[k]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)K(a,c[b])}}})}I(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);
b=Kc.call(this,b,d);if(F(this))for(d=0;d<c.length;d++)J(a,c[d]);return b}c=F(b);d=Kc.call(this,b,d);c&&K(a,b);F(this)&&J(a,b);return d});I(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Jc.call(this,b);if(F(this))for(var e=0;e<c.length;e++)J(a,c[e]);return b}c=F(b);e=Jc.call(this,b);c&&K(a,b);F(this)&&J(a,b);return e});I(Node.prototype,"cloneNode",function(b){b=Ic.call(this,b);this.ownerDocument.__CE_hasRegistry?L(a,b):
uc(a,b);return b});I(Node.prototype,"removeChild",function(b){var c=F(b),e=Lc.call(this,b);c&&K(a,b);return e});I(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=Mc.call(this,b,d);if(F(this))for(K(a,d),d=0;d<c.length;d++)J(a,c[d]);return b}c=F(b);var f=Mc.call(this,b,d),h=F(this);h&&K(a,d);c&&K(a,b);h&&J(a,b);return f});Nc&&Nc.get?b(Node.prototype,Nc):tc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a=
[],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)Lc.call(this,this.firstChild);Jc.call(this,document.createTextNode(a))}})})};function kd(a){var b=Element.prototype;function c(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var g=[],k=0;k<d.length;k++){var l=d[k];l instanceof Element&&F(l)&&g.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)e.push(l);else e.push(l)}b.apply(this,d);for(d=0;d<g.length;d++)K(a,g[d]);if(F(this))for(d=0;d<e.length;d++)g=e[d],g instanceof Element&&J(a,g)}}void 0!==Zc&&(b.before=c(Zc));void 0!==Zc&&(b.after=c($c));void 0!==
ad&&I(b,"replaceWith",function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=[];for(var h=[],g=0;g<c.length;g++){var k=c[g];k instanceof Element&&F(k)&&h.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)d.push(k);else d.push(k)}g=F(this);ad.apply(this,c);for(c=0;c<h.length;c++)K(a,h[c]);if(g)for(K(a,this),c=0;c<d.length;c++)h=d[c],h instanceof Element&&J(a,h)});void 0!==bd&&I(b,"remove",function(){var b=F(this);bd.call(this);b&&K(a,this)})};function ld(){var a=O;function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;F(this)&&(e=[],G(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var l=e[f];1===l.__CE_state&&a.disconnectedCallback(l)}this.ownerDocument.__CE_hasRegistry?L(a,this):uc(a,this);return b}})}function c(b,c){I(b,"insertAdjacentElement",function(b,d){var e=F(d);b=c.call(this,b,d);e&&K(a,d);F(b)&&J(a,d);
return b})}Oc&&I(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=Oc.call(this,a)});Pc&&Pc.get?b(Element.prototype,Pc):dd&&dd.get?b(HTMLElement.prototype,dd):tc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return Ic.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,c=b?this.content:this,d=Bc.call(document,this.localName);for(d.innerHTML=a;0<c.childNodes.length;)Lc.call(c,c.childNodes[0]);for(a=b?d.content:d;0<a.childNodes.length;)Jc.call(c,
a.childNodes[0])}})});I(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return Rc.call(this,b,c);var d=Qc.call(this,b);Rc.call(this,b,c);c=Qc.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});I(Element.prototype,"setAttributeNS",function(b,c,f){if(1!==this.__CE_state)return Uc.call(this,b,c,f);var d=Tc.call(this,b,c);Uc.call(this,b,c,f);f=Tc.call(this,b,c);a.attributeChangedCallback(this,c,d,f,b)});I(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return Sc.call(this,
b);var c=Qc.call(this,b);Sc.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});I(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return Vc.call(this,b,c);var d=Tc.call(this,b,c);Vc.call(this,b,c);var e=Tc.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});ed?c(HTMLElement.prototype,ed):Wc?c(Element.prototype,Wc):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");hd(a,Element.prototype,{O:Xc,append:Yc});kd(a)}
;/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var md=window.customElements;if(!md||md.forcePolyfill||"function"!=typeof md.define||"function"!=typeof md.get){var O=new rc;gd();id();hd(O,DocumentFragment.prototype,{O:Gc,append:Hc});jd();ld();document.__CE_hasRegistry=!0;var customElements=new M(O);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};/*
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by 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 nd(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""}
function od(a){a=a.replace(pd,"").replace(qd,"");var b=rd,c=a,d=new nd;d.start=0;d.end=c.length;for(var e=d,f=0,h=c.length;f<h;f++)if("{"===c[f]){e.rules||(e.rules=[]);var g=e,k=g.rules[g.rules.length-1]||null;e=new nd;e.start=f+1;e.parent=g;e.previous=k;g.rules.push(e)}else"}"===c[f]&&(e.end=f+1,e=e.parent||d);return b(d,a)}
function rd(a,b){var c=b.substring(a.start,a.end-1);a.parsedCssText=a.cssText=c.trim();a.parent&&(c=b.substring(a.previous?a.previous.end:a.parent.start,a.start-1),c=sd(c),c=c.replace(td," "),c=c.substring(c.lastIndexOf(";")+1),c=a.parsedSelector=a.selector=c.trim(),a.atRule=0===c.indexOf("@"),a.atRule?0===c.indexOf("@media")?a.type=ud:c.match(vd)&&(a.type=wd,a.keyframesName=a.selector.split(td).pop()):a.type=0===c.indexOf("--")?xd:yd);if(c=a.rules)for(var d=0,e=c.length,f;d<e&&(f=c[d]);d++)rd(f,
b);return a}function sd(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(a,c){a=c;for(c=6-a.length;c--;)a="0"+a;return"\\"+a})}
function zd(a,b,c){c=void 0===c?"":c;var d="";if(a.cssText||a.rules){var e=a.rules,f;if(f=e)f=e[0],f=!(f&&f.selector&&0===f.selector.indexOf("--"));if(f){f=0;for(var h=e.length,g;f<h&&(g=e[f]);f++)d=zd(g,b,d)}else b?b=a.cssText:(b=a.cssText,b=b.replace(Ad,"").replace(Bd,""),b=b.replace(Cd,"").replace(Dd,"")),(d=b.trim())&&(d=" "+d+"\n")}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
var yd=1,wd=7,ud=4,xd=1E3,pd=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,qd=/@import[^;]*;/gim,Ad=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Bd=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,Cd=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,Dd=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,vd=/^@[^\s]*keyframes/,td=/\s+/g;var P=!(window.ShadyDOM&&window.ShadyDOM.inUse),Ed;function Fd(a){Ed=a&&a.shimcssproperties?!1:P||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"))}window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Ed=window.ShadyCSS.nativeCss:window.ShadyCSS?(Fd(window.ShadyCSS),window.ShadyCSS=void 0):Fd(window.WebComponents&&window.WebComponents.flags);var Q=Ed;var Gd=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Hd=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Id=/(--[\w-]+)\s*([:,;)]|$)/gi,Jd=/(animation\s*:)|(animation-name\s*:)/,Kd=/@media\s(.*)/,Ld=/\{[^}]*\}/g;var Md=new Set;function R(a,b){if(!a)return"";"string"===typeof a&&(a=od(a));b&&S(a,b);return zd(a,Q)}function Nd(a){!a.__cssRules&&a.textContent&&(a.__cssRules=od(a.textContent));return a.__cssRules||null}function Od(a){return!!a.parent&&a.parent.type===wd}function S(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===ud){var h=a.selector.match(Kd);h&&(window.matchMedia(h[1]).matches||(e=!0))}f===yd?b(a):c&&f===wd?c(a):f===xd&&(e=!0);if((a=a.rules)&&!e){e=0;f=a.length;for(var g;e<f&&(g=a[e]);e++)S(g,b,c,d)}}}
function Pd(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;Qd(e,c,d);return e}var T=null;function Qd(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);T?a.compareDocumentPosition(T)===Node.DOCUMENT_POSITION_PRECEDING&&(T=a):T=a}
function Rd(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");a:{var d=0;var e=c+3;for(var f=a.length;e<f;e++)if("("===a[e])d++;else if(")"===a[e]&&0===--d)break a;e=-1}d=a.substring(c+4,e);c=a.substring(0,c);a=Rd(a.substring(e+1),b);e=d.indexOf(",");return-1===e?b(c,d.trim(),"",a):b(c,d.substring(0,e).trim(),d.substring(e+1).trim(),a)}function Sd(a,b){P?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b)}
function U(a){var b=a.localName,c="";b?-1<b.indexOf("-")||(c=b,b=a.getAttribute&&a.getAttribute("is")||""):(b=a.is,c=a.extends);return{is:b,I:c}};function Td(){}function Ud(a,b,c){var d=V;a.__styleScoped?a.__styleScoped=null:Vd(d,a,b||"",c)}function Vd(a,b,c,d){b.nodeType===Node.ELEMENT_NODE&&Wd(b,c,d);if(b="template"===b.localName?(b.content||b.Ka).childNodes:b.children||b.childNodes)for(var e=0;e<b.length;e++)Vd(a,b[e],c,d)}
function Wd(a,b,c){if(b)if(a.classList)c?(a.classList.remove("style-scope"),a.classList.remove(b)):(a.classList.add("style-scope"),a.classList.add(b));else if(a.getAttribute){var d=a.getAttribute(Xd);c?d&&(b=d.replace("style-scope","").replace(b,""),Sd(a,b)):Sd(a,(d?d+" ":"")+"style-scope "+b)}}function Yd(a,b,c){var d=V,e=a.__cssBuild;P||"shady"===e?b=R(b,c):(a=U(a),b=Zd(d,b,a.is,a.I,c)+"\n\n");return b.trim()}
function Zd(a,b,c,d,e){var f=$d(c,d);c=c?ae+c:"";return R(b,function(b){b.c||(b.selector=b.j=be(a,b,a.b,c,f),b.c=!0);e&&e(b,c,f)})}function $d(a,b){return b?"[is="+a+"]":a}function be(a,b,c,d,e){var f=b.selector.split(ce);if(!Od(b)){b=0;for(var h=f.length,g;b<h&&(g=f[b]);b++)f[b]=c.call(a,g,d,e)}return f.join(ce)}function de(a){return a.replace(ee,function(a,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return":"+c+"("+d+")"})}
Td.prototype.b=function(a,b,c){var d=!1;a=a.trim();var e=ee.test(a);e&&(a=a.replace(ee,function(a,b,c){return":"+b+"("+c.replace(/\s/g,"")+")"}),a=de(a));a=a.replace(fe,ge+" $1");a=a.replace(he,function(a,e,g){d||(a=ie(g,e,b,c),d=d||a.stop,e=a.ta,g=a.value);return e+g});e&&(a=de(a));return a};
function ie(a,b,c,d){var e=a.indexOf(je);0<=a.indexOf(ge)?a=ke(a,d):0!==e&&(a=c?le(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(me,function(a,b){return" > "+b}))}a=a.replace(ne,function(a,b,c){return'[dir="'+c+'"] '+b+", "+b+'[dir="'+c+'"]'});return{value:a,ta:b,stop:f}}function le(a,b){a=a.split(oe);a[0]+=b;return a.join(oe)}
function ke(a,b){var c=a.match(pe);return(c=c&&c[2].trim()||"")?c[0].match(qe)?a.replace(pe,function(a,c,f){return b+f}):c.split(qe)[0]===b?c:re:a.replace(ge,b)}function se(a){a.selector===te&&(a.selector="html")}Td.prototype.c=function(a){return a.match(je)?this.b(a,ue):le(a.trim(),ue)};p.Object.defineProperties(Td.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});
var ee=/:(nth[-\w]+)\(([^)]+)\)/,ue=":not(.style-scope)",ce=",",he=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,qe=/[[.:#*]/,ge=":host",te=":root",je="::slotted",fe=new RegExp("^("+je+")"),pe=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,me=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ne=/(.*):dir\((?:(ltr|rtl))\)/,ae=".",oe=":",Xd="class",re="should_not_match",V=new Td;function ve(a,b,c,d){this.s=a||null;this.b=b||null;this.$=c||[];this.B=null;this.I=d||"";this.a=this.m=this.v=null}function W(a){return a?a.__styleInfo:null}function we(a,b){return a.__styleInfo=b}ve.prototype.c=function(){return this.s};ve.prototype._getStyleRules=ve.prototype.c;var xe,X=window.Element.prototype;xe=X.matches||X.matchesSelector||X.mozMatchesSelector||X.msMatchesSelector||X.oMatchesSelector||X.webkitMatchesSelector;var ye=navigator.userAgent.match("Trident");function ze(){}function Ae(a){var b={},c=[],d=0;S(a,function(a){Be(a);a.index=d++;a=a.f.cssText;for(var c;c=Id.exec(a);){var e=c[1];":"!==c[2]&&(b[e]=!0)}},function(a){c.push(a)});a.b=c;a=[];for(var e in b)a.push(e);return a}
function Be(a){if(!a.f){var b={},c={};Ce(a,c)&&(b.o=c,a.rules=null);b.cssText=a.parsedCssText.replace(Ld,"").replace(Gd,"");a.f=b}}function Ce(a,b){var c=a.f;if(c){if(c.o)return Object.assign(b,c.o),!0}else{c=a.parsedCssText;for(var d;a=Gd.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}}
function De(a,b,c){b&&(b=0<=b.indexOf(";")?Ee(a,b,c):Rd(b,function(b,e,f,h){if(!e)return b+h;(e=De(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=De(a,c[f]||f,c)||f;return b+(e||"")+h}));return b&&b.trim()||""}
function Ee(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){Hd.lastIndex=0;if(f=Hd.exec(e))e=De(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var h=e.substring(f);h=h.trim();h=De(a,h,c)||h;e=e.substring(0,f)+h}b[d]=e&&e.lastIndexOf(";")===e.length-1?e.slice(0,-1):e||""}return b.join(";")}
function Fe(a,b){var c={},d=[];S(a,function(a){a.f||Be(a);var e=a.j||a.parsedSelector;b&&a.f.o&&e&&xe.call(b,e)&&(Ce(a,c),a=a.index,e=parseInt(a/32,10),d[e]=(d[e]||0)|1<<a%32)},null,!0);return{o:c,key:d}}
function Ge(a,b,c,d){b.f||Be(b);if(b.f.o){var e=U(a);a=e.is;e=e.I;e=a?$d(a,e):"html";var f=b.parsedSelector,h=":host > *"===f||"html"===f,g=0===f.indexOf(":host")&&!h;"shady"===c&&(h=f===e+" > *."+e||-1!==f.indexOf("html"),g=!h&&0===f.indexOf(e));"shadow"===c&&(h=":host > *"===f||"html"===f,g=g&&!h);if(h||g)c=e,g&&(P&&!b.j&&(b.j=be(V,b,V.b,a?ae+a:"",e)),c=b.j||e),d({Ba:c,xa:g,Ma:h})}}
function He(a,b){var c={},d={},e=b&&b.__cssBuild;S(b,function(b){Ge(a,b,e,function(e){xe.call(a.La||a,e.Ba)&&(e.xa?Ce(b,c):Ce(b,d))})},null,!0);return{Aa:d,wa:c}}
function Ie(a,b,c,d){var e=U(b),f=$d(e.is,e.I),h=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])");e=W(b).s;var g=Je(e,d);return Yd(b,e,function(b){var e="";b.f||Be(b);b.f.cssText&&(e=Ee(a,b.f.cssText,c));b.cssText=e;if(!P&&!Od(b)&&b.cssText){var k=e=b.cssText;null==b.fa&&(b.fa=Jd.test(e));if(b.fa)if(null==b.N){b.N=[];for(var q in g)k=g[q],k=k(e),e!==k&&(e=k,b.N.push(q))}else{for(q=0;q<b.N.length;++q)k=g[b.N[q]],e=k(e);k=e}b.cssText=k;b.j=b.j||b.selector;e="."+d;
q=b.j.split(",");k=0;for(var H=q.length,N;k<H&&(N=q[k]);k++)q[k]=N.match(h)?N.replace(f,e):e+" "+N;b.selector=q.join(",")}})}function Je(a,b){a=a.b;var c={};if(!P&&a)for(var d=0,e=a[d];d<a.length;e=a[++d]){var f=e,h=b;f.i=new RegExp(f.keyframesName,"g");f.a=f.keyframesName+"-"+h;f.j=f.j||f.selector;f.selector=f.j.replace(f.keyframesName,f.a);c[e.keyframesName]=Ke(e)}return c}function Ke(a){return function(b){return b.replace(a.i,a.a)}}
function Le(a,b){var c=Me,d=Nd(a);a.textContent=R(d,function(a){var d=a.cssText=a.parsedCssText;a.f&&a.f.cssText&&(d=d.replace(Ad,"").replace(Bd,""),a.cssText=Ee(c,d,b))})}p.Object.defineProperties(ze.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var Me=new ze;var Ne={},Oe=window.customElements;if(Oe&&!P){var Pe=Oe.define;Oe.define=function(a,b,c){var d=document.createComment(" Shady DOM styles for "+a+" "),e=document.head;e.insertBefore(d,(T?T.nextSibling:null)||e.firstChild);T=d;Ne[a]=d;return Pe.call(Oe,a,b,c)}};function Qe(){this.cache={}}Qe.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({o:b,styleElement:c,m:d});100<e.length&&e.shift();this.cache[a]=e};Qe.prototype.fetch=function(a,b,c){if(a=this.cache[a])for(var d=a.length-1;0<=d;d--){var e=a[d],f;a:{for(f=0;f<c.length;f++){var h=c[f];if(e.o[h]!==b[h]){f=!1;break a}}f=!0}if(f)return e}};function Re(){}
function Se(a){for(var b=0;b<a.length;b++){var c=a[b];if(c.target!==document.documentElement&&c.target!==document.head)for(var d=0;d<c.addedNodes.length;d++){var e=c.addedNodes[d];if(e.nodeType===Node.ELEMENT_NODE){var f=e.getRootNode();var h=e;var g=[];h.classList?g=Array.from(h.classList):h instanceof window.SVGElement&&h.hasAttribute("class")&&(g=h.getAttribute("class").split(/\s+/));h=g;g=h.indexOf(V.a);if((h=-1<g?h[g+1]:"")&&f===e.ownerDocument)Ud(e,h,!0);else if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&
(f=f.host))if(f=U(f).is,h===f)for(e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+V.a+")"),f=0;f<e.length;f++)Wd(e[f],h);else h&&Ud(e,h,!0),Ud(e,f)}}}}
if(!P){var Te=new MutationObserver(Se),Ue=function(a){Te.observe(a,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Ue(document);else{var Ve=function(){Ue(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Ve):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){Ve();document.removeEventListener("readystatechange",a)};document.addEventListener("readystatechange",a)}else Ve()})}Re=function(){Se(Te.takeRecords())}}
var We=Re;var Xe={};var Ye=Promise.resolve();function Ze(a){if(a=Xe[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1}function $e(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function af(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a.b||(a.b=!0,Ye.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a.b=!1}))};var bf=null,cf=window.HTMLImports&&window.HTMLImports.whenReady||null,df;function ef(a){requestAnimationFrame(function(){cf?cf(a):(bf||(bf=new Promise(function(a){df=a}),"complete"===document.readyState?df():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&df()})),bf.then(function(){a&&a()}))})};var ff=new Qe;function Y(){var a=this;this.ea={};this.c=document.documentElement;var b=new nd;b.rules=[];this.i=we(this.c,new ve(b));this.u=!1;this.b=this.a=null;ef(function(){gf(a)})}n=Y.prototype;n.ja=function(){We()};n.ua=function(a){return Nd(a)};n.Da=function(a){return R(a)};
n.prepareTemplate=function(a,b,c){if(!a.i){a.i=!0;a.name=b;a.extends=c;Xe[b]=a;var d=(d=a.content.querySelector("style"))?d.getAttribute("css-build")||"":"";var e=[];for(var f=a.content.querySelectorAll("style"),h=0;h<f.length;h++){var g=f[h];if(g.hasAttribute("shady-unscoped")){if(!P){var k=g.textContent;Md.has(k)||(Md.add(k),k=g.cloneNode(!0),document.head.appendChild(k));g.parentNode.removeChild(g)}}else e.push(g.textContent),g.parentNode.removeChild(g)}e=e.join("").trim();c={is:b,extends:c,Ia:d};
P||Ud(a.content,b);gf(this);f=Hd.test(e)||Gd.test(e);Hd.lastIndex=0;Gd.lastIndex=0;e=od(e);f&&Q&&this.a&&this.a.transformRules(e,b);a._styleAst=e;a.u=d;d=[];Q||(d=Ae(a._styleAst));if(!d.length||Q)e=P?a.content:null,b=Ne[b],f=Yd(c,a._styleAst),b=f.length?Pd(f,c.is,e,b):void 0,a.a=b;a.c=d}};
function hf(a){!a.b&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.b=window.ShadyCSS.CustomStyleInterface,a.b.transformCallback=function(b){a.ha(b)},a.b.validateCallback=function(){requestAnimationFrame(function(){(a.b.enqueued||a.u)&&a.A()})})}function gf(a){!a.a&&window.ShadyCSS&&window.ShadyCSS.ApplyShim&&(a.a=window.ShadyCSS.ApplyShim,a.a.invalidCallback=Ze);hf(a)}
n.A=function(){gf(this);if(this.b){var a=this.b.processStyles();if(this.b.enqueued){if(Q)for(var b=0;b<a.length;b++){var c=this.b.getStyleForCustomStyle(a[b]);if(c&&Q&&this.a){var d=Nd(c);gf(this);this.a.transformRules(d);c.textContent=R(d)}}else for(jf(this,this.c,this.i),b=0;b<a.length;b++)(c=this.b.getStyleForCustomStyle(a[b]))&&Le(c,this.i.v);this.b.enqueued=!1;this.u&&!Q&&this.styleDocument()}}};
n.styleElement=function(a,b){var c=U(a).is,d=W(a);if(!d){var e=U(a);d=e.is;e=e.I;var f=Ne[d];d=Xe[d];if(d){var h=d._styleAst;var g=d.c}d=we(a,new ve(h,f,g,e))}a!==this.c&&(this.u=!0);b&&(d.B=d.B||{},Object.assign(d.B,b));if(Q){if(d.B){b=d.B;for(var k in b)null===k?a.style.removeProperty(k):a.style.setProperty(k,b[k])}if(((k=Xe[c])||a===this.c)&&k&&k.a&&!$e(k)){if($e(k)||k._applyShimValidatingVersion!==k._applyShimNextVersion)gf(this),this.a&&this.a.transformRules(k._styleAst,c),k.a.textContent=Yd(a,
d.s),af(k);P&&(c=a.shadowRoot)&&(c.querySelector("style").textContent=Yd(a,d.s));d.s=k._styleAst}}else if(jf(this,a,d),d.$&&d.$.length){c=d;k=U(a).is;d=(b=ff.fetch(k,c.v,c.$))?b.styleElement:null;h=c.m;(g=b&&b.m)||(g=this.ea[k]=(this.ea[k]||0)+1,g=k+"-"+g);c.m=g;g=c.m;e=Me;e=d?d.textContent||"":Ie(e,a,c.v,g);f=W(a);var l=f.a;l&&!P&&l!==d&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));P?f.a?(f.a.textContent=e,d=f.a):e&&(d=Pd(e,g,a.shadowRoot,f.b)):d?d.parentNode||(ye&&-1<
e.indexOf("@media")&&(d.textContent=e),Qd(d,null,f.b)):e&&(d=Pd(e,g,null,f.b));d&&(d._useCount=d._useCount||0,f.a!=d&&d._useCount++,f.a=d);g=d;P||(d=c.m,f=e=a.getAttribute("class")||"",h&&(f=e.replace(new RegExp("\\s*x-scope\\s*"+h+"\\s*","g")," ")),f+=(f?" ":"")+"x-scope "+d,e!==f&&Sd(a,f));b||ff.store(k,c.v,g,c.m)}};function kf(a,b){return(b=b.getRootNode().host)?W(b)?b:kf(a,b):a.c}
function jf(a,b,c){a=kf(a,b);var d=W(a);a=Object.create(d.v||null);var e=He(b,c.s);b=Fe(d.s,b).o;Object.assign(a,e.wa,b,e.Aa);b=c.B;for(var f in b)if((e=b[f])||0===e)a[f]=e;f=Me;b=Object.getOwnPropertyNames(a);for(e=0;e<b.length;e++)d=b[e],a[d]=De(f,a[d],a);c.v=a}n.styleDocument=function(a){this.styleSubtree(this.c,a)};
n.styleSubtree=function(a,b){var c=a.shadowRoot;(c||a===this.c)&&this.styleElement(a,b);if(b=c&&(c.children||c.childNodes))for(a=0;a<b.length;a++)this.styleSubtree(b[a]);else if(a=a.children||a.childNodes)for(b=0;b<a.length;b++)this.styleSubtree(a[b])};n.ha=function(a){var b=this,c=Nd(a);S(c,function(a){if(P)se(a);else{var c=V;a.selector=a.parsedSelector;se(a);a.selector=a.j=be(c,a,c.c,void 0,void 0)}Q&&(gf(b),b.a&&b.a.transformRule(a))});Q?a.textContent=R(c):this.i.s.rules.push(c)};
n.getComputedStyleValue=function(a,b){var c;Q||(c=(W(a)||W(kf(this,a))).v[b]);return(c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};n.Ca=function(a,b){var c=a.getRootNode();b=b?b.split(/\s/):[];c=c.host&&c.host.localName;if(!c){var d=a.getAttribute("class");if(d){d=d.split(/\s/);for(var e=0;e<d.length;e++)if(d[e]===V.a){c=d[e+1];break}}}c&&b.push(V.a,c);Q||(c=W(a))&&c.m&&b.push(Me.a,c.m);Sd(a,b.join(" "))};n.sa=function(a){return W(a)};Y.prototype.flush=Y.prototype.ja;
Y.prototype.prepareTemplate=Y.prototype.prepareTemplate;Y.prototype.styleElement=Y.prototype.styleElement;Y.prototype.styleDocument=Y.prototype.styleDocument;Y.prototype.styleSubtree=Y.prototype.styleSubtree;Y.prototype.getComputedStyleValue=Y.prototype.getComputedStyleValue;Y.prototype.setElementClass=Y.prototype.Ca;Y.prototype._styleInfoForNode=Y.prototype.sa;Y.prototype.transformCustomStyleForDocument=Y.prototype.ha;Y.prototype.getStyleAst=Y.prototype.ua;Y.prototype.styleAstToString=Y.prototype.Da;
Y.prototype.flushCustomStyles=Y.prototype.A;Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return P}},nativeCss:{get:function(){return Q}}});var Z=new Y,lf,mf;window.ShadyCSS&&(lf=window.ShadyCSS.ApplyShim,mf=window.ShadyCSS.CustomStyleInterface);window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.A();Z.prepareTemplate(a,b,c)},styleSubtree:function(a,b){Z.A();Z.styleSubtree(a,b)},styleElement:function(a){Z.A();Z.styleElement(a)},styleDocument:function(a){Z.A();Z.styleDocument(a)},getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:Q,nativeShadow:P};lf&&(window.ShadyCSS.ApplyShim=lf);
mf&&(window.ShadyCSS.CustomStyleInterface=mf);var nf=window.document;window.WebComponents=window.WebComponents||{};function of(){requestAnimationFrame(function(){window.WebComponents.ready=!0;window.document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}function pf(){of();nf.removeEventListener("readystatechange",pf)}"loading"!==nf.readyState?of():nf.addEventListener("readystatechange",pf);}).call(this);
//# sourceMappingURL=webcomponents-sd-ce.js.map

File diff suppressed because one or more lines are too long

41
index.html Normal file
View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript" src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="src/components/cat-img.js"></script>
</head>
<body>
<h1>WebComponents workshop</h1>
<p>In this workshop, we will create new custom HTML Components</p>
<cat-img></cat-img>
<hr>
<div>
<button onclick="removeCatImg()">Click me to remove CatImg</button>
</div>
<div>
<input type="text" id="cat-img-param" value="SensorFact">
<button onclick="changeCatImgParam()">Click me to change CatImg's parameter</button>
</div>
<hr>
<script>
function removeCatImg(){
const catImgElement = document.getElementsByTagName("cat-img")[0];
catImgElement.parentNode.removeChild(catImgElement);
}
</script>
<script>
function changeCatImgParam(){
const catImgElement = document.getElementsByTagName("cat-img")[0];
const catImgParam = document.getElementById("cat-img-param").value;
document.getElementsByTagName("cat-img")[0].setAttribute("name", catImgParam);
}
</script>
</body>
</html>

165
package-lock.json generated Normal file
View File

@@ -0,0 +1,165 @@
{
"name": "web-components-workshop",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"colors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs="
},
"corser": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
"integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c="
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"ecstatic": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-2.2.1.tgz",
"integrity": "sha512-ztE4WqheoWLh3wv+HQwy7dACnvNY620coWpa+XqY6R2cVWgaAT2lUISU1Uf7JpdLLJCURktJOaA9av2AOzsyYQ==",
"requires": {
"he": "1.1.1",
"mime": "1.6.0",
"minimist": "1.2.0",
"url-join": "2.0.2"
}
},
"eventemitter3": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz",
"integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg="
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
},
"http-proxy": {
"version": "1.16.2",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz",
"integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=",
"requires": {
"eventemitter3": "1.2.0",
"requires-port": "1.0.0"
}
},
"http-server": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/http-server/-/http-server-0.10.0.tgz",
"integrity": "sha1-sqRGsWqduH7TxiK6m+sbCFsSNKc=",
"requires": {
"colors": "1.0.3",
"corser": "2.0.1",
"ecstatic": "2.2.1",
"http-proxy": "1.16.2",
"opener": "1.4.3",
"optimist": "0.6.1",
"portfinder": "1.0.13",
"union": "0.4.6"
}
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"opener": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
"integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg="
},
"optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"requires": {
"minimist": "0.0.10",
"wordwrap": "0.0.3"
},
"dependencies": {
"minimist": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
"integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
}
}
},
"portfinder": {
"version": "1.0.13",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz",
"integrity": "sha1-uzLs2HwnEErm7kS1o8y/Drsa7ek=",
"requires": {
"async": "1.5.2",
"debug": "2.6.9",
"mkdirp": "0.5.1"
}
},
"qs": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
"integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ="
},
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
"union": {
"version": "0.4.6",
"resolved": "https://registry.npmjs.org/union/-/union-0.4.6.tgz",
"integrity": "sha1-GY+9rrolTniLDvy2MLwR8kopWeA=",
"requires": {
"qs": "2.3.3"
}
},
"url-join": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.2.tgz",
"integrity": "sha1-wHJ1aWetJLi1nldBVRyqx49QuLc="
},
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
}
}
}

31
package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "web-components-workshop",
"version": "1.0.0",
"description": "A short workshop on web components, with exercises",
"main": "index.html",
"dependencies": {
"http-server": "^0.10.0"
},
"devDependencies": {},
"scripts": {
"start": "node ./node_modules/.bin/http-server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/jlengrand/web-components-workshop.git"
},
"keywords": [
"web-components",
"shadydom",
"shadowdom",
"custom-elements",
"polymer"
],
"author": "Julien Lengrand-Lambert <julien@lengrand.fr>",
"license": "ISC",
"bugs": {
"url": "https://github.com/jlengrand/web-components-workshop/issues"
},
"homepage": "https://github.com/jlengrand/web-components-workshop#readme"
}

19
src/components/cat-img.js Normal file
View File

@@ -0,0 +1,19 @@
class CatImgElement extends HTMLElement {
constructor(){
super()
}
connectedCallback(){
this.innerHTML = `<h1>Hello Meetup !</h1>`;
console.log("I'm here!");
}
disconnectedCallback(){
console.log("I'm gone!");
}
}
window.customElements.define(
'cat-img',
CatImgElement);

BIN
src/img/cat-loading.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB