Files
webcomponentsjs/webcomponents-hi-ce.min.js
2017-01-11 16:11:42 -08:00

3 lines
41 KiB
JavaScript

(function(){'use strict';function y($e){return $e=_($e),E(S($e),$e)}function _($e){return $e.replace(z.comments,'').replace(z.port,'')}function S($e){let qe={start:0,end:$e.length},Ke=qe;for(let Be=0,Ve=$e.length;Be<Ve;Be++)if($e[Be]===G){Ke.rules||(Ke.rules=[]);let We=Ke,Xe=We.rules[We.rules.length-1];Ke={start:Be+1,parent:We,previous:Xe},We.rules.push(Ke)}else $e[Be]===Y&&(Ke.end=Be+1,Ke=Ke.parent||qe);return qe}function E($e,qe){let Ke=qe.substring($e.start,$e.end-1);if($e.parsedCssText=$e.cssText=Ke.trim(),$e.parent){let Ve=$e.previous?$e.previous.end:$e.parent.start;Ke=qe.substring(Ve,$e.start-1),Ke=C(Ke),Ke=Ke.replace(z.multipleSpaces,' '),Ke=Ke.substring(Ke.lastIndexOf(';')+1);let We=$e.parsedSelector=$e.selector=Ke.trim();$e.atRule=0===We.indexOf('@'),$e.atRule?0===We.indexOf('@media')?$e.type=X.MEDIA_RULE:We.match(z.keyframesRule)&&($e.type=X.KEYFRAMES_RULE,$e.keyframesName=$e.selector.split(z.multipleSpaces).pop()):0===We.indexOf(J)?$e.type=X.MIXIN_RULE:$e.type=X.STYLE_RULE}let Be=$e.rules;if(Be)for(let Xe,Ve=0,We=Be.length;Ve<We&&(Xe=Be[Ve]);Ve++)E(Xe,qe);return $e}function C($e){return $e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let qe=arguments[1],Ke=6-qe.length;for(;Ke--;)qe='0'+qe;return'\\'+qe})}function N($e,qe,Ke){Ke=Ke||'';let Be='';if($e.cssText||$e.rules){let Ve=$e.rules;if(Ve&&!A(Ve))for(let Ge,We=0,Xe=Ve.length;We<Xe&&(Ge=Ve[We]);We++)Be=N(Ge,qe,Be);else Be=qe?$e.cssText:T($e.cssText),Be=Be.trim(),Be&&(Be=' '+Be+'\n')}return Be&&($e.selector&&(Ke+=$e.selector+' '+G+'\n'),Ke+=Be,$e.selector&&(Ke+=Y+'\n\n')),Ke}function A($e){return 0===$e[0].selector.indexOf(J)}function T($e){return $e=R($e),I($e)}function R($e){return $e.replace(z.customProp,'').replace(z.mixinProp,'')}function I($e){return $e.replace(z.mixinApply,'').replace(z.varApply,'')}function M($e){$e&&(Z=Z&&!$e.shimcssproperties,Q=Q&&!$e.shimshadow)}function O($e,qe){return'string'==typeof $e&&($e=y($e)),qe&&D($e,qe),N($e,Z)}function P($e){return!$e.__cssRules&&$e.textContent&&($e.__cssRules=y($e.textContent)),$e.__cssRules}function L($e){return $e.parent&&$e.parent.type===X.KEYFRAMES_RULE}function D($e,qe,Ke,Be){if($e){let Ve=!1;if(Be&&$e.type===X.MEDIA_RULE){let Xe=$e.selector.match(re.MEDIA_MATCH);Xe&&!window.matchMedia(Xe[1]).matches&&(Ve=!0)}$e.type===X.STYLE_RULE?qe($e):Ke&&$e.type===X.KEYFRAMES_RULE?Ke($e):$e.type===X.MIXIN_RULE&&(Ve=!0);let We=$e.rules;if(We&&!Ve)for(let Ye,Xe=0,Ge=We.length;Xe<Ge&&(Ye=We[Xe]);Xe++)D(Ye,qe,Ke,Be)}}function U($e,qe,Ke,Be){let Ve=F($e,qe);return H(Ve,Ke,Be)}function H($e,qe,Ke){qe=qe||document.head;let Be=Ke&&Ke.nextSibling||qe.firstChild;return te=$e,qe.insertBefore($e,Be)}function F($e,qe){let Ke=document.createElement('style');return qe&&Ke.setAttribute('scope',qe),Ke.textContent=$e,Ke}function $($e){let qe=document.createComment(' Shady DOM styles for '+$e+' '),Ke=te?te.nextSibling:null,Be=document.head;return Be.insertBefore(qe,Ke||Be.firstChild),te=qe,qe}function K($e,qe){let Ke=0;for(let Be=qe,Ve=$e.length;Be<Ve;Be++)if('('===$e[Be])Ke++;else if(')'===$e[Be]&&0==--Ke)return Be;return-1}function B($e,qe){let Ke=$e.indexOf('var(');if(-1===Ke)return qe($e,'','','');let Be=K($e,Ke+3),Ve=$e.substring(Ke+4,Be),We=$e.substring(0,Ke),Xe=B($e.substring(Be+1),qe),Ge=Ve.indexOf(',');if(-1===Ge)return qe(We,Ve.trim(),'',Xe);let Ye=Ve.substring(0,Ge).trim(),ze=Ve.substring(Ge+1).trim();return qe(We,Ye,ze,Xe)}function V($e,qe){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call($e,'class',qe):$e.setAttribute('class',qe)}function W($e,qe){let Ke=parseInt($e/32);qe[Ke]=(qe[Ke]||0)|1<<$e%32}(function($e){function qe(vt){return vt.nodeType===Node.ELEMENT_NODE&&St.call(vt,ot)}function Ke(vt,Nt){gt.forEach(At=>{const xt=vt.attributes[At],Tt=xt&&xt.value;Tt&&0>Tt.search(/({{|\[\[)/)&&(xt.value='style'===At?ut.resolveUrlsInCssText(Tt,Nt):ut.replaceAttrUrl(Tt,Nt))})}function Be(vt,Nt){const At=vt.content;if(At){const xt=At.querySelectorAll('style, form[action], [src], [href], [url], [style]');for(let Tt=0;Tt<xt.length;Tt++){const Rt=xt[Tt];'style'==Rt.localName?ut.resolveUrlsInStyle(Rt,Nt):Ke(Rt,Nt)}Ve(At,Nt)}}function Ve(vt,Nt){const At=vt.querySelectorAll('template');for(let xt=0;xt<At.length;xt++)Be(At[xt],Nt)}function We(vt,Nt){const At=vt.querySelectorAll(ht);for(let Rt,xt=0,Tt=At.length;xt<Tt&&(Rt=At[xt]);xt++)Qe(Rt),Rt.href&&Rt.setAttribute('href',ut.replaceAttrUrl(Rt.getAttribute('href'),Nt)),Rt.src&&Rt.setAttribute('src',ut.replaceAttrUrl(Rt.getAttribute('src'),Nt)),'style'==Rt.localName?ut.resolveUrlsInStyle(Rt,Nt):'script'===Rt.localName&&(Rt.textContent&&(Rt.textContent+=`\n//# sourceURL=${Nt}`),Rt.setAttribute('type',Et));Ve(vt,Nt)}function Xe(vt,Nt){const At=vt.querySelectorAll('dom-module');for(let xt=0;xt<At.length;xt++){const Tt=At[xt],Rt=Tt.getAttribute('assetpath')||'';Tt.setAttribute('assetpath',ut.replaceAttrUrl(Rt,Nt))}}function Ge(vt){const Nt=vt.querySelectorAll(`script[type=${Et}]`);let At=Promise.resolve();for(let Rt,xt=0,Tt=Nt.length;xt<Tt&&(Rt=Nt[xt]);xt++)At=At.then(()=>{const It=vt.createElement('script');It.textContent=Rt.textContent,Rt.src&&It.setAttribute('src',Rt.getAttribute('src'));const Mt=Qe(It).catch(()=>It);return it=It,Rt.parentNode.replaceChild(It,Rt),Mt.then(Ot=>{Ot===it&&(it=null)})});return At}function Ye(vt){const Nt=vt.querySelectorAll(ft),At=[];for(let Rt,xt=0,Tt=Nt.length;xt<Tt&&(Rt=Nt[xt]);xt++)At.push(Qe(Rt).catch(()=>Rt));return Promise.all(At)}function ze(vt){const Nt=vt.import.querySelectorAll(_t);for(let Tt,At=0,xt=Nt.length;At<xt&&(Tt=Nt[At]);At++){const Rt=document.createElement(Tt.localName);Qe(Rt),Rt.textContent=Tt.textContent;for(let It=0,Mt=Tt.attributes.length;It<Mt;It++)Rt.setAttribute(Tt.attributes[It].name,Tt.attributes[It].value);Tt.parentNode.removeChild(Tt),vt.parentNode.insertBefore(Rt,vt)}}function Je(vt){const Nt=vt.querySelectorAll(ot);for(let xt,At=Nt.length-1;0<=At&&(xt=Nt[At]);At--)if(!xt.__fired){xt.__fired=!0;const Tt=xt.import?'load':'error';lt.log&&console.warn('fire',Tt,xt.href),Qe(xt),xt.dispatchEvent(new CustomEvent(Tt,{bubbles:!1,cancelable:!1,detail:void 0}))}}function Qe(vt){return vt.__loadPromise||(vt.__loadPromise=new Promise((Nt,At)=>{Ze(vt)?Nt(vt):(vt.addEventListener('load',()=>Nt(vt)),vt.addEventListener('error',()=>At(vt)))})),vt.__loadPromise}function Ze(vt){let Nt=!1;if(nt&&qe(vt)&&vt.import&&'loading'!==vt.import.readyState)Nt=!0;else if(!(Ct&&'style'===vt.localName))'script'!==vt.localName||vt.src||(Nt=!0);else if(-1==vt.textContent.indexOf('@import'))Nt=!0;else if(vt.sheet){Nt=!0;const At=vt.sheet.cssRules;for(let xt=0,Tt=At?At.length:0;xt<Tt&&Nt;xt++)At[xt].type===CSSRule.IMPORT_RULE&&(Nt=!!At[xt].styleSheet)}return Nt}function et(vt,Nt){const At=document.createElement('import-content');return At.style.display='none',Nt&&At.setAttribute('import-href',Nt),vt&&(At.innerHTML=vt),Xe(At,Nt),We(At,Nt),At}function tt(vt,Nt){return Nt=Nt||document,rt(Nt).then(st).then(At=>{return vt&&vt(At),At})}function rt(vt){return new Promise(Nt=>{'loading'===vt.readyState?vt.addEventListener('readystatechange',()=>{'loading'!==vt.readyState&&Nt(vt)}):Nt(vt)})}function st(vt){let Nt=vt.querySelectorAll(ot);const At=[],xt={allImports:[],loadedImports:[],errorImports:[]};for(let It,Tt=0,Rt=Nt.length;Tt<Rt&&(It=Nt[Tt]);Tt++)St.call(It,`${ot} ${ot}`)||(xt.allImports.push(It),At.push(Qe(It).then(Mt=>{return xt.loadedImports.push(Mt),Mt}).catch(Mt=>{return xt.errorImports.push(Mt),Mt})));return Promise.all(At).then(()=>xt)}const ot='link[rel=import]',nt=!!('import'in document.createElement('link')),lt={bust:!1,log:!1};let it=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get:function(){return it||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const dt=/(^\/)|(^#)|(^[\w-\d]*:)/,pt=/(url\()([^)]*)(\))/g,ct=/(@import[\s]+(?!url\())([^;]*)(;)/g,ut={resolveUrlsInStyle:function(vt,Nt){vt.textContent=ut.resolveUrlsInCssText(vt.textContent,Nt)},resolveUrlsInCssText:function(vt,Nt){let At=ut.replaceUrls(vt,Nt,pt);return At=ut.replaceUrls(At,Nt,ct),At},replaceUrls:function(vt,Nt,At){return vt.replace(At,function(xt,Tt,Rt,It){let Mt=Rt.replace(/["']/g,'');return Nt&&(Mt=ut._resolveUrl(Mt,Nt)),Tt+'\''+Mt+'\''+It})},replaceAttrUrl:function(vt,Nt){return vt&&dt.test(vt)?vt:ut._resolveUrl(vt,Nt)},_resolveUrl:function(vt,Nt){if(void 0===ut.__workingURL){ut.__workingURL=!1;try{const xt=new URL('b','http://a');xt.pathname='c%20d',ut.__workingURL='http://a/c%20d'===xt.href}catch(xt){}}if(ut.__workingURL)return new URL(vt,Nt).href;let At=ut.__tempDoc;return At||(At=document.implementation.createHTMLDocument('temp'),ut.__tempDoc=At,At.__base=At.createElement('base'),At.head.appendChild(At.__base),At.__anchor=At.createElement('a')),At.__base.href=Nt,At.__anchor.href=vt,At.__anchor.href||vt}},mt={async:!0,load:function(vt,Nt){const At=new XMLHttpRequest;return lt.bust&&(vt+='?'+Math.random()),At.open('GET',vt,mt.async),At.addEventListener('readystatechange',()=>{if(4===At.readyState){let xt;try{const It=At.getResponseHeader('Location');It&&(xt='/'===It.substr(0,1)?location.origin+It:It)}catch(It){console.error(It.message)}const Tt=200<=At.status&&300>At.status||304===At.status||0===At.status,Rt=At.response||At.responseText;Nt(!Tt,Rt,xt)}}),At.send(),At}};class yt{constructor(vt,Nt){this.cache={},this.onload=vt,this.oncomplete=Nt,this.inflight=0,this.pending={}}addNodes(vt){this.inflight+=vt.length;for(let xt,Nt=0,At=vt.length;Nt<At&&(xt=vt[Nt]);Nt++)this.require(xt);this.checkDone()}addNode(vt){this.inflight++,this.require(vt),this.checkDone()}require(vt){const Nt=vt.src||vt.href;this.dedupe(Nt,vt)||this.fetch(Nt,vt)}dedupe(vt,Nt){return this.pending[vt]?(this.pending[vt].push(Nt),!0):this.cache[vt]?(this.onload(vt,Nt,this.cache[vt]),this.tail(),!0):(this.pending[vt]=[Nt],!1)}fetch(vt,Nt){if(lt.log&&console.log('fetch',vt,Nt),!vt)this.receive(vt,Nt,!0,'error: href must be specified');else if(vt.match(/^data:/)){const At=vt.split(','),xt=At[0];let Tt=At[1];Tt=-1<xt.indexOf(';base64')?atob(Tt):decodeURIComponent(Tt),this.receive(vt,Nt,!1,Tt)}else mt.load(vt,(At,xt,Tt)=>this.receive(vt,Nt,At,xt,Tt))}receive(vt,Nt,At,xt,Tt){this.cache[vt]=xt;const Rt=this.pending[vt];for(let Ot,It=0,Mt=Rt.length;It<Mt&&(Ot=Rt[It]);It++)this.onload(vt,Ot,xt,At,Tt),this.tail();this.pending[vt]=null}tail(){--this.inflight,this.checkDone()}checkDone(){this.inflight||this.oncomplete()}}const _t=['style:not([type])','link[rel=stylesheet][href]:not([type])'].join(','),ft=[`${ot} style:not([type])`,`${ot} link[rel=stylesheet][href]:not([type])`].join(','),ht=[ot,_t,'script:not([type])','script[type="application/javascript"]','script[type="text/javascript"]'].join(','),St=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,gt=['action','src','href','url','style'],Et='import-script',Ct=/Trident/.test(navigator.userAgent),bt=!Ct&&/Edge\/\d./i.test(navigator.userAgent);new class{constructor(Nt){this.documents={},this._doc=Nt;const At=Nt.querySelectorAll(ot);for(let xt=0,Tt=At.length;xt<Tt;xt++)Qe(At[xt]);new MutationObserver(this._onMutation.bind(this)).observe(Nt.head,{childList:!0}),nt||(this._loader=new yt(this._onLoaded.bind(this),this._onLoadedAll.bind(this)),rt(Nt).then(()=>this._loadSubtree(Nt)))}_loadSubtree(Nt){const At=Nt.querySelectorAll(ot);this._loader.addNodes(At)}_onLoaded(Nt,At,xt,Tt,Rt){if(lt.log&&console.log('loaded',Nt,At),void 0===this.documents[Nt])if(Tt)this.documents[Nt]=null;else{const It=et(xt,Rt||Nt);this._loadSubtree(It),this.documents[Nt]=It}}_onLoadedAll(){this._flatten(this._doc),Promise.all([Ge(this._doc),Ye(this._doc)]).then(()=>Je(this._doc))}_flatten(Nt){const At=Nt.querySelectorAll(ot);for(let Rt,xt=0,Tt=At.length;xt<Tt&&(Rt=At[xt]);xt++)Rt.import=this.documents[Rt.href],Rt.import&&!Rt.import.__firstImport&&(Rt.import.__firstImport=Rt,this._flatten(Rt.import),Nt===document&&((Ct||bt)&&ze(Rt),this._observe(Rt.import)),Rt.appendChild(Rt.import))}_observe(Nt){Nt.__importObserver||(Nt.__importObserver=new MutationObserver(this._onMutation.bind(this)),Nt.__importObserver.observe(Nt,{childList:!0,subtree:!0}))}_onMutation(Nt){for(let xt,At=0;At<Nt.length&&(xt=Nt[At]);At++)for(let Tt=0,Rt=xt.addedNodes?xt.addedNodes.length:0;Tt<Rt;Tt++){const It=xt.addedNodes[Tt];It&&qe(It)&&(nt?Qe(It):this._loader.addNode(It))}}}(document),tt(vt=>document.dispatchEvent(new CustomEvent('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:vt}))),$e.useNative=nt,$e.whenReady=tt})(window.HTMLImports=window.HTMLImports||{}),function($e){'use strict';var qe=$e.flags.shadydom;qe&&(window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=qe);var Ke=$e.flags.register||$e.flags.ce;Ke&&window.customElements&&(customElements.forcePolyfill=Ke)}(window.WebComponents),function(){function $e(){this.a=new Map,this.j=new Map,this.h=new Map,this.o=new Set,this.C=new MutationObserver(this.D.bind(this)),this.f=null,this.F=new Set,this.enableFlush=!0,this.s=!1,this.m=null}function qe(){return Xe.customElements}function Ke(rt){if(!/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(rt)||-1!==Ge.indexOf(rt))return Error('The element name \''+rt+'\' is not valid.')}function Be(rt,st,ot,nt){var lt=qe();return rt=ot?ze.call(rt,st,ot):ze.call(rt,st),(st=lt.a.get(st.toLowerCase()))&&lt.u(rt,st,nt),lt.b(rt),rt}function Ve(rt,st,ot,nt){st=st.toLowerCase();var lt=rt.getAttribute(st);nt.call(rt,st,ot),1==rt.__$CE_upgraded&&(nt=qe().a.get(rt.localName),ot=nt.A,(nt=nt.i)&&0<=ot.indexOf(st)&&(ot=rt.getAttribute(st),ot!==lt&&nt.call(rt,st,lt,ot,null)))}var We=document,Xe=window;if(!(qe()&&(qe().g=function(){},!qe().forcePolyfill))){var Ge='annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph'.split(' ');$e.prototype.L=function(rt,st){function ot(ct){var ut=it[ct];if(void 0!==ut&&'function'!=typeof ut)throw Error(lt+' \''+ct+'\' is not a Function');return ut}if('function'!=typeof st)throw new TypeError('constructor must be a Constructor');var nt=Ke(rt);if(nt)throw nt;if(this.a.has(rt))throw Error('An element with name \''+rt+'\' is already defined');if(this.j.has(st))throw Error('Definition failed for \''+rt+'\': The constructor is already used.');var lt=rt,it=st.prototype;if('object'!=typeof it)throw new TypeError('Definition failed for \''+rt+'\': constructor.prototype must be an object');var nt=ot('connectedCallback'),dt=ot('disconnectedCallback'),pt=ot('attributeChangedCallback');this.a.set(lt,{name:rt,localName:lt,constructor:st,v:nt,w:dt,i:pt,A:pt&&st.observedAttributes||[]}),this.j.set(st,lt),this.K(),(rt=this.h.get(lt))&&(rt.resolve(void 0),this.h.delete(lt))},$e.prototype.get=function(rt){return(rt=this.a.get(rt))?rt.constructor:void 0},$e.prototype.M=function(rt){var st=Ke(rt);if(st)return Promise.reject(st);if(this.a.has(rt))return Promise.resolve();if(st=this.h.get(rt))return st.N;var ot,nt=new Promise(function(lt){ot=lt}),st={N:nt,resolve:ot};return this.h.set(rt,st),nt},$e.prototype.g=function(){this.enableFlush&&(this.l(this.m.takeRecords()),this.D(this.C.takeRecords()),this.o.forEach(function(rt){this.l(rt.takeRecords())},this))},$e.prototype.K=function(){var rt=this;if(!this.s){this.s=!0;var st=function(){rt.s=!1,rt.m||(rt.m=rt.b(We)),rt.c(We.childNodes)};window.HTMLImports?window.HTMLImports.whenReady(st):st()}},$e.prototype.I=function(rt){this.f=rt},$e.prototype.b=function(rt){return null==rt.__$CE_observer?(rt.__$CE_observer=new MutationObserver(this.l.bind(this)),rt.__$CE_observer.observe(rt,{childList:!0,subtree:!0}),this.enableFlush&&this.o.add(rt.__$CE_observer),rt.__$CE_observer):rt.__$CE_observer},$e.prototype.J=function(rt){null!=rt.__$CE_observer&&(rt.__$CE_observer.disconnect(),this.enableFlush&&this.o.delete(rt.__$CE_observer),rt.__$CE_observer=null)},$e.prototype.l=function(rt){for(var st=0;st<rt.length;st++){var ot=rt[st];if('childList'===ot.type){var nt=ot.removedNodes;this.c(ot.addedNodes),this.H(nt)}}},$e.prototype.c=function(rt,st){st=st||new Set;for(var ot=0;ot<rt.length;ot++){var nt=rt[ot];if(nt.nodeType===Node.ELEMENT_NODE){this.J(nt),nt=We.createTreeWalker(nt,NodeFilter.SHOW_ELEMENT,null,!1);do this.G(nt.currentNode,st);while(nt.nextNode())}}},$e.prototype.G=function(rt,st){if(!st.has(rt)){st.add(rt);var ot=this.a.get(rt.localName);if(ot){rt.__$CE_upgraded||this.u(rt,ot,!0);var nt;if(nt=rt.__$CE_upgraded&&!rt.__$CE_attached)a:{nt=rt;do{if(nt.__$CE_attached||nt.nodeType===Node.DOCUMENT_NODE){nt=!0;break a}nt=nt.parentNode||nt.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&nt.host}while(nt);nt=!1}nt&&(rt.__$CE_attached=!0,ot.v&&ot.v.call(rt))}rt.shadowRoot&&this.c(rt.shadowRoot.childNodes,st),'LINK'===rt.tagName&&rt.rel&&-1!==rt.rel.toLowerCase().split(' ').indexOf('import')&&this.B(rt,st)}},$e.prototype.B=function(rt,st){var ot=rt.import;if(ot)st.has(ot)||(st.add(ot),ot.__$CE_observer||this.b(ot),this.c(ot.childNodes,st));else if(st=rt.href,!this.F.has(st)){this.F.add(st);var nt=this,lt=function(){rt.removeEventListener('load',lt),rt.import.__$CE_observer||nt.b(rt.import),nt.c(rt.import.childNodes)};rt.addEventListener('load',lt)}},$e.prototype.H=function(rt){for(var st=0;st<rt.length;st++){var ot=rt[st];if(ot.nodeType===Node.ELEMENT_NODE){this.b(ot),ot=We.createTreeWalker(ot,NodeFilter.SHOW_ELEMENT,null,!1);do{var nt=ot.currentNode;if(nt.__$CE_upgraded&&nt.__$CE_attached){nt.__$CE_attached=!1;var lt=this.a.get(nt.localName);lt&&lt.w&&lt.w.call(nt)}}while(ot.nextNode())}}},$e.prototype.u=function(rt,st,ot){if(rt.__proto__=st.constructor.prototype,ot&&(this.I(rt),new st.constructor,rt.__$CE_upgraded=!0,console.assert(!this.f)),ot=st.A,(st=st.i)&&0<ot.length){this.C.observe(rt,{attributes:!0,attributeOldValue:!0,attributeFilter:ot});for(var nt=0;nt<ot.length;nt++){var lt=ot[nt];if(rt.hasAttribute(lt)){var it=rt.getAttribute(lt);st.call(rt,lt,null,it,null)}}}},$e.prototype.D=function(rt){for(var st=0;st<rt.length;st++){var ot=rt[st];if('attributes'===ot.type){var nt=ot.target,lt=this.a.get(nt.localName),it=ot.attributeName,dt=ot.oldValue,pt=nt.getAttribute(it);pt!==dt&&lt.i.call(nt,it,dt,pt,ot.attributeNamespace)}}},window.CustomElementRegistry=$e,$e.prototype.define=$e.prototype.L,$e.prototype.get=$e.prototype.get,$e.prototype.whenDefined=$e.prototype.M,$e.prototype.flush=$e.prototype.g,$e.prototype.polyfilled=!0,$e.prototype._observeRoot=$e.prototype.b,$e.prototype._addImport=$e.prototype.B;var Ye=Xe.HTMLElement;$e.prototype.nativeHTMLElement=Ye,Xe.HTMLElement=function(){var rt=qe();if(rt.f){var st=rt.f;return rt.f=null,st}if(this.constructor)return rt=rt.j.get(this.constructor),Be(We,rt,void 0,!1);throw Error('Unknown constructor. Did you call customElements.define()?')},Xe.HTMLElement.prototype=Ye.prototype;var ze=We.createElement;We.createElement=function(rt,st){return Be(We,rt,st,!0)};var Je=We.createElementNS;We.createElementNS=function(rt,st){return'http://www.w3.org/1999/xhtml'===rt?We.createElement(st):Je.call(We,rt,st)};var Qe=Element.prototype.attachShadow;Qe&&Object.defineProperty(Element.prototype,'attachShadow',{value:function(rt){return rt=Qe.call(this,rt),qe().b(rt),rt}});var Ze=We.importNode;We.importNode=function(rt,st){return rt=Ze.call(We,rt,st),qe().c(rt.nodeType===Node.ELEMENT_NODE?[rt]:rt.childNodes),rt};var et=Element.prototype.setAttribute;Element.prototype.setAttribute=function(rt,st){Ve(this,rt,st,et)};var tt=Element.prototype.removeAttribute;Element.prototype.removeAttribute=function(rt){Ve(this,rt,null,tt)},Object.defineProperty(window,'customElements',{value:new $e,configurable:!0,enumerable:!0}),window.CustomElements={takeRecords:function(){qe().g&&qe().g()}}}}();let X={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},G='{',Y='}',z={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},J='--',Q=!(window.ShadyDOM&&window.ShadyDOM.inUse),Z=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)'),ee=!1;window.ShadyCSS?M(window.ShadyCSS):window.WebComponents&&M(window.WebComponents.flags);let te=null,re={VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:'(?:^|[^.#[:])',HOST_SUFFIX:'($|[.:[\\s>+~])'};const se='style-scope';class oe{get SCOPE_NAME(){return se}dom($e,qe,Ke){$e.__styleScoped?$e.__styleScoped=null:this._transformDom($e,qe||'',Ke)}_transformDom($e,qe,Ke){$e.nodeType===Node.ELEMENT_NODE&&this.element($e,qe,Ke);let Be='template'===$e.localName?($e.content||$e._content).childNodes:$e.children||$e.childNodes;if(Be)for(let Ve=0;Ve<Be.length;Ve++)this._transformDom(Be[Ve],qe,Ke)}element($e,qe,Ke){if(qe)if($e.classList)Ke?($e.classList.remove(se),$e.classList.remove(qe)):($e.classList.add(se),$e.classList.add(qe));else if($e.getAttribute){let Be=$e.getAttribute('class');if(!Ke){let Ve=(Be?Be+' ':'')+se+' '+qe;V($e,Ve)}else if(Be){let Ve=Be.replace(se,'').replace(qe,'');V($e,Ve)}}}elementStyles($e,qe,Ke){let Be=$e.__cssBuild,Ve=Q||'shady'===Be?O(qe,Ke):this.css(qe,$e.is,$e.extends,Ke)+'\n\n';return Ve.trim()}css($e,qe,Ke,Be){let Ve=this._calcHostScope(qe,Ke);qe=this._calcElementScope(qe);let We=this;return O($e,function(Xe){Xe.isScoped||(We.rule(Xe,qe,Ve),Xe.isScoped=!0),Be&&Be(Xe,qe,Ve)})}_calcElementScope($e){return $e?'.'+$e:''}_calcHostScope($e,qe){return qe?'[is='+$e+']':$e}rule($e,qe,Ke){this._transformRule($e,this._transformComplexSelector,qe,Ke)}_transformRule($e,qe,Ke,Be){$e.selector=$e.transformedSelector=this._transformRuleCss($e,qe,Ke,Be)}_transformRuleCss($e,qe,Ke,Be){let Ve=$e.selector.split(ae);if(!L($e))for(let Ge,We=0,Xe=Ve.length;We<Xe&&(Ge=Ve[We]);We++)Ve[We]=qe.call(this,Ge,Ke,Be);return Ve.join(ae)}_transformComplexSelector($e,qe,Ke){let Be=!1;return $e=$e.trim(),$e=$e.replace(ne,(Ve,We,Xe)=>`:${We}(${Xe.replace(/\s/g,'')})`),$e=$e.replace(me,`${pe} $1`),$e=$e.replace(ie,(Ve,We,Xe)=>{if(!Be){let Ge=this._transformCompoundSelector(Xe,We,qe,Ke);Be=Be||Ge.stop,We=Ge.combinator,Xe=Ge.value}return We+Xe}),$e}_transformCompoundSelector($e,qe,Ke,Be){let Ve=$e.indexOf(ue);0<=$e.indexOf(pe)?$e=this._transformHostSelector($e,Be):0!==Ve&&($e=Ke?this._transformSimpleSelector($e,Ke):$e);let We=!1;0<=Ve&&(qe='',We=!0);let Xe;return We&&(Xe=!0,We&&($e=$e.replace(_e,(Ge,Ye)=>` > ${Ye}`))),$e=$e.replace(fe,(Ge,Ye,ze)=>`[dir="${ze}"] ${Ye}, ${Ye}[dir="${ze}"]`),{value:$e,combinator:qe,stop:Xe}}_transformSimpleSelector($e,qe){let Ke=$e.split(he);return Ke[0]+=qe,Ke.join(he)}_transformHostSelector($e,qe){let Ke=$e.match(ye),Be=Ke&&Ke[2].trim()||'';if(Be){if(!Be[0].match(de)){let Ve=Be.split(de)[0];return Ve===qe?Be:'should_not_match'}return $e.replace(ye,function(Ve,We,Xe){return qe+Xe})}return $e.replace(pe,qe)}documentRule($e){$e.selector=$e.parsedSelector,this.normalizeRootSelector($e),this._transformRule($e,this._transformDocumentSelector)}normalizeRootSelector($e){':root'===$e.selector&&($e.selector='html')}_transformDocumentSelector($e){return $e.match(ue)?this._transformComplexSelector($e,le):this._transformSimpleSelector($e.trim(),le)}}let ne=/:(nth[-\w]+)\(([^)]+)\)/,le=`:not(.${se})`,ae=',',ie=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,de=/[[.:#*]/,pe=':host',ue='::slotted',me=/^(::slotted)/,ye=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,_e=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,fe=/(.*):dir\((?:(ltr|rtl))\)/,he=':';var Se=new oe,ge={};const Ee=Promise.resolve();class Ce{static get($e){return $e.__styleInfo}static set($e,qe){return $e.__styleInfo=qe,qe}static invalidate($e){ge[$e]&&(ge[$e]._applyShimInvalid=!0)}static startValidating($e){const qe=ge[$e];qe._validating||(qe._validating=!0,Ee.then(()=>{qe._applyShimInvalid=!1,qe._validating=!1}))}constructor($e,qe,Ke,Be,Ve,We){this.styleRules=$e||null,this.placeholder=qe||null,this.ownStylePropertyNames=Ke||[],this.overrideStyleProperties=null,this.elementName=Be||'',this.cssBuild=We||'',this.typeExtension=Ve||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const be=window.Element.prototype,ve=be.matches||be.matchesSelector||be.mozMatchesSelector||be.msMatchesSelector||be.oMatchesSelector||be.webkitMatchesSelector,Ne=navigator.userAgent.match('Trident'),Ae='x-scope';class xe{get XSCOPE_NAME(){return Ae}decorateStyles($e){let qe=this,Ke={},Be=[],Ve=0;D($e,function(Xe){qe.decorateRule(Xe),Xe.index=Ve++,qe.collectPropertiesInCssText(Xe.propertyInfo.cssText,Ke)},function(Ge){Be.push(Ge)}),$e._keyframes=Be;let We=[];for(let Xe in Ke)We.push(Xe);return We}decorateRule($e){if($e.propertyInfo)return $e.propertyInfo;let qe={},Ke={},Be=this.collectProperties($e,Ke);return Be&&(qe.properties=Ke,$e.rules=null),qe.cssText=this.collectCssText($e),$e.propertyInfo=qe,qe}collectProperties($e,qe){let Ke=$e.propertyInfo;if(!Ke){let Be,Ve=re.VAR_ASSIGN,We=$e.parsedCssText,Xe,Ge;for(;Be=Ve.exec(We);)Xe=(Be[2]||Be[3]).trim(),('inherit'!==Xe||'unset'!==Xe)&&(qe[Be[1].trim()]=Xe),Ge=!0;return Ge}else if(Ke.properties)return Object.assign(qe,Ke.properties),!0}collectCssText($e){return this.collectConsumingCssText($e.parsedCssText)}collectConsumingCssText($e){return $e.replace(re.BRACKETED,'').replace(re.VAR_ASSIGN,'')}collectPropertiesInCssText($e,qe){for(let Ke;Ke=re.VAR_CONSUMED.exec($e);){let Be=Ke[1];':'!==Ke[2]&&(qe[Be]=!0)}}reify($e){let qe=Object.getOwnPropertyNames($e);for(let Be,Ke=0;Ke<qe.length;Ke++)Be=qe[Ke],$e[Be]=this.valueForProperty($e[Be],$e)}valueForProperty($e,qe){if($e)if(0<=$e.indexOf(';'))$e=this.valueForProperties($e,qe);else{let Ke=this;$e=B($e,function(Be,Ve,We,Xe){if(!Ve)return Be+Xe;let Ge=Ke.valueForProperty(qe[Ve],qe);return Ge&&'initial'!==Ge?'apply-shim-inherit'===Ge&&(Ge='inherit'):Ge=Ke.valueForProperty(qe[We]||We,qe)||We,Be+(Ge||'')+Xe})}return $e&&$e.trim()||''}valueForProperties($e,qe){let Ke=$e.split(';');for(let Ve,We,Be=0;Be<Ke.length;Be++)if(Ve=Ke[Be]){if(re.MIXIN_MATCH.lastIndex=0,We=re.MIXIN_MATCH.exec(Ve),We)Ve=this.valueForProperty(qe[We[1]],qe);else{let Xe=Ve.indexOf(':');if(-1!==Xe){let Ge=Ve.substring(Xe);Ge=Ge.trim(),Ge=this.valueForProperty(Ge,qe)||Ge,Ve=Ve.substring(0,Xe)+Ge}}Ke[Be]=Ve&&Ve.lastIndexOf(';')===Ve.length-1?Ve.slice(0,-1):Ve||''}return Ke.join(';')}applyProperties($e,qe){let Ke='';$e.propertyInfo||this.decorateRule($e),$e.propertyInfo.cssText&&(Ke=this.valueForProperties($e.propertyInfo.cssText,qe)),$e.cssText=Ke}applyKeyframeTransforms($e,qe){let Ke=$e.cssText,Be=$e.cssText;if(null==$e.hasAnimations&&($e.hasAnimations=re.ANIMATION_MATCH.test(Ke)),$e.hasAnimations){let Ve;if(null==$e.keyframeNamesToTransform)for(let We in $e.keyframeNamesToTransform=[],qe)Ve=qe[We],Be=Ve(Ke),Ke!==Be&&(Ke=Be,$e.keyframeNamesToTransform.push(We));else{for(let We=0;We<$e.keyframeNamesToTransform.length;++We)Ve=qe[$e.keyframeNamesToTransform[We]],Ke=Ve(Ke);Be=Ke}}$e.cssText=Be}propertyDataFromStyles($e,qe){let Ke={},Be=this,Ve=[];return D($e,function(We){We.propertyInfo||Be.decorateRule(We);let Xe=We.transformedSelector||We.parsedSelector;qe&&We.propertyInfo.properties&&Xe&&ve.call(qe,Xe)&&(Be.collectProperties(We,Ke),W(We.index,Ve))},null,!0),{properties:Ke,key:Ve}}whenHostOrRootRule($e,qe,Ke,Be){if(qe.propertyInfo||this.decorateRule(qe),!!qe.propertyInfo.properties){let Ve=$e.is?Se._calcHostScope($e.is,$e.extends):'html',We=qe.parsedSelector,Xe=':host > *'===We||'html'===We,Ge=0===We.indexOf(':host')&&!Xe;if('shady'===Ke&&(Xe=We===Ve+' > *.'+Ve||-1!==We.indexOf('html'),Ge=!Xe&&0===We.indexOf(Ve)),'shadow'===Ke&&(Xe=':host > *'===We||'html'===We,Ge=Ge&&!Xe),Xe||Ge){let Ye=Ve;Ge&&(Q&&!qe.transformedSelector&&(qe.transformedSelector=Se._transformRuleCss(qe,Se._transformComplexSelector,Se._calcElementScope($e.is),Ve)),Ye=qe.transformedSelector||Ve),Be({selector:Ye,isHost:Ge,isRoot:Xe})}}}hostAndRootPropertiesForScope($e,qe){let Ke={},Be={},Ve=this,We=qe&&qe.__cssBuild;return D(qe,function(Xe){Ve.whenHostOrRootRule($e,Xe,We,function(Ge){let Ye=$e._element||$e;ve.call(Ye,Ge.selector)&&(Ge.isHost?Ve.collectProperties(Xe,Ke):Ve.collectProperties(Xe,Be))})},null,!0),{rootProps:Be,hostProps:Ke}}transformStyles($e,qe,Ke){let Be=this,Ve=Se._calcHostScope($e.is,$e.extends),We=$e.extends?'\\'+Ve.slice(0,-1)+'\\]':Ve,Xe=new RegExp(re.HOST_PREFIX+We+re.HOST_SUFFIX),Ge=Ce.get($e).styleRules,Ye=this._elementKeyframeTransforms($e,Ge,Ke);return Se.elementStyles($e,Ge,function(ze){Be.applyProperties(ze,qe),Q||L(ze)||!ze.cssText||(Be.applyKeyframeTransforms(ze,Ye),Be._scopeSelector(ze,Xe,Ve,Ke))})}_elementKeyframeTransforms($e,qe,Ke){let Be=qe._keyframes,Ve={};if(!Q&&Be)for(let We=0,Xe=Be[We];We<Be.length;Xe=Be[++We])this._scopeKeyframes(Xe,Ke),Ve[Xe.keyframesName]=this._keyframesRuleTransformer(Xe);return Ve}_keyframesRuleTransformer($e){return function(qe){return qe.replace($e.keyframesNameRx,$e.transformedKeyframesName)}}_scopeKeyframes($e,qe){$e.keyframesNameRx=new RegExp($e.keyframesName,'g'),$e.transformedKeyframesName=$e.keyframesName+'-'+qe,$e.transformedSelector=$e.transformedSelector||$e.selector,$e.selector=$e.transformedSelector.replace($e.keyframesName,$e.transformedKeyframesName)}_scopeSelector($e,qe,Ke,Be){$e.transformedSelector=$e.transformedSelector||$e.selector;let Ve=$e.transformedSelector,We='.'+Be,Xe=Ve.split(',');for(let ze,Ge=0,Ye=Xe.length;Ge<Ye&&(ze=Xe[Ge]);Ge++)Xe[Ge]=ze.match(qe)?ze.replace(Ke,We):We+' '+ze;$e.selector=Xe.join(',')}applyElementScopeSelector($e,qe,Ke){let Be=$e.getAttribute('class')||'',Ve=Be;Ke&&(Ve=Be.replace(new RegExp('\\s*'+Ae+'\\s*'+Ke+'\\s*','g'),' ')),Ve+=(Ve?' ':'')+Ae+' '+qe,Be!==Ve&&V($e,Ve)}applyElementStyle($e,qe,Ke,Be){let Ve=Be?Be.textContent||'':this.transformStyles($e,qe,Ke),We=Ce.get($e),Xe=We.customStyle;return Xe&&!Q&&Xe!==Be&&(Xe._useCount--,0>=Xe._useCount&&Xe.parentNode&&Xe.parentNode.removeChild(Xe)),Q?We.customStyle?(We.customStyle.textContent=Ve,Be=We.customStyle):Ve&&(Be=U(Ve,Ke,$e.shadowRoot,We.placeholder)):Be?!Be.parentNode&&H(Be,null,We.placeholder):Ve&&(Be=U(Ve,Ke,null,We.placeholder)),Be&&(Be._useCount=Be._useCount||0,We.customStyle!=Be&&Be._useCount++,We.customStyle=Be),Ne&&(Be.textContent=Be.textContent),Be}applyCustomStyle($e,qe){let Ke=P($e),Be=this;$e.textContent=O(Ke,function(Ve){let We=Ve.cssText=Ve.parsedCssText;Ve.propertyInfo&&Ve.propertyInfo.cssText&&(We=R(We),Ve.cssText=Be.valueForProperties(We,qe))})}}var Te=new xe;let Re={};const Ie=window.customElements;if(Ie&&!Q){const $e=Ie.define;Ie.define=function(qe,Ke,Be){return Re[qe]=$(qe),$e.call(Ie,qe,Ke,Be)}}let Me=re.MIXIN_MATCH,Oe=re.VAR_ASSIGN,Pe=/;\s*/m,Le=/^\s*(initial)|(inherit)\s*$/,we='_-_';class De{constructor(){this._map={}}set($e,qe){$e=$e.trim(),this._map[$e]={properties:qe,dependants:{}}}get($e){return $e=$e.trim(),this._map[$e]}}class ke{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new De,this._separator=we,this._boundProduceCssProperties=($e,qe,Ke,Be)=>this._produceCssProperties($e,qe,Ke,Be)}detectMixin($e){const qe=Me.test($e)||Oe.test($e);return Me.lastIndex=0,Oe.lastIndex=0,qe}transformStyle($e,qe){let Ke=P($e);return this.transformRules(Ke,qe),Ke}transformRules($e,qe){this._currentTemplate=ge[qe],D($e,Ke=>{this.transformRule(Ke)}),this._currentTemplate=null}transformRule($e){$e.cssText=this.transformCssText($e.parsedCssText),':root'===$e.selector&&($e.selector=':host > *')}transformCssText($e){return $e=$e.replace(Oe,this._boundProduceCssProperties),this._consumeCssProperties($e)}_getInitialValueForProperty($e){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue($e)}_consumeCssProperties($e){for(let qe;qe=Me.exec($e);){let Ke=qe[0],Be=qe[1],Ve=qe.index,We=Ve+Ke.indexOf('@apply'),Xe=Ve+Ke.length,Ge=$e.slice(0,We),Ye=$e.slice(Xe),ze=this._cssTextToMap(Ge),Je=this._atApplyToCssProperties(Be,ze);$e=[Ge,Je,Ye].join(''),Me.lastIndex=Ve+Je.length}return $e}_atApplyToCssProperties($e,qe){$e=$e.replace(Pe,'');let Ke=[],Be=this._map.get($e);if(Be||(this._map.set($e,{}),Be=this._map.get($e)),Be){this._currentTemplate&&(Be.dependants[this._currentTemplate.name]=this._currentTemplate);let Ve,We,Xe;for(Ve in Be.properties)Xe=qe&&qe[Ve],We=[Ve,': var(',$e,we,Ve],Xe&&We.push(',',Xe),We.push(')'),Ke.push(We.join(''))}return Ke.join('; ')}_replaceInitialOrInherit($e,qe){let Ke=Le.exec(qe);return Ke&&(Ke[1]?qe=ke._getInitialValueForProperty($e):qe='apply-shim-inherit'),qe}_cssTextToMap($e){let qe=$e.split(';'),Ke,Be,Ve={};for(let Xe,Ge,We=0;We<qe.length;We++)Xe=qe[We],Xe&&(Ge=Xe.split(':'),1<Ge.length&&(Ke=Ge[0].trim(),Be=this._replaceInitialOrInherit(Ke,Ge.slice(1).join(':')),Ve[Ke]=Be));return Ve}_invalidateMixinEntry($e){for(let qe in $e.dependants)this._currentTemplate&&qe===this._currentTemplate.name||Ce.invalidate(qe)}_produceCssProperties($e,qe,Ke,Be){if(Ke&&B(Ke,(tt,rt)=>{rt&&this._map.get(rt)&&(Be='@apply '+rt+';')}),!Be)return $e;let Ve=this._consumeCssProperties(Be),We=$e.slice(0,$e.indexOf('--')),Xe=this._cssTextToMap(Ve),Ge=Xe,Ye=this._map.get(qe),ze=Ye&&Ye.properties;ze?Ge=Object.assign(Object.create(ze),Xe):this._map.set(qe,Ge);let Qe,Ze,Je=[],et=!1;for(Qe in Ge)Ze=Xe[Qe],void 0==Ze&&(Ze='initial'),ze&&!(Qe in ze)&&(et=!0),Je.push(qe+we+Qe+': '+Ze);return et&&this._invalidateMixinEntry(Ye),Ye&&(Ye.properties=Ge),Ke&&(We=$e+';'+We),We+Je.join('; ')+';'}}let Ue=new ke;window.ApplyShim=Ue;let He=function(){};if(!Q){let $e=We=>{return We.classList&&!We.classList.contains(Se.SCOPE_NAME)||We instanceof SVGElement&&(!We.hasAttribute('class')||0>We.getAttribute('class').indexOf(Se.SCOPE_NAME))},qe=We=>{for(let Xe=0;Xe<We.length;Xe++){let Ge=We[Xe];if(Ge.target!==document.documentElement&&Ge.target!==document.head){for(let Ye=0;Ye<Ge.addedNodes.length;Ye++){let ze=Ge.addedNodes[Ye];if($e(ze)){let Je=ze.getRootNode();if(Je.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let Qe=Je.host;if(Qe){let Ze=Qe.is||Qe.localName;Se.dom(ze,Ze)}}}}for(let Ye=0;Ye<Ge.removedNodes.length;Ye++){let ze=Ge.removedNodes[Ye];if(ze.nodeType===Node.ELEMENT_NODE){let Je;if(ze.classList?Je=Array.from(ze.classList):ze.hasAttribute('class')&&(Je=ze.getAttribute('class').split(/\s+/)),void 0!=Je){let Qe=Je.indexOf(Se.SCOPE_NAME);if(0<=Qe){let Ze=Je[Qe+1];Ze&&Se.dom(ze,Ze,!0)}}}}}}},Ke=new MutationObserver(qe),Be=We=>{Ke.observe(We,{childList:!0,subtree:!0})},Ve=window.customElements&&!window.customElements.flush;if(Ve)Be(document);else{let We=()=>{Be(document.body)};window.HTMLImports?window.HTMLImports.whenReady(We):requestAnimationFrame(function(){if('loading'===document.readyState){let Xe=function(){We(),document.removeEventListener('readystatechange',Xe)};document.addEventListener('readystatechange',Xe)}else We()})}He=function(){qe(Ke.takeRecords())}}let Fe=new class{constructor(qe=100){this.cache={},this.typeMax=qe}_validate(qe,Ke,Be){for(let Ve=0;Ve<Be.length;Ve++){let We=Be[Ve];if(qe.properties[We]!==Ke[We])return!1}return!0}store(qe,Ke,Be,Ve){let We=this.cache[qe]||[];We.push({properties:Ke,styleElement:Be,scopeSelector:Ve}),We.length>this.typeMax&&We.shift(),this.cache[qe]=We}fetch(qe,Ke,Be){let Ve=this.cache[qe];if(Ve)for(let We=Ve.length-1;0<=We;We--){let Xe=Ve[We];if(this._validate(Xe,Ke,Be))return Xe}}};class je{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=Ce.set(document.documentElement,new Ce({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return Q}get nativeCss(){return Z}get nativeCssApply(){return ee}flush(){He()}_generateScopeSelector($e){let qe=this._scopeCounter[$e]=(this._scopeCounter[$e]||0)+1;return`${$e}-${qe}`}getStyleAst($e){return P($e)}styleAstToString($e){return O($e)}_gatherStyles($e){let qe=$e.content.querySelectorAll('style'),Ke=[];for(let Be=0;Be<qe.length;Be++){let Ve=qe[Be];Ke.push(Ve.textContent),Ve.parentNode.removeChild(Ve)}return Ke.join('').trim()}_getCssBuild($e){let qe=$e.content.querySelector('style');return qe?qe.getAttribute('css-build')||'':''}prepareTemplate($e,qe,Ke){if(!$e._prepared){$e._prepared=!0,$e.name=qe,$e.extends=Ke,ge[qe]=$e;let Be=this._getCssBuild($e),Ve=this._gatherStyles($e),We={is:qe,extends:Ke,__cssBuild:Be};this.nativeShadow||Se.dom($e.content,qe);let Xe=Ue.detectMixin(Ve),Ge=y(Ve);Xe&&this.nativeCss&&!this.nativeCssApply&&Ue.transformRules(Ge,qe),$e._styleAst=Ge;let Ye=[];if(this.nativeCss||(Ye=Te.decorateStyles($e._styleAst,We)),!Ye.length||this.nativeCss){let ze=this.nativeShadow?$e.content:null,Je=Re[qe],Qe=this._generateStaticStyle(We,$e._styleAst,ze,Je);$e._style=Qe}$e._ownPropertyNames=Ye}}_generateStaticStyle($e,qe,Ke,Be){let Ve=Se.elementStyles($e,qe);if(Ve.length)return U(Ve,$e.is,Ke,Be)}_prepareHost($e){let Ke,qe=$e.getAttribute('is')||$e.localName;qe!==$e.localName&&(Ke=$e.localName);let We,Xe,Ge,Be=Re[qe],Ve=ge[qe];return Ve&&(We=Ve._styleAst,Xe=Ve._ownPropertyNames,Ge=Ve._cssBuild),Ce.set($e,new Ce(We,Be,Xe,qe,Ke,Ge))}applyStyle($e,qe){let Ke=$e.getAttribute('is')||$e.localName,Be=Ce.get($e),Ve=!!Be;if(Be||(Be=this._prepareHost($e)),this._isRootOwner($e)||(this._elementsHaveApplied=!0),window.CustomStyle){let We=window.CustomStyle;if(We._documentDirty){if(We.findStyles(),this.nativeCss?!this.nativeCssApply&&We._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),We.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),Ve))return}}if(qe&&(Be.overrideStyleProperties=Be.overrideStyleProperties||{},Object.assign(Be.overrideStyleProperties,qe)),this.nativeCss){Be.overrideStyleProperties&&this._updateNativeProperties($e,Be.overrideStyleProperties);let We=ge[Ke];if(!We&&!this._isRootOwner($e))return;if(We&&We._applyShimInvalid&&We._style){if(We._validating||(Ue.transformRules(We._styleAst,Ke),We._style.textContent=Se.elementStyles($e,Be.styleRules),Ce.startValidating(Ke)),this.nativeShadow){let Xe=$e.shadowRoot;if(Xe){let Ge=Xe.querySelector('style');Ge.textContent=Se.elementStyles($e,Be.styleRules)}}Be.styleRules=We._styleAst}}else this._updateProperties($e,Be),Be.ownStylePropertyNames&&Be.ownStylePropertyNames.length&&this._applyStyleProperties($e,Be);if(Ve){let We=this._isRootOwner($e)?$e:$e.shadowRoot;We&&this._applyToDescendants(We)}}_applyToDescendants($e){let qe=$e.children;for(let Be,Ke=0;Ke<qe.length;Ke++)Be=qe[Ke],Be.shadowRoot&&this.applyStyle(Be),this._applyToDescendants(Be)}_styleOwnerForNode($e){let qe=$e.getRootNode(),Ke=qe.host;return Ke?Ce.get(Ke)?Ke:this._styleOwnerForNode(Ke):this._documentOwner}_isRootOwner($e){return $e===this._documentOwner}_applyStyleProperties($e,qe){let Ke=$e.getAttribute('is')||$e.localName,Be=Fe.fetch(Ke,qe.styleProperties,qe.ownStylePropertyNames),Ve=Be&&Be.scopeSelector,We=Be?Be.styleElement:null,Xe=qe.scopeSelector;qe.scopeSelector=Ve||this._generateScopeSelector(Ke);let Ge=Te.applyElementStyle($e,qe.styleProperties,qe.scopeSelector,We);return this.nativeShadow||Te.applyElementScopeSelector($e,qe.scopeSelector,Xe),Be||Fe.store(Ke,qe.styleProperties,Ge,qe.scopeSelector),Ge}_updateProperties($e,qe){let Ke=this._styleOwnerForNode($e),Be=Ce.get(Ke),Ve=Be.styleProperties,We=Object.create(Ve||null),Xe=Te.hostAndRootPropertiesForScope($e,qe.styleRules),Ge=Te.propertyDataFromStyles(Be.styleRules,$e),Ye=Ge.properties;Object.assign(We,Xe.hostProps,Ye,Xe.rootProps),this._mixinOverrideStyles(We,qe.overrideStyleProperties),Te.reify(We),qe.styleProperties=We}_mixinOverrideStyles($e,qe){for(let Ke in qe){let Be=qe[Ke];(Be||0===Be)&&($e[Ke]=Be)}}_updateNativeProperties($e,qe){for(let Ke in qe)null===Ke?$e.style.removeProperty(Ke):$e.style.setProperty(Ke,qe[Ke])}updateStyles($e){this.applyStyle(this._documentOwner,$e)}_transformCustomStyleForDocument($e){let qe=P($e);D(qe,Ke=>{Q?Se.normalizeRootSelector(Ke):Se.documentRule(Ke),this.nativeCss&&!this.nativeCssApply&&Ue.transformRule(Ke)}),this.nativeCss?$e.textContent=O(qe):this._documentOwnerStyleInfo.styleRules.rules.push(qe)}_revalidateApplyShim($e){if(this.nativeCss&&!this.nativeCssApply){let qe=P($e);Ue.transformRules(qe),$e.textContent=O(qe)}}_applyCustomStyleToDocument($e){this.nativeCss||Te.applyCustomStyle($e,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue($e,qe){let Ke;if(!this.nativeCss){let Be=Ce.get($e)||Ce.get(this._styleOwnerForNode($e));Ke=Be.styleProperties[qe]}return Ke=Ke||window.getComputedStyle($e).getPropertyValue(qe),Ke.trim()}setElementClass($e,qe){let Ke=$e.getRootNode(),Be=qe?qe.split(/\s/):[],Ve=Ke.host&&Ke.host.localName;if(!Ve){var We=$e.getAttribute('class');if(We){let Xe=We.split(/\s/);for(let Ge=0;Ge<Xe.length;Ge++)if(Xe[Ge]===Se.SCOPE_NAME){Ve=Xe[Ge+1];break}}}if(Ve&&Be.push(Se.SCOPE_NAME,Ve),!this.nativeCss){let Xe=Ce.get($e);Xe&&Xe.scopeSelector&&Be.push(Te.XSCOPE_NAME,Xe.scopeSelector)}V($e,Be.join(' '))}_styleInfoForNode($e){return Ce.get($e)}}window.ShadyCSS=new je,function(){'use strict';window.HTMLImports?HTMLImports.whenReady(function(){requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent('WebComponentsReady'))})}):requestAnimationFrame(function(){window.dispatchEvent(new CustomEvent('WebComponentsReady'))})}(window.WebComponents),function(){var $e=document.createElement('style');$e.textContent='body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n';var qe=document.querySelector('head');qe.insertBefore($e,qe.firstChild)}(window.WebComponents)})();
//# sourceMappingURL=webcomponents-hi-ce.min.js.map