UNPKG

@webcomponents/webcomponentsjs

Version:
129 lines (126 loc) 96.1 kB
/** @license @nocompile Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 'use strict';var n;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function p(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function r(a){if(!(a instanceof Array)){a=p(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a} function ba(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];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 ca=ba(this);function da(){}da.prototype.toJSON=function(){return{}};function t(a){a.__shady||(a.__shady=new da);return a.__shady}function u(a){return a&&a.__shady};var w=window.ShadyDOM||{};w.Ka=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ea=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");w.j=!!(ea&&ea.configurable&&ea.get);w.ka=w.force||!w.Ka;w.s=w.noPatch||!1;w.R=w.preferPerformance;w.ma="on-demand"===w.s;var fa;var ha=w.querySelectorImplementation;fa=-1<["native","selectorEngine"].indexOf(ha)?ha:void 0;w.$a=fa;w.za=navigator.userAgent.match("Trident"); function ia(){return Document.prototype.msElementsFromPoint?"msElementsFromPoint":"elementsFromPoint"}function x(a){return(a=u(a))&&void 0!==a.firstChild}function y(a){return a instanceof ShadowRoot}function ja(a){return(a=(a=u(a))&&a.root)&&ka(a)}var la=Element.prototype,ma=la.matches||la.matchesSelector||la.mozMatchesSelector||la.msMatchesSelector||la.oMatchesSelector||la.webkitMatchesSelector,na=document.createTextNode(""),oa=0,pa=[]; (new MutationObserver(function(){for(;pa.length;)try{pa.shift()()}catch(a){throw na.textContent=oa++,a;}})).observe(na,{characterData:!0});function qa(a){pa.push(a);na.textContent=oa++}var ra=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 sa(a,b){for(;b;){if(b==a)return!0;b=b.__shady_parentNode}return!1} function ta(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=p(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 ua(a){var b=[];for(a=a.__shady_native_firstChild;a;a=a.__shady_native_nextSibling)b.push(a);return b} function va(a){var b=[];for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling)b.push(a);return b}function wa(a,b,c){c.configurable=!0;if(c.value)a[b]=c.value;else try{Object.defineProperty(a,b,c)}catch(d){}}function z(a,b,c,d){c=void 0===c?"":c;for(var e in b)d&&0<=d.indexOf(e)||wa(a,c+e,b[e])}function xa(a,b){for(var c in b)c in a&&wa(a,c,b[c])}function A(a){var b={};Object.getOwnPropertyNames(a).forEach(function(c){b[c]=Object.getOwnPropertyDescriptor(a,c)});return b} function ya(a,b){for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length;d++)e=c[d],a[e]=b[e]}function za(a){return a instanceof Node?a:document.createTextNode(""+a)}function Aa(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];if(1===b.length)return za(b[0]);c=document.createDocumentFragment();b=p(b);for(var d=b.next();!d.done;d=b.next())c.appendChild(za(d.value));return c} function Ba(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,r(d)):c.push(d);return c},[]);return a}function Ca(a){var b=[],c=new Set;a=p(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 Da=[],Ea;function Fa(a){Ea||(Ea=!0,qa(Ga));Da.push(a)}function Ga(){Ea=!1;for(var a=!!Da.length;Da.length;)Da.shift()();return a}Ga.list=Da;function Ha(){this.g=!1;this.addedNodes=[];this.removedNodes=[];this.aa=new Set}function Ia(a){a.g||(a.g=!0,qa(function(){a.flush()}))}Ha.prototype.flush=function(){if(this.g){this.g=!1;var a=this.takeRecords();a.length&&this.aa.forEach(function(b){b(a)})}};Ha.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]}; function Ja(a,b){var c=t(a);c.P||(c.P=new Ha);c.P.aa.add(b);var d=c.P;return{Da:b,J:d,Ea:a,takeRecords:function(){return d.takeRecords()}}}function Ka(a){var b=a&&a.J;b&&(b.aa.delete(a.Da),b.aa.size||(t(a.Ea).P=null))} function La(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 Ma=/[&\u00A0"]/g,Na=/[&\u00A0<>]/g;function Oa(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function Pa(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var Qa=Pa("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Ra=Pa("style script xmp iframe noembed noframes plaintext noscript".split(" ")); function Sa(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,v=0,T;T=q[v];v++)m+=" "+T.name+'="'+T.value.replace(Ma,Oa)+'"';m+=">";h=Qa[k]?m:m+Sa(h,l)+"</"+k+">";break a;case Node.TEXT_NODE:h=h.data;h=k&&Ra[k.localName]?h:h.replace(Na,Oa);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), Error("not implemented");}}c+=h}return c};var Ta=w.j,Ua={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},Va={};function Wa(a){Va[a]=function(b){return b["__shady_native_"+a]}}function Xa(a,b){z(a,b,"__shady_native_");for(var c in b)Wa(c)}function B(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?Ua[d]||(Ua[d]=e.value):Wa(d))}} var C=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),D=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1),Ya=document.implementation.createHTMLDocument("inert");function Za(a){for(var b;b=a.__shady_native_firstChild;)a.__shady_native_removeChild(b)}var $a=["firstElementChild","lastElementChild","children","childElementCount"],ab=["querySelector","querySelectorAll","append","prepend","replaceChildren"]; function bb(){var a=["dispatchEvent","addEventListener","removeEventListener"];window.EventTarget?(B(window.EventTarget.prototype,a),void 0===window.__shady_native_addEventListener&&B(Window.prototype,a)):(B(Node.prototype,a),B(Window.prototype,a),B(XMLHttpRequest.prototype,a));Ta?B(Node.prototype,"parentNode firstChild lastChild previousSibling nextSibling childNodes parentElement textContent".split(" ")):Xa(Node.prototype,{parentNode:{get:function(){C.currentNode=this;return C.parentNode()}},firstChild:{get:function(){C.currentNode= this;return C.firstChild()}},lastChild:{get:function(){C.currentNode=this;return C.lastChild()}},previousSibling:{get:function(){C.currentNode=this;return C.previousSibling()}},nextSibling:{get:function(){C.currentNode=this;return C.nextSibling()}},childNodes:{get:function(){var b=[];C.currentNode=this;for(var c=C.firstChild();c;)b.push(c),c=C.nextSibling();return b}},parentElement:{get:function(){D.currentNode=this;return D.parentNode()}},textContent:{get:function(){switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:for(var b= 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:Za(this);(0<b.length||this.nodeType===Node.ELEMENT_NODE)&&this.__shady_native_insertBefore(document.createTextNode(b),void 0);break;default:this.nodeValue=b}}}});B(Node.prototype,"appendChild insertBefore removeChild replaceChild cloneNode contains".split(" ")); B(HTMLElement.prototype,["parentElement","contains"]);a={firstElementChild:{get:function(){D.currentNode=this;return D.firstChild()}},lastElementChild:{get:function(){D.currentNode=this;return D.lastChild()}},children:{get:function(){var b=[];D.currentNode=this;for(var c=D.firstChild();c;)b.push(c),c=D.nextSibling();return ta(b)}},childElementCount:{get:function(){return this.children?this.children.length:0}}};Ta?(B(Element.prototype,$a),B(Element.prototype,["previousElementSibling","nextElementSibling", "innerHTML","className"]),B(HTMLElement.prototype,["children","innerHTML","className"])):(Xa(Element.prototype,a),Xa(Element.prototype,{previousElementSibling:{get:function(){D.currentNode=this;return D.previousSibling()}},nextElementSibling:{get:function(){D.currentNode=this;return D.nextSibling()}},innerHTML:{get:function(){return Sa(this,ua)},set:function(b){var c="template"===this.localName?this.content:this;Za(c);var d=this.localName||"div";d=this.namespaceURI&&this.namespaceURI!==Ya.namespaceURI? Ya.createElementNS(this.namespaceURI,d):Ya.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)}}}));B(Element.prototype,"setAttribute getAttribute hasAttribute removeAttribute toggleAttribute focus blur".split(" "));B(Element.prototype,ab);B(HTMLElement.prototype,["focus","blur"]);window.HTMLTemplateElement&& B(window.HTMLTemplateElement.prototype,["innerHTML"]);Ta?B(DocumentFragment.prototype,$a):Xa(DocumentFragment.prototype,a);B(DocumentFragment.prototype,ab);Ta?(B(Document.prototype,$a),B(Document.prototype,["activeElement"])):Xa(Document.prototype,a);B(Document.prototype,["importNode","getElementById","elementFromPoint",ia()]);B(Document.prototype,ab)};var cb=A({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}}),eb=A({get textContent(){return this.__shady_textContent},set textContent(a){this.__shady_textContent= a},get innerHTML(){return this.__shady_innerHTML},set innerHTML(a){this.__shady_innerHTML=a}}),fb=A({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= a}});function gb(a){for(var b in a){var c=a[b];c&&(c.enumerable=!1)}}gb(cb);gb(eb);gb(fb);var hb=w.j||!0===w.s,ib=hb?function(){}:function(a){var b=t(a);b.Ba||(b.Ba=!0,xa(a,fb))},jb=hb?function(){}:function(a){var b=t(a);b.Aa||(b.Aa=!0,xa(a,cb),window.customElements&&window.customElements.polyfillWrapFlushCallback&&!w.s||xa(a,eb))};var kb="__eventWrappers"+Date.now(),lb=function(){var a=Object.getOwnPropertyDescriptor(Event.prototype,"composed");return a?function(b){return a.get.call(b)}:null}(),mb=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 nb(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.G}return{xa:d,capture:b,once:c,wa:mb?a:b}} var ob={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},pb={DOMAttrModified:!0,DOMAttributeNameChanged:!0,DOMCharacterDataModified:!0,DOMElementNameChanged:!0,DOMNodeInserted:!0,DOMNodeInsertedIntoDocument:!0,DOMNodeRemoved:!0,DOMNodeRemovedFromDocument:!0,DOMSubtreeModified:!0};function qb(a){return a instanceof Node?a.__shady_getRootNode():a} function rb(a,b){var c=[],d=a;for(a=qb(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 sb(a){a.__composedPath||(a.__composedPath=rb(a.target,!0));return a.__composedPath}function tb(a,b){if(!y)return a;a=rb(a,!0);for(var c=0,d,e=void 0,f,g=void 0;c<b.length;c++)if(d=b[c],f=qb(d),f!==e&&(g=a.indexOf(f),e=f),!y(f)||-1<g)return d} var ub={get composed(){void 0===this.__composed&&(lb?this.__composed="focusin"===this.type||"focusout"===this.type||lb(this):!1!==this.isTrusted&&(this.__composed=ob[this.type]));return this.__composed||!1},composedPath:function(){this.__composedPath||(this.__composedPath=rb(this.__target,this.composed));return this.__composedPath},get target(){return tb(this.currentTarget||this.__previousCurrentTarget,this.composedPath())},get relatedTarget(){if(!this.__relatedTarget)return null;this.__relatedTargetComposedPath|| (this.__relatedTargetComposedPath=rb(this.__relatedTarget,!0));return tb(this.currentTarget||this.__previousCurrentTarget,this.__relatedTargetComposedPath)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.fa=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this);this.fa=this.__immediatePropagationStopped=!0}},vb=w.j&&Object.getOwnPropertyDescriptor(Event.prototype,"eventPhase"); vb&&(Object.defineProperty(ub,"eventPhase",{get:function(){return this.currentTarget===this.target?Event.AT_TARGET:this.__shady_native_eventPhase},enumerable:!0,configurable:!0}),Object.defineProperty(ub,"__shady_native_eventPhase",vb));function wb(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 xb={focus:!0,blur:!0};function yb(a){return a.__target!==a.target||a.__relatedTarget!==a.relatedTarget} function zb(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!yb(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.__immediatePropagationStopped);d++);}var Ab=(new Event("e")).hasOwnProperty("currentTarget"); function Bb(a){a=Ab?Object.create(a):a;var b=a.composedPath(),c=b.map(function(m){return tb(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: Event.CAPTURING_PHASE;zb(a,k,"capture");if(a.fa)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,zb(a,k,"bubble"),a.fa)break}}finally{Ab||(e?Object.defineProperty(a,"currentTarget",e):delete a.currentTarget,g?Object.defineProperty(a,"eventPhase",g):delete a.eventPhase)}}function Cb(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} function Db(a){Ga();return!w.R&&this instanceof Node&&!ra(document,this)?(a.__target||Eb(a,this),Bb(a)):this.__shady_native_dispatchEvent(a)} function Fb(a,b,c){var d=this,e=nb(c),f=e.capture,g=e.once,h=e.xa;e=e.wa;if(b){var k=typeof b;if("function"===k||"object"===k)if("object"!==k||b.handleEvent&&"function"===typeof b.handleEvent){if(pb[a])return this.__shady_native_addEventListener(a,b,e);var l=h||this;if(h=b[kb]){if(-1<Cb(h,l,a,f))return}else b[kb]=[];h=function(m){g&&d.__shady_removeEventListener(a,b,c);m.__target||Eb(m);if(l!==d){var q=Object.getOwnPropertyDescriptor(m,"currentTarget");Object.defineProperty(m,"currentTarget",{get:function(){return l}, configurable:!0});var v=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(!y(l)&&"slot"!==l.localName||-1!=m.composedPath().indexOf(l))if(m.composed||-1<m.composedPath().indexOf(l))if(yb(m)&&m.target===m.relatedTarget)m.eventPhase===Event.BUBBLING_PHASE&&m.stopImmediatePropagation();else if(m.eventPhase===Event.CAPTURING_PHASE|| m.bubbles||m.target===l||l instanceof Window){var T="function"===k?b.call(l,m):b.handleEvent&&b.handleEvent(m);l!==d&&(q?(Object.defineProperty(m,"currentTarget",q),q=null):delete m.currentTarget,v?(Object.defineProperty(m,"eventPhase",v),v=null):delete m.eventPhase);return T}};b[kb].push({node:l,type:a,capture:f,Ya:h});this.__handlers=this.__handlers||{};this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]};this.__handlers[a][f?"capture":"bubble"].push(h);xb[a]||this.__shady_native_addEventListener(a, h,e)}}}function Gb(a,b,c){if(b){var d=nb(c);c=d.capture;var e=d.xa;d=d.wa;if(pb[a])return this.__shady_native_removeEventListener(a,b,d);var f=e||this;e=void 0;var g=null;try{g=b[kb]}catch(h){}g&&(f=Cb(g,f,a,c),-1<f&&(e=g.splice(f,1)[0].Ya,g.length||(b[kb]=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))}} function Hb(){for(var a in xb)window.__shady_native_addEventListener(a,function(b){b.__target||(Eb(b),Bb(b))},!0)}var Ib=A(ub);function Eb(a,b){b=void 0===b?a.target:b;a.__target=b;a.__relatedTarget=a.relatedTarget;if(w.j){b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__shady_patchedProto")){var c=Object.create(b);c.__shady_sourceProto=b;z(c,Ib);b.__shady_patchedProto=c}a.__proto__=b.__shady_patchedProto}else z(a,Ib)}var Jb=wb(Event),Kb=wb(CustomEvent),Lb=wb(MouseEvent); function Mb(){if(!lb&&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)}} var Nb=Object.getOwnPropertyNames(Element.prototype).filter(function(a){return"on"===a.substring(0,2)}),Ob=Object.getOwnPropertyNames(HTMLElement.prototype).filter(function(a){return"on"===a.substring(0,2)});function Pb(a){return{set:function(b){var c=t(this),d=a.substring(2);c.F||(c.F={});c.F[a]&&this.removeEventListener(d,c.F[a]);this.__shady_addEventListener(d,b);c.F[a]=b},get:function(){var b=u(this);return b&&b.F&&b.F[a]},configurable:!0}};function Qb(a,b){return{index:a,S:[],Z:b}} function Rb(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&&Sb(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=Qb(e,0);f<d;)b.S.push(c[f++]);return[b]}if(f==d)return[Qb(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]= b[l-1][m-1];else{var q=b[l-1][m]+1,v=b[l][m-1]+1;b[l][m]=q<v?q:v}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=Qb(e,0));b.Z++;e++;b.S.push(c[f]);f++;break;case 2:b||(b=Qb(e,0)); b.Z++;e++;break;case 3:b||(b=Qb(e,0)),b.S.push(c[f]),f++}b&&k.push(b);return k}function Sb(a,b){return a===b};var Tb=A({dispatchEvent:Db,addEventListener:Fb,removeEventListener:Gb});var Ub=null;function E(){Ub||(Ub=window.ShadyCSS&&window.ShadyCSS.ScopingShim);return Ub||null}function Vb(a,b,c){var d=E();return d&&"class"===b?(d.setElementClass(a,c),!0):!1}function Wb(a,b){var c=E();c&&c.unscopeNode(a,b)}function Xb(a,b){var c=E();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&&Xb(a,b);return c}return a.nodeType!==Node.ELEMENT_NODE?!0:c.currentScopeForNode(a)===b} function Yb(a){if(a.nodeType!==Node.ELEMENT_NODE)return"";var b=E();return b?b.currentScopeForNode(a):""}function Zb(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&&Zb(a,b)};var $b=window.document,ac=w.R,bc=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),cc=bc&&bc.get;function dc(a){for(var b;b=a.__shady_firstChild;)a.__shady_removeChild(b)}function ec(a){var b=u(a);if(b&&void 0!==b.ea)for(b=a.__shady_firstChild;b;b=b.__shady_nextSibling)ec(b);if(a=u(a))a.ea=void 0}function fc(a){var b=a;if(a&&"slot"===a.localName){var c=u(a);(c=c&&c.L)&&(b=c.length?c[0]:fc(a.__shady_nextSibling))}return b} function gc(a,b,c){if(a=(a=u(a))&&a.P){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);Ia(a)}} var mc=A({get parentNode(){var a=u(this);a=a&&a.parentNode;return void 0!==a?a:this.__shady_native_parentNode},get firstChild(){var a=u(this);a=a&&a.firstChild;return void 0!==a?a:this.__shady_native_firstChild},get lastChild(){var a=u(this);a=a&&a.lastChild;return void 0!==a?a:this.__shady_native_lastChild},get nextSibling(){var a=u(this);a=a&&a.nextSibling;return void 0!==a?a:this.__shady_native_nextSibling},get previousSibling(){var a=u(this);a=a&&a.previousSibling;return void 0!==a?a:this.__shady_native_previousSibling}, get childNodes(){if(x(this)){var a=u(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=u(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:this.__shady_native_parentElement},get isConnected(){if(cc&&cc.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1; var a=this.ownerDocument;if(null===a||ra(a,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.__shady_parentNode||(y(a)?a.host:void 0);return!!(a&&a instanceof Document)},get textContent(){if(x(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(!x(this)&& w.j){var b=this.__shady_firstChild;(b!=this.__shady_lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&dc(this);this.__shady_native_textContent=a}else dc(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!==$b&&a.ownerDocument!==$b)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."); if(b){var c=u(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;gc(this,a);var d=[],e=(c=hc(this))?c.host.localName:Yb(this),f=a.__shady_parentNode;if(f){var g=Yb(a);var h=!!c||!hc(a)||ac&&void 0!==this.__noInsertionPoint;f.__shady_removeChild(a,h)}f=!0;var k=(!ac||void 0===a.__noInsertionPoint&&void 0=== this.__noInsertionPoint)&&!Xb(a,e),l=c&&!a.__noInsertionPoint&&(!ac||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE);if(l||k)k&&(g=g||Yb(a)),Zb(a,function(m){l&&"slot"===m.localName&&d.push(m);if(k){var q=g;E()&&(q&&Wb(m,q),(q=E())&&q.scopeNode(m,e))}});d.length&&(ic(c),c.i.push.apply(c.i,r(d)),F(c));x(this)&&(jc(a,this,b),h=u(this),h.root?(f=!1,ja(this)&&F(h.root)):c&&"slot"===this.localName&&(f=!1,F(c)));f?(c=y(this)?this.host:this,b?(b=fc(b),c.__shady_native_insertBefore(a,b)):c.__shady_native_appendChild(a)): a.ownerDocument!==this.ownerDocument&&this.ownerDocument.adoptNode(a);return a},appendChild:function(a){if(this!=a||!y(a))return this.__shady_insertBefore(a)},removeChild:function(a,b){b=void 0===b?!1:b;if(this.ownerDocument!==$b)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);gc(this,null,a);var c=hc(a),d=c&&kc(c,a),e=u(this);if(x(this)&&(lc(a,this),ja(this))){F(e.root);var f=!0}if(E()&&!b&&c&&a.nodeType!== Node.TEXT_NODE){var g=Yb(a);Zb(a,function(h){Wb(h,g)})}ec(a);c&&((b="slot"===this.localName)&&(f=!0),(d||b)&&F(c));f||(f=y(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!==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=t(this),c=b.ea;void 0===c&&(y(this)?(c=this,b.ea=c):(c=(c=this.__shady_parentNode)?c.__shady_getRootNode(a):this,document.documentElement.__shady_native_contains(this)&&(b.ea=c)));return c}},contains:function(a){return sa(this,a)}});var oc=A({get assignedSlot(){var a=this.__shady_parentNode;(a=a&&a.__shady_shadowRoot)&&nc(a);return(a=u(this))&&a.assignedSlot||null}});/* Copyright (c) 2022 The Polymer Project Authors SPDX-License-Identifier: BSD-3-Clause */ var pc=new Map;[["(",{end:")",da:!0}],["[",{end:"]",da:!0}],['"',{end:'"',da:!1}],["'",{end:"'",da:!1}]].forEach(function(a){var b=p(a);a=b.next().value;b=b.next().value;pc.set(a,b)});function qc(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&&pc.has(a[b])){var e=pc.get(a[b]);b=qc(a,b+1,[e.end],e.da)}}return a.length} function rc(a){function b(){if(0<d.length){for(;" "===d[d.length-1];)d.pop();c.push({ta:d.filter(function(k,l){return 0===l%2}),Ha: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=qc(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 sc(a,b,c){var d=[];tc(a,b,c,d);return d}function tc(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:(tc(e,f,g,h),e=void 0)}if(e)break}} var uc={get firstElementChild(){var a=u(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=u(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 x(this)?ta(Array.prototype.filter.call(va(this),function(a){return a.nodeType=== Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},vc=A((uc.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];this.__shady_insertBefore(Aa.apply(null,r(b)),null)},uc.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];this.__shady_insertBefore(Aa.apply(null,r(b)),this.__shady_firstChild)},uc.replaceChildren=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c]; for(;null!==(c=this.__shady_firstChild);)this.__shady_removeChild(c);this.__shady_insertBefore(Aa.apply(null,r(b)),null)},uc)); function wc(a,b){function c(e,f){return(e===a||-1===f.indexOf(":scope"))&&ma.call(e,f)}var d=rc(b);if(1>d.length)return[];for(b=Ba(sc(a,function(){return!0}).map(function(e){return Ba(d.map(function(f){var g=f.ta,h=g.length-1;return c(e,g[h])?{target:e,N:f,O:e,index:h}:[]}))}));b.some(function(e){return 0<e.index});)b=Ba(b.map(function(e){if(0>=e.index)return e;var f=e.target,g=e.O,h=e.N;e=e.index-1;var k=h.Ha[e],l=h.ta[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, l)&&k.push({target:f,N:h,O:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,N:h,O:g,index:e}:[];if("+"===k)return(g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,N:h,O:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,N:h,O:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return Ca(b.map(function(e){return e.target}))} var G=w.querySelectorImplementation,xc=A({querySelector:function(a){if("native"===G){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=p(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"===G)return wc(this,a)[0]||null;if(void 0===G)return sc(this,function(e){return ma.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ (G+"'"));},querySelectorAll:function(a,b){if(b||"native"===G){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return ta(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===G)return ta(wc(this,a));if(void 0===G)return ta(sc(this,function(d){return ma.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(G+"'"));}}),yc=w.R&&!w.s?ya({},vc):vc; ya(vc,xc);/* Copyright (c) 2020 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var zc=A({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(Aa.apply(null,r(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(Aa.apply(null,r(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]= arguments[c];c=this.__shady_parentNode;if(null!==c){var d=this.__shady_nextSibling;c.__shady_removeChild(this);c.__shady_insertBefore(Aa.apply(null,r(b)),d)}}});var Ac=window.document;function Bc(a,b){if("slot"===b)a=a.__shady_parentNode,ja(a)&&F(u(a).root);else if("slot"===a.localName&&"name"===b&&(b=hc(a))){if(b.g){Cc(b);var c=a.Ca,d=Dc(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]=Ec(c))}}F(b)}} var Fc=A({get previousElementSibling(){var a=u(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=u(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")}, 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!==Ac?this.__shady_native_setAttribute(a,b):Vb(this,a,b)||(this.__shady_native_setAttribute(a,b),Bc(this,a))},removeAttribute:function(a){this.ownerDocument!==Ac?this.__shady_native_removeAttribute(a):Vb(this,a,"")?""===this.getAttribute(a)&&this.__shady_native_removeAttribute(a):(this.__shady_native_removeAttribute(a), Bc(this,a))},toggleAttribute:function(a,b){if(this.ownerDocument!==Ac)return this.__shady_native_toggleAttribute(a,b);if(!Vb(this,a,""))return b=this.__shady_native_toggleAttribute(a,b),Bc(this,a),b;if(""===this.getAttribute(a)&&!b)return this.__shady_native_toggleAttribute(a,b)}});w.R||Nb.forEach(function(a){Fc[a]=Pb(a)}); var Kc=A({attachShadow:function(a){if(!this)throw Error("Must provide a host.");if(!a)throw Error("Not enough arguments.");if(a.shadyUpgradeFragment&&!w.za){var b=a.shadyUpgradeFragment;b.__proto__=ShadowRoot.prototype;Gc(b,this,a);Hc(b,b);a=b.__noInsertionPoint?null:b.querySelectorAll("slot");b.__noInsertionPoint=void 0;if(a&&a.length){var c=b;ic(c);c.i.push.apply(c.i,r(a));F(b)}b.host.__shady_native_appendChild(b)}else b=new Ic(Jc,this,a);return this.__CE_shadowRoot=b},get shadowRoot(){var a=u(this); return a&&a.Pa||null}});ya(Fc,Kc);var Lc=document.implementation.createHTMLDocument("inert"),Mc=A({get innerHTML(){return x(this)?Sa("template"===this.localName?this.content:this,va):this.__shady_native_innerHTML},set innerHTML(a){if("template"===this.localName)this.__shady_native_innerHTML=a;else{dc(this);var b=this.localName||"div";b=this.namespaceURI&&this.namespaceURI!==Lc.namespaceURI?Lc.createElementNS(this.namespaceURI,b):Lc.createElement(b);for(w.j?b.__shady_native_innerHTML=a:b.innerHTML=a;a=b.__shady_firstChild;)this.__shady_insertBefore(a)}}});var Nc=A({blur:function(){var a=u(this);(a=(a=a&&a.root)&&a.activeElement)?a.__shady_blur():this.__shady_native_blur()}});w.R||Ob.forEach(function(a){Nc[a]=Pb(a)});var Oc=A({assignedNodes:function(a){if("slot"===this.localName){var b=this.__shady_getRootNode();b&&y(b)&&nc(b);return(b=u(this))?(a&&a.flatten?b.L:b.assignedNodes)||[]:[]}},addEventListener:function(a,b,c){if("slot"!==this.localName||"slotchange"===a)Fb.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.G=this;d.__shady_addEventListener(a,b,c)}},removeEventListener:function(a, b,c){if("slot"!==this.localName||"slotchange"===a)Gb.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.G=this;d.__shady_removeEventListener(a,b,c)}}});var Pc=A({getElementById:function(a){return""===a?null:sc(this,function(b){return b.id==a},function(b){return!!b})[0]||null}});function Qc(a,b){for(var c;b&&!a.has(c=b.__shady_getRootNode());)b=c.host;return b}function Rc(a){var b=new Set;for(b.add(a);y(a)&&a.host;)a=a.host.__shady_getRootNode(),b.add(a);return b} var Sc="__shady_native_"+ia(),Tc=A({get activeElement(){var a=w.j?document.__shady_native_activeElement:document.activeElement;if(!a||!a.nodeType)return null;var b=!!y(this);if(!(this===document||b&&this.host!==a&&this.host.__shady_native_contains(a)))return null;for(b=hc(a);b&&b!==this;)a=b.host,b=hc(a);return this===document?b?null:a:b===this?a:null},elementsFromPoint:function(a,b){a=document[Sc](a,b);if(this===document&&w.useNativeDocumentEFP)return a;a=[].slice.call(a);b=Rc(this);for(var c=new Set, d=0;d<a.length;d++)c.add(Qc(b,a[d]));var e=[];c.forEach(function(f){return e.push(f)});return e},elementFromPoint:function(a,b){return this===document&&w.useNativeDocumentEFP?this.__shady_native_elementFromPoint(a,b):this.__shady_elementsFromPoint(a,b)[0]||null}});var Uc=window.document,Vc=A({importNode:function(a,b){if(a.ownerDocument!==Uc||"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 Wc=A({dispatchEvent:Db,addEventListener:Fb.bind(window),removeEventListener:Gb.bind(window)});var Xc={};Object.getOwnPropertyDescriptor(HTMLElement.prototype,"parentElement")&&(Xc.parentElement=mc.parentElement);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"contains")&&(Xc.contains=mc.contains);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"children")&&(Xc.children=vc.children);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"innerHTML")&&(Xc.innerHTML=Mc.innerHTML);Object.getOwnPropertyDescriptor(HTMLElement.prototype,"className")&&(Xc.className=Fc.className); var H={EventTarget:[Tb],Node:[mc,window.EventTarget?null:Tb],Text:[oc],Comment:[oc],CDATASection:[oc],ProcessingInstruction:[oc],Element:[Fc,vc,zc,oc,!w.j||"innerHTML"in Element.prototype?Mc:null,window.HTMLSlotElement?null:Oc],HTMLElement:[Nc,Xc],HTMLSlotElement:[Oc],DocumentFragment:[yc,Pc],Document:[Vc,yc,Pc,Tc],Window:[Wc],CharacterData:[zc],XMLHttpRequest:[window.EventTarget?null:Tb]},Yc=w.j?null:["innerHTML","textContent"]; function I(a,b,c,d){b.forEach(function(e){return a&&e&&z(a,e,c,d)})}function Zc(a){var b=a?null:Yc,c;for(c in H)I(window[c]&&window[c].prototype,H[c],a,b)}["Text","Comment","CDATASection","ProcessingInstruction"].forEach(function(a){var b=window[a],c=Object.create(b.prototype);c.__shady_protoIsPatched=!0;I(c,H.EventTarget);I(c,H.Node);H[a]&&I(c,H[a]);b.prototype.__shady_patchedProto=c}); function $c(a){a.__shady_protoIsPatched=!0;I(a,H.EventTarget);I(a,H.Node);I(a,H.Element);I(a,H.HTMLElement);I(a,H.HTMLSlotElement);return a};var ad=w.ma,bd=w.j;function cd(a,b){if(ad&&!a.__shady_protoIsPatched&&!y(a)){var c=Object.getPrototypeOf(a),d=c.hasOwnProperty("__shady_patchedProto")&&c.__shady_patchedProto;d||(d=Object.create(c),$c(d),c.__shady_patchedProto=d);Object.setPrototypeOf(a,d)}bd||(1===b?ib(a):2===b&&jb(a))} function dd(a,b,c,d){cd(a,1);d=d||null;var e=t(a),f=d?t(d):null;e.previousSibling=d?f.previousSibling:b.__shady_lastChild;if(f=u(e.previousSibling))f.nextSibling=a;if(f=u(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} function jc(a,b,c){cd(b,2);var d=t(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)dd(a,b,d,c);else dd(a,b,d,c)} function lc(a,b){var c=t(a);b=t(b);a===b.firstChild&&(b.firstChild=c.nextSibling);a===b.lastChild&&(b.lastChild=c.previousSibling);a=c.previousSibling;var d=c.nextSibling;a&&(t(a).nextSibling=d);d&&(t(d).previousSibling=a);c.parentNode=c.previousSibling=c.nextSibling=void 0;void 0!==b.childNodes&&(b.childNodes=null)} function Hc(a,b){var c=t(a);if(b||void 0===c.firstChild){c.childNodes=null;var d=c.firstChild=a.__shady_native_firstChild;c.lastChild=a.__shady_native_lastChild;cd(a,2);c=d;for(d=void 0;c;c=c.__shady_native_nextSibling){var e=t(c);e.parentNode=b||a;e.nextSibling=c.__shady_native_nextSibling;e.previousSibling=d||null;d=c;cd(c,1)}}};var ed=A({addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.G=c.G||this;this.host.__shady_addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.G=c.G||this;this.host.__shady_removeEventListener(a,b,c)}});function fd(a,b){z(a,ed,b);z(a,Tc,b);z(a,Mc,b);z(a,vc,b);w.s&&!b?(z(a,mc,b),z(a,Pc,b)):w.j||(z(a,fb),z(a,cb),z(a,eb))};var Jc={},J=w.deferConnectionCallbacks&&"loading"===document.readyState,gd;function hd(a){var b=[];do b.unshift(a);while(a=a.__shady_parentNode);return b}function Ic(a,b,c){if(a!==Jc)throw new TypeError("Illegal constructor");this.g=null;Gc(this,b,c)} function Gc(a,b,c){a.host=b;a.mode=c&&c.mode;Hc(a.host);b=t(a.host);b.root=a;b.Pa="closed"!==a.mode?a:null;b=t(a);b.firstChild=b.lastChild=b.parentNode=b.nextSibling=b.previousSibling=null;if(w.preferPerformance)for(;b=a.host.__shady_native_firstChild;)a.host.__shady_native_removeChild(b);else F(a)}function F(a){a.K||(a.K=!0,Fa(function(){return nc(a)}))} function nc(a){var b;if(b=a.K){for(var c;a;)a:{a.K&&(c=a),b=a;a=b.host.__shady_getRootNode();if(y(a)&&(b=u(b.host))&&0<b.U)break a;a=void 0}b=c}(c=b)&&c._renderSelf()} Ic.prototype._renderSelf=function(){var a=J;J=!0;this.K=!1;if(this.g){Cc(this);for(var b=0,c;b<this.g.length;b++){c=this.g[b];var d=u(c),e=d.assignedNodes;d.assignedNodes=[];d.L=[];if(d.ra=e)for(d=0;d<e.length;d++){var f=u(e[d]);f.ha=f.assignedSlot;f.assignedSlot===c&&(f.assignedSlot=null)}}for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)id(this,b);for(b=0;b<this.g.length;b++){c=this.g[b];e=u(c);if(!e.assignedNodes.length)for(d=c.__shady_firstChild;d;d=d.__shady_nextSibling)id(this,d, c);(d=(d=u(c.__shady_parentNode))&&d.root)&&(ka(d)||d.K)&&d._renderSelf();jd(this,e.L,e.assignedNodes);if(d=e.ra){for(f=0;f<d.length;f++)u(d[f]).ha=null;e.ra=null;d.length>e.assignedNodes.length&&(e.ja=!0)}e.ja&&(e.ja=!1,kd(this,c))}c=this.g;b=[];for(e=0;e<c.length;e++)d=c[e].__shady_parentNode,(f=u(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=u(f).L,h=0;h< g.length;h++)d.push(g[h]);else d.push(f);f=ua(e);g=Rb(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.S.length&&(q=l.S[m]);m++)q.__shady_native_parentNode===e&&e.__shady_native_removeChild(q),f.splice(l.index+k,1);k-=l.Z}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.Z;m++)q=d[m],e.__shady_native_insertBefore(q,h),f.splice(m,0,q)}}if(!w.preferPerformance&&!this.qa)for(b=this.host.__shady_firstChild;b;b=b.__shady_nextSibling)c= u(b),b.__shady_native_parentNode!==this.host||"slot"!==b.localName&&c.assignedSlot||this.host.__shady_native_removeChild(b);this.qa=!0;J=a;gd&&gd()};function id(a,b,c){var d=t(b),e=d.ha;d.ha=null;c||(c=(a=a.h[b.__shady_slot||"__catchall"])&&a[0]);c?(t(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(t(d.assignedSlot).ja=!0)} function jd(a,b,c){for(var d=0,e=void 0;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=u(e).assignedNodes;f&&f.length&&jd(a,b,f)}else b.push(c[d])}function kd(a,b){b.__shady_native_dispatchEvent(new Event("slotchange"));b=u(b);b.assignedSlot&&kd(a,b.assignedSlot)}function ic(a){a.i=a.i||[];a.g=a.g||[];a.h=a.h||{}} function Cc(a){if(a.i&&a.i.length){for(var b=a.i,c,d=0;d<b.length;d++){var e=b[d];Hc(e);var f=e.__shady_parentNode;Hc(f);f=u(f);f.U=(f.U||0)+1;f=Dc(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]=Ec(a.h[g]);a.i=[]}}function Dc(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.Ca=b} function Ec(a){return a.sort(function(b,c){b=hd(b);for(var d=hd(c),e=0;e<b.length;e++){c=b[e];var f=d[e];if(c!==f)return b=va(c.__shady_parentNode),b.indexOf(c)-b.indexOf(f)}})} function kc(a,b){if(a.g){Cc(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(sa(b,g)){e.splice(f,1);var h=a.g.indexOf(g);0<=h&&(a.g.splice(h,1),(h=u(g.__shady_parentNode))&&h.U&&h.U--);f--;g=u(g);if(h=g.L)for(var k=0;k<h.length;k++){var l=h[k],m=l.__shady_native_parentNode;m&&m.__shady_native_removeChild(l)}g.L=[];g.assignedNodes=[];h=!0}}return h}}function ka(a){Cc(a);return!(!a.g||!a.g.length)} (function(a){a.__proto__=DocumentFragment.prototype;fd(a,"__shady_");fd(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]}, configurable:!0})})})(Ic.prototype); if(window.customElements&&window.customElements.define&&w.ka&&!w.preferPerformance){var ld=new Map;gd=function(){var a=[];ld.forEach(function(d,e){a.push([e,d])});ld.clear();for(var b=0;b<a.length;b++){var c=a[b][0];a[b][1]?c.__shadydom_connectedCallback():c.__shadydom_disconnectedCallback()}};J&&document.addEventListener("readystatechange",function(){J=!1;gd()},{once:!0});var md=function(a,b,c){var d=0,e="__isConnected"+d++;if(b||c)a.prototype.connectedCallback=a.prototype.__shadydom_connectedCallback= function(){J?ld.set(this,!0):this[e]||(this[e]=!0,b&&b.call(this))},a.prototype.disconnectedCallback=a.prototype.__shadydom_disconnectedCallback=function(){J?this.isConnected||ld.set(this,!1):this[e]&&(this[e]=!1,c&&c.call(this))};return a},nd=window.customElements.define,od=function(a,b){var c=b.prototype.connectedCallback,d=b.prototype.disconnectedCallback;nd.call(window.customElements,a,md(b,c,d));b.prototype.connectedCallback=c;b.prototype.disconnectedCallback=d};window.customElements.define= od;Object.defineProperty(window.CustomElementRegistry.prototype,"define",{value:od,configurable:!0})}function hc(a){a=a.__shady_getRootNode();if(y(a))return a};function pd(a){this.node=a}n=pd.prototype;n.addEventListener=function(a,b,c){return this.node.__shady_addEventListener(a,b,c)};n.removeEventListener=function(a,b,c){return this.node.__shady_removeEventListener(a,b,c)};n.appendChild=function(a){return this.node.__shady_appendChild(a)};n.insertBefore=function(a,b){return this.node.__shady_insertBefore(a,b)};n.removeChild=function(a){return this.node.__shady_removeChild(a)};n.replaceChild=function(a,b){return this.node.__shady_replaceChild(a,b)}; n.cloneNode=function(a){return this.node.__shady_cloneNode(a)};n.getRootNode=function(a){return this.node.__shady_getRootNode(a)};n.contains=function(a){return this.node.__shady_contains(a)};n.dispatchEvent=function(a){return this.node.__shady_dispatchEvent(a)};n.setAttribute=function(a,b){this.node.__shady_setAttribute(a,b)};n.getAttribute=function(a){return this.node.__shady_native_getAttribute(a)};n.removeAttribute=function(a){this.node.__shady_removeAttribute(a)}; n.toggleAttribute=function(a,b){return this.node.__shady_toggleAttribute(a,b)};n.attachShadow=function(a){return this.node.__shady_attachShadow(a)};n.focus=function(){this.node.__shady_native_focus()};n.blur=function(){this.node.__shady_blur()};n.importNode=function(a,b){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_importNode(a,b)};n.getElementById=function(a){if(this.node.nodeType===Node.DOCUMENT_NODE)return this.node.__shady_getElementById(a)}; n.elementsFromPoint=function(a,b){return this.node.__shady_elementsFromPoint(a,b)};n.elementFromPoint=function(a,b){return this.node.__shady_elementFromPoint(a,b)};n.querySelector=function(a){return this.node.__shady_querySelector(a)};n.querySelectorAll=function(a,b){return this.node.__shady_querySelectorAll(a,b)};n.assignedNodes=function(a){if("slot"===this.node.localName)return this.node.__shady_assignedNodes(a)}; n.append=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=arguments[c];return this.node.__shady_append.apply(this.node,r(b))};n.prepend=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c]=