From 2cc18747effc683c250fb2fd00d8b6d228e2899c Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 9 Feb 2017 16:50:26 -0800 Subject: [PATCH] Update builds. --- webcomponents-hi-sd-ce.js | 4 ++-- webcomponents-hi-sd-ce.js.map | 2 +- webcomponents-lite.js | 2 +- webcomponents-lite.js.map | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/webcomponents-hi-sd-ce.js b/webcomponents-hi-sd-ce.js index 8e89f7c..8ac3e2b 100644 --- a/webcomponents-hi-sd-ce.js +++ b/webcomponents-hi-sd-ce.js @@ -1,6 +1,6 @@ -(function(){'use strict';function _(Mt){return Mt=$(Mt),te(ee(Mt),Mt)}function $(Mt){return Mt.replace(Re.comments,'').replace(Re.port,'')}function ee(Mt){let Ot={start:0,end:Mt.length},Dt=Ot;for(let wt=0,Lt=Mt.length;wt{'complete'===document.readyState&&ve()}))}function ve(){requestAnimationFrame(()=>{(Pt||At._elementsHaveApplied)&&At.updateStyles(),Pt=!1})}(Mt=>{const Ot=!!('import'in document.createElement('link'));let Dt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return Dt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const wt=/(^\/)|(^#)|(^[\w-\d]*:)/,Lt=/(url\()([^)]*)(\))/g,kt=/(@import[\s]+(?!url\())([^;]*)(;)/g,Ht=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,Ft={fixUrls(ro,so){ro.href&&ro.setAttribute('href',Ft.replaceAttrUrl(ro.getAttribute('href'),so)),ro.src&&ro.setAttribute('src',Ft.replaceAttrUrl(ro.getAttribute('src'),so)),'style'===ro.localName&&Ft.resolveUrlsInStyle(ro,so)},fixUrlAttributes(ro,so){const no=['action','src','href','url','style'];for(let lo,ao=0;aopo.search(/({{|\[\[)/)&&(io.value='style'===lo?Ft.resolveUrlsInCssText(po,so):Ft.replaceAttrUrl(po,so))}},fixUrlsInTemplates(ro,so){const no=ro.querySelectorAll('template');for(let ao=0;ao{let co=io.replace(/["']/g,'');return so&&(co=Ft.resolveUrl(co,so)),lo+'\''+co+'\''+po})},replaceAttrUrl(ro,so){return ro&&wt.test(ro)?ro:Ft.resolveUrl(ro,so)},resolveUrl(ro,so){if(void 0===Ft.__workingURL){Ft.__workingURL=!1;try{const ao=new URL('b','http://a');ao.pathname='c%20d',Ft.__workingURL='http://a/c%20d'===ao.href}catch(ao){}}if(Ft.__workingURL)return new URL(ro,so).href;let no=Ft.__tempDoc;return no||(no=document.implementation.createHTMLDocument('temp'),Ft.__tempDoc=no,no.__base=no.createElement('base'),no.head.appendChild(no.__base),no.__anchor=no.createElement('a')),no.__base.href=so,no.__anchor.href=ro,no.__anchor.href||ro}},Ut={async:!0,load(ro,so,no){if(!ro)no('error: href must be specified');else if(ro.match(/^data:/)){const ao=ro.split(','),lo=ao[0];let io=ao[1];io=-1{let lo=ao.getResponseHeader('Location');if(lo&&0===lo.indexOf('/')){const po=location.origin||location.protocol+'//'+location.host;lo=po+lo}const io=ao.response||ao.responseText;304===ao.status||0===ao.status||200<=ao.status&&300>ao.status?so(io,lo):no(io)},ao.send()}}},Wt=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),qt='link[rel=import]',Bt='import-disable',jt=`link[rel=stylesheet][href][type=${Bt}]`,Gt=`${qt}, ${jt}, +(function(){'use strict';function _(Mt){return Mt=$(Mt),te(ee(Mt),Mt)}function $(Mt){return Mt.replace(Re.comments,'').replace(Re.port,'')}function ee(Mt){let Ot={start:0,end:Mt.length},wt=Ot;for(let Dt=0,Lt=Mt.length;Dt{'complete'===document.readyState&&ve()}))}function ve(){requestAnimationFrame(()=>{(Pt||At._elementsHaveApplied)&&At.updateStyles(),Pt=!1})}(Mt=>{const Ot=!!('import'in document.createElement('link'));let wt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return wt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Dt=/(^\/)|(^#)|(^[\w-\d]*:)/,Lt=/(url\()([^)]*)(\))/g,kt=/(@import[\s]+(?!url\())([^;]*)(;)/g,Ht=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,Ft={fixUrls(ro,no){ro.href&&ro.setAttribute('href',Ft.replaceAttrUrl(ro.getAttribute('href'),no)),ro.src&&ro.setAttribute('src',Ft.replaceAttrUrl(ro.getAttribute('src'),no)),'style'===ro.localName&&Ft.resolveUrlsInStyle(ro,no)},fixUrlAttributes(ro,no){const so=['action','src','href','url','style'];for(let lo,ao=0;aopo.search(/({{|\[\[)/)&&(io.value='style'===lo?Ft.resolveUrlsInCssText(po,no):Ft.replaceAttrUrl(po,no))}},fixUrlsInTemplates(ro,no){const so=ro.querySelectorAll('template');for(let ao=0;ao{let co=io.replace(/["']/g,'');return no&&(co=Ft.resolveUrl(co,no)),lo+'\''+co+'\''+po})},replaceAttrUrl(ro,no){return ro&&Dt.test(ro)?ro:Ft.resolveUrl(ro,no)},resolveUrl(ro,no){if(void 0===Ft.__workingURL){Ft.__workingURL=!1;try{const ao=new URL('b','http://a');ao.pathname='c%20d',Ft.__workingURL='http://a/c%20d'===ao.href}catch(ao){}}if(Ft.__workingURL)return new URL(ro,no).href;let so=Ft.__tempDoc;return so||(so=document.implementation.createHTMLDocument('temp'),Ft.__tempDoc=so,so.__base=so.createElement('base'),so.head.appendChild(so.__base),so.__anchor=so.createElement('a')),so.__base.href=no,so.__anchor.href=ro,so.__anchor.href||ro}},Ut={async:!0,load(ro,no,so){if(!ro)so('error: href must be specified');else if(ro.match(/^data:/)){const ao=ro.split(','),lo=ao[0];let io=ao[1];io=-1{let lo=ao.getResponseHeader('Location');if(lo&&0===lo.indexOf('/')){const po=location.origin||location.protocol+'//'+location.host;lo=po+lo}const io=ao.response||ao.responseText;304===ao.status||0===ao.status||200<=ao.status&&300>ao.status?no(io,lo):so(io)},ao.send()}}},Wt=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),qt='link[rel=import]',Bt='import-disable',jt=`link[rel=stylesheet][href][type=${Bt}]`,Gt=`${qt}, ${jt}, style:not([type]), link[rel=stylesheet][href]:not([type]), script:not([type]), script[type="application/javascript"], script[type="text/javascript"]`,Xt='import-dependency',Vt=`${qt}:not(${Xt})`,Kt=`script[${Xt}]`,Yt=`style[${Xt}], - link[rel=stylesheet][${Xt}]`;const $t=ro=>{return ro.nodeType===Node.ELEMENT_NODE&&'link'===ro.localName&&'import'===ro.rel},Zt=(ro,so)=>{if(ro.__loaded)so&&so();else if('script'===ro.localName&&!ro.src)ro.__loaded=!0,so&&so();else{const no=ao=>{ro.removeEventListener(ao.type,no),ro.__loaded=!0,so&&so()};ro.addEventListener('load',no),Wt&&'style'===ro.localName||ro.addEventListener('error',no)}},Qt=ro=>{Jt(()=>eo(()=>ro&&ro()))},Jt=ro=>{if('loading'!==document.readyState)ro();else{const so=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',so),ro())};document.addEventListener('readystatechange',so)}},eo=ro=>{let so=document.querySelectorAll(Vt),no=so.length;if(!no)return void ro();for(let io,ao=0,lo=so.length;ao{0==--no&&ro()})},to=ro=>{if(Ot)return ro.ownerDocument;let so=ro.__ownerImport;if(!so){for(so=ro;(so=so.parentNode||so.host)&&!$t(so););ro.__ownerImport=so}return so},oo=(ro,so)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(ro,so);const no=document.createEvent('CustomEvent');return no.initCustomEvent(ro,!!so.bubbles,!!so.cancelable,so.detail),no};if(Ot){const ro=document.querySelectorAll(qt);for(let lo,no=0,ao=ro.length;no{const ao=no.target;$t(ao)&&(ao.__loaded=!0)};document.addEventListener('load',so,!0),document.addEventListener('error',so,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(ro=>this.handleMutations(ro)),Jt(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(ro){const so=ro.querySelectorAll(qt);for(let no=0,ao=so.length;no{const lo=this.makeDocument(no,ao||so);this.documents[so]=lo,this.inflight--,this.loadImports(lo)},()=>{this.documents[so]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(ro,so){if(!ro)return document.createDocumentFragment();Wt&&(ro=ro.replace(Ht,(ho,_o,uo)=>{return-1===ho.indexOf('type=')?`${_o} type=${Bt} ${uo}`:ho}));let no;const ao=document.createElement('template');if(ao.innerHTML=ro,ao.content)no=ao.content;else for(no=document.createDocumentFragment();ao.firstChild;)no.appendChild(ao.firstChild);const lo=no.querySelector('base');lo&&(so=Ft.replaceAttrUrl(lo.getAttribute('href'),so),lo.removeAttribute('href'));const io=no.querySelectorAll('dom-module');for(let _o,ho=0;ho{so&&ro&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{so=!0,no()}),this.runScripts(()=>{ro=!0,no()})}}flatten(ro){const so=ro.querySelectorAll(qt);for(let lo,no=0,ao=so.length;no{if(lo{Dt=null,ao(lo+1)})}else ro()};ao(0)}waitForStyles(ro){const so=document.querySelectorAll(Yt);let no=so.length;if(!no)return void ro();const ao=Wt&&!!document.querySelector(jt);for(let po,lo=0,io=so.length;lo{po.removeAttribute(Xt),0==--no&&ro()}),ao&&po.parentNode!==document.head){let co=to(po);for(;co&&to(co);)co=to(co);const ho=po.parentNode,_o=po.nextSibling,uo=document.createElement(po.localName);uo.__appliedElement=po,uo.setAttribute('type','import-placeholder'),co.parentNode===document.head?document.head.insertBefore(po,co):document.head.appendChild(po),ho.insertBefore(uo,_o),po.removeAttribute('type')}}fireEvents(){const ro=document.querySelectorAll(qt);for(let no,so=ro.length-1;0<=so&&(no=ro[so]);so--)this.fireEventIfNeeded(no)}fireEventIfNeeded(ro){if(!ro.__loaded){ro.__loaded=!0,ro.import&&(ro.import.readyState='complete');const so=ro.import?'load':'error';ro.dispatchEvent(oo(so,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(ro){for(let so=0;sodocument.dispatchEvent(oo('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Mt.useNative=Ot,Mt.whenReady=Qt,Mt.importForElement=to})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';function Mt(Ls,ks,Hs){return{index:Ls,removed:ks,addedCount:Hs}}function Ot(Ls){return'ShadyRoot'===Ls.__localName}function Lt(Ls,ks,Hs){(ks=Object.getOwnPropertyDescriptor(ks,Ls))&&Object.defineProperty(Hs,Ls,ks)}function kt(Ls,ks){if(Ls&&ks)for(var Us,Hs=Object.getOwnPropertyNames(ks),Fs=0;Fs100;if(Ar.length&&!Ls&&Bt(),Rr=0,Ls)throw Error('Loop detected in ShadyDOM distribution, aborting.')}function jt(Ls,ks){return Ls.__shady&&Ls.__shady[ks]}function Xt(Ls){return'&'===Ls?'&':'<'===Ls?'<':'>'===Ls?'>':'"'===Ls?'"':'\xA0'===Ls?' ':void 0}function Vt(Ls){return Ls.replace(Or,Xt)}function Kt(Ls){return Ls.replace(Dr,Xt)}function Yt(Ls){for(var ks={},Hs=0;Hs';case Node.TEXT_NODE:return Ls=Ls.data,ks&&Lr[ks.localName]?Ls:Kt(Ls);case Node.COMMENT_NODE:return'';default:throw window.console.error(Ls),Error('not implemented');}}function $t(Ls,ks){'template'===Ls.localName&&(Ls=Ls.content);for(var qs,Hs='',Fs=ks?ks(Ls):Ls.childNodes,Us=0,Ws=Fs.length;Us]/g,wr=Yt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Lr=Yt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Mr.getOuterHTML=zt,Mr.getInnerHTML=$t;var kr={},Hr=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Fr=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);kr.parentNode=function(Ls){return Hr.currentNode=Ls,Hr.parentNode()},kr.firstChild=function(Ls){return Hr.currentNode=Ls,Hr.firstChild()},kr.lastChild=function(Ls){return Hr.currentNode=Ls,Hr.lastChild()},kr.previousSibling=function(Ls){return Hr.currentNode=Ls,Hr.previousSibling()},kr.nextSibling=function(Ls){return Hr.currentNode=Ls,Hr.nextSibling()},kr.childNodes=oo,kr.parentElement=function(Ls){return Fr.currentNode=Ls,Fr.parentNode()},kr.firstElementChild=function(Ls){return Fr.currentNode=Ls,Fr.firstChild()},kr.lastElementChild=function(Ls){return Fr.currentNode=Ls,Fr.lastChild()},kr.previousElementSibling=function(Ls){return Fr.currentNode=Ls,Fr.previousSibling()},kr.nextElementSibling=function(Ls){return Fr.currentNode=Ls,Fr.nextSibling()},kr.children=function(Ls){var ks=[];for(Fr.currentNode=Ls,Ls=Fr.firstChild();Ls;)ks.push(Ls),Ls=Fr.nextSibling();return ks},kr.innerHTML=function(Ls){return Mr.getInnerHTML(Ls,function(ks){return oo(ks)})},kr.textContent=function(Ls){if(Ls.nodeType!==Node.ELEMENT_NODE)return Ls.nodeValue;Ls=document.createTreeWalker(Ls,NodeFilter.SHOW_TEXT,null,!1);for(var Hs,ks='';Hs=Ls.nextNode();)ks+=Hs.nodeValue;return ks};var Ur={},Wr=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),qr=document.implementation.createHTMLDocument('inert'),Br=qr.createElement('div'),jr=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),Gr={parentElement:ho('parentElement'),parentNode:ho('parentNode'),nextSibling:ho('nextSibling'),previousSibling:ho('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(Ls){this.setAttribute('class',Ls)},configurable:!0},nextElementSibling:{get:function(){if(Ir.hasProperty(this,'nextSibling')){for(var Ls=this.nextSibling;Ls&&Ls.nodeType!==Node.ELEMENT_NODE;)Ls=Ls.nextSibling;return Ls}return kr.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(Ir.hasProperty(this,'previousSibling')){for(var Ls=this.previousSibling;Ls&&Ls.nodeType!==Node.ELEMENT_NODE;)Ls=Ls.previousSibling;return Ls}return kr.previousElementSibling(this)},configurable:!0}},Xr={childNodes:{get:function(){if(Ir.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var Ls=this.firstChild;Ls;Ls=Ls.nextSibling)this.__shady.childNodes.push(Ls)}return this.__shady.childNodes}return kr.childNodes(this)},configurable:!0},firstChild:ho('firstChild'),lastChild:ho('lastChild'),textContent:{get:function(){if(Ir.hasProperty(this,'firstChild')){for(var Fs,Ls=[],ks=0,Hs=this.childNodes;Fs=Hs[ks];ks++)Fs.nodeType!==Node.COMMENT_NODE&&Ls.push(Fs.textContent);return Ls.join('')}return kr.textContent(this)},set:function(Ls){this.nodeType===Node.ELEMENT_NODE?(_o(this),Ls&&this.appendChild(document.createTextNode(Ls))):this.nodeValue=Ls},configurable:!0},firstElementChild:{get:function(){if(Ir.hasProperty(this,'firstChild')){for(var Ls=this.firstChild;Ls&&Ls.nodeType!==Node.ELEMENT_NODE;)Ls=Ls.nextSibling;return Ls}return kr.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(Ir.hasProperty(this,'lastChild')){for(var Ls=this.lastChild;Ls&&Ls.nodeType!==Node.ELEMENT_NODE;)Ls=Ls.previousSibling;return Ls}return kr.lastElementChild(this)},configurable:!0},children:{get:function(){return Ir.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Ls){return Ls.nodeType===Node.ELEMENT_NODE}):kr.children(this)},configurable:!0},innerHTML:{get:function(){var Ls='template'===this.localName?this.content:this;return Ir.hasProperty(this,'firstChild')?Mr.getInnerHTML(Ls):kr.innerHTML(Ls)},set:function(Ls){var ks='template'===this.localName?this.content:this;for(_o(ks),Wr&&Wr.set?Wr.set.call(Br,Ls):Br.innerHTML=Ls;Br.firstChild;)ks.appendChild(Br.firstChild)},configurable:!0}},Vr={shadowRoot:{get:function(){return this.shadyRoot},set:function(Ls){this.shadyRoot=Ls},configurable:!0}},Kr={activeElement:{get:function(){return mo(this)},set:function(){},configurable:!0}},Yr=yr.settings.hasDescriptors?function(){}:function(Ls){Ls.__shady&&Ls.__shady.__outsideAccessors||(Ls.__shady=Ls.__shady||{},Ls.__shady.__outsideAccessors=!0,yo(Ls,Gr,!0))},zr=yr.settings.hasDescriptors?function(){}:function(Ls){Ls.__shady&&Ls.__shady.__insideAccessors||(Ls.__shady=Ls.__shady||{},Ls.__shady.__insideAccessors=!0,yo(Ls,Xr,!0),yo(Ls,Vr,!0))};Ur.ShadowRootAccessor=Vr,Ur.ActiveElementAccessor=Kr,Ur.patchAccessors=function(Ls){yo(Ls,Gr),yo(Ls,Xr),yo(Ls,Kr)},Ur.patchShadowRootAccessors=function(Ls){yo(Ls,Xr,!0),yo(Ls,Kr,!0)},Ur.patchOutsideElementAccessors=Yr,Ur.patchInsideElementAccessors=zr;var $r={};$r.recordInsertBefore=function(Ls,ks,Hs){if(Ur.patchInsideElementAccessors(ks),ks.__shady=ks.__shady||{},Ir.hasProperty(ks,'firstChild')&&(ks.__shady.childNodes=null),Ls.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var Fs=Ls.childNodes,Us=0;Us+~])'};const He='style-scope';class Fe{get SCOPE_NAME(){return He}dom(Mt,Ot,Dt){Mt.__styleScoped?Mt.__styleScoped=null:this._transformDom(Mt,Ot||'',Dt)}_transformDom(Mt,Ot,Dt){Mt.nodeType===Node.ELEMENT_NODE&&this.element(Mt,Ot,Dt);let wt='template'===Mt.localName?(Mt.content||Mt._content).childNodes:Mt.children||Mt.childNodes;if(wt)for(let Lt=0;Lt`:${kt}(${Ht.replace(/\s/g,'')})`),Mt=Mt.replace(Ke,`${Ge} $1`),Mt=Mt.replace(Be,(Lt,kt,Ht)=>{if(!wt){let Ft=this._transformCompoundSelector(Ht,kt,Ot,Dt);wt=wt||Ft.stop,kt=Ft.combinator,Ht=Ft.value}return kt+Ht}),Mt}_transformCompoundSelector(Mt,Ot,Dt,wt){let Lt=Mt.indexOf(Ve);0<=Mt.indexOf(Ge)?Mt=this._transformHostSelector(Mt,wt):0!==Lt&&(Mt=Dt?this._transformSimpleSelector(Mt,Dt):Mt);let kt=!1;0<=Lt&&(Ot='',kt=!0);let Ht;return kt&&(Ht=!0,kt&&(Mt=Mt.replace(ze,(Ft,Ut)=>` > ${Ut}`))),Mt=Mt.replace($e,(Ft,Ut,Wt)=>`[dir="${Wt}"] ${Ut}, ${Ut}[dir="${Wt}"]`),{value:Mt,combinator:Ot,stop:Ht}}_transformSimpleSelector(Mt,Ot){let Dt=Mt.split(Qe);return Dt[0]+=Ot,Dt.join(Qe)}_transformHostSelector(Mt,Ot){let Dt=Mt.match(Ye),wt=Dt&&Dt[2].trim()||'';if(wt){if(!wt[0].match(je)){let Lt=wt.split(je)[0];return Lt===Ot?wt:'should_not_match'}return Mt.replace(Ye,function(Lt,kt,Ht){return Ot+Ht})}return Mt.replace(Ge,Ot)}documentRule(Mt){Mt.selector=Mt.parsedSelector,this.normalizeRootSelector(Mt),this._transformRule(Mt,this._transformDocumentSelector)}normalizeRootSelector(Mt){Mt.selector===':root'&&(Mt.selector='html')}_transformDocumentSelector(Mt){return Mt.match(Ve)?this._transformComplexSelector(Mt,We):this._transformSimpleSelector(Mt.trim(),We)}}let Ue=/:(nth[-\w]+)\(([^)]+)\)/,We=`:not(.${He})`,qe=',',Be=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,je=/[[.:#*]/,Ge=':host',Ve='::slotted',Ke=/^(::slotted)/,Ye=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ze=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,$e=/(.*):dir\((?:(ltr|rtl))\)/,Qe=':';var tt=new Fe,ot={};const rt=Promise.resolve();class st{static get(Mt){return Mt.__styleInfo}static set(Mt,Ot){return Mt.__styleInfo=Ot,Ot}static invalidate(Mt){ot[Mt]&&(ot[Mt]._applyShimInvalid=!0)}static startValidating(Mt){const Ot=ot[Mt];Ot._validating||(Ot._validating=!0,rt.then(()=>{Ot._applyShimInvalid=!1,Ot._validating=!1}))}constructor(Mt,Ot,Dt,wt,Lt,kt){this.styleRules=Mt||null,this.placeholder=Ot||null,this.ownStylePropertyNames=Dt||[],this.overrideStyleProperties=null,this.elementName=wt||'',this.cssBuild=kt||'',this.typeExtension=Lt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const nt=window.Element.prototype,lt=nt.matches||nt.matchesSelector||nt.mozMatchesSelector||nt.msMatchesSelector||nt.oMatchesSelector||nt.webkitMatchesSelector,it=navigator.userAgent.match('Trident'),dt='x-scope';class pt{get XSCOPE_NAME(){return dt}decorateStyles(Mt){let Ot=this,Dt={},wt=[],Lt=0;ue(Mt,function(Ht){Ot.decorateRule(Ht),Ht.index=Lt++,Ot.collectPropertiesInCssText(Ht.propertyInfo.cssText,Dt)},function(Ft){wt.push(Ft)}),Mt._keyframes=wt;let kt=[];for(let Ht in Dt)kt.push(Ht);return kt}decorateRule(Mt){if(Mt.propertyInfo)return Mt.propertyInfo;let Ot={},Dt={},wt=this.collectProperties(Mt,Dt);return wt&&(Ot.properties=Dt,Mt.rules=null),Ot.cssText=this.collectCssText(Mt),Mt.propertyInfo=Ot,Ot}collectProperties(Mt,Ot){let Dt=Mt.propertyInfo;if(!Dt){let wt,Lt=ke.VAR_ASSIGN,kt=Mt.parsedCssText,Ht,Ft;for(;wt=Lt.exec(kt);)Ht=(wt[2]||wt[3]).trim(),('inherit'!==Ht||'unset'!==Ht)&&(Ot[wt[1].trim()]=Ht),Ft=!0;return Ft}else if(Dt.properties)return Object.assign(Ot,Dt.properties),!0}collectCssText(Mt){return this.collectConsumingCssText(Mt.parsedCssText)}collectConsumingCssText(Mt){return Mt.replace(ke.BRACKETED,'').replace(ke.VAR_ASSIGN,'')}collectPropertiesInCssText(Mt,Ot){for(let Dt,wt;Dt=ke.VAR_CONSUMED.exec(Mt);)wt=Dt[1],':'!==Dt[2]&&(Ot[wt]=!0)}reify(Mt){let Ot=Object.getOwnPropertyNames(Mt);for(let wt,Dt=0;Dt *'===kt||'html'===kt,Ft=0===kt.indexOf(':host')&&!Ht;if('shady'===Dt&&(Ht=kt===Lt+' > *.'+Lt||-1!==kt.indexOf('html'),Ft=!Ht&&0===kt.indexOf(Lt)),'shadow'===Dt&&(Ht=':host > *'===kt||'html'===kt,Ft=Ft&&!Ht),Ht||Ft){let Ut=Lt;Ft&&(Oe&&!Ot.transformedSelector&&(Ot.transformedSelector=tt._transformRuleCss(Ot,tt._transformComplexSelector,tt._calcElementScope(Mt.is),Lt)),Ut=Ot.transformedSelector||Lt),wt({selector:Ut,isHost:Ft,isRoot:Ht})}}}hostAndRootPropertiesForScope(Mt,Ot){let Dt={},wt={},Lt=this,kt=Ot&&Ot.__cssBuild;return ue(Ot,function(Ht){Lt.whenHostOrRootRule(Mt,Ht,kt,function(Ft){let Ut=Mt._element||Mt;lt.call(Ut,Ft.selector)&&(Ft.isHost?Lt.collectProperties(Ht,Dt):Lt.collectProperties(Ht,wt))})},null,!0),{rootProps:wt,hostProps:Dt}}transformStyles(Mt,Ot,Dt){let wt=this,Lt=tt._calcHostScope(Mt.is,Mt.extends),kt=Mt.extends?'\\'+Lt.slice(0,-1)+'\\]':Lt,Ht=new RegExp(ke.HOST_PREFIX+kt+ke.HOST_SUFFIX),Ft=st.get(Mt).styleRules,Ut=this._elementKeyframeTransforms(Mt,Ft,Dt);return tt.elementStyles(Mt,Ft,function(Wt){wt.applyProperties(Wt,Ot),Oe||_e(Wt)||!Wt.cssText||(wt.applyKeyframeTransforms(Wt,Ut),wt._scopeSelector(Wt,Ht,Lt,Dt))})}_elementKeyframeTransforms(Mt,Ot,Dt){let wt=Ot._keyframes,Lt={};if(!Oe&&wt)for(let kt=0,Ht=wt[kt];kt=Ht._useCount&&Ht.parentNode&&Ht.parentNode.removeChild(Ht)),Oe?kt.customStyle?(kt.customStyle.textContent=Lt,wt=kt.customStyle):Lt&&(wt=me(Lt,Dt,Mt.shadowRoot,kt.placeholder)):wt?!wt.parentNode&&ye(wt,null,kt.placeholder):Lt&&(wt=me(Lt,Dt,null,kt.placeholder)),wt&&(wt._useCount=wt._useCount||0,kt.customStyle!=wt&&wt._useCount++,kt.customStyle=wt),it&&(wt.textContent=wt.textContent),wt}applyCustomStyle(Mt,Ot){let Dt=he(Mt),wt=this;Mt.textContent=pe(Dt,function(Lt){let kt=Lt.cssText=Lt.parsedCssText;Lt.propertyInfo&&Lt.propertyInfo.cssText&&(kt=ae(kt),Lt.cssText=wt.valueForProperties(kt,Ot))})}}var ct=new pt;let ht={};const _t=window.customElements;if(_t&&!Oe){const Mt=_t.define;_t.define=function(Ot,Dt,wt){return ht[Ot]=fe(Ot),Mt.call(_t,Ot,Dt,wt)}}let mt=ke.MIXIN_MATCH,yt=ke.VAR_ASSIGN,gt=/;\s*/m,ft=/^\s*(initial)|(inherit)\s*$/,bt='_-_';class Nt{constructor(){this._map={}}set(Mt,Ot){Mt=Mt.trim(),this._map[Mt]={properties:Ot,dependants:{}}}get(Mt){return Mt=Mt.trim(),this._map[Mt]}}class St{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new Nt,this._separator=bt,this._boundProduceCssProperties=(Mt,Ot,Dt,wt)=>this._produceCssProperties(Mt,Ot,Dt,wt)}detectMixin(Mt){const Ot=mt.test(Mt)||yt.test(Mt);return mt.lastIndex=0,yt.lastIndex=0,Ot}transformStyle(Mt,Ot){let Dt=he(Mt);return this.transformRules(Dt,Ot),Dt}transformRules(Mt,Ot){this._currentTemplate=ot[Ot],ue(Mt,Dt=>{this.transformRule(Dt)}),this._currentTemplate=null}transformRule(Mt){Mt.cssText=this.transformCssText(Mt.parsedCssText),':root'===Mt.selector&&(Mt.selector=':host > *')}transformCssText(Mt){return Mt=Mt.replace(yt,this._boundProduceCssProperties),this._consumeCssProperties(Mt)}_getInitialValueForProperty(Mt){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(Mt)}_consumeCssProperties(Mt){for(let Ot;Ot=mt.exec(Mt);){let Dt=Ot[0],wt=Ot[1],Lt=Ot.index,kt=Lt+Dt.indexOf('@apply'),Ht=Lt+Dt.length,Ft=Mt.slice(0,kt),Ut=Mt.slice(Ht),Wt=this._cssTextToMap(Ft),qt=this._atApplyToCssProperties(wt,Wt);Mt=[Ft,qt,Ut].join(''),mt.lastIndex=Lt+qt.length}return Mt}_atApplyToCssProperties(Mt,Ot){Mt=Mt.replace(gt,'');let Dt=[],wt=this._map.get(Mt);if(wt||(this._map.set(Mt,{}),wt=this._map.get(Mt)),wt){this._currentTemplate&&(wt.dependants[this._currentTemplate.name]=this._currentTemplate);let Lt,kt,Ht;for(Lt in wt.properties)Ht=Ot&&Ot[Lt],kt=[Lt,': var(',Mt,bt,Lt],Ht&&kt.push(',',Ht),kt.push(')'),Dt.push(kt.join(''))}return Dt.join('; ')}_replaceInitialOrInherit(Mt,Ot){let Dt=ft.exec(Ot);return Dt&&(Dt[1]?Ot=St._getInitialValueForProperty(Mt):Ot='apply-shim-inherit'),Ot}_cssTextToMap(Mt){let Ot=Mt.split(';'),Dt,wt,Lt={};for(let Ht,Ft,kt=0;kt{Vt&&this._map.get(Vt)&&(wt='@apply '+Vt+';')}),!wt)return Mt;let Lt=this._consumeCssProperties(wt),kt=Mt.slice(0,Mt.indexOf('--')),Ht=this._cssTextToMap(Lt),Ft=Ht,Ut=this._map.get(Ot),Wt=Ut&&Ut.properties;Wt?Ft=Object.assign(Object.create(Wt),Ht):this._map.set(Ot,Ft);let Bt,jt,qt=[],Gt=!1;for(Bt in Ft)jt=Ht[Bt],void 0==jt&&(jt='initial'),Wt&&!(Bt in Wt)&&(Gt=!0),qt.push(Ot+bt+Bt+': '+jt);return Gt&&this._invalidateMixinEntry(Ut),Ut&&(Ut.properties=Ft),Dt&&(kt=Mt+';'+kt),kt+qt.join('; ')+';'}}let Ct=new St;window.ApplyShim=Ct;let Et=function(){};if(!Oe){let Mt=kt=>{return kt.classList&&!kt.classList.contains(tt.SCOPE_NAME)||kt instanceof SVGElement&&(!kt.hasAttribute('class')||0>kt.getAttribute('class').indexOf(tt.SCOPE_NAME))},Ot=kt=>{for(let Ft,Ht=0;Ht{Dt.observe(kt,{childList:!0,subtree:!0})},Lt=window.customElements&&!window.customElements.flush;if(Lt)wt(document);else{let kt=()=>{wt(document.body)};window.HTMLImports?window.HTMLImports.whenReady(kt):requestAnimationFrame(function(){if('loading'===document.readyState){let Ht=function(){kt(),document.removeEventListener('readystatechange',Ht)};document.addEventListener('readystatechange',Ht)}else kt()})}Et=function(){Ot(Dt.takeRecords())}}let vt=new class{constructor(Mt=100){this.cache={},this.typeMax=Mt}_validate(Mt,Ot,Dt){for(let Lt,wt=0;wtthis.typeMax&&Lt.shift(),this.cache[Mt]=Lt}fetch(Mt,Ot,Dt){let wt=this.cache[Mt];if(wt)for(let kt,Lt=wt.length-1;0<=Lt;Lt--)if(kt=wt[Lt],this._validate(kt,Ot,Dt))return kt}};class Tt{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=st.set(document.documentElement,new st({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return Oe}get nativeCss(){return De}get nativeCssApply(){return!1}flush(){Et()}_generateScopeSelector(Mt){let Ot=this._scopeCounter[Mt]=(this._scopeCounter[Mt]||0)+1;return`${Mt}-${Ot}`}getStyleAst(Mt){return he(Mt)}styleAstToString(Mt){return pe(Mt)}_gatherStyles(Mt){let Ot=Mt.content.querySelectorAll('style'),Dt=[];for(let Lt,wt=0;wt{Oe?tt.normalizeRootSelector(Dt):tt.documentRule(Dt),this.nativeCss&&!this.nativeCssApply&&Ct.transformRule(Dt)}),this.nativeCss?Mt.textContent=pe(Ot):this._documentOwnerStyleInfo.styleRules.rules.push(Ot)}_revalidateApplyShim(Mt){if(this.nativeCss&&!this.nativeCssApply){let Ot=he(Mt);Ct.transformRules(Ot),Mt.textContent=pe(Ot)}}_applyCustomStyleToDocument(Mt){this.nativeCss||ct.applyCustomStyle(Mt,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(Mt,Ot){let Dt;if(!this.nativeCss){let wt=st.get(Mt)||st.get(this._styleOwnerForNode(Mt));Dt=wt.styleProperties[Ot]}return Dt=Dt||window.getComputedStyle(Mt).getPropertyValue(Ot),Dt.trim()}setElementClass(Mt,Ot){let Dt=Mt.getRootNode(),wt=Ot?Ot.split(/\s/):[],Lt=Dt.host&&Dt.host.localName;if(!Lt){var kt=Mt.getAttribute('class');if(kt){let Ht=kt.split(/\s/);for(let Ft=0;Ft{return ro.nodeType===Node.ELEMENT_NODE&&'link'===ro.localName&&'import'===ro.rel},Zt=(ro,no)=>{if(ro.__loaded)no&&no();else if('script'===ro.localName&&!ro.src)ro.__loaded=!0,no&&no();else{const so=ao=>{ro.removeEventListener(ao.type,so),ro.__loaded=!0,no&&no()};ro.addEventListener('load',so),Wt&&'style'===ro.localName||ro.addEventListener('error',so)}},Qt=ro=>{Jt(()=>eo(()=>ro&&ro()))},Jt=ro=>{if('loading'!==document.readyState)ro();else{const no=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',no),ro())};document.addEventListener('readystatechange',no)}},eo=ro=>{let no=document.querySelectorAll(Vt),so=no.length;if(!so)return void ro();for(let io,ao=0,lo=no.length;ao{0==--so&&ro()})},to=ro=>{if(Ot)return ro.ownerDocument;let no=ro.__ownerImport;if(!no){for(no=ro;(no=no.parentNode||no.host)&&!$t(no););ro.__ownerImport=no}return no},oo=(ro,no)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(ro,no);const so=document.createEvent('CustomEvent');return so.initCustomEvent(ro,!!no.bubbles,!!no.cancelable,no.detail),so};if(Ot){const ro=document.querySelectorAll(qt);for(let lo,so=0,ao=ro.length;so{const ao=so.target;$t(ao)&&(ao.__loaded=!0)};document.addEventListener('load',no,!0),document.addEventListener('error',no,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(ro=>this.handleMutations(ro)),Jt(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(ro){const no=ro.querySelectorAll(qt);for(let so=0,ao=no.length;so{const lo=this.makeDocument(so,ao||no);this.documents[no]=lo,this.inflight--,this.loadImports(lo)},()=>{this.documents[no]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(ro,no){if(!ro)return document.createDocumentFragment();Wt&&(ro=ro.replace(Ht,(ho,_o,uo)=>{return-1===ho.indexOf('type=')?`${_o} type=${Bt} ${uo}`:ho}));let so;const ao=document.createElement('template');if(ao.innerHTML=ro,ao.content)so=ao.content;else for(so=document.createDocumentFragment();ao.firstChild;)so.appendChild(ao.firstChild);const lo=so.querySelector('base');lo&&(no=Ft.replaceAttrUrl(lo.getAttribute('href'),no),lo.removeAttribute('href'));const io=so.querySelectorAll('dom-module');for(let _o,ho=0;ho{no&&ro&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{no=!0,so()}),this.runScripts(()=>{ro=!0,so()})}}flatten(ro){const no=ro.querySelectorAll(qt);for(let lo,so=0,ao=no.length;so{if(lo{wt=null,ao(lo+1)})}else ro()};ao(0)}waitForStyles(ro){const no=document.querySelectorAll(Yt);let so=no.length;if(!so)return void ro();const ao=Wt&&!!document.querySelector(jt);for(let po,lo=0,io=no.length;lo{po.removeAttribute(Xt),0==--so&&ro()}),ao&&po.parentNode!==document.head){let co=to(po);for(;co&&to(co);)co=to(co);const ho=po.parentNode,_o=po.nextSibling,uo=document.createElement(po.localName);uo.__appliedElement=po,uo.setAttribute('type','import-placeholder'),co.parentNode===document.head?document.head.insertBefore(po,co):document.head.appendChild(po),ho.insertBefore(uo,_o),po.removeAttribute('type')}}fireEvents(){const ro=document.querySelectorAll(qt);for(let so,no=ro.length-1;0<=no&&(so=ro[no]);no--)this.fireEventIfNeeded(so)}fireEventIfNeeded(ro){if(!ro.__loaded){ro.__loaded=!0,ro.import&&(ro.import.readyState='complete');const no=ro.import?'load':'error';ro.dispatchEvent(oo(no,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(ro){for(let no=0;nodocument.dispatchEvent(oo('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Mt.useNative=Ot,Mt.whenReady=Qt,Mt.importForElement=to})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';function Mt(wn,Dn,Ln){return{index:wn,removed:Dn,addedCount:Ln}}function Ot(wn){return'ShadyRoot'===wn.__localName}function Lt(wn,Dn,Ln){(Dn=Object.getOwnPropertyDescriptor(Dn,wn))&&Object.defineProperty(Ln,wn,Dn)}function kt(wn,Dn){if(wn&&Dn)for(var Hn,Ln=Object.getOwnPropertyNames(Dn),kn=0;kn'===wn?'>':'"'===wn?'"':'\xA0'===wn?' ':void 0}function Vt(wn){return wn.replace(xr,Xt)}function Kt(wn){return wn.replace(Ir,Xt)}function Yt(wn){for(var Dn={},Ln=0;Ln';case Node.TEXT_NODE:return wn=wn.data,Dn&&Or[Dn.localName]?wn:Kt(wn);case Node.COMMENT_NODE:return'';default:throw window.console.error(wn),Error('not implemented');}}function $t(wn,Dn){'template'===wn.localName&&(wn=wn.content);for(var Un,Ln='',kn=Dn?Dn(wn):wn.childNodes,Hn=0,Fn=kn.length;Hn]/g,Mr=Yt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Or=Yt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Rr.getOuterHTML=zt,Rr.getInnerHTML=$t;var wr={},Dr=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Lr=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);wr.parentNode=function(wn){return Dr.currentNode=wn,Dr.parentNode()},wr.firstChild=function(wn){return Dr.currentNode=wn,Dr.firstChild()},wr.lastChild=function(wn){return Dr.currentNode=wn,Dr.lastChild()},wr.previousSibling=function(wn){return Dr.currentNode=wn,Dr.previousSibling()},wr.nextSibling=function(wn){return Dr.currentNode=wn,Dr.nextSibling()},wr.childNodes=oo,wr.parentElement=function(wn){return Lr.currentNode=wn,Lr.parentNode()},wr.firstElementChild=function(wn){return Lr.currentNode=wn,Lr.firstChild()},wr.lastElementChild=function(wn){return Lr.currentNode=wn,Lr.lastChild()},wr.previousElementSibling=function(wn){return Lr.currentNode=wn,Lr.previousSibling()},wr.nextElementSibling=function(wn){return Lr.currentNode=wn,Lr.nextSibling()},wr.children=function(wn){var Dn=[];for(Lr.currentNode=wn,wn=Lr.firstChild();wn;)Dn.push(wn),wn=Lr.nextSibling();return Dn},wr.innerHTML=function(wn){return Rr.getInnerHTML(wn,function(Dn){return oo(Dn)})},wr.textContent=function(wn){if(wn.nodeType!==Node.ELEMENT_NODE)return wn.nodeValue;wn=document.createTreeWalker(wn,NodeFilter.SHOW_TEXT,null,!1);for(var Ln,Dn='';Ln=wn.nextNode();)Dn+=Ln.nodeValue;return Dn};var kr={},Hr=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),Fr=document.implementation.createHTMLDocument('inert'),Ur=Fr.createElement('div'),Wr=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),qr={parentElement:ho('parentElement'),parentNode:ho('parentNode'),nextSibling:ho('nextSibling'),previousSibling:ho('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(wn){this.setAttribute('class',wn)},configurable:!0},nextElementSibling:{get:function(){if(Pr.hasProperty(this,'nextSibling')){for(var wn=this.nextSibling;wn&&wn.nodeType!==Node.ELEMENT_NODE;)wn=wn.nextSibling;return wn}return wr.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(Pr.hasProperty(this,'previousSibling')){for(var wn=this.previousSibling;wn&&wn.nodeType!==Node.ELEMENT_NODE;)wn=wn.previousSibling;return wn}return wr.previousElementSibling(this)},configurable:!0}},Br={childNodes:{get:function(){if(Pr.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var wn=this.firstChild;wn;wn=wn.nextSibling)this.__shady.childNodes.push(wn)}return this.__shady.childNodes}return wr.childNodes(this)},configurable:!0},firstChild:ho('firstChild'),lastChild:ho('lastChild'),textContent:{get:function(){if(Pr.hasProperty(this,'firstChild')){for(var kn,wn=[],Dn=0,Ln=this.childNodes;kn=Ln[Dn];Dn++)kn.nodeType!==Node.COMMENT_NODE&&wn.push(kn.textContent);return wn.join('')}return wr.textContent(this)},set:function(wn){this.nodeType===Node.ELEMENT_NODE?(_o(this),wn&&this.appendChild(document.createTextNode(wn))):this.nodeValue=wn},configurable:!0},firstElementChild:{get:function(){if(Pr.hasProperty(this,'firstChild')){for(var wn=this.firstChild;wn&&wn.nodeType!==Node.ELEMENT_NODE;)wn=wn.nextSibling;return wn}return wr.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(Pr.hasProperty(this,'lastChild')){for(var wn=this.lastChild;wn&&wn.nodeType!==Node.ELEMENT_NODE;)wn=wn.previousSibling;return wn}return wr.lastElementChild(this)},configurable:!0},children:{get:function(){return Pr.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(wn){return wn.nodeType===Node.ELEMENT_NODE}):wr.children(this)},configurable:!0},innerHTML:{get:function(){var wn='template'===this.localName?this.content:this;return Pr.hasProperty(this,'firstChild')?Rr.getInnerHTML(wn):wr.innerHTML(wn)},set:function(wn){var Dn='template'===this.localName?this.content:this;for(_o(Dn),Hr&&Hr.set?Hr.set.call(Ur,wn):Ur.innerHTML=wn;Ur.firstChild;)Dn.appendChild(Ur.firstChild)},configurable:!0}},jr={shadowRoot:{get:function(){return this.shadyRoot},set:function(wn){this.shadyRoot=wn},configurable:!0}},Gr={activeElement:{get:function(){return mo(this)},set:function(){},configurable:!0}},Xr=yr.settings.hasDescriptors?function(){}:function(wn){wn.__shady&&wn.__shady.__outsideAccessors||(wn.__shady=wn.__shady||{},wn.__shady.__outsideAccessors=!0,yo(wn,qr,!0))},Vr=yr.settings.hasDescriptors?function(){}:function(wn){wn.__shady&&wn.__shady.__insideAccessors||(wn.__shady=wn.__shady||{},wn.__shady.__insideAccessors=!0,yo(wn,Br,!0),yo(wn,jr,!0))};kr.ShadowRootAccessor=jr,kr.ActiveElementAccessor=Gr,kr.patchAccessors=function(wn){yo(wn,qr),yo(wn,Br),yo(wn,Gr)},kr.patchShadowRootAccessors=function(wn){yo(wn,Br,!0),yo(wn,Gr,!0)},kr.patchOutsideElementAccessors=Xr,kr.patchInsideElementAccessors=Vr;var Kr={};Kr.recordInsertBefore=function(wn,Dn,Ln){if(kr.patchInsideElementAccessors(Dn),Dn.__shady=Dn.__shady||{},Pr.hasProperty(Dn,'firstChild')&&(Dn.__shady.childNodes=null),wn.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var kn=wn.childNodes,Hn=0;Hn+~])'};const He='style-scope';class Fe{get SCOPE_NAME(){return He}dom(Mt,Ot,wt){Mt.__styleScoped?Mt.__styleScoped=null:this._transformDom(Mt,Ot||'',wt)}_transformDom(Mt,Ot,wt){Mt.nodeType===Node.ELEMENT_NODE&&this.element(Mt,Ot,wt);let Dt='template'===Mt.localName?(Mt.content||Mt._content).childNodes:Mt.children||Mt.childNodes;if(Dt)for(let Lt=0;Lt`:${kt}(${Ht.replace(/\s/g,'')})`),Mt=Mt.replace(Ke,`${Ge} $1`),Mt=Mt.replace(Be,(Lt,kt,Ht)=>{if(!Dt){let Ft=this._transformCompoundSelector(Ht,kt,Ot,wt);Dt=Dt||Ft.stop,kt=Ft.combinator,Ht=Ft.value}return kt+Ht}),Mt}_transformCompoundSelector(Mt,Ot,wt,Dt){let Lt=Mt.indexOf(Ve);0<=Mt.indexOf(Ge)?Mt=this._transformHostSelector(Mt,Dt):0!==Lt&&(Mt=wt?this._transformSimpleSelector(Mt,wt):Mt);let kt=!1;0<=Lt&&(Ot='',kt=!0);let Ht;return kt&&(Ht=!0,kt&&(Mt=Mt.replace(ze,(Ft,Ut)=>` > ${Ut}`))),Mt=Mt.replace($e,(Ft,Ut,Wt)=>`[dir="${Wt}"] ${Ut}, ${Ut}[dir="${Wt}"]`),{value:Mt,combinator:Ot,stop:Ht}}_transformSimpleSelector(Mt,Ot){let wt=Mt.split(Qe);return wt[0]+=Ot,wt.join(Qe)}_transformHostSelector(Mt,Ot){let wt=Mt.match(Ye),Dt=wt&&wt[2].trim()||'';if(Dt){if(!Dt[0].match(je)){let Lt=Dt.split(je)[0];return Lt===Ot?Dt:'should_not_match'}return Mt.replace(Ye,function(Lt,kt,Ht){return Ot+Ht})}return Mt.replace(Ge,Ot)}documentRule(Mt){Mt.selector=Mt.parsedSelector,this.normalizeRootSelector(Mt),this._transformRule(Mt,this._transformDocumentSelector)}normalizeRootSelector(Mt){Mt.selector===':root'&&(Mt.selector='html')}_transformDocumentSelector(Mt){return Mt.match(Ve)?this._transformComplexSelector(Mt,We):this._transformSimpleSelector(Mt.trim(),We)}}let Ue=/:(nth[-\w]+)\(([^)]+)\)/,We=`:not(.${He})`,qe=',',Be=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,je=/[[.:#*]/,Ge=':host',Ve='::slotted',Ke=/^(::slotted)/,Ye=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ze=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,$e=/(.*):dir\((?:(ltr|rtl))\)/,Qe=':';var tt=new Fe,ot={};const rt=Promise.resolve();class nt{static get(Mt){return Mt.__styleInfo}static set(Mt,Ot){return Mt.__styleInfo=Ot,Ot}static invalidate(Mt){ot[Mt]&&(ot[Mt]._applyShimInvalid=!0)}static startValidating(Mt){const Ot=ot[Mt];Ot._validating||(Ot._validating=!0,rt.then(()=>{Ot._applyShimInvalid=!1,Ot._validating=!1}))}constructor(Mt,Ot,wt,Dt,Lt,kt){this.styleRules=Mt||null,this.placeholder=Ot||null,this.ownStylePropertyNames=wt||[],this.overrideStyleProperties=null,this.elementName=Dt||'',this.cssBuild=kt||'',this.typeExtension=Lt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}}const st=window.Element.prototype,lt=st.matches||st.matchesSelector||st.mozMatchesSelector||st.msMatchesSelector||st.oMatchesSelector||st.webkitMatchesSelector,it=navigator.userAgent.match('Trident'),dt='x-scope';class pt{get XSCOPE_NAME(){return dt}decorateStyles(Mt){let Ot=this,wt={},Dt=[],Lt=0;ue(Mt,function(Ht){Ot.decorateRule(Ht),Ht.index=Lt++,Ot.collectPropertiesInCssText(Ht.propertyInfo.cssText,wt)},function(Ft){Dt.push(Ft)}),Mt._keyframes=Dt;let kt=[];for(let Ht in wt)kt.push(Ht);return kt}decorateRule(Mt){if(Mt.propertyInfo)return Mt.propertyInfo;let Ot={},wt={},Dt=this.collectProperties(Mt,wt);return Dt&&(Ot.properties=wt,Mt.rules=null),Ot.cssText=this.collectCssText(Mt),Mt.propertyInfo=Ot,Ot}collectProperties(Mt,Ot){let wt=Mt.propertyInfo;if(!wt){let Dt,Lt=ke.VAR_ASSIGN,kt=Mt.parsedCssText,Ht,Ft;for(;Dt=Lt.exec(kt);)Ht=(Dt[2]||Dt[3]).trim(),('inherit'!==Ht||'unset'!==Ht)&&(Ot[Dt[1].trim()]=Ht),Ft=!0;return Ft}else if(wt.properties)return Object.assign(Ot,wt.properties),!0}collectCssText(Mt){return this.collectConsumingCssText(Mt.parsedCssText)}collectConsumingCssText(Mt){return Mt.replace(ke.BRACKETED,'').replace(ke.VAR_ASSIGN,'')}collectPropertiesInCssText(Mt,Ot){for(let wt,Dt;wt=ke.VAR_CONSUMED.exec(Mt);)Dt=wt[1],':'!==wt[2]&&(Ot[Dt]=!0)}reify(Mt){let Ot=Object.getOwnPropertyNames(Mt);for(let Dt,wt=0;wt *'===kt||'html'===kt,Ft=0===kt.indexOf(':host')&&!Ht;if('shady'===wt&&(Ht=kt===Lt+' > *.'+Lt||-1!==kt.indexOf('html'),Ft=!Ht&&0===kt.indexOf(Lt)),'shadow'===wt&&(Ht=':host > *'===kt||'html'===kt,Ft=Ft&&!Ht),Ht||Ft){let Ut=Lt;Ft&&(Oe&&!Ot.transformedSelector&&(Ot.transformedSelector=tt._transformRuleCss(Ot,tt._transformComplexSelector,tt._calcElementScope(Mt.is),Lt)),Ut=Ot.transformedSelector||Lt),Dt({selector:Ut,isHost:Ft,isRoot:Ht})}}}hostAndRootPropertiesForScope(Mt,Ot){let wt={},Dt={},Lt=this,kt=Ot&&Ot.__cssBuild;return ue(Ot,function(Ht){Lt.whenHostOrRootRule(Mt,Ht,kt,function(Ft){let Ut=Mt._element||Mt;lt.call(Ut,Ft.selector)&&(Ft.isHost?Lt.collectProperties(Ht,wt):Lt.collectProperties(Ht,Dt))})},null,!0),{rootProps:Dt,hostProps:wt}}transformStyles(Mt,Ot,wt){let Dt=this,Lt=tt._calcHostScope(Mt.is,Mt.extends),kt=Mt.extends?'\\'+Lt.slice(0,-1)+'\\]':Lt,Ht=new RegExp(ke.HOST_PREFIX+kt+ke.HOST_SUFFIX),Ft=nt.get(Mt).styleRules,Ut=this._elementKeyframeTransforms(Mt,Ft,wt);return tt.elementStyles(Mt,Ft,function(Wt){Dt.applyProperties(Wt,Ot),Oe||_e(Wt)||!Wt.cssText||(Dt.applyKeyframeTransforms(Wt,Ut),Dt._scopeSelector(Wt,Ht,Lt,wt))})}_elementKeyframeTransforms(Mt,Ot,wt){let Dt=Ot._keyframes,Lt={};if(!Oe&&Dt)for(let kt=0,Ht=Dt[kt];kt=Ht._useCount&&Ht.parentNode&&Ht.parentNode.removeChild(Ht)),Oe?kt.customStyle?(kt.customStyle.textContent=Lt,Dt=kt.customStyle):Lt&&(Dt=me(Lt,wt,Mt.shadowRoot,kt.placeholder)):Dt?!Dt.parentNode&&ye(Dt,null,kt.placeholder):Lt&&(Dt=me(Lt,wt,null,kt.placeholder)),Dt&&(Dt._useCount=Dt._useCount||0,kt.customStyle!=Dt&&Dt._useCount++,kt.customStyle=Dt),it&&(Dt.textContent=Dt.textContent),Dt}applyCustomStyle(Mt,Ot){let wt=he(Mt),Dt=this;Mt.textContent=pe(wt,function(Lt){let kt=Lt.cssText=Lt.parsedCssText;Lt.propertyInfo&&Lt.propertyInfo.cssText&&(kt=ae(kt),Lt.cssText=Dt.valueForProperties(kt,Ot))})}}var ct=new pt;let ht={};const _t=window.customElements;if(_t&&!Oe){const Mt=_t.define;_t.define=function(Ot,wt,Dt){return ht[Ot]=fe(Ot),Mt.call(_t,Ot,wt,Dt)}}let mt=ke.MIXIN_MATCH,yt=ke.VAR_ASSIGN,gt=/;\s*/m,ft=/^\s*(initial)|(inherit)\s*$/,bt='_-_';class Nt{constructor(){this._map={}}set(Mt,Ot){Mt=Mt.trim(),this._map[Mt]={properties:Ot,dependants:{}}}get(Mt){return Mt=Mt.trim(),this._map[Mt]}}class St{constructor(){this._currentTemplate=null,this._measureElement=null,this._map=new Nt,this._separator=bt,this._boundProduceCssProperties=(Mt,Ot,wt,Dt)=>this._produceCssProperties(Mt,Ot,wt,Dt)}detectMixin(Mt){const Ot=mt.test(Mt)||yt.test(Mt);return mt.lastIndex=0,yt.lastIndex=0,Ot}transformStyle(Mt,Ot){let wt=he(Mt);return this.transformRules(wt,Ot),wt}transformRules(Mt,Ot){this._currentTemplate=ot[Ot],ue(Mt,wt=>{this.transformRule(wt)}),this._currentTemplate=null}transformRule(Mt){Mt.cssText=this.transformCssText(Mt.parsedCssText),':root'===Mt.selector&&(Mt.selector=':host > *')}transformCssText(Mt){return Mt=Mt.replace(yt,this._boundProduceCssProperties),this._consumeCssProperties(Mt)}_getInitialValueForProperty(Mt){return this._measureElement||(this._measureElement=document.createElement('meta'),this._measureElement.style.all='initial',document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(Mt)}_consumeCssProperties(Mt){for(let Ot;Ot=mt.exec(Mt);){let wt=Ot[0],Dt=Ot[1],Lt=Ot.index,kt=Lt+wt.indexOf('@apply'),Ht=Lt+wt.length,Ft=Mt.slice(0,kt),Ut=Mt.slice(Ht),Wt=this._cssTextToMap(Ft),qt=this._atApplyToCssProperties(Dt,Wt);Mt=[Ft,qt,Ut].join(''),mt.lastIndex=Lt+qt.length}return Mt}_atApplyToCssProperties(Mt,Ot){Mt=Mt.replace(gt,'');let wt=[],Dt=this._map.get(Mt);if(Dt||(this._map.set(Mt,{}),Dt=this._map.get(Mt)),Dt){this._currentTemplate&&(Dt.dependants[this._currentTemplate.name]=this._currentTemplate);let Lt,kt,Ht;for(Lt in Dt.properties)Ht=Ot&&Ot[Lt],kt=[Lt,': var(',Mt,bt,Lt],Ht&&kt.push(',',Ht),kt.push(')'),wt.push(kt.join(''))}return wt.join('; ')}_replaceInitialOrInherit(Mt,Ot){let wt=ft.exec(Ot);return wt&&(wt[1]?Ot=St._getInitialValueForProperty(Mt):Ot='apply-shim-inherit'),Ot}_cssTextToMap(Mt){let Ot=Mt.split(';'),wt,Dt,Lt={};for(let Ht,Ft,kt=0;kt{Vt&&this._map.get(Vt)&&(Dt='@apply '+Vt+';')}),!Dt)return Mt;let Lt=this._consumeCssProperties(Dt),kt=Mt.slice(0,Mt.indexOf('--')),Ht=this._cssTextToMap(Lt),Ft=Ht,Ut=this._map.get(Ot),Wt=Ut&&Ut.properties;Wt?Ft=Object.assign(Object.create(Wt),Ht):this._map.set(Ot,Ft);let Bt,jt,qt=[],Gt=!1;for(Bt in Ft)jt=Ht[Bt],void 0==jt&&(jt='initial'),Wt&&!(Bt in Wt)&&(Gt=!0),qt.push(Ot+bt+Bt+': '+jt);return Gt&&this._invalidateMixinEntry(Ut),Ut&&(Ut.properties=Ft),wt&&(kt=Mt+';'+kt),kt+qt.join('; ')+';'}}let Ct=new St;window.ApplyShim=Ct;let Et=function(){};if(!Oe){let Mt=kt=>{return kt.classList&&!kt.classList.contains(tt.SCOPE_NAME)||kt instanceof SVGElement&&(!kt.hasAttribute('class')||0>kt.getAttribute('class').indexOf(tt.SCOPE_NAME))},Ot=kt=>{for(let Ft,Ht=0;Ht{wt.observe(kt,{childList:!0,subtree:!0})},Lt=window.customElements&&!window.customElements.flush;if(Lt)Dt(document);else{let kt=()=>{Dt(document.body)};window.HTMLImports?window.HTMLImports.whenReady(kt):requestAnimationFrame(function(){if('loading'===document.readyState){let Ht=function(){kt(),document.removeEventListener('readystatechange',Ht)};document.addEventListener('readystatechange',Ht)}else kt()})}Et=function(){Ot(wt.takeRecords())}}let vt=new class{constructor(Mt=100){this.cache={},this.typeMax=Mt}_validate(Mt,Ot,wt){for(let Lt,Dt=0;Dtthis.typeMax&&Lt.shift(),this.cache[Mt]=Lt}fetch(Mt,Ot,wt){let Dt=this.cache[Mt];if(Dt)for(let kt,Lt=Dt.length-1;0<=Lt;Lt--)if(kt=Dt[Lt],this._validate(kt,Ot,wt))return kt}};class Tt{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement,this._documentOwnerStyleInfo=nt.set(document.documentElement,new nt({rules:[]})),this._elementsHaveApplied=!1}get nativeShadow(){return Oe}get nativeCss(){return we}get nativeCssApply(){return!1}flush(){Et()}_generateScopeSelector(Mt){let Ot=this._scopeCounter[Mt]=(this._scopeCounter[Mt]||0)+1;return`${Mt}-${Ot}`}getStyleAst(Mt){return he(Mt)}styleAstToString(Mt){return pe(Mt)}_gatherStyles(Mt){let Ot=Mt.content.querySelectorAll('style'),wt=[];for(let Lt,Dt=0;Dt{Oe?tt.normalizeRootSelector(wt):tt.documentRule(wt),this.nativeCss&&!this.nativeCssApply&&Ct.transformRule(wt)}),this.nativeCss?Mt.textContent=pe(Ot):this._documentOwnerStyleInfo.styleRules.rules.push(Ot)}_revalidateApplyShim(Mt){if(this.nativeCss&&!this.nativeCssApply){let Ot=he(Mt);Ct.transformRules(Ot),Mt.textContent=pe(Ot)}}_applyCustomStyleToDocument(Mt){this.nativeCss||ct.applyCustomStyle(Mt,this._documentOwnerStyleInfo.styleProperties)}getComputedStyleValue(Mt,Ot){let wt;if(!this.nativeCss){let Dt=nt.get(Mt)||nt.get(this._styleOwnerForNode(Mt));wt=Dt.styleProperties[Ot]}return wt=wt||window.getComputedStyle(Mt).getPropertyValue(Ot),wt.trim()}setElementClass(Mt,Ot){let wt=Mt.getRootNode(),Dt=Ot?Ot.split(/\s/):[],Lt=wt.host&&wt.host.localName;if(!Lt){var kt=Mt.getAttribute('class');if(kt){let Ht=kt.split(/\s/);for(let Ft=0;Ft {\n\n /********************* base setup *********************/\n const useNative = Boolean('import' in document.createElement('link'));\n\n // Polyfill `currentScript` for browsers without it.\n let currentScript = null;\n if ('currentScript' in document === false) {\n Object.defineProperty(document, 'currentScript', {\n get() {\n return currentScript ||\n // NOTE: only works when called in synchronously executing code.\n // readyState should check if `loading` but IE10 is\n // interactive when scripts run so we cheat. This is not needed by\n // html-imports polyfill but helps generally polyfill `currentScript`.\n (document.readyState !== 'complete' ?\n document.scripts[document.scripts.length - 1] : null);\n },\n configurable: true\n });\n }\n\n /********************* path fixup *********************/\n const ABS_URL_TEST = /(^\\/)|(^#)|(^[\\w-\\d]*:)/;\n const CSS_URL_REGEXP = /(url\\()([^)]*)(\\))/g;\n const CSS_IMPORT_REGEXP = /(@import[\\s]+(?!url\\())([^;]*)(;)/g;\n const STYLESHEET_REGEXP = /(]*)(rel=['|\"]?stylesheet['|\"]?[^>]*>)/g;\n\n // path fixup: style elements in imports must be made relative to the main\n // document. We fixup url's in url() and @import.\n const Path = {\n\n fixUrls(element, base) {\n if (element.href) {\n element.setAttribute('href',\n Path.replaceAttrUrl(element.getAttribute('href'), base));\n }\n if (element.src) {\n element.setAttribute('src',\n Path.replaceAttrUrl(element.getAttribute('src'), base));\n }\n if (element.localName === 'style') {\n Path.resolveUrlsInStyle(element, base);\n }\n },\n\n fixUrlAttributes(element, base) {\n const attrs = ['action', 'src', 'href', 'url', 'style'];\n for (let i = 0, a; i < attrs.length && (a = attrs[i]); i++) {\n const at = element.attributes[a];\n const v = at && at.value;\n // Skip bound attribute values (assume binding is done via {} and []).\n // TODO(valdrin) consider exposing a library-implementable hook.\n if (v && (v.search(/({{|\\[\\[)/) < 0)) {\n at.value = (a === 'style') ?\n Path.resolveUrlsInCssText(v, base) :\n Path.replaceAttrUrl(v, base);\n }\n }\n },\n\n fixUrlsInTemplates(element, base) {\n const t$ = element.querySelectorAll('template');\n for (let i = 0; i < t$.length; i++) {\n Path.fixUrlsInTemplate(t$[i], base);\n }\n },\n\n fixUrlsInTemplate(template, base) {\n // If template is not supported, still resolve urls within it.\n const content = template.content || template;\n const n$ = content.querySelectorAll(\n 'style, form[action], [src], [href], [url], [style]');\n for (let i = 0; i < n$.length; i++) {\n const n = n$[i];\n if (n.localName == 'style') {\n Path.resolveUrlsInStyle(n, base);\n } else {\n Path.fixUrlAttributes(n, base);\n }\n }\n Path.fixUrlsInTemplates(content, base);\n },\n\n resolveUrlsInStyle(style, linkUrl) {\n style.textContent = Path.resolveUrlsInCssText(style.textContent, linkUrl);\n },\n\n resolveUrlsInCssText(cssText, linkUrl) {\n let r = Path.replaceUrls(cssText, linkUrl, CSS_URL_REGEXP);\n r = Path.replaceUrls(r, linkUrl, CSS_IMPORT_REGEXP);\n return r;\n },\n\n replaceUrls(text, linkUrl, regexp) {\n return text.replace(regexp, (m, pre, url, post) => {\n let urlPath = url.replace(/[\"']/g, '');\n if (linkUrl) {\n urlPath = Path.resolveUrl(urlPath, linkUrl);\n }\n return pre + '\\'' + urlPath + '\\'' + post;\n });\n },\n\n replaceAttrUrl(text, linkUrl) {\n if (text && ABS_URL_TEST.test(text)) {\n return text;\n } else {\n return Path.resolveUrl(text, linkUrl);\n }\n },\n\n resolveUrl(url, base) {\n // Lazy feature detection.\n if (Path.__workingURL === undefined) {\n Path.__workingURL = false;\n try {\n const u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n Path.__workingURL = (u.href === 'http://a/c%20d');\n } catch (e) {}\n }\n\n if (Path.__workingURL) {\n return (new URL(url, base)).href;\n }\n\n // Fallback to creating an anchor into a disconnected document.\n let doc = Path.__tempDoc;\n if (!doc) {\n doc = document.implementation.createHTMLDocument('temp');\n Path.__tempDoc = doc;\n doc.__base = doc.createElement('base');\n doc.head.appendChild(doc.__base);\n doc.__anchor = doc.createElement('a');\n }\n doc.__base.href = base;\n doc.__anchor.href = url;\n return doc.__anchor.href || url;\n }\n };\n\n /********************* Xhr processor *********************/\n const Xhr = {\n\n async: true,\n\n /**\n * @param {!string} url\n * @param {!function(!string, string=)} success\n * @param {!function(!string)} fail\n */\n load(url, success, fail) {\n if (!url) {\n fail('error: href must be specified');\n } else if (url.match(/^data:/)) {\n // Handle Data URI Scheme\n const pieces = url.split(',');\n const header = pieces[0];\n let resource = pieces[1];\n if (header.indexOf(';base64') > -1) {\n resource = atob(resource);\n } else {\n resource = decodeURIComponent(resource);\n }\n success(resource);\n } else {\n const request = new XMLHttpRequest();\n request.open('GET', url, Xhr.async);\n request.onload = () => {\n // Servers redirecting an import can add a Location header to help us\n // polyfill correctly. Handle relative and full paths.\n let redirectedUrl = request.getResponseHeader('Location');\n if (redirectedUrl && redirectedUrl.indexOf('/') === 0) {\n // In IE location.origin might not work\n // https://connect.microsoft.com/IE/feedback/details/1763802/location-origin-is-undefined-in-ie-11-on-windows-10-but-works-on-windows-7\n const origin = (location.origin || location.protocol + '//' + location.host);\n redirectedUrl = origin + redirectedUrl;\n }\n const resource = /** @type {string} */ (request.response || request.responseText);\n if (request.status === 304 || request.status === 0 ||\n request.status >= 200 && request.status < 300) {\n success(resource, redirectedUrl);\n } else {\n fail(resource);\n }\n };\n request.send();\n }\n }\n };\n\n /********************* importer *********************/\n\n const isIE = /Trident/.test(navigator.userAgent) ||\n /Edge\\/\\d./i.test(navigator.userAgent);\n\n const importSelector = 'link[rel=import]';\n\n // Used to disable loading of resources.\n const importDisableType = 'import-disable';\n\n const disabledLinkSelector = `link[rel=stylesheet][href][type=${importDisableType}]`;\n\n const importDependenciesSelector = `${importSelector}, ${disabledLinkSelector},\n style:not([type]), link[rel=stylesheet][href]:not([type]),\n script:not([type]), script[type=\"application/javascript\"],\n script[type=\"text/javascript\"]`;\n\n const importDependencyAttr = 'import-dependency';\n\n const rootImportSelector = `${importSelector}:not(${importDependencyAttr})`;\n\n const pendingScriptsSelector = `script[${importDependencyAttr}]`;\n\n const pendingStylesSelector = `style[${importDependencyAttr}],\n link[rel=stylesheet][${importDependencyAttr}]`;\n\n /**\n * Importer will:\n * - load any linked import documents (with deduping)\n * - whenever an import is loaded, prompt the parser to try to parse\n * - observe imported documents for new elements (these are handled via the\n * dynamic importer)\n */\n class Importer {\n constructor() {\n this.documents = {};\n // Used to keep track of pending loads, so that flattening and firing of\n // events can be done when all resources are ready.\n this.inflight = 0;\n this.dynamicImportsMO = new MutationObserver(m => this.handleMutations(m));\n // 1. Load imports contents\n // 2. Assign them to first import links on the document\n // 3. Wait for import styles & scripts to be done loading/running\n // 4. Fire load/error events\n whenDocumentReady(() => {\n // Observe changes on .\n this.dynamicImportsMO.observe(document.head, {\n childList: true,\n subtree: true\n });\n this.loadImports(document);\n });\n }\n\n /**\n * @param {!(HTMLDocument|DocumentFragment|Element)} doc\n */\n loadImports(doc) {\n const links = /** @type {!NodeList} */\n (doc.querySelectorAll(importSelector));\n for (let i = 0, l = links.length; i < l; i++) {\n this.loadImport(links[i]);\n }\n this.processImportsIfLoadingDone();\n }\n\n /**\n * @param {!HTMLLinkElement} link\n */\n loadImport(link) {\n const url = link.href;\n // This resource is already being handled by another import.\n if (this.documents[url] !== undefined) {\n // If import is already loaded, we can safely associate it to the link\n // and fire the load/error event.\n const imp = this.documents[url];\n if (imp && imp['__loaded']) {\n link.import = imp;\n this.fireEventIfNeeded(link);\n }\n return;\n }\n this.inflight++;\n // Mark it as pending to notify others this url is being loaded.\n this.documents[url] = 'pending';\n Xhr.load(url, (resource, redirectedUrl) => {\n const doc = this.makeDocument(resource, redirectedUrl || url);\n this.documents[url] = doc;\n this.inflight--;\n // Load subtree.\n this.loadImports(doc);\n }, () => {\n // If load fails, handle error.\n this.documents[url] = null;\n this.inflight--;\n this.processImportsIfLoadingDone();\n });\n }\n\n /**\n * Creates a new document containing resource and normalizes urls accordingly.\n * @param {string=} resource\n * @param {string=} url\n * @return {!DocumentFragment}\n */\n makeDocument(resource, url) {\n if (!resource) {\n return document.createDocumentFragment();\n }\n\n if (isIE) {\n // should be appended to . Not doing so\n // in IE/Edge breaks the cascading order. We disable the loading by\n // setting the type before setting innerHTML to avoid loading\n // resources twice.\n resource = resource.replace(STYLESHEET_REGEXP, (match, p1, p2) => {\n if (match.indexOf('type=') === -1) {\n return `${p1} type=${importDisableType} ${p2}`;\n }\n return match;\n });\n }\n\n let content;\n const template = /** @type {!HTMLTemplateElement} */\n (document.createElement('template'));\n template.innerHTML = resource;\n if (template.content) {\n // This creates issues in Safari10 when used with shadydom (see #12).\n content = template.content;\n } else {\n //