From 10c8ed7c7ecb0fa1a1c7db0ff0ab398b29f38173 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Fri, 17 Feb 2017 14:36:13 -0800 Subject: [PATCH] rebuild --- webcomponents-hi-sd-ce.js | 4 ++-- webcomponents-hi-sd-ce.js.map | 2 +- webcomponents-lite.js | 4 ++-- webcomponents-lite.js.map | 2 +- webcomponents-sd-ce.js | 2 +- webcomponents-sd-ce.js.map | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/webcomponents-hi-sd-ce.js b/webcomponents-hi-sd-ce.js index 542f26a..0b699d4 100644 --- a/webcomponents-hi-sd-ce.js +++ b/webcomponents-hi-sd-ce.js @@ -1,6 +1,6 @@ -(function(){'use strict';function _(Wt){return Wt=$(Wt),te(ee(Wt),Wt)}function $(Wt){return Wt.replace(we.comments,'').replace(we.port,'')}function ee(Wt){let Bt=new Ie;Bt.start=0,Bt.end=Wt.length;let jt=Bt;for(let Kt=0,Gt=Wt.length;Kt{It=Bt}),'complete'===document.readyState?It():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&It()})),At.then(function(){Wt&&Wt()}))}function xe(Wt,Bt){for(let jt in Bt)null===jt?Wt.style.removeProperty(jt):Wt.style.setProperty(jt,Bt[jt])}(Wt=>{const Bt=!!('import'in document.createElement('link'));let jt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return jt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Kt=/(^\/)|(^#)|(^[\w-\d]*:)/,Gt=/(url\()([^)]*)(\))/g,Vt=/(@import[\s]+(?!url\())([^;]*)(;)/g,Xt=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,Yt={fixUrls(_o,yo){_o.href&&_o.setAttribute('href',Yt.replaceAttrUrl(_o.getAttribute('href'),yo)),_o.src&&_o.setAttribute('src',Yt.replaceAttrUrl(_o.getAttribute('src'),yo)),'style'===_o.localName&&Yt.resolveUrlsInStyle(_o,yo)},fixUrlAttributes(_o,yo){const mo=['action','src','href','url','style'];for(let fo,go=0;gobo.search(/({{|\[\[)/)&&(So.value='style'===fo?Yt.resolveUrlsInCssText(bo,yo):Yt.replaceAttrUrl(bo,yo))}},fixUrlsInTemplates(_o,yo){const mo=_o.querySelectorAll('template');for(let go=0;go{let No=So.replace(/["']/g,'');return yo&&(No=Yt.resolveUrl(No,yo)),fo+'\''+No+'\''+bo})},replaceAttrUrl(_o,yo){return _o&&Kt.test(_o)?_o:Yt.resolveUrl(_o,yo)},resolveUrl(_o,yo){if(void 0===Yt.__workingURL){Yt.__workingURL=!1;try{const go=new URL('b','http://a');go.pathname='c%20d',Yt.__workingURL='http://a/c%20d'===go.href}catch(go){}}if(Yt.__workingURL)return new URL(_o,yo).href;let mo=Yt.__tempDoc;return mo||(mo=document.implementation.createHTMLDocument('temp'),Yt.__tempDoc=mo,mo.__base=mo.createElement('base'),mo.head.appendChild(mo.__base),mo.__anchor=mo.createElement('a')),mo.__base.href=yo,mo.__anchor.href=_o,mo.__anchor.href||_o}},zt={async:!0,load(_o,yo,mo){if(!_o)mo('error: href must be specified');else if(_o.match(/^data:/)){const go=_o.split(','),fo=go[0];let So=go[1];So=-1{let fo=go.getResponseHeader('Location');if(fo&&0===fo.indexOf('/')){const bo=location.origin||location.protocol+'//'+location.host;fo=bo+fo}const So=go.response||go.responseText;304===go.status||0===go.status||200<=go.status&&300>go.status?yo(So,fo):mo(So)},go.send()}}},$t=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),Zt='link[rel=import]',Qt='import-disable',Jt=`link[rel=stylesheet][href][type=${Qt}]`,eo=`${Zt}, ${Jt}, +(function(){'use strict';function _(Wt){return Wt=$(Wt),te(ee(Wt),Wt)}function $(Wt){return Wt.replace(we.comments,'').replace(we.port,'')}function ee(Wt){let Bt=new Ie;Bt.start=0,Bt.end=Wt.length;let jt=Bt;for(let Kt=0,Gt=Wt.length;Kt{It=Bt}),'complete'===document.readyState?It():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&It()})),At.then(function(){Wt&&Wt()}))}function xe(Wt,Bt){for(let jt in Bt)null===jt?Wt.style.removeProperty(jt):Wt.style.setProperty(jt,Bt[jt])}(Wt=>{const Bt=!!('import'in document.createElement('link'));let jt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return jt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const Kt=/(^\/)|(^#)|(^[\w-\d]*:)/,Gt=/(url\()([^)]*)(\))/g,Vt=/(@import[\s]+(?!url\())([^;]*)(;)/g,Xt=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,Yt={fixUrls(_o,yo){_o.href&&_o.setAttribute('href',Yt.replaceAttrUrl(_o.getAttribute('href'),yo)),_o.src&&_o.setAttribute('src',Yt.replaceAttrUrl(_o.getAttribute('src'),yo)),'style'===_o.localName&&Yt.resolveUrlsInStyle(_o,yo)},fixUrlAttributes(_o,yo){const mo=['action','src','href','url','style'];for(let fo,go=0;gobo.search(/({{|\[\[)/)&&(So.value='style'===fo?Yt.resolveUrlsInCssText(bo,yo):Yt.replaceAttrUrl(bo,yo))}},fixUrlsInTemplates(_o,yo){const mo=_o.querySelectorAll('template');for(let go=0;go{let No=So.replace(/["']/g,'');return yo&&(No=Yt.resolveUrl(No,yo)),fo+'\''+No+'\''+bo})},replaceAttrUrl(_o,yo){return _o&&Kt.test(_o)?_o:Yt.resolveUrl(_o,yo)},resolveUrl(_o,yo){if(void 0===Yt.__workingURL){Yt.__workingURL=!1;try{const go=new URL('b','http://a');go.pathname='c%20d',Yt.__workingURL='http://a/c%20d'===go.href}catch(go){}}if(Yt.__workingURL)return new URL(_o,yo).href;let mo=Yt.__tempDoc;return mo||(mo=document.implementation.createHTMLDocument('temp'),Yt.__tempDoc=mo,mo.__base=mo.createElement('base'),mo.head.appendChild(mo.__base),mo.__anchor=mo.createElement('a')),mo.__base.href=yo,mo.__anchor.href=_o,mo.__anchor.href||_o}},zt={async:!0,load(_o,yo,mo){if(!_o)mo('error: href must be specified');else if(_o.match(/^data:/)){const go=_o.split(','),fo=go[0];let So=go[1];So=-1{let fo=go.getResponseHeader('Location');if(fo&&0===fo.indexOf('/')){const bo=location.origin||location.protocol+'//'+location.host;fo=bo+fo}const So=go.response||go.responseText;304===go.status||0===go.status||200<=go.status&&300>go.status?yo(So,fo):mo(So)},go.send()}}},$t=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),Zt='link[rel=import]',Qt='import-disable',Jt=`link[rel=stylesheet][href][type=${Qt}]`,eo=`${Zt}, ${Jt}, style:not([type]), link[rel=stylesheet][href]:not([type]), script:not([type]), script[type="application/javascript"], script[type="text/javascript"]`,to='import-dependency',oo=`${Zt}:not(${to})`,ro=`script[${to}]`,no=`style[${to}], - link[rel=stylesheet][${to}]`;const lo=_o=>{return _o.nodeType===Node.ELEMENT_NODE&&'link'===_o.localName&&'import'===_o.rel},ao=(_o,yo)=>{if(_o.__loaded)yo&&yo();else if('script'===_o.localName&&!_o.src)_o.__loaded=!0,yo&&yo();else{const mo=go=>{_o.removeEventListener(go.type,mo),_o.__loaded=!0,yo&&yo()};_o.addEventListener('load',mo),$t&&'style'===_o.localName||_o.addEventListener('error',mo)}},io=_o=>{po(()=>co(()=>_o&&_o()))},po=_o=>{if('loading'!==document.readyState)_o();else{const yo=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',yo),_o())};document.addEventListener('readystatechange',yo)}},co=_o=>{let yo=document.querySelectorAll(oo),mo=yo.length;if(!mo)return void _o();for(let So,go=0,fo=yo.length;go{0==--mo&&_o()})},ho=_o=>{if(Bt)return _o.ownerDocument===document?null:_o.ownerDocument;let yo=_o.__importDoc;if(!yo&&_o.parentNode){if(yo=_o.parentNode,'function'==typeof yo.closest)yo=yo.closest(Zt);else for(;!lo(yo)&&(yo=yo.parentNode););_o.__importDoc=yo}return yo},uo=(_o,yo)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(_o,yo);const mo=document.createEvent('CustomEvent');return mo.initCustomEvent(_o,!!yo.bubbles,!!yo.cancelable,yo.detail),mo};if(Bt){const _o=document.querySelectorAll(Zt);for(let fo,mo=0,go=_o.length;mo{const go=mo.target;lo(go)&&(go.__loaded=!0)};document.addEventListener('load',yo,!0),document.addEventListener('error',yo,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(_o=>this.handleMutations(_o)),po(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(_o){const yo=_o.querySelectorAll(Zt);for(let mo=0,go=yo.length;mo{const fo=this.makeDocument(mo,go||yo);this.documents[yo]=fo,this.inflight--,this.loadImports(fo),this.processImportsIfLoadingDone()},()=>{this.documents[yo]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(_o,yo){if(!_o)return document.createDocumentFragment();$t&&(_o=_o.replace(Xt,(No,Co,Eo)=>{return-1===No.indexOf('type=')?`${Co} type=${Qt} ${Eo}`:No}));let mo;const go=document.createElement('template');if(go.innerHTML=_o,go.content)mo=go.content;else for(mo=document.createDocumentFragment();go.firstChild;)mo.appendChild(go.firstChild);const fo=mo.querySelector('base');fo&&(yo=Yt.replaceAttrUrl(fo.getAttribute('href'),yo),fo.removeAttribute('href'));const So=mo.querySelectorAll(eo);let bo=0;for(let Eo,No=0,Co=So.length;No{yo&&_o&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{yo=!0,mo()}),this.runScripts(()=>{_o=!0,mo()})}}flatten(_o){const yo=_o.querySelectorAll(Zt);for(let fo,mo=0,go=yo.length;mofo.href,configurable:!0,enumerable:!0}),this.flatten(So),fo.appendChild(So))}}runScripts(_o){const yo=document.querySelectorAll(ro),mo=yo.length,go=fo=>{if(fo{jt=null,go(fo+1)})}else _o()};go(0)}waitForStyles(_o){const yo=document.querySelectorAll(no);let mo=yo.length;if(!mo)return void _o();const go=$t&&!!document.querySelector(Jt);for(let bo,fo=0,So=yo.length;fo{bo.removeAttribute(to),0==--mo&&_o()}),go&&bo.parentNode!==document.head){const No=document.createElement(bo.localName);No.__appliedElement=bo,No.setAttribute('type','import-placeholder'),bo.parentNode.insertBefore(No,bo.nextSibling);let Co=ho(bo);for(;Co&&ho(Co);)Co=ho(Co);Co.parentNode!==document.head&&(Co=null),document.head.insertBefore(bo,Co),bo.removeAttribute('type')}}fireEvents(){const _o=document.querySelectorAll(Zt);for(let mo,yo=_o.length-1;0<=yo&&(mo=_o[yo]);yo--)this.fireEventIfNeeded(mo)}fireEventIfNeeded(_o){if(!_o.__loaded){_o.__loaded=!0,_o.import&&(_o.import.readyState='complete');const yo=_o.import?'load':'error';_o.dispatchEvent(uo(yo,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(_o){for(let yo=0;yo<_o.length;yo++){const mo=_o[yo];if(mo.addedNodes)for(let go=0;godocument.dispatchEvent(uo('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Wt.useNative=Bt,Wt.whenReady=io,Wt.importForElement=ho})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';function Wt(Mr,Dr,wr){return{index:Mr,removed:Dr,addedCount:wr}}function Bt(Mr){return'ShadyRoot'===Mr.__localName}function jt(Mr,Dr){if(Mr&&Dr)for(var kr,wr=Object.getOwnPropertyNames(Dr),Lr=0;Lr'===Mr?'>':'"'===Mr?'"':'\xA0'===Mr?' ':void 0}function Xt(Mr){for(var Dr={},wr=0;wr';case Node.TEXT_NODE:return Mr=Mr.data,Dr&&Wo[Dr.localName]?Mr:Mr.replace(Uo,Vt);case Node.COMMENT_NODE:return'';default:throw window.console.error(Mr),Error('not implemented');}}function zt(Mr,Dr){'template'===Mr.localName&&(Mr=Mr.content);for(var Hr,wr='',Lr=Dr?Dr(Mr):Mr.childNodes,kr=0,Fr=Lr.length;kr]/g,qo=Xt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Wo=Xt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Fo.getOuterHTML=Yt,Fo.getInnerHTML=zt;var Bo={},jo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Ko=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Bo.parentNode=function(Mr){return jo.currentNode=Mr,jo.parentNode()},Bo.firstChild=function(Mr){return jo.currentNode=Mr,jo.firstChild()},Bo.lastChild=function(Mr){return jo.currentNode=Mr,jo.lastChild()},Bo.previousSibling=function(Mr){return jo.currentNode=Mr,jo.previousSibling()},Bo.nextSibling=function(Mr){return jo.currentNode=Mr,jo.nextSibling()},Bo.childNodes=$t,Bo.parentElement=function(Mr){return Ko.currentNode=Mr,Ko.parentNode()},Bo.firstElementChild=function(Mr){return Ko.currentNode=Mr,Ko.firstChild()},Bo.lastElementChild=function(Mr){return Ko.currentNode=Mr,Ko.lastChild()},Bo.previousElementSibling=function(Mr){return Ko.currentNode=Mr,Ko.previousSibling()},Bo.nextElementSibling=function(Mr){return Ko.currentNode=Mr,Ko.nextSibling()},Bo.children=function(Mr){var Dr=[];for(Ko.currentNode=Mr,Mr=Ko.firstChild();Mr;)Dr.push(Mr),Mr=Ko.nextSibling();return Dr},Bo.innerHTML=function(Mr){return Fo.getInnerHTML(Mr,function(Dr){return $t(Dr)})},Bo.textContent=function(Mr){if(Mr.nodeType!==Node.ELEMENT_NODE)return Mr.nodeValue;Mr=document.createTreeWalker(Mr,NodeFilter.SHOW_TEXT,null,!1);for(var wr,Dr='';wr=Mr.nextNode();)Dr+=wr.nodeValue;return Dr};var Go={},Vo=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),Xo=document.implementation.createHTMLDocument('inert').createElement('div'),Yo=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),zo={parentElement:Zt('parentElement'),parentNode:Zt('parentNode'),nextSibling:Zt('nextSibling'),previousSibling:Zt('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(Mr){this.setAttribute('class',Mr)},configurable:!0},nextElementSibling:{get:function(){if(ko.hasProperty(this,'nextSibling')){for(var Mr=this.nextSibling;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.nextSibling;return Mr}return Bo.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(ko.hasProperty(this,'previousSibling')){for(var Mr=this.previousSibling;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.previousSibling;return Mr}return Bo.previousElementSibling(this)},configurable:!0}},$o={childNodes:{get:function(){if(ko.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var Mr=this.firstChild;Mr;Mr=Mr.nextSibling)this.__shady.childNodes.push(Mr)}return this.__shady.childNodes}return Bo.childNodes(this)},configurable:!0},firstChild:Zt('firstChild'),lastChild:Zt('lastChild'),textContent:{get:function(){if(ko.hasProperty(this,'firstChild')){for(var Lr,Mr=[],Dr=0,wr=this.childNodes;Lr=wr[Dr];Dr++)Lr.nodeType!==Node.COMMENT_NODE&&Mr.push(Lr.textContent);return Mr.join('')}return Bo.textContent(this)},set:function(Mr){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=Mr;else{for(;this.firstChild;)this.removeChild(this.firstChild);Mr&&this.appendChild(document.createTextNode(Mr))}},configurable:!0},firstElementChild:{get:function(){if(ko.hasProperty(this,'firstChild')){for(var Mr=this.firstChild;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.nextSibling;return Mr}return Bo.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(ko.hasProperty(this,'lastChild')){for(var Mr=this.lastChild;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.previousSibling;return Mr}return Bo.lastElementChild(this)},configurable:!0},children:{get:function(){return ko.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Mr){return Mr.nodeType===Node.ELEMENT_NODE}):Bo.children(this)},configurable:!0},innerHTML:{get:function(){var Mr='template'===this.localName?this.content:this;return ko.hasProperty(this,'firstChild')?Fo.getInnerHTML(Mr):Bo.innerHTML(Mr)},set:function(Mr){for(var Dr='template'===this.localName?this.content:this;Dr.firstChild;)Dr.removeChild(Dr.firstChild);for(Vo&&Vo.set?Vo.set.call(Xo,Mr):Xo.innerHTML=Mr;Xo.firstChild;)Dr.appendChild(Xo.firstChild)},configurable:!0}},Zo={shadowRoot:{get:function(){return this.shadyRoot},set:function(Mr){this.shadyRoot=Mr},configurable:!0}},Qo={activeElement:{get:function(){var Mr;if(Mr=Yo&&Yo.get?Yo.get.call(document):Po.settings.hasDescriptors?void 0:document.activeElement,Mr){var Dr=!!Po.isShadyRoot(this);if(this===document||Dr&&this.host!==Mr&&this.host.contains(Mr)){for(Dr=Po.ownerShadyRootForNode(Mr);Dr&&Dr!==this;)Mr=Dr.host,Dr=Po.ownerShadyRootForNode(Mr);Mr=this===document?Dr?null:Mr:Dr===this?Mr:null}else Mr=null}else Mr=null;return Mr},set:function(){},configurable:!0}},Jo=Po.settings.hasDescriptors?function(){}:function(Mr){Mr.__shady&&Mr.__shady.__outsideAccessors||(Mr.__shady=Mr.__shady||{},Mr.__shady.__outsideAccessors=!0,Qt(Mr,zo,!0))},er=Po.settings.hasDescriptors?function(){}:function(Mr){Mr.__shady&&Mr.__shady.__insideAccessors||(Mr.__shady=Mr.__shady||{},Mr.__shady.__insideAccessors=!0,Qt(Mr,$o,!0),Qt(Mr,Zo,!0))};Go.ShadowRootAccessor=Zo,Go.ActiveElementAccessor=Qo,Go.patchAccessors=function(Mr){Qt(Mr,zo),Qt(Mr,$o),Qt(Mr,Qo)},Go.patchShadowRootAccessors=function(Mr){Qt(Mr,$o,!0),Qt(Mr,Qo,!0)},Go.patchOutsideElementAccessors=Jo,Go.patchInsideElementAccessors=er;var tr={};tr.recordInsertBefore=function(Mr,Dr,wr){if(Go.patchInsideElementAccessors(Dr),Dr.__shady=Dr.__shady||{},ko.hasProperty(Dr,'firstChild')&&(Dr.__shady.childNodes=null),Mr.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var Lr=Mr.childNodes,kr=0;kr`:${Vt}(${Xt.replace(/\s/g,'')})`),Wt=Wt.replace(st,`${ot} $1`),Wt=Wt.replace(et,(Gt,Vt,Xt)=>{if(!Kt){let Yt=this._transformCompoundSelector(Xt,Vt,Bt,jt);Kt=Kt||Yt.stop,Vt=Yt.combinator,Xt=Yt.value}return Vt+Xt}),Wt}_transformCompoundSelector(Wt,Bt,jt,Kt){let Gt=Wt.indexOf(nt);0<=Wt.indexOf(ot)?Wt=this._transformHostSelector(Wt,Kt):0!==Gt&&(Wt=jt?this._transformSimpleSelector(Wt,jt):Wt);let Vt=!1;0<=Gt&&(Bt='',Vt=!0);let Xt;return Vt&&(Xt=!0,Vt&&(Wt=Wt.replace(dt,(Yt,zt)=>` > ${zt}`))),Wt=Wt.replace(it,(Yt,zt,$t)=>`[dir="${$t}"] ${zt}, ${zt}[dir="${$t}"]`),{value:Wt,combinator:Bt,stop:Xt}}_transformSimpleSelector(Wt,Bt){let jt=Wt.split(ct);return jt[0]+=Bt,jt.join(ct)}_transformHostSelector(Wt,Bt){let jt=Wt.match(lt),Kt=jt&&jt[2].trim()||'';if(Kt){if(!Kt[0].match(tt)){let Gt=Kt.split(tt)[0];return Gt===Bt?Kt:'should_not_match'}return Wt.replace(lt,function(Gt,Vt,Xt){return Bt+Xt})}return Wt.replace(ot,Bt)}documentRule(Wt){Wt.selector=Wt.parsedSelector,this.normalizeRootSelector(Wt),this._transformRule(Wt,this._transformDocumentSelector)}normalizeRootSelector(Wt){Wt.selector===':root'&&(Wt.selector='html')}_transformDocumentSelector(Wt){return Wt.match(nt)?this._transformComplexSelector(Wt,Qe):this._transformSimpleSelector(Wt.trim(),Qe)}}let Ze=/:(nth[-\w]+)\(([^)]+)\)/,Qe=`:not(.${ze})`,Je=',',et=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,tt=/[[.:#*]/,ot=':host',nt='::slotted',st=/^(::slotted)/,lt=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,dt=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,it=/(.*):dir\((?:(ltr|rtl))\)/,ct=':';var _t=new $e;const yt='__styleInfo';class mt{static get(Wt){return Wt?Wt[yt]:null}static set(Wt,Bt){return Wt[yt]=Bt,Bt}constructor(Wt,Bt,jt,Kt,Gt,Vt){this.styleRules=Wt||null,this.placeholder=Bt||null,this.ownStylePropertyNames=jt||[],this.overrideStyleProperties=null,this.elementName=Kt||'',this.cssBuild=Vt||'',this.typeExtension=Gt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}_getStyleRules(){return this.styleRules}}mt.prototype._getStyleRules=mt.prototype._getStyleRules;const gt=(Wt=>Wt.matches||Wt.matchesSelector||Wt.mozMatchesSelector||Wt.msMatchesSelector||Wt.oMatchesSelector||Wt.webkitMatchesSelector)(window.Element.prototype),ft=navigator.userAgent.match('Trident'),St='x-scope';class bt{get XSCOPE_NAME(){return St}decorateStyles(Wt){let Bt=this,jt={},Kt=[],Gt=0;ue(Wt,function(Xt){Bt.decorateRule(Xt),Xt.index=Gt++,Bt.collectPropertiesInCssText(Xt.propertyInfo.cssText,jt)},function(Yt){Kt.push(Yt)}),Wt._keyframes=Kt;let Vt=[];for(let Xt in jt)Vt.push(Xt);return Vt}decorateRule(Wt){if(Wt.propertyInfo)return Wt.propertyInfo;let Bt={},jt={},Kt=this.collectProperties(Wt,jt);return Kt&&(Bt.properties=jt,Wt.rules=null),Bt.cssText=this.collectCssText(Wt),Wt.propertyInfo=Bt,Bt}collectProperties(Wt,Bt){let jt=Wt.propertyInfo;if(!jt){let Kt,Vt=Wt.parsedCssText,Xt,Yt;for(;Kt=qe.exec(Vt);)Xt=(Kt[2]||Kt[3]).trim(),('inherit'!==Xt||'unset'!==Xt)&&(Bt[Kt[1].trim()]=Xt),Yt=!0;return Yt}else if(jt.properties)return Object.assign(Bt,jt.properties),!0}collectCssText(Wt){return this.collectConsumingCssText(Wt.parsedCssText)}collectConsumingCssText(Wt){return Wt.replace(Ge,'').replace(qe,'')}collectPropertiesInCssText(Wt,Bt){for(let jt,Kt;jt=Be.exec(Wt);)Kt=jt[1],':'!==jt[2]&&(Bt[Kt]=!0)}reify(Wt){let Bt=Object.getOwnPropertyNames(Wt);for(let Kt,jt=0;jt *'===Xt||'html'===Xt,zt=0===Xt.indexOf(':host')&&!Yt;if('shady'===jt&&(Yt=Xt===Vt+' > *.'+Vt||-1!==Xt.indexOf('html'),zt=!Yt&&0===Xt.indexOf(Vt)),'shadow'===jt&&(Yt=':host > *'===Xt||'html'===Xt,zt=zt&&!Yt),Yt||zt){let $t=Vt;zt&&(He&&!Bt.transformedSelector&&(Bt.transformedSelector=_t._transformRuleCss(Bt,_t._transformComplexSelector,_t._calcElementScope(Gt.is),Vt)),$t=Bt.transformedSelector||Vt),Kt({selector:$t,isHost:zt,isRoot:Yt})}}}hostAndRootPropertiesForScope(Wt,Bt){let jt={},Kt={},Gt=this,Vt=Bt&&Bt.__cssBuild;return ue(Bt,function(Xt){Gt.whenHostOrRootRule(Wt,Xt,Vt,function(Yt){let zt=Wt._element||Wt;gt.call(zt,Yt.selector)&&(Yt.isHost?Gt.collectProperties(Xt,jt):Gt.collectProperties(Xt,Kt))})},null,!0),{rootProps:Kt,hostProps:jt}}transformStyles(Wt,Bt,jt){let Kt=this,Gt=Ne(Wt),Vt=_t._calcHostScope(Gt.is,Gt.extends),Xt=Wt.extends?'\\'+Vt.slice(0,-1)+'\\]':Vt,Yt=new RegExp('(?:^|[^.#[:])'+Xt+'($|[.:[\\s>+~])'),zt=mt.get(Wt).styleRules,$t=this._elementKeyframeTransforms(Wt,zt,jt);return _t.elementStyles(Wt,zt,function(Zt){Kt.applyProperties(Zt,Bt),He||he(Zt)||!Zt.cssText||(Kt.applyKeyframeTransforms(Zt,$t),Kt._scopeSelector(Zt,Yt,Vt,jt))})}_elementKeyframeTransforms(Wt,Bt,jt){let Kt=Bt._keyframes,Gt={};if(!He&&Kt)for(let Vt=0,Xt=Kt[Vt];Vt=Xt._useCount&&Xt.parentNode&&Xt.parentNode.removeChild(Xt)),He?Vt.customStyle?(Vt.customStyle.textContent=Gt,Kt=Vt.customStyle):Gt&&(Kt=_e(Gt,jt,Wt.shadowRoot,Vt.placeholder)):Kt?!Kt.parentNode&&ye(Kt,null,Vt.placeholder):Gt&&(Kt=_e(Gt,jt,null,Vt.placeholder)),Kt&&(Kt._useCount=Kt._useCount||0,Vt.customStyle!=Kt&&Kt._useCount++,Vt.customStyle=Kt),ft&&(Kt.textContent=Kt.textContent),Kt}applyCustomStyle(Wt,Bt){let jt=pe(Wt),Kt=this;Wt.textContent=ie(jt,function(Gt){let Vt=Gt.cssText=Gt.parsedCssText;Gt.propertyInfo&&Gt.propertyInfo.cssText&&(Vt=le(Vt),Gt.cssText=Kt.valueForProperties(Vt,Bt))})}}var Nt=new bt;let Ct={};const Et=window.customElements;if(Et&&!He){const Wt=Et.define;Et.define=function(Bt,jt,Kt){return Ct[Bt]=ge(Bt),Wt.call(Et,Bt,jt,Kt)}}let Pt=function(){};if(!He){let Wt=Vt=>{return Vt.classList&&!Vt.classList.contains(_t.SCOPE_NAME)||Vt instanceof window.SVGElement&&(!Vt.hasAttribute('class')||0>Vt.getAttribute('class').indexOf(_t.SCOPE_NAME))},Bt=Vt=>{for(let Yt,Xt=0;Xt{jt.observe(Vt,{childList:!0,subtree:!0})},Gt=window.customElements&&!window.customElements.flush;if(Gt)Kt(document);else{let Vt=()=>{Kt(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Vt):requestAnimationFrame(function(){if('loading'===document.readyState){let Xt=function(){Vt(),document.removeEventListener('readystatechange',Xt)};document.addEventListener('readystatechange',Xt)}else Vt()})}Pt=function(){Bt(jt.takeRecords())}}const Tt={},Rt=Promise.resolve();let At=null,xt=window.HTMLImports&&window.HTMLImports.whenReady||null,It;const Ot='__processedByShadyCSS',Mt='__seenByShadyCSS';let Dt=null,wt=null;class Lt{constructor(){this.customStyles=[],this.enqueued=!1}enqueueDocumentValidation(){this.enqueued||!wt||(this.enqueued=!0,Ae(wt))}addCustomStyle(Wt){Wt[Mt]||(Wt[Mt]=!0,this.customStyles.push(Wt),this.enqueueDocumentValidation())}getStyleForCustomStyle(Wt){let Bt;return Bt=Wt.getStyle?Wt.getStyle():Wt,Bt}findStyles(){let Wt=this.customStyles;for(let jt,Bt=0;Btthis.typeMax&&Gt.shift(),this.cache[Wt]=Gt}fetch(Wt,Bt,jt){let Kt=this.cache[Wt];if(Kt)for(let Vt,Gt=Kt.length-1;0<=Gt;Gt--)if(Vt=Kt[Gt],this._validate(Vt,Bt,jt))return Vt}};class Ft{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement;let Wt=new Ie;Wt.rules=[],this._documentOwnerStyleInfo=mt.set(document.documentElement,new mt(Wt)),this._elementsHaveApplied=!1,this._applyShim=null,this._customStyleInterface=null,Ae(()=>{this._ensure()})}flush(){Pt()}_generateScopeSelector(Wt){let Bt=this._scopeCounter[Wt]=(this._scopeCounter[Wt]||0)+1;return`${Wt}-${Bt}`}getStyleAst(Wt){return pe(Wt)}styleAstToString(Wt){return ie(Wt)}_gatherStyles(Wt){let Bt=Wt.content.querySelectorAll('style'),jt=[];for(let Gt,Kt=0;Kt{this.transformCustomStyleForDocument(Wt)},this._customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{(this._customStyleInterface.enqueued||this._elementsHaveApplied)&&this.flushCustomStyles()})}):this._customStyleInterface={['findStyles'](){},enqueued:!1,['getStyleForCustomStyle'](){return null}})}_ensure(){this._ensureApplyShim(),this._ensureCustomStyleInterface()}flushCustomStyles(){if(this._ensure(),this._customStyleInterface.findStyles(),!!this._customStyleInterface.enqueued){let Wt=this._customStyleInterface.customStyles;Ue?this._revalidateCustomStyleApplyShim(Wt):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles(Wt)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!Ue&&this.styleDocument()}}styleElement(Wt,Bt){let{is:jt}=Ne(Wt),Kt=mt.get(Wt);if(Kt||(Kt=this._prepareHost(Wt)),this._isRootOwner(Wt)||(this._elementsHaveApplied=!0),Bt&&(Kt.overrideStyleProperties=Kt.overrideStyleProperties||{},Object.assign(Kt.overrideStyleProperties,Bt)),!Ue)this._updateProperties(Wt,Kt),Kt.ownStylePropertyNames&&Kt.ownStylePropertyNames.length&&this._applyStyleProperties(Wt,Kt);else{Kt.overrideStyleProperties&&xe(Wt,Kt.overrideStyleProperties);let Gt=Tt[jt];if(!Gt&&!this._isRootOwner(Wt))return;if(Gt&&Gt._style&&!Pe(Gt)){if(Te(Gt)||(this._ensure(),this._applyShim.transformRules(Gt._styleAst,jt),Gt._style.textContent=_t.elementStyles(Wt,Kt.styleRules),Re(Gt)),He){let Vt=Wt.shadowRoot;if(Vt){let Xt=Vt.querySelector('style');Xt.textContent=_t.elementStyles(Wt,Kt.styleRules)}}Kt.styleRules=Gt._styleAst}}}_styleOwnerForNode(Wt){let Bt=Wt.getRootNode(),jt=Bt.host;return jt?mt.get(jt)?jt:this._styleOwnerForNode(jt):this._documentOwner}_isRootOwner(Wt){return Wt===this._documentOwner}_applyStyleProperties(Wt,Bt){let jt=Ne(Wt).is,Kt=kt.fetch(jt,Bt.styleProperties,Bt.ownStylePropertyNames),Gt=Kt&&Kt.scopeSelector,Vt=Kt?Kt.styleElement:null,Xt=Bt.scopeSelector;Bt.scopeSelector=Gt||this._generateScopeSelector(jt);let Yt=Nt.applyElementStyle(Wt,Bt.styleProperties,Bt.scopeSelector,Vt);return He||Nt.applyElementScopeSelector(Wt,Bt.scopeSelector,Xt),Kt||kt.store(jt,Bt.styleProperties,Yt,Bt.scopeSelector),Yt}_updateProperties(Wt,Bt){let jt=this._styleOwnerForNode(Wt),Kt=mt.get(jt),Gt=Kt.styleProperties,Vt=Object.create(Gt||null),Xt=Nt.hostAndRootPropertiesForScope(Wt,Bt.styleRules),Yt=Nt.propertyDataFromStyles(Kt.styleRules,Wt),zt=Yt.properties;Object.assign(Vt,Xt.hostProps,zt,Xt.rootProps),this._mixinOverrideStyles(Vt,Bt.overrideStyleProperties),Nt.reify(Vt),Bt.styleProperties=Vt}_mixinOverrideStyles(Wt,Bt){for(let jt in Bt){let Kt=Bt[jt];(Kt||0===Kt)&&(Wt[jt]=Kt)}}styleDocument(Wt){this.styleSubtree(this._documentOwner,Wt)}styleSubtree(Wt,Bt){(Wt.shadowRoot||this._isRootOwner(Wt))&&this.styleElement(Wt,Bt);let jt=Wt.shadowRoot,Kt=jt&&(jt.children||jt.childNodes);if(Kt)for(let Xt,Vt=0;Vt{He?_t.normalizeRootSelector(jt):_t.documentRule(jt),Ue&&(this._ensure(),this._applyShim.transformRule(jt))}),Ue?Wt.textContent=ie(Bt):this._documentOwnerStyleInfo.styleRules.rules.push(Bt)}_revalidateApplyShim(Wt){if(Ue){let Bt=pe(Wt);this._ensure(),this._applyShim.transformRules(Bt),Wt.textContent=ie(Bt)}}getComputedStyleValue(Wt,Bt){let jt;if(!Ue){let Kt=mt.get(Wt)||mt.get(this._styleOwnerForNode(Wt));jt=Kt.styleProperties[Bt]}return jt=jt||window.getComputedStyle(Wt).getPropertyValue(Bt),jt.trim()}setElementClass(Wt,Bt){let jt=Wt.getRootNode(),Kt=Bt?Bt.split(/\s/):[],Gt=jt.host&&jt.host.localName;if(!Gt){var Vt=Wt.getAttribute('class');if(Vt){let Xt=Vt.split(/\s/);for(let Yt=0;Yt{return _o.nodeType===Node.ELEMENT_NODE&&'link'===_o.localName&&'import'===_o.rel},ao=(_o,yo)=>{if(_o.__loaded)yo&&yo();else if('script'===_o.localName&&!_o.src)_o.__loaded=!0,yo&&yo();else{const mo=go=>{_o.removeEventListener(go.type,mo),_o.__loaded=!0,yo&&yo()};_o.addEventListener('load',mo),$t&&'style'===_o.localName||_o.addEventListener('error',mo)}},io=_o=>{po(()=>co(()=>_o&&_o()))},po=_o=>{if('loading'!==document.readyState)_o();else{const yo=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',yo),_o())};document.addEventListener('readystatechange',yo)}},co=_o=>{let yo=document.querySelectorAll(oo),mo=yo.length;if(!mo)return void _o();for(let So,go=0,fo=yo.length;go{0==--mo&&_o()})},ho=_o=>{if(Bt)return _o.ownerDocument===document?null:_o.ownerDocument;let yo=_o.__importDoc;if(!yo&&_o.parentNode){if(yo=_o.parentNode,'function'==typeof yo.closest)yo=yo.closest(Zt);else for(;!lo(yo)&&(yo=yo.parentNode););_o.__importDoc=yo}return yo},uo=(_o,yo)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(_o,yo);const mo=document.createEvent('CustomEvent');return mo.initCustomEvent(_o,!!yo.bubbles,!!yo.cancelable,yo.detail),mo};if(Bt){const _o=document.querySelectorAll(Zt);for(let fo,mo=0,go=_o.length;mo{const go=mo.target;lo(go)&&(go.__loaded=!0)};document.addEventListener('load',yo,!0),document.addEventListener('error',yo,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(_o=>this.handleMutations(_o)),po(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(_o){const yo=_o.querySelectorAll(Zt);for(let mo=0,go=yo.length;mo{const fo=this.makeDocument(mo,go||yo);this.documents[yo]=fo,this.inflight--,this.loadImports(fo),this.processImportsIfLoadingDone()},()=>{this.documents[yo]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(_o,yo){if(!_o)return document.createDocumentFragment();$t&&(_o=_o.replace(Xt,(No,Co,Eo)=>{return-1===No.indexOf('type=')?`${Co} type=${Qt} ${Eo}`:No}));let mo;const go=document.createElement('template');if(go.innerHTML=_o,go.content)mo=go.content;else for(mo=document.createDocumentFragment();go.firstChild;)mo.appendChild(go.firstChild);const fo=mo.querySelector('base');fo&&(yo=Yt.replaceAttrUrl(fo.getAttribute('href'),yo),fo.removeAttribute('href'));const So=mo.querySelectorAll(eo);let bo=0;for(let Eo,No=0,Co=So.length;No{yo&&_o&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{yo=!0,mo()}),this.runScripts(()=>{_o=!0,mo()})}}flatten(_o){const yo=_o.querySelectorAll(Zt);for(let fo,mo=0,go=yo.length;mofo.href,configurable:!0,enumerable:!0}),this.flatten(So),fo.appendChild(So))}}runScripts(_o){const yo=document.querySelectorAll(ro),mo=yo.length,go=fo=>{if(fo{jt=null,go(fo+1)})}else _o()};go(0)}waitForStyles(_o){const yo=document.querySelectorAll(no);let mo=yo.length;if(!mo)return void _o();const go=$t&&!!document.querySelector(Jt);for(let bo,fo=0,So=yo.length;fo{bo.removeAttribute(to),0==--mo&&_o()}),go&&bo.parentNode!==document.head){const No=document.createElement(bo.localName);No.__appliedElement=bo,No.setAttribute('type','import-placeholder'),bo.parentNode.insertBefore(No,bo.nextSibling);let Co=ho(bo);for(;Co&&ho(Co);)Co=ho(Co);Co.parentNode!==document.head&&(Co=null),document.head.insertBefore(bo,Co),bo.removeAttribute('type')}}fireEvents(){const _o=document.querySelectorAll(Zt);for(let mo,yo=_o.length-1;0<=yo&&(mo=_o[yo]);yo--)this.fireEventIfNeeded(mo)}fireEventIfNeeded(_o){if(!_o.__loaded){_o.__loaded=!0,_o.import&&(_o.import.readyState='complete');const yo=_o.import?'load':'error';_o.dispatchEvent(uo(yo,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(_o){for(let yo=0;yo<_o.length;yo++){const mo=_o[yo];if(mo.addedNodes)for(let go=0;godocument.dispatchEvent(uo('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Wt.useNative=Bt,Wt.whenReady=io,Wt.importForElement=ho})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';function Wt(Mr,Dr,wr){return{index:Mr,removed:Dr,addedCount:wr}}function Bt(Mr){return'ShadyRoot'===Mr.__localName}function jt(Mr,Dr){if(Mr&&Dr)for(var kr,wr=Object.getOwnPropertyNames(Dr),Lr=0;Lr'===Mr?'>':'"'===Mr?'"':'\xA0'===Mr?' ':void 0}function Xt(Mr){for(var Dr={},wr=0;wr';case Node.TEXT_NODE:return Mr=Mr.data,Dr&&Wo[Dr.localName]?Mr:Mr.replace(Uo,Vt);case Node.COMMENT_NODE:return'';default:throw window.console.error(Mr),Error('not implemented');}}function zt(Mr,Dr){'template'===Mr.localName&&(Mr=Mr.content);for(var Hr,wr='',Lr=Dr?Dr(Mr):Mr.childNodes,kr=0,Fr=Lr.length;kr]/g,qo=Xt('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Wo=Xt('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Fo.getOuterHTML=Yt,Fo.getInnerHTML=zt;var Bo={},jo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),Ko=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Bo.parentNode=function(Mr){return jo.currentNode=Mr,jo.parentNode()},Bo.firstChild=function(Mr){return jo.currentNode=Mr,jo.firstChild()},Bo.lastChild=function(Mr){return jo.currentNode=Mr,jo.lastChild()},Bo.previousSibling=function(Mr){return jo.currentNode=Mr,jo.previousSibling()},Bo.nextSibling=function(Mr){return jo.currentNode=Mr,jo.nextSibling()},Bo.childNodes=$t,Bo.parentElement=function(Mr){return Ko.currentNode=Mr,Ko.parentNode()},Bo.firstElementChild=function(Mr){return Ko.currentNode=Mr,Ko.firstChild()},Bo.lastElementChild=function(Mr){return Ko.currentNode=Mr,Ko.lastChild()},Bo.previousElementSibling=function(Mr){return Ko.currentNode=Mr,Ko.previousSibling()},Bo.nextElementSibling=function(Mr){return Ko.currentNode=Mr,Ko.nextSibling()},Bo.children=function(Mr){var Dr=[];for(Ko.currentNode=Mr,Mr=Ko.firstChild();Mr;)Dr.push(Mr),Mr=Ko.nextSibling();return Dr},Bo.innerHTML=function(Mr){return Fo.getInnerHTML(Mr,function(Dr){return $t(Dr)})},Bo.textContent=function(Mr){if(Mr.nodeType!==Node.ELEMENT_NODE)return Mr.nodeValue;Mr=document.createTreeWalker(Mr,NodeFilter.SHOW_TEXT,null,!1);for(var wr,Dr='';wr=Mr.nextNode();)Dr+=wr.nodeValue;return Dr};var Go={},Vo=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),Xo=document.implementation.createHTMLDocument('inert').createElement('div'),Yo=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),zo={parentElement:Zt('parentElement'),parentNode:Zt('parentNode'),nextSibling:Zt('nextSibling'),previousSibling:Zt('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(Mr){this.setAttribute('class',Mr)},configurable:!0},nextElementSibling:{get:function(){if(ko.hasProperty(this,'nextSibling')){for(var Mr=this.nextSibling;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.nextSibling;return Mr}return Bo.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(ko.hasProperty(this,'previousSibling')){for(var Mr=this.previousSibling;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.previousSibling;return Mr}return Bo.previousElementSibling(this)},configurable:!0}},$o={childNodes:{get:function(){if(ko.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var Mr=this.firstChild;Mr;Mr=Mr.nextSibling)this.__shady.childNodes.push(Mr)}return this.__shady.childNodes}return Bo.childNodes(this)},configurable:!0},firstChild:Zt('firstChild'),lastChild:Zt('lastChild'),textContent:{get:function(){if(ko.hasProperty(this,'firstChild')){for(var Lr,Mr=[],Dr=0,wr=this.childNodes;Lr=wr[Dr];Dr++)Lr.nodeType!==Node.COMMENT_NODE&&Mr.push(Lr.textContent);return Mr.join('')}return Bo.textContent(this)},set:function(Mr){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=Mr;else{for(;this.firstChild;)this.removeChild(this.firstChild);Mr&&this.appendChild(document.createTextNode(Mr))}},configurable:!0},firstElementChild:{get:function(){if(ko.hasProperty(this,'firstChild')){for(var Mr=this.firstChild;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.nextSibling;return Mr}return Bo.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(ko.hasProperty(this,'lastChild')){for(var Mr=this.lastChild;Mr&&Mr.nodeType!==Node.ELEMENT_NODE;)Mr=Mr.previousSibling;return Mr}return Bo.lastElementChild(this)},configurable:!0},children:{get:function(){return ko.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Mr){return Mr.nodeType===Node.ELEMENT_NODE}):Bo.children(this)},configurable:!0},innerHTML:{get:function(){var Mr='template'===this.localName?this.content:this;return ko.hasProperty(this,'firstChild')?Fo.getInnerHTML(Mr):Bo.innerHTML(Mr)},set:function(Mr){for(var Dr='template'===this.localName?this.content:this;Dr.firstChild;)Dr.removeChild(Dr.firstChild);for(Vo&&Vo.set?Vo.set.call(Xo,Mr):Xo.innerHTML=Mr;Xo.firstChild;)Dr.appendChild(Xo.firstChild)},configurable:!0}},Zo={shadowRoot:{get:function(){return this.shadyRoot},set:function(Mr){this.shadyRoot=Mr},configurable:!0}},Qo={activeElement:{get:function(){var Mr;if(Mr=Yo&&Yo.get?Yo.get.call(document):Po.settings.hasDescriptors?void 0:document.activeElement,Mr){var Dr=!!Po.isShadyRoot(this);if(this===document||Dr&&this.host!==Mr&&this.host.contains(Mr)){for(Dr=Po.ownerShadyRootForNode(Mr);Dr&&Dr!==this;)Mr=Dr.host,Dr=Po.ownerShadyRootForNode(Mr);Mr=this===document?Dr?null:Mr:Dr===this?Mr:null}else Mr=null}else Mr=null;return Mr},set:function(){},configurable:!0}},Jo=Po.settings.hasDescriptors?function(){}:function(Mr){Mr.__shady&&Mr.__shady.__outsideAccessors||(Mr.__shady=Mr.__shady||{},Mr.__shady.__outsideAccessors=!0,Qt(Mr,zo,!0))},er=Po.settings.hasDescriptors?function(){}:function(Mr){Mr.__shady&&Mr.__shady.__insideAccessors||(Mr.__shady=Mr.__shady||{},Mr.__shady.__insideAccessors=!0,Qt(Mr,$o,!0),Qt(Mr,Zo,!0))};Go.ShadowRootAccessor=Zo,Go.ActiveElementAccessor=Qo,Go.patchAccessors=function(Mr){Qt(Mr,zo),Qt(Mr,$o),Qt(Mr,Qo)},Go.patchShadowRootAccessors=function(Mr){Qt(Mr,$o,!0),Qt(Mr,Qo,!0)},Go.patchOutsideElementAccessors=Jo,Go.patchInsideElementAccessors=er;var tr={};tr.recordInsertBefore=function(Mr,Dr,wr){if(Go.patchInsideElementAccessors(Dr),Dr.__shady=Dr.__shady||{},ko.hasProperty(Dr,'firstChild')&&(Dr.__shady.childNodes=null),Mr.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var Lr=Mr.childNodes,kr=0;kr`:${Vt}(${Xt.replace(/\s/g,'')})`),Wt=Wt.replace(st,`${ot} $1`),Wt=Wt.replace(et,(Gt,Vt,Xt)=>{if(!Kt){let Yt=this._transformCompoundSelector(Xt,Vt,Bt,jt);Kt=Kt||Yt.stop,Vt=Yt.combinator,Xt=Yt.value}return Vt+Xt}),Wt}_transformCompoundSelector(Wt,Bt,jt,Kt){let Gt=Wt.indexOf(nt);0<=Wt.indexOf(ot)?Wt=this._transformHostSelector(Wt,Kt):0!==Gt&&(Wt=jt?this._transformSimpleSelector(Wt,jt):Wt);let Vt=!1;0<=Gt&&(Bt='',Vt=!0);let Xt;return Vt&&(Xt=!0,Vt&&(Wt=Wt.replace(dt,(Yt,zt)=>` > ${zt}`))),Wt=Wt.replace(it,(Yt,zt,$t)=>`[dir="${$t}"] ${zt}, ${zt}[dir="${$t}"]`),{value:Wt,combinator:Bt,stop:Xt}}_transformSimpleSelector(Wt,Bt){let jt=Wt.split(ct);return jt[0]+=Bt,jt.join(ct)}_transformHostSelector(Wt,Bt){let jt=Wt.match(lt),Kt=jt&&jt[2].trim()||'';if(Kt){if(!Kt[0].match(tt)){let Gt=Kt.split(tt)[0];return Gt===Bt?Kt:'should_not_match'}return Wt.replace(lt,function(Gt,Vt,Xt){return Bt+Xt})}return Wt.replace(ot,Bt)}documentRule(Wt){Wt.selector=Wt.parsedSelector,this.normalizeRootSelector(Wt),this._transformRule(Wt,this._transformDocumentSelector)}normalizeRootSelector(Wt){Wt.selector===':root'&&(Wt.selector='html')}_transformDocumentSelector(Wt){return Wt.match(nt)?this._transformComplexSelector(Wt,Qe):this._transformSimpleSelector(Wt.trim(),Qe)}}let Ze=/:(nth[-\w]+)\(([^)]+)\)/,Qe=`:not(.${ze})`,Je=',',et=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,tt=/[[.:#*]/,ot=':host',nt='::slotted',st=/^(::slotted)/,lt=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,dt=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,it=/(.*):dir\((?:(ltr|rtl))\)/,ct=':';var _t=new $e;const yt='__styleInfo';class mt{static get(Wt){return Wt?Wt[yt]:null}static set(Wt,Bt){return Wt[yt]=Bt,Bt}constructor(Wt,Bt,jt,Kt,Gt,Vt){this.styleRules=Wt||null,this.placeholder=Bt||null,this.ownStylePropertyNames=jt||[],this.overrideStyleProperties=null,this.elementName=Kt||'',this.cssBuild=Vt||'',this.typeExtension=Gt||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}_getStyleRules(){return this.styleRules}}mt.prototype._getStyleRules=mt.prototype._getStyleRules;const gt=(Wt=>Wt.matches||Wt.matchesSelector||Wt.mozMatchesSelector||Wt.msMatchesSelector||Wt.oMatchesSelector||Wt.webkitMatchesSelector)(window.Element.prototype),ft=navigator.userAgent.match('Trident'),St='x-scope';class bt{get XSCOPE_NAME(){return St}decorateStyles(Wt){let Bt=this,jt={},Kt=[],Gt=0;ue(Wt,function(Xt){Bt.decorateRule(Xt),Xt.index=Gt++,Bt.collectPropertiesInCssText(Xt.propertyInfo.cssText,jt)},function(Yt){Kt.push(Yt)}),Wt._keyframes=Kt;let Vt=[];for(let Xt in jt)Vt.push(Xt);return Vt}decorateRule(Wt){if(Wt.propertyInfo)return Wt.propertyInfo;let Bt={},jt={},Kt=this.collectProperties(Wt,jt);return Kt&&(Bt.properties=jt,Wt.rules=null),Bt.cssText=this.collectCssText(Wt),Wt.propertyInfo=Bt,Bt}collectProperties(Wt,Bt){let jt=Wt.propertyInfo;if(!jt){let Kt,Vt=Wt.parsedCssText,Xt,Yt;for(;Kt=qe.exec(Vt);)Xt=(Kt[2]||Kt[3]).trim(),('inherit'!==Xt||'unset'!==Xt)&&(Bt[Kt[1].trim()]=Xt),Yt=!0;return Yt}else if(jt.properties)return Object.assign(Bt,jt.properties),!0}collectCssText(Wt){return this.collectConsumingCssText(Wt.parsedCssText)}collectConsumingCssText(Wt){return Wt.replace(Ge,'').replace(qe,'')}collectPropertiesInCssText(Wt,Bt){for(let jt,Kt;jt=Be.exec(Wt);)Kt=jt[1],':'!==jt[2]&&(Bt[Kt]=!0)}reify(Wt){let Bt=Object.getOwnPropertyNames(Wt);for(let Kt,jt=0;jt *'===Yt||'html'===Yt,$t=0===Yt.indexOf(':host')&&!zt;if('shady'===jt&&(zt=Yt===Xt+' > *.'+Xt||-1!==Yt.indexOf('html'),$t=!zt&&0===Yt.indexOf(Xt)),'shadow'===jt&&(zt=':host > *'===Yt||'html'===Yt,$t=$t&&!zt),zt||$t){let Zt=Xt;$t&&(He&&!Bt.transformedSelector&&(Bt.transformedSelector=_t._transformRuleCss(Bt,_t._transformComplexSelector,_t._calcElementScope(Gt),Xt)),Zt=Bt.transformedSelector||Xt),Kt({selector:Zt,isHost:$t,isRoot:zt})}}}hostAndRootPropertiesForScope(Wt,Bt){let jt={},Kt={},Gt=this,Vt=Bt&&Bt.__cssBuild;return ue(Bt,function(Xt){Gt.whenHostOrRootRule(Wt,Xt,Vt,function(Yt){let zt=Wt._element||Wt;gt.call(zt,Yt.selector)&&(Yt.isHost?Gt.collectProperties(Xt,jt):Gt.collectProperties(Xt,Kt))})},null,!0),{rootProps:Kt,hostProps:jt}}transformStyles(Wt,Bt,jt){let Kt=this,{is:Gt,typeExtension:Vt}=Ne(Wt),Xt=_t._calcHostScope(Gt,Vt),Yt=Wt.extends?'\\'+Xt.slice(0,-1)+'\\]':Xt,zt=new RegExp('(?:^|[^.#[:])'+Yt+'($|[.:[\\s>+~])'),$t=mt.get(Wt).styleRules,Zt=this._elementKeyframeTransforms(Wt,$t,jt);return _t.elementStyles(Wt,$t,function(Qt){Kt.applyProperties(Qt,Bt),He||he(Qt)||!Qt.cssText||(Kt.applyKeyframeTransforms(Qt,Zt),Kt._scopeSelector(Qt,zt,Xt,jt))})}_elementKeyframeTransforms(Wt,Bt,jt){let Kt=Bt._keyframes,Gt={};if(!He&&Kt)for(let Vt=0,Xt=Kt[Vt];Vt=Xt._useCount&&Xt.parentNode&&Xt.parentNode.removeChild(Xt)),He?Vt.customStyle?(Vt.customStyle.textContent=Gt,Kt=Vt.customStyle):Gt&&(Kt=_e(Gt,jt,Wt.shadowRoot,Vt.placeholder)):Kt?!Kt.parentNode&&ye(Kt,null,Vt.placeholder):Gt&&(Kt=_e(Gt,jt,null,Vt.placeholder)),Kt&&(Kt._useCount=Kt._useCount||0,Vt.customStyle!=Kt&&Kt._useCount++,Vt.customStyle=Kt),ft&&(Kt.textContent=Kt.textContent),Kt}applyCustomStyle(Wt,Bt){let jt=pe(Wt),Kt=this;Wt.textContent=ie(jt,function(Gt){let Vt=Gt.cssText=Gt.parsedCssText;Gt.propertyInfo&&Gt.propertyInfo.cssText&&(Vt=le(Vt),Gt.cssText=Kt.valueForProperties(Vt,Bt))})}}var Nt=new bt;let Ct={};const Et=window.customElements;if(Et&&!He){const Wt=Et.define;Et.define=(jt,Kt,Gt)=>{return Ct[jt]=ge(jt),Wt.call(Et,jt,Kt,Gt)}}let Pt=function(){};if(!He){let Wt=Vt=>{return Vt.classList&&!Vt.classList.contains(_t.SCOPE_NAME)||Vt instanceof window.SVGElement&&(!Vt.hasAttribute('class')||0>Vt.getAttribute('class').indexOf(_t.SCOPE_NAME))},Bt=Vt=>{for(let Yt,Xt=0;Xt{jt.observe(Vt,{childList:!0,subtree:!0})},Gt=window.customElements&&!window.customElements.flush;if(Gt)Kt(document);else{let Vt=()=>{Kt(document.body)};window.HTMLImports?window.HTMLImports.whenReady(Vt):requestAnimationFrame(function(){if('loading'===document.readyState){let Xt=function(){Vt(),document.removeEventListener('readystatechange',Xt)};document.addEventListener('readystatechange',Xt)}else Vt()})}Pt=function(){Bt(jt.takeRecords())}}const Tt={},Rt=Promise.resolve();let At=null,xt=window.HTMLImports&&window.HTMLImports.whenReady||null,It;const Ot='__processedByShadyCSS',Mt='__seenByShadyCSS';let Dt=null,wt=null;class Lt{constructor(){this.customStyles=[],this.enqueued=!1}enqueueDocumentValidation(){this.enqueued||!wt||(this.enqueued=!0,Ae(wt))}addCustomStyle(Wt){Wt[Mt]||(Wt[Mt]=!0,this.customStyles.push(Wt),this.enqueueDocumentValidation())}getStyleForCustomStyle(Wt){let Bt;return Bt=Wt.getStyle?Wt.getStyle():Wt,Bt}processStyles(){let Wt=this.customStyles;for(let jt,Bt=0;Btthis.typeMax&&Gt.shift(),this.cache[Wt]=Gt}fetch(Wt,Bt,jt){let Kt=this.cache[Wt];if(Kt)for(let Vt,Gt=Kt.length-1;0<=Gt;Gt--)if(Vt=Kt[Gt],this._validate(Vt,Bt,jt))return Vt}};class Ft{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement;let Wt=new Ie;Wt.rules=[],this._documentOwnerStyleInfo=mt.set(this._documentOwner,new mt(Wt)),this._elementsHaveApplied=!1,this._applyShim=null,this._customStyleInterface=null,Ae(()=>{this._ensure()})}flush(){Pt()}_generateScopeSelector(Wt){let Bt=this._scopeCounter[Wt]=(this._scopeCounter[Wt]||0)+1;return`${Wt}-${Bt}`}getStyleAst(Wt){return pe(Wt)}styleAstToString(Wt){return ie(Wt)}_gatherStyles(Wt){let Bt=Wt.content.querySelectorAll('style'),jt=[];for(let Gt,Kt=0;Kt{this.transformCustomStyleForDocument(Wt)},this._customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{(this._customStyleInterface.enqueued||this._elementsHaveApplied)&&this.flushCustomStyles()})}):this._customStyleInterface={['processStyles'](){},enqueued:!1,['getStyleForCustomStyle'](){return null}})}_ensure(){this._ensureApplyShim(),this._ensureCustomStyleInterface()}flushCustomStyles(){this._ensure();let Wt=this._customStyleInterface.processStyles();this._customStyleInterface.enqueued&&(Ue?this._revalidateCustomStyleApplyShim(Wt):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles(Wt)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!Ue&&this.styleDocument())}styleElement(Wt,Bt){let{is:jt}=Ne(Wt),Kt=mt.get(Wt);if(Kt||(Kt=this._prepareHost(Wt)),this._isRootOwner(Wt)||(this._elementsHaveApplied=!0),Bt&&(Kt.overrideStyleProperties=Kt.overrideStyleProperties||{},Object.assign(Kt.overrideStyleProperties,Bt)),!Ue)this._updateProperties(Wt,Kt),Kt.ownStylePropertyNames&&Kt.ownStylePropertyNames.length&&this._applyStyleProperties(Wt,Kt);else{Kt.overrideStyleProperties&&xe(Wt,Kt.overrideStyleProperties);let Gt=Tt[jt];if(!Gt&&!this._isRootOwner(Wt))return;if(Gt&&Gt._style&&!Pe(Gt)){if(Te(Gt)||(this._ensure(),this._applyShim.transformRules(Gt._styleAst,jt),Gt._style.textContent=_t.elementStyles(Wt,Kt.styleRules),Re(Gt)),He){let Vt=Wt.shadowRoot;if(Vt){let Xt=Vt.querySelector('style');Xt.textContent=_t.elementStyles(Wt,Kt.styleRules)}}Kt.styleRules=Gt._styleAst}}}_styleOwnerForNode(Wt){let Bt=Wt.getRootNode(),jt=Bt.host;return jt?mt.get(jt)?jt:this._styleOwnerForNode(jt):this._documentOwner}_isRootOwner(Wt){return Wt===this._documentOwner}_applyStyleProperties(Wt,Bt){let jt=Ne(Wt).is,Kt=kt.fetch(jt,Bt.styleProperties,Bt.ownStylePropertyNames),Gt=Kt&&Kt.scopeSelector,Vt=Kt?Kt.styleElement:null,Xt=Bt.scopeSelector;Bt.scopeSelector=Gt||this._generateScopeSelector(jt);let Yt=Nt.applyElementStyle(Wt,Bt.styleProperties,Bt.scopeSelector,Vt);return He||Nt.applyElementScopeSelector(Wt,Bt.scopeSelector,Xt),Kt||kt.store(jt,Bt.styleProperties,Yt,Bt.scopeSelector),Yt}_updateProperties(Wt,Bt){let jt=this._styleOwnerForNode(Wt),Kt=mt.get(jt),Gt=Kt.styleProperties,Vt=Object.create(Gt||null),Xt=Nt.hostAndRootPropertiesForScope(Wt,Bt.styleRules),Yt=Nt.propertyDataFromStyles(Kt.styleRules,Wt),zt=Yt.properties;Object.assign(Vt,Xt.hostProps,zt,Xt.rootProps),this._mixinOverrideStyles(Vt,Bt.overrideStyleProperties),Nt.reify(Vt),Bt.styleProperties=Vt}_mixinOverrideStyles(Wt,Bt){for(let jt in Bt){let Kt=Bt[jt];(Kt||0===Kt)&&(Wt[jt]=Kt)}}styleDocument(Wt){this.styleSubtree(this._documentOwner,Wt)}styleSubtree(Wt,Bt){let jt=Wt.shadowRoot;(jt||this._isRootOwner(Wt))&&this.styleElement(Wt,Bt);let Kt=jt&&(jt.children||jt.childNodes);if(Kt)for(let Vt,Gt=0;Gt{He?_t.normalizeRootSelector(jt):_t.documentRule(jt),Ue&&(this._ensure(),this._applyShim.transformRule(jt))}),Ue?Wt.textContent=ie(Bt):this._documentOwnerStyleInfo.styleRules.rules.push(Bt)}_revalidateApplyShim(Wt){if(Ue){let Bt=pe(Wt);this._ensure(),this._applyShim.transformRules(Bt),Wt.textContent=ie(Bt)}}getComputedStyleValue(Wt,Bt){let jt;if(!Ue){let Kt=mt.get(Wt)||mt.get(this._styleOwnerForNode(Wt));jt=Kt.styleProperties[Bt]}return jt=jt||window.getComputedStyle(Wt).getPropertyValue(Bt),jt.trim()}setElementClass(Wt,Bt){let jt=Wt.getRootNode(),Kt=Bt?Bt.split(/\s/):[],Gt=jt.host&&jt.host.localName;if(!Gt){var Vt=Wt.getAttribute('class');if(Vt){let Xt=Vt.split(/\s/);for(let Yt=0;Yt {\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 }\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 this.processImportsIfLoadingDone();\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 //