@namiml/web-sdk 3.4.8-dev.202607291504 → 3.4.8-dev.202607291624
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/legacy-support.cjs +1 -3091
- package/dist/legacy-support.mjs +1 -3089
- package/dist/nami-web.umd.js +1 -1
- package/dist/polyfills.cjs +1 -1967
- package/dist/polyfills.d.ts +1 -1
- package/dist/polyfills.js +1 -1965
- package/package.json +2 -2
package/dist/legacy-support.cjs
CHANGED
|
@@ -1,3091 +1 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('core-js/stable');
|
|
4
|
-
require('whatwg-fetch');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
@license @nocompile
|
|
8
|
-
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
9
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
10
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
11
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12
|
-
Code distributed by Google as part of the polymer project is also
|
|
13
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
14
|
-
*/
|
|
15
|
-
(function () {
|
|
16
|
-
'use strict';
|
|
17
|
-
|
|
18
|
-
(function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;const a=HTMLElement;window.HTMLElement={HTMLElement:function HTMLElement(){return Reflect.construct(a,[],this.constructor)}}.HTMLElement,HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})();
|
|
19
|
-
|
|
20
|
-
}());
|
|
21
|
-
|
|
22
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
23
|
-
|
|
24
|
-
function getDefaultExportFromCjs (x) {
|
|
25
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
29
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
33
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function getAugmentedNamespace(n) {
|
|
37
|
-
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
|
38
|
-
var f = n.default;
|
|
39
|
-
if (typeof f == "function") {
|
|
40
|
-
var a = function a () {
|
|
41
|
-
var isInstance = false;
|
|
42
|
-
try {
|
|
43
|
-
isInstance = this instanceof a;
|
|
44
|
-
} catch {}
|
|
45
|
-
if (isInstance) {
|
|
46
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
47
|
-
}
|
|
48
|
-
return f.apply(this, arguments);
|
|
49
|
-
};
|
|
50
|
-
a.prototype = f.prototype;
|
|
51
|
-
} else a = {};
|
|
52
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
53
|
-
Object.keys(n).forEach(function (k) {
|
|
54
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
55
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function () {
|
|
58
|
-
return n[k];
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
return a;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
var webcomponentsBundle$1 = {};
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
@license @nocompile
|
|
69
|
-
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
70
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
71
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
72
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
73
|
-
Code distributed by Google as part of the polymer project is also
|
|
74
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
var hasRequiredWebcomponentsBundle;
|
|
78
|
-
|
|
79
|
-
function requireWebcomponentsBundle () {
|
|
80
|
-
if (hasRequiredWebcomponentsBundle) return webcomponentsBundle$1;
|
|
81
|
-
hasRequiredWebcomponentsBundle = 1;
|
|
82
|
-
(function(){/*
|
|
83
|
-
|
|
84
|
-
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
85
|
-
This code may only be used under the BSD style license found at
|
|
86
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
87
|
-
at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
88
|
-
be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
89
|
-
Google as part of the polymer project is also subject to an additional IP
|
|
90
|
-
rights grant found at http://polymer.github.io/PATENTS.txt
|
|
91
|
-
*/
|
|
92
|
-
'use strict';var v;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
93
|
-
function da(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof commonjsGlobal&&commonjsGlobal];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var ea=da(this);function fa(a,b){if(b)a:{var c=ea;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e];}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b});}}
|
|
94
|
-
fa("Symbol",function(a){function b(e){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c("jscomp_symbol_"+(e||"")+"_"+d++,e)}function c(e,f){this.g=e;ca(this,"description",{configurable:!0,writable:!0,value:f});}if(a)return a;c.prototype.toString=function(){return this.g};var d=0;return b});
|
|
95
|
-
fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ca(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ja(ba(this))}});}return a});function ja(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
96
|
-
function ka(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function w(a){if(!(a instanceof Array)){a=ka(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c;}return a}var la;if("function"==typeof Object.setPrototypeOf)la=Object.setPrototypeOf;else {var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1;}la=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;}
|
|
97
|
-
var qa=la;function ra(){this.u=!1;this.h=null;this.Oa=void 0;this.g=1;this.ea=0;this.i=null;}function ua(a){if(a.u)throw new TypeError("Generator is already running");a.u=!0;}ra.prototype.O=function(a){this.Oa=a;};function wa(a,b){a.i={ab:b,fb:!0};a.g=a.ea;}ra.prototype.return=function(a){this.i={return:a};this.g=this.ea;};function ya(a,b){a.g=3;return {value:b}}function za(a){this.g=new ra;this.h=a;}
|
|
98
|
-
function Aa(a,b){ua(a.g);var c=a.g.h;if(c)return Ba(a,"return"in c?c["return"]:function(d){return {value:d,done:!0}},b,a.g.return);a.g.return(b);return Ca(a)}function Ba(a,b,c,d){try{var e=b.call(a.g.h,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.u=!1,e;var f=e.value;}catch(g){return a.g.h=null,wa(a.g,g),Ca(a)}a.g.h=null;d.call(a.g,f);return Ca(a)}
|
|
99
|
-
function Ca(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.u=!1,{value:b.value,done:!1}}catch(c){a.g.Oa=void 0,wa(a.g,c);}a.g.u=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.fb)throw b.ab;return {value:b.return,done:!0}}return {value:void 0,done:!0}}
|
|
100
|
-
function Da(a){this.next=function(b){ua(a.g);a.g.h?b=Ba(a,a.g.h.next,b,a.g.O):(a.g.O(b),b=Ca(a));return b};this.throw=function(b){ua(a.g);a.g.h?b=Ba(a,a.g.h["throw"],b,a.g.O):(wa(a.g,b),b=Ca(a));return b};this.return=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this};}function Ea(a,b){b=new Da(new za(b));qa&&a.prototype&&qa(b,a.prototype);return b}Array.from||(Array.from=function(a){return [].slice.call(a)});
|
|
101
|
-
Object.assign||(Object.assign=function(a){for(var b=[].slice.call(arguments,1),c=0,d;c<b.length;c++)if(d=b[c])for(var e=a,f=Object.keys(d),g=0;g<f.length;g++){var h=f[g];e[h]=d[h];}return a});var Fa=setTimeout;function Ga(){}function Ha(a,b){return function(){a.apply(b,arguments);}}function A(a){if(!(this instanceof A))throw new TypeError("Promises must be constructed via new");if("function"!==typeof a)throw new TypeError("not a function");this.N=0;this.Ha=!1;this.I=void 0;this.ba=[];Ia(a,this);}
|
|
102
|
-
function Ja(a,b){for(;3===a.N;)a=a.I;0===a.N?a.ba.push(b):(a.Ha=!0,Ka(function(){var c=1===a.N?b.hb:b.ib;if(null===c)(1===a.N?La:Ma)(b.promise,a.I);else {try{var d=c(a.I);}catch(e){Ma(b.promise,e);return}La(b.promise,d);}}));}
|
|
103
|
-
function La(a,b){try{if(b===a)throw new TypeError("A promise cannot be resolved with itself.");if(b&&("object"===typeof b||"function"===typeof b)){var c=b.then;if(b instanceof A){a.N=3;a.I=b;Na(a);return}if("function"===typeof c){Ia(Ha(c,b),a);return}}a.N=1;a.I=b;Na(a);}catch(d){Ma(a,d);}}function Ma(a,b){a.N=2;a.I=b;Na(a);}
|
|
104
|
-
function Na(a){2===a.N&&0===a.ba.length&&Ka(function(){a.Ha||"undefined"!==typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",a.I);});for(var b=0,c=a.ba.length;b<c;b++)Ja(a,a.ba[b]);a.ba=null;}function Oa(a,b,c){this.hb="function"===typeof a?a:null;this.ib="function"===typeof b?b:null;this.promise=c;}function Ia(a,b){var c=!1;try{a(function(d){c||(c=!0,La(b,d));},function(d){c||(c=!0,Ma(b,d));});}catch(d){c||(c=!0,Ma(b,d));}}
|
|
105
|
-
A.prototype["catch"]=function(a){return this.then(null,a)};A.prototype.then=function(a,b){var c=new this.constructor(Ga);Ja(this,new Oa(a,b,c));return c};A.prototype["finally"]=function(a){var b=this.constructor;return this.then(function(c){return b.resolve(a()).then(function(){return c})},function(c){return b.resolve(a()).then(function(){return b.reject(c)})})};
|
|
106
|
-
function Pa(a){return new A(function(b,c){function d(h,k){try{if(k&&("object"===typeof k||"function"===typeof k)){var l=k.then;if("function"===typeof l){l.call(k,function(m){d(h,m);},c);return}}e[h]=k;0===--f&&b(e);}catch(m){c(m);}}if(!a||"undefined"===typeof a.length)return c(new TypeError("Promise.all accepts an array"));var e=Array.prototype.slice.call(a);if(0===e.length)return b([]);for(var f=e.length,g=0;g<e.length;g++)d(g,e[g]);})}
|
|
107
|
-
function Qa(a){return a&&"object"===typeof a&&a.constructor===A?a:new A(function(b){b(a);})}function Ra(a){return new A(function(b,c){c(a);})}function Sa(a){return new A(function(b,c){if(!a||"undefined"===typeof a.length)return c(new TypeError("Promise.race accepts an array"));for(var d=0,e=a.length;d<e;d++)Qa(a[d]).then(b,c);})}var Ka="function"===typeof setImmediate&&function(a){setImmediate(a);}||function(a){Fa(a,0);};/*
|
|
108
|
-
|
|
109
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
110
|
-
This code may only be used under the BSD style license found at
|
|
111
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
112
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
113
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
114
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
115
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
116
|
-
*/
|
|
117
|
-
if(!window.Promise){window.Promise=A;A.prototype.then=A.prototype.then;A.all=Pa;A.race=Sa;A.resolve=Qa;A.reject=Ra;var Ta=document.createTextNode(""),Ua=[];(new MutationObserver(function(){for(var a=Ua.length,b=0;b<a;b++)Ua[b]();Ua.splice(0,a);})).observe(Ta,{characterData:!0});Ka=function(a){Ua.push(a);Ta.textContent=0<Ta.textContent.length?"":"a";};};/*
|
|
118
|
-
Copyright (C) 2015 by WebReflection
|
|
119
|
-
|
|
120
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
121
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
122
|
-
in the Software without restriction, including without limitation the rights
|
|
123
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
124
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
125
|
-
furnished to do so, subject to the following conditions:
|
|
126
|
-
|
|
127
|
-
The above copyright notice and this permission notice shall be included in
|
|
128
|
-
all copies or substantial portions of the Software.
|
|
129
|
-
|
|
130
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
131
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
132
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
133
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
134
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
135
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
136
|
-
THE SOFTWARE.
|
|
137
|
-
|
|
138
|
-
*/
|
|
139
|
-
(function(a,b){if(!(b in a)){var c=typeof commonjsGlobal===typeof c?window:commonjsGlobal,d=0,e=String(Math.random()),f="__\u0001symbol@@"+e,g=a.getOwnPropertyNames,h=a.getOwnPropertyDescriptor,k=a.create,l=a.keys,m=a.freeze||a,q=a.defineProperty,H=a.defineProperties,C=h(a,"getOwnPropertyNames"),t=a.prototype,F=t.hasOwnProperty,E=t.propertyIsEnumerable,N=t.toString,y=function(I,u,G){F.call(I,f)||q(I,f,{enumerable:!1,configurable:!1,writable:!1,value:{}});I[f]["@@"+u]=G;},X=function(I,u){var G=k(I);g(u).forEach(function(p){sa.call(u,
|
|
140
|
-
p)&&Va(G,p,u[p]);});return G},x=function(){},ta=function(I){return I!=f&&!F.call(ha,I)},ia=function(I){return I!=f&&F.call(ha,I)},sa=function(I){var u=String(I);return ia(u)?F.call(this,u)&&!!this[f]&&this[f]["@@"+u]:E.call(this,I)},n=function(I){q(t,I,{enumerable:!1,configurable:!0,get:x,set:function(u){xa(this,I,{enumerable:!1,configurable:!0,writable:!0,value:u});y(this,I,!0);}});ha[I]=q(a(I),"constructor",kc);return m(ha[I])},J=function G(u){if(this instanceof G)throw new TypeError("Symbol is not a constructor");
|
|
141
|
-
return n("__\u0001symbol:".concat(u||"",e,++d))},ha=k(null),kc={value:J},ib=function(u){return ha[u]},Va=function(u,G,p){var r=String(G);if(ia(r)){G=xa;if(p.enumerable){var B=k(p);B.enumerable=!1;}else B=p;G(u,r,B);y(u,r,!!p.enumerable);}else q(u,G,p);return u},jb=function(u){return g(u).filter(ia).map(ib)};C.value=Va;q(a,"defineProperty",C);C.value=jb;q(a,b,C);C.value=function(u){return g(u).filter(ta)};q(a,"getOwnPropertyNames",C);C.value=function(u,G){var p=jb(G);p.length?l(G).concat(p).forEach(function(r){sa.call(G,
|
|
142
|
-
r)&&Va(u,r,G[r]);}):H(u,G);return u};q(a,"defineProperties",C);C.value=sa;q(t,"propertyIsEnumerable",C);C.value=J;q(c,"Symbol",C);C.value=function(u){u="__\u0001symbol:".concat("__\u0001symbol:",u,e);return u in t?ha[u]:n(u)};q(J,"for",C);C.value=function(u){if(ta(u))throw new TypeError(u+" is not a symbol");if(F.call(ha,u)&&(u=u.slice(10),"__\u0001symbol:"===u.slice(0,10)&&(u=u.slice(10),u!==e)))return u=u.slice(0,u.length-e.length),0<u.length?u:void 0};q(J,"keyFor",C);C.value=function(u,G){var p=
|
|
143
|
-
h(u,G);p&&ia(G)&&(p.enumerable=sa.call(u,G));return p};q(a,"getOwnPropertyDescriptor",C);C.value=function(u,G){return 1===arguments.length||"undefined"===typeof G?k(u):X(u,G)};q(a,"create",C);C.value=function(){var u=N.call(this);return "[object String]"===u&&ia(this)?"[object Symbol]":u};q(t,"toString",C);try{if(!0===k(q({},"__\u0001symbol:",{get:function(){return q(this,"__\u0001symbol:",{value:!0})["__\u0001symbol:"]}}))["__\u0001symbol:"])var xa=q;else throw "IE11";}catch(u){xa=function(G,p,r){var B=
|
|
144
|
-
h(t,p);delete t[p];q(G,p,r);q(t,p,B);};}}})(Object,"getOwnPropertySymbols");
|
|
145
|
-
(function(a,b){var c=a.defineProperty,d=a.prototype,e=d.toString,f;"iterator match replace search split hasInstance isConcatSpreadable unscopables species toPrimitive toStringTag".split(" ").forEach(function(g){g in b||(c(b,g,{value:b(g)}),"toStringTag"===g&&(f=a.getOwnPropertyDescriptor(d,"toString"),f.value=function(){var h=e.call(this),k=null==this?this:this[b.toStringTag];return null==k?h:"[object "+k+"]"},c(d,"toString",f)));});})(Object,Symbol);
|
|
146
|
-
(function(a,b,c){function d(){return this}b[a]||(b[a]=function(){var e=0,f=this,g={next:function(){var h=f.length<=e;return h?{done:h}:{done:h,value:f[e++]}}};g[a]=d;return g});c[a]||(c[a]=function(){var e=String.fromCodePoint,f=this,g=0,h=f.length,k={next:function(){var l=h<=g,m=l?"":e(f.codePointAt(g));g+=m.length;return l?{done:l}:{done:l,value:m}}};k[a]=d;return k});})(Symbol.iterator,Array.prototype,String.prototype);/*
|
|
147
|
-
|
|
148
|
-
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
149
|
-
This code may only be used under the BSD style license found at
|
|
150
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
151
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
152
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
153
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
154
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
155
|
-
*/
|
|
156
|
-
var Wa=Object.prototype.toString;Object.prototype.toString=function(){return void 0===this?"[object Undefined]":null===this?"[object Null]":Wa.call(this)};Object.keys=function(a){return Object.getOwnPropertyNames(a).filter(function(b){return (b=Object.getOwnPropertyDescriptor(a,b))&&b.enumerable})};
|
|
157
|
-
String.prototype[Symbol.iterator]&&String.prototype.codePointAt||(String.prototype[Symbol.iterator]=function Xa(){var b,c=this;return Ea(Xa,function(d){1==d.g&&(b=0);if(3!=d.g)return b<c.length?d=ya(d,c[b]):(d.g=0,d=void 0),d;b++;d.g=2;})});Set.prototype[Symbol.iterator]||(Set.prototype[Symbol.iterator]=function Ya(){var b,c=this,d;return Ea(Ya,function(e){1==e.g&&(b=[],c.forEach(function(f){b.push(f);}),d=0);if(3!=e.g)return d<b.length?e=ya(e,b[d]):(e.g=0,e=void 0),e;d++;e.g=2;})});
|
|
158
|
-
Map.prototype[Symbol.iterator]||(Map.prototype[Symbol.iterator]=function Za(){var b,c=this,d;return Ea(Za,function(e){1==e.g&&(b=[],c.forEach(function(f,g){b.push([g,f]);}),d=0);if(3!=e.g)return d<b.length?e=ya(e,b[d]):(e.g=0,e=void 0),e;d++;e.g=2;})});/*
|
|
159
|
-
|
|
160
|
-
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
161
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
162
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
163
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
164
|
-
Code distributed by Google as part of the polymer project is also
|
|
165
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
166
|
-
*/
|
|
167
|
-
var $a=document.createEvent("Event");$a.initEvent("foo",!0,!0);$a.preventDefault();if(!$a.defaultPrevented){var ab=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(ab.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return !0},configurable:!0}));};}var bb=/Trident/.test(navigator.userAgent);
|
|
168
|
-
if(!window.Event||bb&&"function"!==typeof window.Event){var cb=window.Event;window.Event=function(a,b){b=b||{};var c=document.createEvent("Event");c.initEvent(a,!!b.bubbles,!!b.cancelable);return c};if(cb){for(var db in cb)window.Event[db]=cb[db];window.Event.prototype=cb.prototype;}}
|
|
169
|
-
if(!window.CustomEvent||bb&&"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;
|
|
170
|
-
if(!window.MouseEvent||bb&&"function"!==typeof window.MouseEvent){var eb=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(eb)for(var fb in eb)window.MouseEvent[fb]=eb[fb];window.MouseEvent.prototype=eb.prototype;};var gb,hb=function(){function a(){e++;}var b=!1,c=!1,d={get capture(){return b=!0},get once(){return c=!0}},e=0,f=document.createElement("div");f.addEventListener("click",a,d);var g=b&&c;g&&(f.dispatchEvent(new Event("click")),f.dispatchEvent(new Event("click")),g=1==e);f.removeEventListener("click",a,d);return g}(),kb=null!==(gb=window.EventTarget)&&void 0!==gb?gb:window.Node;
|
|
171
|
-
if(!hb&&"addEventListener"in kb.prototype){var lb=function(a){if(!a||"object"!==typeof a&&"function"!==typeof a){var b=!!a;a=!1;}else b=!!a.capture,a=!!a.once;return {capture:b,once:a}},mb=kb.prototype.addEventListener,nb=kb.prototype.removeEventListener,qb=new WeakMap,rb=new WeakMap,sb=function(a,b,c){var d=c?qb:rb;c=d.get(a);void 0===c&&d.set(a,c=new Map);a=c.get(b);void 0===a&&c.set(b,a=new WeakMap);return a};kb.prototype.addEventListener=function(a,b,c){var d=this;if(null!=b){c=lb(c);var e=c.capture;
|
|
172
|
-
c=c.once;var f=sb(this,a,e);if(!f.has(b)){var g=c?function(h){f.delete(b);nb.call(d,a,g,e);if("function"===typeof b)return b.call(d,h);if("function"===typeof(null===b||void 0===b?void 0:b.handleEvent))return b.handleEvent(h)}:null;f.set(b,g);mb.call(this,a,null!==g&&void 0!==g?g:b,e);}}};kb.prototype.removeEventListener=function(a,b,c){if(null!=b){c=lb(c).capture;var d=sb(this,a,c),e=d.get(b);void 0!==e&&(d.delete(b),nb.call(this,a,null!==e&&void 0!==e?e:b,c));}};};Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var a=(this.ownerDocument||this).querySelector("base[href]");return a&&a.href||window.location.href},configurable:!0,enumerable:!0});/*
|
|
173
|
-
|
|
174
|
-
Copyright (c) 2020 The Polymer Project Authors. All rights reserved.
|
|
175
|
-
This code may only be used under the BSD style license found at
|
|
176
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
177
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
178
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
179
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
180
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
181
|
-
*/
|
|
182
|
-
var tb,ub,vb=Element.prototype,wb=null!==(tb=Object.getOwnPropertyDescriptor(vb,"attributes"))&&void 0!==tb?tb:Object.getOwnPropertyDescriptor(Node.prototype,"attributes"),xb=null!==(ub=null===wb||void 0===wb?void 0:wb.get)&&void 0!==ub?ub:function(){return this.attributes},yb=Array.prototype.map;vb.hasOwnProperty("getAttributeNames")||(vb.getAttributeNames=function(){return yb.call(xb.call(this),function(a){return a.name})});var zb,Ab=Element.prototype;Ab.hasOwnProperty("matches")||(Ab.matches=null!==(zb=Ab.webkitMatchesSelector)&&void 0!==zb?zb:Ab.msMatchesSelector);var Bb=Node.prototype.appendChild;function Cb(a){a=a.prototype;a.hasOwnProperty("append")||Object.defineProperty(a,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];c=ka(c);for(d=c.next();!d.done;d=c.next())d=d.value,Bb.call(this,"string"===typeof d?document.createTextNode(d):d);}});}Cb(Document);Cb(DocumentFragment);Cb(Element);var Db,Eb,Fb=Node.prototype.insertBefore,Gb=null!==(Eb=null===(Db=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===Db?void 0:Db.get)&&void 0!==Eb?Eb:function(){return this.firstChild};
|
|
183
|
-
function Hb(a){a=a.prototype;a.hasOwnProperty("prepend")||Object.defineProperty(a,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];d=Gb.call(this);c=ka(c);for(var e=c.next();!e.done;e=c.next())e=e.value,Fb.call(this,"string"===typeof e?document.createTextNode(e):e,d);}});}Hb(Document);Hb(DocumentFragment);Hb(Element);var Ib,Jb,Kb=Node.prototype.appendChild,Lb=Node.prototype.removeChild,Mb=null!==(Jb=null===(Ib=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===Ib?void 0:Ib.get)&&void 0!==Jb?Jb:function(){return this.firstChild};
|
|
184
|
-
function Nb(a){a=a.prototype;a.hasOwnProperty("replaceChildren")||Object.defineProperty(a,"replaceChildren",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(;null!==(d=Mb.call(this));)Lb.call(this,d);c=ka(c);for(d=c.next();!d.done;d=c.next())d=d.value,Kb.call(this,"string"===typeof d?document.createTextNode(d):d);}});}Nb(Document);Nb(DocumentFragment);Nb(Element);var Ob,Pb,Qb,Rb,Sb=Node.prototype.insertBefore,Tb=null!==(Pb=null===(Ob=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Ob?void 0:Ob.get)&&void 0!==Pb?Pb:function(){return this.parentNode},Ub=null!==(Rb=null===(Qb=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling"))||void 0===Qb?void 0:Qb.get)&&void 0!==Rb?Rb:function(){return this.nextSibling};
|
|
185
|
-
function Vb(a){a=a.prototype;a.hasOwnProperty("after")||Object.defineProperty(a,"after",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];d=Tb.call(this);if(null!==d){var e=Ub.call(this);c=ka(c);for(var f=c.next();!f.done;f=c.next())f=f.value,Sb.call(d,"string"===typeof f?document.createTextNode(f):f,e);}}});}Vb(CharacterData);Vb(Element);var Wb,Xb,Yb=Node.prototype.insertBefore,Zb=null!==(Xb=null===(Wb=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Wb?void 0:Wb.get)&&void 0!==Xb?Xb:function(){return this.parentNode};
|
|
186
|
-
function $b(a){a=a.prototype;a.hasOwnProperty("before")||Object.defineProperty(a,"before",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];d=Zb.call(this);if(null!==d){c=ka(c);for(var e=c.next();!e.done;e=c.next())e=e.value,Yb.call(d,"string"===typeof e?document.createTextNode(e):e,this);}}});}$b(CharacterData);$b(Element);var ac,bc,cc=Node.prototype.removeChild,dc=null!==(bc=null===(ac=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===ac?void 0:ac.get)&&void 0!==bc?bc:function(){return this.parentNode};function ec(a){a=a.prototype;a.hasOwnProperty("remove")||Object.defineProperty(a,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){var b=dc.call(this);b&&cc.call(b,this);}});}ec(CharacterData);ec(Element);var fc,gc,hc=Node.prototype.insertBefore,ic=Node.prototype.removeChild,jc=null!==(gc=null===(fc=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===fc?void 0:fc.get)&&void 0!==gc?gc:function(){return this.parentNode};
|
|
187
|
-
function lc(a){a=a.prototype;a.hasOwnProperty("replaceWith")||Object.defineProperty(a,"replaceWith",{configurable:!0,enumerable:!0,writable:!0,value:function(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];d=jc.call(this);if(null!==d){c=ka(c);for(var e=c.next();!e.done;e=c.next())e=e.value,hc.call(d,"string"===typeof e?document.createTextNode(e):e,this);ic.call(d,this);}}});}lc(CharacterData);lc(Element);var mc=window.Element.prototype,nc=window.HTMLElement.prototype,oc=window.SVGElement.prototype;!nc.hasOwnProperty("classList")||mc.hasOwnProperty("classList")||oc.hasOwnProperty("classList")||Object.defineProperty(mc,"classList",Object.getOwnPropertyDescriptor(nc,"classList"));var pc=Element.prototype,qc=Element.prototype.hasAttribute,rc=Element.prototype.setAttribute,sc=Element.prototype.removeAttribute;pc.hasOwnProperty("toggleAttribute")||(pc.toggleAttribute=function(a,b){if(void 0===b){if(qc.call(this,a))return sc.call(this,a),!1;rc.call(this,a,"");return !0}if(b)return qc.call(this,a)||rc.call(this,a,""),!0;sc.call(this,a);return !1});/*
|
|
188
|
-
|
|
189
|
-
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
190
|
-
This code may only be used under the BSD style license found at
|
|
191
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
192
|
-
at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
193
|
-
be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
194
|
-
Google as part of the polymer project is also subject to an additional IP
|
|
195
|
-
rights grant found at http://polymer.github.io/PATENTS.txt
|
|
196
|
-
*/
|
|
197
|
-
var tc=document.createElement("style");tc.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var uc=document.querySelector("head");uc.insertBefore(tc,uc.firstChild);var vc=window;vc.WebComponents=vc.WebComponents||{flags:{}};var wc=document.querySelector('script[src*="webcomponents-bundle"]'),xc=/wc-(.+)/,yc={};if(!yc.noOpts){location.search.slice(1).split("&").forEach(function(a){a=a.split("=");var b;a[0]&&(b=a[0].match(xc))&&(yc[b[1]]=a[1]||!0);});if(wc)for(var zc=0,Ac=void 0;Ac=wc.attributes[zc];zc++)"src"!==Ac.name&&(yc[Ac.name]=Ac.value||!0);var Bc={};yc.log&&yc.log.split&&yc.log.split(",").forEach(function(a){Bc[a]=!0;});yc.log=Bc;}
|
|
198
|
-
vc.WebComponents.flags=yc;var Cc=yc.shadydom;if(Cc){vc.ShadyDOM=vc.ShadyDOM||{};vc.ShadyDOM.force=Cc;var Dc=yc.noPatch;vc.ShadyDOM.noPatch="true"===Dc?!0:Dc;}var Ec=yc.register||yc.ce;Ec&&window.customElements&&(vc.customElements.forcePolyfill=Ec);/*
|
|
199
|
-
|
|
200
|
-
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
201
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
202
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
203
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
204
|
-
Code distributed by Google as part of the polymer project is also
|
|
205
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
206
|
-
*/
|
|
207
|
-
(function(){function a(){}function b(p,r){if(!p.childNodes.length)return [];switch(p.nodeType){case Node.DOCUMENT_NODE:return F.call(p,r);case Node.DOCUMENT_FRAGMENT_NODE:return E.call(p,r);default:return t.call(p,r)}}var c="undefined"===typeof HTMLTemplateElement,d=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),e=!1;/Trident/.test(navigator.userAgent)&&function(){function p(z,R){if(z instanceof DocumentFragment)for(var ob;ob=z.firstChild;)B.call(this,ob,R);else B.call(this,
|
|
208
|
-
z,R);return z}e=!0;var r=Node.prototype.cloneNode;Node.prototype.cloneNode=function(z){z=r.call(this,z);this instanceof DocumentFragment&&(z.__proto__=DocumentFragment.prototype);return z};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(){},
|
|
209
|
-
configurable:!0},nodeName:{get:function(){return "#document-fragment"},configurable:!0}});var B=Node.prototype.insertBefore;Node.prototype.insertBefore=p;var K=Node.prototype.appendChild;Node.prototype.appendChild=function(z){z instanceof DocumentFragment?p.call(this,z,null):K.call(this,z);return z};var aa=Node.prototype.removeChild,ma=Node.prototype.replaceChild;Node.prototype.replaceChild=function(z,R){z instanceof DocumentFragment?(p.call(this,z,R),aa.call(this,R)):ma.call(this,z,R);return R};Document.prototype.createDocumentFragment=
|
|
210
|
-
function(){var z=this.createElement("df");z.__proto__=DocumentFragment.prototype;return z};var va=Document.prototype.importNode;Document.prototype.importNode=function(z,R){R=va.call(this,z,R||!1);z instanceof DocumentFragment&&(R.__proto__=DocumentFragment.prototype);return R};}();var f=Node.prototype.cloneNode,g=Document.prototype.createElement,h=Document.prototype.importNode,k=Node.prototype.removeChild,l=Node.prototype.appendChild,m=Node.prototype.replaceChild,q=DOMParser.prototype.parseFromString,
|
|
211
|
-
H=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML")||{get:function(){return this.innerHTML},set:function(p){this.innerHTML=p;}},C=Object.getOwnPropertyDescriptor(window.Node.prototype,"childNodes")||{get:function(){return this.childNodes}},t=Element.prototype.querySelectorAll,F=Document.prototype.querySelectorAll,E=DocumentFragment.prototype.querySelectorAll,N=function(){if(!c){var p=document.createElement("template"),r=document.createElement("template");r.content.appendChild(document.createElement("div"));
|
|
212
|
-
p.content.appendChild(r);p=p.cloneNode(!0);return 0===p.content.childNodes.length||0===p.content.firstChild.content.childNodes.length||d}}();if(c){var y=document.implementation.createHTMLDocument("template"),X=!0,x=document.createElement("style");x.textContent="template{display:none;}";var ta=document.head;ta.insertBefore(x,ta.firstElementChild);a.prototype=Object.create(HTMLElement.prototype);var ia=!document.createElement("div").hasOwnProperty("innerHTML");a.Z=function(p){if(!p.content&&p.namespaceURI===
|
|
213
|
-
document.documentElement.namespaceURI){p.content=y.createDocumentFragment();for(var r;r=p.firstChild;)l.call(p.content,r);if(ia)p.__proto__=a.prototype;else if(p.cloneNode=function(B){return a.va(this,B)},X)try{n(p),J(p);}catch(B){X=!1;}a.bootstrap(p.content);}};var sa={option:["select"],thead:["table"],col:["colgroup","table"],tr:["tbody","table"],th:["tr","tbody","table"],td:["tr","tbody","table"]},n=function(p){Object.defineProperty(p,"innerHTML",{get:function(){return xa(this)},set:function(r){var B=
|
|
214
|
-
sa[(/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(r)||["",""])[1].toLowerCase()];if(B)for(var K=0;K<B.length;K++)r="<"+B[K]+">"+r+"</"+B[K]+">";y.body.innerHTML=r;for(a.bootstrap(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);r=y.body;if(B)for(K=0;K<B.length;K++)r=r.lastChild;for(;r.firstChild;)l.call(this.content,r.firstChild);},configurable:!0});},J=function(p){Object.defineProperty(p,"outerHTML",{get:function(){return "<template>"+this.innerHTML+"</template>"},set:function(r){if(this.parentNode){y.body.innerHTML=
|
|
215
|
-
r;for(r=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(r,y.body.firstChild);m.call(this.parentNode,r,this);}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0});};n(a.prototype);J(a.prototype);a.bootstrap=function(p){p=b(p,"template");for(var r=0,B=p.length,K;r<B&&(K=p[r]);r++)a.Z(K);};document.addEventListener("DOMContentLoaded",function(){a.bootstrap(document);});Document.prototype.createElement=function(){var p=
|
|
216
|
-
g.apply(this,arguments);"template"===p.localName&&a.Z(p);return p};DOMParser.prototype.parseFromString=function(){var p=q.apply(this,arguments);a.bootstrap(p);return p};Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return xa(this)},set:function(p){H.set.call(this,p);a.bootstrap(this);},configurable:!0,enumerable:!0});var ha=/[&\u00A0"]/g,kc=/[&\u00A0<>]/g,ib=function(p){switch(p){case "&":return "&";case "<":return "<";case ">":return ">";case '"':return """;case "\u00a0":return " "}};
|
|
217
|
-
x=function(p){for(var r={},B=0;B<p.length;B++)r[p[B]]=!0;return r};var Va=x("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),jb=x("style script xmp iframe noembed noframes plaintext noscript".split(" ")),xa=function(p,r){"template"===p.localName&&(p=p.content);for(var B="",K=r?r(p):C.get.call(p),aa=0,ma=K.length,va;aa<ma&&(va=K[aa]);aa++){a:{var z=va;var R=p;var ob=r;switch(z.nodeType){case Node.ELEMENT_NODE:for(var Kc=z.localName,pb="<"+Kc,Zh=z.attributes,
|
|
218
|
-
He=0;R=Zh[He];He++)pb+=" "+R.name+'="'+R.value.replace(ha,ib)+'"';pb+=">";z=Va[Kc]?pb:pb+xa(z,ob)+"</"+Kc+">";break a;case Node.TEXT_NODE:z=z.data;z=R&&jb[R.localName]?z:z.replace(kc,ib);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}B+=z;}return B};}if(c||N){a.va=function(p,r){var B=f.call(p,!1);this.Z&&this.Z(B);r&&(l.call(B.content,f.call(p.content,!0)),I(B.content,p.content));return B};var I=function(p,r){if(r.querySelectorAll&&
|
|
219
|
-
(r=b(r,"template"),0!==r.length)){p=b(p,"template");for(var B=0,K=p.length,aa,ma;B<K;B++)ma=r[B],aa=p[B],a&&a.Z&&a.Z(ma),m.call(aa.parentNode,u.call(ma,!0),aa);}},u=Node.prototype.cloneNode=function(p){if(!e&&d&&this instanceof DocumentFragment)if(p)var r=G.call(this.ownerDocument,this,!0);else return this.ownerDocument.createDocumentFragment();else this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName&&this.namespaceURI==document.documentElement.namespaceURI?r=a.va(this,p):r=f.call(this,
|
|
220
|
-
p);p&&I(r,this);return r},G=Document.prototype.importNode=function(p,r){r=r||!1;if("template"===p.localName)return a.va(p,r);var B=h.call(this,p,r);if(r){I(B,p);p=b(B,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"]');for(var K,aa=0;aa<p.length;aa++){K=p[aa];r=g.call(document,"script");r.textContent=K.textContent;for(var ma=K.attributes,va=0,z;va<ma.length;va++)z=ma[va],r.setAttribute(z.name,z.value);m.call(K.parentNode,r,K);}}return B};}c&&(window.HTMLTemplateElement=
|
|
221
|
-
a);})();/*
|
|
222
|
-
|
|
223
|
-
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
224
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
225
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
226
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
227
|
-
Code distributed by Google as part of the polymer project is also
|
|
228
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
229
|
-
*/
|
|
230
|
-
function Fc(){}Fc.prototype.toJSON=function(){return {}};function D(a){a.__shady||(a.__shady=new Fc);return a.__shady}function L(a){return a&&a.__shady};var M=window.ShadyDOM||{};M.cb=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var Gc=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");M.D=!!(Gc&&Gc.configurable&&Gc.get);M.Ba=M.force||!M.cb;M.J=M.noPatch||!1;M.ha=M.preferPerformance;M.Da="on-demand"===M.J;var Hc;var Ic=M.querySelectorImplementation;Hc=-1<["native","selectorEngine"].indexOf(Ic)?Ic:void 0;M.wb=Hc;M.Ra=navigator.userAgent.match("Trident");
|
|
231
|
-
function Jc(){return Document.prototype.msElementsFromPoint?"msElementsFromPoint":"elementsFromPoint"}function Lc(a){return (a=L(a))&&void 0!==a.firstChild}function O(a){return a instanceof ShadowRoot}function Mc(a){return (a=(a=L(a))&&a.root)&&Nc(a)}var Oc=Element.prototype,Pc=Oc.matches||Oc.matchesSelector||Oc.mozMatchesSelector||Oc.msMatchesSelector||Oc.oMatchesSelector||Oc.webkitMatchesSelector,Qc=document.createTextNode(""),Rc=0,Sc=[];
|
|
232
|
-
(new MutationObserver(function(){for(;Sc.length;)try{Sc.shift()();}catch(a){throw Qc.textContent=Rc++,a;}})).observe(Qc,{characterData:!0});function Tc(a){Sc.push(a);Qc.textContent=Rc++;}var Uc=document.contains?function(a,b){return a.__shady_native_contains(b)}:function(a,b){return a===b||a.documentElement&&a.documentElement.__shady_native_contains(b)};function Vc(a,b){for(;b;){if(b==a)return !0;b=b.__shady_parentNode;}return !1}
|
|
233
|
-
function Wc(a){for(var b=a.length-1;0<=b;b--){var c=a[b],d=c.getAttribute("id")||c.getAttribute("name");d&&"length"!==d&&isNaN(d)&&(a[d]=c);}a.item=function(e){return a[e]};a.namedItem=function(e){if("length"!==e&&isNaN(e)&&a[e])return a[e];for(var f=ka(a),g=f.next();!g.done;g=f.next())if(g=g.value,(g.getAttribute("id")||g.getAttribute("name"))==e)return g;return null};return a}function Xc(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b}
|
|
234
|
-
function Yc(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function Zc(a,b,c){c.configurable=!0;if(c.value)a[b]=c.value;else try{Object.defineProperty(a,b,c);}catch(d){}}function P(a,b,c,d){c=void 0===c?"":c;for(var e in b)d&&0<=d.indexOf(e)||Zc(a,c+e,b[e]);}function $c(a,b){for(var c in b)c in a&&Zc(a,c,b[c]);}function Q(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c);});return b}
|
|
235
|
-
function ad(a,b){for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length;d++)e=c[d],a[e]=b[e];}function bd(a){return a instanceof Node?a:document.createTextNode(""+a)}function cd(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];if(1===b.length)return bd(b[0]);c=document.createDocumentFragment();b=ka(b);for(var d=b.next();!d.done;d=b.next())c.appendChild(bd(d.value));return c}
|
|
236
|
-
function dd(a){var b;for(b=void 0===b?1:b;0<b;b--)a=a.reduce(function(c,d){Array.isArray(d)?c.push.apply(c,w(d)):c.push(d);return c},[]);return a}function ed(a){var b=[],c=new Set;a=ka(a);for(var d=a.next();!d.done;d=a.next())d=d.value,c.has(d)||(b.push(d),c.add(d));return b};var fd=[],gd;function hd(a){gd||(gd=!0,Tc(id));fd.push(a);}function id(){gd=!1;for(var a=!!fd.length;fd.length;)fd.shift()();return a}id.list=fd;function jd(){this.g=!1;this.addedNodes=[];this.removedNodes=[];this.qa=new Set;}function kd(a){a.g||(a.g=!0,Tc(function(){a.flush();}));}jd.prototype.flush=function(){if(this.g){this.g=!1;var a=this.takeRecords();a.length&&this.qa.forEach(function(b){b(a);});}};jd.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 []};
|
|
237
|
-
function ld(a,b){var c=D(a);c.ga||(c.ga=new jd);c.ga.qa.add(b);var d=c.ga;return {Va:b,X:d,Wa:a,takeRecords:function(){return d.takeRecords()}}}function md(a){var b=a&&a.X;b&&(b.qa.delete(a.Va),b.qa.size||(D(a.Wa).ga=null));}
|
|
238
|
-
function nd(a,b){var c=b.getRootNode();return a.map(function(d){var e=c===d.target.getRootNode();if(e&&d.addedNodes){if(e=[].slice.call(d.addedNodes).filter(function(f){return c===f.getRootNode()}),e.length)return d=Object.create(d),Object.defineProperty(d,"addedNodes",{value:e,configurable:!0}),d}else if(e)return d}).filter(function(d){return d})};var od=/[&\u00A0"]/g,pd=/[&\u00A0<>]/g;function qd(a){switch(a){case "&":return "&";case "<":return "<";case ">":return ">";case '"':return """;case "\u00a0":return " "}}function rd(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var sd=rd("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),td=rd("style script xmp iframe noembed noframes plaintext noscript".split(" "));
|
|
239
|
-
function ud(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g=void 0;e<f&&(g=d[e]);e++){a:{var h=g;var k=a,l=b;switch(h.nodeType){case Node.ELEMENT_NODE:k=h.localName;for(var m="<"+k,q=h.attributes,H=0,C;C=q[H];H++)m+=" "+C.name+'="'+C.value.replace(od,qd)+'"';m+=">";h=sd[k]?m:m+ud(h,l)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=k&&td[k.localName]?h:h.replace(pd,qd);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h),
|
|
240
|
-
Error("not implemented");}}c+=h;}return c};var vd=M.D,wd={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},xd={};function yd(a){xd[a]=function(b){return b["__shady_native_"+a]};}function zd(a,b){P(a,b,"__shady_native_");for(var c in b)yd(c);}function S(a,b){b=void 0===b?[]:b;for(var c=0;c<b.length;c++){var d=b[c],e=Object.getOwnPropertyDescriptor(a,d);e&&(Object.defineProperty(a,"__shady_native_"+d,e),e.value?wd[d]||(wd[d]=e.value):yd(d));}}
|
|
241
|
-
var Ad=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Bd=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Cd=document.implementation.createHTMLDocument("inert");function Dd(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b);}var Ed=["firstElementChild","lastElementChild","children","childElementCount"],Fd=["querySelector","querySelectorAll","append","prepend","replaceChildren"];
|
|
242
|
-
function Gd(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?(S(window.EventTarget.prototype,a),void 0===window.__shady_native_addEventListener&&S(Window.prototype,a)):(S(Node.prototype,a),S(Window.prototype,a),S(XMLHttpRequest.prototype,a));vd?S(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):zd(Node.prototype,{parentNode:{get:function(){Ad.currentNode=this;return Ad.parentNode()}},
|
|
243
|
-
firstChild:{get:function(){Ad.currentNode=this;return Ad.firstChild()}},lastChild:{get:function(){Ad.currentNode=this;return Ad.lastChild()}},previousSibling:{get:function(){Ad.currentNode=this;return Ad.previousSibling()}},nextSibling:{get:function(){Ad.currentNode=this;return Ad.nextSibling()}},childNodes:{get:function(){var b=[];Ad.currentNode=this;for(var c=Ad.firstChild();c;)b.push(c),c=Ad.nextSibling();return b}},parentElement:{get:function(){Bd.currentNode=this;return Bd.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var b=
|
|
244
|
-
document.createTreeWalker(this,NodeFilter.SHOW_TEXT,null,!1),c="",d;d=b.nextNode();)c+=d.nodeValue;return c;default:return this.nodeValue}},set:function(b){if("undefined"===typeof b||null===b)b="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:Dd(this);(0<b.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(b),void 0);break;default:this.nodeValue=b;}}}});S(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" "));
|
|
245
|
-
S(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){Bd.currentNode=this;return Bd.firstChild()}},lastElementChild:{get:function(){Bd.currentNode=this;return Bd.lastChild()}},children:{get:function(){var b=[];Bd.currentNode=this;for(var c=Bd.firstChild();c;)b.push(c),c=Bd.nextSibling();return Wc(b)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};vd?(S(Element.prototype,Ed),S(Element.prototype,["previousElementSibling","nextElementSibling",
|
|
246
|
-
"innerHTML","className"]),S(HTMLElement.prototype,["children","innerHTML","className"])):(zd(Element.prototype,a),zd(Element.prototype,{previousElementSibling:{get:function(){Bd.currentNode=this;return Bd.previousSibling()}},nextElementSibling:{get:function(){Bd.currentNode=this;return Bd.nextSibling()}},innerHTML:{get:function(){return ud(this,Xc)},set:function(b){var c="template"===this.localName?this.content:this;Dd(c);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Cd.namespaceURI?
|
|
247
|
-
Cd.createElementNS(this.namespaceURI,d):Cd.createElement(d);d.innerHTML=b;for(b="template"===this.localName?d.content:d;d=b.__shady_native_firstChild;)c.__shady_native_insertBefore(d,void 0);}},className:{get:function(){return this.getAttribute("class")||""},set:function(b){this.setAttribute("class",b);}}}));S(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute toggleAttribute focus blur".split(" "));S(Element.prototype,Fd);S(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&&
|
|
248
|
-
S(window.HTMLTemplateElement.prototype,["innerHTML"]);vd?S(DocumentFragment.prototype,Ed):zd(DocumentFragment.prototype,a);S(DocumentFragment.prototype,Fd);vd?(S(Document.prototype,Ed),S(Document.prototype,["activeElement"])):zd(Document.prototype,a);S(Document.prototype,["importNode","getElementById","elementFromPoint",Jc()]);S(Document.prototype,Fd);};var Hd=Q({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get shadowRoot(){return this.__shady_shadowRoot}}),Id=Q({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent=
|
|
249
|
-
a;},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){this.__shady_innerHTML=a;}}),Jd=Q({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className},set className(a){this.__shady_className=
|
|
250
|
-
a;}});function Kd(a){for(var b in a){var c=a[b];c&&(c.enumerable=!1);}}Kd(Hd);Kd(Id);Kd(Jd);var Ld=M.D||!0===M.J,Md=Ld?function(){}:function(a){var b=D(a);b.Ta||(b.Ta=!0,$c(a,Jd));},Nd=Ld?function(){}:function(a){var b=D(a);b.Sa||(b.Sa=!0,$c(a,Hd),window.customElements&&window.customElements.polyfillWrapFlushCallback&&!M.J||$c(a,Id));};var Od="__eventWrappers"+Date.now(),Pd=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),Qd=function(){function a(){}var b=!1,c={get capture(){b=!0;return !1}};window.addEventListener("test",a,c);window.removeEventListener("test",a,c);return b}();function Rd(a){if(null===a||"object"!==typeof a&&"function"!==typeof a){var b=!!a;var c=!1;}else {b=!!a.capture;c=!!a.once;var d=a.U;}return {Pa:d,capture:b,once:c,Na:Qd?a:b}}
|
|
251
|
-
var Sd={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,
|
|
252
|
-
drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0},Td={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function Ud(a){return a instanceof Node?a.__shady_getRootNode():a}
|
|
253
|
-
function Vd(a,b){var c=[],d=a;for(a=Ud(a);d;)c.push(d),d=d.__shady_assignedSlot?d.__shady_assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.__shady_parentNode;c[c.length-1]===document&&c.push(window);return c}function Wd(a){a.__composedPath||(a.__composedPath=Vd(a.target,!0));return a.__composedPath}function Xd(a,b){if(!O)return a;a=Vd(a,!0);for(var c=0,d,e=void 0,f,g=void 0;c<b.length;c++)if(d=b[c],f=Ud(d),f!==e&&(g=a.indexOf(f),e=f),!O(f)||-1<g)return d}
|
|
254
|
-
var Yd={get composed(){void 0===this.__composed&&(Pd?this.__composed="focusin"===this.type||"focusout"===this.type||Pd(this):!1!==this.isTrusted&&(this.__composed=Sd[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=Vd(this.__target,this.composed));return this.__composedPath},get target(){return Xd(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath||
|
|
255
|
-
(this.__relatedTargetComposedPath=Vd(this.__relatedTarget,!0));return Xd(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.ua=!0;},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.ua=this.__immediatePropagationStopped=!0;}},Zd=M.D&&Object.getOwnPropertyDescriptor(Event.prototype,"eventPhase");
|
|
256
|
-
Zd&&(Object.defineProperty(Yd,"eventPhase",{get:function(){return this.currentTarget===this.target?Event.AT_TARGET:this.__shady_native_eventPhase},enumerable:!0,configurable:!0}),Object.defineProperty(Yd,"__shady_native_eventPhase",Zd));function $d(a){function b(c,d){c=new a(c,d);c.__composed=d&&!!d.composed;return c}b.__proto__=a;b.prototype=a.prototype;return b}var ae={focus:!0,blur:!0};function be(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget}
|
|
257
|
-
function ce(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!be(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);}var de=(new Event("e")).hasOwnProperty("currentTarget");
|
|
258
|
-
function ee(a){a=de?Object.create(a):a;var b=a.composedPath(),c=b.map(function(m){return Xd(m,b)}),d=a.bubbles,e=Object.getOwnPropertyDescriptor(a,"currentTarget");Object.defineProperty(a,"currentTarget",{configurable:!0,enumerable:!0,get:function(){return k}});var f=Event.CAPTURING_PHASE,g=Object.getOwnPropertyDescriptor(a,"eventPhase");Object.defineProperty(a,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return f}});try{for(var h=b.length-1;0<=h;h--){var k=b[h];f=k===c[h]?Event.AT_TARGET:
|
|
259
|
-
Event.CAPTURING_PHASE;ce(a,k,"capture");if(a.ua)return}for(h=0;h<b.length;h++){k=b[h];var l=k===c[h];if(l||d)if(f=l?Event.AT_TARGET:Event.BUBBLING_PHASE,ce(a,k,"bubble"),a.ua)break}}finally{de||(e?Object.defineProperty(a,"currentTarget",e):delete a.currentTarget,g?Object.defineProperty(a,"eventPhase",g):delete a.eventPhase);}}function fe(a,b,c,d){for(var e=0;e<a.length;e++){var f=a[e],g=f.type,h=f.capture;if(b===f.node&&c===g&&d===h)return e}return -1}
|
|
260
|
-
function ge(a){id();return !M.ha&&this instanceof Node&&!Uc(document,this)?(a.__target||he(a,this),ee(a)):this.__shady_native_dispatchEvent(a)}
|
|
261
|
-
function ie(a,b,c){var d=this,e=Rd(c),f=e.capture,g=e.once,h=e.Pa;e=e.Na;if(b){var k=typeof b;if("function"===k||"object"===k)if("object"!==k||b.handleEvent&&"function"===typeof b.handleEvent){if(Td[a])return this.__shady_native_addEventListener(a,b,e);var l=h||this;if(h=b[Od]){if(-1<fe(h,l,a,f))return}else b[Od]=[];h=function(m){g&&d.__shady_removeEventListener(a,b,c);m.__target||he(m);if(l!==d){var q=Object.getOwnPropertyDescriptor(m,"currentTarget");Object.defineProperty(m,"currentTarget",{get:function(){return l},
|
|
262
|
-
configurable:!0});var H=Object.getOwnPropertyDescriptor(m,"eventPhase");Object.defineProperty(m,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return f?Event.CAPTURING_PHASE:Event.BUBBLING_PHASE}});}m.__previousCurrentTarget=m.currentTarget;if(!O(l)&&"slot"!==l.localName||-1!=m.composedPath().indexOf(l))if(m.composed||-1<m.composedPath().indexOf(l))if(be(m)&&m.target===m.relatedTarget)m.eventPhase===Event.BUBBLING_PHASE&&m.stopImmediatePropagation();else if(m.eventPhase===Event.CAPTURING_PHASE||
|
|
263
|
-
m.bubbles||m.target===l||l instanceof Window){var C="function"===k?b.call(l,m):b.handleEvent&&b.handleEvent(m);l!==d&&(q?(Object.defineProperty(m,"currentTarget",q),q=null):delete m.currentTarget,H?(Object.defineProperty(m,"eventPhase",H),H=null):delete m.eventPhase);return C}};b[Od].push({node:l,type:a,capture:f,ub:h});this.__handlers=this.__handlers||{};this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]};this.__handlers[a][f?"capture":"bubble"].push(h);ae[a]||this.__shady_native_addEventListener(a,
|
|
264
|
-
h,e);}}}function je(a,b,c){if(b){var d=Rd(c);c=d.capture;var e=d.Pa;d=d.Na;if(Td[a])return this.__shady_native_removeEventListener(a,b,d);var f=e||this;e=void 0;var g=null;try{g=b[Od];}catch(h){}g&&(f=fe(g,f,a,c),-1<f&&(e=g.splice(f,1)[0].ub,g.length||(b[Od]=void 0)));this.__shady_native_removeEventListener(a,e||b,d);e&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][c?"capture":"bubble"],b=a.indexOf(e),-1<b&&a.splice(b,1));}}
|
|
265
|
-
function ke(){for(var a in ae)window.__shady_native_addEventListener(a,function(b){b.__target||(he(b),ee(b));},!0);}var le=Q(Yd);function he(a,b){b=void 0===b?a.target:b;a.__target=b;a.__relatedTarget=a.relatedTarget;if(M.D){b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;P(c,le);b.__shady_patchedProto=c;}a.__proto__=b.__shady_patchedProto;}else P(a,le);}var me=$d(Event),ne=$d(CustomEvent),oe=$d(MouseEvent);
|
|
266
|
-
function pe(){if(!Pd&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var a=function(){var b=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(b);};Element.prototype.click?Element.prototype.click=a:HTMLElement.prototype.click&&(HTMLElement.prototype.click=a);}}
|
|
267
|
-
var qe=Object.getOwnPropertyNames(Element.prototype).filter(function(a){return "on"===a.substring(0,2)}),re=Object.getOwnPropertyNames(HTMLElement.prototype).filter(function(a){return "on"===a.substring(0,2)});function se(a){return {set:function(b){var c=D(this),d=a.substring(2);c.T||(c.T={});c.T[a]&&this.removeEventListener(d,c.T[a]);this.__shady_addEventListener(d,b);c.T[a]=b;},get:function(){var b=L(this);return b&&b.T&&b.T[a]},configurable:!0}};function te(a,b){return {index:a,ia:[],pa:b}}
|
|
268
|
-
function ue(a,b,c,d){var e=0,f=0,g=0,h=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<k;g++)if(a[g]!==c[g])break a;g=k;}if(b==a.length&&d==c.length){h=a.length;for(var l=c.length,m=0;m<k-g&&ve(a[--h],c[--l]);)m++;h=m;}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return [];if(e==b){for(b=te(e,0);f<d;)b.ia.push(c[f++]);return [b]}if(f==d)return [te(e,b-e)];k=e;g=f;d=d-g+1;h=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(h),b[l][0]=l;for(l=0;l<h;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<h;m++)if(a[k+m-1]===c[g+l-1])b[l][m]=
|
|
269
|
-
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;g=b[0].length-1;d=b[k][g];for(a=[];0<k||0<g;)0==k?(a.push(2),g--):0==g?(a.push(3),k--):(h=b[k-1][g-1],l=b[k-1][g],m=b[k][g-1],q=l<m?l<h?l:h:m<h?m:h,q==h?(h==d?a.push(0):(a.push(1),d=h),k--,g--):q==l?(a.push(3),k--,d=l):(a.push(2),g--,d=m));a.reverse();b=void 0;k=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=te(e,0));b.pa++;e++;b.ia.push(c[f]);f++;break;case 2:b||(b=te(e,
|
|
270
|
-
0));b.pa++;e++;break;case 3:b||(b=te(e,0)),b.ia.push(c[f]),f++;}b&&k.push(b);return k}function ve(a,b){return a===b};var we=Q({dispatchEvent:ge,addEventListener:ie,removeEventListener:je});var xe=null;function ye(){xe||(xe=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return xe||null}function ze(a,b,c){var d=ye();return d&&"class"===b?(d.setElementClass(a,c),!0):!1}function Ae(a,b){var c=ye();c&&c.unscopeNode(a,b);}function Be(a,b){var c=ye();if(!c)return !0;if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){c=!0;for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)c=c&&Be(a,b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b}
|
|
271
|
-
function Ce(a){if(a.nodeType!==Node.ELEMENT_NODE)return "";var b=ye();return b?b.currentScopeForNode(a):""}function De(a,b){if(a)for(a.nodeType===Node.ELEMENT_NODE&&b(a),a=a.__shady_firstChild;a;a=a.__shady_nextSibling)a.nodeType===Node.ELEMENT_NODE&&De(a,b);};var Ee=window.document,Fe=M.ha,Ge=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),Ie=Ge&&Ge.get;function Je(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b);}function Ke(a){var b=L(a);if(b&&void 0!==b.ta)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)Ke(b);if(a=L(a))a.ta=void 0;}function Le(a){var b=a;if(a&&"slot"===a.localName){var c=L(a);(c=c&&c.aa)&&(b=c.length?c[0]:Le(a.__shady_nextSibling));}return b}
|
|
272
|
-
function Me(a,b,c){if(a=(a=L(a))&&a.ga){if(b)if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var d=0,e=b.childNodes.length;d<e;d++)a.addedNodes.push(b.childNodes[d]);else a.addedNodes.push(b);c&&a.removedNodes.push(c);kd(a);}}
|
|
273
|
-
var Te=Q({get parentNode(){var a=L(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=L(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=L(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=L(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=L(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling},
|
|
274
|
-
get childNodes(){if(Lc(this)){var a=L(this);if(!a.childNodes){a.childNodes=[];for(var b=this.__shady_firstChild;b;b=b.__shady_nextSibling)a.childNodes.push(b);}var c=a.childNodes;}else c=this.__shady_native_childNodes;c.item=function(d){return c[d]};return c},get parentElement(){var a=L(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(Ie&&Ie.call(this))return !0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return !1;
|
|
275
|
-
var a=this.ownerDocument;if(null===a||Uc(a,this))return !0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(O(a)?a.host:void 0);return !!(a&&a instanceof Document)},get textContent(){if(Lc(this)){for(var a=[],b=this.__shady_firstChild;b;b=b.__shady_nextSibling)b.nodeType!==Node.COMMENT_NODE&&a.push(b.__shady_textContent);return a.join("")}return this.__shady_native_textContent},set textContent(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!Lc(this)&&
|
|
276
|
-
M.D){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&Je(this);this.__shady_native_textContent=a;}else Je(this),(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(a));break;default:this.nodeValue=a;}},insertBefore:function(a,b){if(this.ownerDocument!==Ee&&a.ownerDocument!==Ee)return this.__shady_native_insertBefore(a,b),a;if(a===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");
|
|
277
|
-
if(b){var c=L(b);c=c&&c.parentNode;if(void 0!==c&&c!==this||void 0===c&&b.__shady_native_parentNode!==this)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(b===a)return a;Me(this,a);var d=[],e=(c=Ne(this))?c.host.localName:Ce(this),f=a.__shady_parentNode;if(f){var g=Ce(a);var h=!!c||!Ne(a)||Fe&&void 0!==this.__noInsertionPoint;f.__shady_removeChild(a,h);}f=!0;var k=(!Fe||void 0===a.__noInsertionPoint&&void 0===
|
|
278
|
-
this.__noInsertionPoint)&&!Be(a,e),l=c&&!a.__noInsertionPoint&&(!Fe||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(l||k)k&&(g=g||Ce(a)),De(a,function(m){l&&"slot"===m.localName&&d.push(m);if(k){var q=g;ye()&&(q&&Ae(m,q),(q=ye())&&q.scopeNode(m,e));}});d.length&&(Oe(c),c.i.push.apply(c.i,w(d)),Pe(c));Lc(this)&&(Qe(a,this,b),h=L(this),h.root?(f=!1,Mc(this)&&Pe(h.root)):c&&"slot"===this.localName&&(f=!1,Pe(c)));f?(c=O(this)?this.host:this,b?(b=Le(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)):
|
|
279
|
-
a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);return a},appendChild:function(a){if(this!=a||!O(a))return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==Ee)return this.__shady_native_removeChild(a);if(a.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+a);Me(this,null,a);var c=Ne(a),d=c&&Re(c,a),e=L(this);if(Lc(this)&&(Se(a,this),Mc(this))){Pe(e.root);var f=!0;}if(ye()&&!b&&c&&a.nodeType!==
|
|
280
|
-
Node.TEXT_NODE){var g=Ce(a);De(a,function(h){Ae(h,g);});}Ke(a);c&&((b="slot"===this.localName)&&(f=!0),(d||b)&&Pe(c));f||(f=O(this)?this.host:this,(!e.root&&"slot"!==a.localName||f===a.__shady_native_parentNode)&&f.__shady_native_removeChild(a));return a},replaceChild:function(a,b){this.__shady_insertBefore(a,b);this.__shady_removeChild(b);return a},cloneNode:function(a){if("template"==this.localName)return this.__shady_native_cloneNode(a);var b=this.__shady_native_cloneNode(!1);if(a&&b.nodeType!==
|
|
281
|
-
Node.ATTRIBUTE_NODE){a=this.__shady_firstChild;for(var c;a;a=a.__shady_nextSibling)c=a.__shady_cloneNode(!0),b.__shady_appendChild(c);}return b},getRootNode:function(a){if(this&&this.nodeType){var b=D(this),c=b.ta;void 0===c&&(O(this)?(c=this,b.ta=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.ta=c)));return c}},contains:function(a){return Vc(this,a)}});var Ve=Q({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&Ue(a);return (a=L(this))&&a.assignedSlot||null}});/*
|
|
282
|
-
|
|
283
|
-
Copyright (c) 2022 The Polymer Project Authors
|
|
284
|
-
SPDX-License-Identifier: BSD-3-Clause
|
|
285
|
-
*/
|
|
286
|
-
var We=new Map;[["(",{end:")",sa:!0}],["[",{end:"]",sa:!0}],['"',{end:'"',sa:!1}],["'",{end:"'",sa:!1}]].forEach(function(a){var b=ka(a);a=b.next().value;b=b.next().value;We.set(a,b);});function Xe(a,b,c,d){for(d=void 0===d?!0:d;b<a.length;b++)if("\\"===a[b]&&b<a.length-1&&"\n"!==a[b+1])b++;else {if(-1!==c.indexOf(a[b]))return b;if(d&&We.has(a[b])){var e=We.get(a[b]);b=Xe(a,b+1,[e.end],e.sa);}}return a.length}
|
|
287
|
-
function Ye(a){function b(){if(0<d.length){for(;" "===d[d.length-1];)d.pop();c.push({La:d.filter(function(k,l){return 0===l%2}),Za:d.filter(function(k,l){return 1===l%2})});d.length=0;}}for(var c=[],d=[],e=0;e<a.length;){var f=d[d.length-1],g=Xe(a,e,[","," ",">","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0);}b();return c};function Ze(a,b,c){var d=[];$e(a,b,c,d);return d}function $e(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:($e(e,f,g,h),e=void 0);}if(e)break}}
|
|
288
|
-
var af={get firstElementChild(){var a=L(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=L(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return Lc(this)?Wc(Array.prototype.filter.call(Yc(this),
|
|
289
|
-
function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},bf=Q((af.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];this.__shady_insertBefore(cd.apply(null,w(b)),null);},af.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];this.__shady_insertBefore(cd.apply(null,w(b)),this.__shady_firstChild);},af.replaceChildren=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=
|
|
290
|
-
arguments[c];for(;null!==(c=this.__shady_firstChild);)this.__shady_removeChild(c);this.__shady_insertBefore(cd.apply(null,w(b)),null);},af));
|
|
291
|
-
function cf(a,b){function c(e,f){return (e===a||-1===f.indexOf(":scope"))&&Pc.call(e,f)}var d=Ye(b);if(1>d.length)return [];for(b=dd(Ze(a,function(){return !0}).map(function(e){return dd(d.map(function(f){var g=f.La,h=g.length-1;return c(e,g[h])?{target:e,da:f,fa:e,index:h}:[]}))}));b.some(function(e){return 0<e.index});)b=dd(b.map(function(e){if(0>=e.index)return e;var f=e.target,g=e.fa,h=e.da;e=e.index-1;var k=h.Za[e],l=h.La[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g,
|
|
292
|
-
l)&&k.push({target:f,da:h,fa:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("+"===k)return (g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,da:h,fa:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return ed(b.map(function(e){return e.target}))}
|
|
293
|
-
var df=M.querySelectorImplementation,ef=Q({querySelector:function(a){if("native"===df){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=ka(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===df)return cf(this,a)[0]||null;if(void 0===df)return Ze(this,function(e){return Pc.call(e,a)},function(e){return !!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+
|
|
294
|
-
(df+"'"));},querySelectorAll:function(a,b){if(b||"native"===df){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return Wc(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===df)return Wc(cf(this,a));if(void 0===df)return Wc(Ze(this,function(d){return Pc.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(df+"'"));}}),ff=M.ha&&!M.J?ad({},bf):
|
|
295
|
-
bf;ad(bf,ef);var gf=Q({after:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];c=this.__shady_parentNode;if(null!==c){var d=this.__shady_nextSibling;c.__shady_insertBefore(cd.apply(null,w(b)),d);}},before:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];c=this.__shady_parentNode;null!==c&&c.__shady_insertBefore(cd.apply(null,w(b)),this);},remove:function(){var a=this.__shady_parentNode;null!==a&&a.__shady_removeChild(this);},replaceWith:function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=
|
|
296
|
-
arguments[c];c=this.__shady_parentNode;if(null!==c){var d=this.__shady_nextSibling;c.__shady_removeChild(this);c.__shady_insertBefore(cd.apply(null,w(b)),d);}}});var hf=window.document;function jf(a,b){if("slot"===b)a=a.__shady_parentNode,Mc(a)&&Pe(L(a).root);else if("slot"===a.localName&&"name"===b&&(b=Ne(a))){if(b.g){kf(b);var c=a.Ua,d=lf(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]=mf(c));}}Pe(b);}}
|
|
297
|
-
var nf=Q({get previousElementSibling(){var a=L(this);if(a&&void 0!==a.previousSibling){for(a=this.__shady_previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_previousElementSibling},get nextElementSibling(){var a=L(this);if(a&&void 0!==a.nextSibling){for(a=this.__shady_nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")},
|
|
298
|
-
set slot(a){this.__shady_setAttribute("slot",a);},get className(){return this.getAttribute("class")||""},set className(a){this.__shady_setAttribute("class",a);},setAttribute:function(a,b){this.ownerDocument!==hf?this.__shady_native_setAttribute(a,b):ze(this,a,b)||(this.__shady_native_setAttribute(a,b),jf(this,a));},removeAttribute:function(a){this.ownerDocument!==hf?this.__shady_native_removeAttribute(a):ze(this,a,"")?""===this.getAttribute(a)&&this.__shady_native_removeAttribute(a):(this.__shady_native_removeAttribute(a),
|
|
299
|
-
jf(this,a));},toggleAttribute:function(a,b){if(this.ownerDocument!==hf)return this.__shady_native_toggleAttribute(a,b);if(!ze(this,a,""))return b=this.__shady_native_toggleAttribute(a,b),jf(this,a),b;if(""===this.getAttribute(a)&&!b)return this.__shady_native_toggleAttribute(a,b)}});M.ha||qe.forEach(function(a){nf[a]=se(a);});
|
|
300
|
-
var sf=Q({attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!M.Ra){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;of(b,this,a);pf(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;if(a&&a.length){var c=b;Oe(c);c.i.push.apply(c.i,w(a));Pe(b);}b.host.__shady_native_appendChild(b);}else b=new qf(rf,this,a);return this.__CE_shadowRoot=b},get shadowRoot(){var a=L(this);
|
|
301
|
-
return a&&a.lb||null}});ad(nf,sf);var tf=document.implementation.createHTMLDocument("inert"),uf=Q({get innerHTML(){return Lc(this)?ud("template"===this.localName?this.content:this,Yc):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else {Je(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==tf.namespaceURI?tf.createElementNS(this.namespaceURI,b):tf.createElement(b);for(M.D?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a);}}});var vf=Q({blur:function(){var a=L(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur();}});M.ha||re.forEach(function(a){vf[a]=se(a);});var wf=Q({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&O(b)&&Ue(b);return (b=L(this))?(a&&a.flatten?b.aa:b.assignedNodes)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)ie.call(this,a,b,c);else {"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.U=this;d.__shady_addEventListener(a,b,c);}},removeEventListener:function(a,
|
|
302
|
-
b,c){if("slot"!==this.localName||"slotchange"===a)je.call(this,a,b,c);else {"object"!==typeof c&&(c={capture:!!c});var d=this.__shady_parentNode;if(!d)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");c.U=this;d.__shady_removeEventListener(a,b,c);}}});var xf=Q({getElementById:function(a){return ""===a?null:Ze(this,function(b){return b.id==a},function(b){return !!b})[0]||null}});function yf(a,b){for(var c;b&&!a.has(c=b.__shady_getRootNode());)b=c.host;return b}function zf(a){var b=new Set;for(b.add(a);O(a)&&a.host;)a=a.host.__shady_getRootNode(),b.add(a);return b}
|
|
303
|
-
var Af="__shady_native_"+Jc(),Bf=Q({get activeElement(){var a=M.D?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!O(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=Ne(a);b&&b!==this;)a=b.host,b=Ne(a);return this===document?b?null:a:b===this?a:null},elementsFromPoint:function(a,b){a=document[Af](a,b);if(this===document&&M.useNativeDocumentEFP)return a;a=[].slice.call(a);b=zf(this);for(var c=new Set,
|
|
304
|
-
d=0;d<a.length;d++)c.add(yf(b,a[d]));var e=[];c.forEach(function(f){return e.push(f)});return e},elementFromPoint:function(a,b){return this===document&&M.useNativeDocumentEFP?this.__shady_native_elementFromPoint(a,b):this.__shady_elementsFromPoint(a,b)[0]||null}});var Cf=window.document,Df=Q({importNode:function(a,b){if(a.ownerDocument!==Cf||"template"===a.localName)return this.__shady_native_importNode(a,b);var c=this.__shady_native_importNode(a,!1);if(b)for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b=this.__shady_importNode(a,!0),c.__shady_appendChild(b);return c}});var Ef=Q({dispatchEvent:ge,addEventListener:ie.bind(window),removeEventListener:je.bind(window)});var Ff={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Ff.parentElement=Te.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Ff.contains=Te.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Ff.children=bf.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Ff.innerHTML=uf.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Ff.className=nf.className);
|
|
305
|
-
var Gf={EventTarget:[we],Node:[Te,window.EventTarget?null:we],Text:[Ve],Comment:[Ve],CDATASection:[Ve],ProcessingInstruction:[Ve],Element:[nf,bf,gf,Ve,!M.D||"innerHTML"in Element.prototype?uf:null,window.HTMLSlotElement?null:wf],HTMLElement:[vf,Ff],HTMLSlotElement:[wf],DocumentFragment:[ff,xf],Document:[Df,ff,xf,Bf],Window:[Ef],CharacterData:[gf],XMLHttpRequest:[window.EventTarget?null:we]},Hf=M.D?null:["innerHTML","textContent"];
|
|
306
|
-
function If(a,b,c,d){b.forEach(function(e){return a&&e&&P(a,e,c,d)});}function Jf(a){var b=a?null:Hf,c;for(c in Gf)If(window[c]&&window[c].prototype,Gf[c],a,b);}["Text","Comment","CDATASection","ProcessingInstruction"].forEach(function(a){var b=window[a],c=Object.create(b.prototype);c.__shady_protoIsPatched=!0;If(c,Gf.EventTarget);If(c,Gf.Node);Gf[a]&&If(c,Gf[a]);b.prototype.__shady_patchedProto=c;});
|
|
307
|
-
function Kf(a){a.__shady_protoIsPatched=!0;If(a,Gf.EventTarget);If(a,Gf.Node);If(a,Gf.Element);If(a,Gf.HTMLElement);If(a,Gf.HTMLSlotElement);return a};var Lf=M.Da,Mf=M.D;function Nf(a,b){if(Lf&&!a.__shady_protoIsPatched&&!O(a)){var c=Object.getPrototypeOf(a),d=c.hasOwnProperty("__shady_patchedProto")&&c.__shady_patchedProto;d||(d=Object.create(c),Kf(d),c.__shady_patchedProto=d);Object.setPrototypeOf(a,d);}Mf||(1===b?Md(a):2===b&&Nd(a));}
|
|
308
|
-
function Of(a,b,c,d){Nf(a,1);d=d||null;var e=D(a),f=d?D(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=L(e.previousSibling))f.nextSibling=a;if(f=L(e.nextSibling=d))f.previousSibling=a;e.parentNode=b;d?d===c.firstChild&&(c.firstChild=a):(c.lastChild=a,c.firstChild||(c.firstChild=a));c.childNodes=null;}
|
|
309
|
-
function Qe(a,b,c){Nf(b,2);var d=D(b);void 0!==d.firstChild&&(d.childNodes=null);if(a.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)Of(a,b,d,c);else Of(a,b,d,c);}
|
|
310
|
-
function Se(a,b){var c=D(a);b=D(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(D(a).nextSibling=d);d&&(D(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null);}
|
|
311
|
-
function pf(a,b){var c=D(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;Nf(a,2);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=D(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;Nf(c,1);}}};var Pf=Q({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.U=c.U||this;this.host.__shady_addEventListener(a,b,c);},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.U=c.U||this;this.host.__shady_removeEventListener(a,b,c);}});function Qf(a,b){P(a,Pf,b);P(a,Bf,b);P(a,uf,b);P(a,bf,b);M.J&&!b?(P(a,Te,b),P(a,xf,b)):M.D||(P(a,Jd),P(a,Hd),P(a,Id));};var rf={},Rf=M.deferConnectionCallbacks&&"loading"===document.readyState,Sf;function Tf(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function qf(a,b,c){if(a!==rf)throw new TypeError("Illegal constructor");this.g=null;of(this,b,c);}
|
|
312
|
-
function of(a,b,c){a.host=b;a.mode=c&&c.mode;pf(a.host);b=D(a.host);b.root=a;b.lb="closed"!==a.mode?a:null;b=D(a);b.firstChild=b.lastChild=b.parentNode=b.nextSibling=b.previousSibling=null;if(M.preferPerformance)for(;b=a.host.__shady_native_firstChild;)a.host.__shady_native_removeChild(b);else Pe(a);}function Pe(a){a.Y||(a.Y=!0,hd(function(){return Ue(a)}));}
|
|
313
|
-
function Ue(a){var b;if(b=a.Y){for(var c;a;)a:{a.Y&&(c=a),b=a;a=b.host.__shady_getRootNode();if(O(a)&&(b=L(b.host))&&0<b.ka)break a;a=void 0;}b=c;}(c=b)&&c._renderSelf();}
|
|
314
|
-
qf.prototype._renderSelf=function(){var a=Rf;Rf=!0;this.Y=!1;if(this.g){kf(this);for(var b=0,c;b<this.g.length;b++){c=this.g[b];var d=L(c),e=d.assignedNodes;d.assignedNodes=[];d.aa=[];if(d.Ja=e)for(d=0;d<e.length;d++){var f=L(e[d]);f.xa=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null);}}for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)Uf(this,b);for(b=0;b<this.g.length;b++){c=this.g[b];e=L(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)Uf(this,
|
|
315
|
-
d,c);(d=(d=L(c.__shady_parentNode))&&d.root)&&(Nc(d)||d.Y)&&d._renderSelf();Vf(this,e.aa,e.assignedNodes);if(d=e.Ja){for(f=0;f<d.length;f++)L(d[f]).xa=null;e.Ja=null;d.length>e.assignedNodes.length&&(e.Aa=!0);}e.Aa&&(e.Aa=!1,Wf(this,c));}c=this.g;b=[];for(e=0;e<c.length;e++)d=c[e].__shady_parentNode,(f=L(d))&&f.root||!(0>b.indexOf(d))||b.push(d);for(c=0;c<b.length;c++){f=b[c];e=f===this?this.host:f;d=[];for(f=f.__shady_firstChild;f;f=f.__shady_nextSibling)if("slot"==f.localName)for(var g=L(f).aa,h=
|
|
316
|
-
0;h<g.length;h++)d.push(g[h]);else d.push(f);f=Xc(e);g=ue(d,d.length,f,f.length);for(var k=h=0,l=void 0;h<g.length&&(l=g[h]);h++){for(var m=0,q=void 0;m<l.ia.length&&(q=l.ia[m]);m++)q.__shady_native_parentNode===e&&e.__shady_native_removeChild(q),f.splice(l.index+k,1);k-=l.pa;}k=0;for(l=void 0;k<g.length&&(l=g[k]);k++)for(h=f[l.index],m=l.index;m<l.index+l.pa;m++)q=d[m],e.__shady_native_insertBefore(q,h),f.splice(m,0,q);}}if(!M.preferPerformance&&!this.Ia)for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)c=
|
|
317
|
-
L(b),b.__shady_native_parentNode!==this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b);this.Ia=!0;Rf=a;Sf&&Sf();};function Uf(a,b,c){var d=D(b),e=d.xa;d.xa=null;c||(c=(a=a.h[b.__shady_slot||"__catchall"])&&a[0]);c?(D(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(D(d.assignedSlot).Aa=!0);}
|
|
318
|
-
function Vf(a,b,c){for(var d=0,e=void 0;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=L(e).assignedNodes;f&&f.length&&Vf(a,b,f);}else b.push(c[d]);}function Wf(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=L(b);b.assignedSlot&&Wf(a,b.assignedSlot);}function Oe(a){a.i=a.i||[];a.g=a.g||[];a.h=a.h||{};}
|
|
319
|
-
function kf(a){if(a.i&&a.i.length){for(var b=a.i,c,d=0;d<b.length;d++){var e=b[d];pf(e);var f=e.__shady_parentNode;pf(f);f=L(f);f.ka=(f.ka||0)+1;f=lf(e);a.h[f]?(c=c||{},c[f]=!0,a.h[f].push(e)):a.h[f]=[e];a.g.push(e);}if(c)for(var g in c)a.h[g]=mf(a.h[g]);a.i=[];}}function lf(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ua=b}
|
|
320
|
-
function mf(a){return a.sort(function(b,c){b=Tf(b);for(var d=Tf(c),e=0;e<b.length;e++){c=b[e];var f=d[e];if(c!==f)return b=Yc(c.__shady_parentNode),b.indexOf(c)-b.indexOf(f)}})}
|
|
321
|
-
function Re(a,b){if(a.g){kf(a);var c=a.h,d;for(d in c)for(var e=c[d],f=0;f<e.length;f++){var g=e[f];if(Vc(b,g)){e.splice(f,1);var h=a.g.indexOf(g);0<=h&&(a.g.splice(h,1),(h=L(g.__shady_parentNode))&&h.ka&&h.ka--);f--;g=L(g);if(h=g.aa)for(var k=0;k<h.length;k++){var l=h[k],m=l.__shady_native_parentNode;m&&m.__shady_native_removeChild(l);}g.aa=[];g.assignedNodes=[];h=!0;}}return h}}function Nc(a){kf(a);return !(!a.g||!a.g.length)}
|
|
322
|
-
(function(a){a.__proto__=DocumentFragment.prototype;Qf(a,"__shady_");Qf(a);Object.defineProperties(a,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}});["localName","namespaceURI","prefix"].forEach(function(b){Object.defineProperty(a,b,{value:void 0,configurable:!0});});["ownerDocument","baseURI","isConnected"].forEach(function(b){Object.defineProperty(a,b,{get:function(){return this.host[b]},
|
|
323
|
-
configurable:!0});});})(qf.prototype);
|
|
324
|
-
if(window.customElements&&window.customElements.define&&M.Ba&&!M.preferPerformance){var Xf=new Map;Sf=function(){var a=[];Xf.forEach(function(d,e){a.push([e,d]);});Xf.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback();}};Rf&&document.addEventListener("readystatechange",function(){Rf=!1;Sf();},{once:!0});var Yf=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback=
|
|
325
|
-
function(){Rf?Xf.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this));},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){Rf?this.isConnected||Xf.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this));};return a},Zf=window.customElements.define,$f=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;Zf.call(window.customElements,a,Yf(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d;};window.customElements.define=
|
|
326
|
-
$f;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:$f,configurable:!0});}function Ne(a){a=a.__shady_getRootNode();if(O(a))return a};function ag(a){this.node=a;}v=ag.prototype;v.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};v.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};v.appendChild=function(a){return this.node.__shady_appendChild(a)};v.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};v.removeChild=function(a){return this.node.__shady_removeChild(a)};v.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)};
|
|
327
|
-
v.cloneNode=function(a){return this.node.__shady_cloneNode(a)};v.getRootNode=function(a){return this.node.__shady_getRootNode(a)};v.contains=function(a){return this.node.__shady_contains(a)};v.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};v.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b);};v.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};v.hasAttribute=function(a){return this.node.__shady_native_hasAttribute(a)};v.removeAttribute=function(a){this.node.__shady_removeAttribute(a);};
|
|
328
|
-
v.toggleAttribute=function(a,b){return this.node.__shady_toggleAttribute(a,b)};v.attachShadow=function(a){return this.node.__shady_attachShadow(a)};v.focus=function(){this.node.__shady_native_focus();};v.blur=function(){this.node.__shady_blur();};v.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};v.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)};
|
|
329
|
-
v.elementsFromPoint=function(a,b){return this.node.__shady_elementsFromPoint(a,b)};v.elementFromPoint=function(a,b){return this.node.__shady_elementFromPoint(a,b)};v.querySelector=function(a){return this.node.__shady_querySelector(a)};v.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)};v.assignedNodes=function(a){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(a)};
|
|
330
|
-
v.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_append.apply(this.node,w(b))};v.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_prepend.apply(this.node,w(b))};v.after=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_after.apply(this.node,w(b))};
|
|
331
|
-
v.before=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_before.apply(this.node,w(b))};v.remove=function(){return this.node.__shady_remove()};v.replaceWith=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_replaceWith.apply(this.node,w(b))};
|
|
332
|
-
ea.Object.defineProperties(ag.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(O(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(O(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0,
|
|
333
|
-
enumerable:!0,get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0,
|
|
334
|
-
get:function(){return this.node.__shady_parentElement}},firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}},
|
|
335
|
-
children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}},childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,
|
|
336
|
-
enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(a){this.node.__shady_innerHTML=a;}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(a){this.node.__shady_textContent=a;}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(a){this.node.__shady_slot=a;}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(a){this.node.__shady_className=
|
|
337
|
-
a;}}});function bg(a){Object.defineProperty(ag.prototype,a,{get:function(){return this.node["__shady_"+a]},set:function(b){this.node["__shady_"+a]=b;},configurable:!0});}qe.forEach(function(a){return bg(a)});re.forEach(function(a){return bg(a)});var cg=new WeakMap;function dg(a){if(O(a)||a instanceof ag)return a;var b=cg.get(a);b||(b=new ag(a),cg.set(a,b));return b};if(M.Ba){var eg=M.D?function(a){return a}:function(a){Nd(a);Md(a);return a},ShadyDOM={inUse:M.Ba,patch:eg,isShadyRoot:O,enqueue:hd,flush:id,flushInitial:function(a){!a.Ia&&a.Y&&Ue(a);},settings:M,filterMutations:nd,observeChildren:ld,unobserveChildren:md,deferConnectionCallbacks:M.deferConnectionCallbacks,preferPerformance:M.preferPerformance,handlesDynamicScoping:!0,wrap:M.J?dg:eg,wrapIfNeeded:!0===M.J?dg:function(a){return a},Wrapper:ag,composedPath:Wd,noPatch:M.J,patchOnDemand:M.Da,nativeMethods:wd,
|
|
338
|
-
nativeTree:xd,patchElementProto:Kf,querySelectorImplementation:M.querySelectorImplementation};window.ShadyDOM=ShadyDOM;Gd();Jf("__shady_");Object.defineProperty(document,"_activeElement",Bf.activeElement);P(Window.prototype,Ef,"__shady_");M.J?M.Da&&P(Element.prototype,sf):(Jf(),pe());ke();window.Event=me;window.CustomEvent=ne;window.MouseEvent=oe;window.ShadowRoot=qf;};var fg=window.Document.prototype.createElement,gg=window.Document.prototype.createElementNS,hg=window.Document.prototype.importNode,ig=window.Document.prototype.prepend,jg=window.Document.prototype.append,kg=window.DocumentFragment.prototype.prepend,lg=window.DocumentFragment.prototype.append,mg=window.Node.prototype.cloneNode,ng=window.Node.prototype.appendChild,og=window.Node.prototype.insertBefore,pg=window.Node.prototype.removeChild,qg=window.Node.prototype.replaceChild,rg=Object.getOwnPropertyDescriptor(window.Node.prototype,
|
|
339
|
-
"textContent"),sg=window.Element.prototype.attachShadow,tg=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),ug=window.Element.prototype.getAttribute,vg=window.Element.prototype.setAttribute,wg=window.Element.prototype.removeAttribute,xg=window.Element.prototype.toggleAttribute,yg=window.Element.prototype.getAttributeNS,zg=window.Element.prototype.setAttributeNS,Ag=window.Element.prototype.removeAttributeNS,Bg=window.Element.prototype.insertAdjacentElement,Cg=window.Element.prototype.insertAdjacentHTML,
|
|
340
|
-
Dg=window.Element.prototype.prepend,Eg=window.Element.prototype.append,Fg=window.Element.prototype.before,Gg=window.Element.prototype.after,Hg=window.Element.prototype.replaceWith,Ig=window.Element.prototype.remove,Jg=window.HTMLElement,Kg=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Lg=window.HTMLElement.prototype.insertAdjacentElement,Mg=window.HTMLElement.prototype.insertAdjacentHTML;var Ng=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(a){return Ng.add(a)});function Og(a){var b=Ng.has(a);a=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(a);return !b&&a}var Pg=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);
|
|
341
|
-
function T(a){var b=a.isConnected;if(void 0!==b)return b;if(Pg(a))return !0;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 Qg(a){var b=a.children;if(b)return Array.prototype.slice.call(b);b=[];for(a=a.firstChild;a;a=a.nextSibling)a.nodeType===Node.ELEMENT_NODE&&b.push(a);return b}
|
|
342
|
-
function Rg(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null}
|
|
343
|
-
function Sg(a,b,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;void 0===c&&(c=new Set);if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)Sg(d,b,c);d=Rg(a,e);continue}else if("template"===f){d=Rg(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)Sg(e,b,c);}d=d.firstChild?d.firstChild:Rg(a,d);}};function Tg(){var a=!(null===Ug||void 0===Ug||!Ug.noDocumentConstructionObserver),b=!(null===Ug||void 0===Ug||!Ug.shadyDomFastWalk);this.ca=[];this.g=[];this.W=!1;this.shadyDomFastWalk=b;this.sb=!a;}function Vg(a,b,c,d){var e=window.ShadyDOM;if(a.shadyDomFastWalk&&e&&e.inUse){if(b.nodeType===Node.ELEMENT_NODE&&c(b),b.querySelectorAll)for(a=e.nativeMethods.querySelectorAll.call(b,"*"),b=0;b<a.length;b++)c(a[b]);}else Sg(b,c,d);}function Wg(a,b){a.W=!0;a.ca.push(b);}
|
|
344
|
-
function Xg(a,b){a.W=!0;a.g.push(b);}function Yg(a,b){a.W&&Vg(a,b,function(c){return Zg(a,c)});}function Zg(a,b){if(a.W&&!b.__CE_patched){b.__CE_patched=!0;for(var c=0;c<a.ca.length;c++)a.ca[c](b);for(c=0;c<a.g.length;c++)a.g[c](b);}}function $g(a,b){var c=[];Vg(a,b,function(e){return c.push(e)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):ah(a,d);}}
|
|
345
|
-
function bh(a,b){var c=[];Vg(a,b,function(e){return c.push(e)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d);}}
|
|
346
|
-
function ch(a,b,c){c=void 0===c?{}:c;var d=c.tb,e=c.upgrade||function(g){return ah(a,g)},f=[];Vg(a,b,function(g){a.W&&Zg(a,g);if("link"===g.localName&&"import"===g.getAttribute("rel")){var h=g.import;h instanceof Node&&(h.__CE_isImportDocument=!0,h.__CE_registry=document.__CE_registry);h&&"complete"===h.readyState?h.__CE_documentLoadHandled=!0:g.addEventListener("load",function(){var k=g.import;if(!k.__CE_documentLoadHandled){k.__CE_documentLoadHandled=!0;var l=new Set;d&&(d.forEach(function(m){return l.add(m)}),
|
|
347
|
-
l.delete(k));ch(a,k,{tb:l,upgrade:e});}});}else f.push(g);},d);for(b=0;b<f.length;b++)e(f[b]);}
|
|
348
|
-
function ah(a,b){try{var c=b.ownerDocument,d=c.__CE_registry;var e=d&&(c.defaultView||c.__CE_isImportDocument)?dh(d,b.localName):void 0;if(e&&void 0===b.__CE_state){e.constructionStack.push(b);try{try{if(new e.constructorFunction!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{e.constructionStack.pop();}}catch(k){throw b.__CE_state=2,k;}b.__CE_state=1;b.__CE_definition=e;if(e.attributeChangedCallback&&b.hasAttributes()){var f=e.observedAttributes;
|
|
349
|
-
for(e=0;e<f.length;e++){var g=f[e],h=b.getAttribute(g);null!==h&&a.attributeChangedCallback(b,g,null,h,null);}}T(b)&&a.connectedCallback(b);}}catch(k){eh(k);}}Tg.prototype.connectedCallback=function(a){var b=a.__CE_definition;if(b.connectedCallback)try{b.connectedCallback.call(a);}catch(c){eh(c);}};Tg.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;if(b.disconnectedCallback)try{b.disconnectedCallback.call(a);}catch(c){eh(c);}};
|
|
350
|
-
Tg.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;if(f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b))try{f.attributeChangedCallback.call(a,b,c,d,e);}catch(g){eh(g);}};
|
|
351
|
-
function fh(a,b,c,d){var e=b.__CE_registry;if(e&&(null===d||"http://www.w3.org/1999/xhtml"===d)&&(e=dh(e,c)))try{var f=new e.constructorFunction;if(void 0===f.__CE_state||void 0===f.__CE_definition)throw Error("Failed to construct '"+c+"': The returned value was not constructed with the HTMLElement constructor.");if("http://www.w3.org/1999/xhtml"!==f.namespaceURI)throw Error("Failed to construct '"+c+"': The constructed element's namespace must be the HTML namespace.");if(f.hasAttributes())throw Error("Failed to construct '"+
|
|
352
|
-
c+"': The constructed element must not have any attributes.");if(null!==f.firstChild)throw Error("Failed to construct '"+c+"': The constructed element must not have any children.");if(null!==f.parentNode)throw Error("Failed to construct '"+c+"': The constructed element must not have a parent node.");if(f.ownerDocument!==b)throw Error("Failed to construct '"+c+"': The constructed element's owner document is incorrect.");if(f.localName!==c)throw Error("Failed to construct '"+c+"': The constructed element's local name is incorrect.");
|
|
353
|
-
return f}catch(g){return eh(g),b=null===d?fg.call(b,c):gg.call(b,d,c),Object.setPrototypeOf(b,HTMLUnknownElement.prototype),b.__CE_state=2,b.__CE_definition=void 0,Zg(a,b),b}b=null===d?fg.call(b,c):gg.call(b,d,c);Zg(a,b);return b}
|
|
354
|
-
function eh(a){var b="",c="",d=0,e=0;a instanceof Error?(b=a.message,c=a.sourceURL||a.fileName||"",d=a.line||a.lineNumber||0,e=a.column||a.columnNumber||0):b="Uncaught "+String(a);var f=void 0;void 0===ErrorEvent.prototype.initErrorEvent?f=new ErrorEvent("error",{cancelable:!0,message:b,filename:c,lineno:d,colno:e,error:a}):(f=document.createEvent("ErrorEvent"),f.initErrorEvent("error",!1,!0,b,c,d),f.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return !0}});});
|
|
355
|
-
void 0===f.error&&Object.defineProperty(f,"error",{configurable:!0,enumerable:!0,get:function(){return a}});window.dispatchEvent(f);f.defaultPrevented||console.error(a);};function gh(){var a=this;this.I=void 0;this.Ka=new Promise(function(b){a.g=b;});}gh.prototype.resolve=function(a){if(this.I)throw Error("Already resolved.");this.I=a;this.g(a);};function hh(a){var b=document;this.X=void 0;this.S=a;this.g=b;ch(this.S,this.g);"loading"===this.g.readyState&&(this.X=new MutationObserver(this.h.bind(this)),this.X.observe(this.g,{childList:!0,subtree:!0}));}function ih(a){a.X&&a.X.disconnect();}hh.prototype.h=function(a){var b=this.g.readyState;"interactive"!==b&&"complete"!==b||ih(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)ch(this.S,c[d]);};function U(a){this.ma=new Map;this.na=new Map;this.Fa=new Map;this.wa=!1;this.za=new Map;this.la=function(b){return b()};this.V=!1;this.oa=[];this.S=a;this.Ga=a.sb?new hh(a):void 0;}v=U.prototype;v.jb=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructor getters must be functions.");jh(this,a);this.ma.set(a,b);this.oa.push(a);this.V||(this.V=!0,this.la(function(){return kh(c)}));};
|
|
356
|
-
v.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");jh(this,a);lh(this,a,b);this.oa.push(a);this.V||(this.V=!0,this.la(function(){return kh(c)}));};function jh(a,b){if(!Og(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(dh(a,b))throw Error("A custom element with name '"+(b+"' has already been defined."));if(a.wa)throw Error("A custom element is already being defined.");}
|
|
357
|
-
function lh(a,b,c){a.wa=!0;var d;try{var e=c.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=function(m){var q=e[m];if(void 0!==q&&!(q instanceof Function))throw Error("The '"+m+"' callback must be a function.");return q};var g=f("connectedCallback");var h=f("disconnectedCallback");var k=f("adoptedCallback");var l=(d=f("attributeChangedCallback"))&&c.observedAttributes||[];}catch(m){throw m;}finally{a.wa=!1;}c={localName:b,
|
|
358
|
-
constructorFunction:c,connectedCallback:g,disconnectedCallback:h,adoptedCallback:k,attributeChangedCallback:d,observedAttributes:l,constructionStack:[]};a.na.set(b,c);a.Fa.set(c.constructorFunction,c);return c}v.upgrade=function(a){ch(this.S,a);};
|
|
359
|
-
function kh(a){if(!1!==a.V){a.V=!1;for(var b=[],c=a.oa,d=new Map,e=0;e<c.length;e++)d.set(c[e],[]);ch(a.S,document,{upgrade:function(k){if(void 0===k.__CE_state){var l=k.localName,m=d.get(l);m?m.push(k):a.na.has(l)&&b.push(k);}}});for(e=0;e<b.length;e++)ah(a.S,b[e]);for(e=0;e<c.length;e++){for(var f=c[e],g=d.get(f),h=0;h<g.length;h++)ah(a.S,g[h]);(f=a.za.get(f))&&f.resolve(void 0);}c.length=0;}}v.get=function(a){if(a=dh(this,a))return a.constructorFunction};
|
|
360
|
-
v.whenDefined=function(a){if(!Og(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.za.get(a);if(b)return b.Ka;b=new gh;this.za.set(a,b);var c=this.na.has(a)||this.ma.has(a);a=-1===this.oa.indexOf(a);c&&a&&b.resolve(void 0);return b.Ka};v.polyfillWrapFlushCallback=function(a){this.Ga&&ih(this.Ga);var b=this.la;this.la=function(c){return a(function(){return b(c)})};};
|
|
361
|
-
function dh(a,b){var c=a.na.get(b);if(c)return c;if(c=a.ma.get(b)){a.ma.delete(b);try{return lh(a,b,c())}catch(d){eh(d);}}}U.prototype.define=U.prototype.define;U.prototype.upgrade=U.prototype.upgrade;U.prototype.get=U.prototype.get;U.prototype.whenDefined=U.prototype.whenDefined;U.prototype.polyfillDefineLazy=U.prototype.jb;U.prototype.polyfillWrapFlushCallback=U.prototype.polyfillWrapFlushCallback;function mh(a,b,c){function d(e){return function(f){for(var g=[],h=0;h<arguments.length;++h)g[h]=arguments[h];h=[];for(var k=[],l=0;l<g.length;l++){var m=g[l];m instanceof Element&&T(m)&&k.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)h.push(m);else h.push(m);}e.apply(this,g);for(g=0;g<k.length;g++)bh(a,k[g]);if(T(this))for(g=0;g<h.length;g++)k=h[g],k instanceof Element&&$g(a,k);}}void 0!==c.prepend&&(b.prepend=d(c.prepend));void 0!==c.append&&(b.append=d(c.append));}
|
|
362
|
-
;function nh(a){Document.prototype.createElement=function(b){return fh(a,this,b,null)};Document.prototype.importNode=function(b,c){b=hg.call(this,b,!!c);this.__CE_registry?ch(a,b):Yg(a,b);return b};Document.prototype.createElementNS=function(b,c){return fh(a,this,c,b)};mh(a,Document.prototype,{prepend:ig,append:jg});};function oh(a){function b(d){return function(e){for(var f=[],g=0;g<arguments.length;++g)f[g]=arguments[g];g=[];for(var h=[],k=0;k<f.length;k++){var l=f[k];l instanceof Element&&T(l)&&h.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)g.push(l);else g.push(l);}d.apply(this,f);for(f=0;f<h.length;f++)bh(a,h[f]);if(T(this))for(f=0;f<g.length;f++)h=g[f],h instanceof Element&&$g(a,h);}}var c=Element.prototype;void 0!==Fg&&(c.before=b(Fg));void 0!==Gg&&(c.after=b(Gg));void 0!==
|
|
363
|
-
Hg&&(c.replaceWith=function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];f=[];for(var g=[],h=0;h<e.length;h++){var k=e[h];k instanceof Element&&T(k)&&g.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)f.push(k);else f.push(k);}h=T(this);Hg.apply(this,e);for(e=0;e<g.length;e++)bh(a,g[e]);if(h)for(bh(a,this),e=0;e<f.length;e++)g=f[e],g instanceof Element&&$g(a,g);});void 0!==Ig&&(c.remove=function(){var d=T(this);Ig.call(this);d&&bh(a,this);});};function ph(a){function b(e,f){Object.defineProperty(e,"innerHTML",{enumerable:f.enumerable,configurable:!0,get:f.get,set:function(g){var h=this,k=void 0;T(this)&&(k=[],Vg(a,this,function(q){q!==h&&k.push(q);}));f.set.call(this,g);if(k)for(var l=0;l<k.length;l++){var m=k[l];1===m.__CE_state&&a.disconnectedCallback(m);}this.ownerDocument.__CE_registry?ch(a,this):Yg(a,this);return g}});}function c(e,f){e.insertAdjacentElement=function(g,h){var k=T(h);g=f.call(this,g,h);k&&bh(a,h);T(g)&&$g(a,h);return g};}
|
|
364
|
-
function d(e,f){function g(h,k){for(var l=[];h!==k;h=h.nextSibling)l.push(h);for(k=0;k<l.length;k++)ch(a,l[k]);}e.insertAdjacentHTML=function(h,k){h=h.toLowerCase();if("beforebegin"===h){var l=this.previousSibling;f.call(this,h,k);g(l||this.parentNode.firstChild,this);}else if("afterbegin"===h)l=this.firstChild,f.call(this,h,k),g(this.firstChild,l);else if("beforeend"===h)l=this.lastChild,f.call(this,h,k),g(l||this.firstChild,null);else if("afterend"===h)l=this.nextSibling,f.call(this,h,k),g(this.nextSibling,
|
|
365
|
-
l);else throw new SyntaxError("The value provided ("+String(h)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");};}sg&&(Element.prototype.attachShadow=function(e){e=sg.call(this,e);if(a.W&&!e.__CE_patched){e.__CE_patched=!0;for(var f=0;f<a.ca.length;f++)a.ca[f](e);}return this.__CE_shadowRoot=e});tg&&tg.get?b(Element.prototype,tg):Kg&&Kg.get?b(HTMLElement.prototype,Kg):Xg(a,function(e){b(e,{enumerable:!0,configurable:!0,get:function(){return mg.call(this,!0).innerHTML},set:function(f){var g=
|
|
366
|
-
"template"===this.localName,h=g?this.content:this,k=gg.call(document,this.namespaceURI,this.localName);for(k.innerHTML=f;0<h.childNodes.length;)pg.call(h,h.childNodes[0]);for(f=g?k.content:k;0<f.childNodes.length;)ng.call(h,f.childNodes[0]);}});});Element.prototype.setAttribute=function(e,f){if(1!==this.__CE_state)return vg.call(this,e,f);var g=ug.call(this,e);vg.call(this,e,f);f=ug.call(this,e);a.attributeChangedCallback(this,e,g,f,null);};Element.prototype.setAttributeNS=function(e,f,g){if(1!==this.__CE_state)return zg.call(this,
|
|
367
|
-
e,f,g);var h=yg.call(this,e,f);zg.call(this,e,f,g);g=yg.call(this,e,f);a.attributeChangedCallback(this,f,h,g,e);};Element.prototype.removeAttribute=function(e){if(1!==this.__CE_state)return wg.call(this,e);var f=ug.call(this,e);wg.call(this,e);null!==f&&a.attributeChangedCallback(this,e,f,null,null);};xg&&(Element.prototype.toggleAttribute=function(e,f){if(1!==this.__CE_state)return xg.call(this,e,f);var g=ug.call(this,e),h=null!==g;f=xg.call(this,e,f);h!==f&&a.attributeChangedCallback(this,e,g,f?"":
|
|
368
|
-
null,null);return f});Element.prototype.removeAttributeNS=function(e,f){if(1!==this.__CE_state)return Ag.call(this,e,f);var g=yg.call(this,e,f);Ag.call(this,e,f);var h=yg.call(this,e,f);g!==h&&a.attributeChangedCallback(this,f,g,h,e);};Lg?c(HTMLElement.prototype,Lg):Bg&&c(Element.prototype,Bg);Mg?d(HTMLElement.prototype,Mg):Cg&&d(Element.prototype,Cg);mh(a,Element.prototype,{prepend:Dg,append:Eg});oh(a);};var qh={};function rh(a){function b(){var c=this.constructor;var d=document.__CE_registry.Fa.get(c);if(!d)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=fg.call(document,d.localName),Object.setPrototypeOf(e,c.prototype),e.__CE_state=1,e.__CE_definition=d,Zg(a,e),e;var f=e.length-1,g=e[f];if(g===qh)throw Error("Failed to construct '"+d.localName+"': This element was already constructed.");e[f]=
|
|
369
|
-
qh;Object.setPrototypeOf(g,c.prototype);Zg(a,g);return g}b.prototype=Jg.prototype;Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:b});window.HTMLElement=b;};function sh(a){function b(c,d){Object.defineProperty(c,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,e);else {var f=void 0;if(this.firstChild){var g=this.childNodes,h=g.length;if(0<h&&T(this)){f=Array(h);for(var k=0;k<h;k++)f[k]=g[k];}}d.set.call(this,e);if(f)for(e=0;e<f.length;e++)bh(a,f[e]);}}});}Node.prototype.insertBefore=function(c,d){if(c instanceof DocumentFragment){var e=Qg(c);c=og.call(this,c,d);if(T(this))for(d=
|
|
370
|
-
0;d<e.length;d++)$g(a,e[d]);return c}e=c instanceof Element&&T(c);d=og.call(this,c,d);e&&bh(a,c);T(this)&&$g(a,c);return d};Node.prototype.appendChild=function(c){if(c instanceof DocumentFragment){var d=Qg(c);c=ng.call(this,c);if(T(this))for(var e=0;e<d.length;e++)$g(a,d[e]);return c}d=c instanceof Element&&T(c);e=ng.call(this,c);d&&bh(a,c);T(this)&&$g(a,c);return e};Node.prototype.cloneNode=function(c){c=mg.call(this,!!c);this.ownerDocument.__CE_registry?ch(a,c):Yg(a,c);return c};Node.prototype.removeChild=
|
|
371
|
-
function(c){var d=c instanceof Element&&T(c),e=pg.call(this,c);d&&bh(a,c);return e};Node.prototype.replaceChild=function(c,d){if(c instanceof DocumentFragment){var e=Qg(c);c=qg.call(this,c,d);if(T(this))for(bh(a,d),d=0;d<e.length;d++)$g(a,e[d]);return c}e=c instanceof Element&&T(c);var f=qg.call(this,c,d),g=T(this);g&&bh(a,d);e&&bh(a,c);g&&$g(a,c);return f};rg&&rg.get?b(Node.prototype,rg):Wg(a,function(c){b(c,{enumerable:!0,configurable:!0,get:function(){for(var d=[],e=this.firstChild;e;e=e.nextSibling)e.nodeType!==
|
|
372
|
-
Node.COMMENT_NODE&&d.push(e.textContent);return d.join("")},set:function(d){for(;this.firstChild;)pg.call(this,this.firstChild);null!=d&&""!==d&&ng.call(this,document.createTextNode(d));}});});};var Ug=window.customElements;function th(){var a=new Tg;rh(a);nh(a);mh(a,DocumentFragment.prototype,{prepend:kg,append:lg});sh(a);ph(a);window.CustomElementRegistry=U;a=new U(a);document.__CE_registry=a;Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:a});}Ug&&!Ug.forcePolyfill&&"function"==typeof Ug.define&&"function"==typeof Ug.get||th();window.__CE_installPolyfill=th;/*
|
|
373
|
-
|
|
374
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
375
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
376
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
377
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
378
|
-
Code distributed by Google as part of the polymer project is also
|
|
379
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
380
|
-
*/
|
|
381
|
-
function uh(){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="";}
|
|
382
|
-
function vh(a){var b=a=a.replace(wh,"").replace(xh,""),c=new uh;c.start=0;c.end=b.length;for(var d=c,e=0,f=b.length;e<f;e++)if("{"===b[e]){d.rules||(d.rules=[]);var g=d,h=g.rules[g.rules.length-1]||null;d=new uh;d.start=e+1;d.parent=g;d.previous=h;g.rules.push(d);}else "}"===b[e]&&(d.end=e+1,d=d.parent||c);return yh(c,a)}
|
|
383
|
-
function yh(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=zh(c),c=c.replace(Ah," "),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=Bh:c.match(Ch)&&(a.type=Dh,a.keyframesName=a.selector.split(Ah).pop()):a.type=0===c.indexOf("--")?Eh:Fh);if(c=a.rules)for(var d=0,e=c.length,f=void 0;d<e&&(f=c[d]);d++)yh(f,
|
|
384
|
-
b);return a}function zh(a){return a.replace(/\\([0-9a-f]{1,6})\s/gi,function(b,c){b=c;for(c=6-b.length;c--;)b="0"+b;return "\\"+b})}
|
|
385
|
-
function Gh(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 g=e.length,h=void 0;f<g&&(h=e[f]);f++)d=Gh(h,b,d);}else b?b=a.cssText:(b=a.cssText,b=b.replace(Hh,"").replace(Ih,""),b=b.replace(Jh,"").replace(Kh,"")),(d=b.trim())&&(d=" "+d+"\n");}d&&(a.selector&&(c+=a.selector+" {\n"),c+=d,a.selector&&(c+="}\n\n"));return c}
|
|
386
|
-
var Fh=1,Dh=7,Bh=4,Eh=1E3,wh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,xh=/@import[^;]*;/gim,Hh=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Ih=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,Jh=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,Kh=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,Ch=/^@[^\s]*keyframes/,Ah=/\s+/g;var V=!(window.ShadyDOM&&window.ShadyDOM.inUse),Lh;function Mh(a){Lh=a&&a.shimcssproperties?!1:V||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)"));}var Nh;window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(Nh=window.ShadyCSS.cssBuild);var Oh=!(!window.ShadyCSS||!window.ShadyCSS.disableRuntime);
|
|
387
|
-
window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Lh=window.ShadyCSS.nativeCss:window.ShadyCSS?(Mh(window.ShadyCSS),window.ShadyCSS=void 0):Mh(window.WebComponents&&window.WebComponents.flags);var W=Lh;var Ph=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Qh=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,Rh=/(--[\w-]+)\s*([:,;)]|$)/gi,Sh=/(animation\s*:)|(animation-name\s*:)/,Th=/@media\s(.*)/,Uh=/\{[^}]*\}/g;var Vh=new Set;function Wh(a,b){if(!a)return "";"string"===typeof a&&(a=vh(a));b&&Xh(a,b);return Gh(a,W)}function Yh(a){!a.__cssRules&&a.textContent&&(a.__cssRules=vh(a.textContent));return a.__cssRules||null}function $h(a){return !!a.parent&&a.parent.type===Dh}function Xh(a,b,c,d){if(a){var e=!1,f=a.type;if(d&&f===Bh){var g=a.selector.match(Th);g&&(window.matchMedia(g[1]).matches||(e=!0));}f===Fh?b(a):c&&f===Dh?c(a):f===Eh&&(e=!0);if((a=a.rules)&&!e)for(e=0,f=a.length,g=void 0;e<f&&(g=a[e]);e++)Xh(g,b,c,d);}}
|
|
388
|
-
function ai(a,b,c,d){var e=document.createElement("style");b&&e.setAttribute("scope",b);e.textContent=a;bi(e,c,d);return e}var ci=null;function di(a){a=document.createComment(" Shady DOM styles for "+a+" ");var b=document.head;b.insertBefore(a,(ci?ci.nextSibling:null)||b.firstChild);return ci=a}function bi(a,b,c){b=b||document.head;b.insertBefore(a,c&&c.nextSibling||b.firstChild);ci?a.compareDocumentPosition(ci)===Node.DOCUMENT_POSITION_PRECEDING&&(ci=a):ci=a;}
|
|
389
|
-
function ei(a,b){for(var c=0,d=a.length;b<d;b++)if("("===a[b])c++;else if(")"===a[b]&&0===--c)return b;return -1}function fi(a,b){var c=a.indexOf("var(");if(-1===c)return b(a,"","","");var d=ei(a,c+3),e=a.substring(c+4,d);c=a.substring(0,c);a=fi(a.substring(d+1),b);d=e.indexOf(",");return -1===d?b(c,e.trim(),"",a):b(c,e.substring(0,d).trim(),e.substring(d+1).trim(),a)}function gi(a,b){V?a.setAttribute("class",b):window.ShadyDOM.nativeMethods.setAttribute.call(a,"class",b);}
|
|
390
|
-
var hi=window.ShadyDOM&&window.ShadyDOM.wrap||function(a){return a};function ii(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,ja:c}}function ji(a){for(var b=[],c="",d=0;0<=d&&d<a.length;d++)if("("===a[d]){var e=ei(a,d);c+=a.slice(d,e+1);d=e;}else ","===a[d]?(b.push(c),c=""):c+=a[d];c&&b.push(c);return b}
|
|
391
|
-
function ki(a){if(void 0!==Nh)return Nh;if(void 0===a.__cssBuild){var b=a.getAttribute("css-build");if(b)a.__cssBuild=b;else {a:{b="template"===a.localName?a.content.firstChild:a.firstChild;if(b instanceof Comment&&(b=b.textContent.trim().split(":"),"css-build"===b[0])){b=b[1];break a}b="";}if(""!==b){var c="template"===a.localName?a.content.firstChild:a.firstChild;c.parentNode.removeChild(c);}a.__cssBuild=b;}}return a.__cssBuild||""}
|
|
392
|
-
function li(a){a=void 0===a?"":a;return ""!==a&&W?V?"shadow"===a:"shady"===a:!1};function mi(){}function ni(a,b){oi(pi,a,function(c){qi(c,b||"");});}function oi(a,b,c){b.nodeType===Node.ELEMENT_NODE&&c(b);var d;"template"===b.localName?d=(b.content||b._content||b).childNodes:d=b.children||b.childNodes;if(d)for(b=0;b<d.length;b++)oi(a,d[b],c);}
|
|
393
|
-
function qi(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("class");c?d&&(b=d.replace("style-scope","").replace(b,""),gi(a,b)):gi(a,(d?d+" ":"")+"style-scope "+b);}}function ri(a,b,c){oi(pi,a,function(d){qi(d,b,!0);qi(d,c);});}function si(a,b){oi(pi,a,function(c){qi(c,b||"",!0);});}
|
|
394
|
-
function ti(a,b,c,d,e){var f=pi;e=void 0===e?"":e;""===e&&(V||"shady"===(void 0===d?"":d)?e=Wh(b,c):(a=ii(a),e=ui(f,b,a.is,a.ja,c)+"\n\n"));return e.trim()}function ui(a,b,c,d,e){var f=vi(c,d);c=c?"."+c:"";return Wh(b,function(g){g.i||(g.selector=g.G=wi(a,g,a.h,c,f),g.i=!0);e&&e(g,c,f);})}function vi(a,b){return b?"[is="+a+"]":a}
|
|
395
|
-
function wi(a,b,c,d,e){var f=ji(b.selector);if(!$h(b)){b=0;for(var g=f.length,h=void 0;b<g&&(h=f[b]);b++)f[b]=c.call(a,h,d,e);}return f.filter(function(k){return !!k}).join(",")}function xi(a){return a.replace(yi,function(b,c,d){-1<d.indexOf("+")?d=d.replace(/\+/g,"___"):-1<d.indexOf("___")&&(d=d.replace(/___/g,"+"));return ":"+c+"("+d+")"})}
|
|
396
|
-
function zi(a){for(var b=[],c;c=a.match(Ai);){var d=c.index,e=ei(a,d);if(-1===e)throw Error(c.input+" selector missing ')'");c=a.slice(d,e+1);a=a.replace(c,"\ue000");b.push(c);}return {Ea:a,matches:b}}function Bi(a,b){var c=a.split("\ue000");return b.reduce(function(d,e,f){return d+e+c[f+1]},c[0])}
|
|
397
|
-
mi.prototype.h=function(a,b,c){var d=!1;a=a.trim();var e=yi.test(a);e&&(a=a.replace(yi,function(h,k,l){return ":"+k+"("+l.replace(/\s/g,"")+")"}),a=xi(a));var f=Ai.test(a);if(f){var g=zi(a);a=g.Ea;g=g.matches;}a=a.replace(Ci,":host $1");a=a.replace(Di,function(h,k,l){d||(h=Ei(l,k,b,c),d=d||h.stop,k=h.Ya,l=h.value);return k+l});f&&(a=Bi(a,g));e&&(a=xi(a));return a=a.replace(Fi,function(h,k,l,m){return '[dir="'+l+'"] '+k+m+", "+k+'[dir="'+l+'"]'+m})};
|
|
398
|
-
function Ei(a,b,c,d){var e=a.indexOf("::slotted");0<=a.indexOf(":host")?a=Gi(a,d):0!==e&&(a=c?Hi(a,c):a);c=!1;0<=e&&(b="",c=!0);if(c){var f=!0;c&&(a=a.replace(Ii,function(g,h){return " > "+h}));}return {value:a,Ya:b,stop:f}}function Hi(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d<a.length;d++)if(1===d%2)c.push(a[d]);else {var e=a[d];if(""!==e||d!==a.length-1)e=e.split(":"),e[0]+=b,c.push(e.join(":"));}return c.join("")}
|
|
399
|
-
function Gi(a,b){var c=a.match(Ji);return (c=c&&c[2].trim()||"")?c[0].match(Ki)?a.replace(Ji,function(d,e,f){return b+f}):c.split(Ki)[0]===b?c:"should_not_match":a.replace(":host",b)}function Li(a){":root"===a.selector&&(a.selector="html");}mi.prototype.i=function(a){return a.match(":host")?"":a.match("::slotted")?this.h(a,":not(.style-scope)"):Hi(a.trim(),":not(.style-scope)")};ea.Object.defineProperties(mi.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return "style-scope"}}});
|
|
400
|
-
var yi=/:(nth[-\w]+)\(([^)]+)\)/,Di=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ki=/[[.:#*]/,Ci=/^(::slotted)/,Ji=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ii=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Fi=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ai=/:(?:matches|any|-(?:webkit|moz)-any)/,pi=new mi;function Mi(a,b,c,d,e){this.M=a||null;this.h=b||null;this.Ca=c||[];this.K=null;this.cssBuild=e||"";this.ja=d||"";this.g=this.L=this.R=null;}function Ni(a){return a?a.__styleInfo:null}function Oi(a,b){return a.__styleInfo=b}Mi.prototype.i=function(){return this.M};Mi.prototype._getStyleRules=Mi.prototype.i;function Pi(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Qi=/:host\s*>\s*/,Ri=navigator.userAgent.match("Trident");function Si(){}function Ti(a){var b={},c=[],d=0;Xh(a,function(f){Ui(f);f.index=d++;f=f.F.cssText;for(var g;g=Rh.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0);}},function(f){c.push(f);});a.h=c;a=[];for(var e in b)a.push(e);return a}
|
|
401
|
-
function Ui(a){if(!a.F){var b={},c={};Vi(a,c)&&(b.P=c,a.rules=null);b.cssText=a.parsedCssText.replace(Uh,"").replace(Ph,"");a.F=b;}}function Vi(a,b){var c=a.F;if(c){if(c.P)return Object.assign(b,c.P),!0}else {c=a.parsedCssText;for(var d;a=Ph.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0;}return d}}
|
|
402
|
-
function Wi(a,b,c){b&&(b=0<=b.indexOf(";")?Xi(a,b,c):fi(b,function(d,e,f,g){if(!e)return d+g;(e=Wi(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Wi(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""}
|
|
403
|
-
function Xi(a,b,c){b=b.split(";");for(var d=0,e,f;d<b.length;d++)if(e=b[d]){Qh.lastIndex=0;if(f=Qh.exec(e))e=Wi(a,c[f[1]],c);else if(f=e.indexOf(":"),-1!==f){var g=e.substring(f);g=g.trim();g=Wi(a,g,c)||g;e=e.substring(0,f)+g;}b[d]=e&&e.lastIndexOf(";")===e.length-1?e.slice(0,-1):e||"";}return b.join(";")}
|
|
404
|
-
function Yi(a,b){var c={},d=[];Xh(a,function(e){e.F||Ui(e);var f=e.G||e.parsedSelector;b&&e.F.P&&f&&Pi.call(b,f)&&(Vi(e,c),e=e.index,f=parseInt(e/32,10),d[f]=(d[f]||0)|1<<e%32);},null,!0);return {P:c,key:d}}
|
|
405
|
-
function Zi(a,b,c,d){b.F||Ui(b);if(b.F.P){var e=ii(a);a=e.is;e=e.ja;e=a?vi(a,e):"html";var f=b.parsedSelector;var g=!!f.match(Qi)||"html"===e&&-1<f.indexOf("html");var h=0===f.indexOf(":host")&&!g;"shady"===c&&(g=f===e+" > *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.G||(b.G=wi(pi,b,pi.h,a?"."+a:"",e)),c=b.G||e),g&&"html"===e&&(c=b.G||b.O),d({Ea:c,gb:h,vb:g});}}
|
|
406
|
-
function $i(a,b,c){var d={},e={};Xh(b,function(f){Zi(a,f,c,function(g){Pi.call(a._element||a,g.Ea)&&(g.gb?Vi(f,d):Vi(f,e));});},null,!0);return {mb:e,eb:d}}
|
|
407
|
-
function aj(a,b,c,d){var e=ii(b),f=vi(e.is,e.ja),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=Ni(b);e=h.M;h=h.cssBuild;var k=bj(e,d);return ti(b,e,function(l){var m="";l.F||Ui(l);l.F.cssText&&(m=Xi(a,l.F.cssText,c));l.cssText=m;if(!V&&!$h(l)&&l.cssText){var q=m=l.cssText;null==l.Ma&&(l.Ma=Sh.test(m));if(l.Ma)if(null==l.ra){l.ra=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ra.push(H));}else {for(H=0;H<l.ra.length;++H)q=k[l.ra[H]],m=q(m);q=m;}l.cssText=q;l.G=
|
|
408
|
-
l.G||l.selector;m="."+d;H=ji(l.G);q=0;for(var C=H.length,t=void 0;q<C&&(t=H[q]);q++)H[q]=t.match(g)?t.replace(f,m):m+" "+t;l.selector=H.join(",");}},h)}function bj(a,b){a=a.h;var c={};if(!V&&a)for(var d=0,e=a[d];d<a.length;e=a[++d]){var f=e,g=b;f.u=new RegExp("\\b"+f.keyframesName+"(?!\\B|-)","g");f.g=f.keyframesName+"-"+g;f.G=f.G||f.selector;f.selector=f.G.replace(f.keyframesName,f.g);c[e.keyframesName]=cj(e);}return c}function cj(a){return function(b){return b.replace(a.u,a.g)}}
|
|
409
|
-
function dj(a,b){var c=ej,d=Yh(a);a.textContent=Wh(d,function(e){var f=e.cssText=e.parsedCssText;e.F&&e.F.cssText&&(f=f.replace(Hh,"").replace(Ih,""),e.cssText=Xi(c,f,b));});}ea.Object.defineProperties(Si.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return "x-scope"}}});var ej=new Si;var fj={},gj=window.customElements;if(gj&&!V&&!Oh){var hj=gj.define;gj.define=function(a,b,c){fj[a]||(fj[a]=di(a));hj.call(gj,a,b,c);};};function ij(){this.cache={};}ij.prototype.store=function(a,b,c,d){var e=this.cache[a]||[];e.push({P:b,styleElement:c,L:d});100<e.length&&e.shift();this.cache[a]=e;};function jj(){}var kj=new RegExp(pi.g+"\\s*([^\\s]*)");function lj(a){return (a=(a.classList&&a.classList.value?a.classList.value:a.getAttribute("class")||"").match(kj))?a[1]:""}function mj(a){var b=hi(a).getRootNode();return b===a||b===a.ownerDocument?"":(a=b.host)?ii(a).is:""}
|
|
410
|
-
function nj(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(),g=lj(e);if(g&&f===e.ownerDocument&&("style"!==e.localName&&"template"!==e.localName||""===ki(e)))si(e,g);else if(f instanceof ShadowRoot)for(f=mj(e),f!==g&&ri(e,g,f),e=window.ShadyDOM.nativeMethods.querySelectorAll.call(e,":not(."+pi.g+")"),g=0;g<e.length;g++){f=e[g];
|
|
411
|
-
var h=mj(f);h&&qi(f,h);}}}}}
|
|
412
|
-
if(!(V||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var oj=new MutationObserver(nj),pj=function(a){oj.observe(a,{childList:!0,subtree:!0});};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)pj(document);else {var qj=function(){pj(document.body);};window.HTMLImports?window.HTMLImports.whenReady(qj):requestAnimationFrame(function(){if("loading"===document.readyState){var a=function(){qj();document.removeEventListener("readystatechange",a);};document.addEventListener("readystatechange",
|
|
413
|
-
a);}else qj();});}jj=function(){nj(oj.takeRecords());};};var rj={};var sj=Promise.resolve();function tj(a){if(a=rj[a])a._applyShimCurrentVersion=a._applyShimCurrentVersion||0,a._applyShimValidatingVersion=a._applyShimValidatingVersion||0,a._applyShimNextVersion=(a._applyShimNextVersion||0)+1;}function uj(a){return a._applyShimCurrentVersion===a._applyShimNextVersion}function vj(a){a._applyShimValidatingVersion=a._applyShimNextVersion;a._validating||(a._validating=!0,sj.then(function(){a._applyShimCurrentVersion=a._applyShimNextVersion;a._validating=!1;}));};var wj={},xj=new ij;function Y(){this.ea={};this.i=document.documentElement;var a=new uh;a.rules=[];this.u=Oi(this.i,new Mi(a));this.O=!1;this.g=this.h=null;}v=Y.prototype;v.flush=function(){jj();};v.bb=function(a){return Yh(a)};v.qb=function(a){return Wh(a)};v.prepareTemplate=function(a,b,c){this.prepareTemplateDom(a,b);this.prepareTemplateStyles(a,b,c);};
|
|
414
|
-
v.prepareTemplateStyles=function(a,b,c){if(!a._prepared&&!Oh){V||fj[b]||(fj[b]=di(b));a._prepared=!0;a.name=b;a.extends=c;rj[b]=a;var d=ki(a),e=li(d);c={is:b,extends:c};for(var f=[],g=a.content.querySelectorAll("style"),h=0;h<g.length;h++){var k=g[h];if(k.hasAttribute("shady-unscoped")){if(!V){var l=k.textContent;if(!Vh.has(l)){Vh.add(l);var m=document.createElement("style");m.setAttribute("shady-unscoped","");m.textContent=l;document.head.appendChild(m);}k.parentNode.removeChild(k);}}else f.push(k.textContent),
|
|
415
|
-
k.parentNode.removeChild(k);}f=f.join("").trim()+(wj[b]||"");yj(this);if(!e){if(g=!d)g=Qh.test(f)||Ph.test(f),Qh.lastIndex=0,Ph.lastIndex=0;h=vh(f);g&&W&&this.h&&this.h.transformRules(h,b);a._styleAst=h;}g=[];W||(g=Ti(a._styleAst));if(!g.length||W)h=V?a.content:null,b=fj[b]||null,d=ti(c,a._styleAst,null,d,e?f:""),d=d.length?ai(d,c.is,h,b):null,a._style=d;a.g=g;}};v.kb=function(a,b){wj[b]=a.join(" ");};
|
|
416
|
-
v.prepareTemplateDom=function(a,b){if(!Oh){var c=ki(a);V||"shady"===c||a._domPrepared||(a._domPrepared=!0,ni(a.content,b));}};function zj(a){var b=ii(a),c=b.is;b=b.ja;var d=fj[c]||null,e=rj[c];if(e){c=e._styleAst;var f=e.g;e=ki(e);b=new Mi(c,d,f,b,e);Oi(a,b);return b}}
|
|
417
|
-
function Aj(a){!a.g&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(a.g=window.ShadyCSS.CustomStyleInterface,a.g.transformCallback=function(b){a.Qa(b);},a.g.validateCallback=function(){requestAnimationFrame(function(){(a.g.enqueued||a.O)&&a.flushCustomStyles();});});}function yj(a){if(!a.h&&window.ShadyCSS&&window.ShadyCSS.ApplyShim){a.h=window.ShadyCSS.ApplyShim;a.h.invalidCallback=tj;var b=!0;}else b=!1;Aj(a);return b}
|
|
418
|
-
v.flushCustomStyles=function(){if(!Oh){var a=yj(this);if(this.g){var b=this.g.processStyles();if((a||this.g.enqueued)&&!li(this.u.cssBuild)){if(W){if(!this.u.cssBuild)for(a=0;a<b.length;a++){var c=this.g.getStyleForCustomStyle(b[a]);if(c&&W&&this.h){var d=Yh(c);yj(this);this.h.transformRules(d);c.textContent=Wh(d);}}}else {Bj(this,b);Cj(this,this.i,this.u);for(a=0;a<b.length;a++)(c=this.g.getStyleForCustomStyle(b[a]))&&dj(c,this.u.R);this.O&&this.styleDocument();}this.g.enqueued=!1;}}}};
|
|
419
|
-
function Bj(a,b){b=b.map(function(c){return a.g.getStyleForCustomStyle(c)}).filter(function(c){return !!c});b.sort(function(c,d){c=d.compareDocumentPosition(c);return c&Node.DOCUMENT_POSITION_FOLLOWING?1:c&Node.DOCUMENT_POSITION_PRECEDING?-1:0});a.u.M.rules=b.map(function(c){return Yh(c)});}
|
|
420
|
-
v.styleElement=function(a,b){if(Oh){if(b){Ni(a)||Oi(a,new Mi(null));var c=Ni(a);c.K=c.K||{};Object.assign(c.K,b);Dj(this,a,c);}}else if(c=Ni(a)||zj(a))if(a!==this.i&&(this.O=!0),b&&(c.K=c.K||{},Object.assign(c.K,b)),W)Dj(this,a,c);else if(this.flush(),Cj(this,a,c),c.Ca&&c.Ca.length){b=ii(a).is;var d;a:{if(d=xj.cache[b])for(var e=d.length-1;0<=e;e--){var f=d[e];b:{var g=c.Ca;for(var h=0;h<g.length;h++){var k=g[h];if(f.P[k]!==c.R[k]){g=!1;break b}}g=!0;}if(g){d=f;break a}}d=void 0;}g=d?d.styleElement:
|
|
421
|
-
null;e=c.L;(f=d&&d.L)||(f=this.ea[b]=(this.ea[b]||0)+1,f=b+"-"+f);c.L=f;f=c.L;h=ej;h=g?g.textContent||"":aj(h,a,c.R,f);k=Ni(a);var l=k.g;l&&!V&&l!==g&&(l._useCount--,0>=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.g?(k.g.textContent=h,g=k.g):h&&(g=ai(h,f,a.shadowRoot,k.h)):g?g.parentNode||(Ri&&-1<h.indexOf("@media")&&(g.textContent=h),bi(g,null,k.h)):h&&(g=ai(h,f,null,k.h));g&&(g._useCount=g._useCount||0,k.g!=g&&g._useCount++,k.g=g);f=g;V||(g=c.L,k=h=a.getAttribute("class")||"",e&&
|
|
422
|
-
(k=h.replace(new RegExp("\\s*x-scope\\s*"+e+"\\s*","g")," ")),k+=(k?" ":"")+"x-scope "+g,h!==k&&gi(a,k));d||xj.store(b,c.R,f,c.L);}};
|
|
423
|
-
function Dj(a,b,c){var d=ii(b).is;if(c.K){var e=c.K,f;for(f in e)null===f?b.style.removeProperty(f):b.style.setProperty(f,e[f]);}e=rj[d];if(!(!e&&b!==a.i||e&&""!==ki(e))&&e&&e._style&&!uj(e)){if(uj(e)||e._applyShimValidatingVersion!==e._applyShimNextVersion)yj(a),a.h&&a.h.transformRules(e._styleAst,d),e._style.textContent=ti(b,c.M),vj(e);V&&(a=b.shadowRoot)&&(a=a.querySelector("style"))&&(a.textContent=ti(b,c.M));c.M=e._styleAst;}}
|
|
424
|
-
function Ej(a,b){return (b=hi(b).getRootNode().host)?Ni(b)||zj(b)?b:Ej(a,b):a.i}function Cj(a,b,c){var d=Ej(a,b),e=Ni(d),f=e.R;d===a.i||f||(Cj(a,d,e),f=e.R);a=Object.create(f||null);d=$i(b,c.M,c.cssBuild);b=Yi(e.M,b).P;Object.assign(a,d.eb,b,d.mb);b=c.K;for(var g in b)if((e=b[g])||0===e)a[g]=e;g=ej;b=Object.getOwnPropertyNames(a);for(e=0;e<b.length;e++)d=b[e],a[d]=Wi(g,a[d],a);c.R=a;}v.styleDocument=function(a){this.styleSubtree(this.i,a);};
|
|
425
|
-
v.styleSubtree=function(a,b){var c=hi(a),d=c.shadowRoot,e=a===this.i;(d||e)&&this.styleElement(a,b);if(a=e?c:d)for(a=Array.from(a.querySelectorAll("*")).filter(function(f){return hi(f).shadowRoot}),b=0;b<a.length;b++)this.styleSubtree(a[b]);};
|
|
426
|
-
v.Qa=function(a){var b=this,c=ki(a);c!==this.u.cssBuild&&(this.u.cssBuild=c);if(!li(c)){var d=Yh(a);Xh(d,function(e){if(V)Li(e);else {var f=pi;e.selector=e.parsedSelector;Li(e);e.selector=e.G=wi(f,e,f.i,void 0,void 0);}W&&""===c&&(yj(b),b.h&&b.h.transformRule(e));});W?a.textContent=Wh(d):this.u.M.rules.push(d);}};v.getComputedStyleValue=function(a,b){var c;W||(c=(Ni(a)||Ni(Ej(this,a))).R[b]);return (c=c||window.getComputedStyle(a).getPropertyValue(b))?c.trim():""};
|
|
427
|
-
v.pb=function(a,b){var c=hi(a).getRootNode();b=b?("string"===typeof b?b:String(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]===pi.g){c=d[e+1];break}}}c&&b.push(pi.g,c);W||(c=Ni(a))&&c.L&&b.push(ej.g,c.L);gi(a,b.join(" "));};v.Xa=function(a){return Ni(a)};v.ob=function(a,b){qi(a,b);};v.rb=function(a,b){qi(a,b,!0);};v.nb=function(a){return mj(a)};v.$a=function(a){return lj(a)};Y.prototype.flush=Y.prototype.flush;
|
|
428
|
-
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.pb;Y.prototype._styleInfoForNode=Y.prototype.Xa;Y.prototype.transformCustomStyleForDocument=Y.prototype.Qa;Y.prototype.getStyleAst=Y.prototype.bb;Y.prototype.styleAstToString=Y.prototype.qb;
|
|
429
|
-
Y.prototype.flushCustomStyles=Y.prototype.flushCustomStyles;Y.prototype.scopeNode=Y.prototype.ob;Y.prototype.unscopeNode=Y.prototype.rb;Y.prototype.scopeForNode=Y.prototype.nb;Y.prototype.currentScopeForNode=Y.prototype.$a;Y.prototype.prepareAdoptedCssText=Y.prototype.kb;Object.defineProperties(Y.prototype,{nativeShadow:{get:function(){return V}},nativeCss:{get:function(){return W}}});var Z=new Y,Fj,Gj;window.ShadyCSS&&(Fj=window.ShadyCSS.ApplyShim,Gj=window.ShadyCSS.CustomStyleInterface);
|
|
430
|
-
window.ShadyCSS={ScopingShim:Z,prepareTemplate:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplate(a,b,c);},prepareTemplateDom:function(a,b){Z.prepareTemplateDom(a,b);},prepareTemplateStyles:function(a,b,c){Z.flushCustomStyles();Z.prepareTemplateStyles(a,b,c);},styleSubtree:function(a,b){Z.flushCustomStyles();Z.styleSubtree(a,b);},styleElement:function(a){Z.flushCustomStyles();Z.styleElement(a);},styleDocument:function(a){Z.flushCustomStyles();Z.styleDocument(a);},flushCustomStyles:function(){Z.flushCustomStyles();},
|
|
431
|
-
getComputedStyleValue:function(a,b){return Z.getComputedStyleValue(a,b)},nativeCss:W,nativeShadow:V,cssBuild:Nh,disableRuntime:Oh};Fj&&(window.ShadyCSS.ApplyShim=Fj);Gj&&(window.ShadyCSS.CustomStyleInterface=Gj);(function(a){function b(t){""==t&&(f.call(this),this.m=!0);return t.toLowerCase()}function c(t){var F=t.charCodeAt(0);return 32<F&&127>F&&-1==[34,35,60,62,63,96].indexOf(F)?t:encodeURIComponent(t)}function d(t){var F=t.charCodeAt(0);return 32<F&&127>F&&-1==[34,35,60,62,96].indexOf(F)?t:encodeURIComponent(t)}function e(t,F,E){function N(ha){sa.push(ha);}var y=F||"scheme start",X=0,x="",ta=!1,ia=!1,sa=[];a:for(;(void 0!=t[X-1]||0==X)&&!this.m;){var n=t[X];switch(y){case "scheme start":if(n&&q.test(n))x+=
|
|
432
|
-
n.toLowerCase(),y="scheme";else if(F){N("Invalid scheme.");break a}else {x="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))x+=n.toLowerCase();else if(":"==n){this.l=x;x="";if(F)break a;void 0!==l[this.l]&&(this.H=!0);y="file"==this.l?"relative":this.H&&E&&E.l==this.l?"relative or authority":this.H?"authority first slash":"scheme data";}else if(F){void 0!=n&&N("Code point not allowed in scheme: "+n);break a}else {x="";X=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.A="?",
|
|
433
|
-
y="query"):"#"==n?(this.C="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.ya+=c(n));break;case "no scheme":if(E&&void 0!==l[E.l]){y="relative";continue}else N("Missing scheme."),f.call(this),this.m=!0;break;case "relative or authority":if("/"==n&&"/"==t[X+1])y="authority ignore slashes";else {N("Expected /, got: "+n);y="relative";continue}break;case "relative":this.H=!0;"file"!=this.l&&(this.l=E.l);if(void 0==n){this.o=E.o;this.v=E.v;this.s=E.s.slice();this.A=E.A;this.B=E.B;this.j=E.j;
|
|
434
|
-
break a}else if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A="?",this.B=E.B,this.j=E.j,y="query";else if("#"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A=E.A,this.C="#",this.B=E.B,this.j=E.j,y="fragment";else {y=t[X+1];var J=t[X+2];if("file"!=this.l||!q.test(n)||":"!=y&&"|"!=y||void 0!=J&&"/"!=J&&"\\"!=J&&"?"!=J&&"#"!=J)this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j,this.s=E.s.slice(),this.s.pop();y=
|
|
435
|
-
"relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="file"==this.l?"file host":"authority ignore slashes";else {"file"!=this.l&&(this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else {N("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){N("Expected '/', got: "+
|
|
436
|
-
n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else N("Expected authority, got: "+n);break;case "authority":if("@"==n){ta&&(N("@ already seen."),x+="%40");ta=!0;for(n=0;n<x.length;n++)J=x[n],"\t"==J||"\n"==J||"\r"==J?N("Invalid whitespace in authority."):":"==J&&null===this.j?this.j="":(J=c(J),null!==this.j?this.j+=J:this.B+=J);x="";}else if(void 0==n||"/"==n||"\\"==n||"?"==n||"#"==n){X-=x.length;x="";y="host";continue}else x+=n;break;case "file host":if(void 0==
|
|
437
|
-
n||"/"==n||"\\"==n||"?"==n||"#"==n){2!=x.length||!q.test(x[0])||":"!=x[1]&&"|"!=x[1]?(0!=x.length&&(this.o=b.call(this,x),x=""),y="relative path start"):y="relative path";continue}else "\t"==n||"\n"==n||"\r"==n?N("Invalid whitespace in file host."):x+=n;break;case "host":case "hostname":if(":"!=n||ia)if(void 0==n||"/"==n||"\\"==n||"?"==n||"#"==n){this.o=b.call(this,x);x="";y="relative path start";if(F)break a;continue}else "\t"!=n&&"\n"!=n&&"\r"!=n?("["==n?ia=!0:"]"==n&&(ia=!1),x+=n):N("Invalid code point in host/hostname: "+
|
|
438
|
-
n);else if(this.o=b.call(this,x),x="",y="port","hostname"==F)break a;break;case "port":if(/[0-9]/.test(n))x+=n;else if(void 0==n||"/"==n||"\\"==n||"?"==n||"#"==n||F){""!=x&&(x=parseInt(x,10),x!=l[this.l]&&(this.v=x+""),x="");if(F)break a;y="relative path start";continue}else "\t"==n||"\n"==n||"\r"==n?N("Invalid code point in port: "+n):(f.call(this),this.m=!0);break;case "relative path start":"\\"==n&&N("'\\' not allowed in path.");y="relative path";if("/"!=n&&"\\"!=n)continue;break;case "relative path":if(void 0!=
|
|
439
|
-
n&&"/"!=n&&"\\"!=n&&(F||"?"!=n&&"#"!=n))"\t"!=n&&"\n"!=n&&"\r"!=n&&(x+=c(n));else {"\\"==n&&N("\\ not allowed in relative path.");if(J=m[x.toLowerCase()])x=J;".."==x?(this.s.pop(),"/"!=n&&"\\"!=n&&this.s.push("")):"."==x&&"/"!=n&&"\\"!=n?this.s.push(""):"."!=x&&("file"==this.l&&0==this.s.length&&2==x.length&&q.test(x[0])&&"|"==x[1]&&(x=x[0]+":"),this.s.push(x));x="";"?"==n?(this.A="?",y="query"):"#"==n&&(this.C="#",y="fragment");}break;case "query":F||"#"!=n?void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.A+=
|
|
440
|
-
d(n)):(this.C="#",y="fragment");break;case "fragment":void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.C+=n);}X++;}}function f(){this.B=this.ya=this.l="";this.j=null;this.v=this.o="";this.s=[];this.C=this.A="";this.H=this.m=!1;}function g(t,F){void 0===F||F instanceof g||(F=new g(String(F)));this.g=t;f.call(this);e.call(this,this.g.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,""),null,F);}var h=!1;try{var k=new URL("b","http://a");k.pathname="c%20d";h="http://a/c%20d"===k.href;}catch(t){}if(!h){var l=Object.create(null);
|
|
441
|
-
l.ftp=21;l.file=0;l.gopher=70;l.http=80;l.https=443;l.ws=80;l.wss=443;var m=Object.create(null);m["%2e"]=".";m[".%2e"]="..";m["%2e."]="..";m["%2e%2e"]="..";var q=/[a-zA-Z]/,H=/[a-zA-Z0-9+\-.]/;g.prototype={toString:function(){return this.href},get href(){if(this.m)return this.g;var t="";if(""!=this.B||null!=this.j)t=this.B+(null!=this.j?":"+this.j:"")+"@";return this.protocol+(this.H?"//"+t+this.host:"")+this.pathname+this.A+this.C},set href(t){f.call(this);e.call(this,t);},get protocol(){return this.l+
|
|
442
|
-
":"},set protocol(t){this.m||e.call(this,t+":","scheme start");},get host(){return this.m?"":this.v?this.o+":"+this.v:this.o},set host(t){!this.m&&this.H&&e.call(this,t,"host");},get hostname(){return this.o},set hostname(t){!this.m&&this.H&&e.call(this,t,"hostname");},get port(){return this.v},set port(t){!this.m&&this.H&&e.call(this,t,"port");},get pathname(){return this.m?"":this.H?"/"+this.s.join("/"):this.ya},set pathname(t){!this.m&&this.H&&(this.s=[],e.call(this,t,"relative path start"));},get search(){return this.m||
|
|
443
|
-
!this.A||"?"==this.A?"":this.A},set search(t){!this.m&&this.H&&(this.A="?","?"==t[0]&&(t=t.slice(1)),e.call(this,t,"query"));},get hash(){return this.m||!this.C||"#"==this.C?"":this.C},set hash(t){this.m||(t?(this.C="#","#"==t[0]&&(t=t.slice(1)),e.call(this,t,"fragment")):this.C="");},get origin(){var t;if(this.m||!this.l)return "";switch(this.l){case "data":case "file":case "javascript":case "mailto":return "null"}return (t=this.host)?this.l+"://"+t:""}};var C=a.URL;C&&(g.createObjectURL=function(t){return C.createObjectURL.apply(C,
|
|
444
|
-
arguments)},g.revokeObjectURL=function(t){C.revokeObjectURL(t);});a.URL=g;}})(window);/*
|
|
445
|
-
|
|
446
|
-
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
|
|
447
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
448
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
449
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
450
|
-
Code distributed by Google as part of the polymer project is also
|
|
451
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
452
|
-
*/
|
|
453
|
-
var Hj=window.customElements,Ij=!1,Jj=null;Hj.polyfillWrapFlushCallback&&Hj.polyfillWrapFlushCallback(function(a){Jj=a;Ij&&a();});function Kj(){window.HTMLTemplateElement.bootstrap&&window.HTMLTemplateElement.bootstrap(window.document);Jj&&Jj();Ij=!0;window.WebComponents.ready=!0;document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}));}
|
|
454
|
-
"complete"!==document.readyState?(window.addEventListener("load",Kj),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",Kj);Kj();})):Kj();}).call(webcomponentsBundle$1);
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
return webcomponentsBundle$1;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
var webcomponentsBundleExports = requireWebcomponentsBundle();
|
|
461
|
-
var webcomponentsBundle = /*@__PURE__*/getDefaultExportFromCjs(webcomponentsBundleExports);
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* @author Toru Nagashima <https://github.com/mysticatea>
|
|
465
|
-
* @copyright 2015 Toru Nagashima. All rights reserved.
|
|
466
|
-
* See LICENSE file in root directory for full license.
|
|
467
|
-
*/
|
|
468
|
-
/**
|
|
469
|
-
* @typedef {object} PrivateData
|
|
470
|
-
* @property {EventTarget} eventTarget The event target.
|
|
471
|
-
* @property {{type:string}} event The original event object.
|
|
472
|
-
* @property {number} eventPhase The current event phase.
|
|
473
|
-
* @property {EventTarget|null} currentTarget The current event target.
|
|
474
|
-
* @property {boolean} canceled The flag to prevent default.
|
|
475
|
-
* @property {boolean} stopped The flag to stop propagation.
|
|
476
|
-
* @property {boolean} immediateStopped The flag to stop propagation immediately.
|
|
477
|
-
* @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null.
|
|
478
|
-
* @property {number} timeStamp The unix time.
|
|
479
|
-
* @private
|
|
480
|
-
*/
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Private data for event wrappers.
|
|
484
|
-
* @type {WeakMap<Event, PrivateData>}
|
|
485
|
-
* @private
|
|
486
|
-
*/
|
|
487
|
-
const privateData = new WeakMap();
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* Cache for wrapper classes.
|
|
491
|
-
* @type {WeakMap<Object, Function>}
|
|
492
|
-
* @private
|
|
493
|
-
*/
|
|
494
|
-
const wrappers = new WeakMap();
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Get private data.
|
|
498
|
-
* @param {Event} event The event object to get private data.
|
|
499
|
-
* @returns {PrivateData} The private data of the event.
|
|
500
|
-
* @private
|
|
501
|
-
*/
|
|
502
|
-
function pd(event) {
|
|
503
|
-
const retv = privateData.get(event);
|
|
504
|
-
console.assert(
|
|
505
|
-
retv != null,
|
|
506
|
-
"'this' is expected an Event object, but got",
|
|
507
|
-
event
|
|
508
|
-
);
|
|
509
|
-
return retv
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/**
|
|
513
|
-
* https://dom.spec.whatwg.org/#set-the-canceled-flag
|
|
514
|
-
* @param data {PrivateData} private data.
|
|
515
|
-
*/
|
|
516
|
-
function setCancelFlag(data) {
|
|
517
|
-
if (data.passiveListener != null) {
|
|
518
|
-
if (
|
|
519
|
-
typeof console !== "undefined" &&
|
|
520
|
-
typeof console.error === "function"
|
|
521
|
-
) {
|
|
522
|
-
console.error(
|
|
523
|
-
"Unable to preventDefault inside passive event listener invocation.",
|
|
524
|
-
data.passiveListener
|
|
525
|
-
);
|
|
526
|
-
}
|
|
527
|
-
return
|
|
528
|
-
}
|
|
529
|
-
if (!data.event.cancelable) {
|
|
530
|
-
return
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
data.canceled = true;
|
|
534
|
-
if (typeof data.event.preventDefault === "function") {
|
|
535
|
-
data.event.preventDefault();
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
* @see https://dom.spec.whatwg.org/#interface-event
|
|
541
|
-
* @private
|
|
542
|
-
*/
|
|
543
|
-
/**
|
|
544
|
-
* The event wrapper.
|
|
545
|
-
* @constructor
|
|
546
|
-
* @param {EventTarget} eventTarget The event target of this dispatching.
|
|
547
|
-
* @param {Event|{type:string}} event The original event to wrap.
|
|
548
|
-
*/
|
|
549
|
-
function Event$1(eventTarget, event) {
|
|
550
|
-
privateData.set(this, {
|
|
551
|
-
eventTarget,
|
|
552
|
-
event,
|
|
553
|
-
eventPhase: 2,
|
|
554
|
-
currentTarget: eventTarget,
|
|
555
|
-
canceled: false,
|
|
556
|
-
stopped: false,
|
|
557
|
-
immediateStopped: false,
|
|
558
|
-
passiveListener: null,
|
|
559
|
-
timeStamp: event.timeStamp || Date.now(),
|
|
560
|
-
});
|
|
561
|
-
|
|
562
|
-
// https://heycam.github.io/webidl/#Unforgeable
|
|
563
|
-
Object.defineProperty(this, "isTrusted", { value: false, enumerable: true });
|
|
564
|
-
|
|
565
|
-
// Define accessors
|
|
566
|
-
const keys = Object.keys(event);
|
|
567
|
-
for (let i = 0; i < keys.length; ++i) {
|
|
568
|
-
const key = keys[i];
|
|
569
|
-
if (!(key in this)) {
|
|
570
|
-
Object.defineProperty(this, key, defineRedirectDescriptor(key));
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
// Should be enumerable, but class methods are not enumerable.
|
|
576
|
-
Event$1.prototype = {
|
|
577
|
-
/**
|
|
578
|
-
* The type of this event.
|
|
579
|
-
* @type {string}
|
|
580
|
-
*/
|
|
581
|
-
get type() {
|
|
582
|
-
return pd(this).event.type
|
|
583
|
-
},
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* The target of this event.
|
|
587
|
-
* @type {EventTarget}
|
|
588
|
-
*/
|
|
589
|
-
get target() {
|
|
590
|
-
return pd(this).eventTarget
|
|
591
|
-
},
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* The target of this event.
|
|
595
|
-
* @type {EventTarget}
|
|
596
|
-
*/
|
|
597
|
-
get currentTarget() {
|
|
598
|
-
return pd(this).currentTarget
|
|
599
|
-
},
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* @returns {EventTarget[]} The composed path of this event.
|
|
603
|
-
*/
|
|
604
|
-
composedPath() {
|
|
605
|
-
const currentTarget = pd(this).currentTarget;
|
|
606
|
-
if (currentTarget == null) {
|
|
607
|
-
return []
|
|
608
|
-
}
|
|
609
|
-
return [currentTarget]
|
|
610
|
-
},
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* Constant of NONE.
|
|
614
|
-
* @type {number}
|
|
615
|
-
*/
|
|
616
|
-
get NONE() {
|
|
617
|
-
return 0
|
|
618
|
-
},
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* Constant of CAPTURING_PHASE.
|
|
622
|
-
* @type {number}
|
|
623
|
-
*/
|
|
624
|
-
get CAPTURING_PHASE() {
|
|
625
|
-
return 1
|
|
626
|
-
},
|
|
627
|
-
|
|
628
|
-
/**
|
|
629
|
-
* Constant of AT_TARGET.
|
|
630
|
-
* @type {number}
|
|
631
|
-
*/
|
|
632
|
-
get AT_TARGET() {
|
|
633
|
-
return 2
|
|
634
|
-
},
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Constant of BUBBLING_PHASE.
|
|
638
|
-
* @type {number}
|
|
639
|
-
*/
|
|
640
|
-
get BUBBLING_PHASE() {
|
|
641
|
-
return 3
|
|
642
|
-
},
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* The target of this event.
|
|
646
|
-
* @type {number}
|
|
647
|
-
*/
|
|
648
|
-
get eventPhase() {
|
|
649
|
-
return pd(this).eventPhase
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Stop event bubbling.
|
|
654
|
-
* @returns {void}
|
|
655
|
-
*/
|
|
656
|
-
stopPropagation() {
|
|
657
|
-
const data = pd(this);
|
|
658
|
-
|
|
659
|
-
data.stopped = true;
|
|
660
|
-
if (typeof data.event.stopPropagation === "function") {
|
|
661
|
-
data.event.stopPropagation();
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* Stop event bubbling.
|
|
667
|
-
* @returns {void}
|
|
668
|
-
*/
|
|
669
|
-
stopImmediatePropagation() {
|
|
670
|
-
const data = pd(this);
|
|
671
|
-
|
|
672
|
-
data.stopped = true;
|
|
673
|
-
data.immediateStopped = true;
|
|
674
|
-
if (typeof data.event.stopImmediatePropagation === "function") {
|
|
675
|
-
data.event.stopImmediatePropagation();
|
|
676
|
-
}
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* The flag to be bubbling.
|
|
681
|
-
* @type {boolean}
|
|
682
|
-
*/
|
|
683
|
-
get bubbles() {
|
|
684
|
-
return Boolean(pd(this).event.bubbles)
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* The flag to be cancelable.
|
|
689
|
-
* @type {boolean}
|
|
690
|
-
*/
|
|
691
|
-
get cancelable() {
|
|
692
|
-
return Boolean(pd(this).event.cancelable)
|
|
693
|
-
},
|
|
694
|
-
|
|
695
|
-
/**
|
|
696
|
-
* Cancel this event.
|
|
697
|
-
* @returns {void}
|
|
698
|
-
*/
|
|
699
|
-
preventDefault() {
|
|
700
|
-
setCancelFlag(pd(this));
|
|
701
|
-
},
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* The flag to indicate cancellation state.
|
|
705
|
-
* @type {boolean}
|
|
706
|
-
*/
|
|
707
|
-
get defaultPrevented() {
|
|
708
|
-
return pd(this).canceled
|
|
709
|
-
},
|
|
710
|
-
|
|
711
|
-
/**
|
|
712
|
-
* The flag to be composed.
|
|
713
|
-
* @type {boolean}
|
|
714
|
-
*/
|
|
715
|
-
get composed() {
|
|
716
|
-
return Boolean(pd(this).event.composed)
|
|
717
|
-
},
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* The unix time of this event.
|
|
721
|
-
* @type {number}
|
|
722
|
-
*/
|
|
723
|
-
get timeStamp() {
|
|
724
|
-
return pd(this).timeStamp
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
/**
|
|
728
|
-
* The target of this event.
|
|
729
|
-
* @type {EventTarget}
|
|
730
|
-
* @deprecated
|
|
731
|
-
*/
|
|
732
|
-
get srcElement() {
|
|
733
|
-
return pd(this).eventTarget
|
|
734
|
-
},
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* The flag to stop event bubbling.
|
|
738
|
-
* @type {boolean}
|
|
739
|
-
* @deprecated
|
|
740
|
-
*/
|
|
741
|
-
get cancelBubble() {
|
|
742
|
-
return pd(this).stopped
|
|
743
|
-
},
|
|
744
|
-
set cancelBubble(value) {
|
|
745
|
-
if (!value) {
|
|
746
|
-
return
|
|
747
|
-
}
|
|
748
|
-
const data = pd(this);
|
|
749
|
-
|
|
750
|
-
data.stopped = true;
|
|
751
|
-
if (typeof data.event.cancelBubble === "boolean") {
|
|
752
|
-
data.event.cancelBubble = true;
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
|
|
756
|
-
/**
|
|
757
|
-
* The flag to indicate cancellation state.
|
|
758
|
-
* @type {boolean}
|
|
759
|
-
* @deprecated
|
|
760
|
-
*/
|
|
761
|
-
get returnValue() {
|
|
762
|
-
return !pd(this).canceled
|
|
763
|
-
},
|
|
764
|
-
set returnValue(value) {
|
|
765
|
-
if (!value) {
|
|
766
|
-
setCancelFlag(pd(this));
|
|
767
|
-
}
|
|
768
|
-
},
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Initialize this event object. But do nothing under event dispatching.
|
|
772
|
-
* @param {string} type The event type.
|
|
773
|
-
* @param {boolean} [bubbles=false] The flag to be possible to bubble up.
|
|
774
|
-
* @param {boolean} [cancelable=false] The flag to be possible to cancel.
|
|
775
|
-
* @deprecated
|
|
776
|
-
*/
|
|
777
|
-
initEvent() {
|
|
778
|
-
// Do nothing.
|
|
779
|
-
},
|
|
780
|
-
};
|
|
781
|
-
|
|
782
|
-
// `constructor` is not enumerable.
|
|
783
|
-
Object.defineProperty(Event$1.prototype, "constructor", {
|
|
784
|
-
value: Event$1,
|
|
785
|
-
configurable: true,
|
|
786
|
-
writable: true,
|
|
787
|
-
});
|
|
788
|
-
|
|
789
|
-
// Ensure `event instanceof window.Event` is `true`.
|
|
790
|
-
if (typeof window !== "undefined" && typeof window.Event !== "undefined") {
|
|
791
|
-
Object.setPrototypeOf(Event$1.prototype, window.Event.prototype);
|
|
792
|
-
|
|
793
|
-
// Make association for wrappers.
|
|
794
|
-
wrappers.set(window.Event.prototype, Event$1);
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* Get the property descriptor to redirect a given property.
|
|
799
|
-
* @param {string} key Property name to define property descriptor.
|
|
800
|
-
* @returns {PropertyDescriptor} The property descriptor to redirect the property.
|
|
801
|
-
* @private
|
|
802
|
-
*/
|
|
803
|
-
function defineRedirectDescriptor(key) {
|
|
804
|
-
return {
|
|
805
|
-
get() {
|
|
806
|
-
return pd(this).event[key]
|
|
807
|
-
},
|
|
808
|
-
set(value) {
|
|
809
|
-
pd(this).event[key] = value;
|
|
810
|
-
},
|
|
811
|
-
configurable: true,
|
|
812
|
-
enumerable: true,
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* Get the property descriptor to call a given method property.
|
|
818
|
-
* @param {string} key Property name to define property descriptor.
|
|
819
|
-
* @returns {PropertyDescriptor} The property descriptor to call the method property.
|
|
820
|
-
* @private
|
|
821
|
-
*/
|
|
822
|
-
function defineCallDescriptor(key) {
|
|
823
|
-
return {
|
|
824
|
-
value() {
|
|
825
|
-
const event = pd(this).event;
|
|
826
|
-
return event[key].apply(event, arguments)
|
|
827
|
-
},
|
|
828
|
-
configurable: true,
|
|
829
|
-
enumerable: true,
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Define new wrapper class.
|
|
835
|
-
* @param {Function} BaseEvent The base wrapper class.
|
|
836
|
-
* @param {Object} proto The prototype of the original event.
|
|
837
|
-
* @returns {Function} The defined wrapper class.
|
|
838
|
-
* @private
|
|
839
|
-
*/
|
|
840
|
-
function defineWrapper(BaseEvent, proto) {
|
|
841
|
-
const keys = Object.keys(proto);
|
|
842
|
-
if (keys.length === 0) {
|
|
843
|
-
return BaseEvent
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
/** CustomEvent */
|
|
847
|
-
function CustomEvent(eventTarget, event) {
|
|
848
|
-
BaseEvent.call(this, eventTarget, event);
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
CustomEvent.prototype = Object.create(BaseEvent.prototype, {
|
|
852
|
-
constructor: { value: CustomEvent, configurable: true, writable: true },
|
|
853
|
-
});
|
|
854
|
-
|
|
855
|
-
// Define accessors.
|
|
856
|
-
for (let i = 0; i < keys.length; ++i) {
|
|
857
|
-
const key = keys[i];
|
|
858
|
-
if (!(key in BaseEvent.prototype)) {
|
|
859
|
-
const descriptor = Object.getOwnPropertyDescriptor(proto, key);
|
|
860
|
-
const isFunc = typeof descriptor.value === "function";
|
|
861
|
-
Object.defineProperty(
|
|
862
|
-
CustomEvent.prototype,
|
|
863
|
-
key,
|
|
864
|
-
isFunc
|
|
865
|
-
? defineCallDescriptor(key)
|
|
866
|
-
: defineRedirectDescriptor(key)
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
return CustomEvent
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
/**
|
|
875
|
-
* Get the wrapper class of a given prototype.
|
|
876
|
-
* @param {Object} proto The prototype of the original event to get its wrapper.
|
|
877
|
-
* @returns {Function} The wrapper class.
|
|
878
|
-
* @private
|
|
879
|
-
*/
|
|
880
|
-
function getWrapper(proto) {
|
|
881
|
-
if (proto == null || proto === Object.prototype) {
|
|
882
|
-
return Event$1
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
let wrapper = wrappers.get(proto);
|
|
886
|
-
if (wrapper == null) {
|
|
887
|
-
wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto);
|
|
888
|
-
wrappers.set(proto, wrapper);
|
|
889
|
-
}
|
|
890
|
-
return wrapper
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
/**
|
|
894
|
-
* Wrap a given event to management a dispatching.
|
|
895
|
-
* @param {EventTarget} eventTarget The event target of this dispatching.
|
|
896
|
-
* @param {Object} event The event to wrap.
|
|
897
|
-
* @returns {Event} The wrapper instance.
|
|
898
|
-
* @private
|
|
899
|
-
*/
|
|
900
|
-
function wrapEvent(eventTarget, event) {
|
|
901
|
-
const Wrapper = getWrapper(Object.getPrototypeOf(event));
|
|
902
|
-
return new Wrapper(eventTarget, event)
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Get the immediateStopped flag of a given event.
|
|
907
|
-
* @param {Event} event The event to get.
|
|
908
|
-
* @returns {boolean} The flag to stop propagation immediately.
|
|
909
|
-
* @private
|
|
910
|
-
*/
|
|
911
|
-
function isStopped(event) {
|
|
912
|
-
return pd(event).immediateStopped
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* Set the current event phase of a given event.
|
|
917
|
-
* @param {Event} event The event to set current target.
|
|
918
|
-
* @param {number} eventPhase New event phase.
|
|
919
|
-
* @returns {void}
|
|
920
|
-
* @private
|
|
921
|
-
*/
|
|
922
|
-
function setEventPhase(event, eventPhase) {
|
|
923
|
-
pd(event).eventPhase = eventPhase;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
/**
|
|
927
|
-
* Set the current target of a given event.
|
|
928
|
-
* @param {Event} event The event to set current target.
|
|
929
|
-
* @param {EventTarget|null} currentTarget New current target.
|
|
930
|
-
* @returns {void}
|
|
931
|
-
* @private
|
|
932
|
-
*/
|
|
933
|
-
function setCurrentTarget(event, currentTarget) {
|
|
934
|
-
pd(event).currentTarget = currentTarget;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
/**
|
|
938
|
-
* Set a passive listener of a given event.
|
|
939
|
-
* @param {Event} event The event to set current target.
|
|
940
|
-
* @param {Function|null} passiveListener New passive listener.
|
|
941
|
-
* @returns {void}
|
|
942
|
-
* @private
|
|
943
|
-
*/
|
|
944
|
-
function setPassiveListener(event, passiveListener) {
|
|
945
|
-
pd(event).passiveListener = passiveListener;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* @typedef {object} ListenerNode
|
|
950
|
-
* @property {Function} listener
|
|
951
|
-
* @property {1|2|3} listenerType
|
|
952
|
-
* @property {boolean} passive
|
|
953
|
-
* @property {boolean} once
|
|
954
|
-
* @property {ListenerNode|null} next
|
|
955
|
-
* @private
|
|
956
|
-
*/
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* @type {WeakMap<object, Map<string, ListenerNode>>}
|
|
960
|
-
* @private
|
|
961
|
-
*/
|
|
962
|
-
const listenersMap = new WeakMap();
|
|
963
|
-
|
|
964
|
-
// Listener types
|
|
965
|
-
const CAPTURE = 1;
|
|
966
|
-
const BUBBLE = 2;
|
|
967
|
-
const ATTRIBUTE = 3;
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* Check whether a given value is an object or not.
|
|
971
|
-
* @param {any} x The value to check.
|
|
972
|
-
* @returns {boolean} `true` if the value is an object.
|
|
973
|
-
*/
|
|
974
|
-
function isObject(x) {
|
|
975
|
-
return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/**
|
|
979
|
-
* Get listeners.
|
|
980
|
-
* @param {EventTarget} eventTarget The event target to get.
|
|
981
|
-
* @returns {Map<string, ListenerNode>} The listeners.
|
|
982
|
-
* @private
|
|
983
|
-
*/
|
|
984
|
-
function getListeners(eventTarget) {
|
|
985
|
-
const listeners = listenersMap.get(eventTarget);
|
|
986
|
-
if (listeners == null) {
|
|
987
|
-
throw new TypeError(
|
|
988
|
-
"'this' is expected an EventTarget object, but got another value."
|
|
989
|
-
)
|
|
990
|
-
}
|
|
991
|
-
return listeners
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/**
|
|
995
|
-
* Get the property descriptor for the event attribute of a given event.
|
|
996
|
-
* @param {string} eventName The event name to get property descriptor.
|
|
997
|
-
* @returns {PropertyDescriptor} The property descriptor.
|
|
998
|
-
* @private
|
|
999
|
-
*/
|
|
1000
|
-
function defineEventAttributeDescriptor(eventName) {
|
|
1001
|
-
return {
|
|
1002
|
-
get() {
|
|
1003
|
-
const listeners = getListeners(this);
|
|
1004
|
-
let node = listeners.get(eventName);
|
|
1005
|
-
while (node != null) {
|
|
1006
|
-
if (node.listenerType === ATTRIBUTE) {
|
|
1007
|
-
return node.listener
|
|
1008
|
-
}
|
|
1009
|
-
node = node.next;
|
|
1010
|
-
}
|
|
1011
|
-
return null
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
set(listener) {
|
|
1015
|
-
if (typeof listener !== "function" && !isObject(listener)) {
|
|
1016
|
-
listener = null; // eslint-disable-line no-param-reassign
|
|
1017
|
-
}
|
|
1018
|
-
const listeners = getListeners(this);
|
|
1019
|
-
|
|
1020
|
-
// Traverse to the tail while removing old value.
|
|
1021
|
-
let prev = null;
|
|
1022
|
-
let node = listeners.get(eventName);
|
|
1023
|
-
while (node != null) {
|
|
1024
|
-
if (node.listenerType === ATTRIBUTE) {
|
|
1025
|
-
// Remove old value.
|
|
1026
|
-
if (prev !== null) {
|
|
1027
|
-
prev.next = node.next;
|
|
1028
|
-
} else if (node.next !== null) {
|
|
1029
|
-
listeners.set(eventName, node.next);
|
|
1030
|
-
} else {
|
|
1031
|
-
listeners.delete(eventName);
|
|
1032
|
-
}
|
|
1033
|
-
} else {
|
|
1034
|
-
prev = node;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
node = node.next;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
// Add new value.
|
|
1041
|
-
if (listener !== null) {
|
|
1042
|
-
const newNode = {
|
|
1043
|
-
listener,
|
|
1044
|
-
listenerType: ATTRIBUTE,
|
|
1045
|
-
passive: false,
|
|
1046
|
-
once: false,
|
|
1047
|
-
next: null,
|
|
1048
|
-
};
|
|
1049
|
-
if (prev === null) {
|
|
1050
|
-
listeners.set(eventName, newNode);
|
|
1051
|
-
} else {
|
|
1052
|
-
prev.next = newNode;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
},
|
|
1056
|
-
configurable: true,
|
|
1057
|
-
enumerable: true,
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
|
|
1061
|
-
/**
|
|
1062
|
-
* Define an event attribute (e.g. `eventTarget.onclick`).
|
|
1063
|
-
* @param {Object} eventTargetPrototype The event target prototype to define an event attrbite.
|
|
1064
|
-
* @param {string} eventName The event name to define.
|
|
1065
|
-
* @returns {void}
|
|
1066
|
-
*/
|
|
1067
|
-
function defineEventAttribute(eventTargetPrototype, eventName) {
|
|
1068
|
-
Object.defineProperty(
|
|
1069
|
-
eventTargetPrototype,
|
|
1070
|
-
`on${eventName}`,
|
|
1071
|
-
defineEventAttributeDescriptor(eventName)
|
|
1072
|
-
);
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
/**
|
|
1076
|
-
* Define a custom EventTarget with event attributes.
|
|
1077
|
-
* @param {string[]} eventNames Event names for event attributes.
|
|
1078
|
-
* @returns {EventTarget} The custom EventTarget.
|
|
1079
|
-
* @private
|
|
1080
|
-
*/
|
|
1081
|
-
function defineCustomEventTarget(eventNames) {
|
|
1082
|
-
/** CustomEventTarget */
|
|
1083
|
-
function CustomEventTarget() {
|
|
1084
|
-
EventTarget$1.call(this);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
CustomEventTarget.prototype = Object.create(EventTarget$1.prototype, {
|
|
1088
|
-
constructor: {
|
|
1089
|
-
value: CustomEventTarget,
|
|
1090
|
-
configurable: true,
|
|
1091
|
-
writable: true,
|
|
1092
|
-
},
|
|
1093
|
-
});
|
|
1094
|
-
|
|
1095
|
-
for (let i = 0; i < eventNames.length; ++i) {
|
|
1096
|
-
defineEventAttribute(CustomEventTarget.prototype, eventNames[i]);
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
return CustomEventTarget
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* EventTarget.
|
|
1104
|
-
*
|
|
1105
|
-
* - This is constructor if no arguments.
|
|
1106
|
-
* - This is a function which returns a CustomEventTarget constructor if there are arguments.
|
|
1107
|
-
*
|
|
1108
|
-
* For example:
|
|
1109
|
-
*
|
|
1110
|
-
* class A extends EventTarget {}
|
|
1111
|
-
* class B extends EventTarget("message") {}
|
|
1112
|
-
* class C extends EventTarget("message", "error") {}
|
|
1113
|
-
* class D extends EventTarget(["message", "error"]) {}
|
|
1114
|
-
*/
|
|
1115
|
-
function EventTarget$1() {
|
|
1116
|
-
/*eslint-disable consistent-return */
|
|
1117
|
-
if (this instanceof EventTarget$1) {
|
|
1118
|
-
listenersMap.set(this, new Map());
|
|
1119
|
-
return
|
|
1120
|
-
}
|
|
1121
|
-
if (arguments.length === 1 && Array.isArray(arguments[0])) {
|
|
1122
|
-
return defineCustomEventTarget(arguments[0])
|
|
1123
|
-
}
|
|
1124
|
-
if (arguments.length > 0) {
|
|
1125
|
-
const types = new Array(arguments.length);
|
|
1126
|
-
for (let i = 0; i < arguments.length; ++i) {
|
|
1127
|
-
types[i] = arguments[i];
|
|
1128
|
-
}
|
|
1129
|
-
return defineCustomEventTarget(types)
|
|
1130
|
-
}
|
|
1131
|
-
throw new TypeError("Cannot call a class as a function")
|
|
1132
|
-
/*eslint-enable consistent-return */
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
// Should be enumerable, but class methods are not enumerable.
|
|
1136
|
-
EventTarget$1.prototype = {
|
|
1137
|
-
/**
|
|
1138
|
-
* Add a given listener to this event target.
|
|
1139
|
-
* @param {string} eventName The event name to add.
|
|
1140
|
-
* @param {Function} listener The listener to add.
|
|
1141
|
-
* @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.
|
|
1142
|
-
* @returns {void}
|
|
1143
|
-
*/
|
|
1144
|
-
addEventListener(eventName, listener, options) {
|
|
1145
|
-
if (listener == null) {
|
|
1146
|
-
return
|
|
1147
|
-
}
|
|
1148
|
-
if (typeof listener !== "function" && !isObject(listener)) {
|
|
1149
|
-
throw new TypeError("'listener' should be a function or an object.")
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
const listeners = getListeners(this);
|
|
1153
|
-
const optionsIsObj = isObject(options);
|
|
1154
|
-
const capture = optionsIsObj
|
|
1155
|
-
? Boolean(options.capture)
|
|
1156
|
-
: Boolean(options);
|
|
1157
|
-
const listenerType = capture ? CAPTURE : BUBBLE;
|
|
1158
|
-
const newNode = {
|
|
1159
|
-
listener,
|
|
1160
|
-
listenerType,
|
|
1161
|
-
passive: optionsIsObj && Boolean(options.passive),
|
|
1162
|
-
once: optionsIsObj && Boolean(options.once),
|
|
1163
|
-
next: null,
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
// Set it as the first node if the first node is null.
|
|
1167
|
-
let node = listeners.get(eventName);
|
|
1168
|
-
if (node === undefined) {
|
|
1169
|
-
listeners.set(eventName, newNode);
|
|
1170
|
-
return
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
// Traverse to the tail while checking duplication..
|
|
1174
|
-
let prev = null;
|
|
1175
|
-
while (node != null) {
|
|
1176
|
-
if (
|
|
1177
|
-
node.listener === listener &&
|
|
1178
|
-
node.listenerType === listenerType
|
|
1179
|
-
) {
|
|
1180
|
-
// Should ignore duplication.
|
|
1181
|
-
return
|
|
1182
|
-
}
|
|
1183
|
-
prev = node;
|
|
1184
|
-
node = node.next;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
// Add it.
|
|
1188
|
-
prev.next = newNode;
|
|
1189
|
-
},
|
|
1190
|
-
|
|
1191
|
-
/**
|
|
1192
|
-
* Remove a given listener from this event target.
|
|
1193
|
-
* @param {string} eventName The event name to remove.
|
|
1194
|
-
* @param {Function} listener The listener to remove.
|
|
1195
|
-
* @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener.
|
|
1196
|
-
* @returns {void}
|
|
1197
|
-
*/
|
|
1198
|
-
removeEventListener(eventName, listener, options) {
|
|
1199
|
-
if (listener == null) {
|
|
1200
|
-
return
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
const listeners = getListeners(this);
|
|
1204
|
-
const capture = isObject(options)
|
|
1205
|
-
? Boolean(options.capture)
|
|
1206
|
-
: Boolean(options);
|
|
1207
|
-
const listenerType = capture ? CAPTURE : BUBBLE;
|
|
1208
|
-
|
|
1209
|
-
let prev = null;
|
|
1210
|
-
let node = listeners.get(eventName);
|
|
1211
|
-
while (node != null) {
|
|
1212
|
-
if (
|
|
1213
|
-
node.listener === listener &&
|
|
1214
|
-
node.listenerType === listenerType
|
|
1215
|
-
) {
|
|
1216
|
-
if (prev !== null) {
|
|
1217
|
-
prev.next = node.next;
|
|
1218
|
-
} else if (node.next !== null) {
|
|
1219
|
-
listeners.set(eventName, node.next);
|
|
1220
|
-
} else {
|
|
1221
|
-
listeners.delete(eventName);
|
|
1222
|
-
}
|
|
1223
|
-
return
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
prev = node;
|
|
1227
|
-
node = node.next;
|
|
1228
|
-
}
|
|
1229
|
-
},
|
|
1230
|
-
|
|
1231
|
-
/**
|
|
1232
|
-
* Dispatch a given event.
|
|
1233
|
-
* @param {Event|{type:string}} event The event to dispatch.
|
|
1234
|
-
* @returns {boolean} `false` if canceled.
|
|
1235
|
-
*/
|
|
1236
|
-
dispatchEvent(event) {
|
|
1237
|
-
if (event == null || typeof event.type !== "string") {
|
|
1238
|
-
throw new TypeError('"event.type" should be a string.')
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
// If listeners aren't registered, terminate.
|
|
1242
|
-
const listeners = getListeners(this);
|
|
1243
|
-
const eventName = event.type;
|
|
1244
|
-
let node = listeners.get(eventName);
|
|
1245
|
-
if (node == null) {
|
|
1246
|
-
return true
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
// Since we cannot rewrite several properties, so wrap object.
|
|
1250
|
-
const wrappedEvent = wrapEvent(this, event);
|
|
1251
|
-
|
|
1252
|
-
// This doesn't process capturing phase and bubbling phase.
|
|
1253
|
-
// This isn't participating in a tree.
|
|
1254
|
-
let prev = null;
|
|
1255
|
-
while (node != null) {
|
|
1256
|
-
// Remove this listener if it's once
|
|
1257
|
-
if (node.once) {
|
|
1258
|
-
if (prev !== null) {
|
|
1259
|
-
prev.next = node.next;
|
|
1260
|
-
} else if (node.next !== null) {
|
|
1261
|
-
listeners.set(eventName, node.next);
|
|
1262
|
-
} else {
|
|
1263
|
-
listeners.delete(eventName);
|
|
1264
|
-
}
|
|
1265
|
-
} else {
|
|
1266
|
-
prev = node;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
// Call this listener
|
|
1270
|
-
setPassiveListener(
|
|
1271
|
-
wrappedEvent,
|
|
1272
|
-
node.passive ? node.listener : null
|
|
1273
|
-
);
|
|
1274
|
-
if (typeof node.listener === "function") {
|
|
1275
|
-
try {
|
|
1276
|
-
node.listener.call(this, wrappedEvent);
|
|
1277
|
-
} catch (err) {
|
|
1278
|
-
if (
|
|
1279
|
-
typeof console !== "undefined" &&
|
|
1280
|
-
typeof console.error === "function"
|
|
1281
|
-
) {
|
|
1282
|
-
console.error(err);
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
} else if (
|
|
1286
|
-
node.listenerType !== ATTRIBUTE &&
|
|
1287
|
-
typeof node.listener.handleEvent === "function"
|
|
1288
|
-
) {
|
|
1289
|
-
node.listener.handleEvent(wrappedEvent);
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
// Break if `event.stopImmediatePropagation` was called.
|
|
1293
|
-
if (isStopped(wrappedEvent)) {
|
|
1294
|
-
break
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
node = node.next;
|
|
1298
|
-
}
|
|
1299
|
-
setPassiveListener(wrappedEvent, null);
|
|
1300
|
-
setEventPhase(wrappedEvent, 0);
|
|
1301
|
-
setCurrentTarget(wrappedEvent, null);
|
|
1302
|
-
|
|
1303
|
-
return !wrappedEvent.defaultPrevented
|
|
1304
|
-
},
|
|
1305
|
-
};
|
|
1306
|
-
|
|
1307
|
-
// `constructor` is not enumerable.
|
|
1308
|
-
Object.defineProperty(EventTarget$1.prototype, "constructor", {
|
|
1309
|
-
value: EventTarget$1,
|
|
1310
|
-
configurable: true,
|
|
1311
|
-
writable: true,
|
|
1312
|
-
});
|
|
1313
|
-
|
|
1314
|
-
// Ensure `eventTarget instanceof window.EventTarget` is `true`.
|
|
1315
|
-
if (
|
|
1316
|
-
typeof window !== "undefined" &&
|
|
1317
|
-
typeof window.EventTarget !== "undefined"
|
|
1318
|
-
) {
|
|
1319
|
-
Object.setPrototypeOf(EventTarget$1.prototype, window.EventTarget.prototype);
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
/**
|
|
1323
|
-
* @author Toru Nagashima <https://github.com/mysticatea>
|
|
1324
|
-
* See LICENSE file in root directory for full license.
|
|
1325
|
-
*/
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* The signal class.
|
|
1329
|
-
* @see https://dom.spec.whatwg.org/#abortsignal
|
|
1330
|
-
*/
|
|
1331
|
-
class AbortSignal extends EventTarget$1 {
|
|
1332
|
-
/**
|
|
1333
|
-
* AbortSignal cannot be constructed directly.
|
|
1334
|
-
*/
|
|
1335
|
-
constructor() {
|
|
1336
|
-
super();
|
|
1337
|
-
throw new TypeError("AbortSignal cannot be constructed directly");
|
|
1338
|
-
}
|
|
1339
|
-
/**
|
|
1340
|
-
* Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise.
|
|
1341
|
-
*/
|
|
1342
|
-
get aborted() {
|
|
1343
|
-
const aborted = abortedFlags.get(this);
|
|
1344
|
-
if (typeof aborted !== "boolean") {
|
|
1345
|
-
throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`);
|
|
1346
|
-
}
|
|
1347
|
-
return aborted;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
defineEventAttribute(AbortSignal.prototype, "abort");
|
|
1351
|
-
/**
|
|
1352
|
-
* Create an AbortSignal object.
|
|
1353
|
-
*/
|
|
1354
|
-
function createAbortSignal() {
|
|
1355
|
-
const signal = Object.create(AbortSignal.prototype);
|
|
1356
|
-
EventTarget$1.call(signal);
|
|
1357
|
-
abortedFlags.set(signal, false);
|
|
1358
|
-
return signal;
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Abort a given signal.
|
|
1362
|
-
*/
|
|
1363
|
-
function abortSignal(signal) {
|
|
1364
|
-
if (abortedFlags.get(signal) !== false) {
|
|
1365
|
-
return;
|
|
1366
|
-
}
|
|
1367
|
-
abortedFlags.set(signal, true);
|
|
1368
|
-
signal.dispatchEvent({ type: "abort" });
|
|
1369
|
-
}
|
|
1370
|
-
/**
|
|
1371
|
-
* Aborted flag for each instances.
|
|
1372
|
-
*/
|
|
1373
|
-
const abortedFlags = new WeakMap();
|
|
1374
|
-
// Properties should be enumerable.
|
|
1375
|
-
Object.defineProperties(AbortSignal.prototype, {
|
|
1376
|
-
aborted: { enumerable: true },
|
|
1377
|
-
});
|
|
1378
|
-
// `toString()` should return `"[object AbortSignal]"`
|
|
1379
|
-
if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
|
|
1380
|
-
Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, {
|
|
1381
|
-
configurable: true,
|
|
1382
|
-
value: "AbortSignal",
|
|
1383
|
-
});
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* The AbortController.
|
|
1388
|
-
* @see https://dom.spec.whatwg.org/#abortcontroller
|
|
1389
|
-
*/
|
|
1390
|
-
class AbortController {
|
|
1391
|
-
/**
|
|
1392
|
-
* Initialize this controller.
|
|
1393
|
-
*/
|
|
1394
|
-
constructor() {
|
|
1395
|
-
signals.set(this, createAbortSignal());
|
|
1396
|
-
}
|
|
1397
|
-
/**
|
|
1398
|
-
* Returns the `AbortSignal` object associated with this object.
|
|
1399
|
-
*/
|
|
1400
|
-
get signal() {
|
|
1401
|
-
return getSignal(this);
|
|
1402
|
-
}
|
|
1403
|
-
/**
|
|
1404
|
-
* Abort and signal to any observers that the associated activity is to be aborted.
|
|
1405
|
-
*/
|
|
1406
|
-
abort() {
|
|
1407
|
-
abortSignal(getSignal(this));
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
/**
|
|
1411
|
-
* Associated signals.
|
|
1412
|
-
*/
|
|
1413
|
-
const signals = new WeakMap();
|
|
1414
|
-
/**
|
|
1415
|
-
* Get the associated signal of a given controller.
|
|
1416
|
-
*/
|
|
1417
|
-
function getSignal(controller) {
|
|
1418
|
-
const signal = signals.get(controller);
|
|
1419
|
-
if (signal == null) {
|
|
1420
|
-
throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`);
|
|
1421
|
-
}
|
|
1422
|
-
return signal;
|
|
1423
|
-
}
|
|
1424
|
-
// Properties should be enumerable.
|
|
1425
|
-
Object.defineProperties(AbortController.prototype, {
|
|
1426
|
-
signal: { enumerable: true },
|
|
1427
|
-
abort: { enumerable: true },
|
|
1428
|
-
});
|
|
1429
|
-
if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") {
|
|
1430
|
-
Object.defineProperty(AbortController.prototype, Symbol.toStringTag, {
|
|
1431
|
-
configurable: true,
|
|
1432
|
-
value: "AbortController",
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
/*globals self, window */
|
|
1437
|
-
|
|
1438
|
-
/*eslint-disable @mysticatea/prettier */
|
|
1439
|
-
const g =
|
|
1440
|
-
typeof self !== "undefined" ? self :
|
|
1441
|
-
typeof window !== "undefined" ? window :
|
|
1442
|
-
typeof global !== "undefined" ? global :
|
|
1443
|
-
/* otherwise */ undefined;
|
|
1444
|
-
/*eslint-enable @mysticatea/prettier */
|
|
1445
|
-
|
|
1446
|
-
if (g) {
|
|
1447
|
-
if (typeof g.AbortController === "undefined") {
|
|
1448
|
-
g.AbortController = AbortController;
|
|
1449
|
-
}
|
|
1450
|
-
if (typeof g.AbortSignal === "undefined") {
|
|
1451
|
-
g.AbortSignal = AbortSignal;
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
var urlPolyfill$1 = {};
|
|
1456
|
-
|
|
1457
|
-
var hasRequiredUrlPolyfill;
|
|
1458
|
-
|
|
1459
|
-
function requireUrlPolyfill () {
|
|
1460
|
-
if (hasRequiredUrlPolyfill) return urlPolyfill$1;
|
|
1461
|
-
hasRequiredUrlPolyfill = 1;
|
|
1462
|
-
(function(global) {
|
|
1463
|
-
/**
|
|
1464
|
-
* Polyfill URLSearchParams
|
|
1465
|
-
*
|
|
1466
|
-
* Inspired from : https://github.com/WebReflection/url-search-params/blob/master/src/url-search-params.js
|
|
1467
|
-
*/
|
|
1468
|
-
|
|
1469
|
-
var checkIfIteratorIsSupported = function() {
|
|
1470
|
-
try {
|
|
1471
|
-
return !!Symbol.iterator;
|
|
1472
|
-
} catch (error) {
|
|
1473
|
-
return false;
|
|
1474
|
-
}
|
|
1475
|
-
};
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
var iteratorSupported = checkIfIteratorIsSupported();
|
|
1479
|
-
|
|
1480
|
-
var createIterator = function(items) {
|
|
1481
|
-
var iterator = {
|
|
1482
|
-
next: function() {
|
|
1483
|
-
var value = items.shift();
|
|
1484
|
-
return { done: value === void 0, value: value };
|
|
1485
|
-
}
|
|
1486
|
-
};
|
|
1487
|
-
|
|
1488
|
-
if (iteratorSupported) {
|
|
1489
|
-
iterator[Symbol.iterator] = function() {
|
|
1490
|
-
return iterator;
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
return iterator;
|
|
1495
|
-
};
|
|
1496
|
-
|
|
1497
|
-
/**
|
|
1498
|
-
* Search param name and values should be encoded according to https://url.spec.whatwg.org/#urlencoded-serializing
|
|
1499
|
-
* encodeURIComponent() produces the same result except encoding spaces as `%20` instead of `+`.
|
|
1500
|
-
*/
|
|
1501
|
-
var serializeParam = function(value) {
|
|
1502
|
-
return encodeURIComponent(value).replace(/%20/g, '+');
|
|
1503
|
-
};
|
|
1504
|
-
|
|
1505
|
-
var deserializeParam = function(value) {
|
|
1506
|
-
return decodeURIComponent(String(value).replace(/\+/g, ' '));
|
|
1507
|
-
};
|
|
1508
|
-
|
|
1509
|
-
var polyfillURLSearchParams = function() {
|
|
1510
|
-
|
|
1511
|
-
var URLSearchParams = function(searchString) {
|
|
1512
|
-
Object.defineProperty(this, '_entries', { writable: true, value: {} });
|
|
1513
|
-
var typeofSearchString = typeof searchString;
|
|
1514
|
-
|
|
1515
|
-
if (typeofSearchString === 'undefined') {
|
|
1516
|
-
// do nothing
|
|
1517
|
-
} else if (typeofSearchString === 'string') {
|
|
1518
|
-
if (searchString !== '') {
|
|
1519
|
-
this._fromString(searchString);
|
|
1520
|
-
}
|
|
1521
|
-
} else if (searchString instanceof URLSearchParams) {
|
|
1522
|
-
var _this = this;
|
|
1523
|
-
searchString.forEach(function(value, name) {
|
|
1524
|
-
_this.append(name, value);
|
|
1525
|
-
});
|
|
1526
|
-
} else if ((searchString !== null) && (typeofSearchString === 'object')) {
|
|
1527
|
-
if (Object.prototype.toString.call(searchString) === '[object Array]') {
|
|
1528
|
-
for (var i = 0; i < searchString.length; i++) {
|
|
1529
|
-
var entry = searchString[i];
|
|
1530
|
-
if ((Object.prototype.toString.call(entry) === '[object Array]') || (entry.length !== 2)) {
|
|
1531
|
-
this.append(entry[0], entry[1]);
|
|
1532
|
-
} else {
|
|
1533
|
-
throw new TypeError('Expected [string, any] as entry at index ' + i + ' of URLSearchParams\'s input');
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
} else {
|
|
1537
|
-
for (var key in searchString) {
|
|
1538
|
-
if (searchString.hasOwnProperty(key)) {
|
|
1539
|
-
this.append(key, searchString[key]);
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1543
|
-
} else {
|
|
1544
|
-
throw new TypeError('Unsupported input\'s type for URLSearchParams');
|
|
1545
|
-
}
|
|
1546
|
-
};
|
|
1547
|
-
|
|
1548
|
-
var proto = URLSearchParams.prototype;
|
|
1549
|
-
|
|
1550
|
-
proto.append = function(name, value) {
|
|
1551
|
-
if (name in this._entries) {
|
|
1552
|
-
this._entries[name].push(String(value));
|
|
1553
|
-
} else {
|
|
1554
|
-
this._entries[name] = [String(value)];
|
|
1555
|
-
}
|
|
1556
|
-
};
|
|
1557
|
-
|
|
1558
|
-
proto.delete = function(name) {
|
|
1559
|
-
delete this._entries[name];
|
|
1560
|
-
};
|
|
1561
|
-
|
|
1562
|
-
proto.get = function(name) {
|
|
1563
|
-
return (name in this._entries) ? this._entries[name][0] : null;
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
proto.getAll = function(name) {
|
|
1567
|
-
return (name in this._entries) ? this._entries[name].slice(0) : [];
|
|
1568
|
-
};
|
|
1569
|
-
|
|
1570
|
-
proto.has = function(name) {
|
|
1571
|
-
return (name in this._entries);
|
|
1572
|
-
};
|
|
1573
|
-
|
|
1574
|
-
proto.set = function(name, value) {
|
|
1575
|
-
this._entries[name] = [String(value)];
|
|
1576
|
-
};
|
|
1577
|
-
|
|
1578
|
-
proto.forEach = function(callback, thisArg) {
|
|
1579
|
-
var entries;
|
|
1580
|
-
for (var name in this._entries) {
|
|
1581
|
-
if (this._entries.hasOwnProperty(name)) {
|
|
1582
|
-
entries = this._entries[name];
|
|
1583
|
-
for (var i = 0; i < entries.length; i++) {
|
|
1584
|
-
callback.call(thisArg, entries[i], name, this);
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
};
|
|
1589
|
-
|
|
1590
|
-
proto.keys = function() {
|
|
1591
|
-
var items = [];
|
|
1592
|
-
this.forEach(function(value, name) {
|
|
1593
|
-
items.push(name);
|
|
1594
|
-
});
|
|
1595
|
-
return createIterator(items);
|
|
1596
|
-
};
|
|
1597
|
-
|
|
1598
|
-
proto.values = function() {
|
|
1599
|
-
var items = [];
|
|
1600
|
-
this.forEach(function(value) {
|
|
1601
|
-
items.push(value);
|
|
1602
|
-
});
|
|
1603
|
-
return createIterator(items);
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
proto.entries = function() {
|
|
1607
|
-
var items = [];
|
|
1608
|
-
this.forEach(function(value, name) {
|
|
1609
|
-
items.push([name, value]);
|
|
1610
|
-
});
|
|
1611
|
-
return createIterator(items);
|
|
1612
|
-
};
|
|
1613
|
-
|
|
1614
|
-
if (iteratorSupported) {
|
|
1615
|
-
proto[Symbol.iterator] = proto.entries;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
proto.toString = function() {
|
|
1619
|
-
var searchArray = [];
|
|
1620
|
-
this.forEach(function(value, name) {
|
|
1621
|
-
searchArray.push(serializeParam(name) + '=' + serializeParam(value));
|
|
1622
|
-
});
|
|
1623
|
-
return searchArray.join('&');
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
|
-
Object.defineProperty(proto, 'size', {
|
|
1627
|
-
get: function () {
|
|
1628
|
-
return this._entries ? Object.keys(this._entries).length : 0;
|
|
1629
|
-
}
|
|
1630
|
-
});
|
|
1631
|
-
|
|
1632
|
-
global.URLSearchParams = URLSearchParams;
|
|
1633
|
-
};
|
|
1634
|
-
|
|
1635
|
-
var checkIfURLSearchParamsSupported = function() {
|
|
1636
|
-
try {
|
|
1637
|
-
var URLSearchParams = global.URLSearchParams;
|
|
1638
|
-
|
|
1639
|
-
return (
|
|
1640
|
-
(new URLSearchParams('?a=1').toString() === 'a=1') &&
|
|
1641
|
-
(typeof URLSearchParams.prototype.set === 'function') &&
|
|
1642
|
-
(typeof URLSearchParams.prototype.entries === 'function')
|
|
1643
|
-
);
|
|
1644
|
-
} catch (e) {
|
|
1645
|
-
return false;
|
|
1646
|
-
}
|
|
1647
|
-
};
|
|
1648
|
-
|
|
1649
|
-
if (!checkIfURLSearchParamsSupported()) {
|
|
1650
|
-
polyfillURLSearchParams();
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
var proto = global.URLSearchParams.prototype;
|
|
1654
|
-
|
|
1655
|
-
if (typeof proto.sort !== 'function') {
|
|
1656
|
-
proto.sort = function() {
|
|
1657
|
-
var _this = this;
|
|
1658
|
-
var items = [];
|
|
1659
|
-
this.forEach(function(value, name) {
|
|
1660
|
-
items.push([name, value]);
|
|
1661
|
-
if (!_this._entries) {
|
|
1662
|
-
_this.delete(name);
|
|
1663
|
-
}
|
|
1664
|
-
});
|
|
1665
|
-
items.sort(function(a, b) {
|
|
1666
|
-
if (a[0] < b[0]) {
|
|
1667
|
-
return -1;
|
|
1668
|
-
} else if (a[0] > b[0]) {
|
|
1669
|
-
return +1;
|
|
1670
|
-
} else {
|
|
1671
|
-
return 0;
|
|
1672
|
-
}
|
|
1673
|
-
});
|
|
1674
|
-
if (_this._entries) { // force reset because IE keeps keys index
|
|
1675
|
-
_this._entries = {};
|
|
1676
|
-
}
|
|
1677
|
-
for (var i = 0; i < items.length; i++) {
|
|
1678
|
-
this.append(items[i][0], items[i][1]);
|
|
1679
|
-
}
|
|
1680
|
-
};
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
if (typeof proto._fromString !== 'function') {
|
|
1684
|
-
Object.defineProperty(proto, '_fromString', {
|
|
1685
|
-
enumerable: false,
|
|
1686
|
-
configurable: false,
|
|
1687
|
-
writable: false,
|
|
1688
|
-
value: function(searchString) {
|
|
1689
|
-
if (this._entries) {
|
|
1690
|
-
this._entries = {};
|
|
1691
|
-
} else {
|
|
1692
|
-
var keys = [];
|
|
1693
|
-
this.forEach(function(value, name) {
|
|
1694
|
-
keys.push(name);
|
|
1695
|
-
});
|
|
1696
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1697
|
-
this.delete(keys[i]);
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
searchString = searchString.replace(/^\?/, '');
|
|
1702
|
-
var attributes = searchString.split('&');
|
|
1703
|
-
var attribute;
|
|
1704
|
-
for (var i = 0; i < attributes.length; i++) {
|
|
1705
|
-
attribute = attributes[i].split('=');
|
|
1706
|
-
this.append(
|
|
1707
|
-
deserializeParam(attribute[0]),
|
|
1708
|
-
(attribute.length > 1) ? deserializeParam(attribute.slice(1).join('=')) : ''
|
|
1709
|
-
);
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
// HTMLAnchorElement
|
|
1716
|
-
|
|
1717
|
-
})(
|
|
1718
|
-
(typeof commonjsGlobal !== 'undefined') ? commonjsGlobal
|
|
1719
|
-
: ((typeof window !== 'undefined') ? window
|
|
1720
|
-
: ((typeof self !== 'undefined') ? self : urlPolyfill$1))
|
|
1721
|
-
);
|
|
1722
|
-
|
|
1723
|
-
(function(global) {
|
|
1724
|
-
/**
|
|
1725
|
-
* Polyfill URL
|
|
1726
|
-
*
|
|
1727
|
-
* Inspired from : https://github.com/arv/DOM-URL-Polyfill/blob/master/src/url.js
|
|
1728
|
-
*/
|
|
1729
|
-
|
|
1730
|
-
var checkIfURLIsSupported = function() {
|
|
1731
|
-
try {
|
|
1732
|
-
var u = new global.URL('b', 'http://a');
|
|
1733
|
-
u.pathname = 'c d';
|
|
1734
|
-
return (u.href === 'http://a/c%20d') && u.searchParams;
|
|
1735
|
-
} catch (e) {
|
|
1736
|
-
return false;
|
|
1737
|
-
}
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
var polyfillURL = function() {
|
|
1742
|
-
var _URL = global.URL;
|
|
1743
|
-
|
|
1744
|
-
var URL = function(url, base) {
|
|
1745
|
-
if (typeof url !== 'string') url = String(url);
|
|
1746
|
-
if (base && typeof base !== 'string') base = String(base);
|
|
1747
|
-
|
|
1748
|
-
// Only create another document if the base is different from current location.
|
|
1749
|
-
var doc = document, baseElement;
|
|
1750
|
-
if (base && (global.location === void 0 || base !== global.location.href)) {
|
|
1751
|
-
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
|
|
1752
|
-
if (isIE11) {
|
|
1753
|
-
base = base.toLowerCase();
|
|
1754
|
-
}
|
|
1755
|
-
doc = document.implementation.createHTMLDocument('');
|
|
1756
|
-
baseElement = doc.createElement('base');
|
|
1757
|
-
baseElement.href = base;
|
|
1758
|
-
doc.head.appendChild(baseElement);
|
|
1759
|
-
try {
|
|
1760
|
-
if (baseElement.href.indexOf(base) !== 0) throw new Error(baseElement.href);
|
|
1761
|
-
} catch (err) {
|
|
1762
|
-
throw new Error('URL unable to set base ' + base + ' due to ' + err);
|
|
1763
|
-
}
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
var anchorElement = doc.createElement('a');
|
|
1767
|
-
anchorElement.href = url;
|
|
1768
|
-
if (baseElement) {
|
|
1769
|
-
doc.body.appendChild(anchorElement);
|
|
1770
|
-
anchorElement.href = anchorElement.href; // force href to refresh
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
var inputElement = doc.createElement('input');
|
|
1774
|
-
inputElement.type = 'url';
|
|
1775
|
-
inputElement.value = url;
|
|
1776
|
-
|
|
1777
|
-
if (anchorElement.protocol === ':' || !/:/.test(anchorElement.href) || (!inputElement.checkValidity() && !base)) {
|
|
1778
|
-
throw new TypeError('Invalid URL');
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
Object.defineProperty(this, '_anchorElement', {
|
|
1782
|
-
value: anchorElement
|
|
1783
|
-
});
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
// create a linked searchParams which reflect its changes on URL
|
|
1787
|
-
var searchParams = new global.URLSearchParams(this.search);
|
|
1788
|
-
var enableSearchUpdate = true;
|
|
1789
|
-
var enableSearchParamsUpdate = true;
|
|
1790
|
-
var _this = this;
|
|
1791
|
-
['append', 'delete', 'set'].forEach(function(methodName) {
|
|
1792
|
-
var method = searchParams[methodName];
|
|
1793
|
-
searchParams[methodName] = function() {
|
|
1794
|
-
method.apply(searchParams, arguments);
|
|
1795
|
-
if (enableSearchUpdate) {
|
|
1796
|
-
enableSearchParamsUpdate = false;
|
|
1797
|
-
_this.search = searchParams.toString();
|
|
1798
|
-
enableSearchParamsUpdate = true;
|
|
1799
|
-
}
|
|
1800
|
-
};
|
|
1801
|
-
});
|
|
1802
|
-
|
|
1803
|
-
Object.defineProperty(this, 'searchParams', {
|
|
1804
|
-
value: searchParams,
|
|
1805
|
-
enumerable: true
|
|
1806
|
-
});
|
|
1807
|
-
|
|
1808
|
-
var search = void 0;
|
|
1809
|
-
Object.defineProperty(this, '_updateSearchParams', {
|
|
1810
|
-
enumerable: false,
|
|
1811
|
-
configurable: false,
|
|
1812
|
-
writable: false,
|
|
1813
|
-
value: function() {
|
|
1814
|
-
if (this.search !== search) {
|
|
1815
|
-
search = this.search;
|
|
1816
|
-
if (enableSearchParamsUpdate) {
|
|
1817
|
-
enableSearchUpdate = false;
|
|
1818
|
-
this.searchParams._fromString(this.search);
|
|
1819
|
-
enableSearchUpdate = true;
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
});
|
|
1824
|
-
};
|
|
1825
|
-
|
|
1826
|
-
var proto = URL.prototype;
|
|
1827
|
-
|
|
1828
|
-
var linkURLWithAnchorAttribute = function(attributeName) {
|
|
1829
|
-
Object.defineProperty(proto, attributeName, {
|
|
1830
|
-
get: function() {
|
|
1831
|
-
return this._anchorElement[attributeName];
|
|
1832
|
-
},
|
|
1833
|
-
set: function(value) {
|
|
1834
|
-
this._anchorElement[attributeName] = value;
|
|
1835
|
-
},
|
|
1836
|
-
enumerable: true
|
|
1837
|
-
});
|
|
1838
|
-
};
|
|
1839
|
-
|
|
1840
|
-
['hash', 'host', 'hostname', 'port', 'protocol']
|
|
1841
|
-
.forEach(function(attributeName) {
|
|
1842
|
-
linkURLWithAnchorAttribute(attributeName);
|
|
1843
|
-
});
|
|
1844
|
-
|
|
1845
|
-
Object.defineProperty(proto, 'search', {
|
|
1846
|
-
get: function() {
|
|
1847
|
-
return this._anchorElement['search'];
|
|
1848
|
-
},
|
|
1849
|
-
set: function(value) {
|
|
1850
|
-
this._anchorElement['search'] = value;
|
|
1851
|
-
this._updateSearchParams();
|
|
1852
|
-
},
|
|
1853
|
-
enumerable: true
|
|
1854
|
-
});
|
|
1855
|
-
|
|
1856
|
-
Object.defineProperties(proto, {
|
|
1857
|
-
|
|
1858
|
-
'toString': {
|
|
1859
|
-
get: function() {
|
|
1860
|
-
var _this = this;
|
|
1861
|
-
return function() {
|
|
1862
|
-
return _this.href;
|
|
1863
|
-
};
|
|
1864
|
-
}
|
|
1865
|
-
},
|
|
1866
|
-
|
|
1867
|
-
'href': {
|
|
1868
|
-
get: function() {
|
|
1869
|
-
return this._anchorElement.href.replace(/\?$/, '');
|
|
1870
|
-
},
|
|
1871
|
-
set: function(value) {
|
|
1872
|
-
this._anchorElement.href = value;
|
|
1873
|
-
this._updateSearchParams();
|
|
1874
|
-
},
|
|
1875
|
-
enumerable: true
|
|
1876
|
-
},
|
|
1877
|
-
|
|
1878
|
-
'pathname': {
|
|
1879
|
-
get: function() {
|
|
1880
|
-
return this._anchorElement.pathname.replace(/(^\/?)/, '/');
|
|
1881
|
-
},
|
|
1882
|
-
set: function(value) {
|
|
1883
|
-
this._anchorElement.pathname = value;
|
|
1884
|
-
},
|
|
1885
|
-
enumerable: true
|
|
1886
|
-
},
|
|
1887
|
-
|
|
1888
|
-
'origin': {
|
|
1889
|
-
get: function() {
|
|
1890
|
-
// get expected port from protocol
|
|
1891
|
-
var expectedPort = { 'http:': 80, 'https:': 443, 'ftp:': 21 }[this._anchorElement.protocol];
|
|
1892
|
-
// add port to origin if, expected port is different than actual port
|
|
1893
|
-
// and it is not empty f.e http://foo:8080
|
|
1894
|
-
// 8080 != 80 && 8080 != ''
|
|
1895
|
-
var addPortToOrigin = this._anchorElement.port != expectedPort &&
|
|
1896
|
-
this._anchorElement.port !== '';
|
|
1897
|
-
|
|
1898
|
-
return this._anchorElement.protocol +
|
|
1899
|
-
'//' +
|
|
1900
|
-
this._anchorElement.hostname +
|
|
1901
|
-
(addPortToOrigin ? (':' + this._anchorElement.port) : '');
|
|
1902
|
-
},
|
|
1903
|
-
enumerable: true
|
|
1904
|
-
},
|
|
1905
|
-
|
|
1906
|
-
'password': { // TODO
|
|
1907
|
-
get: function() {
|
|
1908
|
-
return '';
|
|
1909
|
-
},
|
|
1910
|
-
set: function(value) {
|
|
1911
|
-
},
|
|
1912
|
-
enumerable: true
|
|
1913
|
-
},
|
|
1914
|
-
|
|
1915
|
-
'username': { // TODO
|
|
1916
|
-
get: function() {
|
|
1917
|
-
return '';
|
|
1918
|
-
},
|
|
1919
|
-
set: function(value) {
|
|
1920
|
-
},
|
|
1921
|
-
enumerable: true
|
|
1922
|
-
},
|
|
1923
|
-
});
|
|
1924
|
-
|
|
1925
|
-
URL.createObjectURL = function(blob) {
|
|
1926
|
-
return _URL.createObjectURL.apply(_URL, arguments);
|
|
1927
|
-
};
|
|
1928
|
-
|
|
1929
|
-
URL.revokeObjectURL = function(url) {
|
|
1930
|
-
return _URL.revokeObjectURL.apply(_URL, arguments);
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
global.URL = URL;
|
|
1934
|
-
|
|
1935
|
-
};
|
|
1936
|
-
|
|
1937
|
-
if (!checkIfURLIsSupported()) {
|
|
1938
|
-
polyfillURL();
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
|
-
if ((global.location !== void 0) && !('origin' in global.location)) {
|
|
1942
|
-
var getOrigin = function() {
|
|
1943
|
-
return global.location.protocol + '//' + global.location.hostname + (global.location.port ? (':' + global.location.port) : '');
|
|
1944
|
-
};
|
|
1945
|
-
|
|
1946
|
-
try {
|
|
1947
|
-
Object.defineProperty(global.location, 'origin', {
|
|
1948
|
-
get: getOrigin,
|
|
1949
|
-
enumerable: true
|
|
1950
|
-
});
|
|
1951
|
-
} catch (e) {
|
|
1952
|
-
setInterval(function() {
|
|
1953
|
-
global.location.origin = getOrigin();
|
|
1954
|
-
}, 100);
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
})(
|
|
1959
|
-
(typeof commonjsGlobal !== 'undefined') ? commonjsGlobal
|
|
1960
|
-
: ((typeof window !== 'undefined') ? window
|
|
1961
|
-
: ((typeof self !== 'undefined') ? self : urlPolyfill$1))
|
|
1962
|
-
);
|
|
1963
|
-
return urlPolyfill$1;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
var urlPolyfillExports = requireUrlPolyfill();
|
|
1967
|
-
var urlPolyfill = /*@__PURE__*/getDefaultExportFromCjs(urlPolyfillExports);
|
|
1968
|
-
|
|
1969
|
-
/* eslint-disable @typescript-eslint/no-implied-eval */
|
|
1970
|
-
(() => {
|
|
1971
|
-
if (typeof globalThis !== 'undefined') {
|
|
1972
|
-
return;
|
|
1973
|
-
}
|
|
1974
|
-
const resolveGlobal = () => {
|
|
1975
|
-
if (typeof self !== 'undefined') {
|
|
1976
|
-
return self;
|
|
1977
|
-
}
|
|
1978
|
-
if (typeof window !== 'undefined') {
|
|
1979
|
-
return window;
|
|
1980
|
-
}
|
|
1981
|
-
if (typeof global !== 'undefined') {
|
|
1982
|
-
return global;
|
|
1983
|
-
}
|
|
1984
|
-
return Function('return this')();
|
|
1985
|
-
};
|
|
1986
|
-
const resolvedGlobal = resolveGlobal();
|
|
1987
|
-
Object.defineProperty(resolvedGlobal, 'globalThis', {
|
|
1988
|
-
value: resolvedGlobal,
|
|
1989
|
-
writable: true,
|
|
1990
|
-
enumerable: false,
|
|
1991
|
-
configurable: true,
|
|
1992
|
-
});
|
|
1993
|
-
})();
|
|
1994
|
-
|
|
1995
|
-
(() => {
|
|
1996
|
-
if (typeof Element === "undefined" ||
|
|
1997
|
-
typeof Element.prototype.getAttributeNames === "function") {
|
|
1998
|
-
return;
|
|
1999
|
-
}
|
|
2000
|
-
Element.prototype.getAttributeNames = function getAttributeNames() {
|
|
2001
|
-
const attributes = this.attributes;
|
|
2002
|
-
const names = new Array(attributes.length);
|
|
2003
|
-
for (let i = 0; i < attributes.length; i += 1) {
|
|
2004
|
-
names[i] = attributes[i].name;
|
|
2005
|
-
}
|
|
2006
|
-
return names;
|
|
2007
|
-
};
|
|
2008
|
-
})();
|
|
2009
|
-
|
|
2010
|
-
/**
|
|
2011
|
-
* @license
|
|
2012
|
-
* Copyright 2023 Google LLC
|
|
2013
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2014
|
-
*/
|
|
2015
|
-
/**
|
|
2016
|
-
* Map of ARIAMixin properties to attributes
|
|
2017
|
-
*/
|
|
2018
|
-
const ariaMixinAttributes = {
|
|
2019
|
-
ariaAtomic: 'aria-atomic',
|
|
2020
|
-
ariaAutoComplete: 'aria-autocomplete',
|
|
2021
|
-
ariaBrailleLabel: 'aria-braillelabel',
|
|
2022
|
-
ariaBrailleRoleDescription: 'aria-brailleroledescription',
|
|
2023
|
-
ariaBusy: 'aria-busy',
|
|
2024
|
-
ariaChecked: 'aria-checked',
|
|
2025
|
-
ariaColCount: 'aria-colcount',
|
|
2026
|
-
ariaColIndex: 'aria-colindex',
|
|
2027
|
-
ariaColIndexText: 'aria-colindextext',
|
|
2028
|
-
ariaColSpan: 'aria-colspan',
|
|
2029
|
-
ariaCurrent: 'aria-current',
|
|
2030
|
-
ariaDescription: 'aria-description',
|
|
2031
|
-
ariaDisabled: 'aria-disabled',
|
|
2032
|
-
ariaExpanded: 'aria-expanded',
|
|
2033
|
-
ariaHasPopup: 'aria-haspopup',
|
|
2034
|
-
ariaHidden: 'aria-hidden',
|
|
2035
|
-
ariaInvalid: 'aria-invalid',
|
|
2036
|
-
ariaKeyShortcuts: 'aria-keyshortcuts',
|
|
2037
|
-
ariaLabel: 'aria-label',
|
|
2038
|
-
ariaLevel: 'aria-level',
|
|
2039
|
-
ariaLive: 'aria-live',
|
|
2040
|
-
ariaModal: 'aria-modal',
|
|
2041
|
-
ariaMultiLine: 'aria-multiline',
|
|
2042
|
-
ariaMultiSelectable: 'aria-multiselectable',
|
|
2043
|
-
ariaOrientation: 'aria-orientation',
|
|
2044
|
-
ariaPlaceholder: 'aria-placeholder',
|
|
2045
|
-
ariaPosInSet: 'aria-posinset',
|
|
2046
|
-
ariaPressed: 'aria-pressed',
|
|
2047
|
-
ariaReadOnly: 'aria-readonly',
|
|
2048
|
-
ariaRelevant: 'aria-relevant',
|
|
2049
|
-
ariaRequired: 'aria-required',
|
|
2050
|
-
ariaRoleDescription: 'aria-roledescription',
|
|
2051
|
-
ariaRowCount: 'aria-rowcount',
|
|
2052
|
-
ariaRowIndex: 'aria-rowindex',
|
|
2053
|
-
ariaRowIndexText: 'aria-rowindextext',
|
|
2054
|
-
ariaRowSpan: 'aria-rowspan',
|
|
2055
|
-
ariaSelected: 'aria-selected',
|
|
2056
|
-
ariaSetSize: 'aria-setsize',
|
|
2057
|
-
ariaSort: 'aria-sort',
|
|
2058
|
-
ariaValueMax: 'aria-valuemax',
|
|
2059
|
-
ariaValueMin: 'aria-valuemin',
|
|
2060
|
-
ariaValueNow: 'aria-valuenow',
|
|
2061
|
-
ariaValueText: 'aria-valuetext',
|
|
2062
|
-
role: 'role',
|
|
2063
|
-
};
|
|
2064
|
-
// Shim the global element internals object
|
|
2065
|
-
// Methods should be fine as noops and properties can generally
|
|
2066
|
-
// be while on the server.
|
|
2067
|
-
const ElementInternalsShim = class ElementInternals {
|
|
2068
|
-
get shadowRoot() {
|
|
2069
|
-
// Grab the shadow root instance from the Element shim
|
|
2070
|
-
// to ensure that the shadow root is always available
|
|
2071
|
-
// to the internals instance even if the mode is 'closed'
|
|
2072
|
-
return this.__host
|
|
2073
|
-
.__shadowRoot;
|
|
2074
|
-
}
|
|
2075
|
-
constructor(_host) {
|
|
2076
|
-
this.ariaActiveDescendantElement = null;
|
|
2077
|
-
this.ariaAtomic = '';
|
|
2078
|
-
this.ariaAutoComplete = '';
|
|
2079
|
-
this.ariaBrailleLabel = '';
|
|
2080
|
-
this.ariaBrailleRoleDescription = '';
|
|
2081
|
-
this.ariaBusy = '';
|
|
2082
|
-
this.ariaChecked = '';
|
|
2083
|
-
this.ariaColCount = '';
|
|
2084
|
-
this.ariaColIndex = '';
|
|
2085
|
-
this.ariaColIndexText = '';
|
|
2086
|
-
this.ariaColSpan = '';
|
|
2087
|
-
this.ariaControlsElements = null;
|
|
2088
|
-
this.ariaCurrent = '';
|
|
2089
|
-
this.ariaDescribedByElements = null;
|
|
2090
|
-
this.ariaDescription = '';
|
|
2091
|
-
this.ariaDetailsElements = null;
|
|
2092
|
-
this.ariaDisabled = '';
|
|
2093
|
-
this.ariaErrorMessageElements = null;
|
|
2094
|
-
this.ariaExpanded = '';
|
|
2095
|
-
this.ariaFlowToElements = null;
|
|
2096
|
-
this.ariaHasPopup = '';
|
|
2097
|
-
this.ariaHidden = '';
|
|
2098
|
-
this.ariaInvalid = '';
|
|
2099
|
-
this.ariaKeyShortcuts = '';
|
|
2100
|
-
this.ariaLabel = '';
|
|
2101
|
-
this.ariaLabelledByElements = null;
|
|
2102
|
-
this.ariaLevel = '';
|
|
2103
|
-
this.ariaLive = '';
|
|
2104
|
-
this.ariaModal = '';
|
|
2105
|
-
this.ariaMultiLine = '';
|
|
2106
|
-
this.ariaMultiSelectable = '';
|
|
2107
|
-
this.ariaOrientation = '';
|
|
2108
|
-
this.ariaOwnsElements = null;
|
|
2109
|
-
this.ariaPlaceholder = '';
|
|
2110
|
-
this.ariaPosInSet = '';
|
|
2111
|
-
this.ariaPressed = '';
|
|
2112
|
-
this.ariaReadOnly = '';
|
|
2113
|
-
this.ariaRelevant = '';
|
|
2114
|
-
this.ariaRequired = '';
|
|
2115
|
-
this.ariaRoleDescription = '';
|
|
2116
|
-
this.ariaRowCount = '';
|
|
2117
|
-
this.ariaRowIndex = '';
|
|
2118
|
-
this.ariaRowIndexText = '';
|
|
2119
|
-
this.ariaRowSpan = '';
|
|
2120
|
-
this.ariaSelected = '';
|
|
2121
|
-
this.ariaSetSize = '';
|
|
2122
|
-
this.ariaSort = '';
|
|
2123
|
-
this.ariaValueMax = '';
|
|
2124
|
-
this.ariaValueMin = '';
|
|
2125
|
-
this.ariaValueNow = '';
|
|
2126
|
-
this.ariaValueText = '';
|
|
2127
|
-
this.role = '';
|
|
2128
|
-
this.form = null;
|
|
2129
|
-
this.labels = [];
|
|
2130
|
-
this.states = new Set();
|
|
2131
|
-
this.validationMessage = '';
|
|
2132
|
-
this.validity = {};
|
|
2133
|
-
this.willValidate = true;
|
|
2134
|
-
this.__host = _host;
|
|
2135
|
-
}
|
|
2136
|
-
checkValidity() {
|
|
2137
|
-
// TODO(augustjk) Consider actually implementing logic.
|
|
2138
|
-
// See https://github.com/lit/lit/issues/3740
|
|
2139
|
-
console.warn('`ElementInternals.checkValidity()` was called on the server.' +
|
|
2140
|
-
'This method always returns true.');
|
|
2141
|
-
return true;
|
|
2142
|
-
}
|
|
2143
|
-
reportValidity() {
|
|
2144
|
-
return true;
|
|
2145
|
-
}
|
|
2146
|
-
setFormValue() { }
|
|
2147
|
-
setValidity() { }
|
|
2148
|
-
};
|
|
2149
|
-
const ElementInternalsShimWithRealType = ElementInternalsShim;
|
|
2150
|
-
const HYDRATE_INTERNALS_ATTR_PREFIX = 'hydrate-internals-';
|
|
2151
|
-
|
|
2152
|
-
/**
|
|
2153
|
-
* @license
|
|
2154
|
-
* Copyright 2023 Google LLC
|
|
2155
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2156
|
-
*/
|
|
2157
|
-
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2158
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
2159
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
2160
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2161
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
2162
|
-
};
|
|
2163
|
-
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2164
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
2165
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2166
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2167
|
-
};
|
|
2168
|
-
var _Event_cancelable, _Event_bubbles, _Event_composed, _Event_defaultPrevented, _Event_timestamp, _Event_propagationStopped, _Event_type, _Event_target, _Event_isBeingDispatched, _a$1, _CustomEvent_detail, _b;
|
|
2169
|
-
// Event phases
|
|
2170
|
-
const NONE = 0;
|
|
2171
|
-
const CAPTURING_PHASE = 1;
|
|
2172
|
-
const AT_TARGET = 2;
|
|
2173
|
-
const BUBBLING_PHASE = 3;
|
|
2174
|
-
const enumerableProperty$1 = { __proto__: null };
|
|
2175
|
-
enumerableProperty$1.enumerable = true;
|
|
2176
|
-
Object.freeze(enumerableProperty$1);
|
|
2177
|
-
// TODO: Remove this when we remove support for vm modules (--experimental-vm-modules).
|
|
2178
|
-
const EventShim = (_a$1 = class Event {
|
|
2179
|
-
constructor(type, options = {}) {
|
|
2180
|
-
_Event_cancelable.set(this, false);
|
|
2181
|
-
_Event_bubbles.set(this, false);
|
|
2182
|
-
_Event_composed.set(this, false);
|
|
2183
|
-
_Event_defaultPrevented.set(this, false);
|
|
2184
|
-
_Event_timestamp.set(this, Date.now());
|
|
2185
|
-
_Event_propagationStopped.set(this, false);
|
|
2186
|
-
_Event_type.set(this, void 0);
|
|
2187
|
-
_Event_target.set(this, void 0);
|
|
2188
|
-
_Event_isBeingDispatched.set(this, void 0);
|
|
2189
|
-
this.NONE = NONE;
|
|
2190
|
-
this.CAPTURING_PHASE = CAPTURING_PHASE;
|
|
2191
|
-
this.AT_TARGET = AT_TARGET;
|
|
2192
|
-
this.BUBBLING_PHASE = BUBBLING_PHASE;
|
|
2193
|
-
if (arguments.length === 0)
|
|
2194
|
-
throw new Error(`The type argument must be specified`);
|
|
2195
|
-
if (typeof options !== 'object' || !options) {
|
|
2196
|
-
throw new Error(`The "options" argument must be an object`);
|
|
2197
|
-
}
|
|
2198
|
-
const { bubbles, cancelable, composed } = options;
|
|
2199
|
-
__classPrivateFieldSet(this, _Event_cancelable, !!cancelable, "f");
|
|
2200
|
-
__classPrivateFieldSet(this, _Event_bubbles, !!bubbles, "f");
|
|
2201
|
-
__classPrivateFieldSet(this, _Event_composed, !!composed, "f");
|
|
2202
|
-
__classPrivateFieldSet(this, _Event_type, `${type}`, "f");
|
|
2203
|
-
__classPrivateFieldSet(this, _Event_target, null, "f");
|
|
2204
|
-
__classPrivateFieldSet(this, _Event_isBeingDispatched, false, "f");
|
|
2205
|
-
}
|
|
2206
|
-
initEvent(_type, _bubbles, _cancelable) {
|
|
2207
|
-
throw new Error('Method not implemented.');
|
|
2208
|
-
}
|
|
2209
|
-
stopImmediatePropagation() {
|
|
2210
|
-
this.stopPropagation();
|
|
2211
|
-
}
|
|
2212
|
-
preventDefault() {
|
|
2213
|
-
__classPrivateFieldSet(this, _Event_defaultPrevented, true, "f");
|
|
2214
|
-
}
|
|
2215
|
-
get target() {
|
|
2216
|
-
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
2217
|
-
}
|
|
2218
|
-
get currentTarget() {
|
|
2219
|
-
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
2220
|
-
}
|
|
2221
|
-
get srcElement() {
|
|
2222
|
-
return __classPrivateFieldGet(this, _Event_target, "f");
|
|
2223
|
-
}
|
|
2224
|
-
get type() {
|
|
2225
|
-
return __classPrivateFieldGet(this, _Event_type, "f");
|
|
2226
|
-
}
|
|
2227
|
-
get cancelable() {
|
|
2228
|
-
return __classPrivateFieldGet(this, _Event_cancelable, "f");
|
|
2229
|
-
}
|
|
2230
|
-
get defaultPrevented() {
|
|
2231
|
-
return __classPrivateFieldGet(this, _Event_cancelable, "f") && __classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
2232
|
-
}
|
|
2233
|
-
get timeStamp() {
|
|
2234
|
-
return __classPrivateFieldGet(this, _Event_timestamp, "f");
|
|
2235
|
-
}
|
|
2236
|
-
composedPath() {
|
|
2237
|
-
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? [__classPrivateFieldGet(this, _Event_target, "f")] : [];
|
|
2238
|
-
}
|
|
2239
|
-
get returnValue() {
|
|
2240
|
-
return !__classPrivateFieldGet(this, _Event_cancelable, "f") || !__classPrivateFieldGet(this, _Event_defaultPrevented, "f");
|
|
2241
|
-
}
|
|
2242
|
-
get bubbles() {
|
|
2243
|
-
return __classPrivateFieldGet(this, _Event_bubbles, "f");
|
|
2244
|
-
}
|
|
2245
|
-
get composed() {
|
|
2246
|
-
return __classPrivateFieldGet(this, _Event_composed, "f");
|
|
2247
|
-
}
|
|
2248
|
-
get eventPhase() {
|
|
2249
|
-
return __classPrivateFieldGet(this, _Event_isBeingDispatched, "f") ? _a$1.AT_TARGET : _a$1.NONE;
|
|
2250
|
-
}
|
|
2251
|
-
get cancelBubble() {
|
|
2252
|
-
return __classPrivateFieldGet(this, _Event_propagationStopped, "f");
|
|
2253
|
-
}
|
|
2254
|
-
set cancelBubble(value) {
|
|
2255
|
-
if (value) {
|
|
2256
|
-
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
stopPropagation() {
|
|
2260
|
-
__classPrivateFieldSet(this, _Event_propagationStopped, true, "f");
|
|
2261
|
-
}
|
|
2262
|
-
get isTrusted() {
|
|
2263
|
-
return false;
|
|
2264
|
-
}
|
|
2265
|
-
},
|
|
2266
|
-
_Event_cancelable = new WeakMap(),
|
|
2267
|
-
_Event_bubbles = new WeakMap(),
|
|
2268
|
-
_Event_composed = new WeakMap(),
|
|
2269
|
-
_Event_defaultPrevented = new WeakMap(),
|
|
2270
|
-
_Event_timestamp = new WeakMap(),
|
|
2271
|
-
_Event_propagationStopped = new WeakMap(),
|
|
2272
|
-
_Event_type = new WeakMap(),
|
|
2273
|
-
_Event_target = new WeakMap(),
|
|
2274
|
-
_Event_isBeingDispatched = new WeakMap(),
|
|
2275
|
-
_a$1.NONE = NONE,
|
|
2276
|
-
_a$1.CAPTURING_PHASE = CAPTURING_PHASE,
|
|
2277
|
-
_a$1.AT_TARGET = AT_TARGET,
|
|
2278
|
-
_a$1.BUBBLING_PHASE = BUBBLING_PHASE,
|
|
2279
|
-
_a$1);
|
|
2280
|
-
Object.defineProperties(EventShim.prototype, {
|
|
2281
|
-
initEvent: enumerableProperty$1,
|
|
2282
|
-
stopImmediatePropagation: enumerableProperty$1,
|
|
2283
|
-
preventDefault: enumerableProperty$1,
|
|
2284
|
-
target: enumerableProperty$1,
|
|
2285
|
-
currentTarget: enumerableProperty$1,
|
|
2286
|
-
srcElement: enumerableProperty$1,
|
|
2287
|
-
type: enumerableProperty$1,
|
|
2288
|
-
cancelable: enumerableProperty$1,
|
|
2289
|
-
defaultPrevented: enumerableProperty$1,
|
|
2290
|
-
timeStamp: enumerableProperty$1,
|
|
2291
|
-
composedPath: enumerableProperty$1,
|
|
2292
|
-
returnValue: enumerableProperty$1,
|
|
2293
|
-
bubbles: enumerableProperty$1,
|
|
2294
|
-
composed: enumerableProperty$1,
|
|
2295
|
-
eventPhase: enumerableProperty$1,
|
|
2296
|
-
cancelBubble: enumerableProperty$1,
|
|
2297
|
-
stopPropagation: enumerableProperty$1,
|
|
2298
|
-
isTrusted: enumerableProperty$1,
|
|
2299
|
-
});
|
|
2300
|
-
// TODO: Remove this when we remove support for vm modules (--experimental-vm-modules).
|
|
2301
|
-
const CustomEventShim = (_b = class CustomEvent extends EventShim {
|
|
2302
|
-
constructor(type, options = {}) {
|
|
2303
|
-
super(type, options);
|
|
2304
|
-
_CustomEvent_detail.set(this, void 0);
|
|
2305
|
-
__classPrivateFieldSet(this, _CustomEvent_detail, options?.detail ?? null, "f");
|
|
2306
|
-
}
|
|
2307
|
-
initCustomEvent(_type, _bubbles, _cancelable, _detail) {
|
|
2308
|
-
throw new Error('Method not implemented.');
|
|
2309
|
-
}
|
|
2310
|
-
get detail() {
|
|
2311
|
-
return __classPrivateFieldGet(this, _CustomEvent_detail, "f");
|
|
2312
|
-
}
|
|
2313
|
-
},
|
|
2314
|
-
_CustomEvent_detail = new WeakMap(),
|
|
2315
|
-
_b);
|
|
2316
|
-
Object.defineProperties(CustomEventShim.prototype, {
|
|
2317
|
-
detail: enumerableProperty$1,
|
|
2318
|
-
});
|
|
2319
|
-
const EventShimWithRealType = EventShim;
|
|
2320
|
-
const CustomEventShimWithRealType = CustomEventShim;
|
|
2321
|
-
|
|
2322
|
-
/**
|
|
2323
|
-
* @license
|
|
2324
|
-
* Copyright 2024 Google LLC
|
|
2325
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2326
|
-
*/
|
|
2327
|
-
var _a;
|
|
2328
|
-
const MediaListShim = class MediaList extends Array {
|
|
2329
|
-
get mediaText() {
|
|
2330
|
-
return this.join(', ');
|
|
2331
|
-
}
|
|
2332
|
-
toString() {
|
|
2333
|
-
return this.mediaText;
|
|
2334
|
-
}
|
|
2335
|
-
appendMedium(medium) {
|
|
2336
|
-
if (!this.includes(medium)) {
|
|
2337
|
-
this.push(medium);
|
|
2338
|
-
}
|
|
2339
|
-
}
|
|
2340
|
-
deleteMedium(medium) {
|
|
2341
|
-
const index = this.indexOf(medium);
|
|
2342
|
-
if (index !== -1) {
|
|
2343
|
-
this.splice(index, 1);
|
|
2344
|
-
}
|
|
2345
|
-
}
|
|
2346
|
-
item(index) {
|
|
2347
|
-
return this[index] ?? null;
|
|
2348
|
-
}
|
|
2349
|
-
};
|
|
2350
|
-
const MediaListShimWithRealType = MediaListShim;
|
|
2351
|
-
const StyleSheetShim = class StyleSheet {
|
|
2352
|
-
constructor() {
|
|
2353
|
-
this.__media = new MediaListShim();
|
|
2354
|
-
this.disabled = false;
|
|
2355
|
-
}
|
|
2356
|
-
get href() {
|
|
2357
|
-
return null;
|
|
2358
|
-
}
|
|
2359
|
-
get media() {
|
|
2360
|
-
return this.__media;
|
|
2361
|
-
}
|
|
2362
|
-
get ownerNode() {
|
|
2363
|
-
return null;
|
|
2364
|
-
}
|
|
2365
|
-
get parentStyleSheet() {
|
|
2366
|
-
return null;
|
|
2367
|
-
}
|
|
2368
|
-
get title() {
|
|
2369
|
-
return null;
|
|
2370
|
-
}
|
|
2371
|
-
get type() {
|
|
2372
|
-
return 'text/css';
|
|
2373
|
-
}
|
|
2374
|
-
};
|
|
2375
|
-
const StyleSheetShimWithRealType = StyleSheetShim;
|
|
2376
|
-
const CSSRuleShim = (_a = class CSSRule {
|
|
2377
|
-
constructor() {
|
|
2378
|
-
this.STYLE_RULE = 1;
|
|
2379
|
-
this.CHARSET_RULE = 2;
|
|
2380
|
-
this.IMPORT_RULE = 3;
|
|
2381
|
-
this.MEDIA_RULE = 4;
|
|
2382
|
-
this.FONT_FACE_RULE = 5;
|
|
2383
|
-
this.PAGE_RULE = 6;
|
|
2384
|
-
this.NAMESPACE_RULE = 10;
|
|
2385
|
-
this.KEYFRAMES_RULE = 7;
|
|
2386
|
-
this.KEYFRAME_RULE = 8;
|
|
2387
|
-
this.SUPPORTS_RULE = 12;
|
|
2388
|
-
this.COUNTER_STYLE_RULE = 11;
|
|
2389
|
-
this.FONT_FEATURE_VALUES_RULE = 14;
|
|
2390
|
-
this.MARGIN_RULE = 9;
|
|
2391
|
-
this.__parentStyleSheet = null;
|
|
2392
|
-
this.cssText = '';
|
|
2393
|
-
}
|
|
2394
|
-
get parentRule() {
|
|
2395
|
-
return null;
|
|
2396
|
-
}
|
|
2397
|
-
get parentStyleSheet() {
|
|
2398
|
-
return this.__parentStyleSheet;
|
|
2399
|
-
}
|
|
2400
|
-
get type() {
|
|
2401
|
-
return 0;
|
|
2402
|
-
}
|
|
2403
|
-
},
|
|
2404
|
-
_a.STYLE_RULE = 1,
|
|
2405
|
-
_a.CHARSET_RULE = 2,
|
|
2406
|
-
_a.IMPORT_RULE = 3,
|
|
2407
|
-
_a.MEDIA_RULE = 4,
|
|
2408
|
-
_a.FONT_FACE_RULE = 5,
|
|
2409
|
-
_a.PAGE_RULE = 6,
|
|
2410
|
-
_a.NAMESPACE_RULE = 10,
|
|
2411
|
-
_a.KEYFRAMES_RULE = 7,
|
|
2412
|
-
_a.KEYFRAME_RULE = 8,
|
|
2413
|
-
_a.SUPPORTS_RULE = 12,
|
|
2414
|
-
_a.COUNTER_STYLE_RULE = 11,
|
|
2415
|
-
_a.FONT_FEATURE_VALUES_RULE = 14,
|
|
2416
|
-
_a.MARGIN_RULE = 9,
|
|
2417
|
-
_a);
|
|
2418
|
-
const CSSRuleShimWithRealType = CSSRuleShim;
|
|
2419
|
-
const CSSRuleListShim = class CSSRuleList extends Array {
|
|
2420
|
-
item(index) {
|
|
2421
|
-
return this[index] ?? null;
|
|
2422
|
-
}
|
|
2423
|
-
};
|
|
2424
|
-
const CSSRuleListShimWithRealType = CSSRuleListShim;
|
|
2425
|
-
const CSSStyleSheetShim = class CSSStyleSheet extends StyleSheetShim {
|
|
2426
|
-
constructor() {
|
|
2427
|
-
super(...arguments);
|
|
2428
|
-
this.__rules = new CSSRuleListShim();
|
|
2429
|
-
}
|
|
2430
|
-
get cssRules() {
|
|
2431
|
-
return this.__rules;
|
|
2432
|
-
}
|
|
2433
|
-
get ownerRule() {
|
|
2434
|
-
return null;
|
|
2435
|
-
}
|
|
2436
|
-
get rules() {
|
|
2437
|
-
return this.cssRules;
|
|
2438
|
-
}
|
|
2439
|
-
addRule(_selector, _style, _index) {
|
|
2440
|
-
throw new Error('Method not implemented.');
|
|
2441
|
-
}
|
|
2442
|
-
deleteRule(_index) {
|
|
2443
|
-
throw new Error('Method not implemented.');
|
|
2444
|
-
}
|
|
2445
|
-
insertRule(_rule, _index) {
|
|
2446
|
-
throw new Error('Method not implemented.');
|
|
2447
|
-
}
|
|
2448
|
-
removeRule(_index) {
|
|
2449
|
-
throw new Error('Method not implemented.');
|
|
2450
|
-
}
|
|
2451
|
-
replace(text) {
|
|
2452
|
-
this.replaceSync(text);
|
|
2453
|
-
return Promise.resolve(this);
|
|
2454
|
-
}
|
|
2455
|
-
replaceSync(text) {
|
|
2456
|
-
this.__rules.length = 0;
|
|
2457
|
-
const rule = new CSSRuleShim();
|
|
2458
|
-
rule.cssText = text;
|
|
2459
|
-
this.__rules.push(rule);
|
|
2460
|
-
}
|
|
2461
|
-
};
|
|
2462
|
-
const CSSStyleSheetShimWithRealType = CSSStyleSheetShim;
|
|
2463
|
-
|
|
2464
|
-
/**
|
|
2465
|
-
* @license
|
|
2466
|
-
* Copyright 2024 Google LLC
|
|
2467
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2468
|
-
*/
|
|
2469
|
-
/**
|
|
2470
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
|
|
2471
|
-
*/
|
|
2472
|
-
const MutationObserverShim = class MutationObserver {
|
|
2473
|
-
constructor(_callback) { }
|
|
2474
|
-
disconnect() { }
|
|
2475
|
-
observe(_target, _options) { }
|
|
2476
|
-
takeRecords() {
|
|
2477
|
-
return [];
|
|
2478
|
-
}
|
|
2479
|
-
};
|
|
2480
|
-
const MutationObserverShimWithRealType = MutationObserverShim;
|
|
2481
|
-
/**
|
|
2482
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
|
|
2483
|
-
*/
|
|
2484
|
-
const ResizeObserverShim = class ResizeObserver {
|
|
2485
|
-
constructor(_callback) { }
|
|
2486
|
-
disconnect() { }
|
|
2487
|
-
observe(_target, _options) { }
|
|
2488
|
-
unobserve(_target) { }
|
|
2489
|
-
};
|
|
2490
|
-
const ResizeObserverShimWithRealType = ResizeObserverShim;
|
|
2491
|
-
/**
|
|
2492
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver
|
|
2493
|
-
*/
|
|
2494
|
-
const IntersectionObserverShim = class IntersectionObserver {
|
|
2495
|
-
constructor(_callback, __options) {
|
|
2496
|
-
this.__options = __options;
|
|
2497
|
-
}
|
|
2498
|
-
get root() {
|
|
2499
|
-
return this.__options?.root ?? null;
|
|
2500
|
-
}
|
|
2501
|
-
get rootMargin() {
|
|
2502
|
-
return this.__options?.rootMargin ?? '0px 0px 0px 0px';
|
|
2503
|
-
}
|
|
2504
|
-
get thresholds() {
|
|
2505
|
-
return Array.isArray(this.__options?.threshold)
|
|
2506
|
-
? this.__options.threshold
|
|
2507
|
-
: [this.__options?.threshold ?? 0];
|
|
2508
|
-
}
|
|
2509
|
-
disconnect() { }
|
|
2510
|
-
observe(_target) { }
|
|
2511
|
-
takeRecords() {
|
|
2512
|
-
return [];
|
|
2513
|
-
}
|
|
2514
|
-
unobserve(_target) { }
|
|
2515
|
-
};
|
|
2516
|
-
const IntersectionObserverShimWithRealType = IntersectionObserverShim;
|
|
2517
|
-
|
|
2518
|
-
/**
|
|
2519
|
-
* @license
|
|
2520
|
-
* Copyright 2019 Google LLC
|
|
2521
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2522
|
-
*/
|
|
2523
|
-
// In an empty Node.js vm, we need to patch the global context.
|
|
2524
|
-
// TODO: Remove these globalThis assignments when we remove support
|
|
2525
|
-
// for vm modules (--experimental-vm-modules).
|
|
2526
|
-
globalThis.Event ??= EventShimWithRealType;
|
|
2527
|
-
globalThis.CustomEvent ??= CustomEventShimWithRealType;
|
|
2528
|
-
const constructionToken = Symbol();
|
|
2529
|
-
const isCaptureEventListener = (options) => (typeof options === 'boolean' ? options : (options?.capture ?? false));
|
|
2530
|
-
const enumerableProperty = { __proto__: null };
|
|
2531
|
-
enumerableProperty.enumerable = true;
|
|
2532
|
-
Object.freeze(enumerableProperty);
|
|
2533
|
-
/**
|
|
2534
|
-
* This is a basic implementation of an EventTarget.
|
|
2535
|
-
*
|
|
2536
|
-
* This is not fully spec compliant (e.g. validation),
|
|
2537
|
-
* but should work well enough for our use cases.
|
|
2538
|
-
*
|
|
2539
|
-
* @see https://dom.spec.whatwg.org/#eventtarget
|
|
2540
|
-
*
|
|
2541
|
-
* Example Event Path
|
|
2542
|
-
* ------------------
|
|
2543
|
-
*
|
|
2544
|
-
* Note that this depends on the logic in `packages/labs/ssr/src/lib/render-value.ts`.
|
|
2545
|
-
* Any element that is not a custom element or a slot element is skipped in the chain.
|
|
2546
|
-
*
|
|
2547
|
-
* <main>
|
|
2548
|
-
* <my-el1>
|
|
2549
|
-
* #shadow-dom (open)
|
|
2550
|
-
* <div>
|
|
2551
|
-
* <slot></slot>
|
|
2552
|
-
* <my-el2>
|
|
2553
|
-
* #shadow-dom (closed)
|
|
2554
|
-
* <slot></slot>
|
|
2555
|
-
* <event-dispatcher3></event-dispatcher3>
|
|
2556
|
-
* <slot name="nested"></slot>
|
|
2557
|
-
* </my-el2>
|
|
2558
|
-
* </div>
|
|
2559
|
-
* <event-dispatcher1></event-dispatcher1>
|
|
2560
|
-
* <event-dispatcher2 slot="nested"></event-dispatcher2>
|
|
2561
|
-
* </my-el1>
|
|
2562
|
-
* </main>
|
|
2563
|
-
*
|
|
2564
|
-
* Given the previous structure, the event path of this shim would be as follows,
|
|
2565
|
-
* for the given dispatcher with an event that bubbles (document-fragment
|
|
2566
|
-
* represents a ShadowRoot/#shadow-dom instance):
|
|
2567
|
-
*
|
|
2568
|
-
* <event-dispatcher1>:
|
|
2569
|
-
* [event-dispatcher1, slot{my-el1}, document-fragment{my-el1}, my-el1, document]
|
|
2570
|
-
*
|
|
2571
|
-
* <event-dispatcher2>:
|
|
2572
|
-
* [
|
|
2573
|
-
* event-dispatcher2,
|
|
2574
|
-
* slot[name="nested"]{my-el1},
|
|
2575
|
-
* slot{my-el2},
|
|
2576
|
-
* document-fragment{my-el2},
|
|
2577
|
-
* my-el2,
|
|
2578
|
-
* document-fragment{my-el1},
|
|
2579
|
-
* my-el1,
|
|
2580
|
-
* document
|
|
2581
|
-
* ]
|
|
2582
|
-
*
|
|
2583
|
-
* <event-dispatcher3> (without composed):
|
|
2584
|
-
* [event-dispatcher3, document-fragment{my-el2}]
|
|
2585
|
-
*
|
|
2586
|
-
* <event-dispatcher3> (composed):
|
|
2587
|
-
* [
|
|
2588
|
-
* event-dispatcher3,
|
|
2589
|
-
* document-fragment{my-el2},
|
|
2590
|
-
* my-el2,
|
|
2591
|
-
* document-fragment{my-el1},
|
|
2592
|
-
* my-el1,
|
|
2593
|
-
* document
|
|
2594
|
-
* ]
|
|
2595
|
-
*/
|
|
2596
|
-
class EventTarget {
|
|
2597
|
-
constructor() {
|
|
2598
|
-
this.__eventListeners = new Map();
|
|
2599
|
-
this.__captureEventListeners = new Map();
|
|
2600
|
-
}
|
|
2601
|
-
addEventListener(type, callback, options) {
|
|
2602
|
-
if (callback === undefined || callback === null) {
|
|
2603
|
-
return;
|
|
2604
|
-
}
|
|
2605
|
-
const eventListenersMap = isCaptureEventListener(options)
|
|
2606
|
-
? this.__captureEventListeners
|
|
2607
|
-
: this.__eventListeners;
|
|
2608
|
-
let eventListeners = eventListenersMap.get(type);
|
|
2609
|
-
if (eventListeners === undefined) {
|
|
2610
|
-
eventListeners = new Map();
|
|
2611
|
-
eventListenersMap.set(type, eventListeners);
|
|
2612
|
-
}
|
|
2613
|
-
else if (eventListeners.has(callback)) {
|
|
2614
|
-
return;
|
|
2615
|
-
}
|
|
2616
|
-
const normalizedOptions = typeof options === 'object' && options ? options : {};
|
|
2617
|
-
normalizedOptions.signal?.addEventListener('abort', () => this.removeEventListener(type, callback, options));
|
|
2618
|
-
eventListeners.set(callback, normalizedOptions ?? {});
|
|
2619
|
-
}
|
|
2620
|
-
removeEventListener(type, callback, options) {
|
|
2621
|
-
if (callback === undefined || callback === null) {
|
|
2622
|
-
return;
|
|
2623
|
-
}
|
|
2624
|
-
const eventListenersMap = isCaptureEventListener(options)
|
|
2625
|
-
? this.__captureEventListeners
|
|
2626
|
-
: this.__eventListeners;
|
|
2627
|
-
const eventListeners = eventListenersMap.get(type);
|
|
2628
|
-
if (eventListeners !== undefined) {
|
|
2629
|
-
eventListeners.delete(callback);
|
|
2630
|
-
if (!eventListeners.size) {
|
|
2631
|
-
eventListenersMap.delete(type);
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
}
|
|
2635
|
-
dispatchEvent(event) {
|
|
2636
|
-
let composedPath = this.__resolveFullEventPath();
|
|
2637
|
-
if (!event.composed && this.__host) {
|
|
2638
|
-
// If the event is not composed and the event was dispatched inside
|
|
2639
|
-
// shadow DOM, we need to stop the event chain before the host of the
|
|
2640
|
-
// shadow DOM.
|
|
2641
|
-
composedPath = composedPath.slice(0, composedPath.indexOf(this.__host));
|
|
2642
|
-
}
|
|
2643
|
-
// We need to patch various properties that would either be empty or wrong
|
|
2644
|
-
// in this scenario.
|
|
2645
|
-
let stopPropagation = false;
|
|
2646
|
-
let stopImmediatePropagation = false;
|
|
2647
|
-
let eventPhase = EventShimWithRealType.NONE;
|
|
2648
|
-
let target = null;
|
|
2649
|
-
let tmpTarget = null;
|
|
2650
|
-
let currentTarget = null;
|
|
2651
|
-
const originalStopPropagation = event.stopPropagation;
|
|
2652
|
-
const originalStopImmediatePropagation = event.stopImmediatePropagation;
|
|
2653
|
-
Object.defineProperties(event, {
|
|
2654
|
-
target: {
|
|
2655
|
-
get() {
|
|
2656
|
-
return target ?? tmpTarget;
|
|
2657
|
-
},
|
|
2658
|
-
...enumerableProperty,
|
|
2659
|
-
},
|
|
2660
|
-
srcElement: {
|
|
2661
|
-
get() {
|
|
2662
|
-
return event.target;
|
|
2663
|
-
},
|
|
2664
|
-
...enumerableProperty,
|
|
2665
|
-
},
|
|
2666
|
-
currentTarget: {
|
|
2667
|
-
get() {
|
|
2668
|
-
return currentTarget;
|
|
2669
|
-
},
|
|
2670
|
-
...enumerableProperty,
|
|
2671
|
-
},
|
|
2672
|
-
eventPhase: {
|
|
2673
|
-
get() {
|
|
2674
|
-
return eventPhase;
|
|
2675
|
-
},
|
|
2676
|
-
...enumerableProperty,
|
|
2677
|
-
},
|
|
2678
|
-
composedPath: {
|
|
2679
|
-
value: () => composedPath,
|
|
2680
|
-
...enumerableProperty,
|
|
2681
|
-
},
|
|
2682
|
-
stopPropagation: {
|
|
2683
|
-
value: () => {
|
|
2684
|
-
stopPropagation = true;
|
|
2685
|
-
originalStopPropagation.call(event);
|
|
2686
|
-
},
|
|
2687
|
-
...enumerableProperty,
|
|
2688
|
-
},
|
|
2689
|
-
stopImmediatePropagation: {
|
|
2690
|
-
value: () => {
|
|
2691
|
-
stopImmediatePropagation = true;
|
|
2692
|
-
originalStopImmediatePropagation.call(event);
|
|
2693
|
-
},
|
|
2694
|
-
...enumerableProperty,
|
|
2695
|
-
},
|
|
2696
|
-
});
|
|
2697
|
-
// An event handler can either be a function, an object with a handleEvent
|
|
2698
|
-
// method or null. This function takes care to call the event handler
|
|
2699
|
-
// correctly.
|
|
2700
|
-
const invokeEventListener = (listener, options, eventListenerMap) => {
|
|
2701
|
-
if (typeof listener === 'function') {
|
|
2702
|
-
listener(event);
|
|
2703
|
-
}
|
|
2704
|
-
else if (typeof listener?.handleEvent === 'function') {
|
|
2705
|
-
listener.handleEvent(event);
|
|
2706
|
-
}
|
|
2707
|
-
if (options.once) {
|
|
2708
|
-
eventListenerMap.delete(listener);
|
|
2709
|
-
}
|
|
2710
|
-
};
|
|
2711
|
-
// When an event is finished being dispatched, which can be after the event
|
|
2712
|
-
// tree has been traversed or stopPropagation/stopImmediatePropagation has
|
|
2713
|
-
// been called. Once that is the case, the currentTarget and eventPhase
|
|
2714
|
-
// need to be reset and a value, representing whether the event has not
|
|
2715
|
-
// been prevented, needs to be returned.
|
|
2716
|
-
const finishDispatch = () => {
|
|
2717
|
-
currentTarget = null;
|
|
2718
|
-
eventPhase = EventShimWithRealType.NONE;
|
|
2719
|
-
return !event.defaultPrevented;
|
|
2720
|
-
};
|
|
2721
|
-
// An event starts with the capture order, where it starts from the top.
|
|
2722
|
-
// This is done even if bubbles is set to false, which is the default.
|
|
2723
|
-
const captureEventPath = composedPath.slice().reverse();
|
|
2724
|
-
// If the event target, which dispatches the event, is either in the light DOM
|
|
2725
|
-
// or the event is not composed, the target is always itself. If that is not
|
|
2726
|
-
// the case, the target needs to be retargeted: https://dom.spec.whatwg.org/#retarget
|
|
2727
|
-
target = !this.__host || !event.composed ? this : null;
|
|
2728
|
-
const retarget = (eventTargets) => {
|
|
2729
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2730
|
-
tmpTarget = this;
|
|
2731
|
-
while (tmpTarget.__host && eventTargets.includes(tmpTarget.__host)) {
|
|
2732
|
-
tmpTarget = tmpTarget.__host;
|
|
2733
|
-
}
|
|
2734
|
-
};
|
|
2735
|
-
for (const eventTarget of captureEventPath) {
|
|
2736
|
-
if (!target && (!tmpTarget || tmpTarget === eventTarget.__host)) {
|
|
2737
|
-
retarget(captureEventPath.slice(captureEventPath.indexOf(eventTarget)));
|
|
2738
|
-
}
|
|
2739
|
-
currentTarget = eventTarget;
|
|
2740
|
-
eventPhase =
|
|
2741
|
-
eventTarget === event.target
|
|
2742
|
-
? EventShimWithRealType.AT_TARGET
|
|
2743
|
-
: EventShimWithRealType.CAPTURING_PHASE;
|
|
2744
|
-
const captureEventListeners = eventTarget.__captureEventListeners.get(event.type);
|
|
2745
|
-
if (captureEventListeners) {
|
|
2746
|
-
for (const [listener, options] of captureEventListeners) {
|
|
2747
|
-
invokeEventListener(listener, options, captureEventListeners);
|
|
2748
|
-
if (stopImmediatePropagation) {
|
|
2749
|
-
// Event.stopImmediatePropagation() stops any following invocation
|
|
2750
|
-
// of an event handler even on the same event target.
|
|
2751
|
-
return finishDispatch();
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
}
|
|
2755
|
-
if (stopPropagation) {
|
|
2756
|
-
// Event.stopPropagation() stops any following invocation
|
|
2757
|
-
// of an event handler for any following event targets.
|
|
2758
|
-
return finishDispatch();
|
|
2759
|
-
}
|
|
2760
|
-
}
|
|
2761
|
-
const bubbleEventPath = event.bubbles ? composedPath : [this];
|
|
2762
|
-
tmpTarget = null;
|
|
2763
|
-
for (const eventTarget of bubbleEventPath) {
|
|
2764
|
-
if (!target &&
|
|
2765
|
-
(!tmpTarget || eventTarget === tmpTarget.__host)) {
|
|
2766
|
-
retarget(bubbleEventPath.slice(0, bubbleEventPath.indexOf(eventTarget) + 1));
|
|
2767
|
-
}
|
|
2768
|
-
currentTarget = eventTarget;
|
|
2769
|
-
eventPhase =
|
|
2770
|
-
eventTarget === event.target
|
|
2771
|
-
? EventShimWithRealType.AT_TARGET
|
|
2772
|
-
: EventShimWithRealType.BUBBLING_PHASE;
|
|
2773
|
-
const eventListeners = eventTarget.__eventListeners.get(event.type);
|
|
2774
|
-
if (eventListeners) {
|
|
2775
|
-
for (const [listener, options] of eventListeners) {
|
|
2776
|
-
invokeEventListener(listener, options, eventListeners);
|
|
2777
|
-
if (stopImmediatePropagation) {
|
|
2778
|
-
// Event.stopImmediatePropagation() stops any following invocation
|
|
2779
|
-
// of an event handler even on the same event target.
|
|
2780
|
-
return finishDispatch();
|
|
2781
|
-
}
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
if (stopPropagation) {
|
|
2785
|
-
// Event.stopPropagation() stops any following invocation
|
|
2786
|
-
// of an event handler for any following event targets.
|
|
2787
|
-
return finishDispatch();
|
|
2788
|
-
}
|
|
2789
|
-
}
|
|
2790
|
-
return finishDispatch();
|
|
2791
|
-
}
|
|
2792
|
-
__resolveFullEventPath() {
|
|
2793
|
-
if (this.__eventPathCache) {
|
|
2794
|
-
return this.__eventPathCache;
|
|
2795
|
-
}
|
|
2796
|
-
else if (!this.__eventTargetParent) {
|
|
2797
|
-
return (this.__eventPathCache = [this, documentShim, windowShim]);
|
|
2798
|
-
}
|
|
2799
|
-
else {
|
|
2800
|
-
return (this.__eventPathCache = [
|
|
2801
|
-
this,
|
|
2802
|
-
...this.__eventTargetParent.__resolveFullEventPath(),
|
|
2803
|
-
]);
|
|
2804
|
-
}
|
|
2805
|
-
}
|
|
2806
|
-
}
|
|
2807
|
-
const EventTargetShimWithRealType = EventTarget;
|
|
2808
|
-
const attributes = new WeakMap();
|
|
2809
|
-
const attributesForElement = (element) => {
|
|
2810
|
-
let attrs = attributes.get(element);
|
|
2811
|
-
if (attrs === undefined) {
|
|
2812
|
-
attributes.set(element, (attrs = new Map()));
|
|
2813
|
-
}
|
|
2814
|
-
return attrs;
|
|
2815
|
-
};
|
|
2816
|
-
// The typings around the exports below are a little funky:
|
|
2817
|
-
//
|
|
2818
|
-
// 1. We want the `name` of the shim classes to match the real ones at runtime,
|
|
2819
|
-
// hence e.g. `class Element`.
|
|
2820
|
-
// 2. We can't shadow the global types with a simple class declaration, because
|
|
2821
|
-
// then we can't reference the global types for casting, hence e.g.
|
|
2822
|
-
// `const ElementShim = class Element`.
|
|
2823
|
-
// 3. We want to export the classes typed as the real ones, hence e.g.
|
|
2824
|
-
// `const ElementShimWithRealType = ElementShim as object as typeof Element;`.
|
|
2825
|
-
// 4. We want the exported names to match the real ones, hence e.g.
|
|
2826
|
-
// `export {ElementShimWithRealType as Element}`.
|
|
2827
|
-
const NodeShim = class Node extends EventTarget {
|
|
2828
|
-
getRootNode(options) {
|
|
2829
|
-
if (options?.composed) {
|
|
2830
|
-
return document$1;
|
|
2831
|
-
}
|
|
2832
|
-
// getRootNode returns the containing ShadowRoot instance, even if that was
|
|
2833
|
-
// created in closed mode.
|
|
2834
|
-
const host = this.__host;
|
|
2835
|
-
return (host?.__shadowRoot ?? document$1);
|
|
2836
|
-
}
|
|
2837
|
-
};
|
|
2838
|
-
const NodeShimWithRealType = NodeShim;
|
|
2839
|
-
const DocumentShim = class Document extends NodeShim {
|
|
2840
|
-
get adoptedStyleSheets() {
|
|
2841
|
-
return [];
|
|
2842
|
-
}
|
|
2843
|
-
createTreeWalker() {
|
|
2844
|
-
return {};
|
|
2845
|
-
}
|
|
2846
|
-
createTextNode() {
|
|
2847
|
-
return {};
|
|
2848
|
-
}
|
|
2849
|
-
createElement() {
|
|
2850
|
-
return {};
|
|
2851
|
-
}
|
|
2852
|
-
};
|
|
2853
|
-
const DocumentShimWithRealType = DocumentShim;
|
|
2854
|
-
const documentShim = new DocumentShim();
|
|
2855
|
-
const document$1 = documentShim;
|
|
2856
|
-
const WindowShim = class Window extends NodeShim {
|
|
2857
|
-
constructor(token) {
|
|
2858
|
-
super();
|
|
2859
|
-
if (token !== constructionToken) {
|
|
2860
|
-
throw new TypeError('Illegal constructor');
|
|
2861
|
-
}
|
|
2862
|
-
Object.assign(this, globalThis, {
|
|
2863
|
-
CustomElementRegistry,
|
|
2864
|
-
customElements,
|
|
2865
|
-
document: document$1,
|
|
2866
|
-
Document: DocumentShim,
|
|
2867
|
-
Element: ElementShim,
|
|
2868
|
-
EventTarget,
|
|
2869
|
-
HTMLElement: HTMLElementShim,
|
|
2870
|
-
Node: NodeShim,
|
|
2871
|
-
ShadowRoot: ShadowRootShim,
|
|
2872
|
-
window: this,
|
|
2873
|
-
Window: WindowShim,
|
|
2874
|
-
});
|
|
2875
|
-
}
|
|
2876
|
-
};
|
|
2877
|
-
const WindowShimWithRealType = WindowShim;
|
|
2878
|
-
const ElementShim = class Element extends NodeShim {
|
|
2879
|
-
constructor() {
|
|
2880
|
-
super(...arguments);
|
|
2881
|
-
this.__shadowRootMode = null;
|
|
2882
|
-
this.__shadowRoot = null;
|
|
2883
|
-
this.__internals = null;
|
|
2884
|
-
}
|
|
2885
|
-
get attributes() {
|
|
2886
|
-
return Array.from(attributesForElement(this)).map(([name, value]) => ({
|
|
2887
|
-
name,
|
|
2888
|
-
value,
|
|
2889
|
-
}));
|
|
2890
|
-
}
|
|
2891
|
-
get shadowRoot() {
|
|
2892
|
-
if (this.__shadowRootMode === 'closed') {
|
|
2893
|
-
return null;
|
|
2894
|
-
}
|
|
2895
|
-
return this.__shadowRoot;
|
|
2896
|
-
}
|
|
2897
|
-
get localName() {
|
|
2898
|
-
return this.constructor.__localName;
|
|
2899
|
-
}
|
|
2900
|
-
get tagName() {
|
|
2901
|
-
return this.localName?.toUpperCase();
|
|
2902
|
-
}
|
|
2903
|
-
setAttribute(name, value) {
|
|
2904
|
-
// Emulate browser behavior that silently casts all values to string. E.g.
|
|
2905
|
-
// `42` becomes `"42"` and `{}` becomes `"[object Object]""`.
|
|
2906
|
-
attributesForElement(this).set(name, String(value));
|
|
2907
|
-
}
|
|
2908
|
-
removeAttribute(name) {
|
|
2909
|
-
attributesForElement(this).delete(name);
|
|
2910
|
-
}
|
|
2911
|
-
toggleAttribute(name, force) {
|
|
2912
|
-
// Steps reference https://dom.spec.whatwg.org/#dom-element-toggleattribute
|
|
2913
|
-
if (this.hasAttribute(name)) {
|
|
2914
|
-
// Step 5
|
|
2915
|
-
if (force === undefined || !force) {
|
|
2916
|
-
this.removeAttribute(name);
|
|
2917
|
-
return false;
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2920
|
-
else {
|
|
2921
|
-
// Step 4
|
|
2922
|
-
if (force === undefined || force) {
|
|
2923
|
-
// Step 4.1
|
|
2924
|
-
this.setAttribute(name, '');
|
|
2925
|
-
return true;
|
|
2926
|
-
}
|
|
2927
|
-
else {
|
|
2928
|
-
// Step 4.2
|
|
2929
|
-
return false;
|
|
2930
|
-
}
|
|
2931
|
-
}
|
|
2932
|
-
// Step 6
|
|
2933
|
-
return true;
|
|
2934
|
-
}
|
|
2935
|
-
hasAttribute(name) {
|
|
2936
|
-
return attributesForElement(this).has(name);
|
|
2937
|
-
}
|
|
2938
|
-
attachShadow(init) {
|
|
2939
|
-
this.__shadowRootMode = init.mode;
|
|
2940
|
-
const shadowRoot = new ShadowRootShim(constructionToken, init);
|
|
2941
|
-
shadowRoot.__eventTargetParent = this;
|
|
2942
|
-
shadowRoot.__host = this;
|
|
2943
|
-
return (this.__shadowRoot = shadowRoot);
|
|
2944
|
-
}
|
|
2945
|
-
attachInternals() {
|
|
2946
|
-
if (this.__internals !== null) {
|
|
2947
|
-
throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': ` +
|
|
2948
|
-
`ElementInternals for the specified element was already attached.`);
|
|
2949
|
-
}
|
|
2950
|
-
const internals = new ElementInternalsShim(this);
|
|
2951
|
-
this.__internals = internals;
|
|
2952
|
-
return internals;
|
|
2953
|
-
}
|
|
2954
|
-
getAttribute(name) {
|
|
2955
|
-
const value = attributesForElement(this).get(name);
|
|
2956
|
-
return value ?? null;
|
|
2957
|
-
}
|
|
2958
|
-
};
|
|
2959
|
-
const ElementShimWithRealType = ElementShim;
|
|
2960
|
-
const HTMLElementShim = class HTMLElement extends ElementShim {
|
|
2961
|
-
};
|
|
2962
|
-
const HTMLElementShimWithRealType = HTMLElementShim;
|
|
2963
|
-
const HTMLSlotElementShim = class HTMLSlotElement extends HTMLElementShim {
|
|
2964
|
-
get localName() {
|
|
2965
|
-
return 'slot';
|
|
2966
|
-
}
|
|
2967
|
-
};
|
|
2968
|
-
const HTMLSlotElementShimWithRealType = HTMLSlotElementShim;
|
|
2969
|
-
const ShadowRootShim = class ShadowRoot extends NodeShim {
|
|
2970
|
-
get host() {
|
|
2971
|
-
return this.__host;
|
|
2972
|
-
}
|
|
2973
|
-
constructor(constructionToken, init) {
|
|
2974
|
-
super();
|
|
2975
|
-
if (constructionToken !== constructionToken) {
|
|
2976
|
-
throw new TypeError('Illegal constructor');
|
|
2977
|
-
}
|
|
2978
|
-
this.mode = init.mode;
|
|
2979
|
-
}
|
|
2980
|
-
};
|
|
2981
|
-
const ShadowRootShimWithRealType = ShadowRootShim;
|
|
2982
|
-
// For convenience, we provide a global instance of a HTMLElement as an event
|
|
2983
|
-
// target. This facilitates registering global event handlers
|
|
2984
|
-
// (e.g. for @lit/context ContextProvider).
|
|
2985
|
-
// We use this in in the SSR render function.
|
|
2986
|
-
// Note, this is a bespoke element and not simply `document` or `window` since
|
|
2987
|
-
// user code relies on these being undefined in the server environment.
|
|
2988
|
-
globalThis.litServerRoot ??= Object.defineProperty(new HTMLElementShimWithRealType(), 'localName', {
|
|
2989
|
-
// Patch localName (and tagName) to return a unique name.
|
|
2990
|
-
get() {
|
|
2991
|
-
return 'lit-server-root';
|
|
2992
|
-
},
|
|
2993
|
-
});
|
|
2994
|
-
function promiseWithResolvers() {
|
|
2995
|
-
let resolve;
|
|
2996
|
-
let reject;
|
|
2997
|
-
const promise = new Promise((res, rej) => {
|
|
2998
|
-
resolve = res;
|
|
2999
|
-
reject = rej;
|
|
3000
|
-
});
|
|
3001
|
-
return { promise, resolve: resolve, reject: reject };
|
|
3002
|
-
}
|
|
3003
|
-
class CustomElementRegistry {
|
|
3004
|
-
constructor() {
|
|
3005
|
-
this.__definitions = new Map();
|
|
3006
|
-
this.__reverseDefinitions = new Map();
|
|
3007
|
-
this.__pendingWhenDefineds = new Map();
|
|
3008
|
-
}
|
|
3009
|
-
define(name, ctor) {
|
|
3010
|
-
if (this.__definitions.has(name)) {
|
|
3011
|
-
if (process.env.NODE_ENV === 'development') {
|
|
3012
|
-
console.warn(`'CustomElementRegistry' already has "${name}" defined. ` +
|
|
3013
|
-
`This may have been caused by live reload or hot module ` +
|
|
3014
|
-
`replacement in which case it can be safely ignored.\n` +
|
|
3015
|
-
`Make sure to test your application with a production build as ` +
|
|
3016
|
-
`repeat registrations will throw in production.`);
|
|
3017
|
-
}
|
|
3018
|
-
else {
|
|
3019
|
-
throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': ` +
|
|
3020
|
-
`the name "${name}" has already been used with this registry`);
|
|
3021
|
-
}
|
|
3022
|
-
}
|
|
3023
|
-
if (this.__reverseDefinitions.has(ctor)) {
|
|
3024
|
-
throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': ` +
|
|
3025
|
-
`the constructor has already been used with this registry for the ` +
|
|
3026
|
-
`tag name ${this.__reverseDefinitions.get(ctor)}`);
|
|
3027
|
-
}
|
|
3028
|
-
// Provide tagName and localName for the component.
|
|
3029
|
-
ctor.__localName = name;
|
|
3030
|
-
this.__definitions.set(name, {
|
|
3031
|
-
ctor,
|
|
3032
|
-
// Note it's important we read `observedAttributes` in case it is a getter
|
|
3033
|
-
// with side-effects, as is the case in Lit, where it triggers class
|
|
3034
|
-
// finalization.
|
|
3035
|
-
//
|
|
3036
|
-
// TODO(aomarks) To be spec compliant, we should also capture the
|
|
3037
|
-
// registration-time lifecycle methods like `connectedCallback`. For them
|
|
3038
|
-
// to be actually accessible to e.g. the Lit SSR element renderer, though,
|
|
3039
|
-
// we'd need to introduce a new API for accessing them (since `get` only
|
|
3040
|
-
// returns the constructor).
|
|
3041
|
-
observedAttributes: ctor.observedAttributes ?? [],
|
|
3042
|
-
});
|
|
3043
|
-
this.__reverseDefinitions.set(ctor, name);
|
|
3044
|
-
this.__pendingWhenDefineds.get(name)?.resolve(ctor);
|
|
3045
|
-
this.__pendingWhenDefineds.delete(name);
|
|
3046
|
-
}
|
|
3047
|
-
get(name) {
|
|
3048
|
-
const definition = this.__definitions.get(name);
|
|
3049
|
-
return definition?.ctor;
|
|
3050
|
-
}
|
|
3051
|
-
getName(ctor) {
|
|
3052
|
-
return this.__reverseDefinitions.get(ctor) ?? null;
|
|
3053
|
-
}
|
|
3054
|
-
initialize(_root) {
|
|
3055
|
-
throw new Error(`customElements.initialize is not currently supported in SSR. ` +
|
|
3056
|
-
`Please file a bug if you need it.`);
|
|
3057
|
-
}
|
|
3058
|
-
upgrade(_element) {
|
|
3059
|
-
// In SSR this doesn't make a lot of sense, so we do nothing.
|
|
3060
|
-
throw new Error(`customElements.upgrade is not currently supported in SSR. ` +
|
|
3061
|
-
`Please file a bug if you need it.`);
|
|
3062
|
-
}
|
|
3063
|
-
async whenDefined(name) {
|
|
3064
|
-
const definition = this.__definitions.get(name);
|
|
3065
|
-
if (definition) {
|
|
3066
|
-
return definition.ctor;
|
|
3067
|
-
}
|
|
3068
|
-
let withResolvers = this.__pendingWhenDefineds.get(name);
|
|
3069
|
-
if (!withResolvers) {
|
|
3070
|
-
withResolvers = promiseWithResolvers();
|
|
3071
|
-
this.__pendingWhenDefineds.set(name, withResolvers);
|
|
3072
|
-
}
|
|
3073
|
-
return withResolvers.promise;
|
|
3074
|
-
}
|
|
3075
|
-
}
|
|
3076
|
-
const CustomElementRegistryShimWithRealType = CustomElementRegistry;
|
|
3077
|
-
const customElements = new CustomElementRegistryShimWithRealType();
|
|
3078
|
-
// The window variable instantiation must happen after all shims
|
|
3079
|
-
// have been declared, as they will be included in the window instance.
|
|
3080
|
-
const windowShim = new WindowShim(constructionToken);
|
|
3081
|
-
const window$1 = windowShim;
|
|
3082
|
-
|
|
3083
|
-
if (typeof HTMLElement === 'undefined') {
|
|
3084
|
-
globalThis.HTMLElement = HTMLElementShimWithRealType;
|
|
3085
|
-
}
|
|
3086
|
-
|
|
3087
|
-
/**
|
|
3088
|
-
* Side-effect module that installs the legacy browser polyfills before the SDK is imported.
|
|
3089
|
-
* Consumers should import this once (e.g. `import '@namiml/web-sdk/legacy-support';`)
|
|
3090
|
-
* prior to importing from `@namiml/web-sdk`.
|
|
3091
|
-
*/
|
|
1
|
+
"use strict";require("core-js/stable"),require("whatwg-fetch"),function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;const e=HTMLElement;window.HTMLElement={HTMLElement:function(){return Reflect.construct(e,[],this.constructor)}}.HTMLElement,HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}();var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,r={};n||(n=1,function(){var t;function n(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var r,o="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},i=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e];for(var n=0;n<t.length;++n){var r=t[n];if(r&&r.Math==Math)return r}throw Error("Cannot find global object")}(this);function a(e,t){if(t)e:{var n=i;e=e.split(".");for(var r=0;r<e.length-1;r++){var a=e[r];if(!(a in n))break e;n=n[a]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&o(n,e,{configurable:!0,writable:!0,value:t})}}function s(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:n(e)}}function c(e){if(!(e instanceof Array)){e=l(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}if(a("Symbol",function(e){function t(e,t){this.g=e,o(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n=0;return function e(r){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t("jscomp_symbol_"+(r||"")+"_"+n++,r)}}),a("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),r=0;r<t.length;r++){var a=i[t[r]];"function"==typeof a&&"function"!=typeof a.prototype[e]&&o(a.prototype,e,{configurable:!0,writable:!0,value:function(){return s(n(this))}})}return e}),"function"==typeof Object.setPrototypeOf)r=Object.setPrototypeOf;else{var u;e:{var h={};try{h.__proto__={a:!0},u=h.a;break e}catch(A){}u=!1}r=u?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var d=r;function f(){this.u=!1,this.h=null,this.Oa=void 0,this.g=1,this.ea=0,this.i=null}function p(e){if(e.u)throw new TypeError("Generator is already running");e.u=!0}function _(e,t){e.i={ab:t,fb:!0},e.g=e.ea}function m(e,t){return e.g=3,{value:t}}function v(e){this.g=new f,this.h=e}function y(e,t,n,r){try{var o=t.call(e.g.h,n);if(!(o instanceof Object))throw new TypeError("Iterator result "+o+" is not an object");if(!o.done)return e.g.u=!1,o;var i=o.value}catch(t){return e.g.h=null,_(e.g,t),g(e)}return e.g.h=null,r.call(e.g,i),g(e)}function g(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.u=!1,{value:t.value,done:!1}}catch(t){e.g.Oa=void 0,_(e.g,t)}if(e.g.u=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.fb)throw t.ab;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function b(e){this.next=function(t){return p(e.g),e.g.h?t=y(e,e.g.h.next,t,e.g.O):(e.g.O(t),t=g(e)),t},this.throw=function(t){return p(e.g),e.g.h?t=y(e,e.g.h.throw,t,e.g.O):(_(e.g,t),t=g(e)),t},this.return=function(t){return function(e,t){p(e.g);var n=e.g.h;return n?y(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),g(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function E(e,t){return t=new b(new v(t)),d&&e.prototype&&d(t,e.prototype),t}f.prototype.O=function(e){this.Oa=e},f.prototype.return=function(e){this.i={return:e},this.g=this.ea},Array.from||(Array.from=function(e){return[].slice.call(e)}),Object.assign||(Object.assign=function(e){for(var t,n=[].slice.call(arguments,1),r=0;r<n.length;r++)if(t=n[r])for(var o=e,i=Object.keys(t),a=0;a<i.length;a++){var s=i[a];o[s]=t[s]}return e});var w=setTimeout;function N(){}function S(e){if(!(this instanceof S))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this.N=0,this.Ha=!1,this.I=void 0,this.ba=[],D(e,this)}function C(e,t){for(;3===e.N;)e=e.I;0===e.N?e.ba.push(t):(e.Ha=!0,I(function(){var n=1===e.N?t.hb:t.ib;if(null===n)(1===e.N?T:O)(t.promise,e.I);else{try{var r=n(e.I)}catch(e){return void O(t.promise,e)}T(t.promise,r)}}))}function T(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof S)return e.N=3,e.I=t,void P(e);if("function"==typeof n)return void D(function(e,t){return function(){e.apply(t,arguments)}}(n,t),e)}e.N=1,e.I=t,P(e)}catch(t){O(e,t)}}function O(e,t){e.N=2,e.I=t,P(e)}function P(e){2===e.N&&0===e.ba.length&&I(function(){e.Ha||"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e.I)});for(var t=0,n=e.ba.length;t<n;t++)C(e,e.ba[t]);e.ba=null}function x(e,t,n){this.hb="function"==typeof e?e:null,this.ib="function"==typeof t?t:null,this.promise=n}function D(e,t){var n=!1;try{e(function(e){n||(n=!0,T(t,e))},function(e){n||(n=!0,O(t,e))})}catch(e){n||(n=!0,O(t,e))}}function M(e){return e&&"object"==typeof e&&e.constructor===S?e:new S(function(t){t(e)})}S.prototype.catch=function(e){return this.then(null,e)},S.prototype.then=function(e,t){var n=new this.constructor(N);return C(this,new x(e,t,n)),n},S.prototype.finally=function(e){var t=this.constructor;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){return t.reject(n)})})};var A,L,j,R,k,F,I="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){w(e,0)};if(!window.Promise){window.Promise=S,S.prototype.then=S.prototype.then,S.all=function(e){return new S(function(t,n){function r(e,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){r(e,t)},n)}o[e]=a,0===--i&&t(o)}catch(e){n(e)}}if(!e||void 0===e.length)return n(new TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(e);if(0===o.length)return t([]);for(var i=o.length,a=0;a<o.length;a++)r(a,o[a])})},S.race=function(e){return new S(function(t,n){if(!e||void 0===e.length)return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=e.length;r<o;r++)M(e[r]).then(t,n)})},S.resolve=M,S.reject=function(e){return new S(function(t,n){n(e)})};var H=document.createTextNode(""),U=[];new MutationObserver(function(){for(var e=U.length,t=0;t<e;t++)U[t]();U.splice(0,e)}).observe(H,{characterData:!0}),I=function(e){U.push(e),H.textContent=0<H.textContent.length?"":"a"}}!function(t,n){if(!(n in t)){var r=typeof e==typeof r?window:e,o=0,i=String(Math.random()),a="__symbol@@"+i,s=t.getOwnPropertyNames,l=t.getOwnPropertyDescriptor,c=t.create,u=t.keys,h=t.freeze||t,d=t.defineProperty,f=t.defineProperties,p=l(t,"getOwnPropertyNames"),_=t.prototype,m=_.hasOwnProperty,v=_.propertyIsEnumerable,y=_.toString,g=function(e,t,n){m.call(e,a)||d(e,a,{enumerable:!1,configurable:!1,writable:!1,value:{}}),e[a]["@@"+t]=n},b=function(){},E=function(e){return e!=a&&!m.call(T,e)},w=function(e){return e!=a&&m.call(T,e)},N=function(e){var t=String(e);return w(t)?m.call(this,t)&&!!this[a]&&this[a]["@@"+t]:v.call(this,e)},S=function(e){return d(_,e,{enumerable:!1,configurable:!0,get:b,set:function(t){M(this,e,{enumerable:!1,configurable:!0,writable:!0,value:t}),g(this,e,!0)}}),T[e]=d(t(e),"constructor",O),h(T[e])},C=function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return S("__symbol:".concat(t||"",i,++o))},T=c(null),O={value:C},P=function(e){return T[e]},x=function(e,t,n){var r=String(t);if(w(r)){if(t=M,n.enumerable){var o=c(n);o.enumerable=!1}else o=n;t(e,r,o),g(e,r,!!n.enumerable)}else d(e,t,n);return e},D=function(e){return s(e).filter(w).map(P)};p.value=x,d(t,"defineProperty",p),p.value=D,d(t,n,p),p.value=function(e){return s(e).filter(E)},d(t,"getOwnPropertyNames",p),p.value=function(e,t){var n=D(t);return n.length?u(t).concat(n).forEach(function(n){N.call(t,n)&&x(e,n,t[n])}):f(e,t),e},d(t,"defineProperties",p),p.value=N,d(_,"propertyIsEnumerable",p),p.value=C,d(r,"Symbol",p),p.value=function(e){return(e="__symbol:".concat("__symbol:",e,i))in _?T[e]:S(e)},d(C,"for",p),p.value=function(e){if(E(e))throw new TypeError(e+" is not a symbol");if(m.call(T,e)&&"__symbol:"===(e=e.slice(10)).slice(0,10)&&(e=e.slice(10))!==i)return 0<(e=e.slice(0,e.length-i.length)).length?e:void 0},d(C,"keyFor",p),p.value=function(e,t){var n=l(e,t);return n&&w(t)&&(n.enumerable=N.call(e,t)),n},d(t,"getOwnPropertyDescriptor",p),p.value=function(e,t){return 1===arguments.length||void 0===t?c(e):function(e,t){var n=c(e);return s(t).forEach(function(e){N.call(t,e)&&x(n,e,t[e])}),n}(e,t)},d(t,"create",p),p.value=function(){var e=y.call(this);return"[object String]"===e&&w(this)?"[object Symbol]":e},d(_,"toString",p);try{if(!0!==c(d({},"__symbol:",{get:function(){return d(this,"__symbol:",{value:!0})["__symbol:"]}}))["__symbol:"])throw"IE11";var M=d}catch(e){M=function(e,t,n){var r=l(_,t);delete _[t],d(e,t,n),d(_,t,r)}}}}(Object,"getOwnPropertySymbols"),A=Object,L=Symbol,R=A.defineProperty,k=A.prototype,F=k.toString,"iterator match replace search split hasInstance isConcatSpreadable unscopables species toPrimitive toStringTag".split(" ").forEach(function(e){e in L||(R(L,e,{value:L(e)}),"toStringTag"===e&&((j=A.getOwnPropertyDescriptor(k,"toString")).value=function(){var e=F.call(this),t=null==this?this:this[L.toStringTag];return null==t?e:"[object "+t+"]"},R(k,"toString",j)))}),function(e,t,n){function r(){return this}t[e]||(t[e]=function(){var t=0,n=this,o={next:function(){var e=n.length<=t;return e?{done:e}:{done:e,value:n[t++]}}};return o[e]=r,o}),n[e]||(n[e]=function(){var t=String.fromCodePoint,n=this,o=0,i=n.length,a={next:function(){var e=i<=o,r=e?"":t(n.codePointAt(o));return o+=r.length,e?{done:e}:{done:e,value:r}}};return a[e]=r,a})}(Symbol.iterator,Array.prototype,String.prototype);var B=Object.prototype.toString;Object.prototype.toString=function(){return void 0===this?"[object Undefined]":null===this?"[object Null]":B.call(this)},Object.keys=function(e){return Object.getOwnPropertyNames(e).filter(function(t){return(t=Object.getOwnPropertyDescriptor(e,t))&&t.enumerable})},String.prototype[Symbol.iterator]&&String.prototype.codePointAt||(String.prototype[Symbol.iterator]=function e(){var t,n=this;return E(e,function(e){if(1==e.g&&(t=0),3!=e.g)return t<n.length?e=m(e,n[t]):(e.g=0,e=void 0),e;t++,e.g=2})}),Set.prototype[Symbol.iterator]||(Set.prototype[Symbol.iterator]=function e(){var t,n,r=this;return E(e,function(e){if(1==e.g&&(t=[],r.forEach(function(e){t.push(e)}),n=0),3!=e.g)return n<t.length?e=m(e,t[n]):(e.g=0,e=void 0),e;n++,e.g=2})}),Map.prototype[Symbol.iterator]||(Map.prototype[Symbol.iterator]=function e(){var t,n,r=this;return E(e,function(e){if(1==e.g&&(t=[],r.forEach(function(e,n){t.push([n,e])}),n=0),3!=e.g)return n<t.length?e=m(e,t[n]):(e.g=0,e=void 0),e;n++,e.g=2})});var W=document.createEvent("Event");if(W.initEvent("foo",!0,!0),W.preventDefault(),!W.defaultPrevented){var q=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(q.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var G=/Trident/.test(navigator.userAgent);if(!window.Event||G&&"function"!=typeof window.Event){var V=window.Event;if(window.Event=function(e,t){t=t||{};var n=document.createEvent("Event");return n.initEvent(e,!!t.bubbles,!!t.cancelable),n},V){for(var z in V)window.Event[z]=V[z];window.Event.prototype=V.prototype}}if((!window.CustomEvent||G&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!!t.bubbles,!!t.cancelable,t.detail),n},window.CustomEvent.prototype=window.Event.prototype),!window.MouseEvent||G&&"function"!=typeof window.MouseEvent){var K=window.MouseEvent;if(window.MouseEvent=function(e,t){t=t||{};var n=document.createEvent("MouseEvent");return n.initMouseEvent(e,!!t.bubbles,!!t.cancelable,t.view||window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),n},K)for(var X in K)window.MouseEvent[X]=K[X];window.MouseEvent.prototype=K.prototype}var Y,$=function(){function e(){o++}var t=!1,n=!1,r={get capture(){return t=!0},get once(){return n=!0}},o=0,i=document.createElement("div");i.addEventListener("click",e,r);var a=t&&n;return a&&(i.dispatchEvent(new Event("click")),i.dispatchEvent(new Event("click")),a=1==o),i.removeEventListener("click",e,r),a}(),J=null!==(Y=window.EventTarget)&&void 0!==Y?Y:window.Node;if(!$&&"addEventListener"in J.prototype){var Z=function(e){if(!e||"object"!=typeof e&&"function"!=typeof e){var t=!!e;e=!1}else t=!!e.capture,e=!!e.once;return{capture:t,once:e}},Q=J.prototype.addEventListener,ee=J.prototype.removeEventListener,te=new WeakMap,ne=new WeakMap,re=function(e,t,n){var r=n?te:ne;return void 0===(n=r.get(e))&&r.set(e,n=new Map),void 0===(e=n.get(t))&&n.set(t,e=new WeakMap),e};J.prototype.addEventListener=function(e,t,n){var r=this;if(null!=t){var o=(n=Z(n)).capture;n=n.once;var i=re(this,e,o);if(!i.has(t)){var a=n?function(n){return i.delete(t),ee.call(r,e,a,o),"function"==typeof t?t.call(r,n):"function"==typeof(null==t?void 0:t.handleEvent)?t.handleEvent(n):void 0}:null;i.set(t,a),Q.call(this,e,null!=a?a:t,o)}}},J.prototype.removeEventListener=function(e,t,n){if(null!=t){n=Z(n).capture;var r=re(this,e,n),o=r.get(t);void 0!==o&&(r.delete(t),ee.call(this,e,null!=o?o:t,n))}}}Object.getOwnPropertyDescriptor(Node.prototype,"baseURI")||Object.defineProperty(Node.prototype,"baseURI",{get:function(){var e=(this.ownerDocument||this).querySelector("base[href]");return e&&e.href||window.location.href},configurable:!0,enumerable:!0});var oe,ie,ae=Element.prototype,se=null!==(oe=Object.getOwnPropertyDescriptor(ae,"attributes"))&&void 0!==oe?oe:Object.getOwnPropertyDescriptor(Node.prototype,"attributes"),le=null!==(ie=null==se?void 0:se.get)&&void 0!==ie?ie:function(){return this.attributes},ce=Array.prototype.map;ae.hasOwnProperty("getAttributeNames")||(ae.getAttributeNames=function(){return ce.call(le.call(this),function(e){return e.name})});var ue,he=Element.prototype;he.hasOwnProperty("matches")||(he.matches=null!==(ue=he.webkitMatchesSelector)&&void 0!==ue?ue:he.msMatchesSelector);var de=Node.prototype.appendChild;function fe(e){(e=e.prototype).hasOwnProperty("append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(n=(t=l(t)).next();!n.done;n=t.next())n=n.value,de.call(this,"string"==typeof n?document.createTextNode(n):n)}})}fe(Document),fe(DocumentFragment),fe(Element);var pe,_e,me=Node.prototype.insertBefore,ve=null!==(_e=null===(pe=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===pe?void 0:pe.get)&&void 0!==_e?_e:function(){return this.firstChild};function ye(e){(e=e.prototype).hasOwnProperty("prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];n=ve.call(this);for(var r=(t=l(t)).next();!r.done;r=t.next())r=r.value,me.call(this,"string"==typeof r?document.createTextNode(r):r,n)}})}ye(Document),ye(DocumentFragment),ye(Element);var ge,be,Ee=Node.prototype.appendChild,we=Node.prototype.removeChild,Ne=null!==(be=null===(ge=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild"))||void 0===ge?void 0:ge.get)&&void 0!==be?be:function(){return this.firstChild};function Se(e){(e=e.prototype).hasOwnProperty("replaceChildren")||Object.defineProperty(e,"replaceChildren",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(;null!==(n=Ne.call(this));)we.call(this,n);for(n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Ee.call(this,"string"==typeof n?document.createTextNode(n):n)}})}Se(Document),Se(DocumentFragment),Se(Element);var Ce,Te,Oe,Pe,xe=Node.prototype.insertBefore,De=null!==(Te=null===(Ce=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Ce?void 0:Ce.get)&&void 0!==Te?Te:function(){return this.parentNode},Me=null!==(Pe=null===(Oe=Object.getOwnPropertyDescriptor(Node.prototype,"nextSibling"))||void 0===Oe?void 0:Oe.get)&&void 0!==Pe?Pe:function(){return this.nextSibling};function Ae(e){(e=e.prototype).hasOwnProperty("after")||Object.defineProperty(e,"after",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=De.call(this)))for(var r=Me.call(this),o=(t=l(t)).next();!o.done;o=t.next())o=o.value,xe.call(n,"string"==typeof o?document.createTextNode(o):o,r)}})}Ae(CharacterData),Ae(Element);var Le,je,Re=Node.prototype.insertBefore,ke=null!==(je=null===(Le=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Le?void 0:Le.get)&&void 0!==je?je:function(){return this.parentNode};function Fe(e){(e=e.prototype).hasOwnProperty("before")||Object.defineProperty(e,"before",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=ke.call(this)))for(var r=(t=l(t)).next();!r.done;r=t.next())r=r.value,Re.call(n,"string"==typeof r?document.createTextNode(r):r,this)}})}Fe(CharacterData),Fe(Element);var Ie,He,Ue=Node.prototype.removeChild,Be=null!==(He=null===(Ie=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===Ie?void 0:Ie.get)&&void 0!==He?He:function(){return this.parentNode};function We(e){(e=e.prototype).hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Be.call(this);e&&Ue.call(e,this)}})}We(CharacterData),We(Element);var qe,Ge,Ve=Node.prototype.insertBefore,ze=Node.prototype.removeChild,Ke=null!==(Ge=null===(qe=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode"))||void 0===qe?void 0:qe.get)&&void 0!==Ge?Ge:function(){return this.parentNode};function Xe(e){(e=e.prototype).hasOwnProperty("replaceWith")||Object.defineProperty(e,"replaceWith",{configurable:!0,enumerable:!0,writable:!0,value:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=Ke.call(this))){for(var r=(t=l(t)).next();!r.done;r=t.next())r=r.value,Ve.call(n,"string"==typeof r?document.createTextNode(r):r,this);ze.call(n,this)}}})}Xe(CharacterData),Xe(Element);var Ye=window.Element.prototype,$e=window.HTMLElement.prototype,Je=window.SVGElement.prototype;!$e.hasOwnProperty("classList")||Ye.hasOwnProperty("classList")||Je.hasOwnProperty("classList")||Object.defineProperty(Ye,"classList",Object.getOwnPropertyDescriptor($e,"classList"));var Ze=Element.prototype,Qe=Element.prototype.hasAttribute,et=Element.prototype.setAttribute,tt=Element.prototype.removeAttribute;Ze.hasOwnProperty("toggleAttribute")||(Ze.toggleAttribute=function(e,t){return void 0===t?Qe.call(this,e)?(tt.call(this,e),!1):(et.call(this,e,""),!0):t?(Qe.call(this,e)||et.call(this,e,""),!0):(tt.call(this,e),!1)});var nt=document.createElement("style");nt.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var rt=document.querySelector("head");rt.insertBefore(nt,rt.firstChild);var ot=window;ot.WebComponents=ot.WebComponents||{flags:{}};var it=document.querySelector('script[src*="webcomponents-bundle"]'),at=/wc-(.+)/,st={};if(!st.noOpts){if(location.search.slice(1).split("&").forEach(function(e){var t;(e=e.split("="))[0]&&(t=e[0].match(at))&&(st[t[1]]=e[1]||!0)}),it)for(var lt=0,ct=void 0;ct=it.attributes[lt];lt++)"src"!==ct.name&&(st[ct.name]=ct.value||!0);var ut={};st.log&&st.log.split&&st.log.split(",").forEach(function(e){ut[e]=!0}),st.log=ut}ot.WebComponents.flags=st;var ht=st.shadydom;if(ht){ot.ShadyDOM=ot.ShadyDOM||{},ot.ShadyDOM.force=ht;var dt=st.noPatch;ot.ShadyDOM.noPatch="true"===dt||dt}var ft=st.register||st.ce;function pt(){}function _t(e){return e.__shady||(e.__shady=new pt),e.__shady}function mt(e){return e&&e.__shady}ft&&window.customElements&&(ot.customElements.forcePolyfill=ft),function(){function e(){}function t(e,t){if(!e.childNodes.length)return[];switch(e.nodeType){case Node.DOCUMENT_NODE:return _.call(e,t);case Node.DOCUMENT_FRAGMENT_NODE:return m.call(e,t);default:return p.call(e,t)}}var n="undefined"==typeof HTMLTemplateElement,r=!(document.createDocumentFragment().cloneNode()instanceof DocumentFragment),o=!1;/Trident/.test(navigator.userAgent)&&function(){function e(e,t){if(e instanceof DocumentFragment)for(var r;r=e.firstChild;)n.call(this,r,t);else n.call(this,e,t);return e}o=!0;var t=Node.prototype.cloneNode;Node.prototype.cloneNode=function(e){return e=t.call(this,e),this instanceof DocumentFragment&&(e.__proto__=DocumentFragment.prototype),e},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 n=Node.prototype.insertBefore;Node.prototype.insertBefore=e;var r=Node.prototype.appendChild;Node.prototype.appendChild=function(t){return t instanceof DocumentFragment?e.call(this,t,null):r.call(this,t),t};var i=Node.prototype.removeChild,a=Node.prototype.replaceChild;Node.prototype.replaceChild=function(t,n){return t instanceof DocumentFragment?(e.call(this,t,n),i.call(this,n)):a.call(this,t,n),n},Document.prototype.createDocumentFragment=function(){var e=this.createElement("df");return e.__proto__=DocumentFragment.prototype,e};var s=Document.prototype.importNode;Document.prototype.importNode=function(e,t){return t=s.call(this,e,t||!1),e instanceof DocumentFragment&&(t.__proto__=DocumentFragment.prototype),t}}();var i=Node.prototype.cloneNode,a=Document.prototype.createElement,s=Document.prototype.importNode,l=Node.prototype.removeChild,c=Node.prototype.appendChild,u=Node.prototype.replaceChild,h=DOMParser.prototype.parseFromString,d=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML")||{get:function(){return this.innerHTML},set:function(e){this.innerHTML=e}},f=Object.getOwnPropertyDescriptor(window.Node.prototype,"childNodes")||{get:function(){return this.childNodes}},p=Element.prototype.querySelectorAll,_=Document.prototype.querySelectorAll,m=DocumentFragment.prototype.querySelectorAll,v=function(){if(!n){var e=document.createElement("template"),t=document.createElement("template");return t.content.appendChild(document.createElement("div")),e.content.appendChild(t),0===(e=e.cloneNode(!0)).content.childNodes.length||0===e.content.firstChild.content.childNodes.length||r}}();if(n){var y=document.implementation.createHTMLDocument("template"),g=!0,b=document.createElement("style");b.textContent="template{display:none;}";var E=document.head;E.insertBefore(b,E.firstElementChild),e.prototype=Object.create(HTMLElement.prototype);var w=!document.createElement("div").hasOwnProperty("innerHTML");e.Z=function(t){if(!t.content&&t.namespaceURI===document.documentElement.namespaceURI){t.content=y.createDocumentFragment();for(var n;n=t.firstChild;)c.call(t.content,n);if(w)t.__proto__=e.prototype;else if(t.cloneNode=function(t){return e.va(this,t)},g)try{S(t),C(t)}catch(e){g=!1}e.bootstrap(t.content)}};var N={option:["select"],thead:["table"],col:["colgroup","table"],tr:["tbody","table"],th:["tr","tbody","table"],td:["tr","tbody","table"]},S=function(t){Object.defineProperty(t,"innerHTML",{get:function(){return M(this)},set:function(t){var n=N[(/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(t)||["",""])[1].toLowerCase()];if(n)for(var r=0;r<n.length;r++)t="<"+n[r]+">"+t+"</"+n[r]+">";for(y.body.innerHTML=t,e.bootstrap(y);this.content.firstChild;)l.call(this.content,this.content.firstChild);if(t=y.body,n)for(r=0;r<n.length;r++)t=t.lastChild;for(;t.firstChild;)c.call(this.content,t.firstChild)},configurable:!0})},C=function(e){Object.defineProperty(e,"outerHTML",{get:function(){return"<template>"+this.innerHTML+"</template>"},set:function(e){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(y.body.innerHTML=e,e=this.ownerDocument.createDocumentFragment();y.body.firstChild;)c.call(e,y.body.firstChild);u.call(this.parentNode,e,this)},configurable:!0})};S(e.prototype),C(e.prototype),e.bootstrap=function(n){for(var r,o=0,i=(n=t(n,"template")).length;o<i&&(r=n[o]);o++)e.Z(r)},document.addEventListener("DOMContentLoaded",function(){e.bootstrap(document)}),Document.prototype.createElement=function(){var t=a.apply(this,arguments);return"template"===t.localName&&e.Z(t),t},DOMParser.prototype.parseFromString=function(){var t=h.apply(this,arguments);return e.bootstrap(t),t},Object.defineProperty(HTMLElement.prototype,"innerHTML",{get:function(){return M(this)},set:function(t){d.set.call(this,t),e.bootstrap(this)},configurable:!0,enumerable:!0});var T=/[&\u00A0"]/g,O=/[&\u00A0<>]/g,P=function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}},x=(b=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t})("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),D=b("style script xmp iframe noembed noframes plaintext noscript".split(" ")),M=function(e,t){"template"===e.localName&&(e=e.content);for(var n,r="",o=t?t(e):f.get.call(e),i=0,a=o.length;i<a&&(n=o[i]);i++){e:{var s=n,l=e,c=t;switch(s.nodeType){case Node.ELEMENT_NODE:for(var u=s.localName,h="<"+u,d=s.attributes,p=0;l=d[p];p++)h+=" "+l.name+'="'+l.value.replace(T,P)+'"';h+=">",s=x[u]?h:h+M(s,c)+"</"+u+">";break e;case Node.TEXT_NODE:s=s.data,s=l&&D[l.localName]?s:s.replace(O,P);break e;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break e;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}}if(n||v){e.va=function(e,t){var n=i.call(e,!1);return this.Z&&this.Z(n),t&&(c.call(n.content,i.call(e.content,!0)),A(n.content,e.content)),n};var A=function(n,r){if(r.querySelectorAll&&0!==(r=t(r,"template")).length)for(var o,i,a=0,s=(n=t(n,"template")).length;a<s;a++)i=r[a],o=n[a],e&&e.Z&&e.Z(i),u.call(o.parentNode,L.call(i,!0),o)},L=Node.prototype.cloneNode=function(t){if(!o&&r&&this instanceof DocumentFragment){if(!t)return this.ownerDocument.createDocumentFragment();var n=j.call(this.ownerDocument,this,!0)}else n=this.nodeType===Node.ELEMENT_NODE&&"template"===this.localName&&this.namespaceURI==document.documentElement.namespaceURI?e.va(this,t):i.call(this,t);return t&&A(n,this),n},j=Document.prototype.importNode=function(n,r){if(r=r||!1,"template"===n.localName)return e.va(n,r);var o=s.call(this,n,r);if(r){A(o,n),n=t(o,'script:not([type]),script[type="application/javascript"],script[type="text/javascript"]');for(var i,l=0;l<n.length;l++){i=n[l],(r=a.call(document,"script")).textContent=i.textContent;for(var c,h=i.attributes,d=0;d<h.length;d++)c=h[d],r.setAttribute(c.name,c.value);u.call(i.parentNode,r,i)}}return o}}n&&(window.HTMLTemplateElement=e)}(),pt.prototype.toJSON=function(){return{}};var vt=window.ShadyDOM||{};vt.cb=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var yt,gt=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");vt.D=!!(gt&>.configurable&>.get),vt.Ba=vt.force||!vt.cb,vt.J=vt.noPatch||!1,vt.ha=vt.preferPerformance,vt.Da="on-demand"===vt.J;var bt=vt.querySelectorImplementation;function Et(){return Document.prototype.msElementsFromPoint?"msElementsFromPoint":"elementsFromPoint"}function wt(e){return(e=mt(e))&&void 0!==e.firstChild}function Nt(e){return e instanceof ShadowRoot}function St(e){return(e=(e=mt(e))&&e.root)&&go(e)}yt=-1<["native","selectorEngine"].indexOf(bt)?bt:void 0,vt.wb=yt,vt.Ra=navigator.userAgent.match("Trident");var Ct=Element.prototype,Tt=Ct.matches||Ct.matchesSelector||Ct.mozMatchesSelector||Ct.msMatchesSelector||Ct.oMatchesSelector||Ct.webkitMatchesSelector,Ot=document.createTextNode(""),Pt=0,xt=[];function Dt(e){xt.push(e),Ot.textContent=Pt++}new MutationObserver(function(){for(;xt.length;)try{xt.shift()()}catch(e){throw Ot.textContent=Pt++,e}}).observe(Ot,{characterData:!0});var Mt=document.contains?function(e,t){return e.__shady_native_contains(t)}:function(e,t){return e===t||e.documentElement&&e.documentElement.__shady_native_contains(t)};function At(e,t){for(;t;){if(t==e)return!0;t=t.__shady_parentNode}return!1}function Lt(e){for(var t=e.length-1;0<=t;t--){var n=e[t],r=n.getAttribute("id")||n.getAttribute("name");r&&"length"!==r&&isNaN(r)&&(e[r]=n)}return e.item=function(t){return e[t]},e.namedItem=function(t){if("length"!==t&&isNaN(t)&&e[t])return e[t];for(var n=l(e),r=n.next();!r.done;r=n.next())if(((r=r.value).getAttribute("id")||r.getAttribute("name"))==t)return r;return null},e}function jt(e){var t=[];for(e=e.__shady_native_firstChild;e;e=e.__shady_native_nextSibling)t.push(e);return t}function Rt(e){var t=[];for(e=e.__shady_firstChild;e;e=e.__shady_nextSibling)t.push(e);return t}function kt(e,t,n){if(n.configurable=!0,n.value)e[t]=n.value;else try{Object.defineProperty(e,t,n)}catch(e){}}function Ft(e,t,n,r){for(var o in n=void 0===n?"":n,t)r&&0<=r.indexOf(o)||kt(e,n+o,t[o])}function It(e,t){for(var n in t)n in e&&kt(e,n,t[n])}function Ht(e){var t={};return Object.getOwnPropertyNames(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t}function Ut(e,t){for(var n,r=Object.getOwnPropertyNames(t),o=0;o<r.length;o++)e[n=r[o]]=t[n]}function Bt(e){return e instanceof Node?e:document.createTextNode(""+e)}function Wt(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(1===t.length)return Bt(t[0]);n=document.createDocumentFragment();for(var r=(t=l(t)).next();!r.done;r=t.next())n.appendChild(Bt(r.value));return n}function qt(e){var t;for(t=void 0===t?1:t;0<t;t--)e=e.reduce(function(e,t){return Array.isArray(t)?e.push.apply(e,c(t)):e.push(t),e},[]);return e}var Gt,Vt=[];function zt(e){Gt||(Gt=!0,Dt(Kt)),Vt.push(e)}function Kt(){Gt=!1;for(var e=!!Vt.length;Vt.length;)Vt.shift()();return e}function Xt(){this.g=!1,this.addedNodes=[],this.removedNodes=[],this.qa=new Set}Kt.list=Vt,Xt.prototype.flush=function(){if(this.g){this.g=!1;var e=this.takeRecords();e.length&&this.qa.forEach(function(t){t(e)})}},Xt.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var e=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],e}return[]};var Yt=/[&\u00A0"]/g,$t=/[&\u00A0<>]/g;function Jt(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function Zt(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var Qt=Zt("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),en=Zt("style script xmp iframe noembed noframes plaintext noscript".split(" "));function tn(e,t){"template"===e.localName&&(e=e.content);for(var n="",r=t?t(e):e.childNodes,o=0,i=r.length,a=void 0;o<i&&(a=r[o]);o++){e:{var s=a,l=e,c=t;switch(s.nodeType){case Node.ELEMENT_NODE:for(var u,h="<"+(l=s.localName),d=s.attributes,f=0;u=d[f];f++)h+=" "+u.name+'="'+u.value.replace(Yt,Jt)+'"';h+=">",s=Qt[l]?h:h+tn(s,c)+"</"+l+">";break e;case Node.TEXT_NODE:s=s.data,s=l&&en[l.localName]?s:s.replace($t,Jt);break e;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break e;default:throw window.console.error(s),Error("not implemented")}}n+=s}return n}var nn=vt.D,rn={querySelector:function(e){return this.__shady_native_querySelector(e)},querySelectorAll:function(e){return this.__shady_native_querySelectorAll(e)}},on={};function an(e){on[e]=function(t){return t["__shady_native_"+e]}}function sn(e,t){for(var n in Ft(e,t,"__shady_native_"),t)an(n)}function ln(e,t){t=void 0===t?[]:t;for(var n=0;n<t.length;n++){var r=t[n],o=Object.getOwnPropertyDescriptor(e,r);o&&(Object.defineProperty(e,"__shady_native_"+r,o),o.value?rn[r]||(rn[r]=o.value):an(r))}}var cn=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),un=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),hn=document.implementation.createHTMLDocument("inert");function dn(e){for(var t;t=e.__shady_native_firstChild;)e.__shady_native_removeChild(t)}var fn=["firstElementChild","lastElementChild","children","childElementCount"],pn=["querySelector","querySelectorAll","append","prepend","replaceChildren"],_n=Ht({get childNodes(){return this.__shady_childNodes},get firstChild(){return this.__shady_firstChild},get lastChild(){return this.__shady_lastChild},get childElementCount(){return this.__shady_childElementCount},get children(){return this.__shady_children},get firstElementChild(){return this.__shady_firstElementChild},get lastElementChild(){return this.__shady_lastElementChild},get shadowRoot(){return this.__shady_shadowRoot}}),mn=Ht({get textContent(){return this.__shady_textContent},set textContent(e){this.__shady_textContent=e},get innerHTML(){return this.__shady_innerHTML},set innerHTML(e){this.__shady_innerHTML=e}}),vn=Ht({get parentElement(){return this.__shady_parentElement},get parentNode(){return this.__shady_parentNode},get nextSibling(){return this.__shady_nextSibling},get previousSibling(){return this.__shady_previousSibling},get nextElementSibling(){return this.__shady_nextElementSibling},get previousElementSibling(){return this.__shady_previousElementSibling},get className(){return this.__shady_className},set className(e){this.__shady_className=e}});function yn(e){for(var t in e){var n=e[t];n&&(n.enumerable=!1)}}yn(_n),yn(mn),yn(vn);var gn=vt.D||!0===vt.J,bn=gn?function(){}:function(e){var t=_t(e);t.Ta||(t.Ta=!0,It(e,vn))},En=gn?function(){}:function(e){var t=_t(e);t.Sa||(t.Sa=!0,It(e,_n),window.customElements&&window.customElements.polyfillWrapFlushCallback&&!vt.J||It(e,mn))},wn="__eventWrappers"+Date.now(),Nn=function(){var e=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return e?function(t){return e.get.call(t)}:null}(),Sn=function(){function e(){}var t=!1,n={get capture(){return t=!0,!1}};return window.addEventListener("test",e,n),window.removeEventListener("test",e,n),t}();function Cn(e){if(null===e||"object"!=typeof e&&"function"!=typeof e)var t=!!e,n=!1;else{t=!!e.capture,n=!!e.once;var r=e.U}return{Pa:r,capture:t,once:n,Na:Sn?e:t}}var Tn={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},On={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function Pn(e){return e instanceof Node?e.__shady_getRootNode():e}function xn(e,t){var n=[],r=e;for(e=Pn(e);r;)n.push(r),r=r.__shady_assignedSlot?r.__shady_assignedSlot:r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host&&(t||r!==e)?r.host:r.__shady_parentNode;return n[n.length-1]===document&&n.push(window),n}function Dn(e,t){if(!Nt)return e;e=xn(e,!0);for(var n,r,o=0,i=void 0,a=void 0;o<t.length;o++)if((r=Pn(n=t[o]))!==i&&(a=e.indexOf(r),i=r),!Nt(r)||-1<a)return n}var Mn={get composed(){return void 0===this.__composed&&(Nn?this.__composed="focusin"===this.type||"focusout"===this.type||Nn(this):!1!==this.isTrusted&&(this.__composed=Tn[this.type])),this.__composed||!1},composedPath:function(){return this.__composedPath||(this.__composedPath=xn(this.__target,this.composed)),this.__composedPath},get target(){return Dn(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=xn(this.__relatedTarget,!0)),Dn(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.ua=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.ua=this.__immediatePropagationStopped=!0}},An=vt.D&&Object.getOwnPropertyDescriptor(Event.prototype,"eventPhase");function Ln(e){function t(t,n){return(t=new e(t,n)).__composed=n&&!!n.composed,t}return t.__proto__=e,t.prototype=e.prototype,t}An&&(Object.defineProperty(Mn,"eventPhase",{get:function(){return this.currentTarget===this.target?Event.AT_TARGET:this.__shady_native_eventPhase},enumerable:!0,configurable:!0}),Object.defineProperty(Mn,"__shady_native_eventPhase",An));var jn={focus:!0,blur:!0};function Rn(e){return e.__target!==e.target||e.__relatedTarget!==e.relatedTarget}function kn(e,t,n){if(n=t.__handlers&&t.__handlers[e.type]&&t.__handlers[e.type][n])for(var r,o=0;(r=n[o])&&(!Rn(e)||e.target!==e.relatedTarget)&&(r.call(t,e),!e.__immediatePropagationStopped);o++);}var Fn=new Event("e").hasOwnProperty("currentTarget");function In(e){var t=(e=Fn?Object.create(e):e).composedPath(),n=t.map(function(e){return Dn(e,t)}),r=e.bubbles,o=Object.getOwnPropertyDescriptor(e,"currentTarget");Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:function(){return l}});var i=Event.CAPTURING_PHASE,a=Object.getOwnPropertyDescriptor(e,"eventPhase");Object.defineProperty(e,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return i}});try{for(var s=t.length-1;0<=s;s--){var l=t[s];if(i=l===n[s]?Event.AT_TARGET:Event.CAPTURING_PHASE,kn(e,l,"capture"),e.ua)return}for(s=0;s<t.length;s++){var c=(l=t[s])===n[s];if((c||r)&&(i=c?Event.AT_TARGET:Event.BUBBLING_PHASE,kn(e,l,"bubble"),e.ua))break}}finally{Fn||(o?Object.defineProperty(e,"currentTarget",o):delete e.currentTarget,a?Object.defineProperty(e,"eventPhase",a):delete e.eventPhase)}}function Hn(e,t,n,r){for(var o=0;o<e.length;o++){var i=e[o],a=i.type,s=i.capture;if(t===i.node&&n===a&&r===s)return o}return-1}function Un(e){return Kt(),!vt.ha&&this instanceof Node&&!Mt(document,this)?(e.__target||Gn(e,this),In(e)):this.__shady_native_dispatchEvent(e)}function Bn(e,t,n){var r=this,o=Cn(n),i=o.capture,a=o.once,s=o.Pa;if(o=o.Na,t){var l=typeof t;if(("function"===l||"object"===l)&&("object"!==l||t.handleEvent&&"function"==typeof t.handleEvent)){if(On[e])return this.__shady_native_addEventListener(e,t,o);var c=s||this;if(s=t[wn]){if(-1<Hn(s,c,e,i))return}else t[wn]=[];s=function(o){if(a&&r.__shady_removeEventListener(e,t,n),o.__target||Gn(o),c!==r){var s=Object.getOwnPropertyDescriptor(o,"currentTarget");Object.defineProperty(o,"currentTarget",{get:function(){return c},configurable:!0});var u=Object.getOwnPropertyDescriptor(o,"eventPhase");Object.defineProperty(o,"eventPhase",{configurable:!0,enumerable:!0,get:function(){return i?Event.CAPTURING_PHASE:Event.BUBBLING_PHASE}})}if(o.__previousCurrentTarget=o.currentTarget,(!Nt(c)&&"slot"!==c.localName||-1!=o.composedPath().indexOf(c))&&(o.composed||-1<o.composedPath().indexOf(c)))if(Rn(o)&&o.target===o.relatedTarget)o.eventPhase===Event.BUBBLING_PHASE&&o.stopImmediatePropagation();else if(o.eventPhase===Event.CAPTURING_PHASE||o.bubbles||o.target===c||c instanceof Window){var h="function"===l?t.call(c,o):t.handleEvent&&t.handleEvent(o);return c!==r&&(s?(Object.defineProperty(o,"currentTarget",s),s=null):delete o.currentTarget,u?(Object.defineProperty(o,"eventPhase",u),u=null):delete o.eventPhase),h}},t[wn].push({node:c,type:e,capture:i,ub:s}),this.__handlers=this.__handlers||{},this.__handlers[e]=this.__handlers[e]||{capture:[],bubble:[]},this.__handlers[e][i?"capture":"bubble"].push(s),jn[e]||this.__shady_native_addEventListener(e,s,o)}}}function Wn(e,t,n){if(t){var r=Cn(n);n=r.capture;var o=r.Pa;if(r=r.Na,On[e])return this.__shady_native_removeEventListener(e,t,r);var i=o||this;o=void 0;var a=null;try{a=t[wn]}catch(e){}a&&-1<(i=Hn(a,i,e,n))&&(o=a.splice(i,1)[0].ub,a.length||(t[wn]=void 0)),this.__shady_native_removeEventListener(e,o||t,r),o&&this.__handlers&&this.__handlers[e]&&-1<(t=(e=this.__handlers[e][n?"capture":"bubble"]).indexOf(o))&&e.splice(t,1)}}var qn=Ht(Mn);function Gn(e,t){if(t=void 0===t?e.target:t,e.__target=t,e.__relatedTarget=e.relatedTarget,vt.D){if(!(t=Object.getPrototypeOf(e)).hasOwnProperty("__shady_patchedProto")){var n=Object.create(t);n.__shady_sourceProto=t,Ft(n,qn),t.__shady_patchedProto=n}e.__proto__=t.__shady_patchedProto}else Ft(e,qn)}var Vn=Ln(Event),zn=Ln(CustomEvent),Kn=Ln(MouseEvent),Xn=Object.getOwnPropertyNames(Element.prototype).filter(function(e){return"on"===e.substring(0,2)}),Yn=Object.getOwnPropertyNames(HTMLElement.prototype).filter(function(e){return"on"===e.substring(0,2)});function $n(e){return{set:function(t){var n=_t(this),r=e.substring(2);n.T||(n.T={}),n.T[e]&&this.removeEventListener(r,n.T[e]),this.__shady_addEventListener(r,t),n.T[e]=t},get:function(){var t=mt(this);return t&&t.T&&t.T[e]},configurable:!0}}function Jn(e,t){return{index:e,ia:[],pa:t}}function Zn(e,t,n,r){var o=0,i=0,a=0,s=0,l=Math.min(t-o,r-i);if(0==o&&0==i)e:{for(a=0;a<l;a++)if(e[a]!==n[a])break e;a=l}if(t==e.length&&r==n.length){s=e.length;for(var c=n.length,u=0;u<l-a&&Qn(e[--s],n[--c]);)u++;s=u}if(i+=a,r-=s,0==(t-=s)-(o+=a)&&0==r-i)return[];if(o==t){for(t=Jn(o,0);i<r;)t.ia.push(n[i++]);return[t]}if(i==r)return[Jn(o,t-o)];for(r=r-(a=i)+1,s=t-(l=o)+1,t=Array(r),c=0;c<r;c++)t[c]=Array(s),t[c][0]=c;for(c=0;c<s;c++)t[0][c]=c;for(c=1;c<r;c++)for(u=1;u<s;u++)if(e[l+u-1]===n[a+c-1])t[c][u]=t[c-1][u-1];else{var h=t[c-1][u]+1,d=t[c][u-1]+1;t[c][u]=h<d?h:d}for(l=t.length-1,a=t[0].length-1,r=t[l][a],e=[];0<l||0<a;)0==l?(e.push(2),a--):0==a?(e.push(3),l--):(s=t[l-1][a-1],(h=(c=t[l-1][a])<(u=t[l][a-1])?c<s?c:s:u<s?u:s)==s?(s==r?e.push(0):(e.push(1),r=s),l--,a--):h==c?(e.push(3),l--,r=c):(e.push(2),a--,r=u));for(e.reverse(),t=void 0,l=[],a=0;a<e.length;a++)switch(e[a]){case 0:t&&(l.push(t),t=void 0),o++,i++;break;case 1:t||(t=Jn(o,0)),t.pa++,o++,t.ia.push(n[i]),i++;break;case 2:t||(t=Jn(o,0)),t.pa++,o++;break;case 3:t||(t=Jn(o,0)),t.ia.push(n[i]),i++}return t&&l.push(t),l}function Qn(e,t){return e===t}var er=Ht({dispatchEvent:Un,addEventListener:Bn,removeEventListener:Wn}),tr=null;function nr(){return tr||(tr=window.ShadyCSS&&window.ShadyCSS.ScopingShim),tr||null}function rr(e,t,n){var r=nr();return!(!r||"class"!==t||(r.setElementClass(e,n),0))}function or(e,t){var n=nr();n&&n.unscopeNode(e,t)}function ir(e,t){var n=nr();if(!n)return!0;if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(n=!0,e=e.__shady_firstChild;e;e=e.__shady_nextSibling)n=n&&ir(e,t);return n}return e.nodeType!==Node.ELEMENT_NODE||n.currentScopeForNode(e)===t}function ar(e){if(e.nodeType!==Node.ELEMENT_NODE)return"";var t=nr();return t?t.currentScopeForNode(e):""}function sr(e,t){if(e)for(e.nodeType===Node.ELEMENT_NODE&&t(e),e=e.__shady_firstChild;e;e=e.__shady_nextSibling)e.nodeType===Node.ELEMENT_NODE&&sr(e,t)}var lr=window.document,cr=vt.ha,ur=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),hr=ur&&ur.get;function dr(e){for(var t;t=e.__shady_firstChild;)e.__shady_removeChild(t)}function fr(e){var t=mt(e);if(t&&void 0!==t.ta)for(t=e.__shady_firstChild;t;t=t.__shady_nextSibling)fr(t);(e=mt(e))&&(e.ta=void 0)}function pr(e){var t=e;if(e&&"slot"===e.localName){var n=mt(e);(n=n&&n.aa)&&(t=n.length?n[0]:pr(e.__shady_nextSibling))}return t}function _r(e,t,n){if(e=(e=mt(e))&&e.ga){if(t)if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var r=0,o=t.childNodes.length;r<o;r++)e.addedNodes.push(t.childNodes[r]);else e.addedNodes.push(t);n&&e.removedNodes.push(n),function(e){e.g||(e.g=!0,Dt(function(){e.flush()}))}(e)}}var mr=Ht({get parentNode(){var e=mt(this);return void 0!==(e=e&&e.parentNode)?e:this.__shady_native_parentNode},get firstChild(){var e=mt(this);return void 0!==(e=e&&e.firstChild)?e:this.__shady_native_firstChild},get lastChild(){var e=mt(this);return void 0!==(e=e&&e.lastChild)?e:this.__shady_native_lastChild},get nextSibling(){var e=mt(this);return void 0!==(e=e&&e.nextSibling)?e:this.__shady_native_nextSibling},get previousSibling(){var e=mt(this);return void 0!==(e=e&&e.previousSibling)?e:this.__shady_native_previousSibling},get childNodes(){if(wt(this)){var e=mt(this);if(!e.childNodes){e.childNodes=[];for(var t=this.__shady_firstChild;t;t=t.__shady_nextSibling)e.childNodes.push(t)}var n=e.childNodes}else n=this.__shady_native_childNodes;return n.item=function(e){return n[e]},n},get parentElement(){var e=mt(this);return(e=e&&e.parentNode)&&e.nodeType!==Node.ELEMENT_NODE&&(e=null),void 0!==e?e:this.__shady_native_parentElement},get isConnected(){if(hr&&hr.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;var e=this.ownerDocument;if(null===e||Mt(e,this))return!0;for(e=this;e&&!(e instanceof Document);)e=e.__shady_parentNode||(Nt(e)?e.host:void 0);return!!(e&&e instanceof Document)},get textContent(){if(wt(this)){for(var e=[],t=this.__shady_firstChild;t;t=t.__shady_nextSibling)t.nodeType!==Node.COMMENT_NODE&&e.push(t.__shady_textContent);return e.join("")}return this.__shady_native_textContent},set textContent(e){switch(null==e&&(e=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!wt(this)&&vt.D){var t=this.__shady_firstChild;(t!=this.__shady_lastChild||t&&t.nodeType!=Node.TEXT_NODE)&&dr(this),this.__shady_native_textContent=e}else dr(this),(0<e.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_insertBefore(document.createTextNode(e));break;default:this.nodeValue=e}},insertBefore:function(e,t){if(this.ownerDocument!==lr&&e.ownerDocument!==lr)return this.__shady_native_insertBefore(e,t),e;if(e===this)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(t){var n=mt(t);if(void 0!==(n=n&&n.parentNode)&&n!==this||void 0===n&&t.__shady_native_parentNode!==this)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(t===e)return e;_r(this,e);var r=[],o=(n=No(this))?n.host.localName:ar(this),i=e.__shady_parentNode;if(i){var a=ar(e),s=!!n||!No(e)||cr&&void 0!==this.__noInsertionPoint;i.__shady_removeChild(e,s)}i=!0;var l=(!cr||void 0===e.__noInsertionPoint&&void 0===this.__noInsertionPoint)&&!ir(e,o),u=n&&!e.__noInsertionPoint&&(!cr||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE);return(u||l)&&(l&&(a=a||ar(e)),sr(e,function(e){if(u&&"slot"===e.localName&&r.push(e),l){var t=a;nr()&&(t&&or(e,t),(t=nr())&&t.scopeNode(e,o))}})),r.length&&(_o(n),n.i.push.apply(n.i,c(r)),co(n)),wt(this)&&(function(e,t,n){Zr(t,2);var r=_t(t);if(void 0!==r.firstChild&&(r.childNodes=null),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(e=e.__shady_native_firstChild;e;e=e.__shady_native_nextSibling)Qr(e,t,r,n);else Qr(e,t,r,n)}(e,this,t),(s=mt(this)).root?(i=!1,St(this)&&co(s.root)):n&&"slot"===this.localName&&(i=!1,co(n))),i?(n=Nt(this)?this.host:this,t?(t=pr(t),n.__shady_native_insertBefore(e,t)):n.__shady_native_appendChild(e)):e.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(e),e},appendChild:function(e){if(this!=e||!Nt(e))return this.__shady_insertBefore(e)},removeChild:function(e,t){if(t=void 0!==t&&t,this.ownerDocument!==lr)return this.__shady_native_removeChild(e);if(e.__shady_parentNode!==this)throw Error("The node to be removed is not a child of this node: "+e);_r(this,null,e);var n=No(e),r=n&&function(e,t){if(e.g){mo(e);var n,r=e.h;for(n in r)for(var o=r[n],i=0;i<o.length;i++){var a=o[i];if(At(t,a)){o.splice(i,1);var s=e.g.indexOf(a);if(0<=s&&(e.g.splice(s,1),(s=mt(a.__shady_parentNode))&&s.ka&&s.ka--),i--,s=(a=mt(a)).aa)for(var l=0;l<s.length;l++){var c=s[l],u=c.__shady_native_parentNode;u&&u.__shady_native_removeChild(c)}a.aa=[],a.assignedNodes=[],s=!0}}return s}}(n,e),o=mt(this);if(wt(this)&&(function(e,t){var n=_t(e);t=_t(t),e===t.firstChild&&(t.firstChild=n.nextSibling),e===t.lastChild&&(t.lastChild=n.previousSibling),e=n.previousSibling;var r=n.nextSibling;e&&(_t(e).nextSibling=r),r&&(_t(r).previousSibling=e),n.parentNode=n.previousSibling=n.nextSibling=void 0,void 0!==t.childNodes&&(t.childNodes=null)}(e,this),St(this))){co(o.root);var i=!0}if(nr()&&!t&&n&&e.nodeType!==Node.TEXT_NODE){var a=ar(e);sr(e,function(e){or(e,a)})}return fr(e),n&&((t="slot"===this.localName)&&(i=!0),(r||t)&&co(n)),i||(i=Nt(this)?this.host:this,(!o.root&&"slot"!==e.localName||i===e.__shady_native_parentNode)&&i.__shady_native_removeChild(e)),e},replaceChild:function(e,t){return this.__shady_insertBefore(e,t),this.__shady_removeChild(t),e},cloneNode:function(e){if("template"==this.localName)return this.__shady_native_cloneNode(e);var t=this.__shady_native_cloneNode(!1);if(e&&t.nodeType!==Node.ATTRIBUTE_NODE){e=this.__shady_firstChild;for(var n;e;e=e.__shady_nextSibling)n=e.__shady_cloneNode(!0),t.__shady_appendChild(n)}return t},getRootNode:function(e){if(this&&this.nodeType){var t=_t(this),n=t.ta;return void 0===n&&(Nt(this)?(n=this,t.ta=n):(n=(n=this.__shady_parentNode)?n.__shady_getRootNode(e):this,document.documentElement.__shady_native_contains(this)&&(t.ta=n))),n}},contains:function(e){return At(this,e)}}),vr=Ht({get assignedSlot(){var e=this.__shady_parentNode;return(e=e&&e.__shady_shadowRoot)&&uo(e),(e=mt(this))&&e.assignedSlot||null}}),yr=new Map;function gr(e,t,n,r){for(r=void 0===r||r;t<e.length;t++)if("\\"===e[t]&&t<e.length-1&&"\n"!==e[t+1])t++;else{if(-1!==n.indexOf(e[t]))return t;if(r&&yr.has(e[t])){var o=yr.get(e[t]);t=gr(e,t+1,[o.end],o.sa)}}return e.length}function br(e,t,n){var r=[];return Er(e,t,n,r),r}function Er(e,t,n,r){for(e=e.__shady_firstChild;e;e=e.__shady_nextSibling){var o;if(o=e.nodeType===Node.ELEMENT_NODE){var i=t,a=n,s=r,l=i(o=e);l&&s.push(o),a&&a(l)?o=l:(Er(o,i,a,s),o=void 0)}if(o)break}}[["(",{end:")",sa:!0}],["[",{end:"]",sa:!0}],['"',{end:'"',sa:!1}],["'",{end:"'",sa:!1}]].forEach(function(e){var t=l(e);e=t.next().value,t=t.next().value,yr.set(e,t)});var wr={get firstElementChild(){var e=mt(this);if(e&&void 0!==e.firstChild){for(e=this.__shady_firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_nextSibling;return e}return this.__shady_native_firstElementChild},get lastElementChild(){var e=mt(this);if(e&&void 0!==e.lastChild){for(e=this.__shady_lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_previousSibling;return e}return this.__shady_native_lastElementChild},get children(){return wt(this)?Lt(Array.prototype.filter.call(Rt(this),function(e){return e.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var e=this.__shady_children;return e?e.length:0}},Nr=Ht((wr.append=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];this.__shady_insertBefore(Wt.apply(null,c(t)),null)},wr.prepend=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];this.__shady_insertBefore(Wt.apply(null,c(t)),this.__shady_firstChild)},wr.replaceChildren=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(;null!==(n=this.__shady_firstChild);)this.__shady_removeChild(n);this.__shady_insertBefore(Wt.apply(null,c(t)),null)},wr));function Sr(e,t){function n(t,n){return(t===e||-1===n.indexOf(":scope"))&&Tt.call(t,n)}var r=function(e){function t(){if(0<r.length){for(;" "===r[r.length-1];)r.pop();n.push({La:r.filter(function(e,t){return 0==t%2}),Za:r.filter(function(e,t){return 1==t%2})}),r.length=0}}for(var n=[],r=[],o=0;o<e.length;){var i=r[r.length-1],a=gr(e,o,[","," ",">","+","~"]),s=a===o?e[o]:e.substring(o,a);","===s?t():-1!==[void 0," ",">","+","~"].indexOf(i)&&" "===s||(" "===i&&-1!==[">","+","~"].indexOf(s)?r[r.length-1]=s:r.push(s)),o=a+(a===o?1:0)}return t(),n}(t);if(1>r.length)return[];for(t=qt(br(e,function(){return!0}).map(function(e){return qt(r.map(function(t){var r=t.La,o=r.length-1;return n(e,r[o])?{target:e,da:t,fa:e,index:o}:[]}))}));t.some(function(e){return 0<e.index});)t=qt(t.map(function(e){if(0>=e.index)return e;var t=e.target,r=e.fa,o=e.da;e=e.index-1;var i=o.Za[e],a=o.La[e];if(" "===i){for(i=[],r=r.__shady_parentElement;r;r=r.__shady_parentElement)n(r,a)&&i.push({target:t,da:o,fa:r,index:e});return i}if(">"===i)return n(r=r.__shady_parentElement,a)?{target:t,da:o,fa:r,index:e}:[];if("+"===i)return(r=r.__shady_previousElementSibling)&&n(r,a)?{target:t,da:o,fa:r,index:e}:[];if("~"===i){for(i=[],r=r.__shady_previousElementSibling;r;r=r.__shady_previousElementSibling)n(r,a)&&i.push({target:t,da:o,fa:r,index:e});return i}throw Error("Unrecognized combinator: '"+i+"'.")}));return function(e){for(var t=[],n=new Set,r=(e=l(e)).next();!r.done;r=e.next())r=r.value,n.has(r)||(t.push(r),n.add(r));return t}(t.map(function(e){return e.target}))}var Cr=vt.querySelectorImplementation,Tr=Ht({querySelector:function(e){if("native"===Cr){for(var t=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(e)),n=this.__shady_getRootNode(),r=(t=l(t)).next();!r.done;r=t.next())if((r=r.value).__shady_getRootNode()==n)return r;return null}if("selectorEngine"===Cr)return Sr(this,e)[0]||null;if(void 0===Cr)return br(this,function(t){return Tt.call(t,e)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+Cr+"'")},querySelectorAll:function(e,t){if(t||"native"===Cr){t=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(e));var n=this.__shady_getRootNode();return Lt(t.filter(function(e){return e.__shady_getRootNode()==n}))}if("selectorEngine"===Cr)return Lt(Sr(this,e));if(void 0===Cr)return Lt(br(this,function(t){return Tt.call(t,e)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+Cr+"'")}}),Or=vt.ha&&!vt.J?Ut({},Nr):Nr;Ut(Nr,Tr);var Pr=Ht({after:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=this.__shady_parentNode)){var r=this.__shady_nextSibling;n.__shady_insertBefore(Wt.apply(null,c(t)),r)}},before:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];null!==(n=this.__shady_parentNode)&&n.__shady_insertBefore(Wt.apply(null,c(t)),this)},remove:function(){var e=this.__shady_parentNode;null!==e&&e.__shady_removeChild(this)},replaceWith:function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(null!==(n=this.__shady_parentNode)){var r=this.__shady_nextSibling;n.__shady_removeChild(this),n.__shady_insertBefore(Wt.apply(null,c(t)),r)}}}),xr=window.document;function Dr(e,t){if("slot"===t)St(e=e.__shady_parentNode)&&co(mt(e).root);else if("slot"===e.localName&&"name"===t&&(t=No(e))){if(t.g){mo(t);var n=e.Ua,r=vo(e);if(r!==n){var o=(n=t.h[n]).indexOf(e);0<=o&&n.splice(o,1),(n=t.h[r]||(t.h[r]=[])).push(e),1<n.length&&(t.h[r]=yo(n))}}co(t)}}var Mr=Ht({get previousElementSibling(){var e=mt(this);if(e&&void 0!==e.previousSibling){for(e=this.__shady_previousSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_previousSibling;return e}return this.__shady_native_previousElementSibling},get nextElementSibling(){var e=mt(this);if(e&&void 0!==e.nextSibling){for(e=this.__shady_nextSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__shady_nextSibling;return e}return this.__shady_native_nextElementSibling},get slot(){return this.getAttribute("slot")},set slot(e){this.__shady_setAttribute("slot",e)},get className(){return this.getAttribute("class")||""},set className(e){this.__shady_setAttribute("class",e)},setAttribute:function(e,t){this.ownerDocument!==xr?this.__shady_native_setAttribute(e,t):rr(this,e,t)||(this.__shady_native_setAttribute(e,t),Dr(this,e))},removeAttribute:function(e){this.ownerDocument!==xr?this.__shady_native_removeAttribute(e):rr(this,e,"")?""===this.getAttribute(e)&&this.__shady_native_removeAttribute(e):(this.__shady_native_removeAttribute(e),Dr(this,e))},toggleAttribute:function(e,t){return this.ownerDocument!==xr?this.__shady_native_toggleAttribute(e,t):rr(this,e,"")?""!==this.getAttribute(e)||t?void 0:this.__shady_native_toggleAttribute(e,t):(t=this.__shady_native_toggleAttribute(e,t),Dr(this,e),t)}});vt.ha||Xn.forEach(function(e){Mr[e]=$n(e)});var Ar=Ht({attachShadow:function(e){if(!this)throw Error("Must provide a host.");if(!e)throw Error("Not enough arguments.");if(e.shadyUpgradeFragment&&!vt.Ra){var t=e.shadyUpgradeFragment;if(t.__proto__=ShadowRoot.prototype,lo(t,this,e),eo(t,t),e=t.__noInsertionPoint?null:t.querySelectorAll("slot"),t.__noInsertionPoint=void 0,e&&e.length){var n=t;_o(n),n.i.push.apply(n.i,c(e)),co(t)}t.host.__shady_native_appendChild(t)}else t=new so(oo,this,e);return this.__CE_shadowRoot=t},get shadowRoot(){var e=mt(this);return e&&e.lb||null}});Ut(Mr,Ar);var Lr=document.implementation.createHTMLDocument("inert"),jr=Ht({get innerHTML(){return wt(this)?tn("template"===this.localName?this.content:this,Rt):this.__shady_native_innerHTML},set innerHTML(e){if("template"===this.localName)this.__shady_native_innerHTML=e;else{dr(this);var t=this.localName||"div";for(t=this.namespaceURI&&this.namespaceURI!==Lr.namespaceURI?Lr.createElementNS(this.namespaceURI,t):Lr.createElement(t),vt.D?t.__shady_native_innerHTML=e:t.innerHTML=e;e=t.__shady_firstChild;)this.__shady_insertBefore(e)}}}),Rr=Ht({blur:function(){var e=mt(this);(e=(e=e&&e.root)&&e.activeElement)?e.__shady_blur():this.__shady_native_blur()}});vt.ha||Yn.forEach(function(e){Rr[e]=$n(e)});var kr=Ht({assignedNodes:function(e){if("slot"===this.localName){var t=this.__shady_getRootNode();return t&&Nt(t)&&uo(t),(t=mt(this))&&(e&&e.flatten?t.aa:t.assignedNodes)||[]}},addEventListener:function(e,t,n){if("slot"!==this.localName||"slotchange"===e)Bn.call(this,e,t,n);else{"object"!=typeof n&&(n={capture:!!n});var r=this.__shady_parentNode;if(!r)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");n.U=this,r.__shady_addEventListener(e,t,n)}},removeEventListener:function(e,t,n){if("slot"!==this.localName||"slotchange"===e)Wn.call(this,e,t,n);else{"object"!=typeof n&&(n={capture:!!n});var r=this.__shady_parentNode;if(!r)throw Error("ShadyDOM cannot attach event to slot unless it has a `parentNode`");n.U=this,r.__shady_removeEventListener(e,t,n)}}}),Fr=Ht({getElementById:function(e){return""===e?null:br(this,function(t){return t.id==e},function(e){return!!e})[0]||null}});function Ir(e,t){for(var n;t&&!e.has(n=t.__shady_getRootNode());)t=n.host;return t}var Hr="__shady_native_"+Et(),Ur=Ht({get activeElement(){var e=vt.D?document.__shady_native_activeElement:document.activeElement;if(!e||!e.nodeType)return null;var t=!!Nt(this);if(!(this===document||t&&this.host!==e&&this.host.__shady_native_contains(e)))return null;for(t=No(e);t&&t!==this;)t=No(e=t.host);return this===document?t?null:e:t===this?e:null},elementsFromPoint:function(e,t){if(e=document[Hr](e,t),this===document&&vt.useNativeDocumentEFP)return e;e=[].slice.call(e),t=function(e){var t=new Set;for(t.add(e);Nt(e)&&e.host;)e=e.host.__shady_getRootNode(),t.add(e);return t}(this);for(var n=new Set,r=0;r<e.length;r++)n.add(Ir(t,e[r]));var o=[];return n.forEach(function(e){return o.push(e)}),o},elementFromPoint:function(e,t){return this===document&&vt.useNativeDocumentEFP?this.__shady_native_elementFromPoint(e,t):this.__shady_elementsFromPoint(e,t)[0]||null}}),Br=window.document,Wr=Ht({importNode:function(e,t){if(e.ownerDocument!==Br||"template"===e.localName)return this.__shady_native_importNode(e,t);var n=this.__shady_native_importNode(e,!1);if(t)for(e=e.__shady_firstChild;e;e=e.__shady_nextSibling)t=this.__shady_importNode(e,!0),n.__shady_appendChild(t);return n}}),qr=Ht({dispatchEvent:Un,addEventListener:Bn.bind(window),removeEventListener:Wn.bind(window)}),Gr={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Gr.parentElement=mr.parentElement),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Gr.contains=mr.contains),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Gr.children=Nr.children),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Gr.innerHTML=jr.innerHTML),Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Gr.className=Mr.className);var Vr={EventTarget:[er],Node:[mr,window.EventTarget?null:er],Text:[vr],Comment:[vr],CDATASection:[vr],ProcessingInstruction:[vr],Element:[Mr,Nr,Pr,vr,!vt.D||"innerHTML"in Element.prototype?jr:null,window.HTMLSlotElement?null:kr],HTMLElement:[Rr,Gr],HTMLSlotElement:[kr],DocumentFragment:[Or,Fr],Document:[Wr,Or,Fr,Ur],Window:[qr],CharacterData:[Pr],XMLHttpRequest:[window.EventTarget?null:er]},zr=vt.D?null:["innerHTML","textContent"];function Kr(e,t,n,r){t.forEach(function(t){return e&&t&&Ft(e,t,n,r)})}function Xr(e){var t,n=e?null:zr;for(t in Vr)Kr(window[t]&&window[t].prototype,Vr[t],e,n)}function Yr(e){return e.__shady_protoIsPatched=!0,Kr(e,Vr.EventTarget),Kr(e,Vr.Node),Kr(e,Vr.Element),Kr(e,Vr.HTMLElement),Kr(e,Vr.HTMLSlotElement),e}["Text","Comment","CDATASection","ProcessingInstruction"].forEach(function(e){var t=window[e],n=Object.create(t.prototype);n.__shady_protoIsPatched=!0,Kr(n,Vr.EventTarget),Kr(n,Vr.Node),Vr[e]&&Kr(n,Vr[e]),t.prototype.__shady_patchedProto=n});var $r=vt.Da,Jr=vt.D;function Zr(e,t){if($r&&!e.__shady_protoIsPatched&&!Nt(e)){var n=Object.getPrototypeOf(e),r=n.hasOwnProperty("__shady_patchedProto")&&n.__shady_patchedProto;r||(Yr(r=Object.create(n)),n.__shady_patchedProto=r),Object.setPrototypeOf(e,r)}Jr||(1===t?bn(e):2===t&&En(e))}function Qr(e,t,n,r){Zr(e,1),r=r||null;var o=_t(e),i=r?_t(r):null;o.previousSibling=r?i.previousSibling:t.__shady_lastChild,(i=mt(o.previousSibling))&&(i.nextSibling=e),(i=mt(o.nextSibling=r))&&(i.previousSibling=e),o.parentNode=t,r?r===n.firstChild&&(n.firstChild=e):(n.lastChild=e,n.firstChild||(n.firstChild=e)),n.childNodes=null}function eo(e,t){var n=_t(e);if(t||void 0===n.firstChild){n.childNodes=null;var r=n.firstChild=e.__shady_native_firstChild;for(n.lastChild=e.__shady_native_lastChild,Zr(e,2),n=r,r=void 0;n;n=n.__shady_native_nextSibling){var o=_t(n);o.parentNode=t||e,o.nextSibling=n.__shady_native_nextSibling,o.previousSibling=r||null,r=n,Zr(n,1)}}}var to=Ht({addEventListener:function(e,t,n){"object"!=typeof n&&(n={capture:!!n}),n.U=n.U||this,this.host.__shady_addEventListener(e,t,n)},removeEventListener:function(e,t,n){"object"!=typeof n&&(n={capture:!!n}),n.U=n.U||this,this.host.__shady_removeEventListener(e,t,n)}});function no(e,t){Ft(e,to,t),Ft(e,Ur,t),Ft(e,jr,t),Ft(e,Nr,t),vt.J&&!t?(Ft(e,mr,t),Ft(e,Fr,t)):vt.D||(Ft(e,vn),Ft(e,_n),Ft(e,mn))}var ro,oo={},io=vt.deferConnectionCallbacks&&"loading"===document.readyState;function ao(e){var t=[];do{t.unshift(e)}while(e=e.__shady_parentNode);return t}function so(e,t,n){if(e!==oo)throw new TypeError("Illegal constructor");this.g=null,lo(this,t,n)}function lo(e,t,n){if(e.host=t,e.mode=n&&n.mode,eo(e.host),(t=_t(e.host)).root=e,t.lb="closed"!==e.mode?e:null,(t=_t(e)).firstChild=t.lastChild=t.parentNode=t.nextSibling=t.previousSibling=null,vt.preferPerformance)for(;t=e.host.__shady_native_firstChild;)e.host.__shady_native_removeChild(t);else co(e)}function co(e){e.Y||(e.Y=!0,zt(function(){return uo(e)}))}function uo(e){var t;if(t=e.Y){for(var n;e;)e.Y&&(n=e),Nt(e=(t=e).host.__shady_getRootNode())&&(t=mt(t.host))&&0<t.ka||(e=void 0);t=n}(n=t)&&n._renderSelf()}function ho(e,t,n){var r=_t(t),o=r.xa;r.xa=null,n||(n=(e=e.h[t.__shady_slot||"__catchall"])&&e[0]),n?(_t(n).assignedNodes.push(t),r.assignedSlot=n):r.assignedSlot=void 0,o!==r.assignedSlot&&r.assignedSlot&&(_t(r.assignedSlot).Aa=!0)}function fo(e,t,n){for(var r=0,o=void 0;r<n.length&&(o=n[r]);r++)if("slot"==o.localName){var i=mt(o).assignedNodes;i&&i.length&&fo(e,t,i)}else t.push(n[r])}function po(e,t){t.__shady_native_dispatchEvent(new Event("slotchange")),(t=mt(t)).assignedSlot&&po(e,t.assignedSlot)}function _o(e){e.i=e.i||[],e.g=e.g||[],e.h=e.h||{}}function mo(e){if(e.i&&e.i.length){for(var t,n=e.i,r=0;r<n.length;r++){var o=n[r];eo(o);var i=o.__shady_parentNode;eo(i),(i=mt(i)).ka=(i.ka||0)+1,i=vo(o),e.h[i]?((t=t||{})[i]=!0,e.h[i].push(o)):e.h[i]=[o],e.g.push(o)}if(t)for(var a in t)e.h[a]=yo(e.h[a]);e.i=[]}}function vo(e){var t=e.name||e.getAttribute("name")||"__catchall";return e.Ua=t}function yo(e){return e.sort(function(e,t){e=ao(e);for(var n=ao(t),r=0;r<e.length;r++){t=e[r];var o=n[r];if(t!==o)return(e=Rt(t.__shady_parentNode)).indexOf(t)-e.indexOf(o)}})}function go(e){return mo(e),!(!e.g||!e.g.length)}if(so.prototype._renderSelf=function(){var e=io;if(io=!0,this.Y=!1,this.g){mo(this);for(var t,n=0;n<this.g.length;n++){var r=mt(t=this.g[n]),o=r.assignedNodes;if(r.assignedNodes=[],r.aa=[],r.Ja=o)for(r=0;r<o.length;r++){var i=mt(o[r]);i.xa=i.assignedSlot,i.assignedSlot===t&&(i.assignedSlot=null)}}for(n=this.host.__shady_firstChild;n;n=n.__shady_nextSibling)ho(this,n);for(n=0;n<this.g.length;n++){if(!(o=mt(t=this.g[n])).assignedNodes.length)for(r=t.__shady_firstChild;r;r=r.__shady_nextSibling)ho(this,r,t);if((r=(r=mt(t.__shady_parentNode))&&r.root)&&(go(r)||r.Y)&&r._renderSelf(),fo(this,o.aa,o.assignedNodes),r=o.Ja){for(i=0;i<r.length;i++)mt(r[i]).xa=null;o.Ja=null,r.length>o.assignedNodes.length&&(o.Aa=!0)}o.Aa&&(o.Aa=!1,po(this,t))}for(t=this.g,n=[],o=0;o<t.length;o++)(i=mt(r=t[o].__shady_parentNode))&&i.root||!(0>n.indexOf(r))||n.push(r);for(t=0;t<n.length;t++){for(o=(i=n[t])===this?this.host:i,r=[],i=i.__shady_firstChild;i;i=i.__shady_nextSibling)if("slot"==i.localName)for(var a=mt(i).aa,s=0;s<a.length;s++)r.push(a[s]);else r.push(i);i=jt(o),a=Zn(r,r.length,i,i.length);for(var l=s=0,c=void 0;s<a.length&&(c=a[s]);s++){for(var u=0,h=void 0;u<c.ia.length&&(h=c.ia[u]);u++)h.__shady_native_parentNode===o&&o.__shady_native_removeChild(h),i.splice(c.index+l,1);l-=c.pa}for(l=0,c=void 0;l<a.length&&(c=a[l]);l++)for(s=i[c.index],u=c.index;u<c.index+c.pa;u++)h=r[u],o.__shady_native_insertBefore(h,s),i.splice(u,0,h)}}if(!vt.preferPerformance&&!this.Ia)for(n=this.host.__shady_firstChild;n;n=n.__shady_nextSibling)t=mt(n),n.__shady_native_parentNode!==this.host||"slot"!==n.localName&&t.assignedSlot||this.host.__shady_native_removeChild(n);this.Ia=!0,io=e,ro&&ro()},function(e){e.__proto__=DocumentFragment.prototype,no(e,"__shady_"),no(e),Object.defineProperties(e,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}}),["localName","namespaceURI","prefix"].forEach(function(t){Object.defineProperty(e,t,{value:void 0,configurable:!0})}),["ownerDocument","baseURI","isConnected"].forEach(function(t){Object.defineProperty(e,t,{get:function(){return this.host[t]},configurable:!0})})}(so.prototype),window.customElements&&window.customElements.define&&vt.Ba&&!vt.preferPerformance){var bo=new Map;ro=function(){var e=[];bo.forEach(function(t,n){e.push([n,t])}),bo.clear();for(var t=0;t<e.length;t++){var n=e[t][0];e[t][1]?n.__shadydom_connectedCallback():n.__shadydom_disconnectedCallback()}},io&&document.addEventListener("readystatechange",function(){io=!1,ro()},{once:!0});var Eo=window.customElements.define,wo=function(e,t){var n=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;Eo.call(window.customElements,e,function(e,t,n){var r=0,o="__isConnected"+r++;return(t||n)&&(e.prototype.connectedCallback=e.prototype.__shadydom_connectedCallback=function(){io?bo.set(this,!0):this[o]||(this[o]=!0,t&&t.call(this))},e.prototype.disconnectedCallback=e.prototype.__shadydom_disconnectedCallback=function(){io?this.isConnected||bo.set(this,!1):this[o]&&(this[o]=!1,n&&n.call(this))}),e}(t,n,r)),t.prototype.connectedCallback=n,t.prototype.disconnectedCallback=r};window.customElements.define=wo,Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:wo,configurable:!0})}function No(e){if(Nt(e=e.__shady_getRootNode()))return e}function So(e){this.node=e}function Co(e){Object.defineProperty(So.prototype,e,{get:function(){return this.node["__shady_"+e]},set:function(t){this.node["__shady_"+e]=t},configurable:!0})}(t=So.prototype).addEventListener=function(e,t,n){return this.node.__shady_addEventListener(e,t,n)},t.removeEventListener=function(e,t,n){return this.node.__shady_removeEventListener(e,t,n)},t.appendChild=function(e){return this.node.__shady_appendChild(e)},t.insertBefore=function(e,t){return this.node.__shady_insertBefore(e,t)},t.removeChild=function(e){return this.node.__shady_removeChild(e)},t.replaceChild=function(e,t){return this.node.__shady_replaceChild(e,t)},t.cloneNode=function(e){return this.node.__shady_cloneNode(e)},t.getRootNode=function(e){return this.node.__shady_getRootNode(e)},t.contains=function(e){return this.node.__shady_contains(e)},t.dispatchEvent=function(e){return this.node.__shady_dispatchEvent(e)},t.setAttribute=function(e,t){this.node.__shady_setAttribute(e,t)},t.getAttribute=function(e){return this.node.__shady_native_getAttribute(e)},t.hasAttribute=function(e){return this.node.__shady_native_hasAttribute(e)},t.removeAttribute=function(e){this.node.__shady_removeAttribute(e)},t.toggleAttribute=function(e,t){return this.node.__shady_toggleAttribute(e,t)},t.attachShadow=function(e){return this.node.__shady_attachShadow(e)},t.focus=function(){this.node.__shady_native_focus()},t.blur=function(){this.node.__shady_blur()},t.importNode=function(e,t){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(e,t)},t.getElementById=function(e){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(e)},t.elementsFromPoint=function(e,t){return this.node.__shady_elementsFromPoint(e,t)},t.elementFromPoint=function(e,t){return this.node.__shady_elementFromPoint(e,t)},t.querySelector=function(e){return this.node.__shady_querySelector(e)},t.querySelectorAll=function(e,t){return this.node.__shady_querySelectorAll(e,t)},t.assignedNodes=function(e){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(e)},t.append=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return this.node.__shady_append.apply(this.node,c(t))},t.prepend=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return this.node.__shady_prepend.apply(this.node,c(t))},t.after=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return this.node.__shady_after.apply(this.node,c(t))},t.before=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return this.node.__shady_before.apply(this.node,c(t))},t.remove=function(){return this.node.__shady_remove()},t.replaceWith=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];return this.node.__shady_replaceWith.apply(this.node,c(t))},i.Object.defineProperties(So.prototype,{activeElement:{configurable:!0,enumerable:!0,get:function(){if(Nt(this.node)||this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_activeElement}},_activeElement:{configurable:!0,enumerable:!0,get:function(){return this.activeElement}},host:{configurable:!0,enumerable:!0,get:function(){if(Nt(this.node))return this.node.host}},parentNode:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentNode}},firstChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstChild}},lastChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastChild}},nextSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextSibling}},previousSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousSibling}},childNodes:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childNodes}},parentElement:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_parentElement}},firstElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_firstElementChild}},lastElementChild:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_lastElementChild}},nextElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_nextElementSibling}},previousElementSibling:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_previousElementSibling}},children:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_children}},childElementCount:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_childElementCount}},shadowRoot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_shadowRoot}},assignedSlot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_assignedSlot}},isConnected:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_isConnected}},innerHTML:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_innerHTML},set:function(e){this.node.__shady_innerHTML=e}},textContent:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_textContent},set:function(e){this.node.__shady_textContent=e}},slot:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_slot},set:function(e){this.node.__shady_slot=e}},className:{configurable:!0,enumerable:!0,get:function(){return this.node.__shady_className},set:function(e){this.node.__shady_className=e}}}),Xn.forEach(function(e){return Co(e)}),Yn.forEach(function(e){return Co(e)});var To=new WeakMap;function Oo(e){if(Nt(e)||e instanceof So)return e;var t=To.get(e);return t||(t=new So(e),To.set(e,t)),t}if(vt.Ba){var Po=vt.D?function(e){return e}:function(e){return En(e),bn(e),e},xo={inUse:vt.Ba,patch:Po,isShadyRoot:Nt,enqueue:zt,flush:Kt,flushInitial:function(e){!e.Ia&&e.Y&&uo(e)},settings:vt,filterMutations:function(e,t){var n=t.getRootNode();return e.map(function(e){var t=n===e.target.getRootNode();if(t&&e.addedNodes){if(t=[].slice.call(e.addedNodes).filter(function(e){return n===e.getRootNode()}),t.length)return e=Object.create(e),Object.defineProperty(e,"addedNodes",{value:t,configurable:!0}),e}else if(t)return e}).filter(function(e){return e})},observeChildren:function(e,t){var n=_t(e);n.ga||(n.ga=new Xt),n.ga.qa.add(t);var r=n.ga;return{Va:t,X:r,Wa:e,takeRecords:function(){return r.takeRecords()}}},unobserveChildren:function(e){var t=e&&e.X;t&&(t.qa.delete(e.Va),t.qa.size||(_t(e.Wa).ga=null))},deferConnectionCallbacks:vt.deferConnectionCallbacks,preferPerformance:vt.preferPerformance,handlesDynamicScoping:!0,wrap:vt.J?Oo:Po,wrapIfNeeded:!0===vt.J?Oo:function(e){return e},Wrapper:So,composedPath:function(e){return e.__composedPath||(e.__composedPath=xn(e.target,!0)),e.__composedPath},noPatch:vt.J,patchOnDemand:vt.Da,nativeMethods:rn,nativeTree:on,patchElementProto:Yr,querySelectorImplementation:vt.querySelectorImplementation};window.ShadyDOM=xo,function(){var e=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?(ln(window.EventTarget.prototype,e),void 0===window.__shady_native_addEventListener&&ln(Window.prototype,e)):(ln(Node.prototype,e),ln(Window.prototype,e),ln(XMLHttpRequest.prototype,e)),nn?ln(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):sn(Node.prototype,{parentNode:{get:function(){return cn.currentNode=this,cn.parentNode()}},firstChild:{get:function(){return cn.currentNode=this,cn.firstChild()}},lastChild:{get:function(){return cn.currentNode=this,cn.lastChild()}},previousSibling:{get:function(){return cn.currentNode=this,cn.previousSibling()}},nextSibling:{get:function(){return cn.currentNode=this,cn.nextSibling()}},childNodes:{get:function(){var e=[];cn.currentNode=this;for(var t=cn.firstChild();t;)e.push(t),t=cn.nextSibling();return e}},parentElement:{get:function(){return un.currentNode=this,un.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var e,t=document.createTreeWalker(this,NodeFilter.SHOW_TEXT,null,!1),n="";e=t.nextNode();)n+=e.nodeValue;return n;default:return this.nodeValue}},set:function(e){switch(null==e&&(e=""),this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:dn(this),(0<e.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(e),void 0);break;default:this.nodeValue=e}}}}),ln(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")),ln(HTMLElement.prototype,["parentElement","contains"]),e={firstElementChild:{get:function(){return un.currentNode=this,un.firstChild()}},lastElementChild:{get:function(){return un.currentNode=this,un.lastChild()}},children:{get:function(){var e=[];un.currentNode=this;for(var t=un.firstChild();t;)e.push(t),t=un.nextSibling();return Lt(e)}},childElementCount:{get:function(){return this.children?this.children.length:0}}},nn?(ln(Element.prototype,fn),ln(Element.prototype,["previousElementSibling","nextElementSibling","innerHTML","className"]),ln(HTMLElement.prototype,["children","innerHTML","className"])):(sn(Element.prototype,e),sn(Element.prototype,{previousElementSibling:{get:function(){return un.currentNode=this,un.previousSibling()}},nextElementSibling:{get:function(){return un.currentNode=this,un.nextSibling()}},innerHTML:{get:function(){return tn(this,jt)},set:function(e){var t="template"===this.localName?this.content:this;dn(t);var n=this.localName||"div";for((n=this.namespaceURI&&this.namespaceURI!==hn.namespaceURI?hn.createElementNS(this.namespaceURI,n):hn.createElement(n)).innerHTML=e,e="template"===this.localName?n.content:n;n=e.__shady_native_firstChild;)t.__shady_native_insertBefore(n,void 0)}},className:{get:function(){return this.getAttribute("class")||""},set:function(e){this.setAttribute("class",e)}}})),ln(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute toggleAttribute focus blur".split(" ")),ln(Element.prototype,pn),ln(HTMLElement.prototype,["focus","blur"]),window.HTMLTemplateElement&&ln(window.HTMLTemplateElement.prototype,["innerHTML"]),nn?ln(DocumentFragment.prototype,fn):sn(DocumentFragment.prototype,e),ln(DocumentFragment.prototype,pn),nn?(ln(Document.prototype,fn),ln(Document.prototype,["activeElement"])):sn(Document.prototype,e),ln(Document.prototype,["importNode","getElementById","elementFromPoint",Et()]),ln(Document.prototype,pn)}(),Xr("__shady_"),Object.defineProperty(document,"_activeElement",Ur.activeElement),Ft(Window.prototype,qr,"__shady_"),vt.J?vt.Da&&Ft(Element.prototype,Ar):(Xr(),function(){if(!Nn&&Object.getOwnPropertyDescriptor(Event.prototype,"isTrusted")){var e=function(){var e=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!0});this.__shady_dispatchEvent(e)};Element.prototype.click?Element.prototype.click=e:HTMLElement.prototype.click&&(HTMLElement.prototype.click=e)}}()),function(){for(var e in jn)window.__shady_native_addEventListener(e,function(e){e.__target||(Gn(e),In(e))},!0)}(),window.Event=Vn,window.CustomEvent=zn,window.MouseEvent=Kn,window.ShadowRoot=so}var Do=window.Document.prototype.createElement,Mo=window.Document.prototype.createElementNS,Ao=window.Document.prototype.importNode,Lo=window.Document.prototype.prepend,jo=window.Document.prototype.append,Ro=window.DocumentFragment.prototype.prepend,ko=window.DocumentFragment.prototype.append,Fo=window.Node.prototype.cloneNode,Io=window.Node.prototype.appendChild,Ho=window.Node.prototype.insertBefore,Uo=window.Node.prototype.removeChild,Bo=window.Node.prototype.replaceChild,Wo=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),qo=window.Element.prototype.attachShadow,Go=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Vo=window.Element.prototype.getAttribute,zo=window.Element.prototype.setAttribute,Ko=window.Element.prototype.removeAttribute,Xo=window.Element.prototype.toggleAttribute,Yo=window.Element.prototype.getAttributeNS,$o=window.Element.prototype.setAttributeNS,Jo=window.Element.prototype.removeAttributeNS,Zo=window.Element.prototype.insertAdjacentElement,Qo=window.Element.prototype.insertAdjacentHTML,ei=window.Element.prototype.prepend,ti=window.Element.prototype.append,ni=window.Element.prototype.before,ri=window.Element.prototype.after,oi=window.Element.prototype.replaceWith,ii=window.Element.prototype.remove,ai=window.HTMLElement,si=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),li=window.HTMLElement.prototype.insertAdjacentElement,ci=window.HTMLElement.prototype.insertAdjacentHTML,ui=new Set;function hi(e){var t=ui.has(e);return e=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(e),!t&&e}"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(e){return ui.add(e)});var di=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function fi(e){var t=e.isConnected;if(void 0!==t)return t;if(di(e))return!0;for(;e&&!(e.__CE_isImportDocument||e instanceof Document);)e=e.parentNode||(window.ShadowRoot&&e instanceof ShadowRoot?e.host:void 0);return!(!e||!(e.__CE_isImportDocument||e instanceof Document))}function pi(e){var t=e.children;if(t)return Array.prototype.slice.call(t);for(t=[],e=e.firstChild;e;e=e.nextSibling)e.nodeType===Node.ELEMENT_NODE&&t.push(e);return t}function _i(e,t){for(;t&&t!==e&&!t.nextSibling;)t=t.parentNode;return t&&t!==e?t.nextSibling:null}function mi(e,t,n){for(var r=e;r;){if(r.nodeType===Node.ELEMENT_NODE){var o=r;t(o);var i=o.localName;if("link"===i&&"import"===o.getAttribute("rel")){if(r=o.import,void 0===n&&(n=new Set),r instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)mi(r,t,n);r=_i(e,o);continue}if("template"===i){r=_i(e,o);continue}if(o=o.__CE_shadowRoot)for(o=o.firstChild;o;o=o.nextSibling)mi(o,t,n)}r=r.firstChild?r.firstChild:_i(e,r)}}function vi(){var e=!(null==Ii||!Ii.noDocumentConstructionObserver),t=!(null==Ii||!Ii.shadyDomFastWalk);this.ca=[],this.g=[],this.W=!1,this.shadyDomFastWalk=t,this.sb=!e}function yi(e,t,n,r){var o=window.ShadyDOM;if(e.shadyDomFastWalk&&o&&o.inUse){if(t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll)for(e=o.nativeMethods.querySelectorAll.call(t,"*"),t=0;t<e.length;t++)n(e[t])}else mi(t,n,r)}function gi(e,t){e.W&&yi(e,t,function(t){return bi(e,t)})}function bi(e,t){if(e.W&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.ca.length;n++)e.ca[n](t);for(n=0;n<e.g.length;n++)e.g[n](t)}}function Ei(e,t){var n=[];for(yi(e,t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state?e.connectedCallback(r):Si(e,r)}}function wi(e,t){var n=[];for(yi(e,t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state&&e.disconnectedCallback(r)}}function Ni(e,t,n){var r=(n=void 0===n?{}:n).tb,o=n.upgrade||function(t){return Si(e,t)},i=[];for(yi(e,t,function(t){if(e.W&&bi(e,t),"link"===t.localName&&"import"===t.getAttribute("rel")){var n=t.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_registry=document.__CE_registry),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:t.addEventListener("load",function(){var n=t.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set;r&&(r.forEach(function(e){return i.add(e)}),i.delete(n)),Ni(e,n,{tb:i,upgrade:o})}})}else i.push(t)},r),t=0;t<i.length;t++)o(i[t])}function Si(e,t){try{var n=t.ownerDocument,r=n.__CE_registry,o=r&&(n.defaultView||n.__CE_isImportDocument)?ji(r,t.localName):void 0;if(o&&void 0===t.__CE_state){o.constructionStack.push(t);try{try{if(new o.constructorFunction!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{o.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=o,o.attributeChangedCallback&&t.hasAttributes()){var i=o.observedAttributes;for(o=0;o<i.length;o++){var a=i[o],s=t.getAttribute(a);null!==s&&e.attributeChangedCallback(t,a,null,s,null)}}fi(t)&&e.connectedCallback(t)}}catch(e){Ti(e)}}function Ci(e,t,n,r){var o=t.__CE_registry;if(o&&(null===r||"http://www.w3.org/1999/xhtml"===r)&&(o=ji(o,n)))try{var i=new o.constructorFunction;if(void 0===i.__CE_state||void 0===i.__CE_definition)throw Error("Failed to construct '"+n+"': The returned value was not constructed with the HTMLElement constructor.");if("http://www.w3.org/1999/xhtml"!==i.namespaceURI)throw Error("Failed to construct '"+n+"': The constructed element's namespace must be the HTML namespace.");if(i.hasAttributes())throw Error("Failed to construct '"+n+"': The constructed element must not have any attributes.");if(null!==i.firstChild)throw Error("Failed to construct '"+n+"': The constructed element must not have any children.");if(null!==i.parentNode)throw Error("Failed to construct '"+n+"': The constructed element must not have a parent node.");if(i.ownerDocument!==t)throw Error("Failed to construct '"+n+"': The constructed element's owner document is incorrect.");if(i.localName!==n)throw Error("Failed to construct '"+n+"': The constructed element's local name is incorrect.");return i}catch(o){return Ti(o),t=null===r?Do.call(t,n):Mo.call(t,r,n),Object.setPrototypeOf(t,HTMLUnknownElement.prototype),t.__CE_state=2,t.__CE_definition=void 0,bi(e,t),t}return bi(e,t=null===r?Do.call(t,n):Mo.call(t,r,n)),t}function Ti(e){var t="",n="",r=0,o=0;e instanceof Error?(t=e.message,n=e.sourceURL||e.fileName||"",r=e.line||e.lineNumber||0,o=e.column||e.columnNumber||0):t="Uncaught "+String(e);var i=void 0;void 0===ErrorEvent.prototype.initErrorEvent?i=new ErrorEvent("error",{cancelable:!0,message:t,filename:n,lineno:r,colno:o,error:e}):((i=document.createEvent("ErrorEvent")).initErrorEvent("error",!1,!0,t,n,r),i.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{configurable:!0,get:function(){return!0}})}),void 0===i.error&&Object.defineProperty(i,"error",{configurable:!0,enumerable:!0,get:function(){return e}}),window.dispatchEvent(i),i.defaultPrevented||console.error(e)}function Oi(){var e=this;this.I=void 0,this.Ka=new Promise(function(t){e.g=t})}function Pi(e){var t=document;this.X=void 0,this.S=e,this.g=t,Ni(this.S,this.g),"loading"===this.g.readyState&&(this.X=new MutationObserver(this.h.bind(this)),this.X.observe(this.g,{childList:!0,subtree:!0}))}function xi(e){e.X&&e.X.disconnect()}function Di(e){this.ma=new Map,this.na=new Map,this.Fa=new Map,this.wa=!1,this.za=new Map,this.la=function(e){return e()},this.V=!1,this.oa=[],this.S=e,this.Ga=e.sb?new Pi(e):void 0}function Mi(e,t){if(!hi(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(ji(e,t))throw Error("A custom element with name '"+t+"' has already been defined.");if(e.wa)throw Error("A custom element is already being defined.")}function Ai(e,t,n){var r;e.wa=!0;try{var o=n.prototype;if(!(o instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var i=function(e){var t=o[e];if(void 0!==t&&!(t instanceof Function))throw Error("The '"+e+"' callback must be a function.");return t},a=i("connectedCallback"),s=i("disconnectedCallback"),l=i("adoptedCallback"),c=(r=i("attributeChangedCallback"))&&n.observedAttributes||[]}catch(e){throw e}finally{e.wa=!1}return n={localName:t,constructorFunction:n,connectedCallback:a,disconnectedCallback:s,adoptedCallback:l,attributeChangedCallback:r,observedAttributes:c,constructionStack:[]},e.na.set(t,n),e.Fa.set(n.constructorFunction,n),n}function Li(e){if(!1!==e.V){e.V=!1;for(var t=[],n=e.oa,r=new Map,o=0;o<n.length;o++)r.set(n[o],[]);for(Ni(e.S,document,{upgrade:function(n){if(void 0===n.__CE_state){var o=n.localName,i=r.get(o);i?i.push(n):e.na.has(o)&&t.push(n)}}}),o=0;o<t.length;o++)Si(e.S,t[o]);for(o=0;o<n.length;o++){for(var i=n[o],a=r.get(i),s=0;s<a.length;s++)Si(e.S,a[s]);(i=e.za.get(i))&&i.resolve(void 0)}n.length=0}}function ji(e,t){var n=e.na.get(t);if(n)return n;if(n=e.ma.get(t)){e.ma.delete(t);try{return Ai(e,t,n())}catch(e){Ti(e)}}}function Ri(e,t,n){function r(t){return function(n){for(var r=[],o=0;o<arguments.length;++o)r[o]=arguments[o];o=[];for(var i=[],a=0;a<r.length;a++){var s=r[a];if(s instanceof Element&&fi(s)&&i.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)o.push(s);else o.push(s)}for(t.apply(this,r),r=0;r<i.length;r++)wi(e,i[r]);if(fi(this))for(r=0;r<o.length;r++)(i=o[r])instanceof Element&&Ei(e,i)}}void 0!==n.prepend&&(t.prepend=r(n.prepend)),void 0!==n.append&&(t.append=r(n.append))}function ki(e){function t(t,n){Object.defineProperty(t,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){var r=this,o=void 0;if(fi(this)&&(o=[],yi(e,this,function(e){e!==r&&o.push(e)})),n.set.call(this,t),o)for(var i=0;i<o.length;i++){var a=o[i];1===a.__CE_state&&e.disconnectedCallback(a)}return this.ownerDocument.__CE_registry?Ni(e,this):gi(e,this),t}})}function n(t,n){t.insertAdjacentElement=function(t,r){var o=fi(r);return t=n.call(this,t,r),o&&wi(e,r),fi(t)&&Ei(e,r),t}}function r(t,n){function r(t,n){for(var r=[];t!==n;t=t.nextSibling)r.push(t);for(n=0;n<r.length;n++)Ni(e,r[n])}t.insertAdjacentHTML=function(e,t){if("beforebegin"===(e=e.toLowerCase())){var o=this.previousSibling;n.call(this,e,t),r(o||this.parentNode.firstChild,this)}else if("afterbegin"===e)o=this.firstChild,n.call(this,e,t),r(this.firstChild,o);else if("beforeend"===e)o=this.lastChild,n.call(this,e,t),r(o||this.firstChild,null);else{if("afterend"!==e)throw new SyntaxError("The value provided ("+String(e)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");o=this.nextSibling,n.call(this,e,t),r(this.nextSibling,o)}}}qo&&(Element.prototype.attachShadow=function(t){if(t=qo.call(this,t),e.W&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.ca.length;n++)e.ca[n](t)}return this.__CE_shadowRoot=t}),Go&&Go.get?t(Element.prototype,Go):si&&si.get?t(HTMLElement.prototype,si):function(e,t){e.W=!0,e.g.push(t)}(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return Fo.call(this,!0).innerHTML},set:function(e){var t="template"===this.localName,n=t?this.content:this,r=Mo.call(document,this.namespaceURI,this.localName);for(r.innerHTML=e;0<n.childNodes.length;)Uo.call(n,n.childNodes[0]);for(e=t?r.content:r;0<e.childNodes.length;)Io.call(n,e.childNodes[0])}})}),Element.prototype.setAttribute=function(t,n){if(1!==this.__CE_state)return zo.call(this,t,n);var r=Vo.call(this,t);zo.call(this,t,n),n=Vo.call(this,t),e.attributeChangedCallback(this,t,r,n,null)},Element.prototype.setAttributeNS=function(t,n,r){if(1!==this.__CE_state)return $o.call(this,t,n,r);var o=Yo.call(this,t,n);$o.call(this,t,n,r),r=Yo.call(this,t,n),e.attributeChangedCallback(this,n,o,r,t)},Element.prototype.removeAttribute=function(t){if(1!==this.__CE_state)return Ko.call(this,t);var n=Vo.call(this,t);Ko.call(this,t),null!==n&&e.attributeChangedCallback(this,t,n,null,null)},Xo&&(Element.prototype.toggleAttribute=function(t,n){if(1!==this.__CE_state)return Xo.call(this,t,n);var r=Vo.call(this,t);return null!==r!==(n=Xo.call(this,t,n))&&e.attributeChangedCallback(this,t,r,n?"":null,null),n}),Element.prototype.removeAttributeNS=function(t,n){if(1!==this.__CE_state)return Jo.call(this,t,n);var r=Yo.call(this,t,n);Jo.call(this,t,n);var o=Yo.call(this,t,n);r!==o&&e.attributeChangedCallback(this,n,r,o,t)},li?n(HTMLElement.prototype,li):Zo&&n(Element.prototype,Zo),ci?r(HTMLElement.prototype,ci):Qo&&r(Element.prototype,Qo),Ri(e,Element.prototype,{prepend:ei,append:ti}),function(e){function t(t){return function(n){for(var r=[],o=0;o<arguments.length;++o)r[o]=arguments[o];o=[];for(var i=[],a=0;a<r.length;a++){var s=r[a];if(s instanceof Element&&fi(s)&&i.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)o.push(s);else o.push(s)}for(t.apply(this,r),r=0;r<i.length;r++)wi(e,i[r]);if(fi(this))for(r=0;r<o.length;r++)(i=o[r])instanceof Element&&Ei(e,i)}}var n=Element.prototype;void 0!==ni&&(n.before=t(ni)),void 0!==ri&&(n.after=t(ri)),void 0!==oi&&(n.replaceWith=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];r=[];for(var o=[],i=0;i<n.length;i++){var a=n[i];if(a instanceof Element&&fi(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)r.push(a);else r.push(a)}for(i=fi(this),oi.apply(this,n),n=0;n<o.length;n++)wi(e,o[n]);if(i)for(wi(e,this),n=0;n<r.length;n++)(o=r[n])instanceof Element&&Ei(e,o)}),void 0!==ii&&(n.remove=function(){var t=fi(this);ii.call(this),t&&wi(e,this)})}(e)}vi.prototype.connectedCallback=function(e){var t=e.__CE_definition;if(t.connectedCallback)try{t.connectedCallback.call(e)}catch(e){Ti(e)}},vi.prototype.disconnectedCallback=function(e){var t=e.__CE_definition;if(t.disconnectedCallback)try{t.disconnectedCallback.call(e)}catch(e){Ti(e)}},vi.prototype.attributeChangedCallback=function(e,t,n,r,o){var i=e.__CE_definition;if(i.attributeChangedCallback&&-1<i.observedAttributes.indexOf(t))try{i.attributeChangedCallback.call(e,t,n,r,o)}catch(e){Ti(e)}},Oi.prototype.resolve=function(e){if(this.I)throw Error("Already resolved.");this.I=e,this.g(e)},Pi.prototype.h=function(e){var t=this.g.readyState;for("interactive"!==t&&"complete"!==t||xi(this),t=0;t<e.length;t++)for(var n=e[t].addedNodes,r=0;r<n.length;r++)Ni(this.S,n[r])},(t=Di.prototype).jb=function(e,t){var n=this;if(!(t instanceof Function))throw new TypeError("Custom element constructor getters must be functions.");Mi(this,e),this.ma.set(e,t),this.oa.push(e),this.V||(this.V=!0,this.la(function(){return Li(n)}))},t.define=function(e,t){var n=this;if(!(t instanceof Function))throw new TypeError("Custom element constructors must be functions.");Mi(this,e),Ai(this,e,t),this.oa.push(e),this.V||(this.V=!0,this.la(function(){return Li(n)}))},t.upgrade=function(e){Ni(this.S,e)},t.get=function(e){if(e=ji(this,e))return e.constructorFunction},t.whenDefined=function(e){if(!hi(e))return Promise.reject(new SyntaxError("'"+e+"' is not a valid custom element name."));var t=this.za.get(e);if(t)return t.Ka;t=new Oi,this.za.set(e,t);var n=this.na.has(e)||this.ma.has(e);return e=-1===this.oa.indexOf(e),n&&e&&t.resolve(void 0),t.Ka},t.polyfillWrapFlushCallback=function(e){this.Ga&&xi(this.Ga);var t=this.la;this.la=function(n){return e(function(){return t(n)})}},Di.prototype.define=Di.prototype.define,Di.prototype.upgrade=Di.prototype.upgrade,Di.prototype.get=Di.prototype.get,Di.prototype.whenDefined=Di.prototype.whenDefined,Di.prototype.polyfillDefineLazy=Di.prototype.jb,Di.prototype.polyfillWrapFlushCallback=Di.prototype.polyfillWrapFlushCallback;var Fi={},Ii=window.customElements;function Hi(){var e=new vi;!function(e){function t(){var t=this.constructor,n=document.__CE_registry.Fa.get(t);if(!n)throw Error("Failed to construct a custom element: The constructor was not registered with `customElements`.");var r=n.constructionStack;if(0===r.length)return r=Do.call(document,n.localName),Object.setPrototypeOf(r,t.prototype),r.__CE_state=1,r.__CE_definition=n,bi(e,r),r;var o=r.length-1,i=r[o];if(i===Fi)throw Error("Failed to construct '"+n.localName+"': This element was already constructed.");return r[o]=Fi,Object.setPrototypeOf(i,t.prototype),bi(e,i),i}t.prototype=ai.prototype,Object.defineProperty(HTMLElement.prototype,"constructor",{writable:!0,configurable:!0,enumerable:!1,value:t}),window.HTMLElement=t}(e),function(e){Document.prototype.createElement=function(t){return Ci(e,this,t,null)},Document.prototype.importNode=function(t,n){return t=Ao.call(this,t,!!n),this.__CE_registry?Ni(e,t):gi(e,t),t},Document.prototype.createElementNS=function(t,n){return Ci(e,this,n,t)},Ri(e,Document.prototype,{prepend:Lo,append:jo})}(e),Ri(e,DocumentFragment.prototype,{prepend:Ro,append:ko}),function(e){function t(t,n){Object.defineProperty(t,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,t);else{var r=void 0;if(this.firstChild){var o=this.childNodes,i=o.length;if(0<i&&fi(this)){r=Array(i);for(var a=0;a<i;a++)r[a]=o[a]}}if(n.set.call(this,t),r)for(t=0;t<r.length;t++)wi(e,r[t])}}})}Node.prototype.insertBefore=function(t,n){if(t instanceof DocumentFragment){var r=pi(t);if(t=Ho.call(this,t,n),fi(this))for(n=0;n<r.length;n++)Ei(e,r[n]);return t}return r=t instanceof Element&&fi(t),n=Ho.call(this,t,n),r&&wi(e,t),fi(this)&&Ei(e,t),n},Node.prototype.appendChild=function(t){if(t instanceof DocumentFragment){var n=pi(t);if(t=Io.call(this,t),fi(this))for(var r=0;r<n.length;r++)Ei(e,n[r]);return t}return n=t instanceof Element&&fi(t),r=Io.call(this,t),n&&wi(e,t),fi(this)&&Ei(e,t),r},Node.prototype.cloneNode=function(t){return t=Fo.call(this,!!t),this.ownerDocument.__CE_registry?Ni(e,t):gi(e,t),t},Node.prototype.removeChild=function(t){var n=t instanceof Element&&fi(t),r=Uo.call(this,t);return n&&wi(e,t),r},Node.prototype.replaceChild=function(t,n){if(t instanceof DocumentFragment){var r=pi(t);if(t=Bo.call(this,t,n),fi(this))for(wi(e,n),n=0;n<r.length;n++)Ei(e,r[n]);return t}r=t instanceof Element&&fi(t);var o=Bo.call(this,t,n),i=fi(this);return i&&wi(e,n),r&&wi(e,t),i&&Ei(e,t),o},Wo&&Wo.get?t(Node.prototype,Wo):function(e,t){e.W=!0,e.ca.push(t)}(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var e=[],t=this.firstChild;t;t=t.nextSibling)t.nodeType!==Node.COMMENT_NODE&&e.push(t.textContent);return e.join("")},set:function(e){for(;this.firstChild;)Uo.call(this,this.firstChild);null!=e&&""!==e&&Io.call(this,document.createTextNode(e))}})})}(e),ki(e),window.CustomElementRegistry=Di,e=new Di(e),document.__CE_registry=e,Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:e})}function Ui(){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 Bi(e){var t=e=e.replace($i,"").replace(Ji,""),n=new Ui;n.start=0,n.end=t.length;for(var r=n,o=0,i=t.length;o<i;o++)if("{"===t[o]){r.rules||(r.rules=[]);var a=r,s=a.rules[a.rules.length-1]||null;(r=new Ui).start=o+1,r.parent=a,r.previous=s,a.rules.push(r)}else"}"===t[o]&&(r.end=o+1,r=r.parent||n);return Wi(n,e)}function Wi(e,t){var n=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=n.trim(),e.parent&&(n=function(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(e,t){for(t=6-(e=t).length;t--;)e="0"+e;return"\\"+e})}(n=t.substring(e.previous?e.previous.end:e.parent.start,e.start-1)),n=(n=n.replace(ra," ")).substring(n.lastIndexOf(";")+1),n=e.parsedSelector=e.selector=n.trim(),e.atRule=0===n.indexOf("@"),e.atRule?0===n.indexOf("@media")?e.type=Xi:n.match(na)&&(e.type=Ki,e.keyframesName=e.selector.split(ra).pop()):e.type=0===n.indexOf("--")?Yi:zi),n=e.rules)for(var r=0,o=n.length,i=void 0;r<o&&(i=n[r]);r++)Wi(i,t);return e}function qi(e,t,n){n=void 0===n?"":n;var r="";if(e.cssText||e.rules){var o,i=e.rules;if((o=i)&&(o=!((o=i[0])&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var a=i.length,s=void 0;o<a&&(s=i[o]);o++)r=qi(s,t,r)}else(r=(t=t?e.cssText:(t=(t=e.cssText).replace(Zi,"").replace(Qi,"")).replace(ea,"").replace(ta,"")).trim())&&(r=" "+r+"\n")}return r&&(e.selector&&(n+=e.selector+" {\n"),n+=r,e.selector&&(n+="}\n\n")),n}Ii&&!Ii.forcePolyfill&&"function"==typeof Ii.define&&"function"==typeof Ii.get||Hi(),window.__CE_installPolyfill=Hi;var Gi,Vi,zi=1,Ki=7,Xi=4,Yi=1e3,$i=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,Ji=/@import[^;]*;/gim,Zi=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,Qi=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,ea=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,ta=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,na=/^@[^\s]*keyframes/,ra=/\s+/g,oa=!(window.ShadyDOM&&window.ShadyDOM.inUse);function ia(e){Gi=(!e||!e.shimcssproperties)&&(oa||!(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.cssBuild&&(Vi=window.ShadyCSS.cssBuild);var aa=!(!window.ShadyCSS||!window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?Gi=window.ShadyCSS.nativeCss:window.ShadyCSS?(ia(window.ShadyCSS),window.ShadyCSS=void 0):ia(window.WebComponents&&window.WebComponents.flags);var sa=Gi,la=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,ca=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,ua=/(--[\w-]+)\s*([:,;)]|$)/gi,ha=/(animation\s*:)|(animation-name\s*:)/,da=/@media\s(.*)/,fa=/\{[^}]*\}/g,pa=new Set;function _a(e,t){return e?("string"==typeof e&&(e=Bi(e)),t&&ya(e,t),qi(e,sa)):""}function ma(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=Bi(e.textContent)),e.__cssRules||null}function va(e){return!!e.parent&&e.parent.type===Ki}function ya(e,t,n,r){if(e){var o=!1,i=e.type;if(r&&i===Xi){var a=e.selector.match(da);a&&(window.matchMedia(a[1]).matches||(o=!0))}if(i===zi?t(e):n&&i===Ki?n(e):i===Yi&&(o=!0),(e=e.rules)&&!o)for(o=0,i=e.length,a=void 0;o<i&&(a=e[o]);o++)ya(a,t,n,r)}}function ga(e,t,n,r){var o=document.createElement("style");return t&&o.setAttribute("scope",t),o.textContent=e,wa(o,n,r),o}var ba=null;function Ea(e){e=document.createComment(" Shady DOM styles for "+e+" ");var t=document.head;return t.insertBefore(e,(ba?ba.nextSibling:null)||t.firstChild),ba=e}function wa(e,t,n){(t=t||document.head).insertBefore(e,n&&n.nextSibling||t.firstChild),ba?e.compareDocumentPosition(ba)===Node.DOCUMENT_POSITION_PRECEDING&&(ba=e):ba=e}function Na(e,t){for(var n=0,r=e.length;t<r;t++)if("("===e[t])n++;else if(")"===e[t]&&0===--n)return t;return-1}function Sa(e,t){var n=e.indexOf("var(");if(-1===n)return t(e,"","","");var r=Na(e,n+3),o=e.substring(n+4,r);return n=e.substring(0,n),e=Sa(e.substring(r+1),t),-1===(r=o.indexOf(","))?t(n,o.trim(),"",e):t(n,o.substring(0,r).trim(),o.substring(r+1).trim(),e)}function Ca(e,t){oa?e.setAttribute("class",t):window.ShadyDOM.nativeMethods.setAttribute.call(e,"class",t)}var Ta=window.ShadyDOM&&window.ShadyDOM.wrap||function(e){return e};function Oa(e){var t=e.localName,n="";return t?-1<t.indexOf("-")||(n=t,t=e.getAttribute&&e.getAttribute("is")||""):(t=e.is,n=e.extends),{is:t,ja:n}}function Pa(e){for(var t=[],n="",r=0;0<=r&&r<e.length;r++)if("("===e[r]){var o=Na(e,r);n+=e.slice(r,o+1),r=o}else","===e[r]?(t.push(n),n=""):n+=e[r];return n&&t.push(n),t}function xa(e){if(void 0!==Vi)return Vi;if(void 0===e.__cssBuild){var t=e.getAttribute("css-build");if(t)e.__cssBuild=t;else{if(""!==(t=(t="template"===e.localName?e.content.firstChild:e.firstChild)instanceof Comment&&"css-build"===(t=t.textContent.trim().split(":"))[0]?t[1]:"")){var n="template"===e.localName?e.content.firstChild:e.firstChild;n.parentNode.removeChild(n)}e.__cssBuild=t}}return e.__cssBuild||""}function Da(e){return!(""===(e=void 0===e?"":e)||!sa)&&(oa?"shadow"===e:"shady"===e)}function Ma(){}function Aa(e,t,n){var r;if(t.nodeType===Node.ELEMENT_NODE&&n(t),r="template"===t.localName?(t.content||t._content||t).childNodes:t.children||t.childNodes)for(t=0;t<r.length;t++)Aa(e,r[t],n)}function La(e,t,n){if(t)if(e.classList)n?(e.classList.remove("style-scope"),e.classList.remove(t)):(e.classList.add("style-scope"),e.classList.add(t));else if(e.getAttribute){var r=e.getAttribute("class");n?r&&Ca(e,t=r.replace("style-scope","").replace(t,"")):Ca(e,(r?r+" ":"")+"style-scope "+t)}}function ja(e,t,n){Aa($a,e,function(e){La(e,t,!0),La(e,n)})}function Ra(e,t){Aa($a,e,function(e){La(e,t||"",!0)})}function ka(e,t,n,r,o){var i=$a;return""===(o=void 0===o?"":o)&&(o=oa||"shady"===(void 0===r?"":r)?_a(t,n):function(e,t,n,r,o){var i=Fa(n,r);return n=n?"."+n:"",_a(t,function(t){t.i||(t.selector=t.G=Ia(e,t,e.h,n,i),t.i=!0),o&&o(t,n,i)})}(i,t,(e=Oa(e)).is,e.ja,n)+"\n\n"),o.trim()}function Fa(e,t){return t?"[is="+e+"]":e}function Ia(e,t,n,r,o){var i=Pa(t.selector);if(!va(t)){t=0;for(var a=i.length,s=void 0;t<a&&(s=i[t]);t++)i[t]=n.call(e,s,r,o)}return i.filter(function(e){return!!e}).join(",")}function Ha(e){return e.replace(Wa,function(e,t,n){return-1<n.indexOf("+")?n=n.replace(/\+/g,"___"):-1<n.indexOf("___")&&(n=n.replace(/___/g,"+")),":"+t+"("+n+")"})}function Ua(e,t){e=e.split(/(\[.+?\])/);for(var n=[],r=0;r<e.length;r++)if(1==r%2)n.push(e[r]);else{var o=e[r];""===o&&r===e.length-1||((o=o.split(":"))[0]+=t,n.push(o.join(":")))}return n.join("")}function Ba(e){":root"===e.selector&&(e.selector="html")}Ma.prototype.h=function(e,t,n){var r=!1;e=e.trim();var o=Wa.test(e);o&&(e=Ha(e=e.replace(Wa,function(e,t,n){return":"+t+"("+n.replace(/\s/g,"")+")"})));var i=Ya.test(e);if(i){var a=function(e){for(var t,n=[];t=e.match(Ya);){var r=t.index,o=Na(e,r);if(-1===o)throw Error(t.input+" selector missing ')'");t=e.slice(r,o+1),e=e.replace(t,""),n.push(t)}return{Ea:e,matches:n}}(e);e=a.Ea,a=a.matches}return e=(e=e.replace(Va,":host $1")).replace(qa,function(e,o,i){return r||(e=function(e,t,n,r){var o=e.indexOf("::slotted");if(0<=e.indexOf(":host")?e=function(e,t){var n=e.match(za);return(n=n&&n[2].trim()||"")?n[0].match(Ga)?e.replace(za,function(e,n,r){return t+r}):n.split(Ga)[0]===t?n:"should_not_match":e.replace(":host",t)}(e,r):0!==o&&(e=n?Ua(e,n):e),n=!1,0<=o&&(t="",n=!0),n){var i=!0;n&&(e=e.replace(Ka,function(e,t){return" > "+t}))}return{value:e,Ya:t,stop:i}}(i,o,t,n),r=r||e.stop,o=e.Ya,i=e.value),o+i}),i&&(e=function(e,t){var n=e.split("");return t.reduce(function(e,t,r){return e+t+n[r+1]},n[0])}(e,a)),o&&(e=Ha(e)),e.replace(Xa,function(e,t,n,r){return'[dir="'+n+'"] '+t+r+", "+t+'[dir="'+n+'"]'+r})},Ma.prototype.i=function(e){return e.match(":host")?"":e.match("::slotted")?this.h(e,":not(.style-scope)"):Ua(e.trim(),":not(.style-scope)")},i.Object.defineProperties(Ma.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Wa=/:(nth[-\w]+)\(([^)]+)\)/,qa=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ga=/[[.:#*]/,Va=/^(::slotted)/,za=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ka=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Xa=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ya=/:(?:matches|any|-(?:webkit|moz)-any)/,$a=new Ma;function Ja(e,t,n,r,o){this.M=e||null,this.h=t||null,this.Ca=n||[],this.K=null,this.cssBuild=o||"",this.ja=r||"",this.g=this.L=this.R=null}function Za(e){return e?e.__styleInfo:null}function Qa(e,t){return e.__styleInfo=t}function es(e){var t=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return t&&t.call(this,e)}Ja.prototype.i=function(){return this.M},Ja.prototype._getStyleRules=Ja.prototype.i;var ts=/:host\s*>\s*/,ns=navigator.userAgent.match("Trident");function rs(){}function os(e){if(!e.F){var t={},n={};is(e,n)&&(t.P=n,e.rules=null),t.cssText=e.parsedCssText.replace(fa,"").replace(la,""),e.F=t}}function is(e,t){var n=e.F;if(!n){n=e.parsedCssText;for(var r;e=la.exec(n);)"inherit"===(r=(e[2]||e[3]).trim())&&"unset"===r||(t[e[1].trim()]=r),r=!0;return r}if(n.P)return Object.assign(t,n.P),!0}function as(e,t,n){return t&&(t=0<=t.indexOf(";")?ss(e,t,n):Sa(t,function(t,r,o,i){return r?((r=as(e,n[r],n))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=as(e,n[o]||o,n)||o,t+(r||"")+i):t+i})),t&&t.trim()||""}function ss(e,t,n){t=t.split(";");for(var r,o,i=0;i<t.length;i++)if(r=t[i]){if(ca.lastIndex=0,o=ca.exec(r))r=as(e,n[o[1]],n);else if(-1!==(o=r.indexOf(":"))){var a=r.substring(o);a=as(e,a=a.trim(),n)||a,r=r.substring(0,o)+a}t[i]=r&&r.lastIndexOf(";")===r.length-1?r.slice(0,-1):r||""}return t.join(";")}function ls(e,t,n){var r={},o={};return ya(t,function(t){!function(e,t,n,r){if(t.F||os(t),t.F.P){var o=Oa(e);e=o.is,o=o.ja,o=e?Fa(e,o):"html";var i=t.parsedSelector,a=!!i.match(ts)||"html"===o&&-1<i.indexOf("html"),s=0===i.indexOf(":host")&&!a;"shady"===n&&(s=!(a=i===o+" > *."+o||-1!==i.indexOf("html"))&&0===i.indexOf(o)),(a||s)&&(n=o,s&&(t.G||(t.G=Ia($a,t,$a.h,e?"."+e:"",o)),n=t.G||o),a&&"html"===o&&(n=t.G||t.O),r({Ea:n,gb:s,vb:a}))}}(e,t,n,function(n){es.call(e._element||e,n.Ea)&&(n.gb?is(t,r):is(t,o))})},null,!0),{mb:o,eb:r}}function cs(e,t,n,r){var o=Oa(t),i=Fa(o.is,o.ja),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\"+i.slice(0,-1)+"\\]":i)+"($|[.:[\\s>+~])"),s=Za(t);o=s.M,s=s.cssBuild;var l=function(e,t){e=e.h;var n={};if(!oa&&e)for(var r=0,o=e[r];r<e.length;o=e[++r]){var i=o,a=t;i.u=new RegExp("\\b"+i.keyframesName+"(?!\\B|-)","g"),i.g=i.keyframesName+"-"+a,i.G=i.G||i.selector,i.selector=i.G.replace(i.keyframesName,i.g),n[o.keyframesName]=us(o)}return n}(o,r);return ka(t,o,function(t){var o="";if(t.F||os(t),t.F.cssText&&(o=ss(e,t.F.cssText,n)),t.cssText=o,!oa&&!va(t)&&t.cssText){var s=o=t.cssText;if(null==t.Ma&&(t.Ma=ha.test(o)),t.Ma)if(null==t.ra)for(var c in t.ra=[],l)o!==(s=(s=l[c])(o))&&(o=s,t.ra.push(c));else{for(c=0;c<t.ra.length;++c)o=(s=l[t.ra[c]])(o);s=o}t.cssText=s,t.G=t.G||t.selector,o="."+r,s=0;for(var u=(c=Pa(t.G)).length,h=void 0;s<u&&(h=c[s]);s++)c[s]=h.match(a)?h.replace(i,o):o+" "+h;t.selector=c.join(",")}},s)}function us(e){return function(t){return t.replace(e.u,e.g)}}function hs(e,t){var n=ds,r=ma(e);e.textContent=_a(r,function(e){var r=e.cssText=e.parsedCssText;e.F&&e.F.cssText&&(r=r.replace(Zi,"").replace(Qi,""),e.cssText=ss(n,r,t))})}i.Object.defineProperties(rs.prototype,{g:{configurable:!0,enumerable:!0,get:function(){return"x-scope"}}});var ds=new rs,fs={},ps=window.customElements;if(ps&&!oa&&!aa){var _s=ps.define;ps.define=function(e,t,n){fs[e]||(fs[e]=Ea(e)),_s.call(ps,e,t,n)}}function ms(){this.cache={}}function vs(){}ms.prototype.store=function(e,t,n,r){var o=this.cache[e]||[];o.push({P:t,styleElement:n,L:r}),100<o.length&&o.shift(),this.cache[e]=o};var ys=new RegExp($a.g+"\\s*([^\\s]*)");function gs(e){return(e=(e.classList&&e.classList.value?e.classList.value:e.getAttribute("class")||"").match(ys))?e[1]:""}function bs(e){var t=Ta(e).getRootNode();return t===e||t===e.ownerDocument?"":(e=t.host)?Oa(e).is:""}function Es(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.target!==document.documentElement&&n.target!==document.head)for(var r=0;r<n.addedNodes.length;r++){var o=n.addedNodes[r];if(o.nodeType===Node.ELEMENT_NODE){var i=o.getRootNode(),a=gs(o);if(a&&i===o.ownerDocument&&("style"!==o.localName&&"template"!==o.localName||""===xa(o)))Ra(o,a);else if(i instanceof ShadowRoot)for((i=bs(o))!==a&&ja(o,a,i),o=window.ShadyDOM.nativeMethods.querySelectorAll.call(o,":not(."+$a.g+")"),a=0;a<o.length;a++){var s=bs(i=o[a]);s&&La(i,s)}}}}}if(!(oa||window.ShadyDOM&&window.ShadyDOM.handlesDynamicScoping)){var ws=new MutationObserver(Es),Ns=function(e){ws.observe(e,{childList:!0,subtree:!0})};if(window.customElements&&!window.customElements.polyfillWrapFlushCallback)Ns(document);else{var Ss=function(){Ns(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Ss):requestAnimationFrame(function(){if("loading"===document.readyState){var e=function(){Ss(),document.removeEventListener("readystatechange",e)};document.addEventListener("readystatechange",e)}else Ss()})}vs=function(){Es(ws.takeRecords())}}var Cs={},Ts=Promise.resolve();function Os(e){(e=Cs[e])&&(e._applyShimCurrentVersion=e._applyShimCurrentVersion||0,e._applyShimValidatingVersion=e._applyShimValidatingVersion||0,e._applyShimNextVersion=(e._applyShimNextVersion||0)+1)}function Ps(e){return e._applyShimCurrentVersion===e._applyShimNextVersion}var xs={},Ds=new ms;function Ms(){this.ea={},this.i=document.documentElement;var e=new Ui;e.rules=[],this.u=Qa(this.i,new Ja(e)),this.O=!1,this.g=this.h=null}function As(e){var t=Oa(e),n=t.is;t=t.ja;var r=fs[n]||null,o=Cs[n];if(o)return Qa(e,t=new Ja(n=o._styleAst,r,o.g,t,o=xa(o))),t}function Ls(e){if(!e.h&&window.ShadyCSS&&window.ShadyCSS.ApplyShim){e.h=window.ShadyCSS.ApplyShim,e.h.invalidCallback=Os;var t=!0}else t=!1;return function(e){!e.g&&window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface&&(e.g=window.ShadyCSS.CustomStyleInterface,e.g.transformCallback=function(t){e.Qa(t)},e.g.validateCallback=function(){requestAnimationFrame(function(){(e.g.enqueued||e.O)&&e.flushCustomStyles()})})}(e),t}function js(e,t,n){var r=Oa(t).is;if(n.K){var o,i=n.K;for(o in i)null===o?t.style.removeProperty(o):t.style.setProperty(o,i[o])}!(i=Cs[r])&&t!==e.i||i&&""!==xa(i)||!i||!i._style||Ps(i)||((Ps(i)||i._applyShimValidatingVersion!==i._applyShimNextVersion)&&(Ls(e),e.h&&e.h.transformRules(i._styleAst,r),i._style.textContent=ka(t,n.M),function(e){e._applyShimValidatingVersion=e._applyShimNextVersion,e._validating||(e._validating=!0,Ts.then(function(){e._applyShimCurrentVersion=e._applyShimNextVersion,e._validating=!1}))}(i)),oa&&(e=t.shadowRoot)&&(e=e.querySelector("style"))&&(e.textContent=ka(t,n.M)),n.M=i._styleAst)}function Rs(e,t){return(t=Ta(t).getRootNode().host)?Za(t)||As(t)?t:Rs(e,t):e.i}function ks(e,t,n){var r=Rs(e,t),o=Za(r),i=o.R;for(var a in r===e.i||i||(ks(e,r,o),i=o.R),e=Object.create(i||null),r=ls(t,n.M,n.cssBuild),t=function(e,t){var n={},r=[];return ya(e,function(e){e.F||os(e);var o=e.G||e.parsedSelector;t&&e.F.P&&o&&es.call(t,o)&&(is(e,n),e=e.index,o=parseInt(e/32,10),r[o]=(r[o]||0)|1<<e%32)},null,!0),{P:n,key:r}}(o.M,t).P,Object.assign(e,r.eb,t,r.mb),t=n.K)((o=t[a])||0===o)&&(e[a]=o);for(a=ds,t=Object.getOwnPropertyNames(e),o=0;o<t.length;o++)e[r=t[o]]=as(a,e[r],e);n.R=e}(t=Ms.prototype).flush=function(){vs()},t.bb=function(e){return ma(e)},t.qb=function(e){return _a(e)},t.prepareTemplate=function(e,t,n){this.prepareTemplateDom(e,t),this.prepareTemplateStyles(e,t,n)},t.prepareTemplateStyles=function(e,t,n){if(!e._prepared&&!aa){oa||fs[t]||(fs[t]=Ea(t)),e._prepared=!0,e.name=t,e.extends=n,Cs[t]=e;var r=xa(e),o=Da(r);n={is:t,extends:n};for(var i=[],a=e.content.querySelectorAll("style"),s=0;s<a.length;s++){var l=a[s];if(l.hasAttribute("shady-unscoped")){if(!oa){var c=l.textContent;if(!pa.has(c)){pa.add(c);var u=document.createElement("style");u.setAttribute("shady-unscoped",""),u.textContent=c,document.head.appendChild(u)}l.parentNode.removeChild(l)}}else i.push(l.textContent),l.parentNode.removeChild(l)}i=i.join("").trim()+(xs[t]||""),Ls(this),o||((a=!r)&&(a=ca.test(i)||la.test(i),ca.lastIndex=0,la.lastIndex=0),s=Bi(i),a&&sa&&this.h&&this.h.transformRules(s,t),e._styleAst=s),a=[],sa||(a=function(e){var t={},n=[],r=0;for(var o in ya(e,function(e){os(e),e.index=r++,e=e.F.cssText;for(var n;n=ua.exec(e);){var o=n[1];":"!==n[2]&&(t[o]=!0)}},function(e){n.push(e)}),e.h=n,e=[],t)e.push(o);return e}(e._styleAst)),a.length&&!sa||(s=oa?e.content:null,t=fs[t]||null,r=(r=ka(n,e._styleAst,null,r,o?i:"")).length?ga(r,n.is,s,t):null,e._style=r),e.g=a}},t.kb=function(e,t){xs[t]=e.join(" ")},t.prepareTemplateDom=function(e,t){if(!aa){var n=xa(e);oa||"shady"===n||e._domPrepared||(e._domPrepared=!0,function(e,t){Aa($a,e,function(e){La(e,t||"")})}(e.content,t))}},t.flushCustomStyles=function(){if(!aa){var e=Ls(this);if(this.g){var t=this.g.processStyles();if((e||this.g.enqueued)&&!Da(this.u.cssBuild)){if(sa){if(!this.u.cssBuild)for(e=0;e<t.length;e++){var n=this.g.getStyleForCustomStyle(t[e]);if(n&&sa&&this.h){var r=ma(n);Ls(this),this.h.transformRules(r),n.textContent=_a(r)}}}else{for(function(e,t){t=t.map(function(t){return e.g.getStyleForCustomStyle(t)}).filter(function(e){return!!e}),t.sort(function(e,t){return(e=t.compareDocumentPosition(e))&Node.DOCUMENT_POSITION_FOLLOWING?1:e&Node.DOCUMENT_POSITION_PRECEDING?-1:0}),e.u.M.rules=t.map(function(e){return ma(e)})}(this,t),ks(this,this.i,this.u),e=0;e<t.length;e++)(n=this.g.getStyleForCustomStyle(t[e]))&&hs(n,this.u.R);this.O&&this.styleDocument()}this.g.enqueued=!1}}}},t.styleElement=function(e,t){if(aa){if(t){Za(e)||Qa(e,new Ja(null));var n=Za(e);n.K=n.K||{},Object.assign(n.K,t),js(this,e,n)}}else if(n=Za(e)||As(e))if(e!==this.i&&(this.O=!0),t&&(n.K=n.K||{},Object.assign(n.K,t)),sa)js(this,e,n);else if(this.flush(),ks(this,e,n),n.Ca&&n.Ca.length){var r;t=Oa(e).is;e:{if(r=Ds.cache[t])for(var o=r.length-1;0<=o;o--){var i=r[o];t:{for(var a=n.Ca,s=0;s<a.length;s++){var l=a[s];if(i.P[l]!==n.R[l]){a=!1;break t}}a=!0}if(a){r=i;break e}}r=void 0}a=r?r.styleElement:null,o=n.L,(i=r&&r.L)||(i=t+"-"+(i=this.ea[t]=(this.ea[t]||0)+1)),n.L=i,i=n.L,s=ds,s=a?a.textContent||"":cs(s,e,n.R,i);var c=(l=Za(e)).g;c&&!oa&&c!==a&&(c._useCount--,0>=c._useCount&&c.parentNode&&c.parentNode.removeChild(c)),oa?l.g?(l.g.textContent=s,a=l.g):s&&(a=ga(s,i,e.shadowRoot,l.h)):a?a.parentNode||(ns&&-1<s.indexOf("@media")&&(a.textContent=s),wa(a,null,l.h)):s&&(a=ga(s,i,null,l.h)),a&&(a._useCount=a._useCount||0,l.g!=a&&a._useCount++,l.g=a),i=a,oa||(a=n.L,l=s=e.getAttribute("class")||"",o&&(l=s.replace(new RegExp("\\s*x-scope\\s*"+o+"\\s*","g")," ")),s!==(l+=(l?" ":"")+"x-scope "+a)&&Ca(e,l)),r||Ds.store(t,n.R,i,n.L)}},t.styleDocument=function(e){this.styleSubtree(this.i,e)},t.styleSubtree=function(e,t){var n=Ta(e),r=n.shadowRoot,o=e===this.i;if((r||o)&&this.styleElement(e,t),e=o?n:r)for(e=Array.from(e.querySelectorAll("*")).filter(function(e){return Ta(e).shadowRoot}),t=0;t<e.length;t++)this.styleSubtree(e[t])},t.Qa=function(e){var t=this,n=xa(e);if(n!==this.u.cssBuild&&(this.u.cssBuild=n),!Da(n)){var r=ma(e);ya(r,function(e){if(oa)Ba(e);else{var r=$a;e.selector=e.parsedSelector,Ba(e),e.selector=e.G=Ia(r,e,r.i,void 0,void 0)}sa&&""===n&&(Ls(t),t.h&&t.h.transformRule(e))}),sa?e.textContent=_a(r):this.u.M.rules.push(r)}},t.getComputedStyleValue=function(e,t){var n;return sa||(n=(Za(e)||Za(Rs(this,e))).R[t]),(n=n||window.getComputedStyle(e).getPropertyValue(t))?n.trim():""},t.pb=function(e,t){var n=Ta(e).getRootNode();if(t=t?("string"==typeof t?t:String(t)).split(/\s/):[],!(n=n.host&&n.host.localName)){var r=e.getAttribute("class");if(r){r=r.split(/\s/);for(var o=0;o<r.length;o++)if(r[o]===$a.g){n=r[o+1];break}}}n&&t.push($a.g,n),sa||(n=Za(e))&&n.L&&t.push(ds.g,n.L),Ca(e,t.join(" "))},t.Xa=function(e){return Za(e)},t.ob=function(e,t){La(e,t)},t.rb=function(e,t){La(e,t,!0)},t.nb=function(e){return bs(e)},t.$a=function(e){return gs(e)},Ms.prototype.flush=Ms.prototype.flush,Ms.prototype.prepareTemplate=Ms.prototype.prepareTemplate,Ms.prototype.styleElement=Ms.prototype.styleElement,Ms.prototype.styleDocument=Ms.prototype.styleDocument,Ms.prototype.styleSubtree=Ms.prototype.styleSubtree,Ms.prototype.getComputedStyleValue=Ms.prototype.getComputedStyleValue,Ms.prototype.setElementClass=Ms.prototype.pb,Ms.prototype._styleInfoForNode=Ms.prototype.Xa,Ms.prototype.transformCustomStyleForDocument=Ms.prototype.Qa,Ms.prototype.getStyleAst=Ms.prototype.bb,Ms.prototype.styleAstToString=Ms.prototype.qb,Ms.prototype.flushCustomStyles=Ms.prototype.flushCustomStyles,Ms.prototype.scopeNode=Ms.prototype.ob,Ms.prototype.unscopeNode=Ms.prototype.rb,Ms.prototype.scopeForNode=Ms.prototype.nb,Ms.prototype.currentScopeForNode=Ms.prototype.$a,Ms.prototype.prepareAdoptedCssText=Ms.prototype.kb,Object.defineProperties(Ms.prototype,{nativeShadow:{get:function(){return oa}},nativeCss:{get:function(){return sa}}});var Fs,Is,Hs=new Ms;window.ShadyCSS&&(Fs=window.ShadyCSS.ApplyShim,Is=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:Hs,prepareTemplate:function(e,t,n){Hs.flushCustomStyles(),Hs.prepareTemplate(e,t,n)},prepareTemplateDom:function(e,t){Hs.prepareTemplateDom(e,t)},prepareTemplateStyles:function(e,t,n){Hs.flushCustomStyles(),Hs.prepareTemplateStyles(e,t,n)},styleSubtree:function(e,t){Hs.flushCustomStyles(),Hs.styleSubtree(e,t)},styleElement:function(e){Hs.flushCustomStyles(),Hs.styleElement(e)},styleDocument:function(e){Hs.flushCustomStyles(),Hs.styleDocument(e)},flushCustomStyles:function(){Hs.flushCustomStyles()},getComputedStyleValue:function(e,t){return Hs.getComputedStyleValue(e,t)},nativeCss:sa,nativeShadow:oa,cssBuild:Vi,disableRuntime:aa},Fs&&(window.ShadyCSS.ApplyShim=Fs),Is&&(window.ShadyCSS.CustomStyleInterface=Is),function(e){function t(e){return""==e&&(i.call(this),this.m=!0),e.toLowerCase()}function n(e){var t=e.charCodeAt(0);return 32<t&&127>t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function r(e){var t=e.charCodeAt(0);return 32<t&&127>t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function o(e,o,a){function s(e){v.push(e)}var l=o||"scheme start",f=0,p="",_=!1,m=!1,v=[];e:for(;(null!=e[f-1]||0==f)&&!this.m;){var y=e[f];switch(l){case"scheme start":if(!y||!h.test(y)){if(o){s("Invalid scheme.");break e}p="",l="no scheme";continue}p+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&d.test(y))p+=y.toLowerCase();else{if(":"!=y){if(o){null!=y&&s("Code point not allowed in scheme: "+y);break e}p="",f=0,l="no scheme";continue}if(this.l=p,p="",o)break e;void 0!==c[this.l]&&(this.H=!0),l="file"==this.l?"relative":this.H&&a&&a.l==this.l?"relative or authority":this.H?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this.A="?",l="query"):"#"==y?(this.C="#",l="fragment"):null!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this.ya+=n(y));break;case"no scheme":if(a&&void 0!==c[a.l]){l="relative";continue}s("Missing scheme."),i.call(this),this.m=!0;break;case"relative or authority":if("/"!=y||"/"!=e[f+1]){s("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this.H=!0,"file"!=this.l&&(this.l=a.l),null==y){this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A=a.A,this.B=a.B,this.j=a.j;break e}if("/"==y||"\\"==y)"\\"==y&&s("\\ is an invalid code point."),l="relative slash";else if("?"==y)this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A="?",this.B=a.B,this.j=a.j,l="query";else{if("#"!=y){l=e[f+1];var g=e[f+2];("file"!=this.l||!h.test(y)||":"!=l&&"|"!=l||null!=g&&"/"!=g&&"\\"!=g&&"?"!=g&&"#"!=g)&&(this.o=a.o,this.v=a.v,this.B=a.B,this.j=a.j,this.s=a.s.slice(),this.s.pop()),l="relative path";continue}this.o=a.o,this.v=a.v,this.s=a.s.slice(),this.A=a.A,this.C="#",this.B=a.B,this.j=a.j,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this.l&&(this.o=a.o,this.v=a.v,this.B=a.B,this.j=a.j),l="relative path";continue}"\\"==y&&s("\\ is an invalid code point."),l="file"==this.l?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){s("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){s("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}s("Expected authority, got: "+y);break;case"authority":if("@"==y){for(_&&(s("@ already seen."),p+="%40"),_=!0,y=0;y<p.length;y++)"\t"==(g=p[y])||"\n"==g||"\r"==g?s("Invalid whitespace in authority."):":"==g&&null===this.j?this.j="":(g=n(g),null!==this.j?this.j+=g:this.B+=g);p=""}else{if(null==y||"/"==y||"\\"==y||"?"==y||"#"==y){f-=p.length,p="",l="host";continue}p+=y}break;case"file host":if(null==y||"/"==y||"\\"==y||"?"==y||"#"==y){2!=p.length||!h.test(p[0])||":"!=p[1]&&"|"!=p[1]?(0!=p.length&&(this.o=t.call(this,p),p=""),l="relative path start"):l="relative path";continue}"\t"==y||"\n"==y||"\r"==y?s("Invalid whitespace in file host."):p+=y;break;case"host":case"hostname":if(":"!=y||m){if(null==y||"/"==y||"\\"==y||"?"==y||"#"==y){if(this.o=t.call(this,p),p="",l="relative path start",o)break e;continue}"\t"!=y&&"\n"!=y&&"\r"!=y?("["==y?m=!0:"]"==y&&(m=!1),p+=y):s("Invalid code point in host/hostname: "+y)}else if(this.o=t.call(this,p),p="",l="port","hostname"==o)break e;break;case"port":if(/[0-9]/.test(y))p+=y;else{if(null==y||"/"==y||"\\"==y||"?"==y||"#"==y||o){if(""!=p&&((p=parseInt(p,10))!=c[this.l]&&(this.v=p+""),p=""),o)break e;l="relative path start";continue}"\t"==y||"\n"==y||"\r"==y?s("Invalid code point in port: "+y):(i.call(this),this.m=!0)}break;case"relative path start":if("\\"==y&&s("'\\' not allowed in path."),l="relative path","/"!=y&&"\\"!=y)continue;break;case"relative path":null!=y&&"/"!=y&&"\\"!=y&&(o||"?"!=y&&"#"!=y)?"\t"!=y&&"\n"!=y&&"\r"!=y&&(p+=n(y)):("\\"==y&&s("\\ not allowed in relative path."),(g=u[p.toLowerCase()])&&(p=g),".."==p?(this.s.pop(),"/"!=y&&"\\"!=y&&this.s.push("")):"."==p&&"/"!=y&&"\\"!=y?this.s.push(""):"."!=p&&("file"==this.l&&0==this.s.length&&2==p.length&&h.test(p[0])&&"|"==p[1]&&(p=p[0]+":"),this.s.push(p)),p="","?"==y?(this.A="?",l="query"):"#"==y&&(this.C="#",l="fragment"));break;case"query":o||"#"!=y?null!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this.A+=r(y)):(this.C="#",l="fragment");break;case"fragment":null!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this.C+=y)}f++}}function i(){this.B=this.ya=this.l="",this.j=null,this.v=this.o="",this.s=[],this.C=this.A="",this.H=this.m=!1}function a(e,t){void 0===t||t instanceof a||(t=new a(String(t))),this.g=e,i.call(this),o.call(this,this.g.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,""),null,t)}var s=!1;try{var l=new URL("b","http://a");l.pathname="c%20d",s="http://a/c%20d"===l.href}catch(e){}if(!s){var c=Object.create(null);c.ftp=21,c.file=0,c.gopher=70,c.http=80,c.https=443,c.ws=80,c.wss=443;var u=Object.create(null);u["%2e"]=".",u[".%2e"]="..",u["%2e."]="..",u["%2e%2e"]="..";var h=/[a-zA-Z]/,d=/[a-zA-Z0-9+\-.]/;a.prototype={toString:function(){return this.href},get href(){if(this.m)return this.g;var e="";return""==this.B&&null==this.j||(e=this.B+(null!=this.j?":"+this.j:"")+"@"),this.protocol+(this.H?"//"+e+this.host:"")+this.pathname+this.A+this.C},set href(e){i.call(this),o.call(this,e)},get protocol(){return this.l+":"},set protocol(e){this.m||o.call(this,e+":","scheme start")},get host(){return this.m?"":this.v?this.o+":"+this.v:this.o},set host(e){!this.m&&this.H&&o.call(this,e,"host")},get hostname(){return this.o},set hostname(e){!this.m&&this.H&&o.call(this,e,"hostname")},get port(){return this.v},set port(e){!this.m&&this.H&&o.call(this,e,"port")},get pathname(){return this.m?"":this.H?"/"+this.s.join("/"):this.ya},set pathname(e){!this.m&&this.H&&(this.s=[],o.call(this,e,"relative path start"))},get search(){return this.m||!this.A||"?"==this.A?"":this.A},set search(e){!this.m&&this.H&&(this.A="?","?"==e[0]&&(e=e.slice(1)),o.call(this,e,"query"))},get hash(){return this.m||!this.C||"#"==this.C?"":this.C},set hash(e){this.m||(e?(this.C="#","#"==e[0]&&(e=e.slice(1)),o.call(this,e,"fragment")):this.C="")},get origin(){var e;if(this.m||!this.l)return"";switch(this.l){case"data":case"file":case"javascript":case"mailto":return"null"}return(e=this.host)?this.l+"://"+e:""}};var f=e.URL;f&&(a.createObjectURL=function(e){return f.createObjectURL.apply(f,arguments)},a.revokeObjectURL=function(e){f.revokeObjectURL(e)}),e.URL=a}}(window);var Us=window.customElements,Bs=!1,Ws=null;function qs(){window.HTMLTemplateElement.bootstrap&&window.HTMLTemplateElement.bootstrap(window.document),Ws&&Ws(),Bs=!0,window.WebComponents.ready=!0,document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))}Us.polyfillWrapFlushCallback&&Us.polyfillWrapFlushCallback(function(e){Ws=e,Bs&&e()}),"complete"!==document.readyState?(window.addEventListener("load",qs),window.addEventListener("DOMContentLoaded",function(){window.removeEventListener("load",qs),qs()})):qs()}.call(r));const o=new WeakMap,i=new WeakMap;function a(e){const t=o.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function s(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function l(e,t){o.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=Object.keys(t);for(let e=0;e<n.length;++e){const t=n[e];t in this||Object.defineProperty(this,t,c(t))}}function c(e){return{get(){return a(this).event[e]},set(t){a(this).event[e]=t},configurable:!0,enumerable:!0}}function u(e){return{value(){const t=a(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}function h(e){if(null==e||e===Object.prototype)return l;let t=i.get(e);return null==t&&(t=function(e,t){const n=Object.keys(t);if(0===n.length)return e;function r(t,n){e.call(this,t,n)}r.prototype=Object.create(e.prototype,{constructor:{value:r,configurable:!0,writable:!0}});for(let o=0;o<n.length;++o){const i=n[o];if(!(i in e.prototype)){const e="function"==typeof Object.getOwnPropertyDescriptor(t,i).value;Object.defineProperty(r.prototype,i,e?u(i):c(i))}}return r}(h(Object.getPrototypeOf(e)),e),i.set(e,t)),t}function d(e){return a(e).immediateStopped}function f(e,t){a(e).passiveListener=t}l.prototype={get type(){return a(this).event.type},get target(){return a(this).eventTarget},get currentTarget(){return a(this).currentTarget},composedPath(){const e=a(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return a(this).eventPhase},stopPropagation(){const e=a(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){const e=a(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return Boolean(a(this).event.bubbles)},get cancelable(){return Boolean(a(this).event.cancelable)},preventDefault(){s(a(this))},get defaultPrevented(){return a(this).canceled},get composed(){return Boolean(a(this).event.composed)},get timeStamp(){return a(this).timeStamp},get srcElement(){return a(this).eventTarget},get cancelBubble(){return a(this).stopped},set cancelBubble(e){if(!e)return;const t=a(this);t.stopped=!0,"boolean"==typeof t.event.cancelBubble&&(t.event.cancelBubble=!0)},get returnValue(){return!a(this).canceled},set returnValue(e){e||s(a(this))},initEvent(){}},Object.defineProperty(l.prototype,"constructor",{value:l,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(l.prototype,window.Event.prototype),i.set(window.Event.prototype,l));const p=new WeakMap;function _(e){return null!==e&&"object"==typeof e}function m(e){const t=p.get(e);if(null==t)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return t}function v(e,t){Object.defineProperty(e,`on${t}`,function(e){return{get(){let t=m(this).get(e);for(;null!=t;){if(3===t.listenerType)return t.listener;t=t.next}return null},set(t){"function"==typeof t||_(t)||(t=null);const n=m(this);let r=null,o=n.get(e);for(;null!=o;)3===o.listenerType?null!==r?r.next=o.next:null!==o.next?n.set(e,o.next):n.delete(e):r=o,o=o.next;if(null!==t){const o={listener:t,listenerType:3,passive:!1,once:!1,next:null};null===r?n.set(e,o):r.next=o}},configurable:!0,enumerable:!0}}(t))}function y(e){function t(){g.call(this)}t.prototype=Object.create(g.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let n=0;n<e.length;++n)v(t.prototype,e[n]);return t}function g(){if(!(this instanceof g)){if(1===arguments.length&&Array.isArray(arguments[0]))return y(arguments[0]);if(arguments.length>0){const e=new Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return y(e)}throw new TypeError("Cannot call a class as a function")}p.set(this,new Map)}g.prototype={addEventListener(e,t,n){if(null==t)return;if("function"!=typeof t&&!_(t))throw new TypeError("'listener' should be a function or an object.");const r=m(this),o=_(n),i=(o?Boolean(n.capture):Boolean(n))?1:2,a={listener:t,listenerType:i,passive:o&&Boolean(n.passive),once:o&&Boolean(n.once),next:null};let s=r.get(e);if(void 0===s)return void r.set(e,a);let l=null;for(;null!=s;){if(s.listener===t&&s.listenerType===i)return;l=s,s=s.next}l.next=a},removeEventListener(e,t,n){if(null==t)return;const r=m(this),o=(_(n)?Boolean(n.capture):Boolean(n))?1:2;let i=null,a=r.get(e);for(;null!=a;){if(a.listener===t&&a.listenerType===o)return void(null!==i?i.next=a.next:null!==a.next?r.set(e,a.next):r.delete(e));i=a,a=a.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw new TypeError('"event.type" should be a string.');const t=m(this),n=e.type;let r=t.get(n);if(null==r)return!0;const o=function(e,t){return new(h(Object.getPrototypeOf(t)))(e,t)}(this,e);let i=null;for(;null!=r;){if(r.once?null!==i?i.next=r.next:null!==r.next?t.set(n,r.next):t.delete(n):i=r,f(o,r.passive?r.listener:null),"function"==typeof r.listener)try{r.listener.call(this,o)}catch(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}else 3!==r.listenerType&&"function"==typeof r.listener.handleEvent&&r.listener.handleEvent(o);if(d(o))break;r=r.next}return f(o,null),function(e,t){a(e).eventPhase=t}(o,0),function(e,t){a(e).currentTarget=t}(o,null),!o.defaultPrevented}},Object.defineProperty(g.prototype,"constructor",{value:g,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(g.prototype,window.EventTarget.prototype);class b extends g{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=E.get(this);if("boolean"!=typeof e)throw new TypeError("Expected 'this' to be an 'AbortSignal' object, but got "+(null===this?"null":typeof this));return e}}v(b.prototype,"abort");const E=new WeakMap;Object.defineProperties(b.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(b.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class w{constructor(){N.set(this,function(){const e=Object.create(b.prototype);return g.call(e),E.set(e,!1),e}())}get signal(){return S(this)}abort(){var e;e=S(this),!1===E.get(e)&&(E.set(e,!0),e.dispatchEvent({type:"abort"}))}}const N=new WeakMap;function S(e){const t=N.get(e);if(null==t)throw new TypeError("Expected 'this' to be an 'AbortController' object, but got "+(null===e?"null":typeof e));return t}Object.defineProperties(w.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(w.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});const C="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;C&&(void 0===C.AbortController&&(C.AbortController=w),void 0===C.AbortSignal&&(C.AbortSignal=b));var T,O={};T||(T=1,function(e){var t=function(){try{return!!Symbol.iterator}catch(e){return!1}}(),n=function(e){var n={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return t&&(n[Symbol.iterator]=function(){return n}),n},r=function(e){return encodeURIComponent(e).replace(/%20/g,"+")},o=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};(function(){try{var t=e.URLSearchParams;return"a=1"===new t("?a=1").toString()&&"function"==typeof t.prototype.set&&"function"==typeof t.prototype.entries}catch(t){return!1}})()||function(){var o=function(e){Object.defineProperty(this,"_entries",{writable:!0,value:{}});var t=typeof e;if("undefined"===t);else if("string"===t)""!==e&&this._fromString(e);else if(e instanceof o){var n=this;e.forEach(function(e,t){n.append(t,e)})}else{if(null===e||"object"!==t)throw new TypeError("Unsupported input's type for URLSearchParams");if("[object Array]"===Object.prototype.toString.call(e))for(var r=0;r<e.length;r++){var i=e[r];if("[object Array]"!==Object.prototype.toString.call(i)&&2===i.length)throw new TypeError("Expected [string, any] as entry at index "+r+" of URLSearchParams's input");this.append(i[0],i[1])}else for(var a in e)e.hasOwnProperty(a)&&this.append(a,e[a])}},i=o.prototype;i.append=function(e,t){e in this._entries?this._entries[e].push(String(t)):this._entries[e]=[String(t)]},i.delete=function(e){delete this._entries[e]},i.get=function(e){return e in this._entries?this._entries[e][0]:null},i.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]},i.has=function(e){return e in this._entries},i.set=function(e,t){this._entries[e]=[String(t)]},i.forEach=function(e,t){var n;for(var r in this._entries)if(this._entries.hasOwnProperty(r)){n=this._entries[r];for(var o=0;o<n.length;o++)e.call(t,n[o],r,this)}},i.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),n(e)},i.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},i.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),n(e)},t&&(i[Symbol.iterator]=i.entries),i.toString=function(){var e=[];return this.forEach(function(t,n){e.push(r(n)+"="+r(t))}),e.join("&")},Object.defineProperty(i,"size",{get:function(){return this._entries?Object.keys(this._entries).length:0}}),e.URLSearchParams=o}();var i=e.URLSearchParams.prototype;"function"!=typeof i.sort&&(i.sort=function(){var e=this,t=[];this.forEach(function(n,r){t.push([r,n]),e._entries||e.delete(r)}),t.sort(function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:0}),e._entries&&(e._entries={});for(var n=0;n<t.length;n++)this.append(t[n][0],t[n][1])}),"function"!=typeof i._fromString&&Object.defineProperty(i,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(e){if(this._entries)this._entries={};else{var t=[];this.forEach(function(e,n){t.push(n)});for(var n=0;n<t.length;n++)this.delete(t[n])}var r,i=(e=e.replace(/^\?/,"")).split("&");for(n=0;n<i.length;n++)r=i[n].split("="),this.append(o(r[0]),r.length>1?o(r.slice(1).join("=")):"")}})}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:O),function(e){if(function(){try{var t=new e.URL("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&t.searchParams}catch(t){return!1}}()||function(){var t=e.URL,n=function(t,n){"string"!=typeof t&&(t=String(t)),n&&"string"!=typeof n&&(n=String(n));var r,o=document;if(n&&(void 0===e.location||n!==e.location.href)){!!window.MSInputMethodContext&&!!document.documentMode&&(n=n.toLowerCase()),(r=(o=document.implementation.createHTMLDocument("")).createElement("base")).href=n,o.head.appendChild(r);try{if(0!==r.href.indexOf(n))throw new Error(r.href)}catch(t){throw new Error("URL unable to set base "+n+" due to "+t)}}var i=o.createElement("a");i.href=t,r&&(o.body.appendChild(i),i.href=i.href);var a=o.createElement("input");if(a.type="url",a.value=t,":"===i.protocol||!/:/.test(i.href)||!a.checkValidity()&&!n)throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:i});var s=new e.URLSearchParams(this.search),l=!0,c=!0,u=this;["append","delete","set"].forEach(function(e){var t=s[e];s[e]=function(){t.apply(s,arguments),l&&(c=!1,u.search=s.toString(),c=!0)}}),Object.defineProperty(this,"searchParams",{value:s,enumerable:!0});var h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==h&&(h=this.search,c&&(l=!1,this.searchParams._fromString(this.search),l=!0))}})},r=n.prototype;["hash","host","hostname","port","protocol"].forEach(function(e){!function(e){Object.defineProperty(r,e,{get:function(){return this._anchorElement[e]},set:function(t){this._anchorElement[e]=t},enumerable:!0})}(e)}),Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(e){this._anchorElement.search=e,this._updateSearchParams()},enumerable:!0}),Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e,this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:!0},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=e&&""!==this._anchorElement.port;return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(e){},enumerable:!0},username:{get:function(){return""},set:function(e){},enumerable:!0}}),n.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)},n.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)},e.URL=n}(),void 0!==e.location&&!("origin"in e.location)){var t=function(){return e.location.protocol+"//"+e.location.hostname+(e.location.port?":"+e.location.port:"")};try{Object.defineProperty(e.location,"origin",{get:t,enumerable:!0})}catch(n){setInterval(function(){e.location.origin=t()},100)}}}(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:O));(()=>{if("undefined"!=typeof globalThis)return;const e="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")();Object.defineProperty(e,"globalThis",{value:e,writable:!0,enumerable:!1,configurable:!0})})(),"undefined"!=typeof Element&&"function"!=typeof Element.prototype.getAttributeNames&&(Element.prototype.getAttributeNames=function(){const e=this.attributes,t=new Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=e[n].name;return t});const P=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var x,D,M,A,L,j,R,k,F,I,H,U,B=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},W=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};const q={__proto__:null,enumerable:!0};Object.freeze(q);const G=(I=class{constructor(e,t={}){if(x.set(this,!1),D.set(this,!1),M.set(this,!1),A.set(this,!1),L.set(this,Date.now()),j.set(this,!1),R.set(this,void 0),k.set(this,void 0),F.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,0===arguments.length)throw new Error("The type argument must be specified");if("object"!=typeof t||!t)throw new Error('The "options" argument must be an object');const{bubbles:n,cancelable:r,composed:o}=t;B(this,x,!!r,"f"),B(this,D,!!n,"f"),B(this,M,!!o,"f"),B(this,R,`${e}`,"f"),B(this,k,null,"f"),B(this,F,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){B(this,A,!0,"f")}get target(){return W(this,k,"f")}get currentTarget(){return W(this,k,"f")}get srcElement(){return W(this,k,"f")}get type(){return W(this,R,"f")}get cancelable(){return W(this,x,"f")}get defaultPrevented(){return W(this,x,"f")&&W(this,A,"f")}get timeStamp(){return W(this,L,"f")}composedPath(){return W(this,F,"f")?[W(this,k,"f")]:[]}get returnValue(){return!W(this,x,"f")||!W(this,A,"f")}get bubbles(){return W(this,D,"f")}get composed(){return W(this,M,"f")}get eventPhase(){return W(this,F,"f")?I.AT_TARGET:I.NONE}get cancelBubble(){return W(this,j,"f")}set cancelBubble(e){e&&B(this,j,!0,"f")}stopPropagation(){B(this,j,!0,"f")}get isTrusted(){return!1}},x=new WeakMap,D=new WeakMap,M=new WeakMap,A=new WeakMap,L=new WeakMap,j=new WeakMap,R=new WeakMap,k=new WeakMap,F=new WeakMap,I.NONE=0,I.CAPTURING_PHASE=1,I.AT_TARGET=2,I.BUBBLING_PHASE=3,I);Object.defineProperties(G.prototype,{initEvent:q,stopImmediatePropagation:q,preventDefault:q,target:q,currentTarget:q,srcElement:q,type:q,cancelable:q,defaultPrevented:q,timeStamp:q,composedPath:q,returnValue:q,bubbles:q,composed:q,eventPhase:q,cancelBubble:q,stopPropagation:q,isTrusted:q});const V=(U=class extends G{constructor(e,t={}){super(e,t),H.set(this,void 0),B(this,H,t?.detail??null,"f")}initCustomEvent(e,t,n,r){throw new Error("Method not implemented.")}get detail(){return W(this,H,"f")}},H=new WeakMap,U);Object.defineProperties(V.prototype,{detail:q});const z=G,K=V;var X;(X=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}}).STYLE_RULE=1,X.CHARSET_RULE=2,X.IMPORT_RULE=3,X.MEDIA_RULE=4,X.FONT_FACE_RULE=5,X.PAGE_RULE=6,X.NAMESPACE_RULE=10,X.KEYFRAMES_RULE=7,X.KEYFRAME_RULE=8,X.SUPPORTS_RULE=12,X.COUNTER_STYLE_RULE=11,X.FONT_FEATURE_VALUES_RULE=14,X.MARGIN_RULE=9;globalThis.Event??=z,globalThis.CustomEvent??=K;const Y=Symbol(),$=e=>"boolean"==typeof e?e:e?.capture??!1,J={__proto__:null,enumerable:!0};Object.freeze(J);class Z{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(null==t)return;const r=$(n)?this.__captureEventListeners:this.__eventListeners;let o=r.get(e);if(void 0===o)o=new Map,r.set(e,o);else if(o.has(t))return;const i="object"==typeof n&&n?n:{};i.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),o.set(t,i??{})}removeEventListener(e,t,n){if(null==t)return;const r=$(n)?this.__captureEventListeners:this.__eventListeners,o=r.get(e);void 0!==o&&(o.delete(t),o.size||r.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,r=!1,o=z.NONE,i=null,a=null,s=null;const l=e.stopPropagation,c=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get:()=>i??a,...J},srcElement:{get:()=>e.target,...J},currentTarget:{get:()=>s,...J},eventPhase:{get:()=>o,...J},composedPath:{value:()=>t,...J},stopPropagation:{value:()=>{n=!0,l.call(e)},...J},stopImmediatePropagation:{value:()=>{r=!0,c.call(e)},...J}});const u=(t,n,r)=>{"function"==typeof t?t(e):"function"==typeof t?.handleEvent&&t.handleEvent(e),n.once&&r.delete(t)},h=()=>(s=null,o=z.NONE,!e.defaultPrevented),d=t.slice().reverse();i=this.__host&&e.composed?null:this;const f=e=>{for(a=this;a.__host&&e.includes(a.__host);)a=a.__host};for(const t of d){i||a&&a!==t.__host||f(d.slice(d.indexOf(t))),s=t,o=t===e.target?z.AT_TARGET:z.CAPTURING_PHASE;const l=t.__captureEventListeners.get(e.type);if(l)for(const[e,t]of l)if(u(e,t,l),r)return h();if(n)return h()}const p=e.bubbles?t:[this];a=null;for(const t of p){i||a&&t!==a.__host||f(p.slice(0,p.indexOf(t)+1)),s=t,o=t===e.target?z.AT_TARGET:z.BUBBLING_PHASE;const l=t.__eventListeners.get(e.type);if(l)for(const[e,t]of l)if(u(e,t,l),r)return h();if(n)return h()}return h()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,re,de]}}const Q=new WeakMap,ee=e=>{let t=Q.get(e);return void 0===t&&Q.set(e,t=new Map),t},te=class extends Z{getRootNode(e){if(e?.composed)return oe;const t=this.__host;return t?.__shadowRoot??oe}},ne=class extends te{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}},re=new ne,oe=re,ie=class extends te{constructor(e){if(super(),e!==Y)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ue,customElements:he,document:oe,Document:ne,Element:ae,EventTarget:Z,HTMLElement:se,Node:te,ShadowRoot:ce,window:this,Window:ie})}},ae=class extends te{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(ee(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return"closed"===this.__shadowRootMode?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){ee(this).set(e,String(t))}removeAttribute(e){ee(this).delete(e)}toggleAttribute(e,t){return this.hasAttribute(e)?!(void 0===t||!t)||(this.removeAttribute(e),!1):!(void 0!==t&&!t)&&(this.setAttribute(e,""),!0)}hasAttribute(e){return ee(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;const t=new ce(Y,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(null!==this.__internals)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");const e=new P(this);return this.__internals=e,e}getAttribute(e){return ee(this).get(e)??null}},se=class extends ae{},le=se,ce=class extends te{get host(){return this.__host}constructor(e,t){if(super(),e!=e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new le,"localName",{get:()=>"lit-server-root"});class ue{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e)){if("development"!==process.env.NODE_ENV)throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.\nMake sure to test your application with a production build as repeat registrations will throw in production.`)}if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e)}get(e){const t=this.__definitions.get(e);return t?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){const t=this.__definitions.get(e);if(t)return t.ctor;let n=this.__pendingWhenDefineds.get(e);return n||(n=function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}(),this.__pendingWhenDefineds.set(e,n)),n.promise}}const he=new ue,de=new ie(Y);"undefined"==typeof HTMLElement&&(globalThis.HTMLElement=le);
|