mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
7 lines
35 KiB
JavaScript
7 lines
35 KiB
JavaScript
(function(){'use strict';function d(ze){return ze=y(ze),h(_(ze),ze)}function y(ze){return ze.replace(W.comments,'').replace(W.port,'')}function _(ze){let $e={start:0,end:ze.length},Qe=$e;for(let Ze=0,Je=ze.length;Ze<Je;Ze++)if(ze[Ze]===X){Qe.rules||(Qe.rules=[]);let et=Qe,tt=et.rules[et.rules.length-1];Qe={start:Ze+1,parent:et,previous:tt},et.rules.push(Qe)}else ze[Ze]===V&&(Qe.end=Ze+1,Qe=Qe.parent||$e);return $e}function h(ze,$e){let Qe=$e.substring(ze.start,ze.end-1);if(ze.parsedCssText=ze.cssText=Qe.trim(),ze.parent){let Je=ze.previous?ze.previous.end:ze.parent.start;Qe=$e.substring(Je,ze.start-1),Qe=S(Qe),Qe=Qe.replace(W.multipleSpaces,' '),Qe=Qe.substring(Qe.lastIndexOf(';')+1);let et=ze.parsedSelector=ze.selector=Qe.trim();ze.atRule=0===et.indexOf('@'),ze.atRule?0===et.indexOf('@media')?ze.type=B.MEDIA_RULE:et.match(W.keyframesRule)&&(ze.type=B.KEYFRAMES_RULE,ze.keyframesName=ze.selector.split(W.multipleSpaces).pop()):0===et.indexOf(G)?ze.type=B.MIXIN_RULE:ze.type=B.STYLE_RULE}let Ze=ze.rules;if(Ze)for(let tt,Je=0,et=Ze.length;Je<et&&(tt=Ze[Je]);Je++)h(tt,$e);return ze}function S(ze){return ze.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let $e=arguments[1],Qe=6-$e.length;for(;Qe--;)$e='0'+$e;return'\\'+$e})}function g(ze,$e,Qe){Qe=Qe||'';let Ze='';if(ze.cssText||ze.rules){let Je=ze.rules;if(Je&&!E(Je))for(let rt,et=0,tt=Je.length;et<tt&&(rt=Je[et]);et++)Ze=g(rt,$e,Ze);else Ze=$e?ze.cssText:C(ze.cssText),Ze=Ze.trim(),Ze&&(Ze=' '+Ze+'\n')}return Ze&&(ze.selector&&(Qe+=ze.selector+' '+X+'\n'),Qe+=Ze,ze.selector&&(Qe+=V+'\n\n')),Qe}function E(ze){return 0===ze[0].selector.indexOf(G)}function C(ze){return ze=A(ze),N(ze)}function A(ze){return ze.replace(W.customProp,'').replace(W.mixinProp,'')}function N(ze){return ze.replace(W.mixinApply,'').replace(W.varApply,'')}function b(ze){ze&&(Q=Q&&!ze.shimcssproperties,$=$&&!ze.shimshadow)}function I(ze,$e){return'string'==typeof ze&&(ze=d(ze)),$e&&O(ze,$e),g(ze,Q)}function R(ze){return!ze.__cssRules&&ze.textContent&&(ze.__cssRules=d(ze.textContent)),ze.__cssRules}function M(ze){return ze.parent&&ze.parent.type===B.KEYFRAMES_RULE}function O(ze,$e,Qe,Ze){if(ze){let Je=!1;if(Ze&&ze.type===B.MEDIA_RULE){let tt=ze.selector.match(ee.MEDIA_MATCH);tt&&!window.matchMedia(tt[1]).matches&&(Je=!0)}ze.type===B.STYLE_RULE?$e(ze):Qe&&ze.type===B.KEYFRAMES_RULE?Qe(ze):ze.type===B.MIXIN_RULE&&(Je=!0);let et=ze.rules;if(et&&!Je)for(let st,tt=0,rt=et.length;tt<rt&&(st=et[tt]);tt++)O(st,$e,Qe,Ze)}}function P(ze,$e,Qe,Ze){let Je=w(ze,$e);return L(Je,Qe,Ze)}function L(ze,$e,Qe){$e=$e||document.head;let Ze=Qe&&Qe.nextSibling||$e.firstChild;return J=ze,$e.insertBefore(ze,Ze)}function w(ze,$e){let Qe=document.createElement('style');return $e&&Qe.setAttribute('scope',$e),Qe.textContent=ze,Qe}function U(ze){let $e=document.createComment(' Shady DOM styles for '+ze+' '),Qe=J?J.nextSibling:null,Ze=document.head;return Ze.insertBefore($e,Qe||Ze.firstChild),J=$e,$e}function D(ze,$e){let Qe=0;for(let Ze=$e,Je=ze.length;Ze<Je;Ze++)if('('===ze[Ze])Qe++;else if(')'===ze[Ze]&&0==--Qe)return Ze;return-1}function H(ze,$e){let Qe=ze.indexOf('var(');if(-1===Qe)return $e(ze,'','','');let Ze=D(ze,Qe+3),Je=ze.substring(Qe+4,Ze),et=ze.substring(0,Qe),tt=H(ze.substring(Ze+1),$e),rt=Je.indexOf(',');if(-1===rt)return $e(et,Je.trim(),'',tt);let st=Je.substring(0,rt).trim(),nt=Je.substring(rt+1).trim();return $e(et,st,nt,tt)}function k(ze,$e){window.ShadyDOM?window.ShadyDOM.nativeMethods.setAttribute.call(ze,'class',$e):ze.setAttribute('class',$e)}function F(ze,$e){let Qe=parseInt(ze/32);$e[Qe]=($e[Qe]||0)|1<<ze%32}function q(){Ve||(Ve=!0,window.HTMLImports?window.HTMLImports.whenReady(K):'complete'===document.readyState?K():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&K()}))}function K(){requestAnimationFrame(()=>{(Ve||Xe._elementsHaveApplied)&&Xe.updateStyles(),Ve=!1})}(ze=>{const $e=!!('import'in document.createElement('link'));let Qe=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return Qe||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Ze=/(^\/)|(^#)|(^[\w-\d]*:)/,Je=/(url\()([^)]*)(\))/g,et=/(@import[\s]+(?!url\())([^;]*)(;)/g,tt=/(<link[^>]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,rt={fixUrls(xt,At){xt.href&&xt.setAttribute('href',rt.replaceAttrUrl(xt.getAttribute('href'),At)),xt.src&&xt.setAttribute('src',rt.replaceAttrUrl(xt.getAttribute('src'),At)),'style'===xt.localName&&rt.resolveUrlsInStyle(xt,At)},fixUrlAttributes(xt,At){const vt=['action','src','href','url','style'];for(let Tt,Nt=0;Nt<vt.length&&(Tt=vt[Nt]);Nt++){const bt=xt.attributes[Tt],It=bt&&bt.value;It&&0>It.search(/({{|\[\[)/)&&(bt.value='style'===Tt?rt.resolveUrlsInCssText(It,At):rt.replaceAttrUrl(It,At))}},fixUrlsInTemplates(xt,At){const vt=xt.querySelectorAll('template');for(let Nt=0;Nt<vt.length;Nt++)rt.fixUrlsInTemplate(vt[Nt],At)},fixUrlsInTemplate(xt,At){const vt=xt.content||xt,Nt=vt.querySelectorAll('style, form[action], [src], [href], [url], [style]');for(let Tt=0;Tt<Nt.length;Tt++){const bt=Nt[Tt];'style'==bt.localName?rt.resolveUrlsInStyle(bt,At):rt.fixUrlAttributes(bt,At)}rt.fixUrlsInTemplates(vt,At)},resolveUrlsInStyle(xt,At){xt.textContent=rt.resolveUrlsInCssText(xt.textContent,At)},resolveUrlsInCssText(xt,At){let vt=rt.replaceUrls(xt,At,Je);return vt=rt.replaceUrls(vt,At,et),vt},replaceUrls(xt,At,vt){return xt.replace(vt,(Nt,Tt,bt,It)=>{let Rt=bt.replace(/["']/g,'');return At&&(Rt=rt.resolveUrl(Rt,At)),Tt+'\''+Rt+'\''+It})},replaceAttrUrl(xt,At){return xt&&Ze.test(xt)?xt:rt.resolveUrl(xt,At)},resolveUrl(xt,At){if(void 0===rt.__workingURL){rt.__workingURL=!1;try{const Nt=new URL('b','http://a');Nt.pathname='c%20d',rt.__workingURL='http://a/c%20d'===Nt.href}catch(Nt){}}if(rt.__workingURL)return new URL(xt,At).href;let vt=rt.__tempDoc;return vt||(vt=document.implementation.createHTMLDocument('temp'),rt.__tempDoc=vt,vt.__base=vt.createElement('base'),vt.head.appendChild(vt.__base),vt.__anchor=vt.createElement('a')),vt.__base.href=At,vt.__anchor.href=xt,vt.__anchor.href||xt}},st={async:!0,load(xt,At,vt){if(!xt)vt('error: href must be specified');else if(xt.match(/^data:/)){const Nt=xt.split(','),Tt=Nt[0];let bt=Nt[1];bt=-1<Tt.indexOf(';base64')?atob(bt):decodeURIComponent(bt),At(bt)}else{const Nt=new XMLHttpRequest;Nt.open('GET',xt,st.async),Nt.onload=()=>{let Tt=Nt.getResponseHeader('Location');if(Tt&&0===Tt.indexOf('/')){const It=location.origin||location.protocol+'//'+location.host;Tt=It+Tt}const bt=Nt.response||Nt.responseText;304===Nt.status||0===Nt.status||200<=Nt.status&&300>Nt.status?At(bt,Tt):vt(bt)},Nt.send()}}},nt=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),lt='link[rel=import]',ot='import-disable',it=`link[rel=stylesheet][href][type=${ot}]`,dt=`${lt}, ${it},
|
|
style:not([type]), link[rel=stylesheet][href]:not([type]),
|
|
script:not([type]), script[type="application/javascript"],
|
|
script[type="text/javascript"]`,pt='import-dependency',ct=`${lt}:not(${pt})`,mt=`script[${pt}]`,ut=`style[${pt}],
|
|
link[rel=stylesheet][${pt}]`;const ft=xt=>{return xt.nodeType===Node.ELEMENT_NODE&&'link'===xt.localName&&'import'===xt.rel},_t=(xt,At)=>{if(xt.__loaded)At&&At();else if('script'===xt.localName&&!xt.src)xt.__loaded=!0,At&&At();else{const vt=Nt=>{xt.removeEventListener(Nt.type,vt),xt.__loaded=!0,At&&At()};xt.addEventListener('load',vt),nt&&'style'===xt.localName||xt.addEventListener('error',vt)}},ht=xt=>{St(()=>gt(()=>xt&&xt()))},St=xt=>{if('loading'!==document.readyState)xt();else{const At=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',At),xt())};document.addEventListener('readystatechange',At)}},gt=xt=>{let At=document.querySelectorAll(ct),vt=At.length;if(!vt)return void xt();for(let bt,Nt=0,Tt=At.length;Nt<Tt&&(bt=At[Nt]);Nt++)_t(bt,()=>{0==--vt&&xt()})},Et=xt=>{if($e)return xt.ownerDocument;let At=xt.__ownerImport;if(!At){for(At=xt;(At=At.parentNode||At.host)&&!ft(At););xt.__ownerImport=At}return At},Ct=(xt,At)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(xt,At);const vt=document.createEvent('CustomEvent');return vt.initCustomEvent(xt,!!At.bubbles,!!At.cancelable,At.detail),vt};if($e){const xt=document.querySelectorAll(lt);for(let Tt,vt=0,Nt=xt.length;vt<Nt&&(Tt=xt[vt]);vt++)Tt.import&&'loading'===Tt.import.readyState||(Tt.__loaded=!0);const At=vt=>{const Nt=vt.target;ft(Nt)&&(Nt.__loaded=!0)};document.addEventListener('load',At,!0),document.addEventListener('error',At,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(xt=>this.handleMutations(xt)),St(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(xt){const At=xt.querySelectorAll(lt);for(let vt=0,Nt=At.length;vt<Nt;vt++)this.loadImport(At[vt]);this.processImportsIfLoadingDone()}loadImport(xt){const At=xt.href;if(void 0!==this.documents[At]){const vt=this.documents[At];return void(vt&&vt.__loaded&&(xt.import=vt,this.fireEventIfNeeded(xt)))}this.inflight++,this.documents[At]='pending',st.load(At,(vt,Nt)=>{const Tt=this.makeDocument(vt,Nt||At);this.documents[At]=Tt,this.inflight--,this.loadImports(Tt)},()=>{this.documents[At]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(xt,At){if(!xt)return document.createDocumentFragment();nt&&(xt=xt.replace(tt,(Mt,Ot,Pt)=>{return-1===Mt.indexOf('type=')?`${Ot} type=${ot} ${Pt}`:Mt}));let vt;const Nt=document.createElement('template');if(Nt.innerHTML=xt,Nt.content)vt=Nt.content;else for(vt=document.createDocumentFragment();Nt.firstChild;)vt.appendChild(Nt.firstChild);const Tt=vt.querySelector('base');Tt&&(At=rt.replaceAttrUrl(Tt.getAttribute('href'),At),Tt.removeAttribute('href'));const bt=vt.querySelectorAll('dom-module');for(let Ot,Mt=0;Mt<bt.length&&(Ot=bt[Mt]);Mt++)Ot.setAttribute('assetpath',rt.replaceAttrUrl(Ot.getAttribute('assetpath')||'',At));const It=vt.querySelectorAll(dt);let Rt=0;for(let Pt,Mt=0,Ot=It.length;Mt<Ot&&(Pt=It[Mt]);Mt++)if(_t(Pt),rt.fixUrls(Pt,At),Pt.setAttribute(pt,''),'script'===Pt.localName&&!Pt.src&&Pt.textContent){const Lt=Rt?`-${Rt}`:'',wt=Pt.textContent+`\n//# sourceURL=${At}${Lt}.js\n`;Pt.setAttribute('src','data:text/javascript;charset=utf-8,'+encodeURIComponent(wt)),Pt.textContent='',Rt++}return rt.fixUrlsInTemplates(vt,At),vt}processImportsIfLoadingDone(){if(!this.inflight){this.dynamicImportsMO.disconnect(),this.flatten(document);let xt=!1,At=!1;const vt=()=>{At&&xt&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{At=!0,vt()}),this.runScripts(()=>{xt=!0,vt()})}}flatten(xt){const At=xt.querySelectorAll(lt);for(let Tt,vt=0,Nt=At.length;vt<Nt&&(Tt=At[vt]);vt++){const bt=this.documents[Tt.href];Tt.import=bt,bt&&bt.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(this.documents[Tt.href]=Tt,Tt.readyState='loading',Tt.import=Tt,this.flatten(bt),Tt.appendChild(bt))}}runScripts(xt){const At=document.querySelectorAll(mt),vt=At.length,Nt=Tt=>{if(Tt<vt){const bt=At[Tt],It=document.createElement('script');bt.removeAttribute(pt);for(let Rt=0,Mt=bt.attributes.length;Rt<Mt;Rt++)It.setAttribute(bt.attributes[Rt].name,bt.attributes[Rt].value);Qe=It,bt.parentNode.replaceChild(It,bt),_t(It,()=>{Qe=null,Nt(Tt+1)})}else xt()};Nt(0)}waitForStyles(xt){const At=document.querySelectorAll(ut);let vt=At.length;if(!vt)return void xt();const Nt=nt&&!!document.querySelector(it);for(let It,Tt=0,bt=At.length;Tt<bt&&(It=At[Tt]);Tt++)if(_t(It,()=>{It.removeAttribute(pt),0==--vt&&xt()}),Nt&&It.parentNode!==document.head){let Rt=Et(It);for(;Rt&&Et(Rt);)Rt=Et(Rt);const Mt=It.parentNode,Ot=It.nextSibling,Pt=document.createElement(It.localName);Pt.__appliedElement=It,Pt.setAttribute('type','import-placeholder'),Rt.parentNode===document.head?document.head.insertBefore(It,Rt):document.head.appendChild(It),Mt.insertBefore(Pt,Ot),It.removeAttribute('type')}}fireEvents(){const xt=document.querySelectorAll(lt);for(let vt,At=xt.length-1;0<=At&&(vt=xt[At]);At--)this.fireEventIfNeeded(vt)}fireEventIfNeeded(xt){if(!xt.__loaded){xt.__loaded=!0,xt.import&&(xt.import.readyState='complete');const At=xt.import?'load':'error';xt.dispatchEvent(Ct(At,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(xt){for(let At=0;At<xt.length;At++){const vt=xt[At];if(vt.addedNodes)for(let Nt=0;Nt<vt.addedNodes.length;Nt++){const Tt=vt.addedNodes[Nt];Tt&&Tt.nodeType===Node.ELEMENT_NODE&&(ft(Tt)?this.loadImport(Tt):this.loadImports(Tt))}}}};ht(()=>document.dispatchEvent(Ct('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),ze.useNative=$e,ze.whenReady=ht,ze.importForElement=Et})(window.HTMLImports=window.HTMLImports||{});let B={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},X='{',V='}',W={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},G='--',$=!(window.ShadyDOM&&window.ShadyDOM.inUse),Q=!navigator.userAgent.match('AppleWebKit/601')&&window.CSS&&CSS.supports&&CSS.supports('box-shadow','0 0 0 var(--foo)');window.ShadyCSS?b(window.ShadyCSS):window.WebComponents&&b(window.WebComponents.flags);let J=null,ee={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 te='style-scope';class re{get SCOPE_NAME(){return te}dom(ze,$e,Qe){ze.__styleScoped?ze.__styleScoped=null:this._transformDom(ze,$e||'',Qe)}_transformDom(ze,$e,Qe){ze.nodeType===Node.ELEMENT_NODE&&this.element(ze,$e,Qe);let Ze='template'===ze.localName?(ze.content||ze._content).childNodes:ze.children||ze.childNodes;if(Ze)for(let Je=0;Je<Ze.length;Je++)this._transformDom(Ze[Je],$e,Qe)}element(ze,$e,Qe){if($e)if(ze.classList)Qe?(ze.classList.remove(te),ze.classList.remove($e)):(ze.classList.add(te),ze.classList.add($e));else if(ze.getAttribute){let Ze=ze.getAttribute('class');if(!Qe){let Je=(Ze?Ze+' ':'')+te+' '+$e;k(ze,Je)}else if(Ze){let Je=Ze.replace(te,'').replace($e,'');k(ze,Je)}}}elementStyles(ze,$e,Qe){let Ze=ze.__cssBuild,Je=$||'shady'===Ze?I($e,Qe):this.css($e,ze.is,ze.extends,Qe)+'\n\n';return Je.trim()}css(ze,$e,Qe,Ze){let Je=this._calcHostScope($e,Qe);$e=this._calcElementScope($e);let et=this;return I(ze,function(tt){tt.isScoped||(et.rule(tt,$e,Je),tt.isScoped=!0),Ze&&Ze(tt,$e,Je)})}_calcElementScope(ze){return ze?'.'+ze:''}_calcHostScope(ze,$e){return $e?'[is='+ze+']':ze}rule(ze,$e,Qe){this._transformRule(ze,this._transformComplexSelector,$e,Qe)}_transformRule(ze,$e,Qe,Ze){ze.selector=ze.transformedSelector=this._transformRuleCss(ze,$e,Qe,Ze)}_transformRuleCss(ze,$e,Qe,Ze){let Je=ze.selector.split(le);if(!M(ze))for(let rt,et=0,tt=Je.length;et<tt&&(rt=Je[et]);et++)Je[et]=$e.call(this,rt,Qe,Ze);return Je.join(le)}_transformComplexSelector(ze,$e,Qe){let Ze=!1;return ze=ze.trim(),ze=ze.replace(se,(Je,et,tt)=>`:${et}(${tt.replace(/\s/g,'')})`),ze=ze.replace(me,`${ie} $1`),ze=ze.replace(oe,(Je,et,tt)=>{if(!Ze){let rt=this._transformCompoundSelector(tt,et,$e,Qe);Ze=Ze||rt.stop,et=rt.combinator,tt=rt.value}return et+tt}),ze}_transformCompoundSelector(ze,$e,Qe,Ze){let Je=ze.indexOf(pe);0<=ze.indexOf(ie)?ze=this._transformHostSelector(ze,Ze):0!==Je&&(ze=Qe?this._transformSimpleSelector(ze,Qe):ze);let et=!1;0<=Je&&($e='',et=!0);let tt;return et&&(tt=!0,et&&(ze=ze.replace(ye,(rt,st)=>` > ${st}`))),ze=ze.replace(fe,(rt,st,nt)=>`[dir="${nt}"] ${st}, ${st}[dir="${nt}"]`),{value:ze,combinator:$e,stop:tt}}_transformSimpleSelector(ze,$e){let Qe=ze.split(he);return Qe[0]+=$e,Qe.join(he)}_transformHostSelector(ze,$e){let Qe=ze.match(ue),Ze=Qe&&Qe[2].trim()||'';if(Ze){if(!Ze[0].match(ae)){let Je=Ze.split(ae)[0];return Je===$e?Ze:'should_not_match'}return ze.replace(ue,function(Je,et,tt){return $e+tt})}return ze.replace(ie,$e)}documentRule(ze){ze.selector=ze.parsedSelector,this.normalizeRootSelector(ze),this._transformRule(ze,this._transformDocumentSelector)}normalizeRootSelector(ze){ze.selector===':root'&&(ze.selector='html')}_transformDocumentSelector(ze){return ze.match(pe)?this._transformComplexSelector(ze,ne):this._transformSimpleSelector(ze.trim(),ne)}}let se=/:(nth[-\w]+)\(([^)]+)\)/,ne=`:not(.${te})`,le=',',oe=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,ae=/[[.:#*]/,ie=':host',pe='::slotted',me=/^(::slotted)/,ue=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ye=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,fe=/(.*):dir\((?:(ltr|rtl))\)/,he=':';var Ee=new re,Ce={};const xe=Promise.resolve();class Ae{static get(ze){return ze.__styleInfo}static set(ze,$e){return ze.__styleInfo=$e,$e}static invalidate(ze){Ce[ze]&&(Ce[ze]._applyShimInvalid=!0)}static startValidating(ze){const $e=Ce[ze];$e._validating||($e._validating=!0,xe.then(()=>{$e._applyShimInvalid=!1,$e._validating=!1}))}constructor(ze,$e,Qe,Ze,Je,et){this.styleRules=ze||null,this.placeholder=$e||null,this.ownStylePropertyNames=Qe||[],this.overrideStyleProperties=null,this.elementName=Ze||'',this.cssBuild=et||'',this.typeExtension=Je||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const ve=window.Element.prototype,Ne=ve.matches||ve.matchesSelector||ve.mozMatchesSelector||ve.msMatchesSelector||ve.oMatchesSelector||ve.webkitMatchesSelector,Te=navigator.userAgent.match('Trident'),be='x-scope';class Ie{get XSCOPE_NAME(){return be}decorateStyles(ze){let $e=this,Qe={},Ze=[],Je=0;O(ze,function(tt){$e.decorateRule(tt),tt.index=Je++,$e.collectPropertiesInCssText(tt.propertyInfo.cssText,Qe)},function(rt){Ze.push(rt)}),ze._keyframes=Ze;let et=[];for(let tt in Qe)et.push(tt);return et}decorateRule(ze){if(ze.propertyInfo)return ze.propertyInfo;let $e={},Qe={},Ze=this.collectProperties(ze,Qe);return Ze&&($e.properties=Qe,ze.rules=null),$e.cssText=this.collectCssText(ze),ze.propertyInfo=$e,$e}collectProperties(ze,$e){let Qe=ze.propertyInfo;if(!Qe){let Ze,Je=ee.VAR_ASSIGN,et=ze.parsedCssText,tt,rt;for(;Ze=Je.exec(et);)tt=(Ze[2]||Ze[3]).trim(),('inherit'!==tt||'unset'!==tt)&&($e[Ze[1].trim()]=tt),rt=!0;return rt}else if(Qe.properties)return Object.assign($e,Qe.properties),!0}collectCssText(ze){return this.collectConsumingCssText(ze.parsedCssText)}collectConsumingCssText(ze){return ze.replace(ee.BRACKETED,'').replace(ee.VAR_ASSIGN,'')}collectPropertiesInCssText(ze,$e){for(let Qe,Ze;Qe=ee.VAR_CONSUMED.exec(ze);)Ze=Qe[1],':'!==Qe[2]&&($e[Ze]=!0)}reify(ze){let $e=Object.getOwnPropertyNames(ze);for(let Ze,Qe=0;Qe<$e.length;Qe++)Ze=$e[Qe],ze[Ze]=this.valueForProperty(ze[Ze],ze)}valueForProperty(ze,$e){if(ze)if(0<=ze.indexOf(';'))ze=this.valueForProperties(ze,$e);else{let Qe=this;ze=H(ze,function(Je,et,tt,rt){if(!et)return Je+rt;let st=Qe.valueForProperty($e[et],$e);return st&&'initial'!==st?'apply-shim-inherit'===st&&(st='inherit'):st=Qe.valueForProperty($e[tt]||tt,$e)||tt,Je+(st||'')+rt})}return ze&&ze.trim()||''}valueForProperties(ze,$e){let Qe=ze.split(';');for(let Je,et,Ze=0;Ze<Qe.length;Ze++)if(Je=Qe[Ze]){if(ee.MIXIN_MATCH.lastIndex=0,et=ee.MIXIN_MATCH.exec(Je),et)Je=this.valueForProperty($e[et[1]],$e);else{let tt=Je.indexOf(':');if(-1!==tt){let rt=Je.substring(tt);rt=rt.trim(),rt=this.valueForProperty(rt,$e)||rt,Je=Je.substring(0,tt)+rt}}Qe[Ze]=Je&&Je.lastIndexOf(';')===Je.length-1?Je.slice(0,-1):Je||''}return Qe.join(';')}applyProperties(ze,$e){let Qe='';ze.propertyInfo||this.decorateRule(ze),ze.propertyInfo.cssText&&(Qe=this.valueForProperties(ze.propertyInfo.cssText,$e)),ze.cssText=Qe}applyKeyframeTransforms(ze,$e){let Qe=ze.cssText,Ze=ze.cssText;if(null==ze.hasAnimations&&(ze.hasAnimations=ee.ANIMATION_MATCH.test(Qe)),ze.hasAnimations){let Je;if(null==ze.keyframeNamesToTransform)for(let et in ze.keyframeNamesToTransform=[],$e)Je=$e[et],Ze=Je(Qe),Qe!==Ze&&(Qe=Ze,ze.keyframeNamesToTransform.push(et));else{for(let et=0;et<ze.keyframeNamesToTransform.length;++et)Je=$e[ze.keyframeNamesToTransform[et]],Qe=Je(Qe);Ze=Qe}}ze.cssText=Ze}propertyDataFromStyles(ze,$e){let Qe={},Ze=this,Je=[];return O(ze,function(et){et.propertyInfo||Ze.decorateRule(et);let tt=et.transformedSelector||et.parsedSelector;$e&&et.propertyInfo.properties&&tt&&Ne.call($e,tt)&&(Ze.collectProperties(et,Qe),F(et.index,Je))},null,!0),{properties:Qe,key:Je}}whenHostOrRootRule(ze,$e,Qe,Ze){if($e.propertyInfo||this.decorateRule($e),!!$e.propertyInfo.properties){let Je=ze.is?Ee._calcHostScope(ze.is,ze.extends):'html',et=$e.parsedSelector,tt=':host > *'===et||'html'===et,rt=0===et.indexOf(':host')&&!tt;if('shady'===Qe&&(tt=et===Je+' > *.'+Je||-1!==et.indexOf('html'),rt=!tt&&0===et.indexOf(Je)),'shadow'===Qe&&(tt=':host > *'===et||'html'===et,rt=rt&&!tt),tt||rt){let st=Je;rt&&($&&!$e.transformedSelector&&($e.transformedSelector=Ee._transformRuleCss($e,Ee._transformComplexSelector,Ee._calcElementScope(ze.is),Je)),st=$e.transformedSelector||Je),Ze({selector:st,isHost:rt,isRoot:tt})}}}hostAndRootPropertiesForScope(ze,$e){let Qe={},Ze={},Je=this,et=$e&&$e.__cssBuild;return O($e,function(tt){Je.whenHostOrRootRule(ze,tt,et,function(rt){let st=ze._element||ze;Ne.call(st,rt.selector)&&(rt.isHost?Je.collectProperties(tt,Qe):Je.collectProperties(tt,Ze))})},null,!0),{rootProps:Ze,hostProps:Qe}}transformStyles(ze,$e,Qe){let Ze=this,Je=Ee._calcHostScope(ze.is,ze.extends),et=ze.extends?'\\'+Je.slice(0,-1)+'\\]':Je,tt=new RegExp(ee.HOST_PREFIX+et+ee.HOST_SUFFIX),rt=Ae.get(ze).styleRules,st=this._elementKeyframeTransforms(ze,rt,Qe);return Ee.elementStyles(ze,rt,function(nt){Ze.applyProperties(nt,$e),$||M(nt)||!nt.cssText||(Ze.applyKeyframeTransforms(nt,st),Ze._scopeSelector(nt,tt,Je,Qe))})}_elementKeyframeTransforms(ze,$e,Qe){let Ze=$e._keyframes,Je={};if(!$&&Ze)for(let et=0,tt=Ze[et];et<Ze.length;tt=Ze[++et])this._scopeKeyframes(tt,Qe),Je[tt.keyframesName]=this._keyframesRuleTransformer(tt);return Je}_keyframesRuleTransformer(ze){return function($e){return $e.replace(ze.keyframesNameRx,ze.transformedKeyframesName)}}_scopeKeyframes(ze,$e){ze.keyframesNameRx=new RegExp(ze.keyframesName,'g'),ze.transformedKeyframesName=ze.keyframesName+'-'+$e,ze.transformedSelector=ze.transformedSelector||ze.selector,ze.selector=ze.transformedSelector.replace(ze.keyframesName,ze.transformedKeyframesName)}_scopeSelector(ze,$e,Qe,Ze){ze.transformedSelector=ze.transformedSelector||ze.selector;let Je=ze.transformedSelector,et='.'+Ze,tt=Je.split(',');for(let nt,rt=0,st=tt.length;rt<st&&(nt=tt[rt]);rt++)tt[rt]=nt.match($e)?nt.replace(Qe,et):et+' '+nt;ze.selector=tt.join(',')}applyElementScopeSelector(ze,$e,Qe){let Ze=ze.getAttribute('class')||'',Je=Ze;Qe&&(Je=Ze.replace(new RegExp('\\s*'+be+'\\s*'+Qe+'\\s*','g'),' ')),Je+=(Je?' ':'')+be+' '+$e,Ze!==Je&&k(ze,Je)}applyElementStyle(ze,$e,Qe,Ze){let Je=Ze?Ze.textContent||'':this.transformStyles(ze,$e,Qe),et=Ae.get(ze),tt=et.customStyle;return tt&&!$&&tt!==Ze&&(tt._useCount--,0>=tt._useCount&&tt.parentNode&&tt.parentNode.removeChild(tt)),$?et.customStyle?(et.customStyle.textContent=Je,Ze=et.customStyle):Je&&(Ze=P(Je,Qe,ze.shadowRoot,et.placeholder)):Ze?!Ze.parentNode&&L(Ze,null,et.placeholder):Je&&(Ze=P(Je,Qe,null,et.placeholder)),Ze&&(Ze._useCount=Ze._useCount||0,et.customStyle!=Ze&&Ze._useCount++,et.customStyle=Ze),Te&&(Ze.textContent=Ze.textContent),Ze}applyCustomStyle(ze,$e){let Qe=R(ze),Ze=this;ze.textContent=I(Qe,function(Je){let et=Je.cssText=Je.parsedCssText;Je.propertyInfo&&Je.propertyInfo.cssText&&(et=A(et),Je.cssText=Ze.valueForProperties(et,$e))})}}var Re=new Ie;let Me={};const Oe=window.customElements;if(Oe&&!$){const ze=Oe.define;Oe.define=function($e,Qe,Ze){return Me[$e]=U($e),ze.call(Oe,$e,Qe,Ze)}}let Le=ee.MIXIN_MATCH,we=ee.VAR_ASSIGN,Ue=/;\s*/m,De=/^\s*(initial)|(inherit)\s*$/,He='_-_';class ke{constructor(){this._map={}}set(ze,$e){ze=ze.trim(),this._map[ze]={properties:$e,dependants:{}}}get(ze){return ze=ze.trim(),this._map[ze]}}class Fe{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new ke,this._separator=He,this._boundProduceCssProperties=(ze,$e,Qe,Ze)=>this._produceCssProperties(ze,$e,Qe,Ze)}detectMixin(ze){const $e=Le.test(ze)||we.test(ze);return Le.lastIndex=0,we.lastIndex=0,$e}transformStyle(ze,$e){let Qe=R(ze);return this.transformRules(Qe,$e),Qe}transformRules(ze,$e){this._currentTemplate=Ce[$e],O(ze,Qe=>{this.transformRule(Qe)}),this._currentTemplate=null}transformRule(ze){ze.cssText=this.transformCssText(ze.parsedCssText),':root'===ze.selector&&(ze.selector=':host > *')}transformCssText(ze){return ze=ze.replace(we,this._boundProduceCssProperties),this._consumeCssProperties(ze)}_getInitialValueForProperty(ze){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(ze)}_consumeCssProperties(ze){for(let $e;$e=Le.exec(ze);){let Qe=$e[0],Ze=$e[1],Je=$e.index,et=Je+Qe.indexOf('@apply'),tt=Je+Qe.length,rt=ze.slice(0,et),st=ze.slice(tt),nt=this._cssTextToMap(rt),lt=this._atApplyToCssProperties(Ze,nt);ze=[rt,lt,st].join(''),Le.lastIndex=Je+lt.length}return ze}_atApplyToCssProperties(ze,$e){ze=ze.replace(Ue,'');let Qe=[],Ze=this._map.get(ze);if(Ze||(this._map.set(ze,{}),Ze=this._map.get(ze)),Ze){this._currentTemplate&&(Ze.dependants[this._currentTemplate.name]=this._currentTemplate);let Je,et,tt;for(Je in Ze.properties)tt=$e&&$e[Je],et=[Je,': var(',ze,He,Je],tt&&et.push(',',tt),et.push(')'),Qe.push(et.join(''))}return Qe.join('; ')}_replaceInitialOrInherit(ze,$e){let Qe=De.exec($e);return Qe&&(Qe[1]?$e=Fe._getInitialValueForProperty(ze):$e='apply-shim-inherit'),$e}_cssTextToMap(ze){let $e=ze.split(';'),Qe,Ze,Je={};for(let tt,rt,et=0;et<$e.length;et++)tt=$e[et],tt&&(rt=tt.split(':'),1<rt.length&&(Qe=rt[0].trim(),Ze=this._replaceInitialOrInherit(Qe,rt.slice(1).join(':')),Je[Qe]=Ze));return Je}_invalidateMixinEntry(ze){for(let $e in ze.dependants)this._currentTemplate&&$e===this._currentTemplate.name||Ae.invalidate($e)}_produceCssProperties(ze,$e,Qe,Ze){if(Qe&&H(Qe,(pt,ct)=>{ct&&this._map.get(ct)&&(Ze='@apply '+ct+';')}),!Ze)return ze;let Je=this._consumeCssProperties(Ze),et=ze.slice(0,ze.indexOf('--')),tt=this._cssTextToMap(Je),rt=tt,st=this._map.get($e),nt=st&&st.properties;nt?rt=Object.assign(Object.create(nt),tt):this._map.set($e,rt);let ot,it,lt=[],dt=!1;for(ot in rt)it=tt[ot],void 0==it&&(it='initial'),nt&&!(ot in nt)&&(dt=!0),lt.push($e+He+ot+': '+it);return dt&&this._invalidateMixinEntry(st),st&&(st.properties=rt),Qe&&(et=ze+';'+et),et+lt.join('; ')+';'}}let qe=new Fe;window.ApplyShim=qe;let je=function(){};if(!$){let ze=et=>{return et.classList&&!et.classList.contains(Ee.SCOPE_NAME)||et instanceof SVGElement&&(!et.hasAttribute('class')||0>et.getAttribute('class').indexOf(Ee.SCOPE_NAME))},$e=et=>{for(let rt,tt=0;tt<et.length;tt++)if(rt=et[tt],rt.target!==document.documentElement&&rt.target!==document.head){for(let nt,st=0;st<rt.addedNodes.length;st++)if(nt=rt.addedNodes[st],ze(nt)){let lt=nt.getRootNode();if(lt.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let ot=lt.host;if(ot){let it=ot.is||ot.localName;Ee.dom(nt,it)}}}for(let nt,st=0;st<rt.removedNodes.length;st++)if(nt=rt.removedNodes[st],nt.nodeType===Node.ELEMENT_NODE){let lt;if(nt.classList?lt=Array.from(nt.classList):nt.hasAttribute('class')&&(lt=nt.getAttribute('class').split(/\s+/)),void 0!=lt){let ot=lt.indexOf(Ee.SCOPE_NAME);if(0<=ot){let it=lt[ot+1];it&&Ee.dom(nt,it,!0)}}}}},Qe=new MutationObserver($e),Ze=et=>{Qe.observe(et,{childList:!0,subtree:!0})},Je=window.customElements&&!window.customElements.flush;if(Je)Ze(document);else{let et=()=>{Ze(document.body)};window.HTMLImports?window.HTMLImports.whenReady(et):requestAnimationFrame(function(){if('loading'===document.readyState){let tt=function(){et(),document.removeEventListener('readystatechange',tt)};document.addEventListener('readystatechange',tt)}else et()})}je=function(){$e(Qe.takeRecords())}}let Ke=new class{constructor(ze=100){this.cache={},this.typeMax=ze}_validate(ze,$e,Qe){for(let Je,Ze=0;Ze<Qe.length;Ze++)if(Je=Qe[Ze],ze.properties[Je]!==$e[Je])return!1;return!0}store(ze,$e,Qe,Ze){let Je=this.cache[ze]||[];Je.push({properties:$e,styleElement:Qe,scopeSelector:Ze}),Je.length>this.typeMax&&Je.shift(),this.cache[ze]=Je}fetch(ze,$e,Qe){let Ze=this.cache[ze];if(Ze)for(let et,Je=Ze.length-1;0<=Je;Je--)if(et=Ze[Je],this._validate(et,$e,Qe))return et}};class Be{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=Ae.set(document.documentElement,new Ae({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return $}get nativeCss(){return Q}get nativeCssApply(){return!1}flush(){je()}_generateScopeSelector(ze){let $e=this._scopeCounter[ze]=(this._scopeCounter[ze]||0)+1;return`${ze}-${$e}`}getStyleAst(ze){return R(ze)}styleAstToString(ze){return I(ze)}_gatherStyles(ze){let $e=ze.content.querySelectorAll('style'),Qe=[];for(let Je,Ze=0;Ze<$e.length;Ze++)Je=$e[Ze],Qe.push(Je.textContent),Je.parentNode.removeChild(Je);return Qe.join('').trim()}_getCssBuild(ze){let $e=ze.content.querySelector('style');return $e?$e.getAttribute('css-build')||'':''}prepareTemplate(ze,$e,Qe){if(!ze._prepared){ze._prepared=!0,ze.name=$e,ze.extends=Qe,Ce[$e]=ze;let Ze=this._getCssBuild(ze),Je=this._gatherStyles(ze),et={is:$e,extends:Qe,__cssBuild:Ze};this.nativeShadow||Ee.dom(ze.content,$e);let tt=qe.detectMixin(Je),rt=d(Je);tt&&this.nativeCss&&!this.nativeCssApply&&qe.transformRules(rt,$e),ze._styleAst=rt;let st=[];if(this.nativeCss||(st=Re.decorateStyles(ze._styleAst,et)),!st.length||this.nativeCss){let nt=this.nativeShadow?ze.content:null,lt=Me[$e],ot=this._generateStaticStyle(et,ze._styleAst,nt,lt);ze._style=ot}ze._ownPropertyNames=st}}_generateStaticStyle(ze,$e,Qe,Ze){let Je=Ee.elementStyles(ze,$e);if(Je.length)return P(Je,ze.is,Qe,Ze)}_prepareHost(ze){let Qe,$e=ze.getAttribute('is')||ze.localName;$e!==ze.localName&&(Qe=ze.localName);let et,tt,rt,Ze=Me[$e],Je=Ce[$e];return Je&&(et=Je._styleAst,tt=Je._ownPropertyNames,rt=Je._cssBuild),Ae.set(ze,new Ae(et,Ze,tt,$e,Qe,rt))}applyStyle(ze,$e){let Qe=ze.getAttribute('is')||ze.localName,Ze=Ae.get(ze),Je=!!Ze;if(Ze||(Ze=this._prepareHost(ze)),this._isRootOwner(ze)||(this._elementsHaveApplied=!0),window.CustomStyle){let et=window.CustomStyle;if(et._documentDirty){if(et.findStyles(),this.nativeCss?!this.nativeCssApply&&et._revalidateApplyShim():this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),et.applyStyles(),!this._elementsHaveApplied)return;if(!this.nativeCss&&(this.updateStyles(),Je))return}}if($e&&(Ze.overrideStyleProperties=Ze.overrideStyleProperties||{},Object.assign(Ze.overrideStyleProperties,$e)),this.nativeCss){Ze.overrideStyleProperties&&this._updateNativeProperties(ze,Ze.overrideStyleProperties);let et=Ce[Qe];if(!et&&!this._isRootOwner(ze))return;if(et&&et._applyShimInvalid&&et._style){if(et._validating||(qe.transformRules(et._styleAst,Qe),et._style.textContent=Ee.elementStyles(ze,Ze.styleRules),Ae.startValidating(Qe)),this.nativeShadow){let tt=ze.shadowRoot;if(tt){let rt=tt.querySelector('style');rt.textContent=Ee.elementStyles(ze,Ze.styleRules)}}Ze.styleRules=et._styleAst}}else this._updateProperties(ze,Ze),Ze.ownStylePropertyNames&&Ze.ownStylePropertyNames.length&&this._applyStyleProperties(ze,Ze);if(Je){let et=this._isRootOwner(ze)?ze:ze.shadowRoot;et&&this._applyToDescendants(et)}}_applyToDescendants(ze){let $e=ze.children||ze.childNodes;for(let Ze,Qe=0;Qe<$e.length;Qe++)Ze=$e[Qe],Ze.shadowRoot&&this.applyStyle(Ze),this._applyToDescendants(Ze)}_styleOwnerForNode(ze){let $e=ze.getRootNode(),Qe=$e.host;return Qe?Ae.get(Qe)?Qe:this._styleOwnerForNode(Qe):this._documentOwner}_isRootOwner(ze){return ze===this._documentOwner}_applyStyleProperties(ze,$e){let Qe=ze.getAttribute('is')||ze.localName,Ze=Ke.fetch(Qe,$e.styleProperties,$e.ownStylePropertyNames),Je=Ze&&Ze.scopeSelector,et=Ze?Ze.styleElement:null,tt=$e.scopeSelector;$e.scopeSelector=Je||this._generateScopeSelector(Qe);let rt=Re.applyElementStyle(ze,$e.styleProperties,$e.scopeSelector,et);return this.nativeShadow||Re.applyElementScopeSelector(ze,$e.scopeSelector,tt),Ze||Ke.store(Qe,$e.styleProperties,rt,$e.scopeSelector),rt}_updateProperties(ze,$e){let Qe=this._styleOwnerForNode(ze),Ze=Ae.get(Qe),Je=Ze.styleProperties,et=Object.create(Je||null),tt=Re.hostAndRootPropertiesForScope(ze,$e.styleRules),rt=Re.propertyDataFromStyles(Ze.styleRules,ze),st=rt.properties;Object.assign(et,tt.hostProps,st,tt.rootProps),this._mixinOverrideStyles(et,$e.overrideStyleProperties),Re.reify(et),$e.styleProperties=et}_mixinOverrideStyles(ze,$e){for(let Qe in $e){let Ze=$e[Qe];(Ze||0===Ze)&&(ze[Qe]=Ze)}}_updateNativeProperties(ze,$e){for(let Qe in $e)null===Qe?ze.style.removeProperty(Qe):ze.style.setProperty(Qe,$e[Qe])}updateStyles(ze){this.applyStyle(this._documentOwner,ze)}_transformCustomStyleForDocument(ze){let $e=R(ze);O($e,Qe=>{$?Ee.normalizeRootSelector(Qe):Ee.documentRule(Qe),this.nativeCss&&!this.nativeCssApply&&qe.transformRule(Qe)}),this.nativeCss?ze.textContent=I($e):this._documentOwnerStyleInfo.styleRules.rules.push($e)}_revalidateApplyShim(ze){if(this.nativeCss&&!this.nativeCssApply){let $e=R(ze);qe.transformRules($e),ze.textContent=I($e)}}_applyCustomStyleToDocument(ze){this.nativeCss||Re.applyCustomStyle(ze,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(ze,$e){let Qe;if(!this.nativeCss){let Ze=Ae.get(ze)||Ae.get(this._styleOwnerForNode(ze));Qe=Ze.styleProperties[$e]}return Qe=Qe||window.getComputedStyle(ze).getPropertyValue($e),Qe.trim()}setElementClass(ze,$e){let Qe=ze.getRootNode(),Ze=$e?$e.split(/\s/):[],Je=Qe.host&&Qe.host.localName;if(!Je){var et=ze.getAttribute('class');if(et){let tt=et.split(/\s/);for(let rt=0;rt<tt.length;rt++)if(tt[rt]===Ee.SCOPE_NAME){Je=tt[rt+1];break}}}if(Je&&Ze.push(Ee.SCOPE_NAME,Je),!this.nativeCss){let tt=Ae.get(ze);tt&&tt.scopeSelector&&Ze.push(Re.XSCOPE_NAME,tt.scopeSelector)}k(ze,Ze.join(' '))}_styleInfoForNode(ze){return Ae.get(ze)}}window.ShadyCSS=new Be;let Xe=window.ShadyCSS,Ve=!1,We=[],Ge=null;class Ye extends HTMLElement{static get _customStyles(){return We}static get processHook(){return Ge}static set processHook(ze){Ge=ze}static get _documentDirty(){return Ve}static findStyles(){for(let $e,ze=0;ze<We.length;ze++)if($e=We[ze],!$e._style){let Qe=$e.querySelector('style');if(!Qe)continue;if(Qe.__appliedElement)for(let Je,Ze=0;Ze<Qe.attributes.length;Ze++)Je=Qe.attributes[Ze],Qe.__appliedElement.setAttribute(Je.name,Je.value);$e._style=Qe.__appliedElement||Qe,Ge&&Ge($e._style),Xe._transformCustomStyleForDocument($e._style)}}static _revalidateApplyShim(){for(let $e,ze=0;ze<We.length;ze++)$e=We[ze],$e._style&&Xe._revalidateApplyShim($e._style)}static applyStyles(){for(let $e,ze=0;ze<We.length;ze++)$e=We[ze],$e._style&&Xe._applyCustomStyleToDocument($e._style);Ve=!1}constructor(){super(),We.push(this),q()}}window.CustomStyle=Ye,window.customElements.define('custom-style',Ye),function(){'use strict';if(customElements&&customElements.polyfillWrapFlushCallback){function $e(){if(Qe){let Je=Qe;return Qe=null,Je(),!0}}let Qe,Ze=HTMLImports.whenReady;customElements.polyfillWrapFlushCallback(function(Je){Qe=Je,Ze($e)}),HTMLImports.whenReady=function(Je){Ze(function(){$e()?HTMLImports.whenReady(Je):Je()})}}HTMLImports.whenReady(function(){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.js.map
|