-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolyfill.js
More file actions
107 lines (100 loc) · 43.3 KB
/
polyfill.js
File metadata and controls
107 lines (100 loc) · 43.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
(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 aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},n="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ba(){ba=function(){};n.Symbol||(n.Symbol=ca)}var ca=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}();
function p(){ba();var a=n.Symbol.iterator;a||(a=n.Symbol.iterator=n.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return da(this)}});p=function(){}}function da(a){var b=0;return ea(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function ea(a){p();a={next:a};a[n.Symbol.iterator]=function(){return this};return a}function fa(a){p();var b=a[Symbol.iterator];return b?b.call(a):da(a)}
function ha(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function r(a,b){return{index:a,j:[],m:b}}
function ia(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&&ja(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=r(e,0);f<d;)b.j.push(c[f++]);return[b]}if(f==d)return[r(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,z=b[l][m-1]+1;b[l][m]=q<z?q:z}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=r(e,0));b.m++;e++;b.j.push(c[f]);f++;break;case 2:b||(b=r(e,0));
b.m++;e++;break;case 3:b||(b=r(e,0)),b.j.push(c[f]),f++}b&&k.push(b);return k}function ja(a,b){return a===b};var t=window.ShadyDOM||{};t.R=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var u=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");t.h=!!(u&&u.configurable&&u.get);t.H=t.force||!t.R;function v(a){return a.__shady&&void 0!==a.__shady.firstChild}function w(a){return"ShadyRoot"===a.K}function x(a){a=a.getRootNode();if(w(a))return a}var y=Element.prototype,ka=y.matches||y.matchesSelector||y.mozMatchesSelector||y.msMatchesSelector||y.oMatchesSelector||y.webkitMatchesSelector;
function A(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 B(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)A(a,c[d]);return a}function la(a,b){for(var c in b)a[c]=b[c]}var C=document.createTextNode(""),ma=0,D=[];(new MutationObserver(function(){for(;D.length;)try{D.shift()()}catch(a){throw C.textContent=ma++,a;}})).observe(C,{characterData:!0});
function na(a){D.push(a);C.textContent=ma++}var oa=!!document.contains;function pa(a,b){for(;b;){if(b==a)return!0;b=b.parentNode}return!1};var qa=/[&\u00A0"]/g,sa=/[&\u00A0<>]/g;function ta(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function ua(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var va=ua("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),wa=ua("style script xmp iframe noembed noframes plaintext noscript".split(" "));
function E(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,z=g.attributes,ra=0;k=z[ra];ra++)q+=" "+k.name+'="'+k.value.replace(qa,ta)+'"';q+=">";g=va[m]?q:q+E(g,l)+"</"+m+">";break a;case Node.TEXT_NODE:g=g.data;g=k&&wa[k.localName]?g:g.replace(sa,ta);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 F={},G=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),H=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function xa(a){var b=[];G.currentNode=a;for(a=G.firstChild();a;)b.push(a),a=G.nextSibling();return b}F.parentNode=function(a){G.currentNode=a;return G.parentNode()};F.firstChild=function(a){G.currentNode=a;return G.firstChild()};F.lastChild=function(a){G.currentNode=a;return G.lastChild()};F.previousSibling=function(a){G.currentNode=a;return G.previousSibling()};
F.nextSibling=function(a){G.currentNode=a;return G.nextSibling()};F.childNodes=xa;F.parentElement=function(a){H.currentNode=a;return H.parentNode()};F.firstElementChild=function(a){H.currentNode=a;return H.firstChild()};F.lastElementChild=function(a){H.currentNode=a;return H.lastChild()};F.previousElementSibling=function(a){H.currentNode=a;return H.previousSibling()};F.nextElementSibling=function(a){H.currentNode=a;return H.nextSibling()};
F.children=function(a){var b=[];H.currentNode=a;for(a=H.firstChild();a;)b.push(a),a=H.nextSibling();return b};F.innerHTML=function(a){return E(a,function(a){return xa(a)})};F.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 I={},ya=Element.prototype.insertBefore,za=Element.prototype.removeChild,Aa=Element.prototype.setAttribute,Ba=Element.prototype.removeAttribute,Ca=Element.prototype.cloneNode,Da=Document.prototype.importNode,Ea=Element.prototype.addEventListener,Fa=Element.prototype.removeEventListener,Ga=Window.prototype.addEventListener,Ha=Window.prototype.removeEventListener,Ia=Element.prototype.dispatchEvent,Ja=Element.prototype.querySelector,Ka=Element.prototype.querySelectorAll,La=Node.prototype.contains||
HTMLElement.prototype.contains;I.appendChild=Element.prototype.appendChild;I.insertBefore=ya;I.removeChild=za;I.setAttribute=Aa;I.removeAttribute=Ba;I.cloneNode=Ca;I.importNode=Da;I.addEventListener=Ea;I.removeEventListener=Fa;I.T=Ga;I.U=Ha;I.dispatchEvent=Ia;I.querySelector=Ja;I.querySelectorAll=Ka;I.contains=La;var J=Object.getOwnPropertyDescriptor(Element.prototype,"innerHTML")||Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML"),Ma=document.implementation.createHTMLDocument("inert"),K=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),Na={parentElement:{get:function(){var a=this.__shady&&this.__shady.parentNode;a&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:F.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=this.__shady&&this.__shady.parentNode;
return void 0!==a?a:F.parentNode(this)},configurable:!0},nextSibling:{get:function(){var a=this.__shady&&this.__shady.nextSibling;return void 0!==a?a:F.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=this.__shady&&this.__shady.previousSibling;return void 0!==a?a:F.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 F.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 F.previousElementSibling(this)},configurable:!0}},L={childNodes:{get:function(){if(v(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=F.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:F.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=this.__shady&&this.__shady.lastChild;return void 0!==a?a:F.lastChild(this)},
configurable:!0},textContent:{get:function(){if(v(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 F.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 F.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 F.lastElementChild(this)},configurable:!0},children:{get:function(){var a;v(this)?a=Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===
Node.ELEMENT_NODE}):a=F.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 v(this)?E(a):F.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=Ma.createElement(c);for(J&&J.set?J.set.call(c,a):c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild)},configurable:!0}},
Oa={shadowRoot:{get:function(){return this.__shady&&this.__shady.S||null},configurable:!0}},M={activeElement:{get:function(){var a=K&&K.get?K.get.call(document):t.h?void 0:document.activeElement;if(a&&a.nodeType){var b=!!w(this);if(this===document||b&&this.host!==a&&I.contains.call(this.host,a)){for(b=x(a);b&&b!==this;)a=b.host,b=x(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}};
function N(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 O(a){N(a,Na);N(a,L);N(a,M)}var Pa=t.h?function(){}:function(a){a.__shady&&a.__shady.L||(a.__shady=a.__shady||{},a.__shady.L=!0,N(a,Na,!0))},Qa=t.h?function(){}:function(a){a.__shady&&a.__shady.J||(a.__shady=a.__shady||{},a.__shady.J=!0,N(a,L,!0),N(a,Oa,!0))};function Ra(a,b,c){Pa(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 P(a){if(!a.__shady||void 0===a.__shady.firstChild){a.__shady=a.__shady||{};a.__shady.firstChild=F.firstChild(a);a.__shady.lastChild=F.lastChild(a);Qa(a);for(var b=a.__shady.childNodes=F.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,Pa(d)}};function Q(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&&F.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&&R(b.parentNode,b);d=x(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.f.push.apply(d.f,[].concat(f instanceof Array?f:ha(fa(f))));d&&("slot"===a.localName||f)&&S(d);if(v(a)){d=c;Qa(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++)Ra(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 Ra(b,a,d);if(Sa(a)){S(a.__shady.root);var h=!0}else a.__shady.root&&(h=!0)}h||(h=w(a)?a.host:a,c?(c=Ta(c),I.insertBefore.call(h,b,c)):I.appendChild.call(h,b));Ua(a,b);return b}
function R(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=x(b);if(v(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(Sa(a)){S(a.__shady.root);var f=!0}}Va(b);if(c){(d=a&&"slot"===a.localName)&&(f=!0);Wa(c);e=c.a;for(var h in e)for(var g=e[h],k=0;k<g.length;k++){var l=g[k];if(pa(b,l)){g.splice(k,1);var m=c.b.indexOf(l);0<=m&&c.b.splice(m,1);k--;if(m=l.__shady.g)for(l=0;l<m.length;l++){var q=m[l],z=F.parentNode(q);z&&I.removeChild.call(z,q)}m=!0}}(m||d)&&S(c)}f||(f=w(a)?a.host:a,(!a.__shady.root&&"slot"!==
b.localName||f===F.parentNode(b))&&I.removeChild.call(f,b));Ua(a,null,b);return b}function Va(a){if(a.__shady&&void 0!==a.__shady.C)for(var b=a.childNodes,c=0,d=b.length,e;c<d&&(e=b[c]);c++)Va(e);a.__shady&&(a.__shady.C=void 0)}function Ta(a){var b=a;a&&"slot"===a.localName&&(b=(b=a.__shady&&a.__shady.g)&&b.length?b[0]:Ta(a.nextSibling));return b}function Sa(a){return(a=a&&a.__shady&&a.__shady.root)&&Xa(a)}
function Ya(a,b){if("slot"===b)a=a.parentNode,Sa(a)&&S(a.__shady.root);else if("slot"===a.localName&&"name"===b&&(b=x(a))){var c=a.M,d=Za(a);if(d!==c){c=b.a[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.a[d]||(b.a[d]=[]);c.push(a);1<c.length&&(b.a[d]=$a(c))}S(b)}}function Ua(a,b,c){if(a=a.__shady&&a.__shady.i)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),ab(a)}
function bb(a){if(a&&a.nodeType){a.__shady=a.__shady||{};var b=a.__shady.C;void 0===b&&(w(a)?b=a:b=(b=a.parentNode)?bb(b):a,I.contains.call(document.documentElement,a)&&(a.__shady.C=b));return b}}function T(a,b,c){var d=[];cb(a.childNodes,b,c,d);return d}function cb(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:(cb(g.childNodes,k,l,m),g=void 0)}if(g)break}}var U=null;
function db(a,b,c){U||(U=window.ShadyCSS&&window.ShadyCSS.ScopingShim);U&&"class"===b?U.setElementClass(a,c):(I.setAttribute.call(a,b,c),Ya(a,b))}function eb(a,b){if(a.ownerDocument!==document)return I.importNode.call(document,a,b);var c=I.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 V=[],fb;function gb(a){fb||(fb=!0,na(W));V.push(a)}function W(){fb=!1;for(var a=!!V.length;V.length;)V.shift()();return a}W.list=V;var hb={};function X(a,b,c){if(a!==hb)throw new TypeError("Illegal constructor");a=document.createDocumentFragment();a.__proto__=X.prototype;a.K="ShadyRoot";P(b);P(a);a.host=b;a.c=c&&c.mode;b.__shady=b.__shady||{};b.__shady.root=a;b.__shady.S="closed"!==a.c?a:null;a.l=!1;a.b=[];a.a={};a.f=[];c=F.childNodes(b);for(var d=0,e=c.length;d<e;d++)I.removeChild.call(b,c[d]);return a}X.prototype=Object.create(DocumentFragment.prototype);function S(a){a.l||(a.l=!0,gb(function(){return ib(a)}))}
function ib(a){for(var b;a;){a.l&&(b=a);a:{var c=a;a=c.host.getRootNode();if(w(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()}
X.prototype._renderRoot=function(){this.l=!1;Wa(this);for(var a=0,b;a<this.b.length;a++){b=this.b[a];var c=b.__shady.assignedNodes;b.__shady.assignedNodes=[];b.__shady.g=[];if(b.__shady.G=c)for(var d=0;d<c.length;d++){var e=c[d];e.__shady.A=e.__shady.assignedSlot;e.__shady.assignedSlot===b&&(e.__shady.assignedSlot=null)}}for(b=this.host.firstChild;b;b=b.nextSibling)jb(this,b);for(a=0;a<this.b.length;a++){b=this.b[a];if(!b.__shady.assignedNodes.length)for(c=b.firstChild;c;c=c.nextSibling)jb(this,c,
b);c=b.parentNode;(c=c.__shady&&c.__shady.root)&&Xa(c)&&c._renderRoot();kb(this,b.__shady.g,b.__shady.assignedNodes);if(c=b.__shady.G){for(d=0;d<c.length;d++)c[d].__shady.A=null;b.__shady.G=null;c.length>b.__shady.assignedNodes.length&&(b.__shady.B=!0)}b.__shady.B&&(b.__shady.B=!1,lb(this,b))}a=this.b;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.g;for(var g=0;g<h.length;g++)e.push(h[g])}else e.push(h)}c=void 0;f=F.childNodes(d);h=ia(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.j.length&&(m=c.j[l]);l++)F.parentNode(m)===d&&I.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],I.insertBefore.call(d,m,g),f.splice(l,0,m)}};
function jb(a,b,c){b.__shady=b.__shady||{};var d=b.__shady.A;b.__shady.A=null;c||(c=(a=a.a[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.B=!0)}function kb(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&&kb(a,b,f)}else b.push(c[d])}
function lb(a,b){I.dispatchEvent.call(b,new Event("slotchange"));b.__shady.assignedSlot&&lb(a,b.__shady.assignedSlot)}function Wa(a){if(a.f.length){for(var b=a.f,c,d=0;d<b.length;d++){var e=b[d];e.__shady=e.__shady||{};P(e);P(e.parentNode);var f=Za(e);a.a[f]?(c=c||{},c[f]=!0,a.a[f].push(e)):a.a[f]=[e];a.b.push(e)}if(c)for(var h in c)a.a[h]=$a(a.a[h]);a.f=[]}}function Za(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.M=b}
function $a(a){return a.sort(function(a,c){a=mb(a);for(var b=mb(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 mb(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function Xa(a){Wa(a);return!!a.b.length}X.prototype.addEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.w=this;this.host.addEventListener(a,b,c)};
X.prototype.removeEventListener=function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.w=this;this.host.removeEventListener(a,b,c)};X.prototype.getElementById=function(a){return T(this,function(b){return b.id==a},function(a){return!!a})[0]||null};var nb=X.prototype;N(nb,L,!0);N(nb,M,!0);function ob(){this.c=!1;this.addedNodes=[];this.removedNodes=[];this.o=new Set}function ab(a){a.c||(a.c=!0,na(function(){pb(a)}))}function pb(a){if(a.c){a.c=!1;var b=a.takeRecords();b.length&&a.o.forEach(function(a){a(b)})}}ob.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 qb(a,b){a.__shady=a.__shady||{};a.__shady.i||(a.__shady.i=new ob);a.__shady.i.o.add(b);var c=a.__shady.i;return{N:b,P:c,O:a,takeRecords:function(){return c.takeRecords()}}}function rb(a){var b=a&&a.P;b&&(b.o.delete(a.N),b.o.size||(a.O.__shady.i=null))}
function sb(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 Y="__eventWrappers"+Date.now(),tb={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 ub(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 vb(a,b){if(!w)return a;a=ub(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),!w(f)||-1<h)return d}
var wb={get composed(){!1!==this.isTrusted&&void 0===this.s&&(this.s=tb[this.type]);return this.s||!1},composedPath:function(){this.D||(this.D=ub(this.__target,this.composed));return this.D},get target(){return vb(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.v)return null;this.F||(this.F=ub(this.v,!0));return vb(this.currentTarget,this.F)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.u=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);
this.u=this.I=!0}};function xb(a){function b(b,d){b=new a(b,d);b.s=d&&!!d.composed;return b}la(b,a);b.prototype=a.prototype;return b}var yb={focus:!0,blur:!0};function zb(a){return a.__target!==a.target||a.v!==a.relatedTarget}function Ab(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!zb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.I);d++);}
function Bb(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];Ab(a,d,"capture");if(a.u)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(Ab(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.u)break}}
function Cb(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 Db(a,b,c){if(b){var d=typeof b;if("function"===d||"object"===d)if("object"!==d||b.handleEvent&&"function"===typeof b.handleEvent){if(c&&"object"===typeof c){var e=!!c.capture;var f=!!c.once;var h=!!c.passive}else e=!!c,h=f=!1;var g=c&&c.w||this,k=b[Y];if(k){if(-1<Cb(k,g,a,e,f,h))return}else b[Y]=[];k=function(e){f&&this.removeEventListener(a,b,c);e.__target||Eb(e);if(g!==this){var h=Object.getOwnPropertyDescriptor(e,"currentTarget");Object.defineProperty(e,"currentTarget",{get:function(){return g},
configurable:!0})}if(e.composed||-1<e.composedPath().indexOf(g))if(zb(e)&&e.target===e.relatedTarget)e.eventPhase===Event.BUBBLING_PHASE&&e.stopImmediatePropagation();else if(e.eventPhase===Event.CAPTURING_PHASE||e.bubbles||e.target===g||g instanceof Window){var k="function"===d?b.call(g,e):b.handleEvent&&b.handleEvent(e);g!==this&&(h?(Object.defineProperty(e,"currentTarget",h),h=null):delete e.currentTarget);return k}};b[Y].push({node:this,type:a,capture:e,once:f,passive:h,V:k});yb[a]?(this.__handlers=
this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(k)):(this instanceof Window?I.T:I.addEventListener).call(this,a,k,c)}}}
function Fb(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.w||this,g=void 0;var k=null;try{k=b[Y]}catch(l){}k&&(e=Cb(k,h,a,d,e,f),-1<e&&(g=k.splice(e,1)[0].V,k.length||(b[Y]=void 0)));(this instanceof Window?I.U:I.removeEventListener).call(this,a,g||b,c);g&&yb[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],g=a.indexOf(g),-1<g&&a.splice(g,1))}}
function Gb(){for(var a in yb)window.addEventListener(a,function(a){a.__target||(Eb(a),Bb(a))},!0)}function Eb(a){a.__target=a.target;a.v=a.relatedTarget;if(t.h){var b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__patchProto")){var c=Object.create(b);c.W=b;A(c,wb);b.__patchProto=c}a.__proto__=b.__patchProto}else A(a,wb)}var Hb=xb(window.Event),Ib=xb(window.CustomEvent),Jb=xb(window.MouseEvent);function Kb(a){var b=a.getRootNode();w(b)&&ib(b);return a.__shady&&a.__shady.assignedSlot||null}
var Lb={addEventListener:Db.bind(window),removeEventListener:Fb.bind(window)},Mb={addEventListener:Db,removeEventListener:Fb,appendChild:function(a){return Q(this,a)},insertBefore:function(a,b){return Q(this,a,b)},removeChild:function(a){return R(this,a)},replaceChild:function(a,b){Q(this,a,b);R(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=I.cloneNode.call(this,a);else if(b=I.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 bb(this)},contains:function(a){return pa(this,a)},get isConnected(){var a=this.ownerDocument;if(oa&&I.contains.call(a,this)||a.documentElement&&I.contains.call(a.documentElement,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(a instanceof X?a.host:void 0);return!!(a&&a instanceof Document)},dispatchEvent:function(a){W();return I.dispatchEvent.call(this,a)}},Nb={get assignedSlot(){return Kb(this)}},Ob={querySelector:function(a){return T(this,
function(b){return ka.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a){return T(this,function(b){return ka.call(b,a)})}},Pb={assignedNodes:function(a){if("slot"===this.localName){var b=this.getRootNode();w(b)&&ib(b);return this.__shady?(a&&a.flatten?this.__shady.g:this.__shady.assignedNodes)||[]:[]}}},Qb=B({setAttribute:function(a,b){db(this,a,b)},removeAttribute:function(a){I.removeAttribute.call(this,a);Ya(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";
if(!a)throw"Not enough arguments.";return new X(hb,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){db(this,"slot",a)},get assignedSlot(){return Kb(this)}},Ob,Pb);Object.defineProperties(Qb,Oa);var Rb=B({importNode:function(a,b){return eb(a,b)},getElementById:function(a){return T(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},Ob);Object.defineProperties(Rb,{_activeElement:M.activeElement});
var Sb=HTMLElement.prototype.blur,Tb=B({blur:function(){var a=this.__shady&&this.__shady.root;(a=a&&a.activeElement)?a.blur():Sb.call(this)}});function Z(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(t.H){window.ShadyDOM={inUse:t.H,patch:function(a){return a},isShadyRoot:w,enqueue:gb,flush:W,settings:t,filterMutations:sb,observeChildren:qb,unobserveChildren:rb,nativeMethods:I,nativeTree:F};window.Event=Hb;window.CustomEvent=Ib;window.MouseEvent=Jb;Gb();var Ub=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;Z(window.Node.prototype,Mb);Z(window.Window.prototype,Lb);Z(window.Text.prototype,Nb);Z(window.DocumentFragment.prototype,Ob);Z(window.Element.prototype,Qb);Z(window.Document.prototype,
Rb);window.HTMLSlotElement&&Z(window.HTMLSlotElement.prototype,Pb);Z(Ub.prototype,Tb);t.h&&(O(window.Node.prototype),O(window.Text.prototype),O(window.DocumentFragment.prototype),O(window.Element.prototype),O(Ub.prototype),O(window.Document.prototype),window.HTMLSlotElement&&O(window.HTMLSlotElement.prototype));window.ShadowRoot=X};}).call(this);
(function(){
'use strict';var h=new function(){};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 n(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(b);return!a&&b}function p(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))}
function q(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null}
function t(b,a,c){c=c?c:new Set;for(var d=b;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;a(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,a,c);d=q(b,e);continue}else if("template"===f){d=q(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,a,c)}d=d.firstChild?d.firstChild:q(b,d)}}function u(b,a,c){b[a]=c};function v(){this.a=new Map;this.o=new Map;this.f=[];this.b=!1}function ba(b,a,c){b.a.set(a,c);b.o.set(c.constructor,c)}function w(b,a){b.b=!0;b.f.push(a)}function x(b,a){b.b&&t(a,function(a){return y(b,a)})}function y(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var c=0;c<b.f.length;c++)b.f[c](a)}}function z(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state?b.connectedCallback(d):A(b,d)}}
function B(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state&&b.disconnectedCallback(d)}}
function C(b,a,c){c=c?c:{};var d=c.w||new Set,e=c.s||function(a){return A(b,a)},f=[];t(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var c=a.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:a.addEventListener("load",function(){var c=a.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);C(b,c,{w:f,s:e})}})}else f.push(a)},d);if(b.b)for(a=0;a<
f.length;a++)y(b,f[a]);for(a=0;a<f.length;a++)e(f[a])}
function A(b,a){if(void 0===a.__CE_state){var c=a.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=b.a.get(a.localName)){c.constructionStack.push(a);var d=c.constructor;try{try{if(new d!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(m){throw a.__CE_state=2,m;}a.__CE_state=1;a.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=a.getAttribute(e);null!==f&&b.attributeChangedCallback(a,e,null,f,null)}p(a)&&b.connectedCallback(a)}}}v.prototype.connectedCallback=function(b){var a=b.__CE_definition;a.connectedCallback&&a.connectedCallback.call(b)};v.prototype.disconnectedCallback=function(b){var a=b.__CE_definition;a.disconnectedCallback&&a.disconnectedCallback.call(b)};
v.prototype.attributeChangedCallback=function(b,a,c,d,e){var f=b.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(a)&&f.attributeChangedCallback.call(b,a,c,d,e)};function D(b,a){this.c=b;this.a=a;this.b=void 0;C(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function E(b){b.b&&b.b.disconnect()}D.prototype.f=function(b){var a=this.a.readyState;"interactive"!==a&&"complete"!==a||E(this);for(a=0;a<b.length;a++)for(var c=b[a].addedNodes,d=0;d<c.length;d++)C(this.c,c[d])};function ca(){var b=this;this.b=this.a=void 0;this.f=new Promise(function(a){b.b=a;b.a&&a(b.a)})}function F(b){if(b.a)throw Error("Already resolved.");b.a=void 0;b.b&&b.b(void 0)};function G(b){this.i=!1;this.c=b;this.m=new Map;this.j=function(b){return b()};this.g=!1;this.l=[];this.u=new D(b,document)}
G.prototype.define=function(b,a){var c=this;if(!(a instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!n(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(this.c.a.get(b))throw Error("A custom element with name '"+b+"' has already been defined.");if(this.i)throw Error("A custom element is already being defined.");this.i=!0;var d,e,f,m,l;try{var g=function(b){var a=k[b];if(void 0!==a&&!(a instanceof Function))throw Error("The '"+b+"' callback must be a function.");
return a},k=a.prototype;if(!(k instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");d=g("connectedCallback");e=g("disconnectedCallback");f=g("adoptedCallback");m=g("attributeChangedCallback");l=a.observedAttributes||[]}catch(r){return}finally{this.i=!1}a={localName:b,constructor:a,connectedCallback:d,disconnectedCallback:e,adoptedCallback:f,attributeChangedCallback:m,observedAttributes:l,constructionStack:[]};ba(this.c,b,a);this.l.push(a);this.g||
(this.g=!0,this.j(function(){return da(c)}))};function da(b){if(!1!==b.g){b.g=!1;for(var a=b.l,c=[],d=new Map,e=0;e<a.length;e++)d.set(a[e].localName,[]);C(b.c,document,{s:function(a){if(void 0===a.__CE_state){var e=a.localName,f=d.get(e);f?f.push(a):b.c.a.get(e)&&c.push(a)}}});for(e=0;e<c.length;e++)A(b.c,c[e]);for(;0<a.length;){for(var f=a.shift(),e=f.localName,f=d.get(f.localName),m=0;m<f.length;m++)A(b.c,f[m]);(e=b.m.get(e))&&F(e)}}}G.prototype.get=function(b){if(b=this.c.a.get(b))return b.constructor};
G.prototype.whenDefined=function(b){if(!n(b))return Promise.reject(new SyntaxError("'"+b+"' is not a valid custom element name."));var a=this.m.get(b);if(a)return a.f;a=new ca;this.m.set(b,a);this.c.a.get(b)&&!this.l.some(function(a){return a.localName===b})&&F(a);return a.f};G.prototype.v=function(b){E(this.u);var a=this.j;this.j=function(c){return b(function(){return a(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.v;var H=window.Document.prototype.createElement,ea=window.Document.prototype.createElementNS,fa=window.Document.prototype.importNode,ga=window.Document.prototype.prepend,ha=window.Document.prototype.append,ia=window.DocumentFragment.prototype.prepend,ja=window.DocumentFragment.prototype.append,I=window.Node.prototype.cloneNode,J=window.Node.prototype.appendChild,K=window.Node.prototype.insertBefore,L=window.Node.prototype.removeChild,M=window.Node.prototype.replaceChild,N=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),O=window.Element.prototype.attachShadow,P=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Q=window.Element.prototype.getAttribute,R=window.Element.prototype.setAttribute,S=window.Element.prototype.removeAttribute,T=window.Element.prototype.getAttributeNS,U=window.Element.prototype.setAttributeNS,ka=window.Element.prototype.removeAttributeNS,la=window.Element.prototype.insertAdjacentElement,ma=window.Element.prototype.prepend,na=window.Element.prototype.append,
V=window.Element.prototype.before,oa=window.Element.prototype.after,pa=window.Element.prototype.replaceWith,qa=window.Element.prototype.remove,ra=window.HTMLElement,W=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),sa=window.HTMLElement.prototype.insertAdjacentElement;function ta(){var b=X;window.HTMLElement=function(){function a(){var a=this.constructor,d=b.o.get(a);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(!e.length)return e=H.call(document,d.localName),Object.setPrototypeOf(e,a.prototype),e.__CE_state=1,e.__CE_definition=d,y(b,e),e;var d=e.length-1,f=e[d];if(f===h)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=h;Object.setPrototypeOf(f,a.prototype);y(b,f);return f}a.prototype=ra.prototype;return a}()};function Y(b,a,c){function d(a){return function(d){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];for(var e=[],f=[],k=0;k<c.length;k++){var r=c[k];r instanceof Element&&p(r)&&f.push(r);if(r instanceof DocumentFragment)for(r=r.firstChild;r;r=r.nextSibling)e.push(r);else e.push(r)}a.apply(this,c);for(c=0;c<f.length;c++)B(b,f[c]);if(p(this))for(c=0;c<e.length;c++)f=e[c],f instanceof Element&&z(b,f)}}c.h&&(a.prepend=d(c.h));c.append&&(a.append=d(c.append))};function ua(){var b=X;u(Document.prototype,"createElement",function(a){if(this.__CE_hasRegistry){var c=b.a.get(a);if(c)return new c.constructor}a=H.call(this,a);y(b,a);return a});u(Document.prototype,"importNode",function(a,c){a=fa.call(this,a,c);this.__CE_hasRegistry?C(b,a):x(b,a);return a});u(Document.prototype,"createElementNS",function(a,c){if(this.__CE_hasRegistry&&(null===a||"http://www.w3.org/1999/xhtml"===a)){var d=b.a.get(c);if(d)return new d.constructor}a=ea.call(this,a,c);y(b,a);return a});
Y(b,Document.prototype,{h:ga,append:ha})};function va(){var b=X;function a(a,d){Object.defineProperty(a,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,a);else{var c=void 0;if(this.firstChild){var e=this.childNodes,l=e.length;if(0<l&&p(this))for(var c=Array(l),g=0;g<l;g++)c[g]=e[g]}d.set.call(this,a);if(c)for(a=0;a<c.length;a++)B(b,c[a])}}})}u(Node.prototype,"insertBefore",function(a,d){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);
a=K.call(this,a,d);if(p(this))for(d=0;d<c.length;d++)z(b,c[d]);return a}c=p(a);d=K.call(this,a,d);c&&B(b,a);p(this)&&z(b,a);return d});u(Node.prototype,"appendChild",function(a){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);a=J.call(this,a);if(p(this))for(var e=0;e<c.length;e++)z(b,c[e]);return a}c=p(a);e=J.call(this,a);c&&B(b,a);p(this)&&z(b,a);return e});u(Node.prototype,"cloneNode",function(a){a=I.call(this,a);this.ownerDocument.__CE_hasRegistry?C(b,a):x(b,a);
return a});u(Node.prototype,"removeChild",function(a){var c=p(a),e=L.call(this,a);c&&B(b,a);return e});u(Node.prototype,"replaceChild",function(a,d){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);a=M.call(this,a,d);if(p(this))for(B(b,d),d=0;d<e.length;d++)z(b,e[d]);return a}var e=p(a),c=M.call(this,a,d),m=p(this);m&&B(b,d);e&&B(b,a);m&&z(b,a);return c});N&&N.get?a(Node.prototype,N):w(b,function(b){a(b,{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);J.call(this,document.createTextNode(a))}})})};function wa(b){var a=Element.prototype;function c(a){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];for(var e=[],l=[],g=0;g<d.length;g++){var k=d[g];k instanceof Element&&p(k)&&l.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)e.push(k);else e.push(k)}a.apply(this,d);for(d=0;d<l.length;d++)B(b,l[d]);if(p(this))for(d=0;d<e.length;d++)l=e[d],l instanceof Element&&z(b,l)}}V&&(a.before=c(V));V&&(a.after=c(oa));pa&&u(a,"replaceWith",function(a){for(var d=
[],c=0;c<arguments.length;++c)d[c-0]=arguments[c];for(var c=[],m=[],l=0;l<d.length;l++){var g=d[l];g instanceof Element&&p(g)&&m.push(g);if(g instanceof DocumentFragment)for(g=g.firstChild;g;g=g.nextSibling)c.push(g);else c.push(g)}l=p(this);pa.apply(this,d);for(d=0;d<m.length;d++)B(b,m[d]);if(l)for(B(b,this),d=0;d<c.length;d++)m=c[d],m instanceof Element&&z(b,m)});qa&&u(a,"remove",function(){var a=p(this);qa.call(this);a&&B(b,this)})};function xa(){var b=X;function a(a,c){Object.defineProperty(a,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){var d=this,e=void 0;p(this)&&(e=[],t(this,function(a){a!==d&&e.push(a)}));c.set.call(this,a);if(e)for(var f=0;f<e.length;f++){var k=e[f];1===k.__CE_state&&b.disconnectedCallback(k)}this.ownerDocument.__CE_hasRegistry?C(b,this):x(b,this);return a}})}function c(a,c){u(a,"insertAdjacentElement",function(a,d){var e=p(d);a=c.call(this,a,d);e&&B(b,d);p(a)&&z(b,d);
return a})}O&&u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=O.call(this,a)});P&&P.get?a(Element.prototype,P):W&&W.get?a(HTMLElement.prototype,W):w(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return I.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,d=b?this.content:this,c=H.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;)J.call(d,
a.childNodes[0])}})});u(Element.prototype,"setAttribute",function(a,c){if(1!==this.__CE_state)return R.call(this,a,c);var d=Q.call(this,a);R.call(this,a,c);c=Q.call(this,a);b.attributeChangedCallback(this,a,d,c,null)});u(Element.prototype,"setAttributeNS",function(a,c,f){if(1!==this.__CE_state)return U.call(this,a,c,f);var d=T.call(this,a,c);U.call(this,a,c,f);f=T.call(this,a,c);b.attributeChangedCallback(this,c,d,f,a)});u(Element.prototype,"removeAttribute",function(a){if(1!==this.__CE_state)return S.call(this,
a);var c=Q.call(this,a);S.call(this,a);null!==c&&b.attributeChangedCallback(this,a,c,null,null)});u(Element.prototype,"removeAttributeNS",function(a,c){if(1!==this.__CE_state)return ka.call(this,a,c);var d=T.call(this,a,c);ka.call(this,a,c);var e=T.call(this,a,c);d!==e&&b.attributeChangedCallback(this,c,d,e,a)});sa?c(HTMLElement.prototype,sa):la?c(Element.prototype,la):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");Y(b,Element.prototype,{h:ma,append:na});wa(b)};/*
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 Z=window.customElements;if(!Z||Z.forcePolyfill||"function"!=typeof Z.define||"function"!=typeof Z.get){var X=new v;ta();ua();Y(X,DocumentFragment.prototype,{h:ia,append:ja});va();xa();document.__CE_hasRegistry=!0;var customElements=new G(X);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};
}).call(self);