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