UNPKG

@teipublisher/pb-components

Version:
197 lines 186 kB
/** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const e=!(window.ShadyDOM&&window.ShadyDOM.inUse);let t,n;function i(n){t=(!n||!n.shimcssproperties)&&(e||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(n=window.ShadyCSS.cssBuild);const r=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?t=window.ShadyCSS.nativeCss:window.ShadyCSS?(i(window.ShadyCSS),window.ShadyCSS=void 0):i(window.WebComponents&&window.WebComponents.flags);const s=t; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */class o{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function a(e){return d(c(e=l(e)),e)}function l(e){return e.replace(w.comments,"").replace(w.port,"")}function c(e){let t=new o;t.start=0,t.end=e.length;let n=t;for(let i=0,r=e.length;i<r;i++)if(e[i]===g){n.rules||(n.rules=[]);let e=n,t=e.rules[e.rules.length-1]||null;n=new o,n.start=i+1,n.parent=e,n.previous=t,e.rules.push(n)}else e[i]===b&&(n.end=i+1,n=n.parent||t);return t}function d(e,t){let n=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=n.trim(),e.parent){let i=e.previous?e.previous.end:e.parent.start;n=t.substring(i,e.start-1),n=h(n),n=n.replace(w.multipleSpaces," "),n=n.substring(n.lastIndexOf(";")+1);let r=e.parsedSelector=e.selector=n.trim();e.atRule=0===r.indexOf(P),e.atRule?0===r.indexOf(C)?e.type=y.MEDIA_RULE:r.match(w.keyframesRule)&&(e.type=y.KEYFRAMES_RULE,e.keyframesName=e.selector.split(w.multipleSpaces).pop()):0===r.indexOf(v)?e.type=y.MIXIN_RULE:e.type=y.STYLE_RULE}let i=e.rules;if(i)for(let e,n=0,r=i.length;n<r&&(e=i[n]);n++)d(e,t);return e}function h(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let e=arguments[1],t=6-e.length;for(;t--;)e="0"+e;return"\\"+e}))}function p(e,t,n=""){let i="";if(e.cssText||e.rules){let n=e.rules;if(n&&!u(n))for(let e,r=0,s=n.length;r<s&&(e=n[r]);r++)i=p(e,t,i);else i=t?e.cssText:_(e.cssText),i=i.trim(),i&&(i=" "+i+"\n")}return i&&(e.selector&&(n+=e.selector+" "+g+"\n"),n+=i,e.selector&&(n+=b+"\n\n")),n}function u(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&0===t.selector.indexOf(v)}function _(e){return m(e=f(e))}function f(e){return e.replace(w.customProp,"").replace(w.mixinProp,"")}function m(e){return e.replace(w.mixinApply,"").replace(w.varApply,"")}const y={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},g="{",b="}",w={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},v="--",C="@media",P="@",S=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,x=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,E=/@media\s(.*)/,A=new Set,O="shady-unscoped";function T(e){const t=e.textContent;if(!A.has(t)){A.add(t);const e=document.createElement("style");e.setAttribute("shady-unscoped",""),e.textContent=t,document.head.appendChild(e)}}function k(e){return e.hasAttribute(O)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function N(e,t){return e?("string"==typeof e&&(e=a(e)),t&&M(e,t),p(e,s)):""}function I(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=a(e.textContent)),e.__cssRules||null}function M(e,t,n,i){if(!e)return;let r=!1,s=e.type;if(i&&s===y.MEDIA_RULE){let t=e.selector.match(E);t&&(window.matchMedia(t[1]).matches||(r=!0))}s===y.STYLE_RULE?t(e):n&&s===y.KEYFRAMES_RULE?n(e):s===y.MIXIN_RULE&&(r=!0);let o=e.rules;if(o&&!r)for(let e,r=0,s=o.length;r<s&&(e=o[r]);r++)M(e,t,n,i)}function D(e,t){let n=0;for(let i=t,r=e.length;i<r;i++)if("("===e[i])n++;else if(")"===e[i]&&0==--n)return i;return-1}function R(e,t){let n=e.indexOf("var(");if(-1===n)return t(e,"","","");let i=D(e,n+3),r=e.substring(n+4,i),s=e.substring(0,n),o=R(e.substring(i+1),t),a=r.indexOf(",");return-1===a?t(s,r.trim(),"",o):t(s,r.substring(0,a).trim(),r.substring(a+1).trim(),o)}function L(e){let t=e.localName,n="",i="";return t?t.indexOf("-")>-1?n=t:(i=t,n=e.getAttribute&&e.getAttribute("is")||""):(n=e.is,i=e.extends),{is:n,typeExtension:i}}function F(t){const n=[],i=t.querySelectorAll("style");for(let t=0;t<i.length;t++){const r=i[t];k(r)?e||(T(r),r.parentNode.removeChild(r)):(n.push(r.textContent),r.parentNode.removeChild(r))}return n.join("").trim()}window.ShadyDOM&&window.ShadyDOM.wrap;const B="css-build";function H(e){if(void 0!==n)return n;if(void 0===e.__cssBuild){const t=e.getAttribute(B);if(t)e.__cssBuild=t;else{const t=z(e);""!==t&&U(e),e.__cssBuild=t}}return e.__cssBuild||""}function j(e){return""!==H(e)}function z(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;if(t instanceof Comment){const e=t.textContent.trim().split(":");if(e[0]===B)return e[1]}return""}function U(e){const t="template"===e.localName?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function K(e,t){for(let n in t)null===n?e.style.removeProperty(n):e.style.setProperty(n,t[n])}function q(e,t){const n=window.getComputedStyle(e).getPropertyValue(t);return n?n.trim():""}function $(e){const t=x.test(e)||S.test(e);return x.lastIndex=0,S.lastIndex=0,t} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Y=/;\s*/m,J=/^\s*(initial)|(inherit)\s*$/,V=/\s*!important/,X="_-_";class W{constructor(){this._map={}}set(e,t){e=e.trim(),this._map[e]={properties:t,dependants:{}}}get(e){return e=e.trim(),this._map[e]||null}}let G=null;class Z{constructor(){this._currentElement=null,this._measureElement=null,this._map=new W}detectMixin(e){return $(e)}gatherStyles(e){const t=F(e.content);if(t){const n=document.createElement("style");return n.textContent=t,e.content.insertBefore(n,e.content.firstChild),n}return null}transformTemplate(e,t){void 0===e._gatheredStyle&&(e._gatheredStyle=this.gatherStyles(e));const n=e._gatheredStyle;return n?this.transformStyle(n,t):null}transformStyle(e,t=""){let n=I(e);return this.transformRules(n,t),e.textContent=N(n),n}transformCustomStyle(e){let t=I(e);return M(t,e=>{":root"===e.selector&&(e.selector="html"),this.transformRule(e)}),e.textContent=N(t),t}transformRules(e,t){this._currentElement=t,M(e,e=>{this.transformRule(e)}),this._currentElement=null}transformRule(e){e.cssText=this.transformCssText(e.parsedCssText,e),":root"===e.selector&&(e.selector=":host > *")}transformCssText(e,t){return e=e.replace(S,(e,n,i,r)=>this._produceCssProperties(e,n,i,r,t)),this._consumeCssProperties(e,t)}_getInitialValueForProperty(e){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(e)}_fallbacksFromPreviousRules(e){let t=e;for(;t.parent;)t=t.parent;const n={};let i=!1;return M(t,t=>{i=i||t===e,i||t.selector===e.selector&&Object.assign(n,this._cssTextToMap(t.parsedCssText))}),n}_consumeCssProperties(e,t){let n=null;for(;n=x.exec(e);){let i=n[0],r=n[1],s=n.index,o=s+i.indexOf("@apply"),a=s+i.length,l=e.slice(0,o),c=e.slice(a),d=t?this._fallbacksFromPreviousRules(t):{};Object.assign(d,this._cssTextToMap(l));let h=this._atApplyToCssProperties(r,d);e=`${l}${h}${c}`,x.lastIndex=s+h.length}return e}_atApplyToCssProperties(e,t){e=e.replace(Y,"");let n=[],i=this._map.get(e);if(i||(this._map.set(e,{}),i=this._map.get(e)),i){let r,s,o;this._currentElement&&(i.dependants[this._currentElement]=!0);const a=i.properties;for(r in a)o=t&&t[r],s=[r,": var(",e,X,r],o&&s.push(",",o.replace(V,"")),s.push(")"),V.test(a[r])&&s.push(" !important"),n.push(s.join(""))}return n.join("; ")}_replaceInitialOrInherit(e,t){let n=J.exec(t);return n&&(t=n[1]?this._getInitialValueForProperty(e):"apply-shim-inherit"),t}_cssTextToMap(e,t=!1){let n,i,r=e.split(";"),s={};for(let e,o,a=0;a<r.length;a++)e=r[a],e&&(o=e.split(":"),o.length>1&&(n=o[0].trim(),i=o.slice(1).join(":"),t&&(i=this._replaceInitialOrInherit(n,i)),s[n]=i));return s}_invalidateMixinEntry(e){if(G)for(let t in e.dependants)t!==this._currentElement&&G(t)}_produceCssProperties(e,t,n,i,r){if(n&&R(n,(e,t)=>{t&&this._map.get(t)&&(i=`@apply ${t};`)}),!i)return e;let s=this._consumeCssProperties(""+i,r),o=e.slice(0,e.indexOf("--")),a=this._cssTextToMap(s,!0),l=a,c=this._map.get(t),d=c&&c.properties;d?l=Object.assign(Object.create(d),a):this._map.set(t,l);let h,p,u=[],_=!1;for(h in l)p=a[h],void 0===p&&(p="initial"),d&&!(h in d)&&(_=!0),u.push(`${t}${X}${h}: ${p}`);return _&&this._invalidateMixinEntry(c),c&&(c.properties=l),n&&(o=`${e};${o}`),`${o}${u.join("; ")};`}}Z.prototype.detectMixin=Z.prototype.detectMixin,Z.prototype.transformStyle=Z.prototype.transformStyle,Z.prototype.transformCustomStyle=Z.prototype.transformCustomStyle,Z.prototype.transformRules=Z.prototype.transformRules,Z.prototype.transformRule=Z.prototype.transformRule,Z.prototype.transformTemplate=Z.prototype.transformTemplate,Z.prototype._separator=X,Object.defineProperty(Z.prototype,"invalidCallback",{get:()=>G,set(e){G=e}}); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const Q={},ee="_applyShimCurrentVersion",te="_applyShimNextVersion",ne="_applyShimValidatingVersion",ie=Promise.resolve(); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */function re(e){let t=Q[e];t&&se(t)}function se(e){e[ee]=e[ee]||0,e[ne]=e[ne]||0,e[te]=(e[te]||0)+1}function oe(e){return e[ee]===e[te]}function ae(e){return!oe(e)&&e[ne]===e[te]}function le(e){e[ne]=e[te],e._validating||(e._validating=!0,ie.then((function(){e[ee]=e[te],e._validating=!1})))} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let ce,de=null,he=window.HTMLImports&&window.HTMLImports.whenReady||null;function pe(e){requestAnimationFrame((function(){he?he(e):(de||(de=new Promise(e=>{ce=e}),"complete"===document.readyState?ce():document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&ce()})),de.then((function(){e&&e()})))}))} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const ue="__seenByShadyCSS",_e="__shadyCSSCachedStyle";let fe=null,me=null;class ye{constructor(){this.customStyles=[],this.enqueued=!1,pe(()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}enqueueDocumentValidation(){!this.enqueued&&me&&(this.enqueued=!0,pe(me))}addCustomStyle(e){e[ue]||(e[ue]=!0,this.customStyles.push(e),this.enqueueDocumentValidation())}getStyleForCustomStyle(e){if(e[_e])return e[_e];let t;return t=e.getStyle?e.getStyle():e,t}processStyles(){const e=this.customStyles;for(let t=0;t<e.length;t++){const n=e[t];if(n[_e])continue;const i=this.getStyleForCustomStyle(n);if(i){const e=i.__appliedElement||i;fe&&fe(e),n[_e]=e}}return e}}ye.prototype.addCustomStyle=ye.prototype.addCustomStyle,ye.prototype.getStyleForCustomStyle=ye.prototype.getStyleForCustomStyle,ye.prototype.processStyles=ye.prototype.processStyles,Object.defineProperties(ye.prototype,{transformCallback:{get:()=>fe,set(e){fe=e}},validateCallback:{get:()=>me,set(e){let t=!1;me||(t=!0),me=e,t&&this.enqueueDocumentValidation()}}}); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const ge=new Z;class be{constructor(){this.customStyleInterface=null,ge.invalidCallback=re}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=e=>{ge.transformCustomStyle(e)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()})})}prepareTemplate(e,t){if(this.ensure(),j(e))return;Q[t]=e;let n=ge.transformTemplate(e,t);e._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let e=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let t=0;t<e.length;t++){let n=e[t],i=this.customStyleInterface.getStyleForCustomStyle(n);i&&ge.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(e,t){if(this.ensure(),t&&K(e,t),e.shadowRoot){this.styleElement(e);let t=e.shadowRoot.children||e.shadowRoot.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}else{let t=e.children||e.childNodes;for(let e=0;e<t.length;e++)this.styleSubtree(t[e])}}styleElement(e){this.ensure();let{is:t}=L(e),n=Q[t];if((!n||!j(n))&&n&&!oe(n)){ae(n)||(this.prepareTemplate(n,t),le(n));let i=e.shadowRoot;if(i){let e=i.querySelector("style");e&&(e.__cssRules=n._styleAst,e.textContent=N(n._styleAst))}}}styleDocument(e){this.ensure(),this.styleSubtree(document.body,e)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new be;let i=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,n,i){t.flushCustomStyles(),t.prepareTemplate(e,n)},prepareTemplateStyles(e,t,n){window.ShadyCSS.prepareTemplate(e,t,n)},prepareTemplateDom(e,t){},styleSubtree(e,n){t.flushCustomStyles(),t.styleSubtree(e,n)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(e,t)=>q(e,t),flushCustomStyles(){t.flushCustomStyles()},nativeCss:s,nativeShadow:e,cssBuild:n,disableRuntime:r},i&&(window.ShadyCSS.CustomStyleInterface=i)}window.ShadyCSS.ApplyShim=ge, /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ window.JSCompiler_renameProperty=function(e,t){return e}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ let we,ve,Ce=/(url\()([^)]*)(\))/g,Pe=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Se(e,t){if(e&&Pe.test(e))return e;if("//"===e)return e;if(void 0===we){we=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",we="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),we)try{return new URL(e,t).href}catch(t){return e}return ve||(ve=document.implementation.createHTMLDocument("temp"),ve.base=ve.createElement("base"),ve.head.appendChild(ve.base),ve.anchor=ve.createElement("a"),ve.body.appendChild(ve.anchor)),ve.base.href=t,ve.anchor.href=e,ve.anchor.href||e}function xe(e,t){return e.replace(Ce,(function(e,n,i,r){return n+"'"+Se(i.replace(/["']/g,""),t)+"'"+r}))}function Ee(e){return e.substring(0,e.lastIndexOf("/")+1)} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Ae=!window.ShadyDOM||!window.ShadyDOM.inUse;Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss);const Oe=Ae&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})();let Te=window.Polymer&&window.Polymer.rootPath||Ee(document.baseURI||window.location.href),ke=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Ne=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,Ie=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Me=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,De=window.Polymer&&window.Polymer.legacyOptimizations||!1,Re=window.Polymer&&window.Polymer.legacyWarnings||!1,Le=window.Polymer&&window.Polymer.syncInitialRender||!1,Fe=window.Polymer&&window.Polymer.legacyUndefined||!1,Be=window.Polymer&&window.Polymer.orderedComputed||!1,He=window.Polymer&&window.Polymer.removeNestedTemplates||!1,je=window.Polymer&&window.Polymer.fastDomIf||!1,ze=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ue=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Ke=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,qe=0;const $e=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let n=qe++;function i(i){let r=i.__mixinSet;if(r&&r[n])return i;let s=t,o=s.get(i);if(!o){o=e(i),s.set(i,o);let t=Object.create(o.__mixinSet||r||null);t[n]=!0,o.__mixinSet=t}return o}return i}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let Ye={},Je={};function Ve(e,t){Ye[e]=Je[e.toLowerCase()]=t}function Xe(e){return Ye[e]||Je[e.toLowerCase()]}function We(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}class Ge extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let n=Xe(e);return n&&t?n.querySelector(t):n}return null}attributeChangedCallback(e,t,n,i){t!==n&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=Se(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=Ee(t)}return this.__assetpath}register(e){if(e=e||this.id){if(Ie&&void 0!==Xe(e))throw Ve(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Ve(e,this),We(this)}}}Ge.prototype.modules=Ye,customElements.define("dom-module",Ge); /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ const Ze="link[rel=import][type~=css]",Qe="include",et="shady-unscoped";function tt(e){return Ge.import(e)}function nt(e){const t=xe((e.body?e.body:e).textContent,e.baseURI),n=document.createElement("style");return n.textContent=t,n}function it(e){const t=e.trim().split(/\s+/),n=[];for(let e=0;e<t.length;e++)n.push(...rt(t[e]));return n}function rt(e){const t=tt(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(void 0===t._styles){const e=[];e.push(...at(t));const n=t.querySelector("template");n&&e.push(...st(n,t.assetpath)),t._styles=e}return t._styles}function st(e,t){if(!e._styles){const n=[],i=e.content.querySelectorAll("style");for(let e=0;e<i.length;e++){let r=i[e],s=r.getAttribute(Qe);s&&n.push(...it(s).filter((function(e,t,n){return n.indexOf(e)===t}))),t&&(r.textContent=xe(r.textContent,t)),n.push(r)}e._styles=n}return e._styles}function ot(e){let t=tt(e);return t?at(t):[]}function at(e){const t=[],n=e.querySelectorAll(Ze);for(let e=0;e<n.length;e++){let i=n[e];if(i.import){const e=i.import,n=i.hasAttribute(et);if(n&&!e._unscopedStyle){const t=nt(e);t.setAttribute(et,""),e._unscopedStyle=t}else e._style||(e._style=nt(e));t.push(n?e._unscopedStyle:e._style)}}return t}function lt(e){let t=e.trim().split(/\s+/),n="";for(let e=0;e<t.length;e++)n+=ct(t[e]);return n}function ct(e){let t=tt(e);if(t&&void 0===t._cssText){let e=ht(t),n=t.querySelector("template");n&&(e+=dt(n,t.assetpath)),t._cssText=e||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function dt(e,t){let n="";const i=st(e,t);for(let e=0;e<i.length;e++){let t=i[e];t.parentNode&&t.parentNode.removeChild(t),n+=t.textContent}return n}function ht(e){let t="",n=at(e);for(let e=0;e<n.length;e++)t+=n[e].textContent;return t} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const pt=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */;function ut(e){return e.indexOf(".")>=0}function _t(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function ft(e,t){return 0===e.indexOf(t+".")}function mt(e,t){return 0===t.indexOf(e+".")}function yt(e,t,n){return t+n.slice(e.length)}function gt(e,t){return e===t||ft(e,t)||mt(e,t)}function bt(e){if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let i=e[n].toString().split(".");for(let e=0;e<i.length;e++)t.push(i[e])}return t.join(".")}return e}function wt(e){return Array.isArray(e)?bt(e).split("."):e.toString().split(".")}function vt(e,t,n){let i=e,r=wt(t);for(let e=0;e<r.length;e++){if(!i)return;i=i[r[e]]}return n&&(n.path=r.join(".")),i}function Ct(e,t,n){let i=e,r=wt(t),s=r[r.length-1];if(r.length>1){for(let e=0;e<r.length-1;e++){if(i=i[r[e]],!i)return}i[s]=n}else i[t]=n;return r.join(".")} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */const Pt={},St=/-[a-z]/g,xt=/([A-Z])/g;function Et(e){return Pt[e]||(Pt[e]=e.indexOf("-")<0?e:e.replace(St,e=>e[1].toUpperCase()))}function At(e){return Pt[e]||(Pt[e]=e.replace(xt,"-$1").toLowerCase())} /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let Ot=0,Tt=0,kt=[],Nt=0,It=!1,Mt=document.createTextNode("");function Dt(){It=!1;const e=kt.length;for(let t=0;t<e;t++){let e=kt[t];if(e)try{e()}catch(e){setTimeout(()=>{throw e})}}kt.splice(0,e),Tt+=e}new window.MutationObserver(Dt).observe(Mt,{characterData:!0});const Rt={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},Lt={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},Ft={run:e=>(It||(It=!0,Mt.textContent=Nt++),kt.push(e),Ot++),cancel(e){const t=e-Tt;if(t>=0){if(!kt[t])throw new Error("invalid async handle: "+e);kt[t]=null}}},Bt=Ft,Ht=$e(e=>{class t extends e{static createProperties(e){const t=this.prototype;for(let n in e)n in t||t._createPropertyAccessor(n)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,n){let i=this.__data[e],r=this._shouldPropertyChange(e,t,i);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=i),this.__data[e]=t,this.__dataPending[e]=t),r}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Bt.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,n=this.__dataOld;this._shouldPropertiesChange(e,t,n)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,n)),this.__dataCounter--}_shouldPropertiesChange(e,t,n){return Boolean(t)}_propertiesChanged(e,t,n){}_shouldPropertyChange(e,t,n){return n!==t&&(n==n||t==t)}attributeChangedCallback(e,t,n,i){t!==n&&this._attributeToProperty(e,n),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,n,i)}_attributeToProperty(e,t,n){if(!this.__serializing){const i=this.__dataAttributes,r=i&&i[e]||e;this[r]=this._deserializeValue(t,n||this.constructor.typeForProperty(r))}}_propertyToAttribute(e,t,n){this.__serializing=!0,n=arguments.length<3?this[e]:n,this._valueToNodeAttribute(this,n,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,n){const i=this._serializeValue(t);"class"!==n&&"name"!==n&&"slot"!==n||(e=pt(e)),void 0===i?e.removeAttribute(n):e.setAttribute(n,""===i&&window.trustedTypes?window.trustedTypes.emptyScript:i)}_serializeValue(e){switch(typeof e){case"boolean":return e?"":void 0;default:return null!=e?e.toString():void 0}}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}return t}),jt={};let zt=HTMLElement.prototype;for(;zt;){let e=Object.getOwnPropertyNames(zt);for(let t=0;t<e.length;t++)jt[e[t]]=!0;zt=Object.getPrototypeOf(zt)}const Ut=window.trustedTypes?e=>trustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;function Kt(e,t){if(!jt[t]){let n=e[t];void 0!==n&&(e.__data?e._setPendingProperty(t,n):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=n))}}const qt=$e(e=>{const t=Ht(e);class n extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;t<e.length;t++)this.prototype._createPropertyAccessor(Et(e[t]))}static attributeNameForProperty(e){return At(e)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(e){for(let t in e)this._setProperty(t,e[t])}_ensureAttribute(e,t){const n=this;n.hasAttribute(e)||this._valueToNodeAttribute(n,t,e)}_serializeValue(e){switch(typeof e){case"object":if(e instanceof Date)return e.toString();if(e){if(Ut(e))return e;try{return JSON.stringify(e)}catch(e){return""}}default:return super._serializeValue(e)}}_deserializeValue(e,t){let n;switch(t){case Object:try{n=JSON.parse(e)}catch(t){n=e}break;case Array:try{n=JSON.parse(e)}catch(t){n=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+e)}break;case Date:n=isNaN(e)?String(e):Number(e),n=new Date(n);break;default:n=super._deserializeValue(e,t)}return n}_definePropertyAccessor(e,t){Kt(this,e),super._definePropertyAccessor(e,t)}_hasAccessor(e){return this.__dataHasAccessor&&this.__dataHasAccessor[e]}_isPropertyPending(e){return Boolean(this.__dataPending&&e in this.__dataPending)}}return n}),$t={"dom-if":!0,"dom-repeat":!0}; /** @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */let Yt=!1,Jt=!1;function Vt(){if(!Yt){Yt=!0;const e=document.createElement("textarea");e.placeholder="a",Jt=e.placeholder===e.textContent}return Jt}function Xt(e){Vt()&&"textarea"===e.localName&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}const Wt=(()=>{const e=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(t,n,i)=>{const r=n.getAttribute(i);e&&i.startsWith("on-")?t.setAttribute(i,e.createScript(r,i)):t.setAttribute(i,r)}})();function Gt(e){let t=e.getAttribute("is");if(t&&$t[t]){let n=e;for(n.removeAttribute("is"),e=n.ownerDocument.createElement(t),n.parentNode.replaceChild(e,n),e.appendChild(n);n.attributes.length;){const{name:t}=n.attributes[0];Wt(e,n,t),n.removeAttribute(t)}}return e}function Zt(e,t){let n=t.parentInfo&&Zt(e,t.parentInfo);if(!n)return e;for(let e=n.firstChild,i=0;e;e=e.nextSibling)if(t.parentIndex===i++)return e}function Qt(e,t,n,i){i.id&&(t[i.id]=n)}function en(e,t,n){if(n.events&&n.events.length)for(let i,r=0,s=n.events;r<s.length&&(i=s[r]);r++)e._addMethodEventListenerToNode(t,i.name,i.value,e)}function tn(e,t,n,i){n.templateInfo&&(t._templateInfo=n.templateInfo,t._parentTemplateInfo=i)}function nn(e,t,n){return e=e._methodHost||e,function(t){e[n]?e[n](t,t.detail):console.warn("listener method `"+n+"` not defined")}}const rn=$e(e=>{class t extends e{static _parseTemplate(e,t){if(!e._templateInfo){let n=e._templateInfo={};n.nodeInfoList=[],n.nestedTemplate=Boolean(t),n.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,n,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,n){return this._parseTemplateNode(e.content,t,n)}static _parseTemplateNode(e,t,n){let i=!1,r=e;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(t.hasInsertionPoint=!0):i=this._parseTemplateNestedTemplate(r,t,n)||i,Xt(r),r.firstChild&&this._parseTemplateChildNodes(r,t,n),r.hasAttributes&&r.hasAttributes()&&(i=this._parseTemplateNodeAttributes(r,t,n)||i),i||n.noted}static _parseTemplateChildNodes(e,t,n){if("script"!==e.localName&&"style"!==e.localName)for(let i,r=e.firstChild,s=0;r;r=i){if("template"==r.localName&&(r=Gt(r)),i=r.nextSibling,r.nodeType===Node.TEXT_NODE){let n=i;for(;n&&n.nodeType===Node.TEXT_NODE;)r.textContent+=n.textContent,i=n.nextSibling,e.removeChild(n),n=i;if(t.stripWhiteSpace&&!r.textContent.trim()){e.removeChild(r);continue}}let o={parentIndex:s,parentInfo:n};this._parseTemplateNode(r,t,o)&&(o.infoIndex=t.nodeInfoList.push(o)-1),r.parentNode&&s++}}static _parseTemplateNestedTemplate(e,t,n){let i=e,r=this._parseTemplate(i,t);return(r.content=i.content.ownerDocument.createDocumentFragment()).appendChild(i.content),n.templateInfo=r,!0}static _parseTemplateNodeAttributes(e,t,n){let i=!1,r=Array.from(e.attributes);for(let s,o=r.length-1;s=r[o];o--)i=this._parseTemplateNodeAttribute(e,t,n,s.name,s.value)||i;return i}static _parseTemplateNodeAttribute(e,t,n,i,r){return"on-"===i.slice(0,3)?(e.removeAttribute(i),n.events=n.events||[],n.events.push({name:i.slice(3),value:r}),!0):"id"===i&&(n.id=r,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let n=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,i=t.content||e.content,r=document.importNode(i,!0);r.__noInsertionPoint=!t.hasInsertionPoint;let s=r.nodeList=new Array(n.length);r.$={};for(let e,i=0,o=n.length;i<o&&(e=n[i]);i++){let n=s[i]=Zt(r,e);Qt(this,r.$,n,e),tn(this,n,e,t),en(this,n,e)}return r=r,r}_addMethodEventListenerToNode(e,t,n,i){let r=nn(i=i||e,t,n);return this._addEventListenerToNode(e,t,r),r}_addEventListenerToNode(e,t,n){e.addEventListener(t,n)}_removeEventListenerFromNode(e,t,n){e.removeEventListener(t,n)}}return t}); /** * @fileoverview * @suppress {checkPrototypalTypes} * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt The complete set of authors may be found * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by * Google as part of the polymer project is also subject to an additional IP * rights grant found at http://polymer.github.io/PATENTS.txt */let sn=0;const on=[],an={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ln="__computeInfo",cn=/[A-Z]/;function dn(e,t,n){let i=e[t];if(i){if(!e.hasOwnProperty(t)&&(i=e[t]=Object.create(e[t]),n))for(let e in i){let t=i[e],n=i[e]=Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e]}}else i=e[t]={};return i}function hn(e,t,n,i,r,s){if(t){let o=!1;const a=sn++;for(let l in n){let c=t[r?_t(l):l];if(c)for(let t,d=0,h=c.length;d<h&&(t=c[d]);d++)t.info&&t.info.lastRun===a||r&&!un(l,t.trigger)||(t.info&&(t.info.lastRun=a),t.fn(e,l,n,i,t.info,r,s),o=!0)}return o}return!1}function pn(e,t,n,i,r,s,o,a){let l=!1,c=t[o?_t(i):i];if(c)for(let t,d=0,h=c.length;d<h&&(t=c[d]);d++)t.info&&t.info.lastRun===n||o&&!un(i,t.trigger)||(t.info&&(t.info.lastRun=n),t.fn(e,i,r,s,t.info,o,a),l=!0);return l}function un(e,t){if(t){let n=t.name;return n==e||!(!t.structured||!ft(n,e))||!(!t.wildcard||!mt(n,e))}return!0}function _n(e,t,n,i,r){let s="string"==typeof r.method?e[r.method]:r.method,o=r.property;s?s.call(e,e.__data[o],i[o]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function fn(e,t,n,i,r){let s,o,a=e[an.NOTIFY],l=sn++;for(let o in t)t[o]&&(a&&pn(e,a,l,o,n,i,r)||r&&mn(e,o,n))&&(s=!0);s&&(o=e.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}function mn(e,t,n){let i=_t(t);if(i!==t){return yn(e,At(i)+"-changed",n[t],t),!0}return!1}function yn(e,t,n,i){let r={value:n,queueProperty:!0};i&&(r.path=i),pt(e).dispatchEvent(new CustomEvent(t,{detail:r}))}function gn(e,t,n,i,r,s){let o=(s?_t(t):t)!=t?t:null,a=o?vt(e,o):e.__data[t];o&&void 0===a&&(a=n[t]),yn(e,r.eventName,a,o)}function bn(e,t,n,i,r){let s,o=e.detail,a=o&&o.path;a?(i=yt(n,i,a),s=o&&o.value):s=e.currentTarget[n],s=r?!s:s,t[an.READ_ONLY]&&t[an.READ_ONLY][i]||!t._setPendingPropertyOrPath(i,s,!0,Boolean(a))||o&&o.queueProperty||t._invalidateProperties()}function wn(e,t,n,i,r){let s=e.__data[t];ke&&(s=ke(s,r.attrName,"attribute",e)),e._propertyToAttribute(t,r.attrName,s)}function vn(e,t,n,i){let r=e[an.COMPUTE];if(r)if(Be){sn++;const s=Sn(e),o=[];for(let e in t)Pn(e,r,o,s,i);let a;for(;a=o.shift();)En(e,"",t,n,a)&&Pn(a.methodInfo,r,o,s,i);Object.assign(n,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let s=t;for(;hn(e,r,s,n,i);)Object.assign(n,e.__dataOld),Object.assign(t,e.__dataPending),s=e.__dataPending,e.__dataPending=null}}const Cn=(e,t,n)=>{let i=0,r=t.length-1,s=-1;for(;i<=r;){const o=i+r>>1,a=n.get(t[o].methodInfo)-n.get(e.methodInfo);if(a<0)i=o+1;else{if(!(a>0)){s=o;break}r=o-1}}s<0&&(s=r+1),t.splice(s,0,e)},Pn=(e,t,n,i,r)=>{const s=t[r?_t(e):e];if(s)for(let t=0;t<s.length;t++){const o=s[t];o.info.lastRun===sn||r&&!un(e,o.trigger)||(o.info.lastRun=sn,Cn(o.info,n,i))}};function Sn(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;const n=e[an.COMPUTE];let i,{counts:r,ready:s,total:o}=xn(e);for(;i=s.shift();){t.set(i,t.size);const e=n[i];e&&e.forEach(e=>{const t=e.info.methodInfo;--o,0==--r[t]&&s.push(t)})}if(0!==o){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}function xn(e){const t=e[ln],n={},i=e[an.COMPUTE],r=[];let s=0;for(let e in t){const i=t[e];s+=n[e]=i.args.filter(e=>!e.literal).length+(i.dynamicFn?1:0)}for(let e in i)t[e]||r.push(e);return{counts:n,ready:r,total:s}}function En(e,t,n,i,r){let s=Bn(e,t,n,i,r);if(s===on)return!1;let o=r.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[o]?e._setPendingProperty(o,s,!0):(e[o]=s,!1)}function An(e,t,n){let i=e.__dataLinkedPaths;if(i){let r;for(let s in i){let o=i[s];mt(s,t)?(r=yt(s,o,t),e._setPendingPropertyOrPath(r,n,!0,!0)):mt(o,t)&&(r=yt(o,s,t),e._setPendingPropertyOrPath(r,n,!0,!0))}}}function On(e,t,n,i,r,s,o){n.bindings=n.bindings||[];let a={kind:i,target:r,parts:s,literal:o,isCompound:1!==s.length};if(n.bindings.push(a),Mn(a)){let{event:e,negate:t}=a.parts[0];a.listenerEvent=e||At(r)+"-changed",a.listenerNegate=t}let l=t.nodeInfoList.length;for(let n=0;n<a.parts.length;n++){let i=a.parts[n];i.compoundIndex=n,Tn(e,t,a,i,l)}}function Tn(e,t,n,i,r){if(!i.literal)if("attribute"===n.kind&&"-"===n.target[0])console.warn("Cannot set attribute "+n.target+' because "-" is not a valid attribute starting character');else{let s=i.dependencies,o={index:r,binding:n,part:i,evaluator:e};for(let n=0;n<s.length;n++){let i=s[n];"string"==typeof i&&(i=Yn(i),i.wildcard=!0),e._addTemplatePropertyEffect(t,i.rootProperty,{fn:kn,info:o,trigger:i})}}}function kn(e,t,n,i,r,s,o){let a=o[r.index],l=r.binding,c=r.part;if(s&&c.source&&t.length>c.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let i=n[t];t=yt(c.source,l.target,t),a._setPendingPropertyOrPath(t,i,!1,!0)&&e._enqueueClient(a)}else{let o=r.evaluator._evaluateBinding(e,c,t,n,i,s);o!==on&&Nn(e,a,l,c,o)}}function Nn(e,t,n,i,r){if(r=In(t,r,n,i),ke&&(r=ke(r,n.target,n.kind,t)),"attribute"==n.kind)e._valueToNodeAttribute(t,r,n.target);else{let i=n.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[i]?t[an.READ_ONLY]&&t[an.READ_ONLY][i]||t._setPendingProperty(i,r)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,i,r)}}function In(e,t,n,i){if(n.isCompound){let r=e.__dataCompoundStorage[n.target];r[i.compoundIndex]=t,t=r.join("")}return"attribute"!==n.kind&&("textContent"!==n.target&&("value"!==n.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t)),t}function Mn(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}function Dn(e,t){let{nodeList:n,nodeInfoList:i}=t;if(i.length)for(let t=0;t<i.length;t++){let r=i[t],s=n[t],o=r.bindings;if(o)for(let t=0;t<o.length;t++){let n=o[t];Rn(s,n),Ln(s,e,n)}s.__dataHost=e}}function Rn(e,t){if(t.isCompound){let n=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),i=t.parts,r=new Array(i.length);for(let e=0;e<i.length;e++)r[e]=i[e].literal;let s=t.target;n[s]=r,t.literal&&"property"==t.kind&&("className"===s&&(e=pt(e)),e[s]=t.literal)}}function Ln(e,t,n){if(n.listenerEvent){let i=n.parts[0];e.addEventListener(n.listenerEvent,(function(e){bn(e,t,n.target,i.source,i.negate)}))}}function Fn(e,t,n,i,r,s){s=t.static||s&&("object"!=typeof s||s[t.methodName]);let o={methodName:t.methodName,args:t.args,methodInfo:r,dynamicFn:s};for(let r,s=0;s<t.args.length&&(r=t.args[s]);s++)r.literal||e._addPropertyEffect(r.rootProperty,n,{fn:i,info:o,trigger:r});return s&&e._addPropertyEffect(t.methodName,n,{fn:i,info:o}),o}function Bn(e,t,n,i,r){let s=e._methodHost||e,o=s[r.methodName];if(o){let i=e._marshalArgs(r.args,t,n);return i===on?on:o.apply(s,i)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Hn=[],jn="(?:[a-zA-Z_$][\\w.:$\\-*]*)",zn="(?:("+jn+"|"+"(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)"+"|"+("(?:"+"(?:'(?:[^'\\\\]|\\\\.)*')"+"|"+'(?:"(?:[^"\\\\]|\\\\.)*")'+")")+")\\s*)",Un=new RegExp("(\\[\\[|{{)\\s*"+"(?:(!)\\s*)?"+("("+jn+"\\s*"+("(?:\\(\\s*(?:"+("(?:"+zn+"(?:,\\s*"+zn+")*)")+"?)\\)\\s*)")+"?)")+"(?:]]|}})","g");function Kn(e){let t="";for(let n=0;n<e.length;n++){t+=e[n].literal||""}return t}function qn(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let e={methodName:t[1],static:!0,args:Hn};if(t[2].trim()){return $n(t[2].replace(/\\,/g,"&comma;").split(","),e)}return e}return null}function $n(e,t){return t.args=e.map((function(e){let n=Yn(e);return n.literal||(t.static=!1),n}),this),t}function Yn(e){let t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),n={name:t,value:"",literal:!1},i=t[0];switch("-"===i&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':n.value=t.slice(1,-1),n.literal=!0;break;case"#":n.value=Number(t),n.literal=!0}return n.literal||(n.rootProperty=_t(t),n.structured=ut(t),n.structured&&(n.wildcard=".*"==t.slice(-2),n.wildcard&&(n.name=t.slice(0,-2)))),n}function Jn(e,t,n){let i=vt(e,n);return void 0===i&&(i=t[n]),i}function Vn(e,t,n,i){const r={indexSplices:i};Fe&&!e._overrideLegacyUndefined&&(t.splices=r),e.notifyPath(n+".splices",r),e.notifyPath(n+".length",t.length),Fe&&!e._overrideLegacyUndefined&&(r.indexSplices=[])}function Xn(e,t,n,i,r,s){Vn(e,t,n,[{index:i,addedCount:r,removed:s,object:t,type:"splice"}])}function Wn(e){return e[0].toUpperCase()+e.substring(1)}const Gn=$e(e=>{const t=rn(qt(e));class n extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return an}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Zn.length){let e=Zn[Zn.length-1];e._enqueueClient(this),this.__dataHost=