Files
webcomponentsjs/webcomponents-sd-ce.js
Daniel Freedman b6b2d5d348 rebuild
2017-02-17 15:42:35 -08:00

3 lines
73 KiB
JavaScript

(function(){'use strict';function _(Ft){return Ft=j(Ft),ee($(Ft),Ft)}function j(Ft){return Ft.replace(Me.comments,'').replace(Me.port,'')}function $(Ft){let Ht=new xe;Ht.start=0,Ht.end=Ft.length;let Ut=Ht;for(let Wt=0,qt=Ft.length;Wt<qt;Wt++)if(Ft[Wt]===Oe){Ut.rules||(Ut.rules=[]);let Bt=Ut,jt=Bt.rules[Bt.rules.length-1]||null;Ut=new xe,Ut.start=Wt+1,Ut.parent=Bt,Ut.previous=jt,Bt.rules.push(Ut)}else Ft[Wt]===Ie&&(Ut.end=Wt+1,Ut=Ut.parent||Ht);return Ht}function ee(Ft,Ht){let Ut=Ht.substring(Ft.start,Ft.end-1);if(Ft.parsedCssText=Ft.cssText=Ut.trim(),Ft.parent){let qt=Ft.previous?Ft.previous.end:Ft.parent.start;Ut=Ht.substring(qt,Ft.start-1),Ut=te(Ut),Ut=Ut.replace(Me.multipleSpaces,' '),Ut=Ut.substring(Ut.lastIndexOf(';')+1);let Bt=Ft.parsedSelector=Ft.selector=Ut.trim();Ft.atRule=0===Bt.indexOf('@'),Ft.atRule?0===Bt.indexOf('@media')?Ft.type=Ae.MEDIA_RULE:Bt.match(Me.keyframesRule)&&(Ft.type=Ae.KEYFRAMES_RULE,Ft.keyframesName=Ft.selector.split(Me.multipleSpaces).pop()):0===Bt.indexOf(De)?Ft.type=Ae.MIXIN_RULE:Ft.type=Ae.STYLE_RULE}let Wt=Ft.rules;if(Wt)for(let jt,qt=0,Bt=Wt.length;qt<Bt&&(jt=Wt[qt]);qt++)ee(jt,Ht);return Ft}function te(Ft){return Ft.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let Ht=arguments[1],Ut=6-Ht.length;for(;Ut--;)Ht='0'+Ht;return'\\'+Ht})}function oe(Ft,Ht,Ut=''){let Wt='';if(Ft.cssText||Ft.rules){let qt=Ft.rules;if(qt&&!se(qt))for(let Kt,Bt=0,jt=qt.length;Bt<jt&&(Kt=qt[Bt]);Bt++)Wt=oe(Kt,Ht,Wt);else Wt=Ht?Ft.cssText:re(Ft.cssText),Wt=Wt.trim(),Wt&&(Wt=' '+Wt+'\n')}return Wt&&(Ft.selector&&(Ut+=Ft.selector+' '+Oe+'\n'),Ut+=Wt,Ft.selector&&(Ut+=Ie+'\n\n')),Ut}function se(Ft){let Ht=Ft[0];return!!Ht&&!!Ht.selector&&0===Ht.selector.indexOf(De)}function re(Ft){return Ft=ne(Ft),le(Ft)}function ne(Ft){return Ft.replace(Me.customProp,'').replace(Me.mixinProp,'')}function le(Ft){return Ft.replace(Me.mixinApply,'').replace(Me.varApply,'')}function ae(Ft){Ft&&(Fe=Fe&&!Ft.nativeCss&&!Ft.shimcssproperties,Le=Le&&!Ft.nativeShadow&&!Ft.shimshadow)}function de(Ft,Ht){return'string'==typeof Ft&&(Ft=_(Ft)),Ht&&ce(Ft,Ht),oe(Ft,Fe)}function ie(Ft){return!Ft.__cssRules&&Ft.textContent&&(Ft.__cssRules=_(Ft.textContent)),Ft.__cssRules}function pe(Ft){return!!Ft.parent&&Ft.parent.type===Ae.KEYFRAMES_RULE}function ce(Ft,Ht,Ut,Wt){if(Ft){let qt=!1,Bt=Ft.type;if(Wt&&Bt===Ae.MEDIA_RULE){let Kt=Ft.selector.match(Be);Kt&&!window.matchMedia(Kt[1]).matches&&(qt=!0)}Bt===Ae.STYLE_RULE?Ht(Ft):Ut&&Bt===Ae.KEYFRAMES_RULE?Ut(Ft):Bt===Ae.MIXIN_RULE&&(qt=!0);let jt=Ft.rules;if(jt&&!qt)for(let Vt,Kt=0,Gt=jt.length;Kt<Gt&&(Vt=jt[Kt]);Kt++)ce(Vt,Ht,Ut,Wt)}}function he(Ft,Ht,Ut,Wt){let qt=_e(Ft,Ht);return ye(qt,Ut,Wt),qt}function _e(Ft,Ht){let Ut=document.createElement('style');return Ht&&Ut.setAttribute('scope',Ht),Ut.textContent=Ft,Ut}function ue(Ft){let Ht=document.createComment(' Shady DOM styles for '+Ft+' '),Ut=Ve?Ve.nextSibling:null,Wt=document.head;return Wt.insertBefore(Ht,Ut||Wt.firstChild),Ve=Ht,Ht}function ye(Ft,Ht,Ut){Ht=Ht||document.head;let Wt=Ut&&Ut.nextSibling||Ht.firstChild;if(Ht.insertBefore(Ft,Wt),!Ve)Ve=Ft;else{let qt=Ft.compareDocumentPosition(Ve);qt===Node.DOCUMENT_POSITION_PRECEDING&&(Ve=Ft)}}function me(Ft,Ht){let Ut=0;for(let Wt=Ht,qt=Ft.length;Wt<qt;Wt++)if('('===Ft[Wt])Ut++;else if(')'===Ft[Wt]&&0==--Ut)return Wt;return-1}function ge(Ft,Ht){let Ut=Ft.indexOf('var(');if(-1===Ut)return Ht(Ft,'','','');let Wt=me(Ft,Ut+3),qt=Ft.substring(Ut+4,Wt),Bt=Ft.substring(0,Ut),jt=ge(Ft.substring(Wt+1),Ht),Kt=qt.indexOf(',');if(-1===Kt)return Ht(Bt,qt.trim(),'',jt);let Gt=qt.substring(0,Kt).trim(),Vt=qt.substring(Kt+1).trim();return Ht(Bt,Gt,Vt,jt)}function fe(Ft,Ht){Le?Ft.setAttribute('class',Ht):window.ShadyDOM.nativeMethods.setAttribute.call(Ft,'class',Ht)}function Se(Ft){let Ht=Ft.localName,Ut='',Wt='';return Ht?-1<Ht.indexOf('-')?Ut=Ht:(Wt=Ht,Ut=Ft.getAttribute&&Ft.getAttribute('is')||''):(Ut=Ft.is,Wt=Ft.extends),{is:Ut,typeExtension:Wt}}function Ne(Ft,Ht){let Ut=parseInt(Ft/32,10);Ht[Ut]=(Ht[Ut]||0)|1<<Ft%32}function be(Ft){let Ht=bt[Ft];Ht&&Ce(Ht)}function Ce(Ft){Ft._applyShimInvalid=!0}function Ee(Ft){return!Ft._applyShimInvalid}function ve(Ft){return Ft._validating}function Pe(Ft){Ft._validating||(Ft._validating=!0,Ct.then(function(){Ft._applyShimInvalid=!1,Ft._validating=!1}))}function Re(Ft){vt?vt(Ft):(!Et&&(Et=new Promise(Ht=>{Pt=Ht}),'complete'===document.readyState?Pt():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&Pt()})),Et.then(function(){Ft&&Ft()}))}function Te(Ft,Ht){for(let Ut in Ht)null===Ut?Ft.style.removeProperty(Ut):Ft.style.setProperty(Ut,Ht[Ut])}(function(){'use strict';function Ft(Is,Ms,Ds){return{index:Is,removed:Ms,addedCount:Ds}}function Ht(Is){return'ShadyRoot'===Is.__localName}function Ut(Is,Ms){if(Is&&Ms)for(var ks,Ds=Object.getOwnPropertyNames(Ms),ws=0;ws<Ds.length&&(ks=Ds[ws]);ws++){var Ls=ks,Hs=Object.getOwnPropertyDescriptor(Ms,Ls);Hs&&Object.defineProperty(Is,Ls,Hs)}return Is||Ms}function Wt(){Io=!1;for(var Is=!!Oo.length;Oo.length;)Oo.shift()();return Is}function qt(Is,Ms){return Is.__shady&&Is.__shady[Ms]}function Bt(Is){return'&'===Is?'&amp;':'<'===Is?'&lt;':'>'===Is?'&gt;':'"'===Is?'&quot;':'\xA0'===Is?'&nbsp;':void 0}function jt(Is){for(var Ms={},Ds=0;Ds<Is.length;Ds++)Ms[Is[Ds]]=!0;return Ms}function Kt(Is,Ms,Ds){switch(Is.nodeType){case Node.ELEMENT_NODE:Ms=Is.localName;for(var Fs,ws='<'+Ms,ks=Is.attributes,Ls=0;Fs=ks[Ls];Ls++)ws+=' '+Fs.name+'="'+Fs.value.replace(wo,Bt)+'"';return ws+='>',Lo[Ms]?ws:ws+Gt(Is,Ds)+'</'+Ms+'>';case Node.TEXT_NODE:return Is=Is.data,Ms&&Fo[Ms.localName]?Is:Is.replace(ko,Bt);case Node.COMMENT_NODE:return'<!--'+Is.data+'-->';default:throw window.console.error(Is),Error('not implemented');}}function Gt(Is,Ms){'template'===Is.localName&&(Is=Is.content);for(var Fs,Ds='',ws=Ms?Ms(Is):Is.childNodes,ks=0,Ls=ws.length;ks<Ls&&(Fs=ws[ks]);ks++)Ds+=Kt(Fs,Is,Ms);return Ds}function Vt(Is){var Ms=[];for(Uo.currentNode=Is,Is=Uo.firstChild();Is;)Ms.push(Is),Is=Uo.nextSibling();return Ms}function Xt(Is){return{get:function(){var Ms=Mo.getProperty(this,Is);return void 0===Ms?Ho[Is](this):Ms},configurable:!0}}function Yt(Is,Ms,Ds){for(var ws in Ms){var ks=Object.getOwnPropertyDescriptor(Is,ws);ks&&ks.configurable||!ks&&Ds?Object.defineProperty(Is,ws,Ms[ws]):Ds&&console.warn('Could not define',ws,'on',Is)}}function zt(Is,Ms,Ds){qo.patchOutsideElementAccessors(Is),Ds=Ds||null,Is.__shady=Is.__shady||{},Ms.__shady=Ms.__shady||{},Ds&&(Ds.__shady=Ds.__shady||{}),Is.__shady.previousSibling=Ds?Ds.__shady.previousSibling:Ms.lastChild;var ws=Is.__shady.previousSibling;ws&&ws.__shady&&(ws.__shady.nextSibling=Is),(ws=Is.__shady.nextSibling=Ds)&&ws.__shady&&(ws.__shady.previousSibling=Is),Is.__shady.parentNode=Ms,Ds?Ds===Ms.__shady.firstChild&&(Ms.__shady.firstChild=Is):(Ms.__shady.lastChild=Is,Ms.__shady.firstChild||(Ms.__shady.firstChild=Is)),Ms.__shady.childNodes=null}function $t(Is){this.root=Is,this.insertionPointTag='slot'}function Zt(Is,Ms){if(Is!==_s)throw new TypeError('Illegal constructor');return Is=document.createDocumentFragment(),Is.__proto__=Zt.prototype,Is._init(Ms),Is}function Qt(Is){var Ds,Ms=Mo.hasProperty(Is,'parentNode')&&Mo.getProperty(Is,'parentNode'),ws=bo.ownerShadyRootForNode(Is);if(Ms||ws){Ds=so(Is),Ms&&Zo.recordRemoveChild(Is,Ms);var ks;if(ks=ws){var Ls;ks=ws._insertionPoints;for(var Fs=0;Fs<ks.length;Fs++){var Us,Hs=ks[Fs];a:{for(Us=Hs;Us;){if(Us==Is){Us=!0;break a}Us=Us.parentNode}Us=void 0}if(Us)for(Hs=Hs.assignedNodes({flatten:!0}),Us=0;Us<Hs.length;Us++){Ls=!0;var Ws=Hs[Us],qs=Ho.parentNode(Ws);qs&&Qo.removeChild.call(qs,Ws)}}ks=Ls}Ls=ks,Ms=Ms&&ws&&Ms.localName===ws.getInsertionPointTag(),(Ls||Ms)&&(ws._skipUpdateInsertionPoints=!1,ro(ws))}return oo(Is),Ds}function Jt(Is,Ms,Ds){(Is=Is.__shady&&Is.__shady.observer)&&(Ms&&Is.addedNodes.push(Ms),Ds&&Is.removedNodes.push(Ds),Is.schedule())}function eo(Is){if(Is&&Is.nodeType){var Ms=Is.__ownerShadyRoot;return void 0===Ms&&(Ms=bo.isShadyRoot(Is)?Is:(Ms=Is.parentNode)?eo(Ms):Is,document.documentElement.contains(Is)&&(Is.__ownerShadyRoot=Ms)),Ms}}function to(Is,Ms,Ds){var ws,ks=Ds.getInsertionPointTag();if(Is.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||Is.__noInsertionPoint)Is.localName===ks&&(Zo.recordChildNodes(Ms),Zo.recordChildNodes(Is),ws=!0);else for(var Fs,Hs,ks=Is.querySelectorAll(ks),Ls=0;Ls<ks.length&&(Fs=ks[Ls]);Ls++)Hs=Fs.parentNode,Hs===Is&&(Hs=Ms),Hs=to(Fs,Hs,Ds),ws=ws||Hs;return ws}function oo(Is){if(void 0!==Is.__ownerShadyRoot)for(var ks,Ms=Is.childNodes,Ds=0,ws=Ms.length;Ds<ws&&(ks=Ms[Ds]);Ds++)oo(ks);Is.__ownerShadyRoot=void 0}function so(Is){if((Is=Is.parentNode)&&Is.shadyRoot&&Is.shadyRoot.hasInsertionPoint())return ro(Is.shadyRoot),!0}function ro(Is){Is._changePending=!0,Is.update()}function no(Is,Ms){'slot'===Ms?so(Is):'slot'===Is.localName&&'name'==Ms&&(Is=bo.ownerShadyRootForNode(Is))&&Is.update()}function lo(Is,Ms,Ds,ws){for(var Fs,ks=0,Ls=Is.length;ks<Ls&&(Fs=Is[ks]);ks++){var Hs;if(Hs=Fs.nodeType===Node.ELEMENT_NODE){Hs=Fs;var Us=Ms,Ws=Ds,qs=ws,Bs=Us(Hs);Bs&&qs.push(Hs),Ws&&Ws(Bs)?Hs=Bs:(lo(Hs.childNodes,Us,Ws,qs),Hs=void 0)}if(Hs)return!0}}function ao(Is,Ms){if(Is.ownerDocument!==document)return Qo.importNode.call(document,Is,Ms);var Ds=Qo.importNode.call(document,Is,!1);if(Ms){Is=Is.childNodes,Ms=0;for(var ws;Ms<Is.length;Ms++)ws=ao(Is[Ms],!0),Ds.appendChild(ws)}return Ds}function io(){this._scheduled=!1,this.addedNodes=[],this.removedNodes=[],this.callbacks=new Set}function po(Is,Ms){var Ds=[],ws=Is;for(Is=Is===window?window:Is.getRootNode();ws;)Ds.push(ws),ws=ws.assignedSlot?ws.assignedSlot:ws.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&ws.host&&(Ms||ws!==Is)?ws.host:ws.parentNode;return Ds[Ds.length-1]===document&&Ds.push(window),Ds}function co(Is,Ms){if(!bo.isShadyRoot)return Is;Is=po(Is,!0);for(var ws,ks,Ls,Fs,Ds=0;Ds<Ms.length;Ds++)if(ws=Ms[Ds],Ls=ws===window?window:ws.getRootNode(),Ls!==ks&&(Fs=Is.indexOf(Ls),ks=Ls),!bo.isShadyRoot(Ls)||-1<Fs)return ws}function ho(Is){function Ms(Ds,ws){return Ds=new Is(Ds,ws),Ds.__composed=ws&&!!ws.composed,Ds}return bo.mixin(Ms,Is),Ms.prototype=Is.prototype,Ms}function _o(Is,Ms,Ds){if(Ds=Ms.__handlers&&Ms.__handlers[Is.type]&&Ms.__handlers[Is.type][Ds])for(var ks,ws=0;(ks=Ds[ws])&&(ks.call(Ms,Is),!Is.__immediatePropagationStopped);ws++);}function uo(Is){var Ds,Ms=Is.composedPath();Object.defineProperty(Is,'currentTarget',{get:function(){return Ds},configurable:!0});for(var ws=Ms.length-1;0<=ws;ws--)if(Ds=Ms[ws],_o(Is,Ds,'capture'),Is.__propagationStopped)return;Object.defineProperty(Is,'eventPhase',{value:Event.AT_TARGET});for(var ks,ws=0;ws<Ms.length&&!((Ds=Ms[ws],0===ws||Ds.shadowRoot&&Ds.shadowRoot===ks)&&(_o(Is,Ds,'bubble'),Ds!==window&&(ks=Ds.getRootNode()),Is.__propagationStopped));ws++);}function yo(){for(var Is in Ns)window.addEventListener(Is,function(Ms){Ms.__target||(mo(Ms),uo(Ms),Ms.stopImmediatePropagation())},!0)}function mo(Is){Is.__target=Is.target,Is.__relatedTarget=Is.relatedTarget,bo.settings.hasDescriptors?bo.patchPrototype(Is,Ss):bo.extend(Is,Ss)}function go(Is){return us.renderRootNode(Is),Mo.getProperty(Is,'assignedSlot')||null}function fo(Is,Ms){for(var Ds=Object.getOwnPropertyNames(Ms),ws=0;ws<Ds.length;ws++){var ks=Ds[ws],Ls=Object.getOwnPropertyDescriptor(Ms,ks);Ls.value?Is[ks]=Ls.value:Object.defineProperty(Is,ks,Ls)}}var So={},No={calcEditDistances:function(Is,Ms,Ds,ws,ks,Ls){Ls=Ls-ks+1,Ds=Ds-Ms+1;for(var Fs=Array(Ls),Hs=0;Hs<Ls;Hs++)Fs[Hs]=Array(Ds),Fs[Hs][0]=Hs;for(Hs=0;Hs<Ds;Hs++)Fs[0][Hs]=Hs;for(Hs=1;Hs<Ls;Hs++)for(var Us=1;Us<Ds;Us++)if(this.equals(Is[Ms+Us-1],ws[ks+Hs-1]))Fs[Hs][Us]=Fs[Hs-1][Us-1];else{var Ws=Fs[Hs-1][Us]+1,qs=Fs[Hs][Us-1]+1;Fs[Hs][Us]=Ws<qs?Ws:qs}return Fs},spliceOperationsFromEditDistances:function(Is){for(var Ms=Is.length-1,Ds=Is[0].length-1,ws=Is[Ms][Ds],ks=[];0<Ms||0<Ds;)if(0==Ms)ks.push(2),Ds--;else if(0==Ds)ks.push(3),Ms--;else{var Us,Ls=Is[Ms-1][Ds-1],Fs=Is[Ms-1][Ds],Hs=Is[Ms][Ds-1];Us=Fs<Hs?Fs<Ls?Fs:Ls:Hs<Ls?Hs:Ls,Us==Ls?(Ls==ws?ks.push(0):(ks.push(1),ws=Ls),Ms--,Ds--):Us==Fs?(ks.push(3),Ms--,ws=Fs):(ks.push(2),Ds--,ws=Hs)}return ks.reverse(),ks},calcSplices:function(Is,Ms,Ds,ws,ks,Ls){var Fs=0,Hs=0,Us=Math.min(Ds-Ms,Ls-ks);if(0==Ms&&0==ks&&(Fs=this.sharedPrefix(Is,ws,Us)),Ds==Is.length&&Ls==ws.length&&(Hs=this.sharedSuffix(Is,ws,Us-Fs)),Ms+=Fs,ks+=Fs,Ds-=Hs,Ls-=Hs,0==Ds-Ms&&0==Ls-ks)return[];if(Ms==Ds){for(Is=Ft(Ms,[],0);ks<Ls;)Is.removed.push(ws[ks++]);return[Is]}if(ks==Ls)return[Ft(Ms,[],Ds-Ms)];for(Ls=this.spliceOperationsFromEditDistances(this.calcEditDistances(Is,Ms,Ds,ws,ks,Ls)),Is=void 0,Ds=[],Fs=0;Fs<Ls.length;Fs++)switch(Ls[Fs]){case 0:Is&&(Ds.push(Is),Is=void 0),Ms++,ks++;break;case 1:Is||(Is=Ft(Ms,[],0)),Is.addedCount++,Ms++,Is.removed.push(ws[ks]),ks++;break;case 2:Is||(Is=Ft(Ms,[],0)),Is.addedCount++,Ms++;break;case 3:Is||(Is=Ft(Ms,[],0)),Is.removed.push(ws[ks]),ks++;}return Is&&Ds.push(Is),Ds},sharedPrefix:function(Is,Ms,Ds){for(var ws=0;ws<Ds;ws++)if(!this.equals(Is[ws],Ms[ws]))return ws;return Ds},sharedSuffix:function(Is,Ms,Ds){for(var ws=Is.length,ks=Ms.length,Ls=0;Ls<Ds&&this.equals(Is[--ws],Ms[--ks]);)Ls++;return Ls},calculateSplices:function(Is,Ms){return this.calcSplices(Is,0,Is.length,Ms,0,Ms.length)},equals:function(Is,Ms){return Is===Ms}};So.calculateSplices=function(Is,Ms){return No.calculateSplices(Is,Ms)};var bo={},Co=window.ShadyDOM||{};Co.hasNativeShadowDOM=Element.prototype.attachShadow&&Node.prototype.getRootNode;var Eo=Object.getOwnPropertyDescriptor(Node.prototype,'firstChild');Co.hasDescriptors=!!(Eo&&Eo.configurable&&Eo.get),Co.inUse=Co.force||!Co.hasNativeShadowDOM;var vo=Element.prototype,Po=vo.matches||vo.matchesSelector||vo.mozMatchesSelector||vo.msMatchesSelector||vo.oMatchesSelector||vo.webkitMatchesSelector,Ro=document.createTextNode(''),To=0,xo=[];new MutationObserver(function(){for(;xo.length;)try{xo.shift()()}catch(Is){throw Ro.textContent=To++,Is}}).observe(Ro,{characterData:!0}),bo.settings=Co,bo.isShadyRoot=Ht,bo.ownerShadyRootForNode=function(Is){if(Is=Is.getRootNode(),Ht(Is))return Is},bo.matchesSelector=function(Is,Ms){return Po.call(Is,Ms)},bo.extend=Ut,bo.extendAll=function(Is){for(var Ds=[],ws=1;ws<arguments.length;++ws)Ds[ws-1]=arguments[ws];for(ws=0;ws<Ds.length;ws++)Ut(Is,Ds[ws]);return Is},bo.mixin=function(Is,Ms){for(var Ds in Ms)Is[Ds]=Ms[Ds];return Is},bo.patchPrototype=function(Is,Ms){var Ds=Object.getPrototypeOf(Is);if(!Ds.hasOwnProperty('__patchProto')){var ws=Object.create(Ds);ws.__sourceProto=Ds,Ut(ws,Ms),Ds.__patchProto=ws}Is.__proto__=Ds.__patchProto},bo.microtask=function(Is){xo.push(Is),Ro.textContent=To++};var Io,Ao={},Oo=[];Wt.list=Oo,Ao.enqueue=function(Is){Io||(Io=!0,bo.microtask(Wt)),Oo.push(Is)},Ao.flush=Wt;var Mo={};Mo.getProperty=qt,Mo.hasProperty=function(Is,Ms){return void 0!==qt(Is,Ms)};var Do={},wo=/[&\u00A0"]/g,ko=/[&\u00A0<>]/g,Lo=jt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Fo=jt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Do.getOuterHTML=Kt,Do.getInnerHTML=Gt;var Ho={},Uo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Wo=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Ho.parentNode=function(Is){return Uo.currentNode=Is,Uo.parentNode()},Ho.firstChild=function(Is){return Uo.currentNode=Is,Uo.firstChild()},Ho.lastChild=function(Is){return Uo.currentNode=Is,Uo.lastChild()},Ho.previousSibling=function(Is){return Uo.currentNode=Is,Uo.previousSibling()},Ho.nextSibling=function(Is){return Uo.currentNode=Is,Uo.nextSibling()},Ho.childNodes=Vt,Ho.parentElement=function(Is){return Wo.currentNode=Is,Wo.parentNode()},Ho.firstElementChild=function(Is){return Wo.currentNode=Is,Wo.firstChild()},Ho.lastElementChild=function(Is){return Wo.currentNode=Is,Wo.lastChild()},Ho.previousElementSibling=function(Is){return Wo.currentNode=Is,Wo.previousSibling()},Ho.nextElementSibling=function(Is){return Wo.currentNode=Is,Wo.nextSibling()},Ho.children=function(Is){var Ms=[];for(Wo.currentNode=Is,Is=Wo.firstChild();Is;)Ms.push(Is),Is=Wo.nextSibling();return Ms},Ho.innerHTML=function(Is){return Do.getInnerHTML(Is,function(Ms){return Vt(Ms)})},Ho.textContent=function(Is){if(Is.nodeType!==Node.ELEMENT_NODE)return Is.nodeValue;Is=document.createTreeWalker(Is,NodeFilter.SHOW_TEXT,null,!1);for(var Ds,Ms='';Ds=Is.nextNode();)Ms+=Ds.nodeValue;return Ms};var qo={},Bo=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),jo=document.implementation.createHTMLDocument('inert').createElement('div'),Ko=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),Go={parentElement:Xt('parentElement'),parentNode:Xt('parentNode'),nextSibling:Xt('nextSibling'),previousSibling:Xt('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(Is){this.setAttribute('class',Is)},configurable:!0},nextElementSibling:{get:function(){if(Mo.hasProperty(this,'nextSibling')){for(var Is=this.nextSibling;Is&&Is.nodeType!==Node.ELEMENT_NODE;)Is=Is.nextSibling;return Is}return Ho.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(Mo.hasProperty(this,'previousSibling')){for(var Is=this.previousSibling;Is&&Is.nodeType!==Node.ELEMENT_NODE;)Is=Is.previousSibling;return Is}return Ho.previousElementSibling(this)},configurable:!0}},Vo={childNodes:{get:function(){if(Mo.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var Is=this.firstChild;Is;Is=Is.nextSibling)this.__shady.childNodes.push(Is)}return this.__shady.childNodes}return Ho.childNodes(this)},configurable:!0},firstChild:Xt('firstChild'),lastChild:Xt('lastChild'),textContent:{get:function(){if(Mo.hasProperty(this,'firstChild')){for(var ws,Is=[],Ms=0,Ds=this.childNodes;ws=Ds[Ms];Ms++)ws.nodeType!==Node.COMMENT_NODE&&Is.push(ws.textContent);return Is.join('')}return Ho.textContent(this)},set:function(Is){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=Is;else{for(;this.firstChild;)this.removeChild(this.firstChild);Is&&this.appendChild(document.createTextNode(Is))}},configurable:!0},firstElementChild:{get:function(){if(Mo.hasProperty(this,'firstChild')){for(var Is=this.firstChild;Is&&Is.nodeType!==Node.ELEMENT_NODE;)Is=Is.nextSibling;return Is}return Ho.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(Mo.hasProperty(this,'lastChild')){for(var Is=this.lastChild;Is&&Is.nodeType!==Node.ELEMENT_NODE;)Is=Is.previousSibling;return Is}return Ho.lastElementChild(this)},configurable:!0},children:{get:function(){return Mo.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Is){return Is.nodeType===Node.ELEMENT_NODE}):Ho.children(this)},configurable:!0},innerHTML:{get:function(){var Is='template'===this.localName?this.content:this;return Mo.hasProperty(this,'firstChild')?Do.getInnerHTML(Is):Ho.innerHTML(Is)},set:function(Is){for(var Ms='template'===this.localName?this.content:this;Ms.firstChild;)Ms.removeChild(Ms.firstChild);for(Bo&&Bo.set?Bo.set.call(jo,Is):jo.innerHTML=Is;jo.firstChild;)Ms.appendChild(jo.firstChild)},configurable:!0}},Xo={shadowRoot:{get:function(){return this.shadyRoot},set:function(Is){this.shadyRoot=Is},configurable:!0}},Yo={activeElement:{get:function(){var Is;if(Is=Ko&&Ko.get?Ko.get.call(document):bo.settings.hasDescriptors?void 0:document.activeElement,Is){var Ms=!!bo.isShadyRoot(this);if(this===document||Ms&&this.host!==Is&&this.host.contains(Is)){for(Ms=bo.ownerShadyRootForNode(Is);Ms&&Ms!==this;)Is=Ms.host,Ms=bo.ownerShadyRootForNode(Is);Is=this===document?Ms?null:Is:Ms===this?Is:null}else Is=null}else Is=null;return Is},set:function(){},configurable:!0}},zo=bo.settings.hasDescriptors?function(){}:function(Is){Is.__shady&&Is.__shady.__outsideAccessors||(Is.__shady=Is.__shady||{},Is.__shady.__outsideAccessors=!0,Yt(Is,Go,!0))},$o=bo.settings.hasDescriptors?function(){}:function(Is){Is.__shady&&Is.__shady.__insideAccessors||(Is.__shady=Is.__shady||{},Is.__shady.__insideAccessors=!0,Yt(Is,Vo,!0),Yt(Is,Xo,!0))};qo.ShadowRootAccessor=Xo,qo.ActiveElementAccessor=Yo,qo.patchAccessors=function(Is){Yt(Is,Go),Yt(Is,Vo),Yt(Is,Yo)},qo.patchShadowRootAccessors=function(Is){Yt(Is,Vo,!0),Yt(Is,Yo,!0)},qo.patchOutsideElementAccessors=zo,qo.patchInsideElementAccessors=$o;var Zo={};Zo.recordInsertBefore=function(Is,Ms,Ds){if(qo.patchInsideElementAccessors(Ms),Ms.__shady=Ms.__shady||{},Mo.hasProperty(Ms,'firstChild')&&(Ms.__shady.childNodes=null),Is.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var ws=Is.childNodes,ks=0;ks<ws.length;ks++)zt(ws[ks],Ms,Ds);Is.__shady=Is.__shady||{},Ms=Mo.hasProperty(Is,'firstChild')?null:void 0,Is.__shady.firstChild=Is.__shady.lastChild=Ms,Is.__shady.childNodes=Ms}else zt(Is,Ms,Ds)},Zo.recordRemoveChild=function(Is,Ms){Is.__shady=Is.__shady||{},Ms.__shady=Ms.__shady||{},Is===Ms.__shady.firstChild&&(Ms.__shady.firstChild=Is.__shady.nextSibling),Is===Ms.__shady.lastChild&&(Ms.__shady.lastChild=Is.__shady.previousSibling);var Ds=Is.__shady.previousSibling,ws=Is.__shady.nextSibling;Ds&&(Ds.__shady=Ds.__shady||{},Ds.__shady.nextSibling=ws),ws&&(ws.__shady=ws.__shady||{},ws.__shady.previousSibling=Ds),Is.__shady.parentNode=Is.__shady.previousSibling=Is.__shady.nextSibling=void 0,Mo.hasProperty(Ms,'childNodes')&&(Ms.__shady.childNodes=null)},Zo.recordChildNodes=function(Is){if(!Mo.hasProperty(Is,'firstChild')){Is.__shady=Is.__shady||{},Is.__shady.firstChild=Ho.firstChild(Is),Is.__shady.lastChild=Ho.lastChild(Is),qo.patchInsideElementAccessors(Is);for(var ws,Ms=Is.__shady.childNodes=Ho.childNodes(Is),Ds=0;Ds<Ms.length&&(ws=Ms[Ds]);Ds++)ws.__shady=ws.__shady||{},ws.__shady.parentNode=Is,ws.__shady.nextSibling=Ms[Ds+1]||null,ws.__shady.previousSibling=Ms[Ds-1]||null,qo.patchOutsideElementAccessors(ws)}};var Qo={},Jo=Element.prototype.insertBefore,es=Element.prototype.removeChild,ts=Element.prototype.setAttribute,os=Element.prototype.removeAttribute,rs=Element.prototype.cloneNode,ns=Document.prototype.importNode,ls=Element.prototype.addEventListener,as=Element.prototype.removeEventListener;Qo.appendChild=Element.prototype.appendChild,Qo.insertBefore=Jo,Qo.removeChild=es,Qo.setAttribute=ts,Qo.removeAttribute=os,Qo.cloneNode=rs,Qo.importNode=ns,Qo.addEventListener=ls,Qo.removeEventListener=as;var ds={},ps='function'==typeof Event?Event:function(Is,Ms){Ms=Ms||{};var Ds=document.createEvent('Event');return Ds.initEvent(Is,!!Ms.bubbles,!!Ms.cancelable),Ds};$t.prototype.getInsertionPoints=function(){return this.root.querySelectorAll(this.insertionPointTag)},$t.prototype.hasInsertionPoint=function(){return this.root._insertionPoints&&this.root._insertionPoints.length},$t.prototype.isInsertionPoint=function(Is){return Is.localName&&Is.localName==this.insertionPointTag},$t.prototype.distribute=function(){return this.hasInsertionPoint()?this.distributePool(this.root,this.collectPool()):[]},$t.prototype.collectPool=function(){for(var Is=[],Ms=0,Ds=this.root.host.firstChild;Ds;Ds=Ds.nextSibling)Is[Ms++]=Ds;return Is},$t.prototype.distributePool=function(Is,Ms){Is=[];for(var Ls,Ds=this.root._insertionPoints,ws=0,ks=Ds.length;ws<ks&&(Ls=Ds[ws]);ws++){this.distributeInsertionPoint(Ls,Ms);var Fs=Ls.parentNode;Fs&&Fs.shadyRoot&&this.hasInsertionPoint(Fs.shadyRoot)&&Is.push(Fs.shadyRoot)}for(Ds=0;Ds<Ms.length;Ds++)(Ls=Ms[Ds])&&(Ls.__shady=Ls.__shady||{},Ls.__shady.assignedSlot=void 0,(ws=Ho.parentNode(Ls))&&Qo.removeChild.call(ws,Ls));return Is},$t.prototype.distributeInsertionPoint=function(Is,Ms){var Ds=Is.__shady.assignedNodes;Ds&&this.clearAssignedSlots(Is,!0),Is.__shady.assignedNodes=[];for(var Hs,ws=!1,ks=!1,Ls=0,Fs=Ms.length;Ls<Fs;Ls++)(Hs=Ms[Ls])&&this.matchesInsertionPoint(Hs,Is)&&(Hs.__shady._prevAssignedSlot!=Is&&(ws=!0),this.distributeNodeInto(Hs,Is),Ms[Ls]=void 0,ks=!0);if(!ks)for(Ms=Is.childNodes,ks=0;ks<Ms.length;ks++)Hs=Ms[ks],Hs.__shady._prevAssignedSlot!=Is&&(ws=!0),this.distributeNodeInto(Hs,Is);if(Ds){for(Hs=0;Hs<Ds.length;Hs++)Ds[Hs].__shady._prevAssignedSlot=null;Is.__shady.assignedNodes.length<Ds.length&&(ws=!0)}this.setDistributedNodesOnInsertionPoint(Is),ws&&this._fireSlotChange(Is)},$t.prototype.clearAssignedSlots=function(Is,Ms){var Ds=Is.__shady.assignedNodes;if(Ds)for(var ks,ws=0;ws<Ds.length;ws++)ks=Ds[ws],Ms&&(ks.__shady._prevAssignedSlot=ks.__shady.assignedSlot),ks.__shady.assignedSlot===Is&&(ks.__shady.assignedSlot=null)},$t.prototype.matchesInsertionPoint=function(Is,Ms){return Ms=(Ms=Ms.getAttribute('name'))?Ms.trim():'',Is=(Is=Is.getAttribute&&Is.getAttribute('slot'))?Is.trim():'',Is==Ms},$t.prototype.distributeNodeInto=function(Is,Ms){Ms.__shady.assignedNodes.push(Is),Is.__shady.assignedSlot=Ms},$t.prototype.setDistributedNodesOnInsertionPoint=function(Is){var Ms=Is.__shady.assignedNodes;Is.__shady.distributedNodes=[];for(var ws,Ds=0;Ds<Ms.length&&(ws=Ms[Ds]);Ds++)if(this.isInsertionPoint(ws)){var ks=ws.__shady.distributedNodes;if(ks)for(var Ls=0;Ls<ks.length;Ls++)Is.__shady.distributedNodes.push(ks[Ls])}else Is.__shady.distributedNodes.push(Ms[Ds])},$t.prototype._fireSlotChange=function(Is){Is.dispatchEvent(new ps('slotchange')),Is.__shady.assignedSlot&&this._fireSlotChange(Is.__shady.assignedSlot)},$t.prototype.isFinalDestination=function(Is){return!Is.__shady.assignedSlot},ds.default=$t;var hs={},_s={};Zt.prototype=Object.create(DocumentFragment.prototype),bo.extendAll(Zt.prototype,{_init:function(Is){this.__localName='ShadyRoot',Zo.recordChildNodes(Is),Zo.recordChildNodes(this),Is.shadowRoot=this,this.host=Is,this._changePending=this._hasRendered=this._renderPending=!1,this._distributor=new ds.default(this),this.update()},update:function(){var Is=this;this._renderPending||(this._renderPending=!0,Ao.enqueue(function(){return Is.render()}))},_getRenderRoot:function(){for(var Is=this,Ms=this;Ms;)Ms._renderPending&&(Is=Ms),Ms=Ms._rendererForHost();return Is},_rendererForHost:function(){var Is=this.host.getRootNode();if(bo.isShadyRoot(Is))for(var ws,Ms=this.host.childNodes,Ds=0;Ds<Ms.length;Ds++)if(ws=Ms[Ds],this._distributor.isInsertionPoint(ws))return Is},render:function(){this._renderPending&&this._getRenderRoot()._render()},_render:function(){this._changePending=this._renderPending=!1,this._skipUpdateInsertionPoints?this._hasRendered||(this._insertionPoints=[]):this.updateInsertionPoints(),this._skipUpdateInsertionPoints=!1,this.distribute(),this.compose(),this._hasRendered=!0},forceRender:function(){this._renderPending=!0,this.render()},distribute:function(){for(var Is=this._distributor.distribute(),Ms=0;Ms<Is.length;Ms++)Is[Ms]._render()},updateInsertionPoints:function(){var Is=this.__insertionPoints;if(Is)for(var Ds,Ms=0;Ms<Is.length;Ms++)Ds=Is[Ms],Ds.getRootNode()!==this&&this._distributor.clearAssignedSlots(Ds);for(Is=this._insertionPoints=this._distributor.getInsertionPoints(),Ms=0;Ms<Is.length;Ms++)Ds=Is[Ms],Ds.__shady=Ds.__shady||{},Zo.recordChildNodes(Ds),Zo.recordChildNodes(Ds.parentNode)},get _insertionPoints(){return this.__insertionPoints||this.updateInsertionPoints(),this.__insertionPoints||(this.__insertionPoints=[])},set _insertionPoints(Is){this.__insertionPoints=Is},hasInsertionPoint:function(){return this._distributor.hasInsertionPoint()},compose:function(){this._composeTree()},_composeTree:function(){this._updateChildNodes(this.host,this._composeNode(this.host));for(var ws,ks,Is=this._insertionPoints||[],Ms=0,Ds=Is.length;Ms<Ds&&(ws=Is[Ms]);Ms++)ks=ws.parentNode,ks!==this.host&&ks!==this&&this._updateChildNodes(ks,this._composeNode(ks))},_composeNode:function(Is){var Ms=[];Is=(Is.shadyRoot||Is).childNodes;for(var ws,Ds=0;Ds<Is.length;Ds++)if(ws=Is[Ds],this._distributor.isInsertionPoint(ws))for(var Fs,ks=ws.__shady.distributedNodes||(ws.__shady.distributedNodes=[]),Ls=0;Ls<ks.length;Ls++)Fs=ks[Ls],this.isFinalDestination(ws,Fs)&&Ms.push(Fs);else Ms.push(ws);return Ms},isFinalDestination:function(Is,Ms){return this._distributor.isFinalDestination(Is,Ms)},_updateChildNodes:function(Is,Ms){for(var Fs,Ds=Ho.childNodes(Is),ws=So.calculateSplices(Ms,Ds),ks=0,Ls=0;ks<ws.length&&(Fs=ws[ks]);ks++){for(var Us,Hs=0;Hs<Fs.removed.length&&(Us=Fs.removed[Hs]);Hs++)Ho.parentNode(Us)===Is&&Qo.removeChild.call(Is,Us),Ds.splice(Fs.index+Ls,1);Ls-=Fs.addedCount}for(ks=0;ks<ws.length&&(Fs=ws[ks]);ks++)for(Ls=Ds[Fs.index],Hs=Fs.index;Hs<Fs.index+Fs.addedCount;Hs++)Us=Ms[Hs],Qo.insertBefore.call(Is,Us,Ls),Ds.splice(Hs,0,Us)},getInsertionPointTag:function(){return this._distributor.insertionPointTag}}),qo.patchShadowRootAccessors(Zt.prototype),hs.ShadyRoot=Zt,hs.attachShadow=function(Is,Ms){if(!Is)throw'Must provide a host.';if(!Ms)throw'Not enough arguments.';return new Zt(_s,Is)};var us={},ys=null;us.getRootNode=eo,us.query=function(Is,Ms,Ds){var ws=[];return lo(Is.childNodes,Ms,Ds,ws),ws},us.renderRootNode=function(Is){Is=Is.getRootNode(),bo.isShadyRoot(Is)&&Is.render()},us.setAttribute=function(Is,Ms,Ds){ys||(ys=window.ShadyCSS&&window.ShadyCSS.ScopingShim),ys&&'class'===Ms&&Is.ownerDocument===document?ys.setElementClass(Is,Ds):(Qo.setAttribute.call(Is,Ms,Ds),no(Is,Ms))},us.removeAttribute=function(Is,Ms){Qo.removeAttribute.call(Is,Ms),no(Is,Ms)},us.insertBefore=function(Is,Ms,Ds){if(Ds){var ws=Mo.getProperty(Ds,'parentNode');if(void 0!==ws&&ws!==Is)throw Error('The ref_node to be inserted before is not a child of this node')}Ms.nodeType!==Node.DOCUMENT_FRAGMENT_NODE&&(ws=Mo.getProperty(Ms,'parentNode'),ws?(Jt(ws,null,Ms),Qt(Ms)):(Ms.parentNode&&Qo.removeChild.call(Ms.parentNode,Ms),oo(Ms)));var Ls,ks=Ds,ws=bo.ownerShadyRootForNode(Is);ws&&(Ms.__noInsertionPoint&&!ws._changePending&&(ws._skipUpdateInsertionPoints=!0),Ls=to(Ms,Is,ws))&&(ws._skipUpdateInsertionPoints=!1),Mo.hasProperty(Is,'firstChild')&&Zo.recordInsertBefore(Ms,Is,ks);var ks=Ls,Fs=ws&&ws.getInsertionPointTag()||'',Hs=Ms.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!Ms.__noInsertionPoint&&Fs&&Ms.querySelector(Fs);if(Ls=Hs&&Hs.parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE,((Hs=Hs||Ms.localName===Fs)||Is.localName===Fs||ks)&&ws&&ro(ws),(ws=Is&&Is.shadyRoot&&Is.shadyRoot.hasInsertionPoint())&&ro(Is.shadyRoot),!(ws||Hs&&!Ls||Is.shadyRoot)){if(Ds&&(ws=bo.ownerShadyRootForNode(Ds))){var Us;if(Ds.localName===ws.getInsertionPointTag())a:{for(ws=Ds.assignedNodes({flatten:!0}),Ls=eo(Ds),ks=0,Fs=ws.length;ks<Fs&&(Us=ws[ks]);ks++)if(Ls.isFinalDestination(Ds,Us))break a;Us=void 0}else Us=Ds;Ds=Us}Us=bo.isShadyRoot(Is)?Is.host:Is,Ds?Qo.insertBefore.call(Us,Ms,Ds):Qo.appendChild.call(Us,Ms)}return Jt(Is,Ms),Ms},us.removeChild=function(Is,Ms){if(Ms.parentNode!==Is)throw Error('The node to be removed is not a child of this node: '+Ms);if(!Qt(Ms)){var Ds=bo.isShadyRoot(Is)?Is.host:Is,ws=Ho.parentNode(Ms);Ds===ws&&Qo.removeChild.call(Ds,Ms)}return Jt(Is,null,Ms),Ms},us.cloneNode=function(Is,Ms){if('template'==Is.localName)return Qo.cloneNode.call(Is,Ms);var Ds=Qo.cloneNode.call(Is,!1);if(Ms){Is=Is.childNodes,Ms=0;for(var ws;Ms<Is.length;Ms++)ws=Is[Ms].cloneNode(!0),Ds.appendChild(ws)}return Ds},us.importNode=ao;var ms={};io.prototype.schedule=function(){var Is=this;this._scheduled||(this._scheduled=!0,bo.microtask(function(){Is.flush()}))},io.prototype.flush=function(){if(this._scheduled){this._scheduled=!1;var Is=this.takeRecords();Is.length&&this.callbacks.forEach(function(Ms){Ms(Is)})}},io.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var Is=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];return this.addedNodes=[],this.removedNodes=[],Is}return[]},ms.observeChildren=function(Is,Ms){Is.__shady=Is.__shady||{},Is.__shady.observer||(Is.__shady.observer=new io),Is.__shady.observer.callbacks.add(Ms);var Ds=Is.__shady.observer;return{_callback:Ms,_observer:Ds,_node:Is,takeRecords:function(){return Ds.takeRecords()}}},ms.unobserveChildren=function(Is){var Ms=Is&&Is._observer;Ms&&(Ms.callbacks.delete(Is._callback),Ms.callbacks.size||(Is._node.__shady.observer=null))},ms.filterMutations=function(Is,Ms){var Ds=Ms.getRootNode();return Is.map(function(ws){var ks=Ds===ws.target.getRootNode();if(ks&&ws.addedNodes){if(ks=Array.from(ws.addedNodes).filter(function(Ls){return Ds===Ls.getRootNode()}),ks.length)return ws=Object.create(ws),Object.defineProperty(ws,'addedNodes',{value:ks,configurable:!0}),ws;}else if(ks)return ws}).filter(function(ws){return ws})};var gs={},fs={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},Ss={get composed(){return this.isTrusted&&void 0===this.__composed&&(this.__composed=fs[this.type]),this.__composed||!1},composedPath:function(){return this.__composedPath||(this.__composedPath=po(this.__target,this.composed)),this.__composedPath},get target(){return co(this.currentTarget,this.composedPath())},get relatedTarget(){return this.__relatedTarget?(this.__relatedTargetComposedPath||(this.__relatedTargetComposedPath=po(this.__relatedTarget,!0)),co(this.currentTarget,this.__relatedTargetComposedPath)):null},stopPropagation:function(){Event.prototype.stopPropagation.call(this),this.__propagationStopped=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this),this.__propagationStopped=this.__immediatePropagationStopped=!0}},Ns={focus:!0,blur:!0},bs=ho(window.Event),Cs=ho(window.CustomEvent),Es=ho(window.MouseEvent);gs.addEventListener=function(Is,Ms,Ds){if(Ms){var ws,ks,Ls;if('object'==typeof Ds?(ws=!!Ds.capture,ks=!!Ds.once,Ls=!!Ds.passive):(ws=!!Ds,Ls=ks=!1),Ms.__eventWrappers){for(var Fs=0;Fs<Ms.__eventWrappers.length;Fs++)if(Ms.__eventWrappers[Fs].node===this&&Ms.__eventWrappers[Fs].type===Is&&Ms.__eventWrappers[Fs].capture===ws&&Ms.__eventWrappers[Fs].once===ks&&Ms.__eventWrappers[Fs].passive===Ls)return;}else Ms.__eventWrappers=[];Fs=function(Hs){if(ks&&this.removeEventListener(Is,Ms,Ds),Hs.__target||mo(Hs),Hs.composed||-1<Hs.composedPath().indexOf(this))if(Hs.eventPhase===Event.BUBBLING_PHASE&&Hs.target===Hs.relatedTarget)Hs.stopImmediatePropagation();else return Ms(Hs)},Ms.__eventWrappers.push({node:this,type:Is,capture:ws,once:ks,passive:Ls,wrapperFn:Fs}),Ns[Is]?(this.__handlers=this.__handlers||{},this.__handlers[Is]=this.__handlers[Is]||{capture:[],bubble:[]},this.__handlers[Is][ws?'capture':'bubble'].push(Fs)):Qo.addEventListener.call(this,Is,Fs,Ds)}},gs.removeEventListener=function(Is,Ms,Ds){if(Ms){var ws,ks,Ls;'object'==typeof Ds?(ws=!!Ds.capture,ks=!!Ds.once,Ls=!!Ds.passive):(ws=!!Ds,Ls=ks=!1);var Fs;if(Ms.__eventWrappers)for(var Hs=0;Hs<Ms.__eventWrappers.length;Hs++)if(Ms.__eventWrappers[Hs].node===this&&Ms.__eventWrappers[Hs].type===Is&&Ms.__eventWrappers[Hs].capture===ws&&Ms.__eventWrappers[Hs].once===ks&&Ms.__eventWrappers[Hs].passive===Ls){Fs=Ms.__eventWrappers.splice(Hs,1)[0].wrapperFn,Ms.__eventWrappers.length||(Ms.__eventWrappers=void 0);break}Qo.removeEventListener.call(this,Is,Fs||Ms,Ds),Fs&&Ns[Is]&&this.__handlers&&this.__handlers[Is]&&(Is=this.__handlers[Is][ws?'capture':'bubble'],Fs=Is.indexOf(Fs),-1<Fs&&Is.splice(Fs,1))}},gs.patchEvents=function(){window.Event=bs,window.CustomEvent=Cs,window.MouseEvent=Es,yo()};var vs={},Ps={addEventListener:gs.addEventListener,removeEventListener:gs.removeEventListener,appendChild:function(Is){return us.insertBefore(this,Is)},insertBefore:function(Is,Ms){return us.insertBefore(this,Is,Ms)},removeChild:function(Is){return us.removeChild(this,Is)},replaceChild:function(Is,Ms){return this.insertBefore(Is,Ms),this.removeChild(Ms),Is},cloneNode:function(Is){return us.cloneNode(this,Is)},getRootNode:function(Is){return us.getRootNode(this,Is)},get isConnected(){var Is=this.ownerDocument;if(Is&&Is.contains&&Is.contains(this)||(Is=Is.documentElement)&&Is.contains&&Is.contains(this))return!0;for(Is=this;Is&&!(Is instanceof Document);)Is=Is.parentNode||(Is instanceof hs.ShadyRoot?Is.host:void 0);return!!(Is&&Is instanceof Document)}},Rs={get assignedSlot(){return go(this)}},Ts={querySelector:function(Is){return us.query(this,function(Ms){return bo.matchesSelector(Ms,Is)},function(Ms){return!!Ms})[0]||null},querySelectorAll:function(Is){return us.query(this,function(Ms){return bo.matchesSelector(Ms,Is)})}},xs={assignedNodes:function(Is){if('slot'===this.localName)return us.renderRootNode(this),this.__shady?(Is&&Is.flatten?this.__shady.distributedNodes:this.__shady.assignedNodes)||[]:[]}},As=bo.extendAll({setAttribute:function(Is,Ms){us.setAttribute(this,Is,Ms)},removeAttribute:function(Is){us.removeAttribute(this,Is)},attachShadow:function(Is){return hs.attachShadow(this,Is)},get slot(){return this.getAttribute('slot')},set slot(Is){this.setAttribute('slot',Is)},get assignedSlot(){return go(this)}},Ts,xs);Object.defineProperties(As,qo.ShadowRootAccessor);var Os=bo.extendAll({importNode:function(Is,Ms){return us.importNode(Is,Ms)}},Ts);Object.defineProperties(Os,{_activeElement:qo.ActiveElementAccessor.activeElement}),vs.patchBuiltins=function(){fo(window.Node.prototype,Ps),fo(window.Text.prototype,Rs),fo(window.DocumentFragment.prototype,Ts),fo(window.Element.prototype,As),fo(window.Document.prototype,Os),window.HTMLSlotElement&&fo(window.HTMLSlotElement.prototype,xs),bo.settings.hasDescriptors&&(qo.patchAccessors(window.Node.prototype),qo.patchAccessors(window.Text.prototype),qo.patchAccessors(window.DocumentFragment.prototype),qo.patchAccessors(window.Element.prototype),qo.patchAccessors((window.customElements&&customElements.nativeHTMLElement||HTMLElement).prototype),qo.patchAccessors(window.Document.prototype),window.HTMLSlotElement&&qo.patchAccessors(window.HTMLSlotElement.prototype))},bo.settings.inUse&&(window.ShadyDOM={inUse:bo.settings.inUse,patch:function(Is){return Is},isShadyRoot:bo.isShadyRoot,enqueue:Ao.enqueue,flush:Ao.flush,settings:bo.settings,filterMutations:ms.filterMutations,observeChildren:ms.observeChildren,unobserveChildren:ms.unobserveChildren,nativeMethods:Qo,nativeTree:Ho},gs.patchEvents(),vs.patchBuiltins(),window.ShadowRoot=hs.ShadyRoot)}).call(void 0),function(){'use strict';function Ft(jo){var Ko=po.has(jo);return jo=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(jo),!Ko&&jo}function Ht(jo){var Ko=jo.isConnected;if(void 0!==Ko)return Ko;for(;jo&&!(jo.__CE_isImportDocument||jo instanceof Document);)jo=jo.parentNode||(window.ShadowRoot&&jo instanceof ShadowRoot?jo.host:void 0);return jo&&(jo.__CE_isImportDocument||jo instanceof Document)}function Ut(jo,Ko){for(;Ko&&Ko!==jo&&!Ko.nextSibling;)Ko=Ko.parentNode;return Ko&&Ko!==jo?Ko.nextSibling:null}function Wt(jo,Ko,Go){Go=Go?Go:new Set;for(var Vo=jo;Vo;){if(Vo.nodeType===Node.ELEMENT_NODE){var Xo=Vo;Ko(Xo);var Yo=Xo.localName;if('link'===Yo&&'import'===Xo.getAttribute('rel')){if(Vo=Xo.import,Vo instanceof Node&&!Go.has(Vo))for(Go.add(Vo),Vo=Vo.firstChild;Vo;Vo=Vo.nextSibling)Wt(Vo,Ko,Go);Vo=Ut(jo,Xo);continue}else if('template'===Yo){Vo=Ut(jo,Xo);continue}if(Xo=Xo.__CE_shadowRoot)for(Xo=Xo.firstChild;Xo;Xo=Xo.nextSibling)Wt(Xo,Ko,Go)}Vo=Vo.firstChild?Vo.firstChild:Ut(jo,Vo)}}function qt(jo,Ko,Go){jo[Ko]=Go}function Bt(){this.a=new Map,this.f=new Map,this.c=[],this.b=!1}function jt(jo,Ko,Go){jo.a.set(Ko,Go),jo.f.set(Go.constructor,Go)}function Kt(jo,Ko){jo.b=!0,jo.c.push(Ko)}function Gt(jo,Ko){jo.b&&Wt(Ko,function(Go){return Vt(jo,Go)})}function Vt(jo,Ko){if(jo.b&&!Ko.__CE_patched){Ko.__CE_patched=!0;for(var Go=0;Go<jo.c.length;Go++)jo.c[Go](Ko)}}function Xt(jo,Ko){var Go=[];for(Wt(Ko,function(Xo){return Go.push(Xo)}),Ko=0;Ko<Go.length;Ko++){var Vo=Go[Ko];1===Vo.__CE_state?jo.connectedCallback(Vo):$t(jo,Vo)}}function Yt(jo,Ko){var Go=[];for(Wt(Ko,function(Xo){return Go.push(Xo)}),Ko=0;Ko<Go.length;Ko++){var Vo=Go[Ko];1===Vo.__CE_state&&jo.disconnectedCallback(Vo)}}function zt(jo,Ko,Go){Go=Go?Go:new Set;var Vo=[];if(Wt(Ko,function(Xo){if('link'===Xo.localName&&'import'===Xo.getAttribute('rel')){var Yo=Xo.import;Yo instanceof Node&&'complete'===Yo.readyState?(Yo.__CE_isImportDocument=!0,Yo.__CE_hasRegistry=!0):Xo.addEventListener('load',function(){var zo=Xo.import;zo.__CE_documentLoadHandled||(zo.__CE_documentLoadHandled=!0,zo.__CE_isImportDocument=!0,zo.__CE_hasRegistry=!0,new Set(Go),Go.delete(zo),zt(jo,zo,Go))})}else Vo.push(Xo)},Go),jo.b)for(Ko=0;Ko<Vo.length;Ko++)Vt(jo,Vo[Ko]);for(Ko=0;Ko<Vo.length;Ko++)$t(jo,Vo[Ko])}function $t(jo,Ko){if(void 0===Ko.__CE_state){var Go=jo.a.get(Ko.localName);if(Go){Go.constructionStack.push(Ko);var Vo=Go.constructor;try{try{if(new Vo!==Ko)throw Error('The custom element constructor did not produce the element being upgraded.')}finally{Go.constructionStack.pop()}}catch(zo){throw Ko.__CE_state=2,zo}if(Ko.__CE_state=1,Ko.__CE_definition=Go,Go.attributeChangedCallback)for(Go=Go.observedAttributes,Vo=0;Vo<Go.length;Vo++){var Xo=Go[Vo],Yo=Ko.getAttribute(Xo);null!==Yo&&jo.attributeChangedCallback(Ko,Xo,null,Yo,null)}Ht(Ko)&&jo.connectedCallback(Ko)}}}function Zt(jo,Ko){this.c=jo,this.a=Ko,this.b=void 0,zt(this.c,this.a),'loading'===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function Qt(jo){jo.b&&jo.b.disconnect()}function Jt(){var jo=this;this.b=this.a=void 0,this.c=new Promise(function(Ko){jo.b=Ko,jo.a&&Ko(jo.a)})}function eo(jo){if(jo.a)throw Error('Already resolved.');jo.a=void 0,jo.b&&jo.b(void 0)}function to(jo){this.f=!1,this.a=jo,this.h=new Map,this.g=function(Ko){return Ko()},this.b=!1,this.c=[],this.j=new Zt(jo,document)}function oo(){var jo=qo;window.HTMLElement=function(){function Ko(){var Go=this.constructor,Vo=jo.f.get(Go);if(!Vo)throw Error('The custom element being constructed was not registered with `customElements`.');var Xo=Vo.constructionStack;if(!Xo.length)return Xo=co.call(document,Vo.localName),Object.setPrototypeOf(Xo,Go.prototype),Xo.__CE_state=1,Xo.__CE_definition=Vo,Vt(jo,Xo),Xo;var Vo=Xo.length-1,Yo=Xo[Vo];if(Yo===io)throw Error('The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.');return Xo[Vo]=io,Object.setPrototypeOf(Yo,Go.prototype),Vt(jo,Yo),Yo}return Ko.prototype=Fo.prototype,Ko}()}function so(jo,Ko,Go){Ko.prepend=function(){for(var Xo=[],Yo=0;Yo<arguments.length;++Yo)Xo[Yo-0]=arguments[Yo];Yo=Xo.filter(function($o){return $o instanceof Node&&Ht($o)}),Go.i.apply(this,Xo);for(var zo=0;zo<Yo.length;zo++)Yt(jo,Yo[zo]);if(Ht(this))for(Yo=0;Yo<Xo.length;Yo++)zo=Xo[Yo],zo instanceof Element&&Xt(jo,zo)},Ko.append=function(){for(var Xo=[],Yo=0;Yo<arguments.length;++Yo)Xo[Yo-0]=arguments[Yo];Yo=Xo.filter(function($o){return $o instanceof Node&&Ht($o)}),Go.append.apply(this,Xo);for(var zo=0;zo<Yo.length;zo++)Yt(jo,Yo[zo]);if(Ht(this))for(Yo=0;Yo<Xo.length;Yo++)zo=Xo[Yo],zo instanceof Element&&Xt(jo,zo)}}function ro(){var jo=qo;qt(Document.prototype,'createElement',function(Ko){if(this.__CE_hasRegistry){var Go=jo.a.get(Ko);if(Go)return new Go.constructor}return Ko=co.call(this,Ko),Vt(jo,Ko),Ko}),qt(Document.prototype,'importNode',function(Ko,Go){return Ko=_o.call(this,Ko,Go),this.__CE_hasRegistry?zt(jo,Ko):Gt(jo,Ko),Ko}),qt(Document.prototype,'createElementNS',function(Ko,Go){if(this.__CE_hasRegistry&&(null===Ko||'http://www.w3.org/1999/xhtml'===Ko)){var Vo=jo.a.get(Go);if(Vo)return new Vo.constructor}return Ko=ho.call(this,Ko,Go),Vt(jo,Ko),Ko}),so(jo,Document.prototype,{i:uo,append:yo})}function no(){function jo(Go,Vo){Object.defineProperty(Go,'textContent',{enumerable:Vo.enumerable,configurable:!0,get:Vo.get,set:function(Xo){if(this.nodeType===Node.TEXT_NODE)Vo.set.call(this,Xo);else{var Yo;if(this.firstChild){var zo=this.childNodes,$o=zo.length;if(0<$o&&Ht(this))for(var Yo=Array($o),Zo=0;Zo<$o;Zo++)Yo[Zo]=zo[Zo]}if(Vo.set.call(this,Xo),Yo)for(Xo=0;Xo<Yo.length;Xo++)Yt(Ko,Yo[Xo])}}})}var Ko=qo;qt(Node.prototype,'insertBefore',function(Go,Vo){if(Go instanceof DocumentFragment){var Xo=Array.prototype.slice.apply(Go.childNodes);if(Go=fo.call(this,Go,Vo),Ht(this))for(Vo=0;Vo<Xo.length;Vo++)Xt(Ko,Xo[Vo]);return Go}return Xo=Ht(Go),Vo=fo.call(this,Go,Vo),Xo&&Yt(Ko,Go),Ht(this)&&Xt(Ko,Go),Vo}),qt(Node.prototype,'appendChild',function(Go){if(Go instanceof DocumentFragment){var Vo=Array.prototype.slice.apply(Go.childNodes);if(Go=go.call(this,Go),Ht(this))for(var Xo=0;Xo<Vo.length;Xo++)Xt(Ko,Vo[Xo]);return Go}return Vo=Ht(Go),Xo=go.call(this,Go),Vo&&Yt(Ko,Go),Ht(this)&&Xt(Ko,Go),Xo}),qt(Node.prototype,'cloneNode',function(Go){return Go=mo.call(this,Go),this.ownerDocument.__CE_hasRegistry?zt(Ko,Go):Gt(Ko,Go),Go}),qt(Node.prototype,'removeChild',function(Go){var Vo=Ht(Go),Xo=So.call(this,Go);return Vo&&Yt(Ko,Go),Xo}),qt(Node.prototype,'replaceChild',function(Go,Vo){if(Go instanceof DocumentFragment){var Xo=Array.prototype.slice.apply(Go.childNodes);if(Go=No.call(this,Go,Vo),Ht(this))for(Yt(Ko,Vo),Vo=0;Vo<Xo.length;Vo++)Xt(Ko,Xo[Vo]);return Go}var Xo=Ht(Go),Yo=No.call(this,Go,Vo),zo=Ht(this);return zo&&Yt(Ko,Vo),Xo&&Yt(Ko,Go),zo&&Xt(Ko,Go),Yo}),bo&&bo.get?jo(Node.prototype,bo):Kt(Ko,function(Go){jo(Go,{enumerable:!0,configurable:!0,get:function(){for(var Vo=[],Xo=0;Xo<this.childNodes.length;Xo++)Vo.push(this.childNodes[Xo].textContent);return Vo.join('')},set:function(Vo){for(;this.firstChild;)So.call(this,this.firstChild);go.call(this,document.createTextNode(Vo))}})})}function lo(jo){var Ko=Element.prototype;Ko.before=function(){for(var Vo=[],Xo=0;Xo<arguments.length;++Xo)Vo[Xo-0]=arguments[Xo];Xo=Vo.filter(function(zo){return zo instanceof Node&&Ht(zo)}),Do.apply(this,Vo);for(var Yo=0;Yo<Xo.length;Yo++)Yt(jo,Xo[Yo]);if(Ht(this))for(Xo=0;Xo<Vo.length;Xo++)Yo=Vo[Xo],Yo instanceof Element&&Xt(jo,Yo)},Ko.after=function(){for(var Vo=[],Xo=0;Xo<arguments.length;++Xo)Vo[Xo-0]=arguments[Xo];Xo=Vo.filter(function(zo){return zo instanceof Node&&Ht(zo)}),wo.apply(this,Vo);for(var Yo=0;Yo<Xo.length;Yo++)Yt(jo,Xo[Yo]);if(Ht(this))for(Xo=0;Xo<Vo.length;Xo++)Yo=Vo[Xo],Yo instanceof Element&&Xt(jo,Yo)},Ko.replaceWith=function(){for(var Vo=[],Xo=0;Xo<arguments.length;++Xo)Vo[Xo-0]=arguments[Xo];var Xo=Vo.filter(function($o){return $o instanceof Node&&Ht($o)}),Yo=Ht(this);ko.apply(this,Vo);for(var zo=0;zo<Xo.length;zo++)Yt(jo,Xo[zo]);if(Yo)for(Yt(jo,this),Xo=0;Xo<Vo.length;Xo++)Yo=Vo[Xo],Yo instanceof Element&&Xt(jo,Yo)},Ko.remove=function(){var Go=Ht(this);Lo.call(this),Go&&Yt(jo,this)}}function ao(){function jo(Xo,Yo){Object.defineProperty(Xo,'innerHTML',{enumerable:Yo.enumerable,configurable:!0,get:Yo.get,set:function(zo){var Zo,$o=this;if(Ht(this)&&(Zo=[],Wt(this,function(es){es!==$o&&Zo.push(es)})),Yo.set.call(this,zo),Zo)for(var Jo,Qo=0;Qo<Zo.length;Qo++)Jo=Zo[Qo],1===Jo.__CE_state&&Go.disconnectedCallback(Jo);return this.ownerDocument.__CE_hasRegistry?zt(Go,this):Gt(Go,this),zo}})}function Ko(Xo,Yo){qt(Xo,'insertAdjacentElement',function(zo,$o){var Zo=Ht($o);return zo=Yo.call(this,zo,$o),Zo&&Yt(Go,$o),Ht(zo)&&Xt(Go,$o),zo})}var Go=qo;if(Co?qt(Element.prototype,'attachShadow',function(Xo){return this.__CE_shadowRoot=Xo=Co.call(this,Xo)}):console.warn('Custom Elements: `Element#attachShadow` was not patched.'),Eo&&Eo.get)jo(Element.prototype,Eo);else if(Ho&&Ho.get)jo(HTMLElement.prototype,Ho);else{var Vo=co.call(document,'div');Kt(Go,function(Xo){jo(Xo,{enumerable:!0,configurable:!0,get:function(){return mo.call(this,!0).innerHTML},set:function(Yo){var zo='template'===this.localName?this.content:this;for(Vo.innerHTML=Yo;0<zo.childNodes.length;)So.call(zo,zo.childNodes[0]);for(;0<Vo.childNodes.length;)go.call(zo,Vo.childNodes[0])}})})}qt(Element.prototype,'setAttribute',function(Xo,Yo){if(1!==this.__CE_state)return Po.call(this,Xo,Yo);var zo=vo.call(this,Xo);Po.call(this,Xo,Yo),Yo=vo.call(this,Xo),zo!==Yo&&Go.attributeChangedCallback(this,Xo,zo,Yo,null)}),qt(Element.prototype,'setAttributeNS',function(Xo,Yo,zo){if(1!==this.__CE_state)return xo.call(this,Xo,Yo,zo);var $o=To.call(this,Xo,Yo);xo.call(this,Xo,Yo,zo),zo=To.call(this,Xo,Yo),$o!==zo&&Go.attributeChangedCallback(this,Yo,$o,zo,Xo)}),qt(Element.prototype,'removeAttribute',function(Xo){if(1!==this.__CE_state)return Ro.call(this,Xo);var Yo=vo.call(this,Xo);Ro.call(this,Xo),null!==Yo&&Go.attributeChangedCallback(this,Xo,Yo,null,null)}),qt(Element.prototype,'removeAttributeNS',function(Xo,Yo){if(1!==this.__CE_state)return Ao.call(this,Xo,Yo);var zo=To.call(this,Xo,Yo);Ao.call(this,Xo,Yo);var $o=To.call(this,Xo,Yo);zo!==$o&&Go.attributeChangedCallback(this,Yo,zo,$o,Xo)}),Uo?Ko(HTMLElement.prototype,Uo):Oo?Ko(Element.prototype,Oo):console.warn('Custom Elements: `Element#insertAdjacentElement` was not patched.'),so(Go,Element.prototype,{i:Io,append:Mo}),lo(Go)}var io=new function(){},po=new Set('annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph'.split(' '));Bt.prototype.connectedCallback=function(jo){var Ko=jo.__CE_definition;Ko.connectedCallback&&Ko.connectedCallback.call(jo)},Bt.prototype.disconnectedCallback=function(jo){var Ko=jo.__CE_definition;Ko.disconnectedCallback&&Ko.disconnectedCallback.call(jo)},Bt.prototype.attributeChangedCallback=function(jo,Ko,Go,Vo,Xo){var Yo=jo.__CE_definition;Yo.attributeChangedCallback&&-1<Yo.observedAttributes.indexOf(Ko)&&Yo.attributeChangedCallback.call(jo,Ko,Go,Vo,Xo)},Zt.prototype.f=function(jo){var Ko=this.a.readyState;for('interactive'!==Ko&&'complete'!==Ko||Qt(this),Ko=0;Ko<jo.length;Ko++)for(var Go=jo[Ko].addedNodes,Vo=0;Vo<Go.length;Vo++)zt(this.c,Go[Vo])},to.prototype.l=function(jo,Ko){var Go=this;if(!(Ko instanceof Function))throw new TypeError('Custom element constructors must be functions.');if(!Ft(jo))throw new SyntaxError('The element name \''+jo+'\' is not valid.');if(this.a.a.get(jo))throw Error('A custom element with name \''+jo+'\' has already been defined.');if(this.f)throw Error('A custom element is already being defined.');this.f=!0;var Vo,Xo,Yo,zo,$o;try{var Zo=function(Jo){var es=Qo[Jo];if(void 0!==es&&!(es instanceof Function))throw Error('The \''+Jo+'\' callback must be a function.');return es},Qo=Ko.prototype;if(!(Qo instanceof Object))throw new TypeError('The custom element constructor\'s prototype is not an object.');Vo=Zo('connectedCallback'),Xo=Zo('disconnectedCallback'),Yo=Zo('adoptedCallback'),zo=Zo('attributeChangedCallback'),$o=Ko.observedAttributes||[]}catch(Jo){return}finally{this.f=!1}jt(this.a,jo,{localName:jo,constructor:Ko,connectedCallback:Vo,disconnectedCallback:Xo,adoptedCallback:Yo,attributeChangedCallback:zo,observedAttributes:$o,constructionStack:[]}),this.c.push(jo),this.b||(this.b=!0,this.g(function(){if(!1!==Go.b)for(Go.b=!1,zt(Go.a,document);0<Go.c.length;){var Jo=Go.c.shift();(Jo=Go.h.get(Jo))&&eo(Jo)}}))},to.prototype.get=function(jo){if(jo=this.a.a.get(jo))return jo.constructor},to.prototype.o=function(jo){if(!Ft(jo))return Promise.reject(new SyntaxError('\''+jo+'\' is not a valid custom element name.'));var Ko=this.h.get(jo);return Ko?Ko.c:(Ko=new Jt,this.h.set(jo,Ko),this.a.a.get(jo)&&-1===this.c.indexOf(jo)&&eo(Ko),Ko.c)},to.prototype.m=function(jo){Qt(this.j);var Ko=this.g;this.g=function(Go){return jo(function(){return Ko(Go)})}},window.CustomElementRegistry=to,to.prototype.define=to.prototype.l,to.prototype.get=to.prototype.get,to.prototype.whenDefined=to.prototype.o,to.prototype.polyfillWrapFlushCallback=to.prototype.m;var co=window.Document.prototype.createElement,ho=window.Document.prototype.createElementNS,_o=window.Document.prototype.importNode,uo=window.Document.prototype.prepend,yo=window.Document.prototype.append,mo=window.Node.prototype.cloneNode,go=window.Node.prototype.appendChild,fo=window.Node.prototype.insertBefore,So=window.Node.prototype.removeChild,No=window.Node.prototype.replaceChild,bo=Object.getOwnPropertyDescriptor(window.Node.prototype,'textContent'),Co=window.Element.prototype.attachShadow,Eo=Object.getOwnPropertyDescriptor(window.Element.prototype,'innerHTML'),vo=window.Element.prototype.getAttribute,Po=window.Element.prototype.setAttribute,Ro=window.Element.prototype.removeAttribute,To=window.Element.prototype.getAttributeNS,xo=window.Element.prototype.setAttributeNS,Ao=window.Element.prototype.removeAttributeNS,Oo=window.Element.prototype.insertAdjacentElement,Io=window.Element.prototype.prepend,Mo=window.Element.prototype.append,Do=window.Element.prototype.before,wo=window.Element.prototype.after,ko=window.Element.prototype.replaceWith,Lo=window.Element.prototype.remove,Fo=window.HTMLElement,Ho=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,'innerHTML'),Uo=window.HTMLElement.prototype.insertAdjacentElement,Wo=window.customElements;if(!Wo||Wo.forcePolyfill||'function'!=typeof Wo.define||'function'!=typeof Wo.get){var qo=new Bt;oo(),ro(),no(),ao(),document.__CE_hasRegistry=!0;var Bo=new to(qo);Object.defineProperty(window,'customElements',{configurable:!0,enumerable:!0,value:Bo})}}.call(self);class xe{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText='',this.cssText='',this.atRule=!1,this.type=0,this.keyframesName='',this.selector='',this.parsedSelector=''}}const Ae={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Oe='{',Ie='}',Me={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},De='--';let Le=!(window.ShadyDOM&&window.ShadyDOM.inUse),Fe=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?ae(window.ShadyCSS):window.WebComponents&&ae(window.WebComponents.flags);const He=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,Ue=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,We=/(--[\w-]+)\s*([:,;)]|$)/gi,qe=/(animation\s*:)|(animation-name\s*:)/,Be=/@media[^(]*(\([^)]*\))/,je=/\{[^}]*\}/g;let Ve=null;const Xe='style-scope';class Ye{get SCOPE_NAME(){return Xe}dom(Ft,Ht,Ut){Ft.__styleScoped?Ft.__styleScoped=null:this._transformDom(Ft,Ht||'',Ut)}_transformDom(Ft,Ht,Ut){Ft.nodeType===Node.ELEMENT_NODE&&this.element(Ft,Ht,Ut);let Wt='template'===Ft.localName?(Ft.content||Ft._content).childNodes:Ft.children||Ft.childNodes;if(Wt)for(let qt=0;qt<Wt.length;qt++)this._transformDom(Wt[qt],Ht,Ut)}element(Ft,Ht,Ut){if(Ht)if(Ft.classList)Ut?(Ft.classList.remove(Xe),Ft.classList.remove(Ht)):(Ft.classList.add(Xe),Ft.classList.add(Ht));else if(Ft.getAttribute){let Wt=Ft.getAttribute('class');if(!Ut){let qt=(Wt?Wt+' ':'')+Xe+' '+Ht;fe(Ft,qt)}else if(Wt){let qt=Wt.replace(Xe,'').replace(Ht,'');fe(Ft,qt)}}}elementStyles(Ft,Ht,Ut){let Wt=Ft.__cssBuild,qt='';if(Le||'shady'===Wt)qt=de(Ht,Ut);else{let{is:Bt,typeExtension:jt}=Se(Ft);qt=this.css(Ht,Bt,jt,Ut)+'\n\n'}return qt.trim()}css(Ft,Ht,Ut,Wt){let qt=this._calcHostScope(Ht,Ut);Ht=this._calcElementScope(Ht);let Bt=this;return de(Ft,function(jt){jt.isScoped||(Bt.rule(jt,Ht,qt),jt.isScoped=!0),Wt&&Wt(jt,Ht,qt)})}_calcElementScope(Ft){return Ft?'.'+Ft:''}_calcHostScope(Ft,Ht){return Ht?`[is=${Ft}]`:Ft}rule(Ft,Ht,Ut){this._transformRule(Ft,this._transformComplexSelector,Ht,Ut)}_transformRule(Ft,Ht,Ut,Wt){Ft.selector=Ft.transformedSelector=this._transformRuleCss(Ft,Ht,Ut,Wt)}_transformRuleCss(Ft,Ht,Ut,Wt){let qt=Ft.selector.split(Ze);if(!pe(Ft))for(let Kt,Bt=0,jt=qt.length;Bt<jt&&(Kt=qt[Bt]);Bt++)qt[Bt]=Ht.call(this,Kt,Ut,Wt);return qt.join(Ze)}_transformComplexSelector(Ft,Ht,Ut){let Wt=!1;return Ft=Ft.trim(),Ft=Ft.replace(ze,(qt,Bt,jt)=>`:${Bt}(${jt.replace(/\s/g,'')})`),Ft=Ft.replace(st,`${et} $1`),Ft=Ft.replace(Qe,(qt,Bt,jt)=>{if(!Wt){let Kt=this._transformCompoundSelector(jt,Bt,Ht,Ut);Wt=Wt||Kt.stop,Bt=Kt.combinator,jt=Kt.value}return Bt+jt}),Ft}_transformCompoundSelector(Ft,Ht,Ut,Wt){let qt=Ft.indexOf(ot);0<=Ft.indexOf(et)?Ft=this._transformHostSelector(Ft,Wt):0!==qt&&(Ft=Ut?this._transformSimpleSelector(Ft,Ut):Ft);let Bt=!1;0<=qt&&(Ht='',Bt=!0);let jt;return Bt&&(jt=!0,Bt&&(Ft=Ft.replace(nt,(Kt,Gt)=>` > ${Gt}`))),Ft=Ft.replace(lt,(Kt,Gt,Vt)=>`[dir="${Vt}"] ${Gt}, ${Gt}[dir="${Vt}"]`),{value:Ft,combinator:Ht,stop:jt}}_transformSimpleSelector(Ft,Ht){let Ut=Ft.split(dt);return Ut[0]+=Ht,Ut.join(dt)}_transformHostSelector(Ft,Ht){let Ut=Ft.match(rt),Wt=Ut&&Ut[2].trim()||'';if(Wt){if(!Wt[0].match(Je)){let qt=Wt.split(Je)[0];return qt===Ht?Wt:'should_not_match'}return Ft.replace(rt,function(qt,Bt,jt){return Ht+jt})}return Ft.replace(et,Ht)}documentRule(Ft){Ft.selector=Ft.parsedSelector,this.normalizeRootSelector(Ft),this._transformRule(Ft,this._transformDocumentSelector)}normalizeRootSelector(Ft){Ft.selector===':root'&&(Ft.selector='html')}_transformDocumentSelector(Ft){return Ft.match(ot)?this._transformComplexSelector(Ft,$e):this._transformSimpleSelector(Ft.trim(),$e)}}let ze=/:(nth[-\w]+)\(([^)]+)\)/,$e=`:not(.${Xe})`,Ze=',',Qe=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,Je=/[[.:#*]/,et=':host',ot='::slotted',st=/^(::slotted)/,rt=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,nt=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,lt=/(.*):dir\((?:(ltr|rtl))\)/,dt=':';var ct=new Ye;const ht='__styleInfo';class _t{static get(Ft){return Ft?Ft[ht]:null}static set(Ft,Ht){return Ft[ht]=Ht,Ht}constructor(Ft,Ht,Ut,Wt,qt,Bt){this.styleRules=Ft||null,this.placeholder=Ht||null,this.ownStylePropertyNames=Ut||[],this.overrideStyleProperties=null,this.elementName=Wt||'',this.cssBuild=Bt||'',this.typeExtension=qt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}_getStyleRules(){return this.styleRules}}_t.prototype._getStyleRules=_t.prototype._getStyleRules;const ut=(Ft=>Ft.matches||Ft.matchesSelector||Ft.mozMatchesSelector||Ft.msMatchesSelector||Ft.oMatchesSelector||Ft.webkitMatchesSelector)(window.Element.prototype),yt=navigator.userAgent.match('Trident'),mt='x-scope';class gt{get XSCOPE_NAME(){return mt}decorateStyles(Ft){let Ht=this,Ut={},Wt=[],qt=0;ce(Ft,function(jt){Ht.decorateRule(jt),jt.index=qt++,Ht.collectPropertiesInCssText(jt.propertyInfo.cssText,Ut)},function(Kt){Wt.push(Kt)}),Ft._keyframes=Wt;let Bt=[];for(let jt in Ut)Bt.push(jt);return Bt}decorateRule(Ft){if(Ft.propertyInfo)return Ft.propertyInfo;let Ht={},Ut={},Wt=this.collectProperties(Ft,Ut);return Wt&&(Ht.properties=Ut,Ft.rules=null),Ht.cssText=this.collectCssText(Ft),Ft.propertyInfo=Ht,Ht}collectProperties(Ft,Ht){let Ut=Ft.propertyInfo;if(!Ut){let Wt,Bt=Ft.parsedCssText,jt,Kt;for(;Wt=He.exec(Bt);)jt=(Wt[2]||Wt[3]).trim(),('inherit'!==jt||'unset'!==jt)&&(Ht[Wt[1].trim()]=jt),Kt=!0;return Kt}else if(Ut.properties)return Object.assign(Ht,Ut.properties),!0}collectCssText(Ft){return this.collectConsumingCssText(Ft.parsedCssText)}collectConsumingCssText(Ft){return Ft.replace(je,'').replace(He,'')}collectPropertiesInCssText(Ft,Ht){for(let Ut,Wt;Ut=We.exec(Ft);)Wt=Ut[1],':'!==Ut[2]&&(Ht[Wt]=!0)}reify(Ft){let Ht=Object.getOwnPropertyNames(Ft);for(let Wt,Ut=0;Ut<Ht.length;Ut++)Wt=Ht[Ut],Ft[Wt]=this.valueForProperty(Ft[Wt],Ft)}valueForProperty(Ft,Ht){if(Ft)if(0<=Ft.indexOf(';'))Ft=this.valueForProperties(Ft,Ht);else{let Ut=this;Ft=ge(Ft,function(qt,Bt,jt,Kt){if(!Bt)return qt+Kt;let Gt=Ut.valueForProperty(Ht[Bt],Ht);return Gt&&'initial'!==Gt?'apply-shim-inherit'===Gt&&(Gt='inherit'):Gt=Ut.valueForProperty(Ht[jt]||jt,Ht)||jt,qt+(Gt||'')+Kt})}return Ft&&Ft.trim()||''}valueForProperties(Ft,Ht){let Ut=Ft.split(';');for(let qt,Bt,Wt=0;Wt<Ut.length;Wt++)if(qt=Ut[Wt]){if(Ue.lastIndex=0,Bt=Ue.exec(qt),Bt)qt=this.valueForProperty(Ht[Bt[1]],Ht);else{let jt=qt.indexOf(':');if(-1!==jt){let Kt=qt.substring(jt);Kt=Kt.trim(),Kt=this.valueForProperty(Kt,Ht)||Kt,qt=qt.substring(0,jt)+Kt}}Ut[Wt]=qt&&qt.lastIndexOf(';')===qt.length-1?qt.slice(0,-1):qt||''}return Ut.join(';')}applyProperties(Ft,Ht){let Ut='';Ft.propertyInfo||this.decorateRule(Ft),Ft.propertyInfo.cssText&&(Ut=this.valueForProperties(Ft.propertyInfo.cssText,Ht)),Ft.cssText=Ut}applyKeyframeTransforms(Ft,Ht){let Ut=Ft.cssText,Wt=Ft.cssText;if(null==Ft.hasAnimations&&(Ft.hasAnimations=qe.test(Ut)),Ft.hasAnimations){let qt;if(null==Ft.keyframeNamesToTransform)for(let Bt in Ft.keyframeNamesToTransform=[],Ht)qt=Ht[Bt],Wt=qt(Ut),Ut!==Wt&&(Ut=Wt,Ft.keyframeNamesToTransform.push(Bt));else{for(let Bt=0;Bt<Ft.keyframeNamesToTransform.length;++Bt)qt=Ht[Ft.keyframeNamesToTransform[Bt]],Ut=qt(Ut);Wt=Ut}}Ft.cssText=Wt}propertyDataFromStyles(Ft,Ht){let Ut={},Wt=this,qt=[];return ce(Ft,function(Bt){Bt.propertyInfo||Wt.decorateRule(Bt);let jt=Bt.transformedSelector||Bt.parsedSelector;Ht&&Bt.propertyInfo.properties&&jt&&ut.call(Ht,jt)&&(Wt.collectProperties(Bt,Ut),Ne(Bt.index,qt))},null,!0),{properties:Ut,key:qt}}whenHostOrRootRule(Ft,Ht,Ut,Wt){if(Ht.propertyInfo||this.decorateRule(Ht),!!Ht.propertyInfo.properties){let{is:qt,typeExtension:Bt}=Se(Ft),jt=Ft.is?ct._calcHostScope(qt,Bt):'html',Kt=Ht.parsedSelector,Gt=':host > *'===Kt||'html'===Kt,Vt=0===Kt.indexOf(':host')&&!Gt;if('shady'===Ut&&(Gt=Kt===jt+' > *.'+jt||-1!==Kt.indexOf('html'),Vt=!Gt&&0===Kt.indexOf(jt)),'shadow'===Ut&&(Gt=':host > *'===Kt||'html'===Kt,Vt=Vt&&!Gt),Gt||Vt){let Xt=jt;Vt&&(Le&&!Ht.transformedSelector&&(Ht.transformedSelector=ct._transformRuleCss(Ht,ct._transformComplexSelector,ct._calcElementScope(qt),jt)),Xt=Ht.transformedSelector||jt),Wt({selector:Xt,isHost:Vt,isRoot:Gt})}}}hostAndRootPropertiesForScope(Ft,Ht){let Ut={},Wt={},qt=this,Bt=Ht&&Ht.__cssBuild;return ce(Ht,function(jt){qt.whenHostOrRootRule(Ft,jt,Bt,function(Kt){let Gt=Ft._element||Ft;ut.call(Gt,Kt.selector)&&(Kt.isHost?qt.collectProperties(jt,Ut):qt.collectProperties(jt,Wt))})},null,!0),{rootProps:Wt,hostProps:Ut}}transformStyles(Ft,Ht,Ut){let Wt=this,{is:qt,typeExtension:Bt}=Se(Ft),jt=ct._calcHostScope(qt,Bt),Kt=Ft.extends?'\\'+jt.slice(0,-1)+'\\]':jt,Gt=new RegExp('(?:^|[^.#[:])'+Kt+'($|[.:[\\s>+~])'),Vt=_t.get(Ft).styleRules,Xt=this._elementKeyframeTransforms(Ft,Vt,Ut);return ct.elementStyles(Ft,Vt,function(Yt){Wt.applyProperties(Yt,Ht),Le||pe(Yt)||!Yt.cssText||(Wt.applyKeyframeTransforms(Yt,Xt),Wt._scopeSelector(Yt,Gt,jt,Ut))})}_elementKeyframeTransforms(Ft,Ht,Ut){let Wt=Ht._keyframes,qt={};if(!Le&&Wt)for(let Bt=0,jt=Wt[Bt];Bt<Wt.length;jt=Wt[++Bt])this._scopeKeyframes(jt,Ut),qt[jt.keyframesName]=this._keyframesRuleTransformer(jt);return qt}_keyframesRuleTransformer(Ft){return function(Ht){return Ht.replace(Ft.keyframesNameRx,Ft.transformedKeyframesName)}}_scopeKeyframes(Ft,Ht){Ft.keyframesNameRx=new RegExp(Ft.keyframesName,'g'),Ft.transformedKeyframesName=Ft.keyframesName+'-'+Ht,Ft.transformedSelector=Ft.transformedSelector||Ft.selector,Ft.selector=Ft.transformedSelector.replace(Ft.keyframesName,Ft.transformedKeyframesName)}_scopeSelector(Ft,Ht,Ut,Wt){Ft.transformedSelector=Ft.transformedSelector||Ft.selector;let qt=Ft.transformedSelector,Bt='.'+Wt,jt=qt.split(',');for(let Vt,Kt=0,Gt=jt.length;Kt<Gt&&(Vt=jt[Kt]);Kt++)jt[Kt]=Vt.match(Ht)?Vt.replace(Ut,Bt):Bt+' '+Vt;Ft.selector=jt.join(',')}applyElementScopeSelector(Ft,Ht,Ut){let Wt=Ft.getAttribute('class')||'',qt=Wt;Ut&&(qt=Wt.replace(new RegExp('\\s*'+mt+'\\s*'+Ut+'\\s*','g'),' ')),qt+=(qt?' ':'')+mt+' '+Ht,Wt!==qt&&fe(Ft,qt)}applyElementStyle(Ft,Ht,Ut,Wt){let qt=Wt?Wt.textContent||'':this.transformStyles(Ft,Ht,Ut),Bt=_t.get(Ft),jt=Bt.customStyle;return jt&&!Le&&jt!==Wt&&(jt._useCount--,0>=jt._useCount&&jt.parentNode&&jt.parentNode.removeChild(jt)),Le?Bt.customStyle?(Bt.customStyle.textContent=qt,Wt=Bt.customStyle):qt&&(Wt=he(qt,Ut,Ft.shadowRoot,Bt.placeholder)):Wt?!Wt.parentNode&&ye(Wt,null,Bt.placeholder):qt&&(Wt=he(qt,Ut,null,Bt.placeholder)),Wt&&(Wt._useCount=Wt._useCount||0,Bt.customStyle!=Wt&&Wt._useCount++,Bt.customStyle=Wt),yt&&(Wt.textContent=Wt.textContent),Wt}applyCustomStyle(Ft,Ht){let Ut=ie(Ft),Wt=this;Ft.textContent=de(Ut,function(qt){let Bt=qt.cssText=qt.parsedCssText;qt.propertyInfo&&qt.propertyInfo.cssText&&(Bt=ne(Bt),qt.cssText=Wt.valueForProperties(Bt,Ht))})}}var ft=new gt;let Nt=function(){};if(!Le){let Ft=Bt=>{return Bt.classList&&!Bt.classList.contains(ct.SCOPE_NAME)||Bt instanceof window.SVGElement&&(!Bt.hasAttribute('class')||0>Bt.getAttribute('class').indexOf(ct.SCOPE_NAME))},Ht=Bt=>{for(let Kt,jt=0;jt<Bt.length;jt++)if(Kt=Bt[jt],Kt.target!==document.documentElement&&Kt.target!==document.head){for(let Vt,Gt=0;Gt<Kt.addedNodes.length;Gt++)if(Vt=Kt.addedNodes[Gt],Ft(Vt)){let Xt=Vt.getRootNode();if(Xt.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let Yt=Xt.host;if(Yt){let{is:zt}=Se(Yt);ct.dom(Vt,zt)}}}for(let Vt,Gt=0;Gt<Kt.removedNodes.length;Gt++)if(Vt=Kt.removedNodes[Gt],Vt.nodeType===Node.ELEMENT_NODE){let Xt;if(Vt.classList?Xt=Array.from(Vt.classList):Vt.hasAttribute('class')&&(Xt=Vt.getAttribute('class').split(/\s+/)),void 0!=Xt){let Yt=Xt.indexOf(ct.SCOPE_NAME);if(0<=Yt){let zt=Xt[Yt+1];zt&&ct.dom(Vt,zt,!0)}}}}},Ut=new MutationObserver(Ht),Wt=Bt=>{Ut.observe(Bt,{childList:!0,subtree:!0})},qt=window.customElements&&!window.customElements.flush;if(qt)Wt(document);else{let Bt=()=>{Wt(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Bt):requestAnimationFrame(function(){if('loading'===document.readyState){let jt=function(){Bt(),document.removeEventListener('readystatechange',jt)};document.addEventListener('readystatechange',jt)}else Bt()})}Nt=function(){Ht(Ut.takeRecords())}}const bt={},Ct=Promise.resolve();let Et=null,vt=window.HTMLImports&&window.HTMLImports.whenReady||null,Pt;const Rt='__processedByShadyCSS',Tt='__seenByShadyCSS';let xt=null,At=null;class Ot{constructor(){this.customStyles=[],this.enqueued=!1}enqueueDocumentValidation(){this.enqueued||!At||(this.enqueued=!0,Re(At))}addCustomStyle(Ft){Ft[Tt]||(Ft[Tt]=!0,this.customStyles.push(Ft),this.enqueueDocumentValidation())}getStyleForCustomStyle(Ft){let Ht;return Ht=Ft.getStyle?Ft.getStyle():Ft,Ht}processStyles(){let Ft=this.customStyles;for(let Ut,Ht=0;Ht<Ft.length;Ht++)if(Ut=Ft[Ht],!Ut[Rt]){let Wt=this.getStyleForCustomStyle(Ut);if(Wt){Ut[Rt]=!0;let qt=Wt.__appliedElement;if(qt)for(let jt,Bt=0;Bt<Wt.attributes.length;Bt++)jt=Wt.attributes[Bt],qt.setAttribute(jt.name,jt.value);xt&&xt(qt||Wt)}}return Ft}}Ot.prototype.addCustomStyle=Ot.prototype.addCustomStyle,Ot.prototype.getStyleForCustomStyle=Ot.prototype.getStyleForCustomStyle,Ot.prototype.processStyles=Ot.prototype.processStyles,Object.defineProperties(Ot.prototype,{transformCallback:{get(){return xt},set(Ft){xt=Ft}},validateCallback:{get(){return At},set(Ft){let Ht=!1;At||(Ht=!0),At=Ft,Ht&&this.enqueueDocumentValidation()}}});const It=new class{constructor(Ft=100){this.cache={},this.typeMax=Ft}_validate(Ft,Ht,Ut){for(let qt,Wt=0;Wt<Ut.length;Wt++)if(qt=Ut[Wt],Ft.properties[qt]!==Ht[qt])return!1;return!0}store(Ft,Ht,Ut,Wt){let qt=this.cache[Ft]||[];qt.push({properties:Ht,styleElement:Ut,scopeSelector:Wt}),qt.length>this.typeMax&&qt.shift(),this.cache[Ft]=qt}fetch(Ft,Ht,Ut){let Wt=this.cache[Ft];if(Wt)for(let Bt,qt=Wt.length-1;0<=qt;qt--)if(Bt=Wt[qt],this._validate(Bt,Ht,Ut))return Bt}},Mt={};class Dt{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement;let Ft=new xe;Ft.rules=[],this._documentOwnerStyleInfo=_t.set(this._documentOwner,new _t(Ft)),this._elementsHaveApplied=!1,this._applyShim=null,this._customStyleInterface=null,Re(()=>{this._ensure()})}flush(){Nt()}_generateScopeSelector(Ft){let Ht=this._scopeCounter[Ft]=(this._scopeCounter[Ft]||0)+1;return`${Ft}-${Ht}`}getStyleAst(Ft){return ie(Ft)}styleAstToString(Ft){return de(Ft)}_gatherStyles(Ft){let Ht=Ft.content.querySelectorAll('style'),Ut=[];for(let qt,Wt=0;Wt<Ht.length;Wt++)qt=Ht[Wt],Ut.push(qt.textContent),qt.parentNode.removeChild(qt);return Ut.join('').trim()}_getCssBuild(Ft){let Ht=Ft.content.querySelector('style');return Ht?Ht.getAttribute('css-build')||'':''}prepareTemplate(Ft,Ht,Ut){if(!Ft._prepared){Ft._prepared=!0,Ft.name=Ht,Ft.extends=Ut,bt[Ht]=Ft;let Wt=this._getCssBuild(Ft),qt=this._gatherStyles(Ft),Bt={is:Ht,extends:Ut,__cssBuild:Wt};Le||(Mt[Bt.is]=ue(Bt.is),ct.dom(Ft.content,Ht)),this._ensure();let jt=this._applyShim.detectMixin(qt),Kt=_(qt);jt&&Fe&&this._applyShim.transformRules(Kt,Ht),Ft._styleAst=Kt,Ft._cssBuild=Wt;let Gt=[];if(Fe||(Gt=ft.decorateStyles(Ft._styleAst,Bt)),!Gt.length||Fe){let Vt=Le?Ft.content:null,Xt=Mt[Ht],Yt=this._generateStaticStyle(Bt,Ft._styleAst,Vt,Xt);Ft._style=Yt}Ft._ownPropertyNames=Gt}}_generateStaticStyle(Ft,Ht,Ut,Wt){let qt=ct.elementStyles(Ft,Ht);if(qt.length)return he(qt,Ft.is,Ut,Wt)}_prepareHost(Ft){let Bt,jt,Kt,{is:Ht,typeExtension:Ut}=Se(Ft),Wt=Mt[Ht],qt=bt[Ht];return qt&&(Bt=qt._styleAst,jt=qt._ownPropertyNames,Kt=qt._cssBuild),_t.set(Ft,new _t(Bt,Wt,jt,Ht,Ut,Kt))}_ensureApplyShim(){this._applyShim||(window.ShadyCSS.ApplyShim?(this._applyShim=window.ShadyCSS.ApplyShim,this._applyShim.invalidCallback=be):this._applyShim={['detectMixin'](){return!1},['transformRule'](){},['transformRules'](){}})}_ensureCustomStyleInterface(){this._customStyleInterface||(window.ShadyCSS.CustomStyleInterface?(this._customStyleInterface=window.ShadyCSS.CustomStyleInterface,this._customStyleInterface.transformCallback=Ft=>{this.transformCustomStyleForDocument(Ft)},this._customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{(this._customStyleInterface.enqueued||this._elementsHaveApplied)&&this.flushCustomStyles()})}):this._customStyleInterface={['processStyles'](){},enqueued:!1,['getStyleForCustomStyle'](){return null}})}_ensure(){this._ensureApplyShim(),this._ensureCustomStyleInterface()}flushCustomStyles(){this._ensure();let Ft=this._customStyleInterface.processStyles();this._customStyleInterface.enqueued&&(Fe?this._revalidateCustomStyleApplyShim(Ft):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles(Ft)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!Fe&&this.styleDocument())}styleElement(Ft,Ht){let{is:Ut}=Se(Ft),Wt=_t.get(Ft);if(Wt||(Wt=this._prepareHost(Ft)),this._isRootOwner(Ft)||(this._elementsHaveApplied=!0),Ht&&(Wt.overrideStyleProperties=Wt.overrideStyleProperties||{},Object.assign(Wt.overrideStyleProperties,Ht)),!Fe)this._updateProperties(Ft,Wt),Wt.ownStylePropertyNames&&Wt.ownStylePropertyNames.length&&this._applyStyleProperties(Ft,Wt);else{Wt.overrideStyleProperties&&Te(Ft,Wt.overrideStyleProperties);let qt=bt[Ut];if(!qt&&!this._isRootOwner(Ft))return;if(qt&&qt._style&&!Ee(qt)){if(ve(qt)||(this._ensure(),this._applyShim.transformRules(qt._styleAst,Ut),qt._style.textContent=ct.elementStyles(Ft,Wt.styleRules),Pe(qt)),Le){let Bt=Ft.shadowRoot;if(Bt){let jt=Bt.querySelector('style');jt.textContent=ct.elementStyles(Ft,Wt.styleRules)}}Wt.styleRules=qt._styleAst}}}_styleOwnerForNode(Ft){let Ht=Ft.getRootNode(),Ut=Ht.host;return Ut?_t.get(Ut)?Ut:this._styleOwnerForNode(Ut):this._documentOwner}_isRootOwner(Ft){return Ft===this._documentOwner}_applyStyleProperties(Ft,Ht){let Ut=Se(Ft).is,Wt=It.fetch(Ut,Ht.styleProperties,Ht.ownStylePropertyNames),qt=Wt&&Wt.scopeSelector,Bt=Wt?Wt.styleElement:null,jt=Ht.scopeSelector;Ht.scopeSelector=qt||this._generateScopeSelector(Ut);let Kt=ft.applyElementStyle(Ft,Ht.styleProperties,Ht.scopeSelector,Bt);return Le||ft.applyElementScopeSelector(Ft,Ht.scopeSelector,jt),Wt||It.store(Ut,Ht.styleProperties,Kt,Ht.scopeSelector),Kt}_updateProperties(Ft,Ht){let Ut=this._styleOwnerForNode(Ft),Wt=_t.get(Ut),qt=Wt.styleProperties,Bt=Object.create(qt||null),jt=ft.hostAndRootPropertiesForScope(Ft,Ht.styleRules),Kt=ft.propertyDataFromStyles(Wt.styleRules,Ft),Gt=Kt.properties;Object.assign(Bt,jt.hostProps,Gt,jt.rootProps),this._mixinOverrideStyles(Bt,Ht.overrideStyleProperties),ft.reify(Bt),Ht.styleProperties=Bt}_mixinOverrideStyles(Ft,Ht){for(let Ut in Ht){let Wt=Ht[Ut];(Wt||0===Wt)&&(Ft[Ut]=Wt)}}styleDocument(Ft){this.styleSubtree(this._documentOwner,Ft)}styleSubtree(Ft,Ht){let Ut=Ft.shadowRoot;(Ut||this._isRootOwner(Ft))&&this.styleElement(Ft,Ht);let Wt=Ut&&(Ut.children||Ut.childNodes);if(Wt)for(let Bt,qt=0;qt<Wt.length;qt++)Bt=Wt[qt],this.styleSubtree(Bt);else{let qt=Ft.children||Ft.childNodes;if(qt)for(let jt,Bt=0;Bt<qt.length;Bt++)jt=qt[Bt],this.styleSubtree(jt)}}_revalidateCustomStyleApplyShim(Ft){for(let Ht=0;Ht<Ft.length;Ht++){let Ut=Ft[Ht],Wt=this._customStyleInterface.getStyleForCustomStyle(Ut);Wt&&this._revalidateApplyShim(Wt)}}_applyCustomStyles(Ft){for(let Ht=0;Ht<Ft.length;Ht++){let Ut=Ft[Ht],Wt=this._customStyleInterface.getStyleForCustomStyle(Ut);Wt&&ft.applyCustomStyle(Wt,this._documentOwnerStyleInfo.styleProperties)}}transformCustomStyleForDocument(Ft){let Ht=ie(Ft);ce(Ht,Ut=>{Le?ct.normalizeRootSelector(Ut):ct.documentRule(Ut),Fe&&(this._ensure(),this._applyShim.transformRule(Ut))}),Fe?Ft.textContent=de(Ht):this._documentOwnerStyleInfo.styleRules.rules.push(Ht)}_revalidateApplyShim(Ft){if(Fe){let Ht=ie(Ft);this._ensure(),this._applyShim.transformRules(Ht),Ft.textContent=de(Ht)}}getComputedStyleValue(Ft,Ht){let Ut;if(!Fe){let Wt=_t.get(Ft)||_t.get(this._styleOwnerForNode(Ft));Ut=Wt.styleProperties[Ht]}return Ut=Ut||window.getComputedStyle(Ft).getPropertyValue(Ht),Ut.trim()}setElementClass(Ft,Ht){let Ut=Ft.getRootNode(),Wt=Ht?Ht.split(/\s/):[],qt=Ut.host&&Ut.host.localName;if(!qt){var Bt=Ft.getAttribute('class');if(Bt){let jt=Bt.split(/\s/);for(let Kt=0;Kt<jt.length;Kt++)if(jt[Kt]===ct.SCOPE_NAME){qt=jt[Kt+1];break}}}if(qt&&Wt.push(ct.SCOPE_NAME,qt),!Fe){let jt=_t.get(Ft);jt&&jt.scopeSelector&&Wt.push(ft.XSCOPE_NAME,jt.scopeSelector)}fe(Ft,Wt.join(' '))}_styleInfoForNode(Ft){return _t.get(Ft)}}Dt.prototype.flush=Dt.prototype.flush,Dt.prototype.prepareTemplate=Dt.prototype.prepareTemplate,Dt.prototype.styleElement=Dt.prototype.styleElement,Dt.prototype.styleDocument=Dt.prototype.styleDocument,Dt.prototype.styleSubtree=Dt.prototype.styleSubtree,Dt.prototype.getComputedStyleValue=Dt.prototype.getComputedStyleValue,Dt.prototype.setElementClass=Dt.prototype.setElementClass,Dt.prototype._styleInfoForNode=Dt.prototype._styleInfoForNode,Dt.prototype.transformCustomStyleForDocument=Dt.prototype.transformCustomStyleForDocument,Dt.prototype.getStyleAst=Dt.prototype.getStyleAst,Dt.prototype.styleAstToString=Dt.prototype.styleAstToString,Dt.prototype.flushCustomStyles=Dt.prototype.flushCustomStyles,Object.defineProperties(Dt.prototype,{nativeShadow:{get(){return Le}},nativeCss:{get(){return Fe}}});const wt=new Dt;let kt,Lt;window.ShadyCSS&&(kt=window.ShadyCSS.ApplyShim,Lt=window.ShadyCSS.CustomStyleInterface),window.ShadyCSS={ScopingShim:wt,prepareTemplate(Ft,Ht,Ut){wt.flushCustomStyles(),wt.prepareTemplate(Ft,Ht,Ut)},styleSubtree(Ft,Ht){wt.flushCustomStyles(),wt.styleSubtree(Ft,Ht)},styleElement(Ft){wt.flushCustomStyles(),wt.styleElement(Ft)},styleDocument(Ft){wt.flushCustomStyles(),wt.styleDocument(Ft)},getComputedStyleValue(Ft,Ht){return wt.getComputedStyleValue(Ft,Ht)},nativeCss:Fe,nativeShadow:Le},kt&&(window.ShadyCSS.ApplyShim=kt),Lt&&(window.ShadyCSS.CustomStyleInterface=Lt)})();
//# sourceMappingURL=webcomponents-sd-ce.js.map