diff --git a/README.md b/README.md index 8286349..7cad9ac 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ bundle, using feature detection. The bundles that can be loaded are: - `webcomponents-hi` -- HTML Imports (needed by Safari Tech Preview) - `webcomponents-hi-ce` -- HTML Imports and Custom Elements (needed by Safari 10) - `webcomponents-hi-ce-sd` -- HTML Imports, Custom Elements and Shady DOM/CSS (needed by Safari 9, Firefox, Edge) - - `webcomponents-lite` -- HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as URL, Template, ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11) + - `webcomponents-lite` -- HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as Template, ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11) ## Browser Support diff --git a/bower.json b/bower.json index 9bd65e2..ad87689 100644 --- a/bower.json +++ b/bower.json @@ -23,7 +23,6 @@ "shadydom": "webcomponents/shadydom#master", "shadycss": "webcomponents/shadycss#master", "template": "webcomponents/template#master", - "URL": "webcomponents/URL#master", "webcomponents-platform": "webcomponents/webcomponents-platform#master" } } diff --git a/entrypoints/webcomponents-hi-sd-ce-pf-index.js b/entrypoints/webcomponents-hi-sd-ce-pf-index.js index 4d15b57..4880962 100644 --- a/entrypoints/webcomponents-hi-sd-ce-pf-index.js +++ b/entrypoints/webcomponents-hi-sd-ce-pf-index.js @@ -10,12 +10,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN 'use strict'; /* - * Polyfills loaded: HTML Imports, Custom Elements, Shady DOM/Shady CSS, platform polyfills (URL/template) + * Polyfills loaded: HTML Imports, Custom Elements, Shady DOM/Shady CSS, platform polyfills, template * Used in: IE 11 */ import '../bower_components/webcomponents-platform/webcomponents-platform.js' -import '../bower_components/URL/url.js' import '../bower_components/template/template.js' import '../bower_components/es6-promise/dist/es6-promise.auto.min.js' import '../bower_components/html-imports/src/html-imports.js' diff --git a/webcomponents-debug.js b/webcomponents-debug.js index 74e13c0..7b245e9 100644 --- a/webcomponents-debug.js +++ b/webcomponents-debug.js @@ -51,7 +51,6 @@ // construct full dependency list var modules = [ '../../webcomponents-platform/webcomponents-platform.js', - '../../URL/url.js', '../../template/template.js', '../../es6-promise/dist/es6-promise.auto.min.js', '../../html-imports/src/html-imports.js', diff --git a/webcomponents-lite.js b/webcomponents-lite.js index 0d4a9a7..ecbe1f6 100644 --- a/webcomponents-lite.js +++ b/webcomponents-lite.js @@ -1,6 +1,6 @@ -(function(){'use strict';function ee($t){return $t=te($t),re(oe($t),$t)}function te($t){return $t.replace(ke.comments,'').replace(ke.port,'')}function oe($t){let Zt=new Me;Zt.start=0,Zt.end=$t.length;let Qt=Zt;for(let eo=0,to=$t.length;eo{Ht=Zt}),'complete'===document.readyState?Ht():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&Ht()})),qt.then(function(){$t&&$t()}))}function we($t,Zt){for(let Qt in Zt)null===Qt?$t.style.removeProperty(Qt):$t.style.setProperty(Qt,Zt[Qt])}(function(){'use strict';var Zt=function(){var so=document.createEvent('Event');return so.initEvent('foo',!0,!0),so.preventDefault(),so.defaultPrevented}();if(!Zt){var Qt=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(Qt.call(this),Object.defineProperty(this,'defaultPrevented',{get:function(){return!0},configurable:!0}))}}var eo=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||eo&&'function'!=typeof window.CustomEvent)&&(window.CustomEvent=function(so,ao){ao=ao||{};var lo=document.createEvent('CustomEvent');return lo.initCustomEvent(so,!!ao.bubbles,!!ao.cancelable,ao.detail),lo},window.CustomEvent.prototype=window.Event.prototype),!window.Event||eo&&'function'!=typeof window.Event){var to=window.Event;if(window.Event=function(so,ao){ao=ao||{};var lo=document.createEvent('Event');return lo.initEvent(so,!!ao.bubbles,!!ao.cancelable),lo},to)for(var oo in to)window.Event[oo]=to[oo];window.Event.prototype=to.prototype}if(!window.MouseEvent||eo&&'function'!=typeof window.MouseEvent){var ro=window.MouseEvent;if(window.MouseEvent=function(so,ao){ao=ao||{};var lo=document.createEvent('MouseEvent');return lo.initMouseEvent(so,!!ao.bubbles,!!ao.cancelable,ao.view||window,ao.detail,ao.screenX,ao.screenY,ao.clientX,ao.clientY,ao.ctrlKey,ao.altKey,ao.shiftKey,ao.metaKey,ao.button,ao.relatedTarget),lo},ro)for(var oo in ro)window.MouseEvent[oo]=ro[oo];window.MouseEvent.prototype=ro.prototype}if(Array.from||(Array.from=function(so){return[].slice.call(so)}),!Object.assign){var no=function(so,ao){for(var po,lo=Object.getOwnPropertyNames(ao),io=0;ioyo&&-1==[34,35,60,62,63,96].indexOf(yo)?mo:encodeURIComponent(mo)}function oo(mo){var yo=mo.charCodeAt(0);return 32yo&&-1==[34,35,60,62,96].indexOf(yo)?mo:encodeURIComponent(mo)}function ro(mo,yo,fo){function go(Oo){No.push(Oo)}var So=yo||'scheme start',bo=0,Eo='',vo=!1,Co=!1,No=[];loop:for(;(mo[bo-1]!=co||0==bo)&&!this._isInvalid;){var Po=mo[bo];switch(So){case'scheme start':if(Po&&ho.test(Po))Eo+=Po.toLowerCase(),So='scheme';else if(!yo){Eo='',So='no scheme';continue}else{go('Invalid scheme.');break loop}break;case'scheme':if(Po&&uo.test(Po))Eo+=Po.toLowerCase();else if(':'==Po){if(this._scheme=Eo,Eo='',yo)break loop;Zt(this._scheme)&&(this._isRelative=!0),So='file'==this._scheme?'relative':this._isRelative&&fo&&fo._scheme==this._scheme?'relative or authority':this._isRelative?'authority first slash':'scheme data'}else if(!yo){Eo='',bo=0,So='no scheme';continue}else if(co==Po)break loop;else{go('Code point not allowed in scheme: '+Po);break loop}break;case'scheme data':'?'==Po?(this._query='?',So='query'):'#'==Po?(this._fragment='#',So='fragment'):co!=Po&&'\t'!=Po&&'\n'!=Po&&'\r'!=Po&&(this._schemeData+=to(Po));break;case'no scheme':if(!fo||!Zt(fo._scheme))go('Missing scheme.'),Qt.call(this);else{So='relative';continue}break;case'relative or authority':if('/'==Po&&'/'==mo[bo+1])So='authority ignore slashes';else{go('Expected /, got: '+Po),So='relative';continue}break;case'relative':if(this._isRelative=!0,'file'!=this._scheme&&(this._scheme=fo._scheme),co==Po){this._host=fo._host,this._port=fo._port,this._path=fo._path.slice(),this._query=fo._query,this._username=fo._username,this._password=fo._password;break loop}else if('/'==Po||'\\'==Po)'\\'==Po&&go('\\ is an invalid code point.'),So='relative slash';else if('?'==Po)this._host=fo._host,this._port=fo._port,this._path=fo._path.slice(),this._query='?',this._username=fo._username,this._password=fo._password,So='query';else if('#'==Po)this._host=fo._host,this._port=fo._port,this._path=fo._path.slice(),this._query=fo._query,this._fragment='#',this._username=fo._username,this._password=fo._password,So='fragment';else{var Ro=mo[bo+1],Ao=mo[bo+2];'file'==this._scheme&&ho.test(Po)&&(':'==Ro||'|'==Ro)&&(co==Ao||'/'==Ao||'\\'==Ao||'?'==Ao||'#'==Ao)||(this._host=fo._host,this._port=fo._port,this._username=fo._username,this._password=fo._password,this._path=fo._path.slice(),this._path.pop()),So='relative path';continue}break;case'relative slash':if('/'==Po||'\\'==Po)'\\'==Po&&go('\\ is an invalid code point.'),So='file'==this._scheme?'file host':'authority ignore slashes';else{'file'!=this._scheme&&(this._host=fo._host,this._port=fo._port,this._username=fo._username,this._password=fo._password),So='relative path';continue}break;case'authority first slash':if('/'==Po)So='authority second slash';else{go('Expected \'/\', got: '+Po),So='authority ignore slashes';continue}break;case'authority second slash':if(So='authority ignore slashes','/'!=Po){go('Expected \'/\', got: '+Po);continue}break;case'authority ignore slashes':if('/'!=Po&&'\\'!=Po){So='authority';continue}else go('Expected authority, got: '+Po);break;case'authority':if('@'==Po){vo&&(go('@ already seen.'),Eo+='%40'),vo=!0;for(var xo,To=0;To'===_o?'>':'\xA0'===_o?' ':void 0}function uo(_o){return _o.replace(po,ho)}var no=document.implementation.createHTMLDocument('template'),so=!0,ao=document.createElement('style');ao.textContent=oo+'{display:none;}';var lo=document.head;lo.insertBefore(ao,lo.firstElementChild),ro.prototype=Object.create(HTMLElement.prototype);var io=!document.createElement('div').hasOwnProperty('innerHTML');ro.decorate=function(_o){if(!_o.content){_o.content=no.createDocumentFragment();for(var mo;mo=_o.firstChild;)_o.content.appendChild(mo);if(io)_o.__proto__=ro.prototype;else if(_o.cloneNode=function(yo){return ro._cloneNode(this,yo)},so)try{co(_o)}catch(yo){so=!1}ro.bootstrap(_o.content)}},co(ro.prototype),ro.bootstrap=function(_o){for(var go,mo=_o.querySelectorAll(oo),yo=0,fo=mo.length;yo]/g}($t||to)&&(ro._cloneNode=function(co,ho){var uo=Zt.call(co,!1);return this.decorate&&this.decorate(uo),ho&&(uo.content.appendChild(Zt.call(co.content,!0)),this.fixClonedDom(uo.content,co.content)),uo},ro.prototype.cloneNode=function(co){return ro._cloneNode(this,co)},ro.fixClonedDom=function(co,ho){if(ho.querySelectorAll)for(var fo,go,uo=ho.querySelectorAll(oo),_o=co.querySelectorAll(oo),mo=0,yo=_o.length;mo{const Zt=!!('import'in document.createElement('link'));let Qt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return Qt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const eo=/(^\/)|(^#)|(^[\w-\d]*:)/,to=/(url\()([^)]*)(\))/g,oo=/(@import[\s]+(?!url\())([^;]*)(;)/g,ro=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,no={fixUrls(No,Po){No.href&&No.setAttribute('href',no.replaceAttrUrl(No.getAttribute('href'),Po)),No.src&&No.setAttribute('src',no.replaceAttrUrl(No.getAttribute('src'),Po)),'style'===No.localName&&no.resolveUrlsInStyle(No,Po)},fixUrlAttributes(No,Po){const Ro=['action','src','href','url','style'];for(let To,Ao=0;AoIo.search(/({{|\[\[)/)&&(xo.value='style'===To?no.resolveUrlsInCssText(Io,Po):no.replaceAttrUrl(Io,Po))}},fixUrlsInTemplates(No,Po){const Ro=No.querySelectorAll('template');for(let Ao=0;Ao{let wo=xo.replace(/["']/g,'');return Po&&(wo=no.resolveUrl(wo,Po)),To+'\''+wo+'\''+Io})},replaceAttrUrl(No,Po){return No&&eo.test(No)?No:no.resolveUrl(No,Po)},resolveUrl(No,Po){if(void 0===no.__workingURL){no.__workingURL=!1;try{const Ao=new URL('b','http://a');Ao.pathname='c%20d',no.__workingURL='http://a/c%20d'===Ao.href}catch(Ao){}}if(no.__workingURL)return new URL(No,Po).href;let Ro=no.__tempDoc;return Ro||(Ro=document.implementation.createHTMLDocument('temp'),no.__tempDoc=Ro,Ro.__base=Ro.createElement('base'),Ro.head.appendChild(Ro.__base),Ro.__anchor=Ro.createElement('a')),Ro.__base.href=Po,Ro.__anchor.href=No,Ro.__anchor.href||No}},so={async:!0,load(No,Po,Ro){if(!No)Ro('error: href must be specified');else if(No.match(/^data:/)){const Ao=No.split(','),To=Ao[0];let xo=Ao[1];xo=-1{let To=Ao.getResponseHeader('Location');if(To&&0===To.indexOf('/')){const Io=location.origin||location.protocol+'//'+location.host;To=Io+To}const xo=Ao.response||Ao.responseText;304===Ao.status||0===Ao.status||200<=Ao.status&&300>Ao.status?Po(xo,To):Ro(xo)},Ao.send()}}},ao=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),lo='link[rel=import]',io='import-disable',po=`link[rel=stylesheet][href][type=${io}]`,co=`${lo}, ${po}, +(function(){'use strict';function ee(Jt){return Jt=te(Jt),re(oe(Jt),Jt)}function te(Jt){return Jt.replace(ke.comments,'').replace(ke.port,'')}function oe(Jt){let Zt=new Oe;Zt.start=0,Zt.end=Jt.length;let Qt=Zt;for(let eo=0,to=Jt.length;eo{qt=Zt}),'complete'===document.readyState?qt():document.addEventListener('readystatechange',()=>{'complete'===document.readyState&&qt()})),Ht.then(function(){Jt&&Jt()}))}function De(Jt,Zt){for(let Qt in Zt)null===Qt?Jt.style.removeProperty(Qt):Jt.style.setProperty(Qt,Zt[Qt])}(function(){'use strict';var Zt=function(){var so=document.createEvent('Event');return so.initEvent('foo',!0,!0),so.preventDefault(),so.defaultPrevented}();if(!Zt){var Qt=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(Qt.call(this),Object.defineProperty(this,'defaultPrevented',{get:function(){return!0},configurable:!0}))}}var eo=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||eo&&'function'!=typeof window.CustomEvent)&&(window.CustomEvent=function(so,lo){lo=lo||{};var ao=document.createEvent('CustomEvent');return ao.initCustomEvent(so,!!lo.bubbles,!!lo.cancelable,lo.detail),ao},window.CustomEvent.prototype=window.Event.prototype),!window.Event||eo&&'function'!=typeof window.Event){var to=window.Event;if(window.Event=function(so,lo){lo=lo||{};var ao=document.createEvent('Event');return ao.initEvent(so,!!lo.bubbles,!!lo.cancelable),ao},to)for(var oo in to)window.Event[oo]=to[oo];window.Event.prototype=to.prototype}if(!window.MouseEvent||eo&&'function'!=typeof window.MouseEvent){var ro=window.MouseEvent;if(window.MouseEvent=function(so,lo){lo=lo||{};var ao=document.createEvent('MouseEvent');return ao.initMouseEvent(so,!!lo.bubbles,!!lo.cancelable,lo.view||window,lo.detail,lo.screenX,lo.screenY,lo.clientX,lo.clientY,lo.ctrlKey,lo.altKey,lo.shiftKey,lo.metaKey,lo.button,lo.relatedTarget),ao},ro)for(var oo in ro)window.MouseEvent[oo]=ro[oo];window.MouseEvent.prototype=ro.prototype}if(Array.from||(Array.from=function(so){return[].slice.call(so)}),!Object.assign){var no=function(so,lo){for(var po,ao=Object.getOwnPropertyNames(lo),io=0;io'===_o?'>':'\xA0'===_o?' ':void 0}function ho(_o){return _o.replace(po,uo)}var no=document.implementation.createHTMLDocument('template'),so=!0,lo=document.createElement('style');lo.textContent=oo+'{display:none;}';var ao=document.head;ao.insertBefore(lo,ao.firstElementChild),ro.prototype=Object.create(HTMLElement.prototype);var io=!document.createElement('div').hasOwnProperty('innerHTML');ro.decorate=function(_o){if(!_o.content){_o.content=no.createDocumentFragment();for(var mo;mo=_o.firstChild;)_o.content.appendChild(mo);if(io)_o.__proto__=ro.prototype;else if(_o.cloneNode=function(yo){return ro._cloneNode(this,yo)},so)try{co(_o)}catch(yo){so=!1}ro.bootstrap(_o.content)}},co(ro.prototype),ro.bootstrap=function(_o){for(var fo,mo=_o.querySelectorAll(oo),yo=0,go=mo.length;yo]/g}(Jt||to)&&(ro._cloneNode=function(co,uo){var ho=Zt.call(co,!1);return this.decorate&&this.decorate(ho),uo&&(ho.content.appendChild(Zt.call(co.content,!0)),this.fixClonedDom(ho.content,co.content)),ho},ro.prototype.cloneNode=function(co){return ro._cloneNode(this,co)},ro.fixClonedDom=function(co,uo){if(uo.querySelectorAll)for(var go,fo,ho=uo.querySelectorAll(oo),_o=co.querySelectorAll(oo),mo=0,yo=_o.length;mo{const Zt=!!('import'in document.createElement('link'));let Qt=null;!1=='currentScript'in document&&Object.defineProperty(document,'currentScript',{get(){return Qt||('complete'===document.readyState?null:document.scripts[document.scripts.length-1])},configurable:!0});const eo=/(^\/)|(^#)|(^[\w-\d]*:)/,to=/(url\()([^)]*)(\))/g,oo=/(@import[\s]+(?!url\())([^;]*)(;)/g,ro=/(]*)(rel=['|"]?stylesheet['|"]?[^>]*>)/g,no={fixUrls(vo,Po){vo.href&&vo.setAttribute('href',no.replaceAttrUrl(vo.getAttribute('href'),Po)),vo.src&&vo.setAttribute('src',no.replaceAttrUrl(vo.getAttribute('src'),Po)),'style'===vo.localName&&no.resolveUrlsInStyle(vo,Po)},fixUrlAttributes(vo,Po){const To=['action','src','href','url','style'];for(let Ro,Ao=0;AoMo.search(/({{|\[\[)/)&&(xo.value='style'===Ro?no.resolveUrlsInCssText(Mo,Po):no.replaceAttrUrl(Mo,Po))}},fixUrlsInTemplates(vo,Po){const To=vo.querySelectorAll('template');for(let Ao=0;Ao{let Do=xo.replace(/["']/g,'');return Po&&(Do=no.resolveUrl(Do,Po)),Ro+'\''+Do+'\''+Mo})},replaceAttrUrl(vo,Po){return vo&&eo.test(vo)?vo:no.resolveUrl(vo,Po)},resolveUrl(vo,Po){if(void 0===no.__workingURL){no.__workingURL=!1;try{const Ao=new URL('b','http://a');Ao.pathname='c%20d',no.__workingURL='http://a/c%20d'===Ao.href}catch(Ao){}}if(no.__workingURL)return new URL(vo,Po).href;let To=no.__tempDoc;return To||(To=document.implementation.createHTMLDocument('temp'),no.__tempDoc=To,To.__base=To.createElement('base'),To.head.appendChild(To.__base),To.__anchor=To.createElement('a')),To.__base.href=Po,To.__anchor.href=vo,To.__anchor.href||vo}},so={async:!0,load(vo,Po,To){if(!vo)To('error: href must be specified');else if(vo.match(/^data:/)){const Ao=vo.split(','),Ro=Ao[0];let xo=Ao[1];xo=-1{let Ro=Ao.getResponseHeader('Location');if(Ro&&0===Ro.indexOf('/')){const Mo=location.origin||location.protocol+'//'+location.host;Ro=Mo+Ro}const xo=Ao.response||Ao.responseText;304===Ao.status||0===Ao.status||200<=Ao.status&&300>Ao.status?Po(xo,Ro):To(xo)},Ao.send()}}},lo=/Trident/.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent),ao='link[rel=import]',io='import-disable',po=`link[rel=stylesheet][href][type=${io}]`,co=`${ao}, ${po}, style:not([type]), link[rel=stylesheet][href]:not([type]), script:not([type]), script[type="application/javascript"], - script[type="text/javascript"]`,ho='import-dependency',uo=`${lo}:not(${ho})`,_o=`script[${ho}]`,mo=`style[${ho}], - link[rel=stylesheet][${ho}]`;const fo=No=>{return No.nodeType===Node.ELEMENT_NODE&&'link'===No.localName&&'import'===No.rel},go=(No,Po)=>{if(No.__loaded)Po&&Po();else if('script'===No.localName&&!No.src)No.__loaded=!0,Po&&Po();else{const Ro=Ao=>{No.removeEventListener(Ao.type,Ro),No.__loaded=!0,Po&&Po()};No.addEventListener('load',Ro),ao&&'style'===No.localName||No.addEventListener('error',Ro)}},So=No=>{bo(()=>Eo(()=>No&&No()))},bo=No=>{if('loading'!==document.readyState)No();else{const Po=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',Po),No())};document.addEventListener('readystatechange',Po)}},Eo=No=>{let Po=document.querySelectorAll(uo),Ro=Po.length;if(!Ro)return void No();for(let xo,Ao=0,To=Po.length;Ao{0==--Ro&&No()})},vo=No=>{if(Zt)return No.ownerDocument===document?null:No.ownerDocument;let Po=No.__importDoc;if(!Po&&No.parentNode){if(Po=No.parentNode,'function'==typeof Po.closest)Po=Po.closest(lo);else for(;!fo(Po)&&(Po=Po.parentNode););No.__importDoc=Po}return Po},Co=(No,Po)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(No,Po);const Ro=document.createEvent('CustomEvent');return Ro.initCustomEvent(No,!!Po.bubbles,!!Po.cancelable,Po.detail),Ro};if(Zt){const No=document.querySelectorAll(lo);for(let To,Ro=0,Ao=No.length;Ro{const Ao=Ro.target;fo(Ao)&&(Ao.__loaded=!0)};document.addEventListener('load',Po,!0),document.addEventListener('error',Po,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(No=>this.handleMutations(No)),bo(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(No){const Po=No.querySelectorAll(lo);for(let Ro=0,Ao=Po.length;Ro{const To=this.makeDocument(Ro,Ao||Po);this.documents[Po]=To,this.inflight--,this.loadImports(To),this.processImportsIfLoadingDone()},()=>{this.documents[Po]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(No,Po){if(!No)return document.createDocumentFragment();ao&&(No=No.replace(ro,(wo,Mo,Oo)=>{return-1===wo.indexOf('type=')?`${Mo} type=${io} ${Oo}`:wo}));let Ro;const Ao=document.createElement('template');if(Ao.innerHTML=No,Ao.content)Ro=Ao.content;else for(Ro=document.createDocumentFragment();Ao.firstChild;)Ro.appendChild(Ao.firstChild);const To=Ro.querySelector('base');To&&(Po=no.replaceAttrUrl(To.getAttribute('href'),Po),To.removeAttribute('href'));const xo=Ro.querySelectorAll(co);let Io=0;for(let Oo,wo=0,Mo=xo.length;wo{Po&&No&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{Po=!0,Ro()}),this.runScripts(()=>{No=!0,Ro()})}}flatten(No){const Po=No.querySelectorAll(lo);for(let To,Ro=0,Ao=Po.length;RoTo.href,configurable:!0,enumerable:!0}),this.flatten(xo),To.appendChild(xo))}}runScripts(No){const Po=document.querySelectorAll(_o),Ro=Po.length,Ao=To=>{if(To{Qt=null,Ao(To+1)})}else No()};Ao(0)}waitForStyles(No){const Po=document.querySelectorAll(mo);let Ro=Po.length;if(!Ro)return void No();const Ao=ao&&!!document.querySelector(po);for(let Io,To=0,xo=Po.length;To{Io.removeAttribute(ho),0==--Ro&&No()}),Ao&&Io.parentNode!==document.head){const wo=document.createElement(Io.localName);wo.__appliedElement=Io,wo.setAttribute('type','import-placeholder'),Io.parentNode.insertBefore(wo,Io.nextSibling);let Mo=vo(Io);for(;Mo&&vo(Mo);)Mo=vo(Mo);Mo.parentNode!==document.head&&(Mo=null),document.head.insertBefore(Io,Mo),Io.removeAttribute('type')}}fireEvents(){const No=document.querySelectorAll(lo);for(let Ro,Po=No.length-1;0<=Po&&(Ro=No[Po]);Po--)this.fireEventIfNeeded(Ro)}fireEventIfNeeded(No){if(!No.__loaded){No.__loaded=!0,No.import&&(No.import.readyState='complete');const Po=No.import?'load':'error';No.dispatchEvent(Co(Po,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(No){for(let Po=0;Podocument.dispatchEvent(Co('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),$t.useNative=Zt,$t.whenReady=So,$t.importForElement=vo})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';window.WebComponents=window.WebComponents||{flags:{}};var Zt=document.querySelector('script[src*="'+'webcomponents-lite.js'+'"]'),Qt={};if(!Qt.noOpts){if(location.search.slice(1).split('&').forEach(function(ao){var io,lo=ao.split('=');lo[0]&&(io=lo[0].match(/wc-(.+)/))&&(Qt[io[1]]=lo[1]||!0)}),Zt)for(var to,eo=0;to=Zt.attributes[eo];eo++)'src'!==to.name&&(Qt[to.name]=to.value||!0);if(Qt.log&&Qt.log.split){var oo=Qt.log.split(',');Qt.log={},oo.forEach(function(ao){Qt.log[ao]=!0})}else Qt.log={}}WebComponents.flags=Qt;var ro=window.WebComponents,no=ro.flags.shadydom;no&&(window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=no);var so=ro.flags.register||ro.flags.ce;so&&window.customElements&&(customElements.forcePolyfill=so)}(),function(){'use strict';function $t(jr,Br,Kr){return{index:jr,removed:Br,addedCount:Kr}}function Zt(jr){return'ShadyRoot'===jr.__localName}function Qt(jr,Br){if(jr&&Br)for(var Yr,Kr=Object.getOwnPropertyNames(Br),Gr=0;Gr'===jr?'>':'"'===jr?'"':'\xA0'===jr?' ':void 0}function ro(jr){for(var Br={},Kr=0;Kr';case Node.TEXT_NODE:return jr=jr.data,Br&&$o[Br.localName]?jr:jr.replace(zo,oo);case Node.COMMENT_NODE:return'';default:throw window.console.error(jr),Error('not implemented');}}function so(jr,Br){'template'===jr.localName&&(jr=jr.content);for(var Xr,Kr='',Gr=Br?Br(jr):jr.childNodes,Yr=0,Vr=Gr.length;Yr]/g,Jo=ro('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),$o=ro('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Vo.getOuterHTML=no,Vo.getInnerHTML=so;var Zo={},Qo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),er=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Zo.parentNode=function(jr){return Qo.currentNode=jr,Qo.parentNode()},Zo.firstChild=function(jr){return Qo.currentNode=jr,Qo.firstChild()},Zo.lastChild=function(jr){return Qo.currentNode=jr,Qo.lastChild()},Zo.previousSibling=function(jr){return Qo.currentNode=jr,Qo.previousSibling()},Zo.nextSibling=function(jr){return Qo.currentNode=jr,Qo.nextSibling()},Zo.childNodes=ao,Zo.parentElement=function(jr){return er.currentNode=jr,er.parentNode()},Zo.firstElementChild=function(jr){return er.currentNode=jr,er.firstChild()},Zo.lastElementChild=function(jr){return er.currentNode=jr,er.lastChild()},Zo.previousElementSibling=function(jr){return er.currentNode=jr,er.previousSibling()},Zo.nextElementSibling=function(jr){return er.currentNode=jr,er.nextSibling()},Zo.children=function(jr){var Br=[];for(er.currentNode=jr,jr=er.firstChild();jr;)Br.push(jr),jr=er.nextSibling();return Br},Zo.innerHTML=function(jr){return Vo.getInnerHTML(jr,function(Br){return ao(Br)})},Zo.textContent=function(jr){if(jr.nodeType!==Node.ELEMENT_NODE)return jr.nodeValue;jr=document.createTreeWalker(jr,NodeFilter.SHOW_TEXT,null,!1);for(var Kr,Br='';Kr=jr.nextNode();)Br+=Kr.nodeValue;return Br};var tr={},or=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),rr=document.implementation.createHTMLDocument('inert').createElement('div'),nr=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),sr={parentElement:lo('parentElement'),parentNode:lo('parentNode'),nextSibling:lo('nextSibling'),previousSibling:lo('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(jr){this.setAttribute('class',jr)},configurable:!0},nextElementSibling:{get:function(){if(Yo.hasProperty(this,'nextSibling')){for(var jr=this.nextSibling;jr&&jr.nodeType!==Node.ELEMENT_NODE;)jr=jr.nextSibling;return jr}return Zo.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(Yo.hasProperty(this,'previousSibling')){for(var jr=this.previousSibling;jr&&jr.nodeType!==Node.ELEMENT_NODE;)jr=jr.previousSibling;return jr}return Zo.previousElementSibling(this)},configurable:!0}},ar={childNodes:{get:function(){if(Yo.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var jr=this.firstChild;jr;jr=jr.nextSibling)this.__shady.childNodes.push(jr)}return this.__shady.childNodes}return Zo.childNodes(this)},configurable:!0},firstChild:lo('firstChild'),lastChild:lo('lastChild'),textContent:{get:function(){if(Yo.hasProperty(this,'firstChild')){for(var Gr,jr=[],Br=0,Kr=this.childNodes;Gr=Kr[Br];Br++)Gr.nodeType!==Node.COMMENT_NODE&&jr.push(Gr.textContent);return jr.join('')}return Zo.textContent(this)},set:function(jr){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=jr;else{for(;this.firstChild;)this.removeChild(this.firstChild);jr&&this.appendChild(document.createTextNode(jr))}},configurable:!0},firstElementChild:{get:function(){if(Yo.hasProperty(this,'firstChild')){for(var jr=this.firstChild;jr&&jr.nodeType!==Node.ELEMENT_NODE;)jr=jr.nextSibling;return jr}return Zo.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(Yo.hasProperty(this,'lastChild')){for(var jr=this.lastChild;jr&&jr.nodeType!==Node.ELEMENT_NODE;)jr=jr.previousSibling;return jr}return Zo.lastElementChild(this)},configurable:!0},children:{get:function(){return Yo.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(jr){return jr.nodeType===Node.ELEMENT_NODE}):Zo.children(this)},configurable:!0},innerHTML:{get:function(){var jr='template'===this.localName?this.content:this;return Yo.hasProperty(this,'firstChild')?Vo.getInnerHTML(jr):Zo.innerHTML(jr)},set:function(jr){for(var Br='template'===this.localName?this.content:this;Br.firstChild;)Br.removeChild(Br.firstChild);for(or&&or.set?or.set.call(rr,jr):rr.innerHTML=jr;rr.firstChild;)Br.appendChild(rr.firstChild)},configurable:!0}},lr={shadowRoot:{get:function(){return this.shadyRoot},set:function(jr){this.shadyRoot=jr},configurable:!0}},ir={activeElement:{get:function(){var jr;if(jr=nr&&nr.get?nr.get.call(document):Lo.settings.hasDescriptors?void 0:document.activeElement,jr&&jr.nodeType){var Br=!!Lo.isShadyRoot(this);if(this===document||Br&&this.host!==jr&&this.host.contains(jr)){for(Br=Lo.ownerShadyRootForNode(jr);Br&&Br!==this;)jr=Br.host,Br=Lo.ownerShadyRootForNode(jr);jr=this===document?Br?null:jr:Br===this?jr:null}else jr=null}else jr=null;return jr},set:function(){},configurable:!0}},dr=Lo.settings.hasDescriptors?function(){}:function(jr){jr.__shady&&jr.__shady.__outsideAccessors||(jr.__shady=jr.__shady||{},jr.__shady.__outsideAccessors=!0,io(jr,sr,!0))},pr=Lo.settings.hasDescriptors?function(){}:function(jr){jr.__shady&&jr.__shady.__insideAccessors||(jr.__shady=jr.__shady||{},jr.__shady.__insideAccessors=!0,io(jr,ar,!0),io(jr,lr,!0))};tr.ShadowRootAccessor=lr,tr.ActiveElementAccessor=ir,tr.patchAccessors=function(jr){io(jr,sr),io(jr,ar),io(jr,ir)},tr.patchShadowRootAccessors=function(jr){io(jr,ar,!0),io(jr,ir,!0)},tr.patchOutsideElementAccessors=dr,tr.patchInsideElementAccessors=pr;var cr={};cr.recordInsertBefore=function(jr,Br,Kr){if(tr.patchInsideElementAccessors(Br),Br.__shady=Br.__shady||{},Yo.hasProperty(Br,'firstChild')&&(Br.__shady.childNodes=null),jr.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var Gr=jr.childNodes,Yr=0;Yr`:${oo}(${ro.replace(/\s/g,'')})`),$t=$t.replace(yt,`${ht} $1`),$t=$t.replace(pt,(to,oo,ro)=>{if(!eo){let no=this._transformCompoundSelector(ro,oo,Zt,Qt);eo=eo||no.stop,oo=no.combinator,ro=no.value}return oo+ro}),$t}_transformCompoundSelector($t,Zt,Qt,eo){let to=$t.indexOf(mt);0<=$t.indexOf(ht)?$t=this._transformHostSelector($t,eo):0!==to&&($t=Qt?this._transformSimpleSelector($t,Qt):$t);let oo=!1;0<=to&&(Zt='',oo=!0);let ro;return oo&&(ro=!0,oo&&($t=$t.replace(gt,(no,so)=>` > ${so}`))),$t=$t.replace(St,(no,so,ao)=>`[dir="${ao}"] ${so}, ${so}[dir="${ao}"]`),{value:$t,combinator:Zt,stop:ro}}_transformSimpleSelector($t,Zt){let Qt=$t.split(Et);return Qt[0]+=Zt,Qt.join(Et)}_transformHostSelector($t,Zt){let Qt=$t.match(ft),eo=Qt&&Qt[2].trim()||'';if(eo){if(!eo[0].match(ct)){let to=eo.split(ct)[0];return to===Zt?eo:'should_not_match'}return $t.replace(ft,function(to,oo,ro){return Zt+ro})}return $t.replace(ht,Zt)}documentRule($t){$t.selector=$t.parsedSelector,this.normalizeRootSelector($t),this._transformRule($t,this._transformDocumentSelector)}normalizeRootSelector($t){$t.selector===':root'&&($t.selector='html')}_transformDocumentSelector($t){return $t.match(mt)?this._transformComplexSelector($t,lt):this._transformSimpleSelector($t.trim(),lt)}}let Qe=/:(nth[-\w]+)\(([^)]+)\)/,lt=`:not(.${$e})`,dt=',',pt=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,ct=/[[.:#*]/,ht=':host',mt='::slotted',yt=/^(::slotted)/,ft=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,gt=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,St=/(.*):dir\((?:(ltr|rtl))\)/,Et=':';var Nt=new Ze;const Pt='__styleInfo';class Rt{static get($t){return $t?$t[Pt]:null}static set($t,Zt){return $t[Pt]=Zt,Zt}constructor($t,Zt,Qt,eo,to,oo){this.styleRules=$t||null,this.placeholder=Zt||null,this.ownStylePropertyNames=Qt||[],this.overrideStyleProperties=null,this.elementName=eo||'',this.cssBuild=oo||'',this.typeExtension=to||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}_getStyleRules(){return this.styleRules}}Rt.prototype._getStyleRules=Rt.prototype._getStyleRules;const At=($t=>$t.matches||$t.matchesSelector||$t.mozMatchesSelector||$t.msMatchesSelector||$t.oMatchesSelector||$t.webkitMatchesSelector)(window.Element.prototype),Tt=navigator.userAgent.match('Trident'),xt='x-scope';class It{get XSCOPE_NAME(){return xt}decorateStyles($t){let Zt=this,Qt={},eo=[],to=0;me($t,function(ro){Zt.decorateRule(ro),ro.index=to++,Zt.collectPropertiesInCssText(ro.propertyInfo.cssText,Qt)},function(no){eo.push(no)}),$t._keyframes=eo;let oo=[];for(let ro in Qt)oo.push(ro);return oo}decorateRule($t){if($t.propertyInfo)return $t.propertyInfo;let Zt={},Qt={},eo=this.collectProperties($t,Qt);return eo&&(Zt.properties=Qt,$t.rules=null),Zt.cssText=this.collectCssText($t),$t.propertyInfo=Zt,Zt}collectProperties($t,Zt){let Qt=$t.propertyInfo;if(!Qt){let eo,oo=$t.parsedCssText,ro,no;for(;eo=je.exec(oo);)ro=(eo[2]||eo[3]).trim(),('inherit'!==ro||'unset'!==ro)&&(Zt[eo[1].trim()]=ro),no=!0;return no}else if(Qt.properties)return Object.assign(Zt,Qt.properties),!0}collectCssText($t){return this.collectConsumingCssText($t.parsedCssText)}collectConsumingCssText($t){return $t.replace(Ve,'').replace(je,'')}collectPropertiesInCssText($t,Zt){for(let Qt,eo;Qt=Ke.exec($t);)eo=Qt[1],':'!==Qt[2]&&(Zt[eo]=!0)}reify($t){let Zt=Object.getOwnPropertyNames($t);for(let eo,Qt=0;Qt *'===no||'html'===no,ao=0===no.indexOf(':host')&&!so;if('shady'===Qt&&(so=no===ro+' > *.'+ro||-1!==no.indexOf('html'),ao=!so&&0===no.indexOf(ro)),'shadow'===Qt&&(so=':host > *'===no||'html'===no,ao=ao&&!so),so||ao){let lo=ro;ao&&(He&&!Zt.transformedSelector&&(Zt.transformedSelector=Nt._transformRuleCss(Zt,Nt._transformComplexSelector,Nt._calcElementScope(to),ro)),lo=Zt.transformedSelector||ro),eo({selector:lo,isHost:ao,isRoot:so})}}}hostAndRootPropertiesForScope($t,Zt){let Qt={},eo={},to=this,oo=Zt&&Zt.__cssBuild;return me(Zt,function(ro){to.whenHostOrRootRule($t,ro,oo,function(no){let so=$t._element||$t;At.call(so,no.selector)&&(no.isHost?to.collectProperties(ro,Qt):to.collectProperties(ro,eo))})},null,!0),{rootProps:eo,hostProps:Qt}}transformStyles($t,Zt,Qt){let eo=this,{is:to,typeExtension:oo}=Ce($t),ro=Nt._calcHostScope(to,oo),no=$t.extends?'\\'+ro.slice(0,-1)+'\\]':ro,so=new RegExp('(?:^|[^.#[:])'+no+'($|[.:[\\s>+~])'),ao=Rt.get($t).styleRules,lo=this._elementKeyframeTransforms($t,ao,Qt);return Nt.elementStyles($t,ao,function(io){eo.applyProperties(io,Zt),He||_e(io)||!io.cssText||(eo.applyKeyframeTransforms(io,lo),eo._scopeSelector(io,so,ro,Qt))})}_elementKeyframeTransforms($t,Zt,Qt){let eo=Zt._keyframes,to={};if(!He&&eo)for(let oo=0,ro=eo[oo];oo=ro._useCount&&ro.parentNode&&ro.parentNode.removeChild(ro)),He?oo.customStyle?(oo.customStyle.textContent=to,eo=oo.customStyle):to&&(eo=ye(to,Qt,$t.shadowRoot,oo.placeholder)):eo?!eo.parentNode&&Se(eo,null,oo.placeholder):to&&(eo=ye(to,Qt,null,oo.placeholder)),eo&&(eo._useCount=eo._useCount||0,oo.customStyle!=eo&&eo._useCount++,oo.customStyle=eo),Tt&&(eo.textContent=eo.textContent),eo}applyCustomStyle($t,Zt){let Qt=ue($t),eo=this;$t.textContent=he(Qt,function(to){let oo=to.cssText=to.parsedCssText;to.propertyInfo&&to.propertyInfo.cssText&&(oo=ie(oo),to.cssText=eo.valueForProperties(oo,Zt))})}}var wt=new It;let Mt={};const Ot=window.customElements;if(Ot&&!He){const $t=Ot.define;Ot.define=(Qt,eo,to)=>{return Mt[Qt]=ge(Qt),$t.call(Ot,Qt,eo,to)}}let Lt=function(){};if(!He){let $t=oo=>{return oo.classList&&!oo.classList.contains(Nt.SCOPE_NAME)||oo instanceof window.SVGElement&&(!oo.hasAttribute('class')||0>oo.getAttribute('class').indexOf(Nt.SCOPE_NAME))},Zt=oo=>{for(let no,ro=0;ro{Qt.observe(oo,{childList:!0,subtree:!0})},to=window.customElements&&!window.customElements.flush;if(to)eo(document);else{let oo=()=>{eo(document.body)};window.HTMLImports?window.HTMLImports.whenReady(oo):requestAnimationFrame(function(){if('loading'===document.readyState){let ro=function(){oo(),document.removeEventListener('readystatechange',ro)};document.addEventListener('readystatechange',ro)}else oo()})}Lt=function(){Zt(Qt.takeRecords())}}const kt={},Ft=Promise.resolve();let qt=null,Ut=window.HTMLImports&&window.HTMLImports.whenReady||null,Ht;const Wt='__processedByShadyCSS',jt='__seenByShadyCSS';let Bt=null,Kt=null;class Gt{constructor(){this.customStyles=[],this.enqueued=!1}enqueueDocumentValidation(){this.enqueued||!Kt||(this.enqueued=!0,Ie(Kt))}addCustomStyle($t){$t[jt]||($t[jt]=!0,this.customStyles.push($t),this.enqueueDocumentValidation())}getStyleForCustomStyle($t){let Zt;return Zt=$t.getStyle?$t.getStyle():$t,Zt}processStyles(){let $t=this.customStyles;for(let Qt,Zt=0;Zt<$t.length;Zt++)if(Qt=$t[Zt],!Qt[Wt]){let eo=this.getStyleForCustomStyle(Qt);if(eo){Qt[Wt]=!0;let to=eo.__appliedElement;if(to)for(let ro,oo=0;oothis.typeMax&&to.shift(),this.cache[$t]=to}fetch($t,Zt,Qt){let eo=this.cache[$t];if(eo)for(let oo,to=eo.length-1;0<=to;to--)if(oo=eo[to],this._validate(oo,Zt,Qt))return oo}};class Vt{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement;let $t=new Me;$t.rules=[],this._documentOwnerStyleInfo=Rt.set(this._documentOwner,new Rt($t)),this._elementsHaveApplied=!1,this._applyShim=null,this._customStyleInterface=null,Ie(()=>{this._ensure()})}flush(){Lt()}_generateScopeSelector($t){let Zt=this._scopeCounter[$t]=(this._scopeCounter[$t]||0)+1;return`${$t}-${Zt}`}getStyleAst($t){return ue($t)}styleAstToString($t){return he($t)}_gatherStyles($t){let Zt=$t.content.querySelectorAll('style'),Qt=[];for(let to,eo=0;eo{this.transformCustomStyleForDocument($t)},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 $t=this._customStyleInterface.processStyles();this._customStyleInterface.enqueued&&(We?this._revalidateCustomStyleApplyShim($t):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles($t)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!We&&this.styleDocument())}styleElement($t,Zt){let{is:Qt}=Ce($t),eo=Rt.get($t);if(eo||(eo=this._prepareHost($t)),this._isRootOwner($t)||(this._elementsHaveApplied=!0),Zt&&(eo.overrideStyleProperties=eo.overrideStyleProperties||{},Object.assign(eo.overrideStyleProperties,Zt)),!We)this._updateProperties($t,eo),eo.ownStylePropertyNames&&eo.ownStylePropertyNames.length&&this._applyStyleProperties($t,eo);else{eo.overrideStyleProperties&&we($t,eo.overrideStyleProperties);let to=kt[Qt];if(!to&&!this._isRootOwner($t))return;if(to&&to._style&&!Ae(to)){if(Te(to)||(this._ensure(),this._applyShim.transformRules(to._styleAst,Qt),to._style.textContent=Nt.elementStyles($t,eo.styleRules),xe(to)),He){let oo=$t.shadowRoot;if(oo){let ro=oo.querySelector('style');ro.textContent=Nt.elementStyles($t,eo.styleRules)}}eo.styleRules=to._styleAst}}}_styleOwnerForNode($t){let Zt=$t.getRootNode(),Qt=Zt.host;return Qt?Rt.get(Qt)?Qt:this._styleOwnerForNode(Qt):this._documentOwner}_isRootOwner($t){return $t===this._documentOwner}_applyStyleProperties($t,Zt){let Qt=Ce($t).is,eo=Yt.fetch(Qt,Zt.styleProperties,Zt.ownStylePropertyNames),to=eo&&eo.scopeSelector,oo=eo?eo.styleElement:null,ro=Zt.scopeSelector;Zt.scopeSelector=to||this._generateScopeSelector(Qt);let no=wt.applyElementStyle($t,Zt.styleProperties,Zt.scopeSelector,oo);return He||wt.applyElementScopeSelector($t,Zt.scopeSelector,ro),eo||Yt.store(Qt,Zt.styleProperties,no,Zt.scopeSelector),no}_updateProperties($t,Zt){let Qt=this._styleOwnerForNode($t),eo=Rt.get(Qt),to=eo.styleProperties,oo=Object.create(to||null),ro=wt.hostAndRootPropertiesForScope($t,Zt.styleRules),no=wt.propertyDataFromStyles(eo.styleRules,$t),so=no.properties;Object.assign(oo,ro.hostProps,so,ro.rootProps),this._mixinOverrideStyles(oo,Zt.overrideStyleProperties),wt.reify(oo),Zt.styleProperties=oo}_mixinOverrideStyles($t,Zt){for(let Qt in Zt){let eo=Zt[Qt];(eo||0===eo)&&($t[Qt]=eo)}}styleDocument($t){this.styleSubtree(this._documentOwner,$t)}styleSubtree($t,Zt){let Qt=$t.shadowRoot;(Qt||this._isRootOwner($t))&&this.styleElement($t,Zt);let eo=Qt&&(Qt.children||Qt.childNodes);if(eo)for(let oo,to=0;to{He?Nt.normalizeRootSelector(Qt):Nt.documentRule(Qt),We&&(this._ensure(),this._applyShim.transformRule(Qt))}),We?$t.textContent=he(Zt):this._documentOwnerStyleInfo.styleRules.rules.push(Zt)}_revalidateApplyShim($t){if(We){let Zt=ue($t);this._ensure(),this._applyShim.transformRules(Zt),$t.textContent=he(Zt)}}getComputedStyleValue($t,Zt){let Qt;if(!We){let eo=Rt.get($t)||Rt.get(this._styleOwnerForNode($t));Qt=eo.styleProperties[Zt]}return Qt=Qt||window.getComputedStyle($t).getPropertyValue(Zt),Qt?Qt.trim():''}setElementClass($t,Zt){let Qt=$t.getRootNode(),eo=Zt?Zt.split(/\s/):[],to=Qt.host&&Qt.host.localName;if(!to){var oo=$t.getAttribute('class');if(oo){let ro=oo.split(/\s/);for(let no=0;no{return vo.nodeType===Node.ELEMENT_NODE&&'link'===vo.localName&&'import'===vo.rel},fo=(vo,Po)=>{if(vo.__loaded)Po&&Po();else if('script'===vo.localName&&!vo.src)vo.__loaded=!0,Po&&Po();else{const To=Ao=>{vo.removeEventListener(Ao.type,To),vo.__loaded=!0,Po&&Po()};vo.addEventListener('load',To),lo&&'style'===vo.localName||vo.addEventListener('error',To)}},So=vo=>{bo(()=>Eo(()=>vo&&vo()))},bo=vo=>{if('loading'!==document.readyState)vo();else{const Po=()=>{'loading'!==document.readyState&&(document.removeEventListener('readystatechange',Po),vo())};document.addEventListener('readystatechange',Po)}},Eo=vo=>{let Po=document.querySelectorAll(ho),To=Po.length;if(!To)return void vo();for(let xo,Ao=0,Ro=Po.length;Ao{0==--To&&vo()})},No=vo=>{if(Zt)return vo.ownerDocument===document?null:vo.ownerDocument;let Po=vo.__importDoc;if(!Po&&vo.parentNode){if(Po=vo.parentNode,'function'==typeof Po.closest)Po=Po.closest(ao);else for(;!go(Po)&&(Po=Po.parentNode););vo.__importDoc=Po}return Po},Co=(vo,Po)=>{if('function'==typeof window.CustomEvent)return new CustomEvent(vo,Po);const To=document.createEvent('CustomEvent');return To.initCustomEvent(vo,!!Po.bubbles,!!Po.cancelable,Po.detail),To};if(Zt){const vo=document.querySelectorAll(ao);for(let Ro,To=0,Ao=vo.length;To{const Ao=To.target;go(Ao)&&(Ao.__loaded=!0)};document.addEventListener('load',Po,!0),document.addEventListener('error',Po,!0)}else new class{constructor(){this.documents={},this.inflight=0,this.dynamicImportsMO=new MutationObserver(vo=>this.handleMutations(vo)),bo(()=>{this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.loadImports(document)})}loadImports(vo){const Po=vo.querySelectorAll(ao);for(let To=0,Ao=Po.length;To{const Ro=this.makeDocument(To,Ao||Po);this.documents[Po]=Ro,this.inflight--,this.loadImports(Ro),this.processImportsIfLoadingDone()},()=>{this.documents[Po]=null,this.inflight--,this.processImportsIfLoadingDone()})}makeDocument(vo,Po){if(!vo)return document.createDocumentFragment();lo&&(vo=vo.replace(ro,(Do,Oo,Io)=>{return-1===Do.indexOf('type=')?`${Oo} type=${io} ${Io}`:Do}));let To;const Ao=document.createElement('template');if(Ao.innerHTML=vo,Ao.content)To=Ao.content;else for(To=document.createDocumentFragment();Ao.firstChild;)To.appendChild(Ao.firstChild);const Ro=To.querySelector('base');Ro&&(Po=no.replaceAttrUrl(Ro.getAttribute('href'),Po),Ro.removeAttribute('href'));const xo=To.querySelectorAll(co);let Mo=0;for(let Io,Do=0,Oo=xo.length;Do{Po&&vo&&(this.dynamicImportsMO.observe(document.head,{childList:!0,subtree:!0}),this.fireEvents())};this.waitForStyles(()=>{Po=!0,To()}),this.runScripts(()=>{vo=!0,To()})}}flatten(vo){const Po=vo.querySelectorAll(ao);for(let Ro,To=0,Ao=Po.length;ToRo.href,configurable:!0,enumerable:!0}),this.flatten(xo),Ro.appendChild(xo))}}runScripts(vo){const Po=document.querySelectorAll(_o),To=Po.length,Ao=Ro=>{if(Ro{Qt=null,Ao(Ro+1)})}else vo()};Ao(0)}waitForStyles(vo){const Po=document.querySelectorAll(mo);let To=Po.length;if(!To)return void vo();const Ao=lo&&!!document.querySelector(po);for(let Mo,Ro=0,xo=Po.length;Ro{Mo.removeAttribute(uo),0==--To&&vo()}),Ao&&Mo.parentNode!==document.head){const Do=document.createElement(Mo.localName);Do.__appliedElement=Mo,Do.setAttribute('type','import-placeholder'),Mo.parentNode.insertBefore(Do,Mo.nextSibling);let Oo=No(Mo);for(;Oo&&No(Oo);)Oo=No(Oo);Oo.parentNode!==document.head&&(Oo=null),document.head.insertBefore(Mo,Oo),Mo.removeAttribute('type')}}fireEvents(){const vo=document.querySelectorAll(ao);for(let To,Po=vo.length-1;0<=Po&&(To=vo[Po]);Po--)this.fireEventIfNeeded(To)}fireEventIfNeeded(vo){if(!vo.__loaded){vo.__loaded=!0,vo.import&&(vo.import.readyState='complete');const Po=vo.import?'load':'error';vo.dispatchEvent(Co(Po,{bubbles:!1,cancelable:!1,detail:void 0}))}}handleMutations(vo){for(let Po=0;Podocument.dispatchEvent(Co('HTMLImportsLoaded',{cancelable:!0,bubbles:!0,detail:void 0}))),Jt.useNative=Zt,Jt.whenReady=So,Jt.importForElement=No})(window.HTMLImports=window.HTMLImports||{}),function(){'use strict';window.WebComponents=window.WebComponents||{flags:{}};var Zt=document.querySelector('script[src*="'+'webcomponents-lite.js'+'"]'),Qt={};if(!Qt.noOpts){if(location.search.slice(1).split('&').forEach(function(lo){var io,ao=lo.split('=');ao[0]&&(io=ao[0].match(/wc-(.+)/))&&(Qt[io[1]]=ao[1]||!0)}),Zt)for(var to,eo=0;to=Zt.attributes[eo];eo++)'src'!==to.name&&(Qt[to.name]=to.value||!0);if(Qt.log&&Qt.log.split){var oo=Qt.log.split(',');Qt.log={},oo.forEach(function(lo){Qt.log[lo]=!0})}else Qt.log={}}WebComponents.flags=Qt;var ro=window.WebComponents,no=ro.flags.shadydom;no&&(window.ShadyDOM=window.ShadyDOM||{},ShadyDOM.force=no);var so=ro.flags.register||ro.flags.ce;so&&window.customElements&&(customElements.forcePolyfill=so)}(),function(){'use strict';function Jt(Br,jr,Kr){return{index:Br,removed:jr,addedCount:Kr}}function Zt(Br){return'ShadyRoot'===Br.__localName}function Qt(Br,jr){if(Br&&jr)for(var Yr,Kr=Object.getOwnPropertyNames(jr),Gr=0;Gr'===Br?'>':'"'===Br?'"':'\xA0'===Br?' ':void 0}function ro(Br){for(var jr={},Kr=0;Kr';case Node.TEXT_NODE:return Br=Br.data,jr&&Jo[jr.localName]?Br:Br.replace(zo,oo);case Node.COMMENT_NODE:return'';default:throw window.console.error(Br),Error('not implemented');}}function so(Br,jr){'template'===Br.localName&&(Br=Br.content);for(var Xr,Kr='',Gr=jr?jr(Br):Br.childNodes,Yr=0,Vr=Gr.length;Yr]/g,$o=ro('area base br col command embed hr img input keygen link meta param source track wbr'.split(' ')),Jo=ro('style script xmp iframe noembed noframes plaintext noscript'.split(' '));Vo.getOuterHTML=no,Vo.getInnerHTML=so;var Zo={},Qo=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),er=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);Zo.parentNode=function(Br){return Qo.currentNode=Br,Qo.parentNode()},Zo.firstChild=function(Br){return Qo.currentNode=Br,Qo.firstChild()},Zo.lastChild=function(Br){return Qo.currentNode=Br,Qo.lastChild()},Zo.previousSibling=function(Br){return Qo.currentNode=Br,Qo.previousSibling()},Zo.nextSibling=function(Br){return Qo.currentNode=Br,Qo.nextSibling()},Zo.childNodes=lo,Zo.parentElement=function(Br){return er.currentNode=Br,er.parentNode()},Zo.firstElementChild=function(Br){return er.currentNode=Br,er.firstChild()},Zo.lastElementChild=function(Br){return er.currentNode=Br,er.lastChild()},Zo.previousElementSibling=function(Br){return er.currentNode=Br,er.previousSibling()},Zo.nextElementSibling=function(Br){return er.currentNode=Br,er.nextSibling()},Zo.children=function(Br){var jr=[];for(er.currentNode=Br,Br=er.firstChild();Br;)jr.push(Br),Br=er.nextSibling();return jr},Zo.innerHTML=function(Br){return Vo.getInnerHTML(Br,function(jr){return lo(jr)})},Zo.textContent=function(Br){if(Br.nodeType!==Node.ELEMENT_NODE)return Br.nodeValue;Br=document.createTreeWalker(Br,NodeFilter.SHOW_TEXT,null,!1);for(var Kr,jr='';Kr=Br.nextNode();)jr+=Kr.nodeValue;return jr};var tr={},or=Object.getOwnPropertyDescriptor(Element.prototype,'innerHTML')||Object.getOwnPropertyDescriptor(HTMLElement.prototype,'innerHTML'),rr=document.implementation.createHTMLDocument('inert').createElement('div'),nr=Object.getOwnPropertyDescriptor(Document.prototype,'activeElement'),sr={parentElement:ao('parentElement'),parentNode:ao('parentNode'),nextSibling:ao('nextSibling'),previousSibling:ao('previousSibling'),className:{get:function(){return this.getAttribute('class')},set:function(Br){this.setAttribute('class',Br)},configurable:!0},nextElementSibling:{get:function(){if(Yo.hasProperty(this,'nextSibling')){for(var Br=this.nextSibling;Br&&Br.nodeType!==Node.ELEMENT_NODE;)Br=Br.nextSibling;return Br}return Zo.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){if(Yo.hasProperty(this,'previousSibling')){for(var Br=this.previousSibling;Br&&Br.nodeType!==Node.ELEMENT_NODE;)Br=Br.previousSibling;return Br}return Zo.previousElementSibling(this)},configurable:!0}},lr={childNodes:{get:function(){if(Yo.hasProperty(this,'firstChild')){if(!this.__shady.childNodes){this.__shady.childNodes=[];for(var Br=this.firstChild;Br;Br=Br.nextSibling)this.__shady.childNodes.push(Br)}return this.__shady.childNodes}return Zo.childNodes(this)},configurable:!0},firstChild:ao('firstChild'),lastChild:ao('lastChild'),textContent:{get:function(){if(Yo.hasProperty(this,'firstChild')){for(var Gr,Br=[],jr=0,Kr=this.childNodes;Gr=Kr[jr];jr++)Gr.nodeType!==Node.COMMENT_NODE&&Br.push(Gr.textContent);return Br.join('')}return Zo.textContent(this)},set:function(Br){if(this.nodeType!==Node.ELEMENT_NODE)this.nodeValue=Br;else{for(;this.firstChild;)this.removeChild(this.firstChild);Br&&this.appendChild(document.createTextNode(Br))}},configurable:!0},firstElementChild:{get:function(){if(Yo.hasProperty(this,'firstChild')){for(var Br=this.firstChild;Br&&Br.nodeType!==Node.ELEMENT_NODE;)Br=Br.nextSibling;return Br}return Zo.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){if(Yo.hasProperty(this,'lastChild')){for(var Br=this.lastChild;Br&&Br.nodeType!==Node.ELEMENT_NODE;)Br=Br.previousSibling;return Br}return Zo.lastElementChild(this)},configurable:!0},children:{get:function(){return Yo.hasProperty(this,'firstChild')?Array.prototype.filter.call(this.childNodes,function(Br){return Br.nodeType===Node.ELEMENT_NODE}):Zo.children(this)},configurable:!0},innerHTML:{get:function(){var Br='template'===this.localName?this.content:this;return Yo.hasProperty(this,'firstChild')?Vo.getInnerHTML(Br):Zo.innerHTML(Br)},set:function(Br){for(var jr='template'===this.localName?this.content:this;jr.firstChild;)jr.removeChild(jr.firstChild);for(or&&or.set?or.set.call(rr,Br):rr.innerHTML=Br;rr.firstChild;)jr.appendChild(rr.firstChild)},configurable:!0}},ar={shadowRoot:{get:function(){return this.shadyRoot},set:function(Br){this.shadyRoot=Br},configurable:!0}},ir={activeElement:{get:function(){var Br;if(Br=nr&&nr.get?nr.get.call(document):Lo.settings.hasDescriptors?void 0:document.activeElement,Br&&Br.nodeType){var jr=!!Lo.isShadyRoot(this);if(this===document||jr&&this.host!==Br&&this.host.contains(Br)){for(jr=Lo.ownerShadyRootForNode(Br);jr&&jr!==this;)Br=jr.host,jr=Lo.ownerShadyRootForNode(Br);Br=this===document?jr?null:Br:jr===this?Br:null}else Br=null}else Br=null;return Br},set:function(){},configurable:!0}},dr=Lo.settings.hasDescriptors?function(){}:function(Br){Br.__shady&&Br.__shady.__outsideAccessors||(Br.__shady=Br.__shady||{},Br.__shady.__outsideAccessors=!0,io(Br,sr,!0))},pr=Lo.settings.hasDescriptors?function(){}:function(Br){Br.__shady&&Br.__shady.__insideAccessors||(Br.__shady=Br.__shady||{},Br.__shady.__insideAccessors=!0,io(Br,lr,!0),io(Br,ar,!0))};tr.ShadowRootAccessor=ar,tr.ActiveElementAccessor=ir,tr.patchAccessors=function(Br){io(Br,sr),io(Br,lr),io(Br,ir)},tr.patchShadowRootAccessors=function(Br){io(Br,lr,!0),io(Br,ir,!0)},tr.patchOutsideElementAccessors=dr,tr.patchInsideElementAccessors=pr;var cr={};cr.recordInsertBefore=function(Br,jr,Kr){if(tr.patchInsideElementAccessors(jr),jr.__shady=jr.__shady||{},Yo.hasProperty(jr,'firstChild')&&(jr.__shady.childNodes=null),Br.nodeType===Node.DOCUMENT_FRAGMENT_NODE){for(var Gr=Br.childNodes,Yr=0;Yr`:${oo}(${ro.replace(/\s/g,'')})`),Jt=Jt.replace(yt,`${ht} $1`),Jt=Jt.replace(pt,(to,oo,ro)=>{if(!eo){let no=this._transformCompoundSelector(ro,oo,Zt,Qt);eo=eo||no.stop,oo=no.combinator,ro=no.value}return oo+ro}),Jt}_transformCompoundSelector(Jt,Zt,Qt,eo){let to=Jt.indexOf(mt);0<=Jt.indexOf(ht)?Jt=this._transformHostSelector(Jt,eo):0!==to&&(Jt=Qt?this._transformSimpleSelector(Jt,Qt):Jt);let oo=!1;0<=to&&(Zt='',oo=!0);let ro;return oo&&(ro=!0,oo&&(Jt=Jt.replace(ft,(no,so)=>` > ${so}`))),Jt=Jt.replace(St,(no,so,lo)=>`[dir="${lo}"] ${so}, ${so}[dir="${lo}"]`),{value:Jt,combinator:Zt,stop:ro}}_transformSimpleSelector(Jt,Zt){let Qt=Jt.split(Et);return Qt[0]+=Zt,Qt.join(Et)}_transformHostSelector(Jt,Zt){let Qt=Jt.match(gt),eo=Qt&&Qt[2].trim()||'';if(eo){if(!eo[0].match(ct)){let to=eo.split(ct)[0];return to===Zt?eo:'should_not_match'}return Jt.replace(gt,function(to,oo,ro){return Zt+ro})}return Jt.replace(ht,Zt)}documentRule(Jt){Jt.selector=Jt.parsedSelector,this.normalizeRootSelector(Jt),this._transformRule(Jt,this._transformDocumentSelector)}normalizeRootSelector(Jt){Jt.selector===':root'&&(Jt.selector='html')}_transformDocumentSelector(Jt){return Jt.match(mt)?this._transformComplexSelector(Jt,lt):this._transformSimpleSelector(Jt.trim(),lt)}}let Qe=/:(nth[-\w]+)\(([^)]+)\)/,lt=`:not(.${Je})`,dt=',',pt=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,ct=/[[.:#*]/,ht=':host',mt='::slotted',yt=/^(::slotted)/,gt=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ft=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,St=/(.*):dir\((?:(ltr|rtl))\)/,Et=':';var vt=new Ze;const Pt='__styleInfo';class Tt{static get(Jt){return Jt?Jt[Pt]:null}static set(Jt,Zt){return Jt[Pt]=Zt,Zt}constructor(Jt,Zt,Qt,eo,to,oo){this.styleRules=Jt||null,this.placeholder=Zt||null,this.ownStylePropertyNames=Qt||[],this.overrideStyleProperties=null,this.elementName=eo||'',this.cssBuild=oo||'',this.typeExtension=to||'',this.styleProperties=null,this.scopeSelector=null,this.customStyle=null}_getStyleRules(){return this.styleRules}}Tt.prototype._getStyleRules=Tt.prototype._getStyleRules;const At=(Jt=>Jt.matches||Jt.matchesSelector||Jt.mozMatchesSelector||Jt.msMatchesSelector||Jt.oMatchesSelector||Jt.webkitMatchesSelector)(window.Element.prototype),Rt=navigator.userAgent.match('Trident'),xt='x-scope';class Mt{get XSCOPE_NAME(){return xt}decorateStyles(Jt){let Zt=this,Qt={},eo=[],to=0;me(Jt,function(ro){Zt.decorateRule(ro),ro.index=to++,Zt.collectPropertiesInCssText(ro.propertyInfo.cssText,Qt)},function(no){eo.push(no)}),Jt._keyframes=eo;let oo=[];for(let ro in Qt)oo.push(ro);return oo}decorateRule(Jt){if(Jt.propertyInfo)return Jt.propertyInfo;let Zt={},Qt={},eo=this.collectProperties(Jt,Qt);return eo&&(Zt.properties=Qt,Jt.rules=null),Zt.cssText=this.collectCssText(Jt),Jt.propertyInfo=Zt,Zt}collectProperties(Jt,Zt){let Qt=Jt.propertyInfo;if(!Qt){let eo,oo=Jt.parsedCssText,ro,no;for(;eo=Be.exec(oo);)ro=(eo[2]||eo[3]).trim(),('inherit'!==ro||'unset'!==ro)&&(Zt[eo[1].trim()]=ro),no=!0;return no}else if(Qt.properties)return Object.assign(Zt,Qt.properties),!0}collectCssText(Jt){return this.collectConsumingCssText(Jt.parsedCssText)}collectConsumingCssText(Jt){return Jt.replace(Ve,'').replace(Be,'')}collectPropertiesInCssText(Jt,Zt){for(let Qt,eo;Qt=Ke.exec(Jt);)eo=Qt[1],':'!==Qt[2]&&(Zt[eo]=!0)}reify(Jt){let Zt=Object.getOwnPropertyNames(Jt);for(let eo,Qt=0;Qt *'===no||'html'===no,lo=0===no.indexOf(':host')&&!so;if('shady'===Qt&&(so=no===ro+' > *.'+ro||-1!==no.indexOf('html'),lo=!so&&0===no.indexOf(ro)),'shadow'===Qt&&(so=':host > *'===no||'html'===no,lo=lo&&!so),so||lo){let ao=ro;lo&&(qe&&!Zt.transformedSelector&&(Zt.transformedSelector=vt._transformRuleCss(Zt,vt._transformComplexSelector,vt._calcElementScope(to),ro)),ao=Zt.transformedSelector||ro),eo({selector:ao,isHost:lo,isRoot:so})}}}hostAndRootPropertiesForScope(Jt,Zt){let Qt={},eo={},to=this,oo=Zt&&Zt.__cssBuild;return me(Zt,function(ro){to.whenHostOrRootRule(Jt,ro,oo,function(no){let so=Jt._element||Jt;At.call(so,no.selector)&&(no.isHost?to.collectProperties(ro,Qt):to.collectProperties(ro,eo))})},null,!0),{rootProps:eo,hostProps:Qt}}transformStyles(Jt,Zt,Qt){let eo=this,{is:to,typeExtension:oo}=Ce(Jt),ro=vt._calcHostScope(to,oo),no=Jt.extends?'\\'+ro.slice(0,-1)+'\\]':ro,so=new RegExp('(?:^|[^.#[:])'+no+'($|[.:[\\s>+~])'),lo=Tt.get(Jt).styleRules,ao=this._elementKeyframeTransforms(Jt,lo,Qt);return vt.elementStyles(Jt,lo,function(io){eo.applyProperties(io,Zt),qe||_e(io)||!io.cssText||(eo.applyKeyframeTransforms(io,ao),eo._scopeSelector(io,so,ro,Qt))})}_elementKeyframeTransforms(Jt,Zt,Qt){let eo=Zt._keyframes,to={};if(!qe&&eo)for(let oo=0,ro=eo[oo];oo=ro._useCount&&ro.parentNode&&ro.parentNode.removeChild(ro)),qe?oo.customStyle?(oo.customStyle.textContent=to,eo=oo.customStyle):to&&(eo=ye(to,Qt,Jt.shadowRoot,oo.placeholder)):eo?!eo.parentNode&&Se(eo,null,oo.placeholder):to&&(eo=ye(to,Qt,null,oo.placeholder)),eo&&(eo._useCount=eo._useCount||0,oo.customStyle!=eo&&eo._useCount++,oo.customStyle=eo),Rt&&(eo.textContent=eo.textContent),eo}applyCustomStyle(Jt,Zt){let Qt=he(Jt),eo=this;Jt.textContent=ue(Qt,function(to){let oo=to.cssText=to.parsedCssText;to.propertyInfo&&to.propertyInfo.cssText&&(oo=ie(oo),to.cssText=eo.valueForProperties(oo,Zt))})}}var Dt=new Mt;let Ot={};const It=window.customElements;if(It&&!qe){const Jt=It.define;It.define=(Qt,eo,to)=>{return Ot[Qt]=fe(Qt),Jt.call(It,Qt,eo,to)}}let Lt=function(){};if(!qe){let Jt=oo=>{return oo.classList&&!oo.classList.contains(vt.SCOPE_NAME)||oo instanceof window.SVGElement&&(!oo.hasAttribute('class')||0>oo.getAttribute('class').indexOf(vt.SCOPE_NAME))},Zt=oo=>{for(let no,ro=0;ro{Qt.observe(oo,{childList:!0,subtree:!0})},to=window.customElements&&!window.customElements.flush;if(to)eo(document);else{let oo=()=>{eo(document.body)};window.HTMLImports?window.HTMLImports.whenReady(oo):requestAnimationFrame(function(){if('loading'===document.readyState){let ro=function(){oo(),document.removeEventListener('readystatechange',ro)};document.addEventListener('readystatechange',ro)}else oo()})}Lt=function(){Zt(Qt.takeRecords())}}const kt={},Ft=Promise.resolve();let Ht=null,Ut=window.HTMLImports&&window.HTMLImports.whenReady||null,qt;const Wt='__processedByShadyCSS',Bt='__seenByShadyCSS';let jt=null,Kt=null;class Gt{constructor(){this.customStyles=[],this.enqueued=!1}enqueueDocumentValidation(){this.enqueued||!Kt||(this.enqueued=!0,Me(Kt))}addCustomStyle(Jt){Jt[Bt]||(Jt[Bt]=!0,this.customStyles.push(Jt),this.enqueueDocumentValidation())}getStyleForCustomStyle(Jt){let Zt;return Zt=Jt.getStyle?Jt.getStyle():Jt,Zt}processStyles(){let Jt=this.customStyles;for(let Qt,Zt=0;Ztthis.typeMax&&to.shift(),this.cache[Jt]=to}fetch(Jt,Zt,Qt){let eo=this.cache[Jt];if(eo)for(let oo,to=eo.length-1;0<=to;to--)if(oo=eo[to],this._validate(oo,Zt,Qt))return oo}};class Vt{constructor(){this._scopeCounter={},this._documentOwner=document.documentElement;let Jt=new Oe;Jt.rules=[],this._documentOwnerStyleInfo=Tt.set(this._documentOwner,new Tt(Jt)),this._elementsHaveApplied=!1,this._applyShim=null,this._customStyleInterface=null,Me(()=>{this._ensure()})}flush(){Lt()}_generateScopeSelector(Jt){let Zt=this._scopeCounter[Jt]=(this._scopeCounter[Jt]||0)+1;return`${Jt}-${Zt}`}getStyleAst(Jt){return he(Jt)}styleAstToString(Jt){return ue(Jt)}_gatherStyles(Jt){let Zt=Jt.content.querySelectorAll('style'),Qt=[];for(let to,eo=0;eo{this.transformCustomStyleForDocument(Jt)},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 Jt=this._customStyleInterface.processStyles();this._customStyleInterface.enqueued&&(We?this._revalidateCustomStyleApplyShim(Jt):(this._updateProperties(this._documentOwner,this._documentOwnerStyleInfo),this._applyCustomStyles(Jt)),this._customStyleInterface.enqueued=!1,this._elementsHaveApplied&&!We&&this.styleDocument())}styleElement(Jt,Zt){let{is:Qt}=Ce(Jt),eo=Tt.get(Jt);if(eo||(eo=this._prepareHost(Jt)),this._isRootOwner(Jt)||(this._elementsHaveApplied=!0),Zt&&(eo.overrideStyleProperties=eo.overrideStyleProperties||{},Object.assign(eo.overrideStyleProperties,Zt)),!We)this._updateProperties(Jt,eo),eo.ownStylePropertyNames&&eo.ownStylePropertyNames.length&&this._applyStyleProperties(Jt,eo);else{eo.overrideStyleProperties&&De(Jt,eo.overrideStyleProperties);let to=kt[Qt];if(!to&&!this._isRootOwner(Jt))return;if(to&&to._style&&!Ae(to)){if(Re(to)||(this._ensure(),this._applyShim.transformRules(to._styleAst,Qt),to._style.textContent=vt.elementStyles(Jt,eo.styleRules),xe(to)),qe){let oo=Jt.shadowRoot;if(oo){let ro=oo.querySelector('style');ro.textContent=vt.elementStyles(Jt,eo.styleRules)}}eo.styleRules=to._styleAst}}}_styleOwnerForNode(Jt){let Zt=Jt.getRootNode(),Qt=Zt.host;return Qt?Tt.get(Qt)?Qt:this._styleOwnerForNode(Qt):this._documentOwner}_isRootOwner(Jt){return Jt===this._documentOwner}_applyStyleProperties(Jt,Zt){let Qt=Ce(Jt).is,eo=Yt.fetch(Qt,Zt.styleProperties,Zt.ownStylePropertyNames),to=eo&&eo.scopeSelector,oo=eo?eo.styleElement:null,ro=Zt.scopeSelector;Zt.scopeSelector=to||this._generateScopeSelector(Qt);let no=Dt.applyElementStyle(Jt,Zt.styleProperties,Zt.scopeSelector,oo);return qe||Dt.applyElementScopeSelector(Jt,Zt.scopeSelector,ro),eo||Yt.store(Qt,Zt.styleProperties,no,Zt.scopeSelector),no}_updateProperties(Jt,Zt){let Qt=this._styleOwnerForNode(Jt),eo=Tt.get(Qt),to=eo.styleProperties,oo=Object.create(to||null),ro=Dt.hostAndRootPropertiesForScope(Jt,Zt.styleRules),no=Dt.propertyDataFromStyles(eo.styleRules,Jt),so=no.properties;Object.assign(oo,ro.hostProps,so,ro.rootProps),this._mixinOverrideStyles(oo,Zt.overrideStyleProperties),Dt.reify(oo),Zt.styleProperties=oo}_mixinOverrideStyles(Jt,Zt){for(let Qt in Zt){let eo=Zt[Qt];(eo||0===eo)&&(Jt[Qt]=eo)}}styleDocument(Jt){this.styleSubtree(this._documentOwner,Jt)}styleSubtree(Jt,Zt){let Qt=Jt.shadowRoot;(Qt||this._isRootOwner(Jt))&&this.styleElement(Jt,Zt);let eo=Qt&&(Qt.children||Qt.childNodes);if(eo)for(let oo,to=0;to{qe?vt.normalizeRootSelector(Qt):vt.documentRule(Qt),We&&(this._ensure(),this._applyShim.transformRule(Qt))}),We?Jt.textContent=ue(Zt):this._documentOwnerStyleInfo.styleRules.rules.push(Zt)}_revalidateApplyShim(Jt){if(We){let Zt=he(Jt);this._ensure(),this._applyShim.transformRules(Zt),Jt.textContent=ue(Zt)}}getComputedStyleValue(Jt,Zt){let Qt;if(!We){let eo=Tt.get(Jt)||Tt.get(this._styleOwnerForNode(Jt));Qt=eo.styleProperties[Zt]}return Qt=Qt||window.getComputedStyle(Jt).getPropertyValue(Zt),Qt?Qt.trim():''}setElementClass(Jt,Zt){let Qt=Jt.getRootNode(),eo=Zt?Zt.split(/\s/):[],to=Qt.host&&Qt.host.localName;if(!to){var oo=Jt.getAttribute('class');if(oo){let ro=oo.split(/\s/);for(let no=0;no 0x20 &&\n unicode < 0x7F &&\n // \" # < > ? `\n [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n function percentEscapeQuery(c) {\n // XXX This actually needs to encode c using encoding and then\n // convert the bytes one-by-one.\n\n var unicode = c.charCodeAt(0);\n if (unicode > 0x20 &&\n unicode < 0x7F &&\n // \" # < > ` (do not escape '?')\n [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) == -1\n ) {\n return c;\n }\n return encodeURIComponent(c);\n }\n\n var EOF = undefined,\n ALPHA = /[a-zA-Z]/,\n ALPHANUMERIC = /[a-zA-Z0-9\\+\\-\\.]/;\n\n function parse(input, stateOverride, base) {\n function err(message) {\n errors.push(message);\n }\n\n var state = stateOverride || 'scheme start',\n cursor = 0,\n buffer = '',\n seenAt = false,\n seenBracket = false,\n errors = [];\n\n loop: while ((input[cursor - 1] != EOF || cursor == 0) && !this._isInvalid) {\n var c = input[cursor];\n switch (state) {\n case 'scheme start':\n if (c && ALPHA.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n state = 'scheme';\n } else if (!stateOverride) {\n buffer = '';\n state = 'no scheme';\n continue;\n } else {\n err('Invalid scheme.');\n break loop;\n }\n break;\n\n case 'scheme':\n if (c && ALPHANUMERIC.test(c)) {\n buffer += c.toLowerCase(); // ASCII-safe\n } else if (':' == c) {\n this._scheme = buffer;\n buffer = '';\n if (stateOverride) {\n break loop;\n }\n if (isRelativeScheme(this._scheme)) {\n this._isRelative = true;\n }\n if ('file' == this._scheme) {\n state = 'relative';\n } else if (this._isRelative && base && base._scheme == this._scheme) {\n state = 'relative or authority';\n } else if (this._isRelative) {\n state = 'authority first slash';\n } else {\n state = 'scheme data';\n }\n } else if (!stateOverride) {\n buffer = '';\n cursor = 0;\n state = 'no scheme';\n continue;\n } else if (EOF == c) {\n break loop;\n } else {\n err('Code point not allowed in scheme: ' + c);\n break loop;\n }\n break;\n\n case 'scheme data':\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else {\n // XXX error handling\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._schemeData += percentEscape(c);\n }\n }\n break;\n\n case 'no scheme':\n if (!base || !(isRelativeScheme(base._scheme))) {\n err('Missing scheme.');\n invalid.call(this);\n } else {\n state = 'relative';\n continue;\n }\n break;\n\n case 'relative or authority':\n if ('/' == c && '/' == input[cursor+1]) {\n state = 'authority ignore slashes';\n } else {\n err('Expected /, got: ' + c);\n state = 'relative';\n continue\n }\n break;\n\n case 'relative':\n this._isRelative = true;\n if ('file' != this._scheme)\n this._scheme = base._scheme;\n if (EOF == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._username = base._username;\n this._password = base._password;\n break loop;\n } else if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c)\n err('\\\\ is an invalid code point.');\n state = 'relative slash';\n } else if ('?' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = '?';\n this._username = base._username;\n this._password = base._password;\n state = 'query';\n } else if ('#' == c) {\n this._host = base._host;\n this._port = base._port;\n this._path = base._path.slice();\n this._query = base._query;\n this._fragment = '#';\n this._username = base._username;\n this._password = base._password;\n state = 'fragment';\n } else {\n var nextC = input[cursor+1];\n var nextNextC = input[cursor+2];\n if (\n 'file' != this._scheme || !ALPHA.test(c) ||\n (nextC != ':' && nextC != '|') ||\n (EOF != nextNextC && '/' != nextNextC && '\\\\' != nextNextC && '?' != nextNextC && '#' != nextNextC)) {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n this._path = base._path.slice();\n this._path.pop();\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'relative slash':\n if ('/' == c || '\\\\' == c) {\n if ('\\\\' == c) {\n err('\\\\ is an invalid code point.');\n }\n if ('file' == this._scheme) {\n state = 'file host';\n } else {\n state = 'authority ignore slashes';\n }\n } else {\n if ('file' != this._scheme) {\n this._host = base._host;\n this._port = base._port;\n this._username = base._username;\n this._password = base._password;\n }\n state = 'relative path';\n continue;\n }\n break;\n\n case 'authority first slash':\n if ('/' == c) {\n state = 'authority second slash';\n } else {\n err(\"Expected '/', got: \" + c);\n state = 'authority ignore slashes';\n continue;\n }\n break;\n\n case 'authority second slash':\n state = 'authority ignore slashes';\n if ('/' != c) {\n err(\"Expected '/', got: \" + c);\n continue;\n }\n break;\n\n case 'authority ignore slashes':\n if ('/' != c && '\\\\' != c) {\n state = 'authority';\n continue;\n } else {\n err('Expected authority, got: ' + c);\n }\n break;\n\n case 'authority':\n if ('@' == c) {\n if (seenAt) {\n err('@ already seen.');\n buffer += '%40';\n }\n seenAt = true;\n for (var i = 0; i < buffer.length; i++) {\n var cp = buffer[i];\n if ('\\t' == cp || '\\n' == cp || '\\r' == cp) {\n err('Invalid whitespace in authority.');\n continue;\n }\n // XXX check URL code points\n if (':' == cp && null === this._password) {\n this._password = '';\n continue;\n }\n var tempC = percentEscape(cp);\n (null !== this._password) ? this._password += tempC : this._username += tempC;\n }\n buffer = '';\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n cursor -= buffer.length;\n buffer = '';\n state = 'host';\n continue;\n } else {\n buffer += c;\n }\n break;\n\n case 'file host':\n if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n if (buffer.length == 2 && ALPHA.test(buffer[0]) && (buffer[1] == ':' || buffer[1] == '|')) {\n state = 'relative path';\n } else if (buffer.length == 0) {\n state = 'relative path start';\n } else {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n }\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid whitespace in file host.');\n } else {\n buffer += c;\n }\n break;\n\n case 'host':\n case 'hostname':\n if (':' == c && !seenBracket) {\n // XXX host parsing\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'port';\n if ('hostname' == stateOverride) {\n break loop;\n }\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c) {\n this._host = IDNAToASCII.call(this, buffer);\n buffer = '';\n state = 'relative path start';\n if (stateOverride) {\n break loop;\n }\n continue;\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n if ('[' == c) {\n seenBracket = true;\n } else if (']' == c) {\n seenBracket = false;\n }\n buffer += c;\n } else {\n err('Invalid code point in host/hostname: ' + c);\n }\n break;\n\n case 'port':\n if (/[0-9]/.test(c)) {\n buffer += c;\n } else if (EOF == c || '/' == c || '\\\\' == c || '?' == c || '#' == c || stateOverride) {\n if ('' != buffer) {\n var temp = parseInt(buffer, 10);\n if (temp != relative[this._scheme]) {\n this._port = temp + '';\n }\n buffer = '';\n }\n if (stateOverride) {\n break loop;\n }\n state = 'relative path start';\n continue;\n } else if ('\\t' == c || '\\n' == c || '\\r' == c) {\n err('Invalid code point in port: ' + c);\n } else {\n invalid.call(this);\n }\n break;\n\n case 'relative path start':\n if ('\\\\' == c)\n err(\"'\\\\' not allowed in path.\");\n state = 'relative path';\n if ('/' != c && '\\\\' != c) {\n continue;\n }\n break;\n\n case 'relative path':\n if (EOF == c || '/' == c || '\\\\' == c || (!stateOverride && ('?' == c || '#' == c))) {\n if ('\\\\' == c) {\n err('\\\\ not allowed in relative path.');\n }\n var tmp;\n if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {\n buffer = tmp;\n }\n if ('..' == buffer) {\n this._path.pop();\n if ('/' != c && '\\\\' != c) {\n this._path.push('');\n }\n } else if ('.' == buffer && '/' != c && '\\\\' != c) {\n this._path.push('');\n } else if ('.' != buffer) {\n if ('file' == this._scheme && this._path.length == 0 && buffer.length == 2 && ALPHA.test(buffer[0]) && buffer[1] == '|') {\n buffer = buffer[0] + ':';\n }\n this._path.push(buffer);\n }\n buffer = '';\n if ('?' == c) {\n this._query = '?';\n state = 'query';\n } else if ('#' == c) {\n this._fragment = '#';\n state = 'fragment';\n }\n } else if ('\\t' != c && '\\n' != c && '\\r' != c) {\n buffer += percentEscape(c);\n }\n break;\n\n case 'query':\n if (!stateOverride && '#' == c) {\n this._fragment = '#';\n state = 'fragment';\n } else if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._query += percentEscapeQuery(c);\n }\n break;\n\n case 'fragment':\n if (EOF != c && '\\t' != c && '\\n' != c && '\\r' != c) {\n this._fragment += c;\n }\n break;\n }\n\n cursor++;\n }\n }\n\n function clear() {\n this._scheme = '';\n this._schemeData = '';\n this._username = '';\n this._password = null;\n this._host = '';\n this._port = '';\n this._path = [];\n this._query = '';\n this._fragment = '';\n this._isInvalid = false;\n this._isRelative = false;\n }\n\n // Does not process domain names or IP addresses.\n // Does not handle encoding for the query parameter.\n function jURL(url, base /* , encoding */) {\n if (base !== undefined && !(base instanceof jURL))\n base = new jURL(String(base));\n\n this._url = url;\n clear.call(this);\n\n var input = url.replace(/^[ \\t\\r\\n\\f]+|[ \\t\\r\\n\\f]+$/g, '');\n // encoding = encoding || 'utf-8'\n\n parse.call(this, input, null, base);\n }\n\n jURL.prototype = {\n toString: function() {\n return this.href;\n },\n get href() {\n if (this._isInvalid)\n return this._url;\n\n var authority = '';\n if ('' != this._username || null != this._password) {\n authority = this._username +\n (null != this._password ? ':' + this._password : '') + '@';\n }\n\n return this.protocol +\n (this._isRelative ? '//' + authority + this.host : '') +\n this.pathname + this._query + this._fragment;\n },\n set href(href) {\n clear.call(this);\n parse.call(this, href);\n },\n\n get protocol() {\n return this._scheme + ':';\n },\n set protocol(protocol) {\n if (this._isInvalid)\n return;\n parse.call(this, protocol + ':', 'scheme start');\n },\n\n get host() {\n return this._isInvalid ? '' : this._port ?\n this._host + ':' + this._port : this._host;\n },\n set host(host) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, host, 'host');\n },\n\n get hostname() {\n return this._host;\n },\n set hostname(hostname) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, hostname, 'hostname');\n },\n\n get port() {\n return this._port;\n },\n set port(port) {\n if (this._isInvalid || !this._isRelative)\n return;\n parse.call(this, port, 'port');\n },\n\n get pathname() {\n return this._isInvalid ? '' : this._isRelative ?\n '/' + this._path.join('/') : this._schemeData;\n },\n set pathname(pathname) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._path = [];\n parse.call(this, pathname, 'relative path start');\n },\n\n get search() {\n return this._isInvalid || !this._query || '?' == this._query ?\n '' : this._query;\n },\n set search(search) {\n if (this._isInvalid || !this._isRelative)\n return;\n this._query = '?';\n if ('?' == search[0])\n search = search.slice(1);\n parse.call(this, search, 'query');\n },\n\n get hash() {\n return this._isInvalid || !this._fragment || '#' == this._fragment ?\n '' : this._fragment;\n },\n set hash(hash) {\n if (this._isInvalid)\n return;\n this._fragment = '#';\n if ('#' == hash[0])\n hash = hash.slice(1);\n parse.call(this, hash, 'fragment');\n },\n\n get origin() {\n var host;\n if (this._isInvalid || !this._scheme) {\n return '';\n }\n // javascript: Gecko returns String(\"\"), WebKit/Blink String(\"null\")\n // Gecko throws error for \"data://\"\n // data: Gecko returns \"\", Blink returns \"data://\", WebKit returns \"null\"\n // Gecko returns String(\"\") for file: mailto:\n // WebKit/Blink returns String(\"SCHEME://\") for file: mailto:\n switch (this._scheme) {\n case 'data':\n case 'file':\n case 'javascript':\n case 'mailto':\n return 'null';\n }\n host = this.host;\n if (!host) {\n return '';\n }\n return this._scheme + '://' + host;\n }\n };\n\n // Copy over the static methods\n var OriginalURL = scope.URL;\n if (OriginalURL) {\n jURL.createObjectURL = function(blob) {\n // IE extension allows a second optional options argument.\n // http://msdn.microsoft.com/en-us/library/ie/hh772302(v=vs.85).aspx\n return OriginalURL.createObjectURL.apply(OriginalURL, arguments);\n };\n jURL.revokeObjectURL = function(url) {\n OriginalURL.revokeObjectURL(url);\n };\n }\n\n scope.URL = jURL;\n\n})(window);\n\n/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n// minimal template polyfill\n(function() {\n\n var needsTemplate = (typeof HTMLTemplateElement === 'undefined');\n\n // NOTE: Patch document.importNode to work around IE11 bug that\n // casues children of a document fragment imported while\n // there is a mutation observer to not have a parentNode (!?!)\n // It's important that this is the first patch to `importNode` so that\n // dom produced for later patches is correct.\n if (/Trident/.test(navigator.userAgent)) {\n (function() {\n var Native_importNode = Document.prototype.importNode;\n Document.prototype.importNode = function() {\n var n = Native_importNode.apply(this, arguments);\n // Copy all children to a new document fragment since\n // this one may be broken\n if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n var f = this.createDocumentFragment();\n f.appendChild(n);\n return f;\n } else {\n return n;\n }\n };\n })();\n }\n\n // NOTE: we rely on this cloneNode not causing element upgrade.\n // This means this polyfill must load before the CE polyfill and\n // this would need to be re-worked if a browser supports native CE\n // but not